1 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
3 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
4 add drivemap for Vista. It breaks Windows 7.
6 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
8 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
11 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
15 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
16 (grub_fstest_SOURCES): Likewise.
17 (pkglib_MODULES): Add befs.mod.
18 (befs_mod_SOURCES): New variable.
19 (befs_mod_CFLAGS): Likewise.
20 (befs_mod_LDFLAGS): Likewise.
21 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
22 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
23 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
24 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
25 (grub_setup_SOURCES): Likewise.
26 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
27 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
28 (grub_setup_SOURCES): Likewise.
29 * fs/befs.c: New file.
30 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
31 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
32 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
33 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
34 (B_KEY_INDEX_ALIGN): New declaration.
35 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
36 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
37 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
38 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
39 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
40 (grub_afs_mount) [MODE_BFS]: Likewise.
41 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
42 (grub_afs_fs): Use GRUB_AFS_FSNAME
43 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
44 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
45 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
46 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
48 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
50 * util/getroot.c (find_root_device): Add support for MacOSX.
51 * util/hostdisk.c: Likewise.
53 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
55 * font/font.c (find_glyph): Check whether a font is present to avoid
58 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
60 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
62 2009-07-20 Pavel Roskin <proski@gnu.org>
64 * configure.ac: Trim excessively wordy excuses.
66 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
68 Add symlink, mtime and label support to AtheFS.
70 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
71 (grub_afs_iterate_dir): Handle symlinks.
72 (grub_afs_open): Use grub_afs_read_symlink.
73 (grub_afs_dir): Likewise.
75 (grub_afs_label): New function.
76 (grub_afs_fs): Add grub_afs_label.
77 (grub_afs_read_symlink): New function.
79 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
83 * fs/afs.c: Fix comments style.
84 (grub_afs_blockrun): Declare as packed.
85 (grub_afs_datastream): Likewise.
86 (grub_afs_bnode): Likewise.
87 (grub_afs_btree): Likewise.
88 (grub_afs_sblock): Likewise.
89 Declare `name' as char.
90 (grub_afs_inode): Declare as packed.
91 Change void *vnode to grub_uint32_t unused.
92 (grub_afs_iterate_dir): Check that key_size is positive.
93 (grub_afs_mount): Don't read superblock twice.
94 (grub_afs_dir): Don't free node in case of error,
95 grub_fshelp_find_file already handles this.
96 (grub_afs_open): Likewise.
98 2009-07-19 Pavel Roskin <proski@gnu.org>
100 * Makefile.in: Remove LIBLZO and enable_lzo.
101 * conf/i386-pc.rmk: Remove lzo support.
102 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
103 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
105 * kern/i386/pc/lzo1x.S: Remove.
106 * kern/i386/pc/startup.S: Remove lzo support.
107 * util/i386/pc/grub-mkimage.c: Likewise.
109 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
111 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
112 * fs/xfs.c (grub_xfs_dir): Likewise.
113 * fs/afs.c (grub_afs_dir): Likewise.
114 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
115 (grub_iso9660_open): Likewise.
116 * fs/jfs.c (grub_jfs_open): Likewise.
117 * fs/ext2.c (grub_ext2_dir): Likewise.
118 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
119 * script/sh/lexer.c (grub_script_yylex): Likewise.
121 2009-07-16 Pavel Roskin <proski@gnu.org>
123 * configure.ac: Never add "-c" to CFLAGS.
125 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
127 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
128 grub_cv_cc_efiemu should be used.
130 * configure.ac: Typo fixes.
132 * kern/mm.c (grub_zalloc): New function.
133 (grub_debug_zalloc): Likewise.
134 * include/grub/mm.h: Declare grub_zalloc() and
136 * util/misc.c (grub_zalloc): New function.
137 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
138 instead of grub_malloc(), remove unneeded initializations.
139 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
140 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
141 * commands/parttool.c (grub_cmd_parttool): Likewise.
142 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
143 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
144 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
145 * disk/usbms.c (grub_usbms_finddevs): Likewise.
146 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
147 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
148 (grub_cmd_efiemu_pnvram): Likewise.
149 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
150 * fs/iso9660.c (grub_iso9660_mount): Likewise.
151 (grub_iso9660_iterate_dir): Likewise.
152 * fs/jfs.c (grub_jfs_opendir): Likewise.
153 * fs/ntfs.c (list_file): Likewise.
154 (grub_ntfs_mount): Likewise.
155 * kern/disk.c (grub_disk_open): Likewise.
156 * kern/dl.c (grub_dl_load_core): Likewise.
157 * kern/elf.c (grub_elf_file): Likewise.
158 * kern/env.c (grub_env_context_open): Likewise.
159 (grub_env_set): Likewise.
160 (grub_env_set_data_slot): Likewise.
161 * kern/file.c (grub_file_open): Likewise.
162 * kern/fs.c (grub_fs_blocklist_open): Likewise.
163 * loader/i386/multiboot.c (grub_module): Likewise.
164 * loader/xnu.c (grub_xnu_create_key): Likewise.
165 (grub_xnu_create_value): Likewise.
166 * normal/main.c (grub_normal_add_menu_entry): Likewise.
167 (read_config_file): Likewise.
168 * normal/menu_entry.c (make_screen): Likewise.
169 * partmap/sun.c (sun_partition_map_iterate): Likewise.
170 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
171 * script/sh/script.c (grub_script_parse): Likewise.
172 * video/bitmap.c (grub_video_bitmap_create): Likewise.
173 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
174 * video/readers/png.c (grub_png_output_byte): Likewise.
175 (grub_video_reader_png): Likewise.
177 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
179 Enable all targets that can be built by default
181 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
182 grub-mkfont and grub-fstest if they can be built
184 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
186 Fix hang and segmentation fault in grub-emu-usb
188 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
189 * util/usb.c (grub_libusb_devices): likewise
190 (grub_libusb_init): rename to ...
191 (GRUB_MOD_INIT (libusb)):...this
192 (grub_libusb_fini): rename to ..
193 (GRUB_MOD_FINI (libusb)):...this
194 * disk/usbms.c (grub_usbms_transfer): fix retry logic
195 * include/grub/disk.h (grub_raid_init): removed, it's useless
196 (grub_raid_fini): likewise
197 (grub_lvm_init): likewise
198 (grub_lvm_fini): likewise
199 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
202 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
206 * Makefile.in (LIBUSB): new macro
207 * genmk.rb (Utility/print_tail): new method
208 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
209 (top level): call util.print_tail at the end.
211 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
213 Make FreeBSD accept zpool.cache
215 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
216 type is /boot/zfs/zpool.cache
218 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
222 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
223 correct wrong typedef
224 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
226 2009-07-15 Pavel Roskin <proski@gnu.org>
228 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
229 * kern/disk.c (struct grub_disk_cache): Likewise.
231 * commands/probe.c (options): Typo fix.
233 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
234 Increase to 0x5a to accommodate FAT32. Adjust other offsets
236 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
238 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
239 the end of "Error" to make the message more readable.
241 * boot/i386/pc/boot.S (kernel_segment): Remove.
242 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
245 * boot/i386/pc/boot.S (boot_version): Remove.
246 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
249 * include/grub/i386/pc/boot.h: Sort all offsets.
250 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
251 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
252 * boot/i386/pc/boot.S: Assert location of every offset listed in
253 include/grub/i386/pc/boot.h.
255 2009-07-13 Pavel Roskin <proski@gnu.org>
257 * include/grub/i386/coreboot/machine.h: Rename
258 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
259 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
260 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
262 * kern/dl.c: Force native word size to suppress warnings when
265 * kern/device.c (grub_device_iterate): Change struct part_ent to
266 hold the name, not a pointer to it. Use one grub_malloc() per
267 partition, not two. Free partition_name if grub_malloc() fails.
268 Set ents to NULL only before grub_partition_iterate() is called.
270 2009-07-11 Bean <bean123ch@gmail.com>
272 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
275 2009-07-10 Bean <bean123ch@gmail.com>
276 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
278 * kern/ieee1275/openfw.c (grub_children_iterate)
279 (grub_devalias_iterate): Fix size evaluation for property or path
280 strings, which was broken since r2132.
282 2009-07-07 Pavel Roskin <proski@gnu.org>
284 * commands/search.c (search_file): Merge into ...
285 (search_fs): ... this. Accept search type as argument.
286 (grub_cmd_search): Pass search type to search_fs().
288 * include/grub/util/console.h: New file.
289 * util/console.c: Use it instead of grub/machine/console.h.
290 * util/grub-emu.c: Likewise.
292 * lib/arg.c (find_long_option): Remove.
293 (find_long): Add `len' argument, make `s' const char *.
294 (grub_arg_parse): Parse long options in place, not in a
297 2009-07-06 Pavel Roskin <proski@gnu.org>
299 * commands/search.c (search_fs): Fix potential NULL pointer
302 * commands/search.c (search_fs): Replace QUID macro with quid_fn
305 2009-07-06 Daniel Mierswa <impulze@impulze.org>
307 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
310 2009-07-05 Pavel Roskin <proski@gnu.org>
312 * include/grub/i386/linux.h (struct linux_kernel_params):
313 Restore padding3, it's still needed.
315 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
317 * util/osdetect.lua: Likewise.
319 2009-07-05 Bean <bean123ch@gmail.com>
321 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
323 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
324 (grub_lua_getenv): Likewise.
325 (grub_lua_setenv): Likewise.
326 (save_errno): New function.
327 (push_result): Likewise.
328 (grub_lua_enum_device): Likewise.
329 (grub_lua_enum_file): Likewise.
330 (grub_lua_file_open): Likewise.
331 (grub_lua_file_close): Likewise.
332 (grub_lua_file_seek): Likewise.
333 (grub_lua_file_read): Likewise.
334 (grub_lua_file_getline): Likewise.
335 (grub_lua_file_getsize): Likewise.
336 (grub_lua_file_getpos): Likewise.
337 (grub_lua_file_eof): Likewise.
338 (grub_lua_file_exist): Likewise.
339 (grub_lua_add_menu): Likewise.
341 * script/lua/grub_lua.h (isupper): New inline function.
344 (isxdigit): Likewise.
345 (strcspn): Change to normal function.
346 (strpbkr): New function declaration.
349 * script/lua/grub_main.c (scan_str): New function.
354 * script/lua/linit.c (lualibs): Enable the string library.
356 * util/osdetect.lua: New file.
358 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
360 * include/grub/i386/linux.h (struct linux_kernel_params): Add
361 `capabilities' member.
363 2009-07-02 Pavel Roskin <proski@gnu.org>
365 * genparttoollist.sh: Add missing newline at the end.
367 2009-07-01 Pavel Roskin <proski@gnu.org>
369 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
371 * util/hostdisk.c (open_device): Remove `const' from
372 `sysctl_size', as sysctlbyname() can change it (in this case it
373 doesn't actually happen).
375 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
376 using signed long int constants.
378 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
379 constant to avoid a warning on FreeBSD.
381 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
384 * Makefile.in: Install include/grub/machine symlink.
386 * Makefile.in: When installing symlinks, use "cp -fR", which
387 works on FreeBSD and MacOSX.
388 From Yves Blusseau <cl7m42e02@sneakemail.com>
390 * kern/dl.c (grub_dl_resolve_symbol): Make static.
391 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
393 * util/misc.c: Move grub_reboot() and grub_halt() ...
394 * util/grub-emu.c: ... here. Make main_env static.
395 * include/grub/util/misc.h: Remove main_env.
397 * kern/mm.c: Use correct format to print size_t.
399 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
400 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
401 * kern/powerpc/dl.c: Likewise.
402 * kern/sparc64/dl.c: Likewise.
403 * kern/x86_64/dl.c: Likewise.
405 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
407 Fix grub-emu build on sparc64-ieee1275.
409 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
410 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
412 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
414 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
415 (grub_reboot, grub_halt): New functions.
417 * util/i386/pc/misc.c: Delete. Update all users.
418 * util/sparc64/ieee1275/misc.c: Likewise.
419 * util/powerpc/ieee1275/misc.c: Likewise.
421 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
423 * conf/i386.rmk (setjmp_mod_SOURCES)
424 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
425 * conf/common.rmk (setjmp_mod_SOURCES)
426 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
427 to use $(target_cpu).
428 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
429 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
430 * conf/powerpc-ieee1275.rmk: Likewise.
431 * conf/sparc64-ieee1275.rmk: Likewise.
433 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
434 $(target_cpu) for kern/$(target_cpu)/dl.c.
435 * conf/i386-efi.rmk: Likewise.
436 * conf/i386-ieee1275.rmk: Likewise.
437 * conf/x86_64-efi.rmk: Likewise.
438 * conf/i386-coreboot.rmk: Likewise.
439 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
440 $(target_cpu) for kern/$(target_cpu)/dl.c and for
441 kern/$(target_cpu)/cache.S.
442 * conf/sparc64-ieee1275.rmk: Likewise.
444 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
446 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
447 type to `grub_uint8_t', and adjust `padding9' accordingly.
449 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
451 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
453 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
454 assembly in final jump, using register constraints.
456 (grub_linux_boot): For text mode, initialize `have_vga' using
457 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
459 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
460 right before the final jump.
462 Set `video_mode' to 0x3.
464 Document initialization of `video_page', `video_mode' and
467 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
469 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
470 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
471 and set GRUB_LINUX_FLAG_QUIET appropriately.
473 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
475 Fix build on Debian / sparc.
477 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
479 2009-06-28 Pavel Roskin <proski@gnu.org>
481 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
484 * util/grub.d/10_linux.in: Match SUSE style initrd names.
486 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
488 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
491 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
495 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
496 file can't be opened. grub_file_open() is already supposed to set
497 grub_errno / grub_errmsg appropriately.
498 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
500 2009-06-27 Pavel Roskin <proski@gnu.org>
501 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
503 * include/grub/dl.h: Include grub/elf.h.
504 (struct grub_dl): Add symtab field.
505 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
506 GRUB_MODULES_MACHINE_READONLY.
507 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
508 of the header for read-only modules.
509 (grub_dl_unload): Free mod->symtab for read-only modules.
510 * kern/i386/dl.c: Use mod->symtab.
511 * kern/powerpc/dl.c: Likewise.
512 * kern/sparc64/dl.c: Likewise.
513 * kern/x86_64/dl.c: Likewise.
515 * conf/i386-qemu.rmk: New file.
516 * kern/i386/qemu/startup.S: Likewise.
517 * kern/i386/qemu/mmap.c: Likewise.
518 * boot/i386/qemu/boot.S: Likewise.
519 * include/grub/i386/qemu/time.h: Likewise.
520 * include/grub/i386/qemu/serial.h: Likewise.
521 * include/grub/i386/qemu/kernel.h: Likewise.
522 * include/grub/i386/qemu/console.h: Likewise.
523 * include/grub/i386/qemu/boot.h: Likewise.
524 * include/grub/i386/qemu/init.h: Likewise.
525 * include/grub/i386/qemu/machine.h: Likewise.
526 * include/grub/i386/qemu/loader.h: Likewise.
527 * include/grub/i386/qemu/memory.h: Likewise.
529 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
530 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
531 [qemu] (pkglib_IMAGES): Add `boot.img'.
532 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
533 [qemu] (boot_img_FORMAT): New variables.
534 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
535 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
536 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
537 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
538 [qemu] (kernel_img_FORMAT): New variables.
540 * configure.ac: Recognise `i386-qemu'.
542 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
543 (for no compression).
544 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
545 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
546 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
547 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
550 2009-06-27 Pavel Roskin <proski@gnu.org>
552 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
554 * efiemu/prepare32.c: Likewise.
555 * efiemu/prepare64.c: Likewise.
557 2009-06-26 Pavel Roskin <proski@gnu.org>
559 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
560 * include/grub/elf.h: Define symbols without "32" or "64" based
561 on GRUB_TARGET_WORDSIZE.
562 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
563 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
565 * efiemu/loadcore64.c: Likewise.
566 * loader/i386/bsd32.c: Likewise.
567 * loader/i386/bsd64.c: Likewise.
568 * kern/dl.c: Remove own ELF definitions.
569 * util/i386/efi/grub-mkimage.c: Likewise.
571 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
573 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
574 segment 0x0 unconditionally, because the reference generated by
575 GAS is an absolute address.
577 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
579 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
580 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
582 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
584 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
585 indexes. Check for -f explicitly.
586 (search_file): Improve error message.
587 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
589 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
591 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
592 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
594 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
596 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
597 * conf/i386-ieee1275.rmk: Likewise.
598 * conf/i386-coreboot.rmk: Likewise.
600 * kern/i386/pc/startup.S (grub_stop): Remove function.
601 * kern/i386/ieee1275/startup.S: Likewise.
602 * kern/i386/coreboot/startup.S: Likewise.
603 * kern/i386/misc.S (grub_stop): New function.
605 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
607 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
608 * kern/i386/realmode.S (real_to_prot): ... to here.
610 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
612 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
614 (kernel_elf_SOURCES): Rename to ...
615 (kernel_img_SOURCES): ... this.
616 (kernel_elf_HEADERS): Rename to ...
617 (kernel_img_HEADERS): ... this. Update all users.
618 (kernel_elf_ASFLAGS): Rename to ...
619 (kernel_img_ASFLAGS): ... this.
620 (kernel_elf_CFLAGS): Rename to ...
621 (kernel_img_CFLAGS): ... this.
622 (kernel_elf_LDFLAGS): Rename to ...
623 (kernel_img_LDFLAGS): ... this.
624 * conf/i386-coreboot.rmk: Likewise.
625 * conf/powerpc-ieee1275.rmk: Likewise.
627 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
630 2009-06-21 Pavel Roskin <proski@gnu.org>
632 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
633 to match nested functions.
634 * loader/sparc64/ieee1275/linux.c: Likewise.
636 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
638 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
640 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
643 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
645 Fix asm file handling on ELF, and remove workarounds.
647 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
648 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
649 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
650 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
652 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
656 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
657 and loader/i386/bsd64.c
658 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
659 (FREEBSD_MODTYPE_ELF_MODULE): New definition
660 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
661 (grub_freebsd_load_elfmodule32): New declaration
662 (grub_freebsd_load_elfmoduleobj64): Likewise
663 (grub_freebsd_load_elf_meta32): Likewise
664 (grub_freebsd_load_elf_meta64): Likewise
665 (grub_freebsd_add_meta): Likewise
666 (grub_freebsd_add_meta_module): Likewise
667 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
668 (grub_freebsd_add_meta_module): Likewise and move module-specific
669 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
670 (grub_cmd_freebsd): Add elf-kernel specific parts
671 based on grub_freebsd_add_meta_module
672 (grub_cmd_freebsd_module): Add type parsing moved from
673 grub_freebsd_add_meta_module
674 (grub_cmd_freebsd_module_elf): New function
675 (cmd_freebsd_module_elf): New variable
676 (GRUB_MOD_INIT): Register freebsd_module_elf
677 * loader/i386/bsd32.c: New file
678 * loader/i386/bsd64.c: Likewise
679 * loader/i386/bsdXX.c: Likewise
680 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
681 (grub_elf64_load): Likewise
682 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
684 (grub_elf64_load_hook_t): Likewise
686 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
688 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
690 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
691 don't write a menu entry for recovery mode.
693 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
695 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
696 after it's no longer needed.
698 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
700 * include/grub/i386/loader.h (grub_linux_prot_size)
701 (grub_linux_tmp_addr, grub_linux_real_addr)
702 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
704 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
705 common grub_util_info() call to ...
706 (generate_image): ... here.
707 Fix use of uninitialized memory, comparison of signed with
708 unsigned integers and memory leak.
709 Remove bogus module address message.
711 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
713 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
715 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
717 2009-06-19 Pavel Roskin <proski@gnu.org>
719 * configure.ac: Remove stray AC_MSG_CHECKING.
721 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
723 * disk/scsi.c (grub_scsi_open): use continue instead of big if
725 2009-06-18 Pavel Roskin <proski@gnu.org>
727 * conf/common.rmk: Add fs_file.mod.
728 * disk/fs_file.c: New file.
729 * include/grub/disk.h (enum grub_disk_dev_id): Add
730 GRUB_DISK_DEVICE_FILE_ID.
732 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
734 Fix build with Apple's toolchain. Part 2
736 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
739 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
741 Fix build with Apple's toolchain. Part 1
743 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
745 * configure.ac: remove a leftover AC_MSG_RESULT
746 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
749 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
753 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
754 (decomp_block): initialize ch
755 use grub_memcpy instead of memcpy
757 2009-06-17 Pavel Roskin <proski@gnu.org>
759 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
760 version, use declarations needed to use vga_text as the startup
763 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
764 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
766 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
767 and grub_at_keyboard_fini(), it's done on module load and
770 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
772 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
774 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
776 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
780 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
781 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
782 (grub_script_yylex): don't segfault on unterminated script
783 newline terminates command and variable
785 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
787 avoid double grub_adjust_range call. Bug reported by David Simner
789 * kern/disk.c (grub_disk_write): change to raw disk access before
792 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
794 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
795 spaces, for the benefit of help2man.
796 * util/i386/efi/grub-mkimage.c (usage): Likewise.
798 2009-06-16 Pavel Roskin <proski@gnu.org>
800 * kern/i386/halt.c: Include grub/machine/init.h.
801 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
803 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
805 * util/grub.d/30_os-prober.in: Use ${root} in the generated
808 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
810 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
813 2009-06-16 Pavel Roskin <proski@gnu.org>
815 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
816 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
817 save %dx, we only need %dl and we never change it.
818 * boot/i386/pc/cdboot.S: Don't set the root drive.
819 * boot/i386/pc/pxeboot.S: Likewise.
820 * include/grub/i386/pc/boot.h: Remove
821 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
822 GRUB_BOOT_MACHINE_DRIVE_CHECK.
823 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
824 * kern/i386/pc/init.c (make_install_device): Remove references
826 * kern/i386/pc/startup.S: Likewise.
827 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
829 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
833 * commands/xnu_uuid.c: new file
834 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
835 (xnu_uuid_mod_SOURCES): new variable
836 (xnu_uuid_mod_CFLAGS): likewise
837 (xnu_uuid_mod_LDFLAGS): likewise
838 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
839 * conf/i386-ieee1275.rmk: likewise
840 * conf/i386-pc.rmk: likewise
841 * conf/powerpc-ieee1275.rmk: likewise
842 * conf/sparc64-ieee1275.rmk: likewise
843 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
845 2009-06-16 Pavel Roskin <proski@gnu.org>
847 * configure.ac: Avoid '==' in test command, it's not portable.
849 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
853 * commands/probe.c: new file
854 * conf/common.rmk (pkglib_MODULES): add probe.mod
855 (probe_mod_SOURCES): new variable
856 (probe_mod_CFLAGS): likewise
857 (probe_mod_LDFLAGS): likewise
858 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
859 * conf/i386-ieee1275.rmk: likewise
860 * conf/i386-pc.rmk: likewise
861 * conf/powerpc-ieee1275.rmk: likewise
862 * conf/sparc64-ieee1275.rmk: likewise
864 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
866 Fix handling of string like \"hello\" and "a
869 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
870 (grub_script_yylex): fix parsing of quoting, escaping and newline
872 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
874 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
877 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
879 * util/grub-mkconfig.in: Fix parsing of --output option.
881 2009-06-12 Pavel Roskin <proski@gnu.org>
883 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
884 genmk.rb don't need to be generated or installed.
886 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
888 * commands/i386/pc/drivemap_int13h.S: add more comments
890 2009-06-11 Pavel Roskin <proski@gnu.org>
892 * Makefile.in (uninstall): Uninstall manuals.
894 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
895 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
896 and update-grub_lib in two places.
897 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
899 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
902 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
903 `entry_lo' to fix variable shadowing.
905 2009-06-11 Christian Franke <franke@computer.org>
907 * kern/misc.c (__enable_execute_stack): Add missing return type
908 to prevent gcc warning.
910 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
912 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
914 2009-06-11 Pavel Roskin <proski@gnu.org>
916 * Makefile.in: Don't rely on any scripts being executable.
917 Always use $(SHELL) to run shell scripts.
919 * configure.ac: Always define ___main if using -nostdlib. This
920 fixes tests on Cygwin.
922 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
926 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
927 is in bytes and not in blocks
929 2009-06-11 Pavel Roskin <proski@gnu.org>
931 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
934 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
936 * util/grub.d/30_os-prober.in: Fix a comment. Source
937 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
938 to set the root device. Place drivemap command in the generated
941 2009-06-11 Pavel Roskin <proski@gnu.org>
943 * configure.ac: Remove host_m32. Issues with 64-bit utilities
944 have long been resolved.
946 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
948 * util/grub.d/10_linux.in: Capitalise "Linux".
950 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
952 2009-06-11 Pavel Roskin <proski@gnu.org>
954 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
955 fix a gcc warning and ensure that the function won't ever exit.
957 * kern/i386/ieee1275/init.c: Add missing prototype for
960 * loader/ieee1275/multiboot2.c [__i386__]: Include
961 grub/cpu/multiboot.h.
963 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
964 casts to short - they are not portable and cause warnings. Fix
965 use of uninitialized values in input_buf. Use ARRAY_SIZE.
967 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
971 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
973 (grub_get_root_biosnumber_saved): new variable
974 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
975 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
976 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
977 %dx after the call if necessary
978 * conf/common.rmk (pkglib_MODULES): remove boot.mod
979 (boot_mod_SOURCES): remove
980 (boot_mod_CFLAGS): remove
981 (boot_mod_LDFLAGS): remove
982 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
983 (boot_mod_SOURCES): new variable
984 (boot_mod_CFLAGS): likewise
985 (boot_mod_LDFLAGS): likewise
986 * conf/i386-efi.rmk: likewise
987 * conf/i386-ieee1275.rmk: likewise
988 * conf/i386-pc.rmk: likewise
989 * conf/powerpc-ieee1275.rmk: likewise
990 * conf/sparc64-ieee1275.rmk: likewise
991 * conf/x86_64-efi.rmk: likewise
992 * include/grub/i386/pc/biosnum.h: new file
993 * lib/i386/pc/biosnum.c: likewise
994 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
995 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
996 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
998 2009-06-10 Pavel Roskin <proski@gnu.org>
1000 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1001 Use separate variables. Read only the file size at the end, but
1002 not the checksum that we don't use.
1004 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1007 * kern/ieee1275/openfw.c: Remove libc includes.
1008 * kern/ieee1275/cmain.c: Likewise.
1009 * include/grub/ieee1275/ieee1275.h: Likewise.
1011 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1014 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1016 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1017 `genparttoollist.sh'.
1018 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1019 Add `*.sh' to the list find searches for and change `mdate.sh'
1022 2009-06-10 Pavel Roskin <proski@gnu.org>
1024 * include/grub/multiboot2.h: Provide compatibility defines for
1026 * include/multiboot2.h: Include stdint.h only if needed, using
1028 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1030 * loader/ieee1275/multiboot2.c: Likewise.
1031 * loader/multiboot2.c: Likewise.
1032 * loader/multiboot_loader.c: Likewise.
1034 * configure.ac: Use -nostdlib when probing for the target. It
1035 should not be required to have libc for the target.
1037 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1038 they fail without libc headers for the target.
1039 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1041 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1042 preprocessor conditionals.
1044 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1045 build system doesn't need to be aware of the tar.c internals.
1047 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1049 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1051 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1053 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1054 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1056 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1058 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1059 aren't available if ata.mod gets used.
1061 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1063 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1064 initialising controller.
1065 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1067 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1069 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1070 to choose between ata and biosdisk module on i386-pc.
1072 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1074 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1075 Subclass and Programming Interface fields in terms of the 3 byte
1076 Class Code register.
1077 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1079 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1080 interface is OHCI. Add grub_dprintf for symmetry with
1082 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1083 interface is UHCI. Add interf variable for programming
1084 interface. Print interface with class/subclass.
1086 * bus/usb/ohci.c: Set interf with correct field.
1088 * bus/usb/uhci.c: Remove unneeded doubled lines.
1089 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1090 Remove whitespace inside comment.
1092 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1094 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1095 as fallback an equivalent option without depth.
1097 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1099 Not fail if unable to retrieve C/H/S on LBA disks
1101 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1102 if unable to retrieve C/H/S on LBA disks
1104 2009-06-08 Pavel Roskin <proski@gnu.org>
1106 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1109 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1111 * Makefile.in (uninstall): Remove all $lib_DATA files.
1113 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1115 Bugfix: install on partitionless device
1117 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1120 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1122 * Makefile.in (uninstall): Remove all $include_DATA files.
1124 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1126 * commands/true.c: New file. Implement the true and false commands.
1127 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1128 (true_mod_SOURCES): New variable.
1129 (true_mod_CFLAGS): Likewise.
1130 (true_mod_LDFLAGS): Likewise.
1132 2009-06-05 Colin D Bennett <colin@gibibit.com>
1134 Optimized font character lookup using binary search instead of linear
1135 search. Fonts now are required to have the character index ordered by
1138 * font/font.c (load_font_index): Verify that fonts have ordered
1140 (find_glyph): Use binary search instead of linear search to find a
1141 character in a font.
1143 2009-06-05 Michael Scherer <misc@mandriva.org>
1145 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1146 uses case sensitive btree.
1147 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1148 only for case insensitive filesystems.
1150 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1152 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1153 * conf/common.rmk (search_mod_CFLAGS): likewise
1155 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1157 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1158 compensate a compiler bug
1160 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1162 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1165 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1167 Definitions for creating asm symbols with Apple's CC
1169 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1170 [APPLE_CC] (VARIABLE): likewise
1172 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1174 Disable lnxboot.img when compiled
1177 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1178 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1179 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1180 [! APPLE_CC] (CODE_LENG): skip
1181 [! APPLE_CC] (setup_sects): likewise
1182 [! APPLE_CC]: skip filling
1184 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1186 Address in trampolines based on 32-bit registers when compiled
1189 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1191 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1193 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1195 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1197 * kern/misc.c [APPLE_CC] (memcpy): new function
1198 [APPLE_CC] (memmove): likewise
1199 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1200 (memcpy): define alias conditionally on !APPLE_CC
1203 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1204 APPLE_CC are defined
1205 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1206 (grub_assert_fail): make prototype conditional
1208 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1210 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1212 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1214 (CLEANFILES): add grub-macho2img
1215 (grub_macho2img_SOURCES): new variable
1216 * kern/i386/pc/startup.S (bss_start): new variable
1218 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1219 * util/grub-macho2img.c: new file
1221 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1223 Use objconv when compiling with Apple's CC
1225 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1226 (efiemu64.o): likewise
1227 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1228 when compiling with Apple's CC
1229 (efiemu64_s.o): likewise
1230 * configure.ac: check for objconv when compiling with Apple's CC
1231 * genmk.rb: use objconv for modules when compiled with Apple's CC
1233 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1235 Define segment as well as section when compiling with
1238 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1239 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1240 (efiemu_convert_pointer): likewise
1241 (efiemu_set_virtual_address_map): likewise
1242 (efiemu_convert_pointer): likewise
1243 (efiemu_getcrc32): likewise
1244 (init_crc32_table): likewise
1246 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1247 (GRUB_MOD_DEP): likewise
1249 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1251 Allow a compilation without -mcmodel=large
1253 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1254 when compiled without -mcmodel=large
1255 (filter_memory_map): remove memory post 4 GiB when compiled
1256 without -mcmodel=large
1257 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1258 TARGET_CFLAGS when -mcmodel=large isn't supported
1260 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1262 Remove nested functions in efiemu core
1264 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1266 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1268 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1270 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1272 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1274 (grub_cpu_is_tsc_supported): likewise
1275 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1277 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1279 Absolute addressing through constant with Apple's cc
1281 * kern/i386/pc/startup.S: Define necessary constants
1282 and address through it when using ABS with Apple's CC
1283 * boot/i386/pc/diskboot.S: likewise
1284 * boot/i386/pc/boot.S: likewise
1285 * boot/i386/pc/lnxboot.S: likewise
1286 * boot/i386/pc/cdboot.S: likewise
1287 * mmap/i386/pc/mmap_helper.S: likewise
1288 * commands/i386/pc/drivemap_int13h.S: likewise
1290 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1292 Check if compiler is apple cc
1294 * Makefile.in (ASFLAGS): new variable
1295 (TARGET_ASFLAGS): likewise
1296 (TARGET_MODULE_FORMAT): likewise
1297 (TARGET_APPLE_CC): likewise
1299 (TARGET_IMG_CFLAGS): likewise
1300 (TARGET_CPPFLAGS): add includedir
1301 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1302 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1303 Check for linker script only if compiler isn't Apple's CC
1304 (TARGET_MODULE_FORMAT): set
1305 (TARGET_APPLE_CC): likewise
1306 (TARGET_ASFLAGS): likewise
1308 Check for objcopy only if compiler isn't Apple's CC
1309 Check for BSS symbol only if compiler isn't Apple's CC
1310 * genmk.rb: adapt nm options if we use Apple's utils
1311 * aclocal.m4 (grub_apple_cc): new test
1312 (grub_apple_target_cc): likewise
1314 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1316 Simplify sed expressions and improve awk
1318 * Makefile.in (install-local): simplify sed expression
1319 * gencmdlist.sh: likewise
1320 * genmoddep.awk: avoid adding module as a dependency of itself
1322 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1324 Add missing start symbols
1326 * boot/i386/pc/boot.S: add start
1327 * boot/i386/pc/pxeboot.S: likewise
1329 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1331 Fix wrong assumptions with grub-mkimage on EFI
1333 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1334 (relocate_addresses): consider both r_addend and value at offset
1335 (make_mods_section): zerofill modinfo and header
1336 (convert_elf): write prefix here
1338 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1340 Use .asciz instead of .string
1342 * i386/pc/diskboot.S: use .asciz instead of .string
1343 * i386/pc/boot.S: likewise
1344 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1345 (GRUB_MOD_NAME): likewise
1347 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1351 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1352 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1353 (grub_video_setup): remove
1354 (grub_video_set_mode): new prototype
1355 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1357 (linux_vesafb_res): compile only on PCBIOS
1358 (grub_linux_boot): support gfxpayload
1359 * loader/i386/pc/xnu.c (video_hook): new function
1360 (grub_xnu_set_video): support gfxpayload
1361 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1362 (DEFAULT_VIDEO_HEIGHT): likewise
1363 (DEFAULT_VIDEO_FLAGS): likewise
1364 (DEFAULT_VIDEO_MODE): new definition
1365 (video_hook): new function
1366 (grub_gfxterm_init): use grub_video_set_mode
1367 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1369 * video/video.c (grub_video_setup): removed
1370 (grub_video_set_mode): new function based on grub_gfxterm_init and
1373 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1375 Avoid calling biosdisk in drivemap
1377 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1378 (revparse_biosdisk): likewise
1379 (list_mappings): derive name from id directly
1380 (grub_cmd_drivemap): use tryparse_diskstring
1382 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1386 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1387 (grub_lexer_param): add tokenonhold
1388 (grub_script_create_cmdline): remove cmdline. All callers updated
1389 (grub_script_function_create): make functionname
1390 grub_script_arg. All callers updated
1391 (grub_script_execute_argument_to_string): new prototype
1392 * kern/parser.c (state_transitions): reorder
1393 (grub_parser_cmdline_state): fix a bug and make more compact
1394 * script/sh/execute.c (grub_script_execute_argument_to_string):
1396 (grub_script_execute_cmdline): use new format
1397 * script/sh/function.c (grub_script_function_create): make functionname
1398 grub_script_arg. All callers updated
1399 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1400 (grub_script_yylex): remove
1401 (grub_script_yylex2): renamed to ...
1402 (grub_script_yylex): ...renamed
1403 parse the expressions like a${b}c
1404 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1405 (GRUB_PARSER_TOKEN_VAR): remove
1406 (GRUB_PARSER_TOKEN_NAME): likewise
1407 ("if"): declare as typeless
1409 ("function"): likewise
1414 (argument): likewise
1415 (script): accept empty scripts and make exit on error
1416 (arguments): use GRUB_PARSER_TOKEN_ARG
1417 (function): likewise
1418 (command): move error handling to script
1419 (menuentry): move grub_script_lexer_ref before
1420 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1421 argument. All callers updated
1423 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1425 Prevent GRUB from probing floppies during boot.
1427 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1428 * commands/search.c (options): Add --no-floppy.
1429 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1430 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1431 --no-floppy when searching for UUIDs.
1433 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1435 Simplify the code duplication in commands/search.c.
1437 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1438 (search_fs): ... this. Update all users.
1440 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1442 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1444 2009-05-28 Pavel Roskin <proski@gnu.org>
1446 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1447 Remove the original symlink explicitly.
1449 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1450 just one slash. That's how grub_fshelp_find_file() does it.
1452 2009-05-26 Pavel Roskin <proski@gnu.org>
1454 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1457 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1460 2009-05-25 Christian Franke <franke@computer.org>
1462 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1464 (grub_atapi_identify): Add wait after drive select.
1465 (grub_ata_identify): Do more strict status register check before
1466 calling grub_atapi_identify (). Suppress error message if status
1467 register is 0x00 after command failure. Add status register
1468 check after PIO read to avoid bogus identify due to stuck DRQ.
1469 Thanks to Pavel Roskin for testing.
1470 (grub_device_initialize): Remove unsafe status register check.
1471 Thanks to 'phcoder' for problem report and patch.
1472 Prevent sign extension in debug message.
1474 2009-05-23 Colin D Bennett <colin@gibibit.com>
1476 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1477 definition file, and functions defined in `normal/menu.c' have had
1478 their prototypes moved to `include/grub/menu.h' for consistency.
1480 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1482 (grub_menu_get_entry): Likewise.
1483 (grub_menu_get_timeout): Likewise.
1484 (grub_menu_set_timeout): Likewise.
1485 (grub_menu_execute_entry): Likewise.
1486 (grub_menu_execute_with_fallback): Likewise.
1487 (grub_menu_entry_run): Likewise.
1489 * include/grub/normal.h: Re-ordered and grouped function
1490 prototypes by file that the function is defined in.
1491 (grub_menu_execute_callback): Removed; moved to menu.h.
1492 (grub_menu_get_entry): Likewise.
1493 (grub_menu_get_timeout): Likewise.
1494 (grub_menu_set_timeout): Likewise.
1495 (grub_menu_execute_entry): Likewise.
1496 (grub_menu_execute_with_fallback): Likewise.
1497 (grub_menu_entry_run): Likewise.
1498 (grub_menu_addentry): Renamed from this ...
1499 (grub_normal_add_menu_entry): ... to this.
1501 * normal/main.c (grub_menu_addentry): Renamed from this ...
1502 (grub_normal_add_menu_entry): ... to this.
1504 * script/sh/execute.c (grub_script_execute_menuentry): Update
1505 reference to renamed grub_menu_addentry function.
1507 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1509 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1511 2009-05-22 Pavel Roskin <proski@gnu.org>
1513 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1514 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1515 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1516 compiling for the i386 targets, but not for the utilities.
1518 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1520 (grub_root_drive): Likewise.
1521 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1523 (grub_root_drive): Change size to byte.
1524 (grub_start_addr): Remove.
1525 (grub_end_addr): Likewise.
1526 (grub_apm_bios_info): Likewise.
1528 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1530 * normal/i386: Remove.
1531 * normal/powerpc: Likewise.
1532 * normal/sparc64: Likewise.
1533 * normal/x86_64: Likewise.
1535 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1537 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1538 * loader/i386/linux_trampoline.S: Fix indentation
1539 * loader/i386/xnu_helper.S: Likewise
1541 2009-05-18 Colin D Bennett <colin@gibibit.com>
1543 Display error messages when parsing a Lua statement fails.
1544 Previously, executing a syntactically invalid statement like
1545 ")foo" or "bar;" would silently fail.
1547 * script/lua/grub_main.c (handle_lua_error): New function.
1548 (grub_lua_parse_line): Improved reporting of Lua parser and
1551 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1553 Remove -Werror which causes build to fail on some systems
1555 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1556 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1557 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1559 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1561 trampoline for linux on 64-bit platform
1563 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1564 loader/i386/efi/linux_trampoline.S
1565 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1567 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1569 * loader/i386/linux_trampoline.S: moved here
1570 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1572 (jumpvector): removed
1573 (grub_linux_trampoline_start): new declaration
1574 (grub_linux_trampoline_end): likewise
1575 (grub_linux_boot): use trampoline when on 64-bit platform
1576 * loader/i386/linux.c: likewise
1578 2009-05-16 Pavel Roskin <proski@gnu.org>
1580 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1581 const to avoid a warning.
1582 (grub_lua_setenv): Likewise.
1583 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1584 lmsg to fix a warning.
1586 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1588 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1589 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1590 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1591 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1592 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1593 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1594 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1595 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1597 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1599 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1601 2009-05-16 Bean <bean123ch@gmail.com>
1603 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1604 (lua_mod_SOURCES): New variable.
1605 (lua_mod_CFLAGS): Likewise.
1606 (lua_mod_LDFLAGS): Likewise.
1608 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1609 (setjmp_mod_SOURCES): New variable.
1610 (setjmp_mod_CFLAGS): Likewise.
1611 (setjmp_LDFLAGS): Likewise.
1613 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1614 (setjmp_mod_SOURCES): New variable.
1615 (setjmp_mod_CFLAGS): Likewise.
1616 (setjmp_LDFLAGS): Likewise.
1618 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1619 (setjmp_mod_SOURCES): New variable.
1620 (setjmp_mod_CFLAGS): Likewise.
1621 (setjmp_LDFLAGS): Likewise.
1623 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1624 (setjmp_mod_SOURCES): New variable.
1625 (setjmp_mod_CFLAGS): Likewise.
1626 (setjmp_LDFLAGS): Likewise.
1628 * normal/i386/setjmp.S: Moved from here ...
1629 * lib/i386/setjmp.S: ... Moved here
1630 * normal/x86_64/setjmp.S: Moved from here ...
1631 * lib/x86_64/setjmp.S: ... Moved here
1632 * normal/powerpc/setjmp.S: Moved from here ...
1633 * lib/powerpc/setjmp.S: ... Moved here
1634 * normal/sparc64/setjmp.S: Moved from here ...
1635 * lib/sparc64/setjmp.S: ... Moved here
1637 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1638 returns_twice in mingw.
1640 * script/lua/grub_lib.c: New file.
1641 * script/lua/grub_lib.h: Likewise.
1642 * script/lua/grub_lua.h: Likewise.
1643 * script/lua/grub_main.c: Likewise.
1644 * script/lua/lapi.c: Likewise.
1645 * script/lua/lapi.h: Likewise.
1646 * script/lua/lauxlib.c: Likewise.
1647 * script/lua/lauxlib.h: Likewise.
1648 * script/lua/lbaselib.c: Likewise.
1649 * script/lua/lcode.c: Likewise.
1650 * script/lua/lcode.h: Likewise.
1651 * script/lua/ldblib.c: Likewise.
1652 * script/lua/ldebug.c: Likewise.
1653 * script/lua/ldebug.h: Likewise.
1654 * script/lua/ldo.c: Likewise.
1655 * script/lua/ldo.h: Likewise.
1656 * script/lua/ldump.c: Likewise.
1657 * script/lua/lfunc.c: Likewise.
1658 * script/lua/lfunc.h: Likewise.
1659 * script/lua/lgc.c: Likewise.
1660 * script/lua/lgc.h: Likewise.
1661 * script/lua/linit.c: Likewise.
1662 * script/lua/liolib.c: Likewise.
1663 * script/lua/llex.c: Likewise.
1664 * script/lua/llex.h: Likewise.
1665 * script/lua/llimits.h: Likewise.
1666 * script/lua/lmathlib.c: Likewise.
1667 * script/lua/lmem.c: Likewise.
1668 * script/lua/lmem.h: Likewise.
1669 * script/lua/loadlib.c: Likewise.
1670 * script/lua/lobject.c: Likewise.
1671 * script/lua/lobject.h: Likewise.
1672 * script/lua/lopcodes.c: Likewise.
1673 * script/lua/lopcodes.h: Likewise.
1674 * script/lua/loslib.c: Likewise.
1675 * script/lua/lparser.c: Likewise.
1676 * script/lua/lparser.h: Likewise.
1677 * script/lua/lstate.c: Likewise.
1678 * script/lua/lstate.h: Likewise.
1679 * script/lua/lstring.c: Likewise.
1680 * script/lua/lstring.h: Likewise.
1681 * script/lua/lstrlib.c: Likewise.
1682 * script/lua/ltable.c: Likewise.
1683 * script/lua/ltable.h: Likewise.
1684 * script/lua/ltablib.c: Likewise.
1685 * script/lua/ltm.c: Likewise.
1686 * script/lua/ltm.h: Likewise.
1687 * script/lua/lua.h: Likewise.
1688 * script/lua/luaconf.h: Likewise.
1689 * script/lua/lualib.h: Likewise.
1690 * script/lua/lundump.c: Likewise.
1691 * script/lua/lundump.h: Likewise.
1692 * script/lua/lvm.c: Likewise.
1693 * script/lua/lvm.h: Likewise.
1694 * script/lua/lzio.c: Likewise.
1695 * script/lua/lzio.h: Likewise.
1697 2009-05-16 Bean <bean123ch@gmail.com>
1699 * include/grub/kernel.h (grub_module_header_types): Add type
1702 * kern/main.c (grub_load_config): New function.
1703 (grub_main): Call grub_load_config to read boot config.
1705 * grub-mkimage (generate_image): New parameter config_path.
1706 (options): New option --config.
1707 (main): Parse --config option, and pass it to generate_image.
1709 2009-05-14 Christian Franke <franke@computer.org>
1711 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1712 This fixes build on Cygwin.
1714 2009-05-14 Pavel Roskin <proski@gnu.org>
1716 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1717 jump. This saves two bytes, so the typical case of 2 swapped
1718 drives would fit 32 bytes.
1720 2009-05-13 Pavel Roskin <proski@gnu.org>
1722 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1723 grub_uint32_t to avoid a warning.
1725 * loader/i386/linux.c (allocate_pages): When assigning
1726 real_mode_mem, cast through grub_size_t to fix a warning. The
1727 code already makes sure that the value would fit a pointer.
1728 (grub_linux_setup_video): Cast render_target->data to
1729 grub_size_t to fix a warning.
1731 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1733 * commands/i386/pc/drivemap.c: New file - implement drivemap
1735 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1736 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1738 2009-05-13 Pavel Roskin <proski@gnu.org>
1740 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1741 embedding_area_exists.
1743 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1745 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1746 it easier to understand / work with.
1747 Improve warning messages for cases where there's no embedding area,
1748 or when it is too small (or core.img too large).
1750 2009-05-13 Pavel Roskin <proski@gnu.org>
1752 * loader/i386/pc/multiboot2.c: Add necessary includes for
1753 grub_multiboot2_real_boot().
1755 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1756 PX record is always little-endian. We only need the lower 2
1759 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1760 facilitate code reuse.
1761 (grub_cpio_mount): Use "struct head", not a char buffer. This
1762 fixes a warning reported by gcc 4.4.
1764 * kernel/disk.c (grub_disk_read): Use void pointer for the
1766 (grub_disk_write): Use const void pointer for the buffer.
1767 Adjust all callers. Remove unnecessary casts.
1769 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1771 * util/i386/pc/grub-install.in: Update copyright year.
1773 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1777 * commands/gptsync.c: new file
1778 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1779 (gptsync_mod_SOURCES): new variable
1780 (gptsync_mod_CFLAGS): likewise
1781 (gptsync_mod_LDFLAGS): likewise
1782 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1784 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1785 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1786 * conf/i386-ieee1275.rmk: likewise
1787 * conf/i386-pc.rmk: likewise
1788 * conf/powerpc-ieee1275.rmk: likewise
1790 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1794 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1795 (grub_dl_ref): likewise
1797 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1799 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1800 split in two functions (one for msdos and one for gpt).
1802 2009-05-08 Pavel Roskin <proski@gnu.org>
1804 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1807 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1808 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1809 Initialize them with -1. Add sanity check for bad1. Eliminate
1812 2009-05-08 David S. Miller <davem@davemloft.net>
1814 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1816 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1818 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1821 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1823 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1824 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1826 2009-05-05 David S. Miller <davem@davemloft.net>
1828 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1830 2009-05-05 Pavel Roskin <proski@gnu.org>
1832 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1833 of grub_dl_ref() and grub_dl_unref().
1834 * commands/parttool.c: Remove preprocessor conditionals around
1835 grub_dl_ref() and grub_dl_unref().
1836 * fs/affs.c: Likewise.
1837 * fs/afs.c: Likewise.
1838 * fs/cpio.c: Likewise.
1839 * fs/ext2.c: Likewise.
1840 * fs/fat.c: Likewise.
1841 * fs/hfs.c: Likewise.
1842 * fs/hfsplus.c: Likewise.
1843 * fs/iso9660.c: Likewise.
1844 * fs/jfs.c: Likewise.
1845 * fs/minix.c: Likewise.
1846 * fs/ntfs.c: Likewise.
1847 * fs/reiserfs.c: Likewise.
1848 * fs/sfs.c: Likewise.
1849 * fs/udf.c: Likewise.
1850 * fs/ufs.c: Likewise.
1851 * fs/xfs.c: Likewise.
1852 * include/grub/dl.h: Likewise.
1853 * loader/xnu.c: Likewise.
1855 2009-05-04 Pavel Roskin <proski@gnu.org>
1857 * commands/acpi.c: Remove unused variable my_mod.
1858 * partmap/amiga.c: Likewise.
1859 * partmap/apple.c: Likewise.
1860 * partmap/gpt.c: Likewise.
1861 * partmap/pc.c: Likewise.
1862 * partmap/sun.c: Likewise.
1863 * term/gfxterm.c: Likewise.
1864 * term/i386/pc/vesafb.c: Likewise.
1865 * term/i386/pc/vga.c: Likewise.
1867 2009-05-04 David S. Miller <davem@davemloft.net>
1869 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1870 pointer args to grub_ieee1275_get_property().
1872 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1874 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1875 devices, and do not traverse down under controller nodes.
1877 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1878 (grub_ofdisk_open): Use it to un-escape "," characters.
1879 * kern/disk.c (find_part_sep): New.
1880 (grub_disk_open): Use it to find the first non-escaped ','
1881 character in the disk name.
1882 * util/ieee1275/devicemap.c (escape_of_path): New.
1883 (grub_util_emit_devicemap_entry): Use it.
1884 * util/sparc64/ieee1275/grub-install.in: Update script to
1885 strip partition specifiers properly by not triggering on
1886 '\' escaped ',' characters.
1888 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1890 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1892 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1894 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1895 on documentation from Wikipedia).
1897 2009-05-04 Pavel Roskin <proski@gnu.org>
1899 * disk/ata.c: Spelling fixes.
1900 * disk/raid.c: Likewise.
1901 * disk/usbms.c: Likewise.
1902 * disk/dmraid_nvidia.c: Likewise.
1903 * kern/ieee1275/openfw.c: Likewise.
1904 * kern/ieee1275/init.c: Likewise.
1905 * kern/ieee1275/cmain.c: Likewise.
1906 * boot/i386/pc/cdboot.S: Likewise.
1907 * video/readers/png.c: Likewise.
1908 * video/i386/pc/vbe.c: Likewise.
1909 * fs/udf.c: Likewise.
1910 * fs/hfs.c: Likewise.
1911 * fs/reiserfs.c: Likewise.
1912 * efiemu/runtime/efiemu.c: Likewise.
1913 * efiemu/main.c: Likewise.
1914 * efiemu/mm.c: Likewise.
1915 * include/grub/elf.h: Likewise.
1916 * include/grub/xnu.h: Likewise.
1917 * include/grub/usbdesc.h: Likewise.
1918 * include/grub/usb.h: Likewise.
1919 * include/grub/script_sh.h: Likewise.
1920 * include/grub/lib/LzmaEnc.h: Likewise.
1921 * include/grub/efiemu/efiemu.h: Likewise.
1922 * include/grub/command.h: Likewise.
1923 * normal/menu.c: Likewise.
1924 * normal/main.c: Likewise.
1925 * normal/datetime.c: Likewise.
1926 * bus/usb/uhci.c: Likewise.
1927 * mmap/i386/uppermem.c: Likewise.
1928 * mmap/mmap.c: Likewise.
1929 * commands/acpi.c: Likewise.
1930 * commands/test.c: Likewise.
1931 * partmap/apple.c: Likewise.
1932 * font/font.c: Likewise.
1933 * loader/sparc64/ieee1275/linux.c: Likewise.
1934 * loader/macho.c: Likewise.
1935 * loader/i386/bsd_trampoline.S: Likewise.
1936 * loader/i386/bsd.c: Likewise.
1937 * loader/xnu.c: Likewise.
1938 * term/i386/pc/vesafb.c: Likewise.
1939 * term/usb_keyboard.c: Likewise.
1940 * util/resolve.c: Likewise.
1941 * util/getroot.c: Likewise.
1943 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1945 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1947 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1949 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1952 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1954 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1955 parameter only available on BIOS.
1957 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1959 Removed wrong semicolon in declaration
1961 * grub/misc.h (grub_dprintf): remove semicolon
1963 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1965 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1966 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1967 is done by grub_cmd_linux() now).
1968 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1969 restore video to text mode.
1970 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1971 indicates lack of "vga=" parameter. "vga=0" is mapped to
1972 `GRUB_LINUX_VID_MODE_NORMAL'.
1974 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1976 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1977 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1978 and `normal/script.c'. Add `kern/rescue_reader.c',
1979 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1980 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1981 `grub_script.tab.c'.
1983 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1984 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1986 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1987 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1989 * Makefile.in: Remove duplicated 2008 in Copyright line.
1991 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1993 * util/misc.c (grub_util_warn): New function. Emits a warning
1995 * include/grub/util/misc.h (grub_util_warn): New declaration.
1997 * util/i386/pc/grub-install.in: Understand --force and pass it down
2000 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2002 (setup): Improve error messages and add warnings when requested to
2003 install in odd layouts. Refuse to install using blocklists unless
2006 2009-05-04 martin f. krafft <madduck@madduck.net>
2008 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2010 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2012 Updated copyright year
2014 * fs/hfsplus.c: updated copyright year
2016 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2020 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2021 in the space previously used by unused3
2022 (grub_hfsplus_uuid): new function
2023 (grub_hfsplus_fs): added uuid field
2025 2009-05-03 Pavel Roskin <proski@gnu.org>
2027 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2028 suppress warnings. It's no longer needed.
2029 * disk/host.c: Likewise.
2030 * disk/ata_pthru.c: Likewise.
2031 * disk/loopback.c: Likewise.
2032 * hook/datehook.c: Likewise.
2033 * parttool/pcpart.c: Likewise.
2034 * fs/i386/pc/pxe.c: Likewise.
2035 * fs/ntfscomp.c: Likewise.
2036 * efiemu/main.c: Likewise.
2037 * mmap/mmap.c: Likewise.
2038 * commands/crc.c: Likewise.
2039 * commands/hexdump.c: Likewise.
2040 * commands/hdparm.c: Likewise.
2041 * commands/acpi.c: Likewise.
2042 * commands/echo.c: Likewise.
2043 * commands/minicmd.c: Likewise.
2044 * commands/blocklist.c: Likewise.
2045 * commands/memrw.c: Likewise.
2046 * commands/loadenv.c: Likewise.
2047 * commands/usbtest.c: Likewise.
2048 * commands/lsmmap.c: Likewise.
2049 * commands/boot.c: Likewise.
2050 * commands/parttool.c: Likewise.
2051 * commands/configfile.c: Likewise.
2052 * commands/search.c: Likewise.
2053 * commands/ieee1275/suspend.c: Likewise.
2054 * commands/cat.c: Likewise.
2055 * commands/i386/pc/pxecmd.c: Likewise.
2056 * commands/i386/pc/play.c: Likewise.
2057 * commands/i386/pc/halt.c: Likewise.
2058 * commands/i386/pc/vbeinfo.c: Likewise.
2059 * commands/i386/pc/vbetest.c: Likewise.
2060 * commands/lspci.c: Likewise.
2061 * commands/date.c: Likewise.
2062 * commands/handler.c: Likewise.
2063 * commands/ls.c: Likewise.
2064 * commands/test.c: Likewise.
2065 * commands/cmp.c: Likewise.
2066 * commands/efi/loadbios.c: Likewise.
2067 * commands/efi/fixvideo.c: Likewise.
2068 * commands/halt.c: Likewise.
2069 * commands/help.c: Likewise.
2070 * commands/reboot.c: Likewise.
2071 * hello/hello.c: Likewise.
2072 * script/sh/main.c: Likewise.
2073 * loader/xnu.c: Likewise.
2074 * term/terminfo.c: Likewise.
2075 * term/i386/pc/serial.c: Likewise.
2076 * term/usb_keyboard.c: Likewise.
2078 2009-05-03 David S. Miller <davem@davemloft.net>
2080 * normal/menu.c: Include grub/parser.h
2082 2009-05-03 Pavel Roskin <proski@gnu.org>
2084 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2086 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2087 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2089 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2090 efiemu??.o doesn't exist.
2091 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2094 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2096 FreeBSD 64-bit support
2098 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2099 and loader/i386/bsd_trampoline.S
2100 (bsd_mod_ASFLAGS): new variable
2101 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2102 (FREEBSD_MODTYPE_KERNEL64): likewise
2103 (grub_bsd64_trampoline_start): likewise
2104 (grub_bsd64_trampoline_end): likewise
2105 (grub_bsd64_trampoline_selfjump): likewise
2106 (grub_bsd64_trampoline_gdt): likewise
2107 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2108 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2109 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2110 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2111 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2113 * loader/i386/bsd_pagetable.c: new file
2114 * loader/i386/bsd_trampoline.S: likewise
2115 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2116 (ALIGN_VAR): likewise
2117 (entry_hi): new variable
2118 (kern_end_mdofs): likewise
2119 (is_64bit): likewise
2120 (grub_freebsd_add_meta): use ALIGN_VAR
2121 (grub_e820_mmap): new declaration
2122 (grub_freebsd_add_mmap): new function
2123 (grub_freebsd_add_meta_module): support 64 bit kernels
2124 (grub_freebsd_list_modules): use ALIGN_VAR
2125 (gdt_descriptor): new declaration
2126 (grub_freebsd_boot): support 64 bit kernels
2127 (grub_bsd_elf64_hook): new function
2128 (grub_bsd_load_elf): support elf64
2130 2009-05-03 Bean <bean123ch@gmail.com>
2132 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2133 after we get the result of if statement.
2135 2009-05-03 Bean <bean123ch@gmail.com>
2137 * Makefile.in (enable_efiemu): New variable.
2139 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2141 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2143 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2144 path, add -mno-red-zone option.
2145 (efiemu64_s.o): Likewise.
2146 (efiemu64.o): Use macro $^ for source file.
2148 * configure.ac (--enable-efiemu): New option.
2150 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2154 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2155 (pkglib_MODULES): add xnu.mod
2156 (xnu_mod_SOURCES): new variable
2157 (xnu_mod_CFLAGS): likewise
2158 (xnu_mod_LDFLAGS): likewise
2159 (xnu_mod_ASFLAGS): likewise
2160 * conf/i386-pc.rmk: likewise
2161 * conf/x86_64-efi.rmk: likewise
2162 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2164 * include/grub/i386/macho.h: new file
2165 * include/grub/i386/xnu.h: likewise
2166 * include/grub/macho.h: likewise
2167 * include/grub/machoload.h: likewise
2168 * include/grub/x86_64/macho.h: likewise
2169 * include/grub/x86_64/xnu.h: likewise
2170 * include/grub/xnu.h: likewise
2171 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2172 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2173 * loader/i386/efi/xnu.c: new file
2174 * loader/i386/pc/xnu.c: likewise
2175 * loader/i386/xnu.c: likewise
2176 * loader/i386/xnu_helper.S: likewise
2177 * loader/macho.c: likewise
2178 * loader/xnu.c: likewise
2179 * loader/xnu_resume.c: likewise
2180 * util/grub-dumpdevtree: likewise
2181 * include/grub/i386/pit.h: include grub/err.h
2182 (grub_pit_wait): export
2183 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2185 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2189 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2190 _linux_efi, linux_efi.
2191 new files in grub-emu
2192 new targets efiemu32.o and efiemu64.o
2193 * loader/linux_normal_efiemu.c: likewise
2194 * loader/i386/efi/linux.c: added preliminary efiemu support
2195 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2197 * include/grub/autoefi.h: new file
2198 * include/grub/i386/efiemu.h: likewise
2199 * include/grub/i386/pc/efiemu.h: likewise
2200 * include/grub/efi/api.h: add LL suffix when necessary
2201 new definitions relating to tables
2202 * include/grub/efiemu/efiemu.h: new file
2203 * include/grub/efiemu/runtime.h: likewise
2204 * efiemu/prepare.c: likewise
2205 * efiemu/loadcore_common.c: likewise
2206 * efiemu/loadcore64.c: likewise
2207 * efiemu/runtime/efiemu.sh: likewise
2208 * efiemu/runtime/efiemu.S: likewise
2209 * efiemu/runtime/efiemu.c: likewise
2210 * efiemu/runtime/config.h: likewise
2211 * efiemu/prepare32.c: likewise
2212 * efiemu/main.c: likewise
2213 * efiemu/modules/pnvram.c: likewise
2214 * efiemu/modules/i386: likewise
2215 * efiemu/modules/i386/pc: likewise
2216 * efiemu/modules/acpi.c: likewise
2217 * efiemu/i386/pc/cfgtables.c: likewise
2218 * efiemu/i386/loadcore64.c: likewise
2219 * efiemu/i386/loadcore32.c: likewise
2220 * efiemu/prepare64.c: likewise
2221 * efiemu/loadcore.c: likewise
2222 * efiemu/symbols.c: likewise
2223 * efiemu/mm.c: likewise
2224 * efiemu/loadcore32.c: likewise
2226 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2230 * commands/acpi.c: new file
2231 * commands/i386/pc/acpi.c: likewise
2232 * commands/efi/acpi.c: likewise
2233 * include/grub/acpi.h: likewise
2234 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2235 (acpi_mod_SOURCES): new variable
2236 (acpi_mod_CFLAGS): likewise
2237 (acpi_mod_LDFLAGS): likewise
2238 * conf/i386-efi.rmk: likewise
2239 * conf/x86_64-efi.rmk: likewise
2241 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2243 Missing part from mmap patch
2245 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2246 (grub_mmap_unregister)
2247 (grub_mmap_free_and_unregister): use grub_mmap_register
2249 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2253 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2254 * loader/i386/linux.c (find_mmap_size): likewise
2255 (allocate_pages): likewise
2256 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2257 (grub_fill_multiboot_mmap): likewise
2258 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2259 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2260 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2261 (OPENBSD_MMAP_RESERVED): likewise
2262 * include/grub/i386/pc/memory.h: include grub/memory.h
2263 (grub_lower_mem): removed
2264 (grub_upper_mem): likewise
2265 (GRUB_MACHINE_MEMORY_ACPI): new definition
2266 (GRUB_MACHINE_MEMORY_NVS): likewise
2267 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2268 (GRUB_MACHINE_MEMORY_HOLE): likewise
2269 (grub_machine_mmap_register): likewise
2270 (grub_machine_mmap_unregister): likewise
2271 (grub_machine_get_upper): likewise
2272 (grub_machine_get_lower): likewise
2273 (grub_machine_get_post64): likewise
2274 * include/grub/i386/efi/memory.h: new file
2275 * include/grub/x86_64/efi/memory.h: likewise
2276 * include/grub/efi/memory.h: likewise
2277 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2278 (mmap_mod_SOURCES): new variable
2279 (mmap_mod_LDFLAGS): likewise
2280 (mmap_mod_ASFLAGS): likewise
2281 * conf/i386-coreboot.rmk: likewise
2282 * conf/i386-ieee1275.rmk: likewise
2283 * conf/i386-efi.rmk: likewise
2284 * conf/x86_64-efi.rmk: likewise
2285 * include/grub/types.h (UINT_TO_PTR): new macro
2286 (PTR_TO_UINT32): likewise
2287 (PTR_TO_UINT64): likewise
2288 * include/grub/memory.h: new file
2289 * mmap/i386/pc/mmap.c: likewise
2290 * mmap/i386/pc/mmap_helper.S: likewise
2291 * mmap/i386/uppermem.c: likewise
2292 * mmap/mmap.c: likewise
2293 * mmap/efi/mmap.c: likewise
2294 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2296 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2297 (grub_upper_mem): likewise
2298 (grub_machine_init): don't use grub_upper_mem,
2299 make grub_lower_mem local
2300 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2301 grub_mmap_iterate and grub_mmap_get_upper
2302 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2304 2009-05-02 Bean <bean123ch@gmail.com>
2306 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2308 (pkglib_MODULES): Add normal.mod and sh.mod.
2309 (normal_SOURCES): New variable.
2310 (normal_mod_CFLAGS): Likewise.
2311 (normal_mod_LDFLAGS): Likewise.
2312 (sh_mod_SOURCES): Likewise.
2313 (sh_mod_CFLAGS): Likewise.
2314 (sh_mod_LDFLAGS): Likewise.
2316 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2317 script/sh/lexer.c_DEPENDENCIES.
2318 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2319 kern/rescue_reader.c and kern/rescue_parser.c.
2320 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2321 (grub_emu_SOURCES): Change source files.
2322 (pkglib_MODULES): Remove normal.mod.
2323 (normal_SOURCES): Removed.
2324 (normal_mod_CFLAGS): Likewise.
2325 (normal_mod_LDFLAGS): Likewise.
2326 * conf/i386-coreboot.rmk: Likewise.
2327 * conf/i386-efi.rmk: Likewise.
2328 * conf/i386-ieee1276.rmk: Likewise.
2329 * conf/powerpc-ieee1275.rmk: Likewise.
2330 * conf/sparc64-ieee1275.rmk: Likewise.
2331 * conf/x86_64-efi.rmk: Likewise.
2333 * include/grub/command.h (grub_command_execute): New inline function.
2335 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2337 * include/grub/normal.h: Remove <grub/setjmp.h>.
2338 (grub_fs_module_list): Moved to normal/autofs.c.
2339 (grub_exit_env): Removed.
2340 (grub_command_execute): Likewise.
2341 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2343 (read_command_list): New function declaration.
2344 (read_fs_list): Likewise.
2346 * include/parser.h: Include <grub/reader.h>.
2347 (grub_parser_split_cmdline): Change type of getline parameter.
2348 (grub_parser): New structure.
2349 (grub_parser_class): New variable.
2350 (grub_parser_execute): New function declaration.
2351 (grub_register_rescue_parser): Likewise.
2352 (grub_parser_register): New inline function.
2353 (grub_parser_unregister): Likewise.
2354 (grub_parser_get_current): Likewise.
2355 (grub_parser_set_current): Likewise.
2357 * include/grub/reader.h: New file.
2358 * kern/reader.c: Likewise.
2359 * kern/rescue_parser.c: Likewise.
2360 * kern/rescue_reader.c: Likewise.
2361 * normal/autofs.c: Likewise.
2362 * normal/dyncmd.c: Likewise.
2364 * include/grub/rescue.h: Removed.
2365 * normal/command.h: Likewise.
2367 * include/grub/script.h: Moved to ...
2368 * include/grub/script_sh.h: ... Moved here.
2369 * normal/execute.c: Moved to ...
2370 * script/sh/execute.c: ... Moved here.
2371 * normal/function.c: Moved to ...
2372 * script/sh/function.c: ... Moved here.
2373 * normal/lexer.c: Moved to ...
2374 * script/sh/lexer.c: ... Moved here.
2375 * normal/parser.y: Moved to ...
2376 * script/sh/parser.y: ... Moved here.
2377 * normal/script.c: Moved to ...
2378 * script/sh/script.c: ... Moved here.
2380 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2382 (grub_exit_env): Removed.
2383 (fs_module_list): Moved to normal/autofs.c.
2384 (grub_file_getline): Don't handle comment here.
2385 (free_menu): Skip removed field entry->commands.
2386 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2388 (read_config_file): Removed nested parameter, change getline function.
2389 (grub_enter_normal_mode): Removed.
2390 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2391 (read_command_list): Likewise.
2392 (autoload_fs_module): Moved to normal/autofs.c.
2393 (read_fs_list): Likewise.
2394 (reader_nested): New variable.
2395 (grub_normal_execute): Run parser.sh to switch to sh parser.
2396 (grub_cmd_rescue): Removed.
2397 (cmd_normal): Removed.
2398 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2400 (grub_cmdline_run): New function.
2401 (grub_normal_reader_init): Likewise.
2402 (grub_normal_read_line): Likewise.
2403 (grub_env_write_pager): Likewise.
2404 (cmdline): New variable.
2405 (grub_normal_reader): Likewise.
2406 (GRUB_MOD_INIT): Register normal reader and set as current, register
2407 pager hook, register normal command with grub_register_command_prio,
2408 so that it won't show up in command.lst.
2409 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2410 grub_fs_autoload_hook.
2412 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2413 (grub_menu_execute_entry): Replace grub_script_execute with
2414 grub_parser_execute, change parameter to grub_command_execute.
2416 * normal/menu_text.c: Remove <grub/script.h>.
2418 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2419 and <grub/parser.h>.
2420 (run): Change editor_getline to use new parser interface. Change
2421 parameter to grub_command_execute.
2423 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2424 <grub/reader.h> and <grub/parser.h>.
2425 (grub_load_normal_mode): Execute normal command.
2426 (grub_main): Call grub_register_core_commands,
2427 grub_register_rescue_parser and grub_register_rescue_reader, use
2428 grub_reader_loop to enter input loop.
2430 * kern/parser.c (grub_parser_split_cmdline): Change type of
2432 (grub_parser_class): New variable.
2433 (grub_parser_execute): New function.
2435 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2436 * loader/multiboot2.c: Likewise.
2437 * loader/sparc64/ieee1275/linux.c: Likewise.
2439 * util/grub-emu.c (read_command_list): New dummy function.
2441 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2443 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2444 count to 16 for CCISS and IDA.
2446 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2448 * normal/menu_text.c (grub_wait_after_message): Print a newline
2449 after waiting for user input.
2451 * loader/i386/linux.c: Include `<grub/normal.h>'.
2452 (grub_cmd_linux): Improve the error message about `ask' mode, by
2453 waiting for user input so it's not missed (we can do this, since
2454 user requested interaction).
2456 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2458 Added missing lst to grub-mkrescue
2460 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2461 and ${input_dir}/parttool.lst
2463 2009-04-30 David S. Miller <davem@davemloft.net>
2465 * util/hostdisk.c (device_is_wholedisk): New function.
2466 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2467 zero only if device_is_wholedisk() returns true.
2469 * util/hostdisk.c (convert_system_partition_to_system_disk):
2470 Handle virtual disk devices named /dev/vdiskX as found on sparc
2473 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2474 lettered partition specifier is found, convert to numbered.
2476 2009-04-29 David S. Miller <davem@davemloft.net>
2478 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2479 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2481 * normal/command.c: Add missing newline at end of file.
2483 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2485 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2486 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2487 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2488 ihandles have a 32-bit type but need to be stored in a "void *".
2490 2009-04-28 Pavel Roskin <proski@gnu.org>
2492 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2493 not disk. Adjust all dependencies.
2494 (grub_fs_uuid_close): Use grub_device_close(), not
2497 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2498 parent's partition, don't copy it by reference, as it gets freed
2501 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2503 Preboot hooks support
2505 * commands/boot.c (struct grub_preboot_t): new declaration
2506 (preboots_head): new variable
2507 (preboots_tail): likewise
2508 (grub_loader_register_preboot_hook): new function
2509 (grub_loader_unregister_preboot_hook): likewise
2510 (grub_loader_set): launch preboot hooks
2511 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2512 (grub_loader_register_preboot_hook): new declaration
2513 (grub_loader_unregister_preboot_hook): likewise
2515 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2519 * disk/scsi.c (grub_scsi_open): added missing cast when
2520 calling grub_dprintf
2522 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2524 Bug and warning fixes
2526 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2528 * commands/test.c (test_parse): fixed bug with file tests and corrected
2529 declaration of find_file
2531 2009-04-26 Pavel Roskin <proski@gnu.org>
2533 * Makefile.in: Don't install empty manual pages if help2man is
2534 missing. Use help2man option for output, not shell redirection.
2536 2009-04-26 David S. Miller <davem@davemloft.net>
2538 * util/grub-mkdevicemap.c (make_device_map): Add missing
2539 NESTED_FUNC_ATTR to process_device().
2541 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2545 * commands/test.c: rewritten to use bash-like test
2547 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2549 Parttool autoloading and improvements
2551 * Makefile.in (pkglib_DATA): add parttool.lst
2552 (parttool.lst): new target
2553 * genmk.rb: generate parttool-*
2554 (CLEANFILES): add #{parttool}
2555 (PARTTOOLFILES): new variable
2556 * genparttoollist.sh: new file
2557 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2558 (grub_pcpart_type): likewise
2559 * commands/parttool.c (helpmsg): new variable
2560 (grub_cmd_parttool): output help if not enough arguments are supplied
2562 (GRUB_MOD_INIT(parttool)): use helpmsg
2564 2009-04-24 David S. Miller <davem@davemloft.net>
2566 Avoiding opening same device multiple times in device iterator.
2568 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2569 and use it to build a list of partitions in iterate_disk() and
2570 iterate_partition().
2572 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2575 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2576 grub_devalias_iterate() result instead of unconditional 0.
2577 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2578 Also, capture hook return value, either directly or via
2579 grub_children_iterate(), and propagate to caller.
2580 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2581 grub_children_iterate): Return value is now 'int' instead of
2583 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2584 like a proper iterator, stopping when hooks return non-zero.
2585 (grub_devalias_iterate): Likewise.
2587 2009-04-23 David S. Miller <davem@davemloft.net>
2589 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2591 2009-04-22 David S. Miller <davem@davemloft.net>
2593 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2594 is larger than address_cells, use that value for address_cells too.
2596 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2597 IEEE1275_MAX_PATH_LEN): Define.
2598 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2599 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2600 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2601 'devtype'. Explicitly NULL terminate devalias expansion.
2603 * util/sparc64/ieee1275/misc.c: New file.
2604 * util/sparc64/ieee1275/grub-setup.c: New file.
2605 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2606 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2607 * util/sparc64/ieee1275/grub-install.in: New file.
2608 * util/ieee1275/ofpath.c: New file.
2609 * util/ieee1275/devicemap.c: New file.
2610 * util/devicemap.c: New file.
2611 * util/deviceiter.c: New file.
2612 * kern/sparc64/ieee1275/init.c: New file.
2613 * include/grub/util/ofpath.h: New file.
2614 * include/grub/util/deviceiter.h: New file.
2615 * util/grub-mkdevicemap.c: Include deviceiter.h.
2616 Implement using grub_util_emit_devicemap_entry and
2617 grub_util_iterate_devices.
2618 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2619 util/devicemap.c into grub-mkdevicemap
2620 * conf/i386-efi.rmk: Likewise.
2621 * conf/i386-ieee1275.rmk: Likewise.
2622 * conf/i386-pc.rmk: Likewise.
2623 * conf/powerpc-ieee1275.rmk: Likewise.
2624 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2625 images and installation utilities. Build kernel as image
2626 instead of as elf binary. Use common rules as much as possible.
2628 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2630 Correct GPT definition
2632 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2635 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2637 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2639 2009-04-19 David S. Miller <davem@davemloft.net>
2641 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2642 (grub_rescue_cmd_linux): Rename to...
2643 (grub_cmd_linux): and fix prototype.
2644 (grub_rescue_cmd_initrd): Rename to...
2645 (grub_cmd_initrd): and fix prototype.
2646 (cmd_linux, cmd_initrd): New.
2647 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2648 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2650 2009-04-17 Pavel Roskin <proski@gnu.org>
2652 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2654 (grub_ohci_transfer): Likewise.
2656 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2658 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2659 return without a value. Fix inconsistent indentation.
2661 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2662 match struct grub_fs.
2664 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2665 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2666 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2667 * commands/lspci.c (grub_lspci_iter): Likewise.
2669 2009-04-16 Bean <bean123ch@gmail.com>
2671 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2674 2009-04-15 Pavel Roskin <proski@gnu.org>
2676 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2677 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2678 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2681 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2683 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2684 that no multiple data or metadata areas are supported and `Unknown
2687 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2689 Move loader out of the kernel
2691 * kern/loader.c: moved to ...
2692 * commands/boot.c: ... moved here
2693 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2694 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2695 * include/grub/kernel.h (grub_machine_fini): export
2696 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2697 (grub_loader_set): likewise
2698 (grub_loader_unset): likewise
2699 (grub_loader_boot): likewise
2700 * conf/common.rmk: new module boot.mod
2701 (pkglib_MODULES): add boot.mod
2702 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2703 (grub_emu_SOURCES): likewise
2704 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2705 (grub_emu_SOURCES): likewise
2706 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2707 (grub_emu_SOURCES): likewise
2708 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2709 (grub_emu_SOURCES): likewise
2710 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2711 (grub_emu_SOURCES): likewise
2712 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2713 (grub_emu_SOURCES): likewise
2714 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2715 (grub_emu_SOURCES): likewise
2717 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2719 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2721 * kern/misc.c (grub_itoa): Removed function
2722 (grub_ltoa): likewise
2723 (grub_vsprintf): use grub_lltoa
2725 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2729 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2730 * conf/i386-coreboot.rmk: likewise
2731 * conf/i386-ieee1275.rmk: likewise
2732 * conf/powerpc-ieee1275.rmk: likewise
2734 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2736 * INSTALL: Add that `./autogen.sh' needs to be run before
2739 2009-04-14 Bean <bean123ch@gmail.com>
2741 * Makefile.in (pkglib_DATA): Add handler.lst.
2742 (handler.lst): New rule.
2744 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2745 * conf/i386-coreboot.rmk: Likewise.
2746 * conf/i386-ieee1275.rmk: Likewise.
2747 * conf/i386-efi.rmk: Likewise.
2748 * conf/x86_64-efi.rmk: Likewise.
2749 * conf/powerpc-ieee1275.rmk: Likewise.
2750 * conf/sparc64-ieee1275.rmk: Likewise.
2752 * genhandlerlist.sh: New file.
2754 * genmk.rb: Add rules to generate handler.lst.
2756 * include/grub/normal.h (grub_file_getline): New function definition.
2757 (read_handler_list): Likewise.
2758 (free_handler_list): Likewise.
2760 * include/grub/term.h (grub_term_register_input): Add name parameter
2761 for auto generation of handler.lst.
2762 (grub_term_register_output): Likewise.
2764 * normal/handler.c: New file.
2766 * normal/main.c (get_line): Renamed to grub_file_getline.
2767 (read_config_file): Use the newly renamed grub_file_getline.
2768 (read_command_list): Likewise.
2769 (read_fs_list): Likewise.
2770 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2771 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2773 * term/efi/console.c (grub_console_init): Add name parameter for auto
2774 generation of handler.lst.
2775 * term/gfxterm.c: Likewise.
2776 * term/i386/pc/at_keyboard.c: Likewise.
2777 * term/i386/pc/console.c: Likewise.
2778 * term/i386/pc/serial.c: Likewise.
2779 * term/i386/pc/vesafb.c: Likewise.
2780 * term/i386/pc/vga.c: Likewise.
2781 * term/i386/pc/vga_text.c: Likewise.
2782 * term/ieee1275/ofconsole.c: Likewise.
2783 * term/usb_keyboard.c: Likewise.
2785 2009-04-14 Bean <bean123ch@gmail.com>
2787 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2788 properly with null character.
2790 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2792 * configure: Remove.
2793 * config.h.in: Likewise.
2794 * stamp-h.in: Likewise.
2795 * DISTLIST: Likewise.
2796 * conf/common.mk: Likewise.
2797 * conf/i386-coreboot.mk: Likewise.
2798 * conf/i386-efi.mk: Likewise.
2799 * conf/i386-ieee1275.mk: Likewise.
2800 * conf/i386.mk: Likewise.
2801 * conf/i386-pc.mk: Likewise.
2802 * conf/powerpc-ieee1275.mk: Likewise.
2803 * conf/sparc64-ieee1275.mk: Likewise.
2804 * conf/x86_64-efi.mk: Likewise.
2806 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2809 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2810 David S. Miller <davem@davemloft.net>
2812 * util/hostdisk.c (make_device_name): Fix buffer length
2815 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2817 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2818 <sys/param.h> and <sys/sysctl.h>.
2819 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2820 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2821 opening the device and reset them afterwards.
2823 2009-04-13 Pavel Roskin <proski@gnu.org>
2825 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2826 Reported by John Stanley <jpsinthemix@verizon.net>
2828 2009-04-13 Robert Millan <rmh@aybabtu.com>
2830 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2831 that name for menuentries when appropriate.
2833 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2835 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2837 2009-04-13 Robert Millan <rmh@aybabtu.com>
2839 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2840 to Linux, simply abort telling the user it's no longer supported.
2842 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2844 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2845 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2846 `freebsd_loadenv' only when devices.hints exist.
2848 2009-04-13 Pavel Roskin <proski@gnu.org>
2850 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2852 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2854 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2856 (grub_drive): Likewise.
2858 2009-04-13 David S. Miller <davem@davemloft.net>
2860 * kern/sparc64/ieee1275/ieee1275.c: New file.
2861 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2862 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2863 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2864 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2865 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2866 grub_ieee1275_alloc_physmem): Declare new exported functions.
2868 * include/grub/sparc64/ieee1275/loader.h: New file.
2869 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2870 * include/grub/sparc64/kernel.h: Likewise.
2871 * loader/sparc64/ieee1275/linux.c: Likewise.
2873 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2874 (grub_fstest_SOURCES): Likewise.
2876 * util/hostdisk.c (make_device_name): Do not make any assumptions
2877 about the length of drive names.
2879 * kern/dl.c (grub_dl_load_file): Close file immediately when
2880 we are done using it.
2882 2009-04-12 David S. Miller <davem@davemloft.net>
2884 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2885 values. Noticed by Pavel Roskin.
2887 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2890 * genmk.rb: Add more flexible image type specification, also
2891 pass --strip-unneeded to objcopy.
2892 * conf/i386-pc.rmk: Use *_FORMAT.
2893 * conf/i386-pc.mk: Rebuilt.
2895 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2896 (OFDISK_HASH_SZ): Define.
2897 (ofdisk_hash): New hash table.
2898 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2899 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2900 instead of device phandle which is not unique.
2902 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2903 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2904 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2905 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2906 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2907 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2908 GRUB_KERNEL_MACHINE_DATA_END): Define.
2909 (grub_kernel_image_size, grub_total_module_size): Declare.
2911 2009-04-12 Pavel Roskin <proski@gnu.org>
2913 * configure.ac: Change the logic when we check for target tools.
2914 Do it when the target is specified and it's different from the
2915 specified value of the host.
2917 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2919 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2920 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2921 GNU/kFreeBSD. Check if a device is a character device. Use
2922 DIOCGMEDIASIZE to get the size.
2923 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2924 support for GNU/kFreeBSD.
2925 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2926 is a character device instead of a block device. Add support for
2927 FreeBSD device names.
2929 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2930 is a character device instead of a block device.
2932 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2933 is a character device instead of a block device.
2935 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2937 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2938 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2939 FreeBSD. Check if a device is a character device. Use
2940 DIOCGMEDIASIZE to get the size.
2941 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2942 support for FreeBSD.
2943 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2944 is a character device instead of a block device. Add support for
2945 FreeBSD device names.
2947 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2948 a character device instead of a block device.
2949 (grub_util_check_char_device): New function.
2951 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2952 a character device instead of a block device.
2954 * include/grub/util/getroot.h (grub_util_check_char_device): New
2957 2009-04-11 David S. Miller <davem@davemloft.net>
2959 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2961 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2962 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2963 function, if present.
2964 (__bswapdi2): Likewise.
2966 * include/grub/sparc64/ieee1275/boot.h: New file.
2967 * boot/sparc64/ieee1275/boot.S: Likewise.
2968 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2970 * kern/misc.c (grub_ltoa): New function.
2971 (grub_vsprintf): Use it to format 'long' integers.
2973 2009-04-10 David S. Miller <davem@davemloft.net>
2975 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2976 slots are of type grub_ieee1275_cell_t.
2977 (grub_nand_read): Likewise.
2978 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2979 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2980 macros are used to compare values in arg/ret block of the call.
2981 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2982 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2983 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2984 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2985 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2986 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2987 grub_ieee1275_close, grub_ieee1275_set_property,
2988 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2989 grub_ieee1275_cell_t.
2990 * kern/ieee1275/openfw.c (grub_map): Likewise.
2991 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2992 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2994 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2995 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2996 (grub_devalias_iterate): Likewise.
2998 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3002 * fs/ufs.c (INODE_NBLOCKS): new definition
3003 (struct grub_ufs_dirent): added fields for non-BSD dirents
3004 (grub_ufs_get_file_block): fixed double indirect handling
3005 (grub_ufs_lookup_symlink): use more robust way to determine whether
3007 (grub_ufs_find_file): support for non-BSD dirents
3008 (grub_ufs_dir): support for non-BSD dirents
3010 2009-04-10 Bean <bean123ch@gnail.com>
3012 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3013 attribute, otherwise the size would be wrong for i386 platform.
3015 * include/grub/pci.h (grub_pci_read_word): New inline function.
3016 (grub_pci_read_byte): Likewise.
3017 (grub_pci_write): Likewise.
3018 (grub_pci_write_word): Likewise.
3019 (grub_pci_write_byte): Likewise.
3021 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3023 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3024 (find_framebuf): Scan pci to locate the frame buffer address.
3026 * commands/efi/fixvideo.c: New file.
3028 * commands/efi/loadbios.c: Likewise.
3030 * commands/memrw.c: Likewise.
3032 * util/grub-dumpbios.in: Likewise.
3034 * conf/common.rmk (grub-dumpbios): New utility.
3035 (pkglib_MODULES): New module memrw.mod.
3036 (memrw_mod_SOURCE): New macro.
3037 (memrw_mod_CFLAGS): Likewise.
3038 (memrw_mod_LDFLAGS): Likewise.
3040 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3042 (loadbios_mod_SOURCE): New macro.
3043 (loadbios_mod_CFLAGS): Likewise.
3044 (loadbios_mod_LDFLAGS): Likewise.
3045 (fixvideo_mod_SOURCE): Likewise.
3046 (fixvideo_mod_CFLAGS): Likewise.
3047 (fixvideo_mod_LDFLAGS): Likewise.
3049 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3051 (loadbios_mod_SOURCE): New macro.
3052 (loadbios_mod_CFLAGS): Likewise.
3053 (loadbios_mod_LDFLAGS): Likewise.
3054 (fixvideo_mod_SOURCE): Likewise.
3055 (fixvideo_mod_CFLAGS): Likewise.
3056 (fixvideo_mod_LDFLAGS): Likewise.
3058 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3060 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3062 2009-04-07 David S. Miller <davem@davemloft.net>
3064 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3065 support for R_SPARC_OLO10 relocations. Fix compile warning for
3066 R_SPARC_WDISP30 case.
3067 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3069 2009-04-06 Pavel Roskin <proski@gnu.org>
3071 * include/grub/misc.h (ARRAY_SIZE): New macro.
3072 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3074 * loader/i386/linux.c (allocate_pages): Use free_pages().
3075 (grub_linux_unload): Don't use free_pages().
3076 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3077 wrong index. Treat all other modes as text modes.
3078 (grub_cmd_linux): Initialize vid_mode unconditionally to
3079 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3081 * commands/help.c (print_command_help): Use cmd->prio, not
3082 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3084 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3088 * parttool/pcpart.c: new file
3089 * commands/parttool.c: likewise
3090 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3091 (parttool_mod_SOURCES): new variable
3092 (parttool_mod_CFLAGS): likewise
3093 (parttool_mod_LDFLAGS): likewise
3094 (pcpart_mod_SOURCES): likewise
3095 (pcpart_mod_CFLAGS): likewise
3096 (pcpart_mod_LDFLAGS): likewise
3097 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3098 and parttool/pcpart.c
3099 * conf/i386-efi.rmk: likewise
3100 * conf/i386-ieee1275.rmk: likewise
3101 * conf/i386-pc.rmk: likewise
3102 * conf/powerpc-ieee1275.rmk: likewise
3103 * conf/sparc64-ieee1275.rmk: likewise
3104 * conf/x86_64-ieee1275.rmk: likewise
3106 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3108 Support for mtime and further expandability of dir command
3110 * include/grub/lib/datetime.h: moved to ...
3111 * include/grub/datetime.h: ... moved here and added
3112 declaration of grub_unixtime2datetime. All users updated
3113 * include/grub/fs.h: new syntax for dir and mtime functions in
3115 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3116 and GRUB_FSHELP_FLAGS_MASK
3117 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3118 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3119 (grub_ext2_mtime): new function
3120 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3121 (grub_hfsplus_mtime): new function
3122 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3123 (GRUB_UFS_ATTR_FILE): likewise
3124 (GRUB_UFS_ATTR_LNK): likewise
3125 (struct grub_ufs_sblock): new fields mtime
3126 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3128 (grub_ufs_dir): mtime support
3129 (grub_ufs_mtime): new function
3130 * fs/affs.c (grub_affs_dir): use new dir syntax
3131 * fs/afs.c (grub_afs_dir): likewise
3132 * fs/cpio.c (grub_cpio_dir): likewise
3133 * fs/fat.c (grub_fat_find_dir): likewise
3134 * fs/hfs.c (grub_hfs_dir): likewise
3135 * fs/iso9660.c (grub_iso9660_dir): likewise
3136 * fs/jfs.c (grub_jfs_dir): likewise
3137 * fs/minix.c (grub_minix_dir): likewise
3138 * fs/ntfs.c (grub_ntfs_dir): likewise
3139 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3140 * fs/sfs.c (grub_sfs_dir): likewise
3141 * fs/xfs.c (grub_xfs_dir): likewise
3142 * util/hostfs.c (grub_hostfs_dir): likewise
3143 * lib/datetime.c: moved to ...
3144 * normal/datetime.c: ... moved here
3145 (grub_unixtime2datetime): new function
3146 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3147 * normal/completion.c (iterate_dir): use new dir syntax
3148 * normal/misc.c (grub_normal_print_device_info): tell the
3149 last modification time of a volume
3150 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3151 * conf/common.rmk: added lib/datetime.c to ls.mod
3152 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3153 (normal_mod_SOURCES): likewise
3154 (datetime_mod_SOURCES): Removed lib/datetime.c
3155 * conf/i386-efi.rmk: likewise
3156 * conf/i386-ieee1275.rmk: likewise
3157 * conf/i386-pc.rmk: likewise
3158 * conf/powerpc-ieee1275.rmk: likewise
3159 * conf/sparc64-ieee1275.rmk: likewise
3160 * conf/x86_64-efi.rmk: likewise
3162 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3164 Trim trailing spaces in FAT label and support mtools-like labels
3166 * fs/fat.c (grub_fat_iterate_dir): New function based
3167 on grub_fat_find_dir
3168 (grub_fat_find_dir): use grub_fat_iterate_dir
3169 (grub_fat_label): likewise
3171 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3173 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3175 remove extraneous kernel_elf_HEADERS
3177 2009-04-04 Bean <bean123ch@gnail.com>
3179 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3181 * util/misc.c: Likewise.
3183 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3185 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3186 instead of grub_printf.
3188 2009-04-03 Robert Millan <rmh@aybabtu.com>
3190 * loader/i386/linux.c (grub_linux_setup_video): Fill
3191 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3192 values from `mode info' structure instead of hardcoded
3195 2009-04-01 Pavel Roskin <proski@gnu.org>
3197 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3199 * genmk.rb: Likewise.
3200 * configure.ac: Likewise.
3202 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3204 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3205 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3207 2009-04-01 David S. Miller <davem@davemloft.net>
3209 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3210 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3211 (grub_setjmp): Mark with 'returns_twice' attribute.
3212 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3213 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3214 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3216 2009-04-01 Robert Millan <rmh@aybabtu.com>
3218 Reapply fix from 2008-07-28 which was accidentally reverted; also
3219 perform the same fix to a similar check in same function.
3221 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3222 with the same number are found, just use issue a warning with
3223 grub_dprintf(), as this error has been reported to be non-fatal.
3225 2009-03-31 Pavel Roskin <proski@gnu.org>
3227 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3228 for cross-compilation.
3230 2009-03-30 Robert Millan <rmh@aybabtu.com>
3232 Fix i386-ieee1275 build.
3234 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3237 2009-03-30 Pavel Roskin <proski@gnu.org>
3239 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3240 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3241 zero-terminated, rely only on the strlen value. Fix comparison
3242 of strings differing in length.
3244 2009-03-30 Robert Millan <rmh@aybabtu.com>
3246 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3247 checking for abi version. Improve error messages on BIOS to notify
3248 user about `linux16' command.
3250 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3254 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3255 in case of collision
3256 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3258 2009-03-29 Robert Millan <rmh@aybabtu.com>
3260 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3261 set `vid_mode' accordingly.
3262 (grub_linux_boot): Process `vid_mode' and set video mode.
3264 2009-03-29 Robert Millan <rmh@aybabtu.com>
3266 * util/grub.d/10_linux.in (linux_entry): New function.
3267 Factorize generation of Linux boot entries.
3269 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3271 Make the format of Environment Block plain text. The boot loader
3272 part is not tested well yet.
3274 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3277 (usage): Remove "info" and "clear". Add "unset". Update the
3278 description of "set", as this does not delete variables any
3280 (create_envblk_file): Complete rewrite.
3281 (open_envblk_file): Likewise.
3282 (cmd_info): Removed.
3283 (cmd_list): Likewise.
3284 (cmd_set): Likewise.
3285 (cmd_clear): Likewise.
3286 (list_variables): New function.
3287 (write_envblk): Likewise.
3288 (set_variables): Likewise.
3289 (unset_variables): Likewise.
3290 (main): Complete rewrite.
3292 * commands/loadenv.c (buffer): Removed.
3294 (open_envblk_file): New function.
3295 (read_envblk_file): Complete rewrite.
3296 (grub_cmd_load_env): Likewise.
3297 (grub_cmd_list_env): Likewise.
3298 (struct blocklist): New struct.
3299 (free_blocklists): New function.
3300 (check_blocklists): Likewise.
3301 (write_blocklists): Likewise.
3302 (grub_cmd_save_env): Complete rewrite.
3304 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3305 a plain text signature.
3306 (GRUB_ENVBLK_MAXLEN): Removed.
3307 (struct grub_envblk): Complete rewrite.
3308 (grub_envblk_find): Removed.
3309 (grub_envblk_insert): Likewise.
3310 (grub_envblk_open): New prototype.
3311 (grub_envblk_set): Likewise.
3312 (grub_envblk_delete): Put const to VALUE.
3313 (grub_envblk_iterate): Put const to NAME and VALUE.
3314 (grub_envblk_close): New prototype.
3315 (grub_envblk_buffer): New inline function.
3316 (grub_envblk_size): Likewise.
3318 * lib/envblk.c: Include grub/mm.h.
3319 (grub_env_find): Removed.
3320 (grub_envblk_open): New function.
3321 (grub_envblk_close): Likewise.
3322 (escaped_value_len): Likewise.
3323 (find_next_line): Likewise.
3324 (grub_envblk_insert): Removed.
3325 (grub_envblk_set): New function.
3326 (grub_envblk_delete): Complete rewrite.
3327 (grub_envblk_iterate): Likewise.
3329 2009-03-28 Robert Millan <rmh@aybabtu.com>
3331 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3332 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3333 variables. Use 16-bit loader.
3334 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3336 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3337 (grub_linux16_boot): ... this. Update all users.
3338 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3339 (grub_linux_boot): ... this. Update all users.
3341 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3342 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3343 commands to `linux16' and `initrd16'.
3344 (GRUB_MOD_FINI(linux)): Rename to ...
3345 (GRUB_MOD_FINI(linux16)): ... this.
3347 2009-03-24 Pavel Roskin <proski@gnu.org>
3349 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3350 not just for compilation.
3352 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3354 Move multiboot helper out of kernel
3356 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3357 `loader/i386/multiboot_helper.S'.
3358 * conf/i386-coreboot.rmk: Likewise
3359 * conf/i386-ieee1275.rmk: Likewise
3361 * kern/i386/loader.S: Move multiboot helpers from here...
3362 * loader/i386/multiboot_helper.S: ...moved here
3363 * include/grub/i386/loader.h: Move declarations of multiboot
3364 helpers from here...
3365 * include/grub/i386/multiboot.h: ...moved here
3366 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3368 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3370 * kern/env.c (grub_env_context_open): Added an argument to specify
3371 whether a new context inherits exported variables from current
3372 one. This is useful when making a sandbox to interpret a config
3374 All callers updated.
3376 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3378 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3380 * kern/env.c (grub_env_context_close): Fix memory leaks.
3382 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3384 * normal/main.c (grub_normal_execute): Added an argument
3385 BATCH to specify if an interactive interface should be provided
3386 after reading a config file.
3387 All callers updated.
3388 (read_command_list): Prevent being executed twice.
3389 (read_fs_list): Likewise.
3391 * include/grub/normal.h (grub_normal_execute): Updated the
3394 2009-03-22 Pavel Roskin <proski@gno.org>
3396 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3398 * kern/i386/pc/startup.S: Likewise.
3399 * kern/i386/efi/startup.S: Likewise.
3400 * kern/i386/ieee1275/startup.S: Likewise.
3401 * kern/i386/coreboot/startup.S: Likewise.
3402 * kern/x86_64/efi/startup.S: Likewise.
3404 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3405 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3406 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3408 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3410 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3412 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3414 Use vaddr of correct segment for entry_point.
3416 2009-03-21 Bean <bean123ch@gmail.com>
3418 * commands/blocklist.c: Add include file <grub/command.h>, remove
3419 <grub/normal.h> and <grub/arg.h>.
3420 (grub_cmd_blocklist): Use the new command interface.
3421 (GRUB_MOD_INIT): Likewise.
3422 (GRUB_MOD_FINI): Likewise.
3423 * commands/boot.c: Likewise.
3424 * commands/cat.c: Likewise.
3425 * commands/cmp.c: Likewise.
3426 * commands/configfile.c: Likewise.
3427 * commands/crc.c: Likewise.
3428 * commands/echo.c: Likewise.
3429 * commands/halt.c: Likewise.
3430 * commands/handler.c: Likewise.
3431 * commands/hdparm.c: Likewise.
3432 * commands/help.c: Likewise.
3433 * commands/hexdump.c: Likewise.
3434 * commands/loadenv.c: Likewise.
3435 * commands/ls.c: Likewise.
3436 * commands/lsmmap.c: Likewise.
3437 * commands/lspci.c: Likewise.
3438 * commands/loadenv.c: Likewise.
3439 * commands/read.c: Likewise.
3440 * commands/reboot.c: Likewise.
3441 * commands/search.c: Likewise.
3442 * commands/sleep.c: Likewise.
3443 * commands/test.c: Likewise.
3444 * commands/usbtest.c: Likewise.
3445 * commands/videotest.c: Likewise.
3446 * commands/i386/cpuid.c: Likewise.
3447 * commands/i386/pc/halt.c: Likewise.
3448 * commands/i386/pc/play.c: Likewise.
3449 * commands/i386/pc/pxecmd.c: Likewise.
3450 * commands/i386/pc/vbeinfo.c: Likewise.
3451 * commands/i386/pc/vbetest.c: Likewise.
3452 * commands/ieee1275/suspend.c: Likewise.
3453 * disk/loopback.c: Likewise.
3454 * font/font_cmd.c: Likewise.
3455 * hello/hello.c: Likewise.
3456 * loader/efi/appleloader.c: Likewise.
3457 * loader/efi/chainloader.c: Likewise.
3458 * loader/i386/bsd.c: Likewise.
3459 * loader/i386/efi/linux.c: Likewise.
3460 * loader/i386/ieee1275/linux.c: Likewise.
3461 * loader/i386/linux.c: Likewise.
3462 * loader/i386/pc/chainloader.c: Likewise.
3463 * loader/i386/pc/linux.c: Likewise.
3464 * loader/powerpc/ieee1275/linux.c: Likewise.
3465 * loader/multiboot_loader.c: Likewise.
3466 * term/gfxterm.c: Likewise.
3467 * term/i386/pc/serial.c: Likewise.
3468 * term/terminfo.c: Likewise.
3470 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3471 * term/i386/pc/vga.c: Likewise.
3472 * video/readers/jpeg.c: Likewise.
3473 * video/readers/png.c: Likewise.
3474 * video/readers/tga.c: Likewise.
3476 * util/grub-fstest (cmd_loopback): Removed.
3477 (cmd_blocklist): Likewise.
3479 (grub_register_command): Likewise.
3480 (grub_unregister_command): Likewise.
3481 (execute_command): Use grub_command_find to locate command and execute
3484 * include/grub/efi/chainloader.h: Removed.
3485 * loader/efi/chainloader_normal.c: Likewise.
3486 * loader/i386/bsd_normal.c: Likewise.
3487 * loader/i386/pc/chainloader_normal.c: Likewise.
3488 * loader/i386/pc/multiboot_normal.c: Likewise.
3489 * loader/linux_normal.c: Likewise.
3490 * loader/multiboot_loader_normal.c: Likewise.
3491 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3493 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3494 and grub_register_command_p1.
3496 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3497 kern/command.c, lib/arg.c and commands/extcmd.c.
3498 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3499 (minicmd_mod_SOURCES): New variable.
3500 (minicmd_mod_CFLAGS): Likewise.
3501 (minicmd_mod_LDFLAGS): Likewise.
3502 (extcmd_mod_SOURCES): Likewise.
3503 (extcmd_mod_CFLAGS): Likewise.
3504 (extcmd_mod_LDFLAGS): Likewise.
3505 (boot_mod_SOURCES): Removed.
3506 (boot_mod_CFLAGS): Likewise.
3507 (boot_mod_LDFLAGS): Likewise.
3509 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3511 (kernel_img_HEADERS): Add command.h.
3512 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3513 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3515 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3516 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3517 remove the corresponding normal mode command.
3518 (normal_mod_SOURCES): Remove normal/arg.c.
3519 * conf/i386-coreboot.rmk: Likewise.
3520 * conf/i386-efi.rmk: Likewise.
3521 * conf/i386-ieee1275.rmk: Likewise.
3522 * conf/powerpc-ieee1275.rmk: Likewise.
3523 * conf/x86_64-efi.rmk: Likewise.
3525 * include/grub/arg.h: Move from here ...
3526 * include/grub/lib/arg.h: ... to here.
3528 * normal/arg.c: Move from here ...
3529 * lib/arg.c: ... to here.
3531 * commands/extcmd.c: New file.
3532 * commands/minicmd.c: Likewise.
3533 * include/grub/command.h: Likewise.
3534 * include/grub/extcmd.h: Likewise.
3535 * kern/command.c: Likewise.
3536 * kern/corecmd.c: Likewise.
3538 * kern/list.c (grub_list_iterate): Return int instead of void.
3539 (grub_list_insert): New function.
3540 (grub_prio_list_insert): Likewise.
3542 * kern/rescue.c (grub_rescue_command): Removed.
3543 (grub_rescue_command_list): Likewise.
3544 (grub_rescue_register_command): Likewise.
3545 (grub_rescue_unregister_command): Likewise.
3546 (grub_rescue_cmd_boot): Move to minicmd.c
3547 (grub_rescue_cmd_help): Likewise.
3548 (grub_rescue_cmd_info): Likewise.
3549 (grub_rescue_cmd_boot): Likewise.
3550 (grub_rescue_cmd_testload): Likewise.
3551 (grub_rescue_cmd_dump): Likewise.
3552 (grub_rescue_cmd_rmmod): Likewise.
3553 (grub_rescue_cmd_lsmod): Likewise.
3554 (grub_rescue_cmd_exit): Likewise.
3555 (grub_rescue_print_devices): Moved to corecmd.c.
3556 (grub_rescue_print_files): Likewise.
3557 (grub_rescue_cmd_ls): Likewise.
3558 (grub_rescue_cmd_insmod): Likewise.
3559 (grub_rescue_cmd_set): Likewise.
3560 (grub_rescue_cmd_unset): Likewise.
3561 (attempt_normal_mode): Use grub_command_find to get normal module.
3562 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3563 commands, remove grub_rescue_register_command calls.
3565 * normal/command.c (grub_register_command): Removed.
3566 (grub_unregister_command): Likewise.
3567 (grub_command_find): Likewise.
3568 (grub_iterate_commands): Likewise.
3569 (rescue_command): Likewise.
3570 (export_command): Moved to corecmd.c.
3571 (set_command): Removed.
3572 (unset_command): Likewise.
3573 (insmod_command): Likewise.
3574 (rmmod_command): Likewise.
3575 (lsmod_command): Likewise.
3576 (grub_command_init): Likewise.
3578 * normal/completion.c (iterate_command): Use cmd->prio to check for
3580 (complete_arguments): Use grub_extcmd_t structure to find options.
3581 (grub_normal_do_completion): Change function grub_iterate_commands to
3582 grub_command_iterate.
3584 * normal/execute.c (grub_script_execute_cmd): No need to parse
3587 * normal/main.c (grub_dyncmd_dispatcher): New function.
3588 (read_command_list): Register unload commands as dyncmd.
3589 (grub_cmd_normal): Use new command interface, register rescue,
3590 unregister normal at entry, register normal, unregister rescue at exit.
3592 * include/grub/list.h (grub_list_test_t): New type.
3593 (grub_list_iterate): Return int instead of void.
3594 (grub_list_insert): New function.
3595 (GRUB_AS_NAMED_LIST_P): New macro.
3596 (GRUB_AS_PRIO_LIST): Likewise.
3597 (GRUB_AS_PRIO_LIST_P): Likewise.
3598 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3599 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3600 (grub_prio_list): New structure.
3601 (grub_prio_list_insert): New function.
3602 (grub_prio_list_remove): New inline function.
3604 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3605 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3606 (GRUB_COMMAND_FLAG_MENU): Likewise.
3607 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3608 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3609 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3610 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3611 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3612 (grub_command): Likewise.
3613 (grub_register_command): Likewise.
3614 (grub_command_find): Likewise.
3615 (grub_iterate_commands): Likewise.
3616 (grub_command_init): Likewise.
3617 (grub_arg_parse): Likewise.
3618 (grub_arg_show_help): Likewise.
3620 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3621 (grub_rescue_unregister_command): Likewise.
3623 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3624 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3625 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3627 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3628 grub_rescue_cmd_initrd.
3629 * include/grub/i386/loader.h: Likewise.
3630 * include/grub/x86_64/loader.h: Likewise.
3632 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3634 2009-03-21 Bean <bean123ch@gmail.com>
3636 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3637 instead of stat in mingw environment.
3639 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3641 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3643 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3646 2009-03-21 Bean <bean123ch@gmail.com>
3648 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3651 2009-03-18 Michel Dänzer <michel@daenzer.net>
3653 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3654 checking inode flags for EXT4_EXTENTS_FLAG.
3656 2009-03-18 Robert Millan <rmh@aybabtu.com>
3658 * loader/i386/linux.c: Include `<grub/video.h>' and
3659 `<grub/i386/pc/vbe.h>'..
3660 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3661 (grub_linux32_boot): Attempt to configure video settings with
3662 grub_linux_setup_video().
3663 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3664 to avoid grub_console_fini() which would step out of graphical mode
3667 2009-03-14 Robert Millan <rmh@aybabtu.com>
3669 Fix build on powerpc.
3670 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3672 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3674 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3675 background image command.
3677 2009-03-12 Colin D Bennett <colin@gibibit.com>
3679 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3680 (grub_gfxterm_putchar): Extract pairs of identical calls to
3681 draw_cursor out of conditional blocks.
3683 2009-03-11 Pavel Roskin <proski@gnu.org>
3685 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3686 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3688 2009-03-11 Robert Millan <rmh@aybabtu.com>
3690 * loader/i386/multiboot_elfxx.c
3691 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3693 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3695 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3698 2009-03-11 Robert Millan <rmh@aybabtu.com>
3700 * loader/i386/multiboot.c (code_size): New variable.
3701 (grub_multiboot): Define offsets by adding to `code_size' rather
3702 than subtracting from `grub_multiboot_payload_size'. Provide
3703 4-byte alignment to MBI and others by increasing
3704 `boot_loader_name_length' appropriately.
3706 * loader/i386/multiboot_elfxx.c
3707 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3709 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3711 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3714 2009-03-08 Robert Millan <rmh@aybabtu.com>
3716 Make loader/i386/linux.c usable on i386-pc again.
3718 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3720 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3723 2009-03-07 Bean <bean123ch@gmail.com>
3725 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3728 2009-03-06 Robert Millan <rmh@aybabtu.com>
3730 Fix display issue on terminals with screen size other than 80x25
3731 (e.g. gfxterm with resolution higher than 640x480).
3733 * normal/main.c (grub_normal_init_page): Display title text in a
3734 position relative to the center of the terminal instead of relying
3735 on a hardcoded offset.
3737 2009-03-04 Robert Millan <rmh@aybabtu.com>
3739 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3742 * Makefile.in (host_kernel): New variable.
3743 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3744 scripts instead of just the windows one.
3745 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3747 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3749 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3751 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3752 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3753 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3755 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3756 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3758 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3760 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3761 or if there's no space for the disk label and print the partition number on a
3764 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3766 * util/misc.c: Include <time.h>.
3767 (grub_millisleep): New function.
3769 2009-03-04 Bean <bean123ch@gmail.com>
3771 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3772 another option -mno-red-zone.
3774 * commands/handler.c: Change module description.
3776 * kern/handler.c: Add missing space at the end of description line.
3778 * kern/list.c: Likewise.
3780 2009-03-03 Robert Millan <rmh@aybabtu.com>
3782 Move more components to the relocation area, and fix mbi pointer
3783 handling to use the destination rather than the origin (thanks to
3784 Vladimir Serbinenko for spotting).
3786 * loader/i386/multiboot.c (mbi_dest): New variable.
3787 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3788 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3791 2009-03-01 Bean <bean123ch@gmail.com>
3793 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3794 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3795 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3796 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3798 * loader/i386/efi/linux.c (acpi_guid): New variable.
3799 (acpi_guid): Likewise.
3800 (EBDA_SEG_ADDR): New constant.
3801 (LOW_MEM_ADDR): Likewise.
3802 (FAKE_EBDA_SEG): Likewise.
3803 (fake_bios_data): New function.
3804 (grub_linux_boot): Call fake_bios_data.
3806 2009-03-01 Bean <bean123ch@gmail.com>
3808 * commands/terminal.c: Removed.
3810 * commands/handler.c: New file.
3812 * include/grub/list.h: Likewise.
3814 * include/grub/handler.h: Likewise.
3816 * kern/list.c: Likewise.
3818 * kern/handler.c: Likewise.
3820 * kern/term.h: Include header file <grub/handler.h>.
3821 (grub_term_input): Move next field to the beginning.
3822 (grub_term_output): Likewise.
3823 (grub_term_input_class): New variable.
3824 (grub_term_output_class): Likewise.
3825 (grub_term_register_input): Changed to inline function.
3826 (grub_term_register_output): Likewise.
3827 (grub_term_unregister_input): Likewise.
3828 (grub_term_unregister_output): Likewise.
3829 (grub_term_set_current_input): Likewise.
3830 (grub_term_set_current_output): Likewise.
3831 (grub_term_get_current_input): Likewise.
3832 (grub_term_get_current_output): Likewise.
3833 (grub_term_iterate_input): Removed.
3834 (grub_term_iterate_output): Likewise.
3836 * kern/term.c (grub_term_list_input): Removed.
3837 (grub_term_list_output): Likewise.
3838 (grub_term_input_class): New variable.
3839 (grub_term_output_class): Likewise.
3840 (grub_cur_term_input): Change variable as macro.
3841 (grub_cur_term_output): Likewise.
3842 (grub_term_register_input): Removed.
3843 (grub_term_register_output): Likewise.
3844 (grub_term_unregister_input): Likewise.
3845 (grub_term_unregister_output): Likewise.
3846 (grub_term_set_current_input): Likewise.
3847 (grub_term_set_current_output): Likewise.
3848 (grub_term_iterate_input): Likewise.
3849 (grub_term_iterate_output): Likewise.
3850 (grub_term_get_current_input): Likewise.
3851 (grub_term_get_current_output): Likewise.
3853 * util/grub-editenv.c: Include header file <grub/handler.h>.
3854 (grub_term_get_current_input): Removed.
3855 (grub_term_get_current_output): Likewise.
3856 (grub_term_input_class): New variable.
3857 (grub_term_output_class): Likewise.
3859 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3860 (grub_term_get_current_output): Likewise.
3861 (grub_term_input_class): New variable.
3862 (grub_term_output_class): Likewise.
3864 * util/grub-probe.c (grub_term_get_current_input): Removed.
3865 (grub_term_get_current_output): Likewise.
3866 (grub_term_input_class): New variable.
3867 (grub_term_output_class): Likewise.
3869 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3870 (grub_term_get_current_output): Likewise.
3871 (grub_term_input_class): New variable.
3872 (grub_term_output_class): Likewise.
3874 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3875 (terminal_mod_SOURCES): Likewise.
3876 (terminal_mod_CFLAGS): Likewise.
3877 (terminal_mod_LDFLAGS): Likewise.
3879 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3881 (kernel_img_SOURCES): Add list.c and handler.c.
3882 (kernel_img_HEADERS): Add list.h and handler.h.
3884 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3886 (kernel_mod_SOURCES): Add list.c and handler.c.
3887 (kernel_mod_HEADERS): Add list.h and handler.h.
3889 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3891 (kernel_elf_SOURCES): Add list.c and handler.c.
3892 (kernel_elf_HEADERS): Add list.h and handler.h.
3894 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3896 (kernel_elf_SOURCES): Add list.c and handler.c.
3897 (kernel_elf_HEADERS): Add list.h and handler.h.
3899 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3901 (kernel_mod_SOURCES): Add list.c and handler.c.
3902 (kernel_mod_HEADERS): Add list.h and handler.h.
3904 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3906 (kernel_elf_SOURCES): Add list.c and handler.c.
3907 (kernel_elf_HEADERS): Add list.h and handler.h.
3909 2009-02-27 Robert Millan <rmh@aybabtu.com>
3911 Factorize elf32 / elf64 code in Multiboot loader. This will
3912 prevent it from getting out of sync again.
3914 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3915 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3916 grub_multiboot_load_elf64): Move from here ...
3917 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3918 grub_multiboot_load_elf): ... to here (new file).
3920 2009-02-27 Robert Millan <rmh@aybabtu.com>
3922 * util/grub.d/10_linux.in: Rename "single-user mode" to
3925 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3927 Don't leak in SCSI code.
3928 * disk/scsi.c (grub_scsi_close): free `scsi'.
3930 2009-02-27 Robert Millan <rmh@aybabtu.com>
3932 * loader/i386/pc/multiboot.c: Move from here ...
3933 * loader/i386/multiboot.c: ... to here. Update all users.
3935 2009-02-27 Robert Millan <rmh@aybabtu.com>
3937 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3938 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3940 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3942 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3945 2009-02-27 Robert Millan <rmh@aybabtu.com>
3947 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3948 `0x' qualifier as 0 when base is specified as parameter).
3950 2009-02-24 Bean <bean123ch@gmail.com>
3952 * configure.ac: Check for -mcmodel=large in x86_64 target.
3954 * include/grub/efi/api.h (efi_call_10): New macro.
3955 (efi_wrap_10): New function.
3957 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3958 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3959 (GRUB_PE32_REL_BASED_LOW): Likewise.
3960 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3961 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3962 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3963 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3964 (GRUB_PE32_REL_BASED_REL): Likewise.
3965 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3966 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3967 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3969 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3972 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3973 (efi_wrap_10): New function.
3975 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3977 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3978 MB/MBP model (NV chipset).
3979 (devdata_devs): Add devpath_5 to the list.
3981 * load/i386/efi/linux.c (video_base): Remove variable.
3982 (RGB_MASK): New macro.
3983 (RGB_MAGIC): Likewise.
3984 (LINE_MIN): Likewise.
3985 (LINE_MAX): Likewise.
3986 (FBTEST_STEP): Likewise.
3987 (FBTEST_COUNT): Likewise.
3988 (fb_list): New variable.
3989 (grub_find_video_card): Remove function.
3990 (find_framebuf): New function.
3991 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3994 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3997 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3999 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4001 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4004 2009-02-22 Robert Millan <rmh@aybabtu.com>
4006 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4007 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4008 in our relocation, instead of using it directly from heap. Also
4009 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4011 2009-02-21 Robert Millan <rmh@aybabtu.com>
4013 Implement USB keyboard support (based on patch by Marco Gerards)
4015 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4016 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4017 (usb_keyboard_mod_LDFLAGS): New variables.
4019 * term/usb_keyboard.c: New file.
4021 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4023 Corrected wrong declaration
4025 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4027 2009-02-14 Christian Franke <franke@computer.org>
4029 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4030 (grub_lspci_iter): Print class code and programming interface byte.
4032 2009-02-14 Christian Franke <franke@computer.org>
4034 * gendistlist.sh: Ignore `.svn' directories.
4036 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4038 * fs/fat.c: Add 2009 to Copyright line.
4040 2009-02-14 Christian Franke <franke@computer.org>
4042 * commands/hdparm.c: New file. Provides `hdparm' command
4043 which sends ATA commands via grub_disk_ata_pass_through ().
4045 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4047 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4048 and <grub/cpu/io.h> to include/grub/ata.h.
4049 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4050 (GRUB_CDROM_SECTOR_SIZE): Remove.
4051 (GRUB_ATA_*): Move to include/grub/ata.h.
4052 (GRUB_ATAPI_*): Likewise.
4053 (enum grub_ata_commands): Likewise.
4054 (enum grub_ata_timeout_milliseconds): Likewise.
4055 (struct grub_ata_device): Likewise.
4056 (grub_ata_regset): Likewise.
4057 (grub_ata_regget): Likewise.
4058 (grub_ata_regset2): Likewise.
4059 (grub_ata_regget2): Likewise.
4060 (grub_ata_check_ready): Likewise.
4061 (grub_ata_wait_not_busy): Remove static, exported in
4063 (grub_ata_wait_drq): Likewise.
4064 (grub_ata_pio_read): Likewise.
4066 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4067 function for hdparm.mod.
4069 * include/grub/ata.h: New file, contains declarations from
4071 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4073 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4074 (grub_disk_ata_pass_through): New exported variable.
4076 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4078 2009-02-13 Colin D Bennett <colin@gibibit.com>
4080 Support multiple fallback entries, and provide an API to support
4081 executing default+fallback menu entries. Renamed the `terminal' menu
4084 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4085 variable declaration.
4086 (grub_menu_execute_callback): New structure declaration.
4087 (grub_menu_execute_callback_t): New typedef.
4088 (grub_menu_execute_with_fallback): New function declaration.
4089 (grub_menu_get_entry): Likewise.
4090 (grub_menu_get_timeout): Likewise.
4091 (grub_menu_set_timeout): Likewise.
4093 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4095 * normal/menu.c (grub_wait_after_message): Moved to
4096 `normal/menu_text.c'.
4097 (draw_border): Likewise.
4098 (print_message): Likewise.
4099 (print_entry): Likewise.
4100 (print_entries): Likewise.
4101 (grub_menu_init_page): Likewise.
4102 (get_entry_number): Likewise.
4103 (print_timeout): Likewise.
4104 (run_menu): Likewise.
4105 (grub_menu_execute_entry): Likewise.
4106 (show_text_menu): Likewise.
4107 (get_and_remove_first_entry_number): New function.
4108 (grub_menu_execute_with_fallback): Likewise.
4109 (get_entry): Renamed to ...
4110 (grub_menu_get_entry): .. this and made it global.
4111 (get_timeout): Renamed to ...
4112 (grub_menu_get_timeout): ... this and made it global.
4113 (set_timeout): Renamed to ...
4114 (grub_menu_set_timeout): ... this and made it global.
4115 (grub_normal_terminal_menu_viewer): Renamed to ...
4116 (grub_normal_text_menu_viewer): ... this.
4118 * normal/menu_text.c: New file. Extracted text-menu-specific code
4121 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4122 (normal_mod_SOURCES): Likewise.
4124 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4125 (normal_mod_SOURCES): Likewise.
4127 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4128 (normal_mod_SOURCES): Likewise.
4130 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4131 (normal_mod_SOURCES): Likewise.
4133 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4134 (normal_mod_SOURCES): Likewise.
4136 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4137 (normal_mod_SOURCES): Likewise.
4139 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4140 (normal_mod_SOURCES): Likewise.
4142 2009-02-11 Robert Millan <rmh@aybabtu.com>
4144 * util/grub.d/00_header.in: Update old reference to `font' command.
4146 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4148 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4150 Based on patch from Javier MartÃn.
4152 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4154 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4155 to avoid false positives with FAT.
4156 (grub_fstest_SOURCES): Likewise.
4157 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4158 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4160 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4161 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4162 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4164 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4166 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4167 bpb.version_specific.fat12_or_fat16.fstype and
4168 bpb.version_specific.fat32.fstype.
4170 2009-02-08 Robert Millan <rmh@aybabtu.com>
4172 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4174 2009-02-08 Robert Millan <rmh@aybabtu.com>
4176 * Makefile.in (host_os, host_cpu): New variables.
4177 (target_os): Remove. Update all users.
4179 2009-02-08 Marco Gerards <marco@gnu.org>
4181 * Makefile.in (enable_grub_emu_usb): New variable.
4182 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4183 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4184 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4185 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4186 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4187 `usbtest.mod' and `usbms.mod'.
4188 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4189 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4190 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4191 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4192 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4195 * disk/usbms.c: New file.
4197 * include/grub/usb.h: Likewise.
4199 * include/grub/usbtrans.h: Likewise.
4201 * include/grub/usbdesc.h: Likewise.
4203 * bus/usb/usbtrans.c: Likewise.
4205 * bus/usb/ohci.c: Likewise.
4207 * bus/usb/uhci.c: Likewise.
4209 * bus/usb/usbhub.c: Likewise.
4211 * bus/usb/usb.c: Likewise.
4213 * commands/usbtest.c: Likewise.
4215 * util/usb.c: Likewise.
4217 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4219 * configure.ac: Test for libusb presence.
4221 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4223 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4225 * kern/mm.c: Add more comments.
4227 2009-02-08 Robert Millan <rmh@aybabtu.com>
4229 Patch from Javier MartÃn.
4230 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4231 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4233 2009-02-08 Robert Millan <rmh@aybabtu.com>
4235 * fs/cpio.c: Split tar functionality to ...
4236 * fs/tar.c: ... here (new file). Update all users.
4238 2009-02-07 Robert Millan <rmh@aybabtu.com>
4240 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4241 backward-incompatible features.
4243 Based on patch from Javier MartÃn, with some adjustments.
4245 2009-02-07 Michael Scherer <misc@mandriva.org>
4247 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4249 2009-02-07 Robert Millan <rmh@aybabtu.com>
4251 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4252 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4253 after the RAID stuff.
4255 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4257 Fixes problem when running vbetest command as reported by
4258 Vladimir Serbinenko <phcoder@gmail.com>.
4260 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4262 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4264 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4265 /dev/md/NpN style mdraid devices.
4267 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4269 * util/unifont2pff.rb: Remove.
4271 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4273 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4276 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4278 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4279 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4280 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4281 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4282 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4283 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4284 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4286 2009-02-02 Christian Franke <franke@computer.org>
4288 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4290 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4292 * INSTALL: Note that we now require at least autoconf 2.59 and
4293 that LZO is optional.
4295 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4297 Base on patch on bug #24154 created by Tomas Tintera
4300 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4302 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4304 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4305 <bero@arklinux.org>.
4307 * normal/parser.y (script_init): Add missing semicolon.
4309 2009-01-31 Colin D Bennett <colin@gibibit.com>
4311 * normal/main.c: Add include to grub/menu_viewer.h.
4312 (free_menu_entry_classes): Added.
4313 (grub_normal_menu_addentry): Added class property handling.
4314 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4315 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4317 * normal/menu_viewer.c: New file.
4319 * normal/menu.c (run_menu_entry): Renamed to ...
4320 (grub_menu_execute_entry): ... this and made it as global.
4321 (grub_menu_run): Renamed to ...
4322 (show_text_menu): ... this and made it local.
4323 (show_text_menu): Adapt to new function names.
4324 (grub_normal_terminal_menu_viewer): New global variable.
4326 * include/grub/menu.h: New file.
4328 * include/grub/menu_viewer.h: New file.
4330 * include/grub/normal.h: Added include to grub/menu.h.
4331 (grub_menu_entry): Moved to include/grub/menu.h.
4332 (grub_menu_entry_t): Likewise.
4333 (grub_menu): Likewise.
4334 (grub_menu_t): Likewise.
4335 (grub_normal_terminal_menu_viewer): Added.
4336 (grub_menu_execute_entry): Likewise.
4337 (grub_menu_run): Removed.
4339 * DISTLIST: Added include/grub/menu.h.
4340 Added include/grub/menu_viewer.h.
4341 Added normal/menu_viewer.c.
4343 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4345 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4346 arglist for menutitle arguments.
4348 * normal/main.c (grub_normal_menu_addentry): Likewise.
4350 * normal/parser.y (menuentry): Likewise.
4352 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4354 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4355 (grub_script_create_cmdmenu): Likewise.
4357 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4359 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4362 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4364 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4366 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4368 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4370 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4372 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4374 2009-01-30 Christian Franke <franke@computer.org>
4376 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4377 in option help text.
4379 2009-01-27 Pavel Roskin <proski@gnu.org>
4381 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4383 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4385 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4387 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4389 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4390 unregister function.
4392 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4394 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4396 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4398 * util/grub-mkfont.c (usage): Fix typo.
4400 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4402 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4404 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4406 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4408 * kern/misc.c (grub_strcasecmp): New function.
4409 (grub_strcasecmp): Use grub_size_t instead of int for length.
4411 * include/grub/misc.h: Update function prototypes.
4413 2009-01-26 Robert Millan <rmh@aybabtu.com>
4415 * configure.ac: Fix cross-compilation check.
4417 2009-01-22 Christian Franke <franke@computer.org>
4419 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4420 (precision) digit string. Allow `.format2' without `format1' (width).
4421 Limit input chars for `%s' output to `format2' if specified. This is
4422 compatible with standard printf ().
4424 2009-01-22 Christian Franke <franke@computer.org>
4426 * disk/ata.c (grub_ata_wait_status): Replace by ...
4427 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4428 other status bits may be invalid while BSY is asserted.
4429 (grub_ata_check_ready): New function.
4430 (grub_ata_cmd): Removed.
4431 (grub_ata_wait_drq): New function.
4432 (grub_ata_strncpy): Remove inline.
4433 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4434 and error check now done by grub_ata_wait_drq ().
4435 (grub_ata_pio_write): Likewise.
4436 (grub_atapi_identify): Set DEV before check for !BSY. Use
4437 grub_ata_wait_drq () to wait for data.
4438 (grub_ata_device_initialize): Add status register check to
4439 detect missing SATA slave devices. Add debug messages.
4440 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4441 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4442 transfer loop by grub_ata_pio_write ().
4443 (grub_ata_identify): Set DEV before check for !BSY. Use
4444 grub_ata_wait_drq () to wait for data.
4445 (grub_ata_setaddress): Set DEV before check for !BSY.
4446 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4447 read/write in one loop. Fix invalid command on write. Fix incomplete
4448 command on (size % batch) == 0. Add missing error check after write of
4449 last block. Add debug messages.
4450 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4452 2009-01-19 Christian Franke <franke@computer.org>
4454 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4455 (GRUB_ATAPI_IREASON_*): Likewise.
4456 (grub_ata_pio_write): Fix timeout error return.
4457 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4458 (grub_atapi_wait_drq): New function.
4459 (grub_atapi_packet): New parameter `size'.
4460 Use grub_atapi_wait_drq () and direct write instead of
4461 grub_ata_pio_write ().
4462 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4463 reads the number of bytes requested by the device for each DRQ
4465 (grub_atapi_write): Remove old implementation, return not
4466 implemented instead.
4468 2009-01-19 Christian Franke <franke@computer.org>
4470 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4471 of 512 to calculate data size.
4472 (grub_scsi_read12): Likewise.
4473 (grub_scsi_write10): Likewise.
4474 (grub_scsi_write12): Likewise.
4475 (grub_scsi_read): Adjust size according to blocksize.
4476 Add checks for invalid blocksize and unaligned transfer.
4478 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4480 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4482 * term/gfxterm.c (write_char): Fix background rendering for wide
4485 2009-01-19 Robert Millan <rmh@aybabtu.com>
4487 * config.guess: Update to latest version from config git.
4488 * config.sub: Likewise.
4490 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4492 * Makefile.in: Change font compilation to use new grub-mkfont instead
4495 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4496 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4497 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4498 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4499 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4500 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4501 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4502 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4503 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4505 2009-01-16 Christian Franke <franke@computer.org>
4507 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4508 (enum grub_ata_timeout_milliseconds): New enum.
4509 (grub_ata_wait_status): Add parameter milliseconds.
4510 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4511 recovery from timed-out commands.
4512 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4513 return grub_errno instead of REG_ERROR.
4514 (grub_ata_pio_write): Add parameter milliseconds.
4515 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4516 Pass milliseconds to grub_ata_wait_status () and
4517 grub_ata_pio_read ().
4518 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4519 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4520 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4521 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4522 It is not suitable for device detection, because DEV bit is ignored,
4523 the command may run too long, and not all devices set the signature
4525 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4526 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4527 Fix device selection, DEV bit must be set first to address the registers
4528 of the correct device.
4529 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4530 grub_ata_pio_read/write ().
4531 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4532 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4534 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4536 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4538 2009-01-13 Bean <bean123ch@gmail.com>
4540 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4542 2009-01-13 Bean <bean123ch@gmail.com>
4544 * Makefile.in: (enable_grub_mkfont): New variable.
4545 (freetype_cflags): Likewise.
4546 (freetype_libs): Likewise.
4548 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4549 (grub_mkfont_SOURCES): New variable.
4550 (grub_mkfont_CFLAGS): Likewise.
4551 (grub_mkfont_LDFLAGS): Likewise.
4553 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4554 library if `--enable-grub-mkfont' is requested.
4555 (enable_grub_mkfont): New variable.
4556 (freetype_cflags): Likewise.
4557 (freetype_libs): Likewise.
4559 * util/grub-mkfont.c: New file.
4561 2009-01-12 Christian Franke <franke@computer.org>
4563 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4564 mode check. Fix setting of compat_use[].
4566 2009-01-10 Robert Millan <rmh@aybabtu.com>
4568 Update a few copyright years which we forgot to do in 2008 (only for
4569 files whose changes made in 2008 were copyright-significant)
4571 * Makefile.in: Add 2008 to Copyright line.
4572 * disk/ieee1275/ofdisk.c: Likewise.
4573 * disk/efi/efidisk.c: Likewise.
4574 * kern/dl.c: Likewise.
4575 * kern/sparc64/ieee1275/init.c: Likewise.
4576 * kern/mm.c: Likewise.
4577 * kern/efi/mm.c: Likewise.
4578 * boot/i386/pc/boot.S: Likewise.
4579 * genfslist.sh: Likewise.
4580 * fs/iso9660.c: Likewise.
4581 * fs/hfs.c: Likewise.
4582 * fs/jfs.c: Likewise.
4583 * fs/minix.c: Likewise.
4584 * fs/ufs.c: Likewise.
4585 * gensymlist.sh.in: Likewise.
4586 * genkernsyms.sh.in: Likewise.
4587 * include/grub/misc.h: Likewise.
4588 * include/grub/types.h: Likewise.
4589 * include/grub/symbol.h: Likewise.
4590 * include/grub/elf.h: Likewise.
4591 * include/grub/kernel.h: Likewise.
4592 * include/grub/disk.h: Likewise.
4593 * include/grub/dl.h: Likewise.
4594 * include/grub/i386/linux.h: Likewise.
4595 * include/grub/i386/pc/biosdisk.h: Likewise.
4596 * include/grub/efi/api.h: Likewise.
4597 * include/grub/efi/pe32.h: Likewise.
4598 * include/grub/util/misc.h: Likewise.
4599 * normal/execute.c: Likewise.
4600 * normal/arg.c: Likewise.
4601 * normal/completion.c: Likewise.
4602 * normal/lexer.c: Likewise.
4603 * normal/parser.y: Likewise.
4604 * normal/misc.c: Likewise.
4605 * commands/i386/pc/vbeinfo.c: Likewise.
4606 * commands/hexdump.c: Likewise.
4607 * commands/terminal.c: Likewise.
4608 * commands/ls.c: Likewise.
4609 * commands/help.c: Likewise.
4610 * partmap/pc.c: Likewise.
4611 * loader/efi/chainloader.c: Likewise.
4612 * loader/multiboot_loader.c: Likewise.
4613 * loader/i386/pc/multiboot2.c: Likewise.
4614 * term/efi/console.c: Likewise.
4615 * term/i386/pc/serial.c: Likewise.
4616 * util/lvm.c: Likewise.
4617 * util/console.c: Likewise.
4618 * util/i386/efi/grub-mkimage.c: Likewise.
4619 * util/raid.c: Likewise.
4621 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4623 * commands/videotest.c: Removed include to grub/machine/memory.h.
4625 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4626 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4627 (video_mod_SOURCES): Removed.
4628 (video_mod_CFLAGS): Likewise.
4629 (video_mod_LDFLAGS): Likewise.
4630 (gfxterm_mod_SOURCES): Likewise.
4631 (gfxterm_mod_CFLAGS): Likewise.
4632 (gfxterm_mod_LDFLAGS): Likewise.
4633 (videotest_mod_SOURCES): Likewise.
4634 (videotest_mod_CFLAGS): Likewise.
4635 (videotest_mod_LDFLAGS): Likewise.
4636 (bitmap_mod_SOURCES): Likewise.
4637 (bitmap_mod_CFLAGS): Likewise.
4638 (bitmap_mod_LDFLAGS): Likewise.
4639 (tga_mod_SOURCES): Likewise.
4640 (tga_mod_CFLAGS): Likewise.
4641 (tga_mod_LDFLAGS): Likewise.
4642 (jpeg_mod_SOURCES): Likewise.
4643 (jpeg_mod_CFLAGS): Likewise.
4644 (jpeg_mod_LDFLAGS): Likewise.
4645 (png_mod_SOURCES): Likewise.
4646 (png_mod_CFLAGS): Likewise.
4647 (png_mod_LDFLAGS): Likewise.
4649 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4650 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4651 (video_mod_SOURCES): Added.
4652 (video_mod_CFLAGS): Likewise.
4653 (video_mod_LDFLAGS): Likewise.
4654 (videotest_mod_SOURCES): Likewise.
4655 (videotest_mod_CFLAGS): Likewise.
4656 (videotest_mod_LDFLAGS): Likewise.
4657 (bitmap_mod_SOURCES): Likewise.
4658 (bitmap_mod_CFLAGS): Likewise.
4659 (bitmap_mod_LDFLAGS): Likewise.
4660 (tga_mod_SOURCES): Likewise.
4661 (tga_mod_CFLAGS): Likewise.
4662 (tga_mod_LDFLAGS): Likewise.
4663 (jpeg_mod_SOURCES): Likewise.
4664 (jpeg_mod_CFLAGS): Likewise.
4665 (jpeg_mod_LDFLAGS): Likewise.
4666 (png_mod_SOURCES): Likewise.
4667 (png_mod_CFLAGS): Likewise.
4668 (png_mod_LDFLAGS): Likewise.
4669 (gfxterm_mod_SOURCES): Likewise.
4670 (gfxterm_mod_CFLAGS): Likewise.
4671 (gfxterm_mod_LDFLAGS): Likewise.
4673 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4674 grub/machine/console.h.
4676 2009-01-04 Jerone Young <jerone@gmail.com>
4678 Make on screen instructions clearer
4680 Based on patch created by Jidanni <jidanni@jidanni.org>
4682 * normal/menu.c: print clearer instructions on the screen
4684 2009-01-02 Colin D Bennett <colin@gibibit.com>
4688 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4689 build system and fixed gfxterm.c to work with different sized fonts.
4691 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4693 * configure: Re-generated.
4695 * DISTLIST: Removed font/manager.c.
4697 Added font/font_cmd.c.
4699 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4702 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4704 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4706 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4708 * normal/menu.c: Likewise.
4710 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4711 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4713 * include/grub/font.h: Replaced with new file.
4715 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4716 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4717 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4718 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4719 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4720 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4721 fg_red, fg_green, fg_blue, fg_alpha.
4722 (grub_video_adapter): Removed blit_glyph.
4723 (grub_video_blit_glyph): Removed.
4725 * font/manager.c: Removed file.
4727 * font/font.c: New file.
4729 * font/font_cmd.c: Likewise.
4731 * video/video.c (grub_video_blit_glyph): Removed.
4733 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4734 (grub_video_vbe_map_rgba): Likewise.
4735 (grub_video_vbe_unmap_color_int): Likewise.
4736 (grub_video_vbe_blit_glyph): Removed.
4737 (grub_video_vbe_adapter): Removed blit_glyph.
4739 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4740 (get_pixel): Likewise.
4741 (set_pixel): Likewise.
4743 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4745 * term/gfxterm.c: Adapted to new font engine.
4747 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4749 * term/i386/pc/vga.c: Likewise.
4751 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4753 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4755 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4757 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4759 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4761 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4763 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4765 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4767 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4769 * util/grub.d/00_header.in: Changed to use new loadfont command.
4771 * util/grub-mkconfig_lib.in: Changed font extension.
4773 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4775 * util/getroot.c (grub_util_get_grub_dev): Add support for
4776 /dev/md/dNNpNN style partitionable mdraid devices.
4778 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4780 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4781 at a time limit of the PXE TFTP API correctly.
4782 (grub_pxefs_close): Likewise.
4784 2008-11-29 Robert Millan <rmh@aybabtu.com>
4786 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4787 grub_ata_device_initialize() calls.
4789 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4791 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4793 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4795 2008-11-28 Robert Millan <rmh@aybabtu.com>
4797 Fix build on powerpc-ieee1275. Based on patch created by
4798 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4799 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4800 `kern/ieee1275/mmap.c'.
4801 * include/grub/powerpc/ieee1275/memory.h: New file.
4803 Provide grub-install on coreboot.
4804 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4805 (grub_install_SOURCES): New variable.
4806 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4809 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4811 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4812 to `grub_term_input_t'.
4813 (grub_term_get_current_output): Change return type to
4814 `grub_term_output_t'.
4816 2008-11-22 Robert Millan <rmh@aybabtu.com>
4818 Fix breakage on coreboot due to declaration mismatch.
4819 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4820 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4821 grub_vga_text_cls().
4823 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4824 comments. Avoid copying one more byte than necessary (just in case).
4826 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4827 to 0x200000 (avoids trouble with some OFW implementations, and matches
4828 with the one in Yaboot).
4829 Reported by Manoel Abranches
4831 2008-11-20 Robert Millan <rmh@aybabtu.com>
4833 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4834 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4836 * util/grub-mkconfig_lib.in (grub_warn): New function.
4837 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4838 warnings, to obtain consistent formatting.
4839 * util/grub.d/00_header.in: Likewise.
4840 * util/update-grub_lib.in: Likewise.
4842 * loader/i386/linux.c (allocate_pages): Fix a warning.
4843 Move comment text to `#error' stanza.
4845 Harmonize ieee1275's grub_available_iterate() with the generic
4846 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4847 build problem on i386-ieee1275):
4848 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4849 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4850 parameter `type'. Update all users of this function.
4851 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4852 `kern/ieee1275/mmap.c'.
4853 * kern/ieee1275/init.c
4854 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4856 (grub_machine_mmap_iterate): ... this.
4857 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4858 return type to `grub_err_t'. Update all implementations of this
4860 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4863 Add `lsmmap' command (lists firmware-provided memory map):
4864 * commands/lsmmap.c: New file.
4865 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4866 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4868 * conf/powerpc-ieee1275.rmk: Likewise.
4869 * conf/i386-coreboot.rmk: Likewise.
4870 * conf/i386-ieee1275.rmk: Likewise.
4872 2008-11-19 Robert Millan <rmh@aybabtu.com>
4874 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4875 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4876 constraints to initrd allocation (based on code from
4877 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4878 for Linux to find it.
4880 2008-11-14 Robert Millan <rmh@aybabtu.com>
4882 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4883 order to cope with duplicate slashes.
4885 2008-11-14 Robert Millan <rmh@aybabtu.com>
4887 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4888 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4889 don't want to mess with lower memory, because it is used in the Linux
4892 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4893 an appropriate place in lower memory, between 0x10000 and 0x90000,
4894 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4895 is in our heap (probably as a result of it being corrupted during
4896 decompression). Add #error instance with comment to explain why this
4897 loader isn't currently usable on PC/BIOS.
4899 2008-11-14 Robert Millan <rmh@aybabtu.com>
4901 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4902 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4904 2008-11-12 Robert Millan <rmh@aybabtu.com>
4906 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4908 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4909 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4911 * include/grub/i386/pc/memory.h: ... to here.
4913 2008-11-12 Robert Millan <rmh@aybabtu.com>
4915 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4918 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4919 (grub_console_cur_color, grub_console_real_putchar)
4920 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4921 (grub_console_setcolorstate, grub_console_setcolor)
4922 (grub_console_getcolor): Move from here ...
4923 * include/grub/i386/vga_common.h: ... to here (new file).
4925 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4926 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4928 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4929 `<grub/i386/vga_common.h>'.
4931 2008-11-12 Robert Millan <rmh@aybabtu.com>
4933 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4934 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4935 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4937 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4938 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4940 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4941 grub_console_init() with call to grub_vga_text_init().
4942 (grub_machine_fini): Replace call to
4943 grub_console_fini() with call to grub_vga_text_fini() and
4944 grub_at_keyboard_fini().
4946 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4947 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4948 (grub_console_setcolorstate, grub_console_setcolor)
4949 (grub_console_getcolor): New function prototypes.
4951 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4952 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4953 (grub_vga_text_setcursor): Static-ize.
4954 (grub_vga_text_term): New structure.
4955 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4957 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4958 (grub_console_cur_color, grub_console_standard_color)
4959 (grub_console_normal_color, grub_console_highlight_color)
4960 (map_char, grub_console_putchar, grub_console_getcharwidth)
4961 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4962 (grub_console_getcolor): Move from here ...
4963 * term/i386/vga_common.c: ... to here (same function names).
4965 2008-11-12 Robert Millan <rmh@aybabtu.com>
4967 Use newly-added Multiboot support in coreboot.
4969 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4970 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4972 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4973 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4974 (codestart): Store the MBI in `startup_multiboot_info' when we're
4975 being loaded using Multiboot.
4977 * kern/i386/coreboot/init.c (grub_machine_init): Move
4978 grub_at_keyboard_init() call to beginning of function (useful for
4979 debugging). Call grub_machine_mmap_init() before attempting to use
4980 grub_machine_mmap_iterate().
4981 (grub_lower_mem, grub_upper_mem): Move from here ...
4982 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4985 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4988 2008-11-12 Robert Millan <rmh@aybabtu.com>
4990 Fix a regression introduced by the at_keyboard.mod split. Because
4991 some terminals are default on some platforms and non-default on
4992 others, the first terminal being registered determines which is
4993 going to be default.
4995 * kern/term.c (grub_term_register_input): If this is the first
4996 terminal being registered, set it as the current one.
4997 (grub_term_register_output): Likewise.
4999 * term/efi/console.c (grub_console_init): Do not call
5000 grub_term_set_current_output() or grub_term_set_current_input().
5001 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5002 * term/i386/pc/console.c (grub_console_init): Likewise.
5003 (grub_console_fini): Do not call grub_term_set_current_input()
5004 (but leave grub_term_set_current_output() to restore text mode).
5006 2008-11-10 Robert Millan <rmh@aybabtu.com>
5008 * util/grub.d/00_header.in: Add backward compatibility check for
5009 versions of terminal.mod that don't understand `terminal_input' or
5012 2008-11-09 Robert Millan <rmh@aybabtu.com>
5014 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5015 `terminal_input' / `terminal_output', not `terminal'.
5017 2008-11-08 Robert Millan <rmh@aybabtu.com>
5019 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5020 (DISTCLEANFILES): Add `build_env.mk'.
5022 2008-11-08 Robert Millan <rmh@aybabtu.com>
5024 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5025 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5026 members. Update all users.
5027 * util/console.c (grub_ncurses_term): Split in ...
5028 (grub_ncurses_term_input): ... this, and ...
5029 (grub_ncurses_term_output): ... this. Update all users.
5030 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5032 2008-11-08 Robert Millan <rmh@aybabtu.com>
5034 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5035 (PKGDATA): Add $(pkgdata_SRCDIR).
5036 (pkglib_BUILDDIR): New variable.
5037 (pkgdata_SRCDIR): New variable.
5038 (build_env.mk): New target.
5039 (include_DATA): New variable.
5040 (install-local): Install $(include_DATA) files in $(includedir).
5042 2008-11-07 Pavel Roskin <proski@gnu.org>
5044 * gendistlist.sh: Use C locale for sorting to ensure consistent
5045 output on all systems.
5047 * util/grub.d/00_header.in: Remove incorrect space before
5050 2008-11-07 Robert Millan <rmh@aybabtu.com>
5052 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5054 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5055 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5056 (based on find_multi_boot1_header).
5057 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5058 using find_multi_boot2_header(), and abort if neither Multiboot or
5059 Multiboot headers were found.
5061 2008-11-07 Robert Millan <rmh@aybabtu.com>
5063 Modularize at_keyboard.mod:
5065 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5066 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5067 (at_keyboard_mod_LDFLAGS): New variables.
5069 Actual terminal split:
5071 * include/grub/term.h (struct grub_term): Split in ...
5072 (struct grub_term_input): ... this, and ...
5073 (struct grub_term_output): ... this. Update all users.
5074 (grub_term_set_current): Split in ...
5075 (grub_term_set_current_input): ... this, and ...
5076 (grub_term_set_current_output): ... this.
5077 (grub_term_get_current): Split in ...
5078 (grub_term_get_current_input): ... this, and ...
5079 (grub_term_get_current_output): ... this.
5080 (grub_term_register): Split in ...
5081 (grub_term_register_input): ... this, and ...
5082 (grub_term_register_output): ... this.
5083 (grub_term_unregister): Split in ...
5084 (grub_term_unregister_input): ... this, and ...
5085 (grub_term_unregister_output): ... this.
5086 (grub_term_iterate): Split in ...
5087 (grub_term_iterate_input): ... this, and ...
5088 (grub_term_iterate_output): ... this.
5090 * kern/term.c (grub_term_list): Split in ...
5091 (grub_term_list_input): ... this, and ...
5092 (grub_term_list_output): ... this. Update all users.
5093 (grub_cur_term): Split in ...
5094 (grub_cur_term_input): ... this, and ...
5095 (grub_cur_term_output): ... this. Update all users.
5096 (grub_term_set_current): Split in ...
5097 (grub_term_set_current_input): ... this, and ...
5098 (grub_term_set_current_output): ... this.
5099 (grub_term_get_current): Split in ...
5100 (grub_term_get_current_input): ... this, and ...
5101 (grub_term_get_current_output): ... this.
5102 (grub_term_register): Split in ...
5103 (grub_term_register_input): ... this, and ...
5104 (grub_term_register_output): ... this.
5105 (grub_term_unregister): Split in ...
5106 (grub_term_unregister_input): ... this, and ...
5107 (grub_term_unregister_output): ... this.
5108 (grub_term_iterate): Split in ...
5109 (grub_term_iterate_input): ... this, and ...
5110 (grub_term_iterate_output): ... this.
5112 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5113 a check for input and one for output (and only attempt to get keys
5114 from user when input works).
5116 * util/grub-probe.c (grub_term_get_current): Split in ...
5117 (grub_term_get_current_input): ... this, and ...
5118 (grub_term_get_current_output): ... this.
5119 * util/grub-fstest.c: Likewise.
5120 * util/i386/pc/grub-setup.c: Likewise.
5121 * util/grub-editenv.c: Likewise.
5123 Portability adjustments:
5125 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5126 `term/i386/pc/at_keyboard.c'.
5127 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5128 grub_keyboard_controller_init() (now handled by terminal .init).
5129 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5130 grub_at_keyboard_init().
5131 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5132 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5133 at_keyboard.mod via input terminal interface).
5134 * include/grub/i386/coreboot/console.h: Convert into a stub for
5135 `<grub/i386/pc/console.h>'.
5137 Migrate full terminals to new API:
5139 * term/efi/console.c (grub_console_term): Split into ...
5140 (grub_console_term_input): ... this, and ...
5141 (grub_console_term_output): ... this. Update all users.
5142 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5143 (grub_ofconsole_init): Split into ...
5144 (grub_ofconsole_init_input): ... this, and ...
5145 (grub_ofconsole_init_output): ... this.
5146 (grub_ofconsole_term): Split into ...
5147 (grub_ofconsole_term_input): ... this, and ...
5148 (grub_ofconsole_term_output): ... this. Update all users.
5149 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5150 (grub_serial_term_input): ... this, and ...
5151 (grub_serial_term_output): ... this. Update all users.
5152 * term/i386/pc/console.c (grub_console_term): Split into ...
5153 (grub_console_term_input): ... this, and ...
5154 (grub_console_term_output): ... this. Update all users.
5155 (grub_console_term_input): Only enable it on PC/BIOS platform.
5156 (grub_console_init): Remove grub_keyboard_controller_init() call.
5158 Migrate input terminals to new API:
5160 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5161 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5162 i386-specific anyway).
5163 (grub_console_checkkey): Rename to ...
5164 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5166 (grub_keyboard_controller_orig): New variable.
5167 (grub_console_getkey): Rename to ...
5168 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5170 (grub_keyboard_controller_init): Static-ize. Save original
5171 controller value so that it can be restored ...
5172 (grub_keyboard_controller_fini): ... here (new function).
5173 (grub_at_keyboard_term): New structure.
5174 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5177 Migrate output terminals to new API:
5179 * term/i386/pc/vga.c (grub_vga_term): Change type to
5180 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5181 members. Update all users.
5182 * term/gfxterm.c (grub_video_term): Change type to
5183 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5184 members. Update all users.
5185 * include/grub/i386/pc/console.h (grub_console_checkkey)
5186 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5189 Migrate `terminal' command and userland tools to new API:
5191 * commands/terminal.c (grub_cmd_terminal): Split into ...
5192 (grub_cmd_terminal_input): ... this, and ...
5193 (grub_cmd_terminal_output): ... this.
5194 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5195 `terminal_input' and `terminal_output'.
5196 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5197 `terminal_input' / `terminal_output' API.
5198 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5199 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5200 provided ${GRUB_TERMINAL}, convert it).
5202 2008-11-04 Robert Millan <rmh@aybabtu.com>
5204 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5206 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5208 2008-11-03 Bean <bean123ch@gmail.com>
5210 * kern/elf.c (grub_elf32_load): Revert to previous code.
5211 (grub_elf64_load): Likewise.
5213 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5215 2008-11-01 Robert Millan <rmh@aybabtu.com>
5217 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5218 (TARGET_CPPFLAGS): Likewise.
5219 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5221 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5223 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5225 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5227 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5228 addition of objects until the code is not going to be able to fail.
5230 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5232 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5233 (add a missing NULL check, and correct them by moving the pointer
5234 operations after the actual check).
5236 2008-10-29 Robert Millan <rmh@aybabtu.com>
5238 * util/i386/pc/grub-install.in: Handle empty string as output from
5239 make_system_path_relative_to_its_root().
5241 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5243 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5244 circular metadata worst case scenario. If the metadata is circular
5245 then copy the wrap in place.
5246 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5247 project lib/format_text/layout.h
5248 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5250 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5252 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5254 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5256 * util/update-grub_lib.in: Mention filename in warning message.
5258 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5260 * NEWS: Update for rename of update-grub to grub-mkconfig.
5262 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5264 * util/update-grub_lib.in: Copy to ...
5265 * util/grub-mkconfig_lib.in: ... this. Update all users.
5266 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5267 * util/update-grub.in: Rename to ...
5268 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5269 option. Add `--output' option to allow users to specify the generated
5270 configuration file. Default to stdout.
5271 (update_grub_dir): Rename to ...
5272 (grub_mkconfig_dir): ... this.
5273 (grub_cfg): Default to an empty string.
5274 * conf/common.rmk (update-grub): Rename to ...
5275 (grub-mkconfig): ... this.
5276 (update-grub_lib): Copy to ...
5277 (grub-mkconfig_lib): ... this.
5278 (update-grub_SCRIPTS): Copy to ...
5279 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5280 (update-grub_DATA): Rename to ...
5281 (grub-mkconfig_DATA): ... this.
5283 2008-09-28 Robert Millan <rmh@aybabtu.com>
5285 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5286 to `modified'. Add the real `created' field.
5287 (grub_iso9660_uuid): Use `modified' rather than `created' for
5288 constructing the UUID.
5290 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5292 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5293 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5295 2008-09-28 Bean <bean123ch@gmail.com>
5297 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5298 Thanks to Christian Franke for finding this bug.
5300 2008-09-25 Robert Millan <rmh@aybabtu.com>
5302 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5303 instances of grub_util_get_disk_name() (see previous commit).
5305 2008-09-25 Robert Millan <rmh@aybabtu.com>
5307 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5308 `util/i386/get_disk_name.c'.
5309 * conf/i386-efi.rmk: Likewise.
5310 * conf/x86_64-efi.rmk: Likewise.
5311 * conf/i386-coreboot.rmk: Likewise.
5312 * conf/i386-ieee1275.rmk: Likewise.
5313 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5314 `util/ieee1275/get_disk_name.c'.
5315 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5316 * util/ieee1275/get_disk_name.c: Remove file.
5317 * util/i386/get_disk_name.c: Remove file.
5318 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5319 "hd%d" for device.map entries, rather than using
5320 grub_util_get_disk_name().
5322 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5324 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5326 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5328 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5330 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5332 (GRUB_TERM_PPAGE): Changed to 0x4900.
5334 2008-09-24 Robert Millan <rmh@aybabtu.com>
5336 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5337 macros (they were i386-pc specific).
5338 * include/grub/sparc64/ieee1275/console.h: Likewise.
5339 * include/grub/efi/console.h: Likewise.
5341 2008-09-22 Bean <bean123ch@gmail.com>
5343 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5344 resident and in attribute list.
5346 * include/grub/ntfs.h (BMP_LEN): Removed.
5348 2008-09-22 Bean <bean123ch@gmail.com>
5350 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5351 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5353 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5354 error occurs, as grub_disk_open will call grub_disk_close, which will
5355 call p->close (scsi).
5357 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5359 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5360 (AC_PREREQ): Bumped to 2.59.
5361 (AC_TRY_COMPILE): Replace obsolete macro with ...
5362 (AC_COMPILE_IFELSE): ... this.
5363 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5364 (AC_LINK_IFELSE): ... this.
5366 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5368 * autogen.sh: Add a call to `gendistlist.sh'.
5370 2008-09-19 Christian Franke <franke@computer.org>
5372 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5373 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5374 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5375 Export __enable_execute_stack() to modules.
5376 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5379 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5381 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5384 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5386 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5387 #include <grub/util/hostdisk.h>.
5389 2008-09-08 Robert Millan <rmh@aybabtu.com>
5391 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5392 segments when their filesz is zero (grub_file_read() interprets
5393 zero-size as "read until EOF", which results in memory corruption).
5394 Use `lowest_segment' rather than 0 for calculating the current
5395 segment load address.
5397 2008-09-08 Robert Millan <rmh@aybabtu.com>
5399 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5400 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5401 clobbered useful information.
5403 2008-09-08 Robert Millan <rmh@aybabtu.com>
5405 * include/grub/util/biosdisk.h: Move to ...
5406 * include/grub/util/hostdisk.h: ... here. Update all users.
5407 * util/biosdisk.c: Move to ...
5408 * util/hostdisk.c: ... here. Update all users.
5410 2008-09-07 Robert Millan <rmh@aybabtu.com>
5412 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5414 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5415 and length can be stored directly in the `mbi->mmap_addr' and
5416 `mbi->mmap_length' struct fields.
5418 2008-09-07 Robert Millan <rmh@aybabtu.com>
5420 * conf/i386.rmk: New file. Provides declaration for building
5422 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5423 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5425 Include `conf/i386.mk'.
5426 * conf/i386-efi.rmk: Likewise.
5427 * conf/x86_64-efi.rmk: Likewise.
5428 * conf/i386-coreboot.rmk: Likewise.
5429 * conf/i386-ieee1275.rmk: Likewise.
5431 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5433 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5434 Adds optimization support for BGR based modes.
5436 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5437 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5438 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5439 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5440 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5441 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5442 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5443 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5444 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5445 (grub_video_i386_vbeblit_index_index): Likewise.
5446 (grub_video_i386_vbeblit_replace_directN): Added.
5447 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5448 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5449 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5450 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5451 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5452 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5453 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5454 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5455 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5456 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5457 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5458 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5459 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5461 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5462 (grub_video_i386_vbefill_R8G8B8): Likewise.
5463 (grub_video_i386_vbefill_index): Likewise.
5464 (grub_video_i386_vbefill_direct32): Added.
5465 (grub_video_i386_vbefill_direct24): Likewise.
5466 (grub_video_i386_vbefill_direct16): Likewise.
5467 (grub_video_i386_vbefill_direct8): Likewise.
5469 * include/grub/video.h (grub_video_blit_format): Removed
5470 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5471 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5472 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5473 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5474 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5476 * video/video.c (grub_video_get_blit_format): Updated to use new
5477 blit formats. Added handling for 16 bit color modes.
5479 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5481 (common_blitter): Updated to use new blitters.
5483 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5485 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5486 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5487 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5488 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5489 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5490 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5491 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5492 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5493 (grub_video_i386_vbeblit_index_index): Likewise.
5494 (grub_video_i386_vbeblit_replace_directN): Added.
5495 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5496 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5497 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5498 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5499 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5500 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5501 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5502 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5503 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5504 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5505 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5506 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5507 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5509 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5510 (grub_video_i386_vbefill_R8G8B8): Likewise.
5511 (grub_video_i386_vbefill_index): Likewise.
5512 (grub_video_i386_vbefill_direct32): Added.
5513 (grub_video_i386_vbefill_direct24): Likewise.
5514 (grub_video_i386_vbefill_direct16): Likewise.
5515 (grub_video_i386_vbefill_direct8): Likewise.
5517 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5520 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5523 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5526 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5529 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5531 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5534 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5536 * fs/iso9660.c (grub_iso9660_date): New structure.
5537 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5538 (grub_iso9660_uuid): New function.
5540 2008-09-05 Bean <bean123ch@gmail.com>
5542 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5544 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5545 insensitive bit for names in Win32 and Win32 & DOS namespace.
5547 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5549 * include/grub/types.h (LONG_MAX): Likewise.
5551 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5553 * util/getroot.c: Include <config.h>.
5554 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5555 add support for /dev/md/N devices and handle LVM double dash escaping.
5557 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5559 * config.guess: Update to latest version from config git.
5560 * config.sub: Likewise.
5562 2008-09-03 Robert Millan <rmh@aybabtu.com>
5564 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5565 `disk->total_sectors'.
5567 2008-09-01 Colin D Bennett <colin@gibibit.com>
5569 * include/grub/normal.h: Fixed incorrect comment for
5570 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5572 2008-09-01 Colin D Bennett <colin@gibibit.com>
5574 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5575 values with defines.
5577 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5578 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5579 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5580 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5581 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5582 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5583 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5584 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5585 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5586 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5587 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5588 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5589 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5590 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5591 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5592 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5593 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5594 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5595 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5597 2008-08-31 Robert Millan <rmh@aybabtu.com>
5599 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5601 (grub_multiboot): Fix a few warnings.
5603 2008-08-31 Robert Millan <rmh@aybabtu.com>
5605 * loader/i386/pc/multiboot.c: Update comment not to say that
5606 boot_device support is unimplemented.
5608 2008-08-31 Robert Millan <rmh@aybabtu.com>
5610 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5611 or memory map support are unimplemented.
5613 2008-08-31 Colin D Bennett <colin@gibibit.com>
5615 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5617 2008-08-31 Colin D Bennett <colin@gibibit.com>
5619 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5620 total video memory in 'vbeinfo' output; show color format details for
5623 2008-08-30 Pavel Roskin <proski@gnu.org>
5625 * util/genmoddep.c: Remove for real this time.
5626 * DISTLIST: Remove util/genmoddep.c.
5628 2008-08-30 Robert Millan <rmh@aybabtu.com>
5630 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5631 as required by Multiboot spec (it was already 4-byte aligned, but
5634 2008-08-29 Pavel Roskin <proski@gnu.org>
5636 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5637 * kern/powerpc/ieee1275/startup.S: ... this.
5638 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5639 * DISTLIST: Likewise.
5641 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5642 grub/cpu/kernel.h. Add start label for consistency with other
5643 platforms. Add grub_prefix immediately after start. Add jump
5644 to the code after grub_prefix.
5645 * include/grub/powerpc/kernel.h: Provide valid values for
5646 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5648 2008-08-29 Bean <bean123ch@gmail.com>
5650 * configure.ac: Change host_os to cygwin for mingw.
5651 (asprintf): New check for function.
5653 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5654 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5656 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5657 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5658 sync, sleep and grub_util_get_disk_size for mingw.
5660 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5661 to get size in mingw.
5662 (open_device): Use flag O_BINARY if it's defined.
5663 (find_root_device): Add dummy code for mingw.
5665 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5666 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5667 (get_scsi_disk_name): Return 0 for mingw.
5669 * util/hostfs.c: #include <grub/util/misc.h>.
5670 (grub_hostfs_open): Use "rb" flag to open file, use
5671 grub_util_get_disk_size to get disk size for mingw.
5673 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5674 (asprintf): New function if HAVE_ASPRINTF is not set.
5675 (sync): New function for mingw.
5677 (grub_util_get_disk_size): Likewise.
5679 2008-08-28 Pavel Roskin <proski@gnu.org>
5681 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5684 2008-08-28 Robert Millan <rmh@aybabtu.com>
5686 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5688 2008-08-28 Robert Millan <rmh@aybabtu.com>
5690 Change find_grub_drive() syntax so it doesn't prevent it from
5691 detecting NULL names as errors.
5693 * util/biosdisk.c (find_grub_drive): Move free slot search code
5695 (find_free_slot): ... to here.
5696 (read_device_map): Use find_free_slot() to search for free slots.
5698 2008-08-27 Marco Gerards <marco@gnu.org>
5700 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5701 (scsi_mod_SOURCES): New variable.
5702 (scsi_mod_CFLAGS): Likewise
5703 (scsi_mod_LDFLAGS): Likewise.
5705 * disk/scsi.c: New file.
5707 * include/grub/scsi.h: Likewise.
5709 * include/grub/scsicmd.h: Likewise.
5711 * disk/ata.c: Include <grub/scsi.h>.
5712 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5714 (grub_ata_iterate): Skip ATAPI devices.
5715 (grub_ata_open): Only handle ATAPI devices.
5716 (struct grub_atapi_read): Removed.
5717 (grub_atapi_readsector): Likewise.
5718 (grub_ata_read): No longer handle ATAPI devices.
5719 (grub_ata_write): Likewise.
5720 (grub_atapi_iterate): New function.
5721 (grub_atapi_read): Likewise.
5722 (grub_atapi_write): Likewise.
5723 (grub_atapi_open): Likewise.
5724 (grub_atapi_close): Likewise.
5725 (grub_atapi_dev): New variable.
5726 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5727 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5729 * include/grub/disk.h (enum grub_disk_dev_id): Add
5730 `GRUB_DISK_DEVICE_SCSI_ID'.
5732 2008-08-26 Robert Millan <rmh@aybabtu.com>
5734 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5735 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5738 2008-08-23 Bean <bean123ch@gmail.com>
5740 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5741 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5742 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5743 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5745 (raid5rec_mod_SOURCES): New macro.
5746 (raid5rec_mod_CFLAGS): Likewise.
5747 (raid5rec_mod_LDFLAGS): Likewise.
5748 (raid6rec_mod_SOURCES): Likewise.
5749 (raid6rec_mod_CFLAGS): Likewise.
5750 (raid6rec_mod_LDFLAGS): Likewise.
5751 (mdraid_mod_SOURCES): Likewise.
5752 (mdraid_mod_CFLAGS): Likewise.
5753 (mdraid_mod_LDFLAGS): Likewise.
5754 (dm_nv_mod_SOURCES): Likewise.
5755 (dm_nv_mod_CFLAGS): Likewise.
5756 (dm_nv_mod_LDFLAGS): Likewise.
5758 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5759 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5760 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5762 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5763 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5765 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5767 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5769 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5771 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5773 * disk/raid5_recover.c: New file.
5775 * disk/raid6_recover.c: Likewise.
5777 * disk/mdraid_linux.c: Likewise.
5779 * disk/dmraid_nvidia.c: Likewise.
5781 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5784 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5785 calculate the size of raid device.
5786 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5787 different layout of raid5.
5788 (grub_raid_scan_device): Remove code specific to mdraid.
5789 (grub_raid_list): New variable.
5790 (free_array): New function.
5791 (grub_raid_register): Likewise.
5792 (grub_raid_unregister): Likewise.
5793 (grub_raid_rescan): Likewise.
5794 (GRUB_MOD_INIT): Don't iterate device here.
5795 (GRUB_MOD_FINI): Use free_array to release resource.
5797 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5798 (grub_raid5_recover_func_t): New function variable type.
5799 (grub_raid6_recover_func_t): Likewise.
5800 (grub_raid5_recover_func): New variable.
5801 (grub_raid6_recover_func): Likewise.
5802 (grub_raid_register): New function.
5803 (grub_raid_unregister): Likewise.
5804 (grub_raid_rescan): Likewise.
5805 (grub_raid_block_xor): Likewise.
5807 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5808 (CMD_CRC): New macro.
5810 (read_file): Handle device as well as file.
5811 (cmd_crc): New function.
5812 (fstest): Handle multiple disks.
5813 (options): Remove part, raw and long, add root and diskcount.
5814 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5815 (main): Find the first non option entry and ignore subsequent options,
5816 add handling for the new options, support multiple disks.
5818 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5820 2008-08-23 Bean <bean123ch@gmail.com>
5822 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5824 * genfslist.sh: Ignore kernel.mod.
5826 * genpartmaplist.sh: Likewise.
5828 2008-08-23 Robert Millan <rmh@aybabtu.com>
5830 * util/getroot.c (find_root_device): Skip anything that starts with
5831 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5833 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5835 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5836 * util/grub.d/00_header.in: Allow the administrator to change default
5837 gfxmode via ${GRUB_GFXMODE}.
5839 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5841 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5843 2008-08-21 Robert Millan <rmh@aybabtu.com>
5845 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5847 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5848 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5850 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5852 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5853 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5855 2008-08-19 Robert Millan <rmh@aybabtu.com>
5857 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5858 (struct grub_virtual_screen): Remove `cursor_color'.
5859 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5861 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5863 2008-08-18 Robert Millan <rmh@aybabtu.com>
5865 Unify (identical) linux_normal.c files.
5866 * loader/i386/efi/linux_normal.c: Move from here ...
5867 * loader/linux_normal.c: ... to here. Update all users.
5868 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5869 * loader/i386/ieee1275/linux_normal.c: Likewise.
5871 2008-08-18 Robert Millan <rmh@aybabtu.com>
5873 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5874 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5875 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5876 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5877 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5879 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5880 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5881 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5882 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5883 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5884 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5885 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5886 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5887 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5888 portably using grub_getxy().
5889 Replace `-EFI' with `-bzImage' in boot message.
5891 2008-08-17 Robert Millan <rmh@aybabtu.com>
5893 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5895 2008-08-17 Robert Millan <rmh@aybabtu.com>
5897 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5899 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5900 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5901 (grub_machine_mmap_iterate): New function declaration.
5902 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5904 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5907 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5908 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5909 Move e820 parsing from here ...
5910 * kern/i386/pc/mmap.c: New file.
5911 (grub_machine_mmap_iterate): ... to here.
5913 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5914 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5915 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5916 (grub_available_iterate): Redeclare to return `void', and redeclare
5917 its hook to use grub_uint64_t as addr and size parameters, and rename
5919 (grub_machine_mmap_iterate): ... this. Update all users.
5921 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5922 to make it more readable. Rename to ...
5923 (grub_machine_mmap_iterate): ... this.
5925 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5926 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5927 (grub_multiboot): Allocate an extra region after the payload, and fill
5928 it with a Multiboot memory map. Adjust a.out loader to calculate size
5929 with the extra space.
5930 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5931 with the extra space.
5933 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5935 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5937 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5939 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5940 mdate-sh to the list `find' searches for.
5941 * DISTLIST: Regenerated.
5943 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5945 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5946 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5947 genmoddep.awk, gensymlist.sh.in.
5948 (DISTDIRS): Add bus, docs, hook, lib.
5949 * DISTLIST: Regenerated.
5950 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5952 2008-08-16 Robert Millan <rmh@aybabtu.com>
5954 * disk/raid.c (grub_raid_init): Handle/report errors set by
5955 grub_device_iterate().
5956 * disk/lvm.c (grub_lvm_init): Likewise.
5958 2008-08-15 Bean <bean123ch@gmail.com>
5960 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5962 (datetime_mod_SOURCES): New macro.
5963 (datetime_mod_CFLAGS): Likewise.
5964 (datetime_mod_LDFLAGS): Likewise.
5965 (date_mod_SOURCES): Likewise.
5966 (date_mod_CFLAGS): Likewise.
5967 (date_mod_LDFLAGS): Likewise.
5968 (datehook_mod_SOURCES): Likewise.
5969 (datehook_mod_CFLAGS): Likewise.
5970 (datehook_mod_LDFLAGS): Likewise.
5972 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5974 (datetime_mod_SOURCES): New macro.
5975 (datetime_mod_CFLAGS): Likewise.
5976 (datetime_mod_LDFLAGS): Likewise.
5977 (date_mod_SOURCES): Likewise.
5978 (date_mod_CFLAGS): Likewise.
5979 (date_mod_LDFLAGS): Likewise.
5980 (datehook_mod_SOURCES): Likewise.
5981 (datehook_mod_CFLAGS): Likewise.
5982 (datehook_mod_LDFLAGS): Likewise.
5984 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5986 (datetime_mod_SOURCES): New macro.
5987 (datetime_mod_CFLAGS): Likewise.
5988 (datetime_mod_LDFLAGS): Likewise.
5989 (date_mod_SOURCES): Likewise.
5990 (date_mod_CFLAGS): Likewise.
5991 (date_mod_LDFLAGS): Likewise.
5992 (datehook_mod_SOURCES): Likewise.
5993 (datehook_mod_CFLAGS): Likewise.
5994 (datehook_mod_LDFLAGS): Likewise.
5996 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5998 (datetime_mod_SOURCES): New macro.
5999 (datetime_mod_CFLAGS): Likewise.
6000 (datetime_mod_LDFLAGS): Likewise.
6001 (date_mod_SOURCES): Likewise.
6002 (date_mod_CFLAGS): Likewise.
6003 (date_mod_LDFLAGS): Likewise.
6004 (datehook_mod_SOURCES): Likewise.
6005 (datehook_mod_CFLAGS): Likewise.
6006 (datehook_mod_LDFLAGS): Likewise.
6008 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6010 (datetime_mod_SOURCES): New macro.
6011 (datetime_mod_CFLAGS): Likewise.
6012 (datetime_mod_LDFLAGS): Likewise.
6013 (date_mod_SOURCES): Likewise.
6014 (date_mod_CFLAGS): Likewise.
6015 (date_mod_LDFLAGS): Likewise.
6016 (datehook_mod_SOURCES): Likewise.
6017 (datehook_mod_CFLAGS): Likewise.
6018 (datehook_mod_LDFLAGS): Likewise.
6020 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6022 * commands/date.c: New file.
6024 * hook/datehook.c: Likewise.
6026 * include/grub/lib/datetime.h: Likewise.
6028 * include/grub/i386/cmos.h: Likewise.
6030 * lib/datetime.c: Likewise.
6032 * lib/i386/datetime.c: Likewise.
6034 * lib/efi/datetime.c: Likewise.
6036 2008-08-14 Robert Millan <rmh@aybabtu.com>
6038 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6039 (grub_mkelfimage_SOURCES): New variable.
6040 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6042 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6043 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6044 * conf/powerpc-ieee1275.rmk: Likewise.
6045 * conf/i386-ieee1275.rmk: Likewise.
6047 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6048 * kern/i386/coreboot/init.c: Likewise.
6050 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6051 with `<grub/cpu/kernel.h>'.
6052 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6054 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6055 * kern/i386/coreboot/startup.S: Likewise.
6057 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6058 (GRUB_MOD_GAP): Remove.
6059 * include/grub/powerpc/kernel.h: New file.
6060 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6061 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6062 * include/grub/i386/kernel.h: New file.
6063 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6064 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6065 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6067 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6069 Use --directory when invoking grub_mkimage.
6071 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6072 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6073 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6074 and GRUB_KERNEL_CPU_PREFIX.
6076 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6078 * include/grub/err.h (grub_err_printf): New function prototype.
6079 * util/misc.c (grub_err_printf): New function.
6080 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6082 * kern/err.c (grub_print_error): Use grub_err_printf.
6084 2008-08-13 Robert Millan <rmh@aybabtu.com>
6086 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6088 2008-08-13 Robert Millan <rmh@aybabtu.com>
6090 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6093 2008-08-12 Robert Millan <rmh@aybabtu.com>
6095 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6096 of the relocation code from here ...
6097 (grub_multiboot): ... to here.
6098 (forward_relocator, backward_relocator): Move from here ...
6099 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6100 (grub_multiboot_backward_relocator): ... to here.
6101 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6102 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6103 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6104 (grub_multiboot_forward_relocator_end)
6105 (grub_multiboot_backward_relocator)
6106 (grub_multiboot_backward_relocator_end): New variables.
6108 2008-08-12 Bean <bean123ch@gmail.com>
6110 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6112 2008-08-11 Robert Millan <rmh@aybabtu.com>
6114 * kern/i386/linuxbios/startup.S: Move from here ...
6115 * kern/i386/coreboot/startup.S: ... to here.
6117 * kern/i386/linuxbios/init.c: Move from here ...
6118 * kern/i386/coreboot/init.c: ... to here.
6120 * kern/i386/linuxbios/table.c: Move from here ...
6121 * kern/i386/coreboot/mmap.c: ... to here.
6123 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6125 2008-08-11 Robert Millan <rmh@aybabtu.com>
6127 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6128 errors. Leave it to the upper layer to handle them.
6130 2008-08-09 Christian Franke <franke@computer.org>
6132 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6133 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6134 Install `grub.d/10_windows' only on Cygwin.
6135 * configure.ac: Add subst of `target_os'.
6136 Check `target_os' also before setting TARGET_OBJ2ELF.
6137 Add `--enable-grub-pe2elf'.
6139 2008-08-08 Robert Millan <rmh@aybabtu.com>
6141 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6142 (grub_last_time): Change type to grub_uint64_t.
6143 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6144 (grub_disk_close): Likewise.
6146 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6147 (run_menu): Migrate code from to using grub_get_time_ms().
6149 * util/misc.c (grub_get_time_ms): New function.
6151 2008-08-08 Marco Gerards <marco@gnu.org>
6153 * disk/ata.c (grub_ata_regget): Change return type to
6155 (grub_ata_regget2): Likewise.
6156 (grub_ata_wait_status): New function.
6157 (grub_ata_wait_busy): Removed function, updated all users to use
6158 `grub_ata_wait_status'.
6159 (grub_ata_wait_drq): Likewise.
6160 (grub_ata_cmd): New function.
6161 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6163 (grub_ata_pio_write): Add error handling.
6164 (grub_atapi_identify): Likewise.
6165 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6167 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6168 handling. Actually use the detected registers. Reorder the
6169 detection logic such that it is easier to read.
6170 (grub_ata_pciinit): Do not assign the same ID to each controller.
6171 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6173 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6175 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6177 2008-08-08 Marco Gerards <marco@gnu.org>
6181 2008-08-07 Bean <bean123ch@gmail.com>
6183 * include/grub/x86_64/pci.h: New file.
6185 2008-08-07 Christian Franke <franke@computer.org>
6187 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6188 (TIMER2_GATE): Likewise.
6189 (grub_pit_wait): Add enable/disable of the timer2 gate
6190 bit of port 0x61. This fixes a possible infinite loop.
6192 2008-08-07 Bean <bean123ch@gmail.com>
6194 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6195 kern/i386/tsc.c and kern/i386/pit.c.
6197 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6200 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6203 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6205 2008-08-07 Bean <bean123ch@gmail.com>
6207 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6209 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6211 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6212 multiple inclusion. Add #include <grub/types.h>.
6214 2008-08-06 Christian Franke <franke@computer.org>
6216 * conf/common.rmk: Build and install `10_windows'.
6217 * util/grub.d/10_windows.in: New script.
6219 2008-08-06 Pavel Roskin <proski@gnu.org>
6221 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6223 2008-08-06 Robert Millan <rmh@aybabtu.com>
6225 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6226 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6228 2008-08-06 Bean <bean123ch@gmail.com>
6230 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6231 (grub_pxefs_fs_int): Remove dummy definition.
6232 (grub_pxefs_open): Use data->block_size to store the current block
6234 (grub_pxefs_read): Use block size stored in data->block_size. As the
6235 value of grub_pxe_blksize can be changed after the file is opened.
6237 2008-08-06 Bean <bean123ch@gmail.com>
6239 * fs/i386/pc/pxe.c (curr_file): new variable.
6240 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6241 require the dummy internal file system anymore.
6242 (grub_pxefs_read): Removed.
6243 (grub_pxefs_close): Likewise.
6244 (grub_pxefs_fs_int): Likewise.
6245 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6246 connection when we switch file.
6247 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6249 2008-08-06 Robert Millan <rmh@aybabtu.com>
6251 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6253 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6254 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6256 * kern/i386/halt.c: New file.
6257 * kern/i386/reboot.c: Likewise.
6258 * include/grub/i386/reboot.h: Likewise.
6259 * include/grub/i386/halt.h: Likewise.
6261 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6262 Include `<grub/cpu/halt.h>'.
6263 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6264 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6266 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6267 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6268 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6269 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6270 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6271 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6273 * include/grub/i386/at_keyboard.h: ... to here.
6275 2008-08-05 Robert Millan <rmh@aybabtu.com>
6277 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6278 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6279 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6280 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6281 `kern/generic/millisleep.c'.
6283 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6284 instead of grub_get_rtc().
6285 (grub_tsc_init): Initialize `tsc_boot_time'.
6287 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6288 (grub_machine_init): Use grub_tsc_init() rather than
6289 installing an RTC-based handler via grub_install_get_time_ms().
6291 * kern/i386/pit.c: New file.
6292 * include/grub/i386/pit.h: Likewise.
6294 2008-08-05 Bean <bean123ch@gmail.com>
6296 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6298 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6299 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6300 (pxe_mod_SOURCES): New macro.
6301 (pxe_mod_CFLAGS): Likewise.
6302 (pxe_mod_LDFLAGS): Likewise.
6303 (pxecmd_mod_SOURCES): Likewise.
6304 (pxecmd_mod_CFLAGS): Likewise.
6305 (pxecmd_mod_LDFLAGS): Likewise.
6307 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6308 (grub_pxe_call): Likewise.
6310 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6312 * commands/i386/pc/pxecmd.c: New file.
6314 * fs/i386/pc/pxe.c: Likewise.
6316 * include/grub/i386/pc/pxe.h: Likewise.
6318 2008-08-05 Bean <bean123ch@gmail.com>
6320 * util/console.c (grub_console_cur_color): New variable.
6321 (grub_console_standard_color): Likewise.
6322 (grub_console_normal_color): Likewise.
6323 (grub_console_highlight_color): Likewise.
6324 (color_map): Likewise.
6325 (use_color): Likewise.
6326 (NUM_COLORS): New macro.
6327 (grub_ncurses_setcolorstate): Handle color properly.
6328 (grub_ncurses_setcolor): Don't change color here, just remember the
6329 settings, color will be set in grub_ncurses_setcolorstate.
6330 (grub_ncurses_getcolor): New function.
6331 (grub_ncurses_init): Initialize color pairs.
6332 (grub_ncurses_term): New member grub_ncurses_getcolor.
6334 2008-08-05 Colin D Bennett <colin@gibibit.com>
6336 High resolution timer support. Implemented for x86 CPUs using TSC.
6337 Extracted generic grub_millisleep() so it's linked in only as needed.
6338 This requires a Pentium compatible CPU; if the RDTSC instruction is
6339 not supported, then it falls back on the generic grub_get_time_ms()
6340 implementation that uses the machine's RTC.
6342 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6343 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6344 `kern/generic/millisleep.c'.
6346 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6347 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6349 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6350 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6352 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6354 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6355 `kern/generic/millisleep.c'.
6357 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6359 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6361 * kern/generic/rtc_get_time_ms.c: New file.
6363 * kern/generic/millisleep.c: New file.
6365 * kern/misc.c: Don't include
6366 <kern/time.h> anymore.
6367 (grub_millisleep_generic): Removed.
6369 * commands/sleep.c (grub_interruptible_millisleep): Uses
6370 grub_get_time_ms() instead of grub_get_rtc().
6372 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6374 (grub_cpu_is_cpuid_supported): New inline function.
6375 (grub_cpu_is_tsc_supported): New inline function.
6376 (grub_tsc_init): New function prototype.
6377 (grub_tsc_get_time_ms): New function prototype.
6379 * kern/i386/tsc.c (grub_get_time_ms): New file.
6381 * include/grub/time.h: Include <grub/types.h.
6382 (grub_millisleep_generic): Removed.
6383 (grub_get_time_ms): New prototype.
6384 (grub_install_get_time_ms): New prototype.
6385 (grub_rtc_get_time_ms): New prototype.
6387 * kern/time.c (grub_get_time_ms): New function.
6388 (grub_install_get_time_ms): New function.
6390 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6391 <grub/time.h> anymore.
6392 (grub_millisleep): Removed.
6393 (grub_machine_init): Call grub_tsc_init.
6395 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6396 get_time_ms() implementation.
6398 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6399 (ieee1275_get_time_ms): New function.
6400 (grub_machine_init): Install get_time_ms() implementation.
6402 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6403 (grub_machine_init): Call grub_tsc_init().
6404 (grub_millisleep): Removed.
6406 * kern/ieee1275/init.c (grub_millisleep): Removed.
6407 (grub_machine_init): Install ieee1275_get_time_ms()
6409 (ieee1275_get_time_ms): New function.
6410 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6413 2008-08-05 Marco Gerards <marco@gnu.org>
6415 * disk/ata.c: Include <grub/pci.h>.
6416 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6417 (grub_ata_initialize): Rewritten.
6418 (grub_ata_device_initialize): New function.
6420 2008-08-04 Pavel Roskin <proski@gnu.org>
6422 * kern/main.c: Include grub/mm.h.
6424 2008-08-04 Robert Millan <rmh@aybabtu.com>
6426 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6427 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6428 corruption problem).
6430 2008-08-04 Robert Millan <rmh@aybabtu.com>
6432 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6433 warnings introduced in my last commit.
6435 2008-08-03 Robert Millan <rmh@aybabtu.com>
6437 Make PCI available on all i386 architectures.
6439 * include/grub/i386/pc/pci.h: Move from here ...
6440 * include/grub/i386/pci.h: ... to here.
6442 * include/grub/i386/pc/pci.h: Remove.
6443 * include/grub/i386/efi/pci.h: Remove.
6444 * include/grub/x86_64/efi/pci.h: Remove.
6446 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6449 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6450 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6451 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6453 * conf/i386-ieee1275.rmk: Likewise.
6455 2008-08-03 Robert Millan <rmh@aybabtu.com>
6457 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6458 (grub_console_setcursor): Make it possible to set cursor off.
6460 2008-08-03 Robert Millan <rmh@aybabtu.com>
6462 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6463 of modules instead of assuming which platform provides what.
6464 * util/update-grub.in: Likewise.
6466 2008-08-03 Robert Millan <rmh@aybabtu.com>
6468 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6469 instead of `grub_install_dos_part' to determine whether a drive needs
6470 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6471 because it can be overridden when loading GRUB via Multiboot).
6473 2008-08-02 Robert Millan <rmh@aybabtu.com>
6475 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6477 2008-08-02 Robert Millan <rmh@aybabtu.com>
6479 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6480 of informational grub_dprintf() calls.
6482 2008-08-02 Robert Millan <rmh@aybabtu.com>
6484 * disk/memdisk.c (memdisk_size): Don't initialize.
6485 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6487 * include/grub/i386/pc/kernel.h
6488 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6489 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6490 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6491 (grub_arch_memdisk_size): Remove.
6493 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6494 field (was only used to transfer a constant). Add `type' field to
6495 support multiple module types.
6496 (grub_module_iterate): New function.
6498 * kern/device.c (grub_device_open): Do not hide error messages
6499 when grub_disk_open() fails. Use grub_print_error() instead.
6501 * kern/i386/pc/init.c (grub_arch_modules_addr)
6502 (grub_arch_memdisk_size): Remove functions.
6503 (grub_arch_modules_addr): Return the module address in high memory
6504 (now that it isn't copied anymore).
6506 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6507 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6508 decompression routine (grub_total_module_size already includes that
6509 now). Don't copy modules back to low memory.
6511 * kern/main.c: Include `<grub/mm.h>'.
6512 (grub_load_modules): Split out (and use) ...
6513 (grub_module_iterate): ... this function, which iterates through
6514 module objects and runs a hook.
6515 Comment out grub_mm_init_region() call, as it would cause non-ELF
6516 modules to be overwritten.
6518 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6519 the memdisk image in its own region, make it part of the module list.
6520 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6521 (main): Parse --memdisk|-m option, and pass user-provided path as
6522 parameter to generate_image().
6523 (add_segments): Pass `memdisk_path' down to load_modules().
6524 (load_modules): Embed memdisk image in module section when requested.
6525 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6526 `header.type' instead of `header.offset'.
6528 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6529 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6530 (memdisk_mod_LDFLAGS): New variables.
6531 * conf/i386-coreboot.rmk: Likewise.
6532 * conf/i386-ieee1275.rmk: Likewise.
6534 2008-08-02 Robert Millan <rmh@aybabtu.com>
6536 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6537 (backward_relocator): New variables. Used to allocate and relocate
6538 the payload, respectively.
6539 (grub_multiboot_load_elf32): Load into heap instead of requested
6540 address, install the appropriate relocator code in each bound of
6541 the payload, and set the entry point such that
6542 grub_multiboot_real_boot() will jump to one of them.
6544 * kern/i386/loader.S (grub_multiboot_payload_size)
6545 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6546 (grub_multiboot_payload_entry_offset): New variables.
6547 (grub_multiboot_real_boot): Set cpu context to what the relocator
6548 expects, and jump to the relocator instead of the payload.
6550 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6551 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6552 (grub_multiboot_payload_entry_offset): Export.
6554 2008-08-01 Bean <bean123ch@gmail.com>
6556 * normal/menu_entry.c (editor_getline): Don't return the original
6557 string as result, as it will be released by lexer once it has done
6560 2008-08-01 Robert Millan <rmh@aybabtu.com>
6562 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6563 within menuentries, not before them.
6564 util/grub.d/10_hurd.in: Likewise.
6566 2008-08-01 Bean <bean123ch@gmail.com>
6568 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6569 (bufio_mod_SOURCES): New macro.
6570 (bufio_mod_CFLAGS): Likewise.
6571 (bufio_mod_LDFLAGS): Likewise.
6573 * include/grub/bufio.h: New file.
6575 * io/bufio.c: Likewise.
6577 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6578 (grub_video_reader_png): Use grub_buffile_open to open file.
6580 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6581 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6583 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6584 (grub_video_reader_tga): Use grub_buffile_open to open file.
6586 * font/manager.c: Include <grub/bufio.h>.
6587 (add_font): Use grub_buffile_open to open file.
6589 2008-07-31 Robert Millan <rmh@aybabtu.com>
6591 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6592 ELF segments, use a macro for arbitrarily accessing any of them instead
6593 of preparing a pointer that allows access to one at a time.
6594 (grub_multiboot_load_elf64): Likewise.
6596 2008-07-31 Bean <bean123ch@gmail.com>
6598 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6599 GRUB_KERNEL_MACHINE_DATA_END.
6601 2008-07-30 Robert Millan <rmh@aybabtu.com>
6603 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6604 Increase from 0x50 to 0x60.
6605 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6606 use UUIDs to identify the root drive for them. If that's not
6608 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6609 check, for cross-disk installs.
6611 2008-07-30 Robert Millan <rmh@aybabtu.com>
6613 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6614 is non-empty, use it to set the `prefix' environment variable instead
6615 of the usual approach.
6616 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6617 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6618 environment variable instead of dummy make_install_device().
6620 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6621 (start): Insert a data section, with `grub_prefix' variable.
6622 * kern/i386/linuxbios/startup.S: Likewise.
6624 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6625 New variable reference.
6626 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6627 New macro. Defines offset of `grub_prefix' within startup.S (relative
6629 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6630 section within startup.S (relative to `start').
6631 * include/grub/i386/coreboot/kernel.h: Likewise.
6633 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6634 Overwrite grub_prefix with its contents, at the beginning of the
6636 (main): Understand -p|--prefix.
6638 2008-07-30 Robert Millan <rmh@aybabtu.com>
6640 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6642 2008-07-30 Robert Millan <rmh@aybabtu.com>
6644 * term/i386/pc/vga_text.c (grub_console_cls): Use
6645 grub_console_gotoxy() to go back to beginning of the screen.
6646 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6648 2008-07-29 Christian Franke <franke@computer.org>
6650 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6651 Add conversion of emulated mount points on Cygwin.
6653 2008-07-29 Christian Franke <franke@computer.org>
6655 * util/update-grub.in: Add a check for admin
6657 Remove old `grub.cfg.new' before creation.
6658 Add `-f' to `mv' to handle the different filesystem
6659 semantics of Windows.
6661 2008-07-29 Bean <bean123ch@gmail.com>
6663 * normal/main.c (get_line): Fix buffer overflow bug.
6665 2008-07-28 Robert Millan <rmh@aybabtu.com>
6667 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6668 (struct grub_apple_header): New struct. Describes the layout of
6670 (apple_partition_map_iterate): Check the header magic as well as the
6671 partition magic (which was already being checked).
6673 2008-07-28 Pavel Roskin <proski@gnu.org>
6675 * genmk.rb: Add a warning to the beginning of the output that
6676 it's a generated file and should not be edited.
6678 2008-07-28 Robert Millan <rmh@aybabtu.com>
6680 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6681 with the same number are found, just use issue a warning with
6682 grub_dprintf(), as this error has been reported to be non-fatal.
6684 2008-07-27 Robert Millan <rmh@aybabtu.com>
6686 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6689 2008-07-27 Bean <bean123ch@gmail.com>
6691 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6692 (grub_fat_find_dir): Ignore case when comparing filename.
6694 2008-07-27 Bean <bean123ch@gmail.com>
6696 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6697 smallino, as it's more descriptive, and i8count can be confused with
6698 the other field count.
6699 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6702 2008-07-27 Bean <bean123ch@gmail.com>
6704 * commands/crc.c: New file.
6706 * lib/crc.c: Likewise.
6708 * include/grub/lib/crc.h: Likewise.
6710 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6712 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6713 (hexdump): Move this function to ...
6715 * lib/hexdump.c: ... here.
6717 * include/grub/hexdump.h: Renamed to ...
6719 * include/grub/lib/hexdump.h: ... this.
6721 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6723 * util/grub-editenv.c: Likewise.
6725 * include/envblk.h: Renamed to ...
6727 * include/lib/envblk.h: ... this.
6729 * util/envblk.c: Renamed to ...
6731 * lib/envblk.c: ... this.
6733 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6735 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6736 (pkglib_MODULES): Add crc.mod.
6737 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6738 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6739 (crc_mod_SOURCES): New macro.
6740 (crc_mod_CFLAGS): Likewise.
6741 (crc_mod_LDFLAGS): Likewise.
6743 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6745 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6747 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6749 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6751 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6753 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6755 * commands/help.c: Include <grub/term.h>.
6756 (TERM_WIDTH): Removed. Updated all users.
6758 2008-07-27 Pavel Roskin <proski@gnu.org>
6760 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6761 spurious warnings about a comment within a comment.
6763 2008-07-25 Robert Millan <rmh@aybabtu.com>
6765 * util/getroot.c (find_root_device): Skip devices that match
6766 /dev/dm-[0-9]. This lets the real device be found for any type of
6767 abstraction (LVM, EVMS, RAID..).
6768 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6769 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6770 device is found first, find_root_device() will now skip it.
6772 2008-07-24 Pavel Roskin <proski@gnu.org>
6774 * include/grub/types.h: Use __builtin_bswap32() and
6775 __builtin_bswap64() with gcc 4.3 and newer.
6777 2008-07-24 Christian Franke <franke@computer.org>
6779 * util/i386/pc/grub-install.in: If `--debug' is specified,
6780 pass `--verbose' to grub-setup.
6781 Abort script if make_system_path_relative_to_its_root() fails.
6783 2008-07-24 Bean <bean123ch@gmail.com>
6785 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6786 variable `target_platform' should be `platform'.
6788 2008-07-24 Bean <bean123ch@gmail.com>
6790 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6791 (grub_png_init_fixed_block): New function.
6792 (grub_png_decode_image_data): Handle fixed huffman code compression.
6794 2008-07-24 Bean <bean123ch@gmail.com>
6796 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6797 (grub_pe2elf_SOURCES): New macro.
6798 (CLEANFILES): Add grub-pe2elf.
6800 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6801 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6802 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6803 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6804 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6805 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6806 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6807 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6808 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6809 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6810 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6811 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6812 (GRUB_PE32_DT_FUNCTION): Likewise.
6813 (GRUB_PE32_REL_I386_DIR32): Likewise.
6814 (GRUB_PE32_REL_I386_REL32): Likewise.
6815 (grub_pe32_symbol): New structure.
6816 (grub_pe32_reloc): Likewise.
6818 * util/grub-pe2elf.c: New file.
6820 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6821 start symbol in non pc platform.
6823 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6825 The following patches are from Christian Franke.
6827 * include/grub/dl.h: Remove .previous, gas supports this only
6830 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6831 Remove .type, gas supports this only for ELF format.
6833 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6834 nullbytes in symbol table. This fixes an infinite loop if table is
6837 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6838 TARGET_IMG_LDFLAGS and EXEEXT.
6840 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6841 TARGET_IMG_LDFLAGS_AC.
6842 (grub_CHECK_STACK_ARG_PROBE): New function.
6844 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6846 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6848 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6849 to set TARGET_IMG_LD* accordingly.
6850 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6851 Add call to grub_CHECK_STACK_ARG_PROBE.
6852 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6854 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6856 * genmk.rb: Add EXEEXT to CLEANFILES.
6858 2008-07-23 Robert Millan <rmh@aybabtu.com>
6860 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6861 define the codes for arrows and lines used for the menu).
6862 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6865 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6866 fonts, because the latter are too slow.
6868 2008-07-21 Bean <bean123ch@gmail.com>
6870 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6871 a20. Run keyboard test last, as it will cause macbook to halt.
6873 2008-07-18 Pavel Roskin <proski@gnu.org>
6875 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6876 load foreign architecture modules correctly anyway. Keep
6877 support for loading host architecture modules, whether we
6878 compile them or not.
6880 2008-07-17 Pavel Roskin <proski@gnu.org>
6882 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6883 change target_cpu. The compiler default can mismatch target_cpu
6886 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6887 * kern/efi/efi.c: Likewise.
6889 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6890 target compiler is functional.
6891 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6894 * configure.ac: Default to efi platform for x86_64-apple. Allow
6895 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6896 adjustments from the rest, only do them if target is not
6897 explicitly given. Merge other adjustments with the final sanity
6898 check. Remove an extraneous check for supported CPU. Be
6899 specific which CPU and which platform is not supported.
6901 * configure.ac: Default to pc platform for x86_64.
6903 2008-07-17 Robert Millan <rmh@aybabtu.com>
6905 Partial LinuxBIOS -> Coreboot rename.
6907 * conf/i386-linuxbios.rmk: Renamed to ...
6908 * conf/i386-coreboot.rmk: ... this.
6909 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6910 * configure.ac: Accept "coreboot" as input platform (but maintain
6911 compatibility with "linuxbios").
6912 * include/grub/i386/linuxbios: Renamed to ...
6913 * include/grub/i386/coreboot: ... this.
6915 2008-07-17 Bean <bean123ch@gmail.com>
6917 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6918 (appleldr_mod_SOURCE): New variable.
6919 (appleldr_mod_CFLAGS): Likewise.
6920 (appleldr_mod_LDFLAGS): Likewise.
6921 (pci_mod_SOURCES): Likewise.
6922 (pci_mod_CFLAGS): Likewise.
6923 (pci_mod_LDFLAGS): Likewise.
6924 (lspci_mod_SOURCES): Likewise.
6925 (lspci_mod_CFLAGS): Likewise.
6926 (lspci_mod_LDFLAGS): Likewise.
6928 * conf/x86_64-efi.rmk: New file.
6930 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6932 (grub_efidisk_write): Likewise.
6934 * include/efi/api.h (efi_call_0): New macro.
6935 (efi_call_1): Likewise.
6936 (efi_call_2): Likewise.
6937 (efi_call_3): Likewise.
6938 (efi_call_4): Likewise.
6939 (efi_call_5): Likewise.
6940 (efi_call_6): Likewise.
6942 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6943 grub_rescue_cmd_chainloader.
6945 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6946 (grub_pe32_optional_header): Change some fields based on i386 or
6948 (GRUB_PE32_PE32_MAGIC): Likewise.
6950 * include/grub/efi/uga_draw.h: New file.
6952 * include/grub/elf.h (STN_ABS): New constant.
6953 (R_X86_64_NONE): Relocation constant for x86_64.
6954 (R_X86_64_64): Likewise.
6955 (R_X86_64_PC32): Likewise.
6956 (R_X86_64_GOT32): Likewise.
6957 (R_X86_64_PLT32): Likewise.
6958 (R_X86_64_COPY): Likewise.
6959 (R_X86_64_GLOB_DAT): Likewise.
6960 (R_X86_64_JUMP_SLOT): Likewise.
6961 (R_X86_64_RELATIVE): Likewise.
6962 (R_X86_64_GOTPCREL): Likewise.
6963 (R_X86_64_32): Likewise.
6964 (R_X86_64_32S): Likewise.
6965 (R_X86_64_16): Likewise.
6966 (R_X86_64_PC16): Likewise.
6967 (R_X86_64_8): Likewise.
6968 (R_X86_64_PC8): Likewise.
6970 * include/grub/i386/efi/pci.h: New file.
6972 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6973 Change it value based on platform.
6974 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6975 (GRUB_E820_RAM): Likewise.
6976 (GRUB_E820_RESERVED): Likewise.
6977 (GRUB_E820_ACPI): Likewise.
6978 (GRUB_E820_NVS): Likewise.
6979 (GRUB_E820_EXEC_CODE): Likewise.
6980 (GRUB_E820_MAX_ENTRY): Likewise.
6981 (grub_e820_mmap): New structure.
6982 (linux_kernel_header): Change the efi field according to different
6983 kernel version, also field from linux_kernel_header.
6985 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6987 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6988 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6989 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6990 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6991 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6992 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6993 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6994 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6995 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6996 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6998 * include/grub/x86_64/efi/kernel.h: New file.
7000 * include/grub/x86_64/efi/loader.h: Likewise.
7002 * include/grub/x86_64/efi/machine.h: Likewise.
7004 * include/grub/x86_64/efi/pci.h: Likewise.
7006 * include/grub/x86_64/efi/time.h: Likewise.
7008 * include/grub/x86_64/linux.h: Likewise.
7010 * include/grub/x86_64/setjmp.h: Likewise.
7012 * include/grub/x86_64/time.h: Likewise.
7014 * include/grub/x86_64/types.h: Likewise.
7016 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7017 GRUB_TARGET_SIZEOF_VOID_P.
7019 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7020 (grub_efi_locate_handle): Likewise.
7021 (grub_efi_open_protocol): Likewise.
7022 (grub_efi_set_text_mode): Likewise.
7023 (grub_efi_stall): Likewise.
7024 (grub_exit): Likewise.
7025 (grub_reboot): Likewise.
7026 (grub_halt): Likewise.
7027 (grub_efi_exit_boot_services): Likewise.
7028 (grub_get_rtc): Likewise.
7030 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7031 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7032 (grub_efi_allocate_pages): Wrap efi calls.
7033 (grub_efi_free_pages): Wrap efi calls.
7034 (grub_efi_get_memory_map): Wrap efi calls.
7036 * kern/x86_64/dl.c: New file.
7038 * kern/x86_64/efi/callwrap.S: Likewise.
7040 * kern/x86_64/efi/startup.S: Likewise.
7042 * loader/efi/appleloader.c: Likewise.
7044 * loader/efi/chainloader.c (cmdline): New variable.
7045 (grub_chainloader_unload): Wrap efi calls.
7046 (grub_chainloader_boot): Likewise.
7047 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7050 * loader/efi/chainloader_normal.c (chainloader_command):
7051 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7054 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7056 (grub_e820_add_region): New function.
7057 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7059 (grub_find_video_card): New function.
7060 (grub_linux_setup_video): New function.
7061 (grub_rescue_cmd_linux): Probe for video information.
7063 * normal/x86_64/setjmp.S: New file.
7065 * term/efi/console.c (map_char): New function.
7066 (grub_console_putchar): Map unicode char.
7067 (grub_console_checkkey): Wrap efi calls.
7068 (grub_console_getkey): Likewise.
7069 (grub_console_getwh): Likewise.
7070 (grub_console_gotoxy): Likewise.
7071 (grub_console_cls): Likewise.
7072 (grub_console_setcolorstate): Likewise.
7073 (grub_console_setcursor): Likewise.
7075 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7077 2008-07-16 Pavel Roskin <proski@gnu.org>
7079 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7082 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7083 pointer, not an integer. This fixes a warning and prevents
7084 precision loss on 64-bit systems.
7085 (relocate_addresses): Remove unneeded cast.
7087 2008-07-15 Pavel Roskin <proski@gnu.org>
7089 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7091 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7093 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7094 Fix comparison between signed and unsigned.
7096 * include/grub/i386/ieee1275/console.h: Declare
7097 grub_console_init() and grub_console_fini().
7099 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7100 It's empty and unused.
7102 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7103 beginning to avoid warnings with some compilers.
7105 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7106 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7108 2008-07-14 Pavel Roskin <proski@gnu.org>
7110 * kern/env.c (grub_register_variable_hook): Don't copy empty
7111 string, it leaks memory. Pass "" to grub_env_set(), it should
7112 handle constant strings.
7114 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7115 * commands/cmp.c (grub_cmd_cmp): Likewise.
7116 * kern/dl.c (grub_dl_flush_cache): Likewise.
7117 (grub_dl_load_core): Likewise.
7118 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7119 (grub_elf64_load_phdrs): Likewise.
7121 2008-07-13 Pavel Roskin <proski@gnu.org>
7123 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7124 between signed and unsigned.
7125 (LzmaEnc_Finish): Fix warning about an unused parameter.
7127 2008-07-13 Bean <bean123ch@gmail.com>
7129 * Makefile.in (enable_lzo): New rule.
7131 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7133 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7135 * boot/i386/pc/lnxboot.S: #include <config.h>.
7137 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7138 its value according to the compression algorithm used, lzo or lzma.
7140 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7141 compression algorithm according to configure macro.
7143 * kern/i386/pc/startup.S (codestart): Likewise.
7145 * kern/i386/pc/lzma_decode.S: New file.
7147 * include/grub/lib/LzFind.h: Likewise.
7149 * include/grub/lib/LzHash.h: Likewise.
7151 * include/grub/lib/LzmaDec.h: Likewise.
7153 * include/grub/lib/LzmaEnc.h: Likewise.
7155 * include/grub/lib/LzmaTypes.h: Likewise.
7157 * lib/LzFind.c: Likewise.
7159 * lib/LzmaDec.c: Likewise.
7161 * lib/LzmaEnc.c: Likewise.
7163 2008-07-13 Bean <bean123ch@gmail.com>
7165 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7166 (grub_ext4_extent_header): New structure.
7167 (grub_ext4_extent): Likewise.
7168 (grub_ext4_extent_idx): Likewise.
7169 (grub_ext4_find_leaf): New function.
7170 (grub_ext2_read_block): Handle extents.
7172 2008-07-12 Robert Millan <rmh@aybabtu.com>
7174 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7176 2008-07-11 Robert Millan <rmh@aybabtu.com>
7178 * util/grub.d/40_custom.in: New file. Example on how to add custom
7179 entries to /etc/grub.d.
7180 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7181 40_custom (implicitly, by merging all the grub.d rules).
7183 2008-07-11 Pavel Roskin <proski@gnu.org>
7185 * commands/read.c (grub_getline): Fix invalid memory access.
7186 Don't add newline to the variable value.
7188 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7189 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7190 (serial_hw_get_port): Check validity of the port number.
7191 (grub_cmd_serial): Check return value of serial_hw_get_port().
7193 2008-07-07 Pavel Roskin <proski@gnu.org>
7195 * boot/i386/pc/diskboot.S (notification_string): Replace
7196 "Loading kernel" with just "loading". This is shorter, less
7197 confusing and saves a few bytes for possible future changes.
7199 2008-07-05 Pavel Roskin <proski@gnu.org>
7201 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7202 size for ATAPI devices, they are undefined. Output sector
7203 number in decimal form.
7205 * disk/ata.c: Use named constants for status bits.
7207 2008-07-04 Pavel Roskin <proski@gnu.org>
7209 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7210 grub_addr_t before casting it to the void pointer to fix a
7211 warning. Non-addressable regions are discarded earlier.
7212 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7213 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7214 (check_signature): Don't shadow table_header.
7215 (grub_linuxbios_table_iterate): Cast numeric constants to
7216 grub_linuxbios_table_header_t.
7217 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7220 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7223 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7224 pointer, which can cause warnings. Support 64-bit addresses.
7226 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7227 of sizeof(long). This fixes PowerPC image generation on x86_64.
7229 2008-07-04 Robert Millan <rmh@aybabtu.com>
7231 This fixes a performance issue when pc & gpt partmap iterators
7232 didn't abort iteration even after our hook found what it was
7233 looking for (often causing expensive probes of non-existent drives).
7235 Some callers relied on previous buggy behaviour, since they would
7236 raise an error when their own hooks caused early abortion of its
7239 * kern/device.c (grub_device_open): Improve error message.
7240 * disk/lvm.c (grub_lvm_open): Likewise.
7241 * disk/raid.c (grub_raid_open): Likewise.
7243 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7244 when hook requests it, independently of grub_errno.
7245 (pc_partition_map_probe): Do not fail when find_func() caused
7246 early abortion of pc_partition_map_iterate().
7248 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7249 when hook requests it, independently of grub_errno.
7250 (gpt_partition_map_probe): Do not fail when find_func() caused
7251 early abortion of gpt_partition_map_iterate().
7253 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7254 when hook requests it, independently of grub_errno. Do not fail when
7255 part_map_iterate_hook() caused early abortion of p->iterate().
7257 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7258 when grub_partition_iterate() returned with non-zero.
7260 2008-07-03 Pavel Roskin <proski@gnu.org>
7262 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7263 like we do in grub_ata_pio_read().
7264 (grub_ata_readwrite): Always write individual sectors. Fix the
7265 sector count for the remainder.
7266 (grub_ata_write): Enable writing to ATA devices. Correctly
7267 report error for ATAPI devices.
7269 2008-07-02 Pavel Roskin <proski@gnu.org>
7271 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7274 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7275 for every read sector, we already increment it for the whole
7276 batch. This fixes reading more than 256 sectors at once.
7278 * util/grub-editenv.c (cmd_info): Cast argument to long
7279 explicitly. ptrdiff_t reduces to int on i386.
7281 * util/grub-editenv.c (main): Be specific which parameter is
7284 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7285 (memdisk): Make memdisk_orig_addr a pointer.
7287 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7288 for file offsets, use grub_off_t instead. Fix printf format
7291 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7292 there. Real unexpected warnings should not drown in the noise
7293 about known problems.
7295 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7296 grub_disk_addr_t for memory addresses.
7298 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7299 explicitly to fix a warning.
7301 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7303 * Makefile.in (MODULE_LDFLAGS): New variable.
7304 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7305 the linker accepts --build-id=none.
7306 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7308 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7310 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7311 those in Linux XFS code. Provide a way to access 64-bit parent
7313 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7314 the end of struct grub_xfs_dir_header.
7316 2008-07-02 Bean <bean123ch@gmail.com>
7318 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7319 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7320 and GRUB_IEEE1275_FLAG_NO_ANSI.
7322 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7323 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7324 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7326 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7327 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7329 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7330 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7332 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7333 esc sequence on non ANSI terminal.
7334 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7336 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7339 2008-07-02 Bean <bean123ch@gmail.com>
7341 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7342 (grub_editenv_SOURCES): New variable.
7343 (pkglib_MODULES): Add loadenv.mod.
7344 (loadenv_mod_SOURCES): New variable.
7345 (loadenv_mod_CFLAGS): Likewise.
7346 (loadenv_mod_LDFLAGS): Likewise.
7348 * include/grub/envblk.h: New file.
7350 * util/envblk.c: New file.
7352 * util/grub-editenv.c: New file.
7354 * commands/loadenv.c: New file.
7356 2008-07-01 Pavel Roskin <proski@gnu.org>
7358 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7359 not unsigned char. This fixes warnings and is consistent with
7362 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7364 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7366 * term/tparm.c (analyze): Always set *popcount.
7368 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7369 cast to fix a warning.
7371 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7372 cast to suppress a warning.
7374 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7375 grub_fshelp_read_file() expects.
7377 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7378 write uuid as a 32-bit value in CPU byte order, so declare and
7381 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7382 long if the format specifier expects it.
7383 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7384 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7385 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7386 long to fix a warning.
7387 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7388 grub_dprintf() arguments to fix warnings.
7390 2008-06-30 Pavel Roskin <proski@gnu.org>
7392 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7393 install_bsd_part immediately before core.img is embedded or
7394 modified on disk. This fixes core.img verification if core.img
7397 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7398 core_path to calculate the blocklist.
7399 Patch from Javier MartÃn <lordhabbit@gmail.com>
7401 2008-06-29 Robert Millan <rmh@aybabtu.com>
7403 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7404 block to disk block.
7405 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7406 Patch from Niels Böhm <bitbucket@arcor.de>
7408 2008-06-29 Robert Millan <rmh@aybabtu.com>
7410 * util/update-grub_lib.in (font_path): Search for fonts in
7411 /boot/grub first, which is more likely to be readable (we aren't
7412 deciding where fonts live, just looking for them).
7414 2008-06-26 Pavel Roskin <proski@gnu.org>
7416 * util/biosdisk.c (read_device_map): Don't leave dead map
7417 entries for devices failing stat() check.
7419 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7420 core_path_dev for the core.img path on the target device.
7422 2008-06-26 Robert Millan <rmh@aybabtu.com>
7424 * disk/fs_uuid.c: New file.
7425 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7426 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7427 (fs_uuid_mod_LDFLAGS): New variables.
7428 * include/grub/disk.h (grub_disk_dev_id): Add
7429 `GRUB_DISK_DEVICE_UUID_ID'.
7430 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7431 implement iterate().
7433 2008-06-26 Robert Millan <rmh@aybabtu.com>
7435 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7436 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7437 Linux image includes no initrd.
7439 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7441 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7442 call to resolve the core image location that effectively appended the
7445 2008-06-21 Robert Millan <rmh@aybabtu.com>
7447 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7450 * util/grub.d/10_hurd.in: ... to here ...
7451 * util/grub.d/10_linux.in: ... and here.
7453 2008-06-19 Robert Millan <rmh@aybabtu.com>
7455 * kern/main.c (grub_main): Export `prefix' variable immediately
7456 after it has been set by grub_machine_set_prefix().
7458 2008-06-19 Robert Millan <rmh@aybabtu.com>
7460 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7461 search result when not saving to variable, not the other way around.
7462 When saving to variable, abort iteration as soon as a match is found.
7464 2008-06-19 Robert Millan <rmh@aybabtu.com>
7466 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7467 check for partition that provides /boot/grub. Its logic is flawed,
7468 as it prevents prepare_grub_to_access_device() from being called
7471 2008-06-19 Robert Millan <rmh@aybabtu.com>
7473 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7474 "insmod" command directly when abstraction modules are needed,
7475 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7476 since it had already been processed).
7478 2008-06-19 Pavel Roskin <proski@gnu.org>
7480 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7481 changed. This is needed in case GRUB_LIBDIR changes.
7482 * conf/i386-ieee1275.rmk: Likewise.
7483 * conf/i386-linuxbios.rmk: Likewise.
7484 * conf/i386-pc.rmk: Likewise.
7485 * conf/powerpc-ieee1275.rmk: Likewise.
7487 2008-06-18 Pavel Roskin <proski@gnu.org>
7489 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7490 kernel_elf_symlist.c to symlist.c for consistency with other
7491 architectures. Update all users.
7492 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7494 2008-06-18 Robert Millan <rmh@aybabtu.com>
7496 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7499 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7500 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7501 a RAID device, run setup() for all members independently on whether
7502 LVM abstraction is being used.
7503 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7504 If grub-mkimage has set `*install_dos_part == -2', don't override this
7506 Perform *install_dos_part adjustments independently on whether
7507 we're embedding or not.
7508 Clarify error message when image is too big for embedding.
7509 Remove duplicate *install_dos_part stanza.
7511 2008-06-17 Robert Millan <rmh@aybabtu.com>
7513 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7514 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7516 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7517 values in grub_ofconsole_normal_color and
7518 grub_ofconsole_highlight_color (they're not directly related to
7519 background and foreground).
7520 (grub_ofconsole_setcolorstate): Extract background and foreground
7521 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7523 2008-06-17 Robert Millan <rmh@aybabtu.com>
7525 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7526 /boot/grub for the check in last commit, not /boot (they could be
7527 different partitions).
7529 2008-06-16 Robert Millan <rmh@aybabtu.com>
7531 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7532 asked to setup access for the same partition that provides /boot,
7533 don't bother using UUIDs since our root already has the value we
7536 2008-06-16 Robert Millan <rmh@aybabtu.com>
7538 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7540 Patch from Sven Mueller <sven@debian.org>.
7542 2008-06-16 Robert Millan <rmh@aybabtu.com>
7544 * util/update-grub.in: Check for $EUID instead of $UID.
7545 Reported by Vincent Zweije.
7547 2008-06-16 Bean <bean123ch@gmail.com>
7549 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7550 (grub_ext2_read_block): Likewise.
7551 (grub_ext2_read_inode): Likewise.
7552 (grub_ext2_mount): Likewise.
7553 (grub_ext2_close): Likewise.
7554 (grub_ext3_get_journal): Removed.
7556 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7557 (grub_reiserfs_read_symlink): Likewise.
7558 (grub_reiserfs_mount): Likewise.
7559 (grub_reiserfs_open): Likewise.
7560 (grub_reiserfs_read): Likewise.
7561 (grub_reiserfs_close): Likewise.
7562 (grub_reiserfs_get_journal): Removed.
7564 * fs/fshelp.c (grub_fshelp_read): Removed.
7565 (grub_fshelp_map_block): Likewise.
7567 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7568 (grub_fshelp_journal): Likewise.
7569 (grub_fshelp_read): Likewise.
7570 (grub_fshelp_map_block): Likewise.
7572 2008-06-16 Pavel Roskin <proski@gnu.org>
7574 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7575 floating point anymore.
7576 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7578 2008-06-15 Pavel Roskin <proski@gnu.org>
7580 * commands/ls.c (grub_ls_list_files): Use integer calculations
7581 for human readable format, avoid floating point use.
7582 * kern/misc.c (grub_ftoa): Remove.
7583 (grub_vsprintf): Remove floating point support.
7585 2008-06-15 Robert Millan <rmh@aybabtu.com>
7587 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7589 Reported by Max Vozeler.
7591 2008-06-15 Robert Millan <rmh@aybabtu.com>
7593 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7594 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7596 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7597 the beginning of the prefix.
7599 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7600 It is assumed that if we have a memdisk, grub-mkimage has set
7601 grub_prefix to include the "(memdisk)" drive in it.
7603 2008-06-15 Robert Millan <rmh@aybabtu.com>
7605 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7606 Initialize keyboard controller after registering the terminal, so that
7607 grub_printf() can be called from grub_keyboard_controller_init().
7609 2008-06-15 Robert Millan <rmh@aybabtu.com>
7611 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7612 extent-btree which is written as big endian on disk.
7613 Reported by Alain Greppin <al@chilibi.org>.
7615 2008-06-14 Robert Millan <rmh@aybabtu.com>
7617 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7618 * util/i386/pc/grub-install.in (modules): Likewise.
7620 2008-06-13 Pavel Roskin <proski@gnu.org>
7622 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7624 2008-06-13 Bean <bean123ch@gmail.com>
7626 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7628 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7630 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7631 to indicate sparse block.
7633 2008-06-12 Pavel Roskin <proski@gnu.org>
7635 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7636 number, grub_fshelp_read() does it for us.
7638 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7639 linear disk read with journal translation.
7640 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7641 * include/grub/fshelp.h: Declare grub_fshelp_read().
7643 2008-06-09 Pavel Roskin <proski@gnu.org>
7645 * fs/minix.c (grub_minix_mount): Handle error reading
7648 2008-06-08 Robert Millan <rmh@aybabtu.com>
7650 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7651 don't append the RAID prefix afterwards.
7652 Reported by Clint Adams.
7654 2008-06-08 Robert Millan <rmh@aybabtu.com>
7656 Based on description from Pavel:
7657 * kern/disk.c (grub_disk_check_range): Rename to ...
7658 (grub_disk_adjust_range): ... this. Add a comment explaining the
7659 tasks performed by this function.
7661 2008-06-08 Robert Millan <rmh@aybabtu.com>
7663 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7664 `num_serial' (for consistency with other variables).
7665 (struct grub_ntfs_data): Add `uuid' member.
7666 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7667 (grub_ntfs_uuid): New function.
7668 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7670 2008-06-07 Pavel Roskin <proski@gnu.org>
7672 * util/biosdisk.c (open_device): Revert last change to the
7673 function, it broke installation. The sector needs to be
7674 different dependent on which device is opened.
7676 2008-06-06 Robert Millan <rmh@aybabtu.com>
7678 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7679 rest of GRUB, and breakage doesn't happen if its value were modified.
7681 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7682 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7683 a constant (same value).
7684 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7685 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7687 2008-06-06 Robert Millan <rmh@aybabtu.com>
7689 * util/biosdisk.c (open_device): Do not modify sector offset when
7690 accessing a partition. kern/disk.c already handles this for us.
7692 2008-06-06 Robert Millan <rmh@aybabtu.com>
7694 * util/grub-emu.c (grub_machine_init): Move code in this function from
7696 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7697 segfault in case grub_printf() is called).
7699 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7700 grub_probe. Update all users not to explicitly add it again.
7701 (grub_device): New variable; contains corresponding device for grubdir.
7702 (fs_module, partmap_module, devabstraction_module): Pass
7703 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7706 2008-06-05 Robert Millan <rmh@aybabtu.com>
7708 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7709 is found, print it (same layout as with labels).
7711 2008-06-04 Robert Millan <rmh@aybabtu.com>
7713 * util/biosdisk.c (get_drive): Rename to ...
7714 (find_grub_drive): ... this. Update all users.
7716 (get_os_disk): Rename to ...
7717 (convert_system_partition_to_system_disk): ... this. Update all users.
7719 (find_drive): Rename to ...
7720 (find_system_device): ... this. Update all users.
7722 2008-06-04 Robert Millan <rmh@aybabtu.com>
7724 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7725 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7726 (make_device_map): Likewise.
7728 2008-06-01 Robert Millan <rmh@aybabtu.com>
7730 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7731 before dereferencing it.
7733 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7734 union with fat12/fat16-specific ones. Add some new fields, including
7735 `num_serial' for both versions.
7736 (struct grub_fat_data): Add `uuid' member.
7737 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7738 names. Initialize `data->uuid' using `num_serial'.
7739 (grub_fat_uuid): New function.
7740 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7742 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7743 (grub_reiserfs_uuid): New function.
7744 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7747 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7748 (grub_xfs_uuid): New function.
7749 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7751 2008-06-01 Robert Millan <rmh@aybabtu.com>
7753 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7754 code that is backward compatible with pre-uuid search command.
7756 2008-05-31 Robert Millan <rmh@aybabtu.com>
7758 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7759 floppies after everything else, to ensure floppy drive isn't accessed
7760 unnecessarily (patch from Bean).
7762 2008-05-31 Robert Millan <rmh@aybabtu.com>
7764 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7765 not print device names when we were asked to set a variable.
7767 2008-05-31 Robert Millan <rmh@aybabtu.com>
7769 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7770 using "cursor-on" and "cursor-off" commands (understood at least by
7771 the Open Firmware flavour on OLPC).
7773 2008-05-31 Michael Gorven <michael@gorven.za.net>
7775 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7776 on and off sequences.
7778 2008-05-31 Robert Millan <rmh@aybabtu.com>
7780 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7781 * util/update-grub.in: Likewise.
7783 2008-05-30 Pavel Roskin <proski@gnu.org>
7785 * util/biosdisk.c (linux_find_partition): Simplify logic and
7786 make the code more universal. Keep special processing for
7787 devfs, but use a simple rule for all other devices. If the
7788 device ends with a number, append 'p' and the partition number.
7789 Otherwise, append only the partition number.
7791 2008-05-30 Robert Millan <rmh@aybabtu.com>
7793 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7794 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7795 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7796 the `root' parameter to Linux.
7798 2008-05-30 Robert Millan <rmh@aybabtu.com>
7800 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7801 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7802 --fs_uuid with --fs-uuid.
7803 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7804 all filesystems support them).
7806 2008-05-30 Robert Millan <rmh@aybabtu.com>
7808 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7809 grub_printf() flags, since we're printing in units of 2 bytes.
7811 2008-05-30 Robert Millan <rmh@aybabtu.com>
7813 * util/grub.d/00_header.in: Remove obsolete comment referencing
7814 convert_system_path_to_grub_path().
7815 * util/update-grub.in: Likewise.
7816 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7817 (convert_system_path_to_grub_path): Add a warning message explaining
7818 that this function is deprecated. Rely on is_path_readable_by_grub()
7819 for the readability checks.
7820 (font_path): Use is_path_readable_by_grub() for the readability
7821 check rather than convert_system_path_to_grub_path().
7823 2008-05-30 Robert Millan <rmh@aybabtu.com>
7825 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7826 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7827 converting it first.
7828 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7829 grub.cfg for access to font file, and afterwards call it again to set
7832 2008-05-30 Robert Millan <rmh@aybabtu.com>
7834 * commands/search.c (options): Add --fs_uuid option.
7835 (search_fs_uuid): New function.
7836 (grub_cmd_search): Fix --set argument passing.
7837 Use search_fs_uuid() when requested via --fs_uuid.
7838 (grub_search_init): Update help message.
7839 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7840 and redeclare it as an array of 16-bit words.
7841 (grub_ext2_uuid): New function.
7842 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7843 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7844 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7845 (GRUB_DEVICE_BOOT_UUID): New variables.
7846 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7847 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7849 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7850 just assume `root' variable has the right value.
7851 * util/grub.d/10_linux.in: Likewise.
7852 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7854 (main): Recognise `-t fs_uuid' argument.
7856 2008-05-30 Robert Millan <rmh@aybabtu.com>
7858 * util/biosdisk.c (map): Redefine structure to hold information
7859 about GRUB drive name.
7860 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7862 (call_hook): Remove.
7863 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7864 member. Assume drive has partitions.
7865 (grub_util_biosdisk_open): Access device names via `.device' struct
7867 (open_device): Likewise.
7868 (find_drive): Likewise.
7869 (read_device_map): Adjust map[] usage to match the new struct
7870 definition. Don't check for duplicates (still possible, but not cheap
7872 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7873 (make_device_name): Remove assumption of BIOS-like drive names.
7875 2008-05-30 Pavel Roskin <proski@gnu.org>
7877 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7878 compiling execute.c doesn't need grub_script.tab.h anymore.
7879 (normal/command.c_DEPENDENCIES): Likewise.
7880 (normal/function.c_DEPENDENCIES): Likewise.
7881 * conf/i386-ieee1275.rmk: Likewise.
7882 * conf/i386-linuxbios.rmk: Likewise.
7883 * conf/i386-pc.rmk: Likewise.
7884 * conf/powerpc-ieee1275.rmk: Likewise.
7885 * conf/sparc64-ieee1275.rmk: Likewise.
7887 2008-05-29 Pavel Roskin <proski@gnu.org>
7889 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7890 when scanning metadata for volume group name.
7892 * include/grub/script.h: Don't include grub_script.tab.h. It's
7893 a generated file, which may only be included from the files with
7894 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7895 use union YYSTYPE, as the later allows forward declaration.
7896 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7898 2008-05-29 Robert Millan <rmh@aybabtu.com>
7900 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7901 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7902 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7903 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7906 2008-05-29 Robert Millan <rmh@aybabtu.com>
7908 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7909 control key combinations.
7911 2008-05-29 Robert Millan <rmh@aybabtu.com>
7913 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7914 * util/ieee1275/grub-install.in: ... to here.
7915 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7916 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7917 (grub_install_SOURCES): Likewise.
7919 2008-05-29 Robert Millan <rmh@aybabtu.com>
7921 * fs/affs.c: Update copyright year.
7922 * fs/ext2.c: Likewise.
7923 * fs/fshelp.c: Likewise.
7924 * fs/hfsplus.c: Likewise.
7925 * fs/ntfs.c: Likewise.
7926 * fs/xfs.c: Likewise.
7927 * include/grub/fshelp.h: Likewise.
7928 * util/grub-mkdevicemap.c: Likewise.
7930 2008-05-28 Robert Millan <rmh@aybabtu.com>
7932 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7933 might need to be fatfs to support some firmware implementations
7936 2008-05-28 Robert Millan <rmh@aybabtu.com>
7938 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7940 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7941 (make_device_map): Likewise.
7943 2008-05-20 Bean <bean123ch@gmail.com>
7945 * fs/fshelp.c (grub_fshelp_map_block): New function.
7946 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7947 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7949 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7950 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7951 (grub_fshelp_journal): New structure.
7952 (grub_fshelp_map_block): New function prototype.
7953 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7954 (grub_fshelp_map_block): Likewise.
7956 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7957 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7958 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7959 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7960 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7961 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7962 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7963 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7964 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7965 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7966 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7967 (grub_ext2_sblock): New members for journal support.
7968 (grub_ext3_journal_header): New structure.
7969 (grub_ext3_journal_revoke_header): Likewise.
7970 (grub_ext3_journal_block_tag): Likewise.
7971 (grub_ext3_journal_sblock): Likewise.
7972 (grub_fshelp_node): New members logfile and journal.
7973 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7974 grub_fshelp_map_block to get real block number.
7975 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7977 (grub_ext2_read_inode): Likewise.
7978 (grub_ext3_get_journal): New function.
7979 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7980 (grub_ext2_close): Release memory used by journal.
7982 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7983 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7984 (grub_reiserfs_transaction_header): Renamed to
7985 grub_reiserfs_description_block, replace field data with real_blocks.
7986 (grub_reiserfs_commit_block): New structure.
7987 (grub_reiserfs_data): New member journal.
7988 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7990 (grub_reiserfs_read_symlink): Likewise.
7991 (grub_reiserfs_iterate_dir): Likewise.
7992 (grub_reiserfs_open): Likewise.
7993 (grub_reiserfs_read): Likewise.
7994 (grub_reiserfs_get_journal): New function.
7995 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7996 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7997 using grub_reiserfs_get_journal.
7998 (grub_reiserfs_close): Release memory used by journal.
8000 * fs/affs.c (grub_affs_read_block): Change block type to
8001 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8003 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8005 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8007 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8009 * fs/udf.c (grub_udf_read_block): Change block type to
8010 grub_disk_addr_t. Use type cast to avoid warning.
8012 * fs/xfs.c (grub_xfs_read_block): Likewise.
8014 2008-05-16 Christian Franke <franke@computer.org>
8016 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8017 to ensure that break with ESC will always work.
8018 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8019 Remove ESC from keyboard queue.
8021 2008-05-16 Christian Franke <franke@computer.org>
8023 * util/biosdisk.c: [__CYGWIN__] Add includes.
8024 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8025 (get_os_disk): Move variable declarations to OS specific
8026 parts to avoid warning.
8027 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8028 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8029 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8031 * util/getroot.c: [__CYGWIN__] Add includes.
8032 (strip_extra_slashes): Fix "/" case.
8033 [__CYGWIN__] (get_win32_path): New function.
8034 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8035 [__CYGWIN__] (find_root_device): Disable.
8036 [__CYGWIN__] (get_bootsec_serial): New function.
8037 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8038 [__linux__] (grub_guess_root_device): Add early returns to simplify
8040 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8041 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8042 check for Linux only.
8044 2008-05-15 Bean <bean123ch@gmail.com>
8046 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8047 keyboard hang problem in apple's intel mac.
8049 2008-05-09 Robert Millan <rmh@aybabtu.com>
8051 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8053 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8054 (make_device_map): Likewise.
8055 Reported by Aurelien Jarno <aurel32@debian.org>
8057 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8059 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8060 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8061 (make_device_map): Output entries for xvd type disks.
8063 2008-05-07 Robert Millan <rmh@aybabtu.com>
8065 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8067 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8068 (make_device_map): Likewise.
8069 Reported by Roland Dreier <rdreier@cisco.com>
8071 2008-05-07 Robert Millan <rmh@aybabtu.com>
8073 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8074 grub_strstr() call. Correct a few mistakes in failure path handling.
8076 2008-05-06 Robert Millan <rmh@aybabtu.com>
8078 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8079 Do not print a trailing slash (therefore, the root directory is an
8081 (convert_system_path_to_grub_path): Do not remove trailing slash
8082 from make_system_path_relative_to_its_root() output.
8084 * util/i386/pc/grub-install.in: Add trailing slash to output from
8085 make_system_path_relative_to_its_root().
8087 2008-05-06 Robert Millan <rmh@aybabtu.com>
8089 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8090 ensures that output lines aren't intermangled with those sent to
8091 stderr (via grub_util_info()).
8092 * util/grub-probe.c (grub_refresh): Likewise.
8093 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8095 2008-05-05 Christian Franke <franke@computer.org>
8097 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8098 Add Cygwin device names.
8099 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8100 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8101 (check_device): Return error instead of success on empty name.
8102 (make_device_map): Move label inside linux specific code to
8103 prevent compiler warning.
8105 2008-04-30 Robert Millan <rmh@aybabtu.com>
8107 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8108 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8110 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8112 2008-04-29 Robert Millan <rmh@aybabtu.com>
8114 * docs/grub.cfg: New file (example GRUB configuration).
8116 2008-04-26 Robert Millan <rmh@aybabtu.com>
8118 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8119 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8120 and `disk/ieee1275/nand.c'.
8122 2008-04-25 Bean <bean123ch@gmail.com>
8124 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8127 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8128 change the buffer size to 4096 for cdrom device.
8130 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8132 (_linux_mod_SOURCES): New variable.
8133 (_linux_mod_CFLAGS): Likewise.
8134 (_linux_mod_LDFLAGS): Likewise.
8135 (linux_mod_SOURCES): Likewise.
8136 (linux_mod_CFLAGS): Likewise.
8137 (linux_mod_LDFLAGS): Likewise.
8138 (nand_mod_SOURCES): Likewise.
8139 (nand_mod_CFLAGS): Likewise.
8140 (nand_mod_LDFLAGS): Likewise.
8142 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8143 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8144 type property. (nand device in olpc don't have this property)
8146 * include/grub/disk.h (grub_disk_dev_id): New macro
8147 GRUB_DISK_DEVICE_NAND_ID.
8149 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8151 (grub_rescue_cmd_initrd): Likewise.
8153 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8154 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8155 ofw_cif_handler and ofw_idt, adjust padding number.
8157 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8158 GRUB_MACHINE_IEEE1275 is defined.
8160 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8161 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8163 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8164 on nested function heap_init.
8165 (grub_upper_mem): New variable for i386-ieee1275.
8166 (grub_get_extended_memory): New function for i386-ieee1275.
8167 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8169 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8170 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8173 * loader/i386/ieee1275/linux.c: New file.
8175 * loader/i386/ieee1275/linux_normal.c: New file.
8177 * disk/ieee1275/nand.c: New file.
8179 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8181 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8183 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8185 2008-04-18 Robert Millan <rmh@aybabtu.com>
8187 Restructures early code path on ieee1275 to unify grub_main() as
8188 the first C function that is executed in every platform.
8190 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8191 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8193 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8194 * kern/ieee1275/cmain.c (cmain): Rename to ...
8195 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8196 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8199 2008-04-18 Robert Millan <rmh@aybabtu.com>
8201 * util/update-grub.in: Fix syntax error when setting
8202 `GRUB_PRELOAD_MODULES'.
8203 Reported by Stephane Chazelas <stephane@artesyncp.com>
8205 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8207 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8208 section into account, newer toolchains generate unique build ids
8209 * configure.ac: remove the test for --build-id=none acceptance,
8210 we want build ids to be preserved
8211 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8212 far from other sections don't cause the raw binary images grow
8215 2008-04-15 Robert Millan <rmh@aybabtu.com>
8217 * disk/lvm.c: Update copyright year.
8218 * kern/misc.c: Likewise.
8220 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8222 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8223 there is no memory left for physical volume name.
8225 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8227 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8228 volume name mapping to support bigger than 9 character names properly.
8230 2008-04-13 Robert Millan <rmh@aybabtu.com>
8232 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8233 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8235 2008-04-13 Christian Franke <franke@computer.org>
8237 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8238 to create a floppy emulation boot CD when non emulation mode
8240 Enable Joliet CD filesystem extension.
8242 2008-04-13 Robert Millan <rmh@aybabtu.com>
8244 * kern/misc.c (grub_strncat): Fix off-by-one error.
8245 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8247 * kern/env.c (grub_env_context_close): Clear current context, not
8249 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8251 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8253 2008-04-13 Robert Millan <rmh@aybabtu.com>
8255 Improve robustness when handling LVM.
8257 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8258 (and leave `*p' unmodified).
8259 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8261 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8262 iterating through it.
8263 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8265 (grub_lvm_scan_device): Check the return value (and fail gracefully
8266 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8267 Don't assume `vg->pvs != NULL' when iterating through it.
8269 2008-04-13 Robert Millan <rmh@aybabtu.com>
8271 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8272 * genmk.rb (partmap): New variable.
8273 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8274 (#{partmap}): New target rule.
8275 * genpartmaplist.sh: New file.
8276 * Makefile.in (pkglib_DATA): Add partmap.lst.
8277 (partmap.lst): New target rule.
8278 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8279 modules (including all partition maps), instead of preloading them.
8281 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8283 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8284 `linux-boot-prober' (if installed) to detect other operating
8285 systems which are installed on the computer and add them to
8287 * conf/common.rmk: Build and install 30_os-prober.
8289 2008-04-12 Robert Millan <rmh@aybabtu.com>
8291 * kern/powerpc/ieee1275/init.c: Move from here ...
8292 * kern/ieee1275/init.c: ... to here. Update all users.
8294 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8295 * kern/ieee1275/cmain.c: ... to here. Update all users.
8297 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8298 * kern/ieee1275/openfw.c: ... to here. Update all users.
8300 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8301 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8303 2008-04-10 Pavel Roskin <proski@gnu.org>
8305 * configure.ac: Always use "_cv_" in cache variables for
8306 compatibility with Autoconf 2.62.
8308 2008-04-07 Robert Millan <rmh@aybabtu.com>
8310 Revert grub/machine/init.h addition by Pavel (since it breaks on
8311 i386-ieee1275 and others):
8312 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8313 * util/powerpc/ieee1275/misc.c: Likewise.
8315 2008-04-07 Robert Millan <rmh@aybabtu.com>
8317 * util/grub-probe.c (probe): Improve error message.
8319 2008-04-07 Robert Millan <rmh@aybabtu.com>
8321 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8322 (this prevents the presence of a bogus entry from ruining the whole
8325 2008-04-06 Pavel Roskin <proski@gnu.org>
8327 * util/biosdisk.c: Include grub/util/biosdisk.h.
8328 * util/grub-fstest.c (execute_command): Make static.
8329 * util/grub-mkdevicemap.c (check_device): Likewise.
8330 * util/i386/pc/misc.c: Include grub/machine/init.h.
8331 * util/powerpc/ieee1275/misc.c: Likewise.
8332 * util/lvm.c: Include grub/util/lvm.h.
8333 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8335 * util/raid.c: Include grub/util/raid.h.
8336 (grub_util_getdiskname): Make static.
8338 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8339 grub_hostfs_fini(), as they are called from grub_init_all() and
8340 grub_fini_all() respectively. This fixes an infinite loop in
8341 grub-fstest due to double registration of hostfs.
8342 Reported by Christian Franke <Christian.Franke@t-online.de>
8344 2008-04-05 Pavel Roskin <proski@gnu.org>
8346 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8347 all 8 functions. Otherwise, probe function 0 only.
8349 2008-04-04 Pavel Roskin <proski@gnu.org>
8351 * commands/lspci.c (grub_lspci_iter): Print the bus number
8354 * commands/lspci.c (grub_pci_classes): Fix typos.
8355 (grub_lspci_iter): Don't print func twice. Print vendor ID
8356 before device ID, as it's normally done.
8358 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8359 Fix signedness warnings.
8360 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8362 * util/ieee1275/get_disk_name.c: Include config.h so that
8363 _GNU_SOURCE is defined and getline() is declared. Mark an
8364 unused argument as such. Fix a signedness warning.
8366 2008-04-02 Pavel Roskin <proski@gnu.org>
8368 * genkernsyms.sh.in: Use more robust assignments for CC and
8369 srcdir. Quote srcdir.
8370 * gensymlist.sh.in: Likewise. Assert at the compile time that
8371 the symbol table is not empty.
8373 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8374 * fs/cpio.c (grub_cpio_read): Likewise.
8376 2008-04-01 Pavel Roskin <proski@gnu.org>
8378 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8379 * disk/host.c (grub_host_open): Likewise.
8380 * disk/loopback.c (grub_loopback_open): Likewise.
8381 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8382 disk->id as in disk/host.c, not a multi-character constant.
8384 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8385 later is obsolete, potentially dangerous and sets a bad example.
8386 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8387 * util/misc.c (grub_util_get_image_size): Likewise.
8389 * disk/loopback.c (options): Improve help for "--partitions".
8391 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8392 options to align them with the short options, e.g. "echo -e".
8394 2008-03-31 Bean <bean123ch@gmail.com>
8396 * video/reader/png.c (grub_png_data): New member is_16bit and
8398 (grub_png_decode_image_header): Detect 16 bit png image.
8399 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8400 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8401 (grub_video_reader_png): Release memory occupied by image_data.
8403 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8405 (grub_nfs_mount): Skip the test for sector per cluster.
8407 * include/grub/ntfs.h (MAX_SPC): Removed.
8409 2008-03-31 Bean <bean123ch@gmail.com>
8411 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8412 (grub_probe_SOURCES): Add fs/afs.c.
8413 (grub_fstest_SOURCES): Likewise.
8414 (afs_mod_SOURCES): New variable.
8415 (afs_mod_CFLAGS): Likewise.
8416 (afs_mod_LDFLAGS): Likewise.
8418 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8419 (grub_emu_SOURCES): Likewise.
8421 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8423 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8425 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8427 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8429 * fs/afs.c: New file.
8431 2008-03-30 Pavel Roskin <proski@gnu.org>
8433 * disk/host.c: Include grub/misc.h to fix a warning.
8434 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8435 warnings about implicit declarations.
8437 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8439 * include/grub/i386/loader.h: Change declaration of
8440 grub_linux_boot() to match what grub_loader_set() expects.
8441 * util/getroot.c (grub_guess_root_device): Return const char* to
8443 * util/grub-probe.c (probe): Fix a warning about uninitialized
8444 abstraction_name variable.
8445 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8446 second argument as unused to fix a warning.
8448 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8449 missing grub_error() call.
8451 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8452 2.60 and newer uses it to define datadir.
8454 * commands/sleep.c: Fix warning about implicit declaration.
8455 * disk/memdisk.c: Likewise.
8456 * loader/aout.c: Likewise.
8457 * loader/i386/bsd_normal.c: Likewise.
8458 * util/grub-probe.c: Likewise.
8460 * commands/i386/cpuid.c (has_longmode): Make static.
8461 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8462 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8464 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8465 GDT. This is more robust, as %ds can change.
8466 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8467 calling real_to_prot().
8468 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8470 2008-03-28 Pavel Roskin <proski@gnu.org>
8472 * kern/i386/pc/startup.S: Assert that uncompressed functions
8473 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8474 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8475 code, as they push parts of the code (error handlers) beyond
8476 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8477 code as correctness and size.
8479 2008-03-28 Pavel Roskin <proski@gnu.org>
8481 * kern/i386/pc/startup.S
8482 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8483 data block address to the real mode, keep offset minimal. This
8484 works around a bug in AWARD BIOS on old Athlon systems, which
8485 makes CD detection hang.
8487 2008-03-26 Pavel Roskin <proski@gnu.org>
8489 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8491 * include/grub/normal.h: Add grub_parse_color_name_pair()
8494 2008-03-24 Bean <bean123ch@gmail.com>
8496 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8497 (cd_count): Removed.
8498 (cd_drive): New variable.
8499 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8500 (grub_biosdisk_call_hook): Likewise.
8501 (grub_biosdisk_iterate): Change cdrom detection method.
8502 (grub_biosdisk_open): Replace cd_start with cd_drive.
8503 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8504 detect cdrom device.
8506 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8508 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8509 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8510 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8511 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8512 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8513 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8514 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8515 (grub_biosdisk_cdrp): New structure.
8516 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8518 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8520 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8523 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8526 2008-03-20 Robert Millan <rmh@aybabtu.com>
8528 Remove 2 TiB limit in ata.mod.
8529 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8530 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8531 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8532 grub_uint64_t instead of grub_uint32_t.
8534 2008-03-05 Bean <bean123ch@gmail.com>
8536 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8537 (grub_multiboot): Set boot device.
8539 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8541 2008-03-02 Bean <bean123ch@gmail.com>
8543 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8546 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8548 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8551 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8554 * docs/fdl.texi: New file.
8556 * docs/mdate-sh: New file. Copied from gnulib.
8557 * docs/texinfo.tex: Likewise.
8559 * config.guess: Updated from gnulib.
8560 * install-sh: Likewise.
8562 2008-02-28 Robert Millan <rmh@aybabtu.com>
8564 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8565 (aout_mod_SOURCES): New variable.
8566 (aout_mod_CFLAGS): Likewise.
8567 (aout_mod_LDFLAGS): Likewise.
8569 * conf/i386-ieee1275.rmk: Likewise.
8571 2008-02-28 Robert Millan <rmh@aybabtu.com>
8573 * util/update-grub.in: Reorganise terminal validity check. Accept
8574 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8575 Based on suggestion by Franklin PIAT.
8577 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8579 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8581 * util/getroot.c (grub_util_check_block_device): New function that
8582 returns the given argument if it is a block device and returns NULL else.
8583 * util/grub-probe.c (argument_is_device): New variable.
8584 (probe): Promote device_name from a variable to an argument. Receive
8585 device_name from grub_util_check_block_device() if path is NULL and from
8586 grub_guess_root_device() else. Do not free() device_name anymore.
8587 (options): Introduce new parameter '-d, --device'.
8588 (main): Add description of the new parameter to the help screen.
8589 Rename path variable to argument. Set argument_is_device if the '-d'
8590 option is given. Pass argument to probe() depending on
8593 2008-02-24 Bean <bean123ch@gmail.com>
8595 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8596 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8597 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8598 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8599 (GRUB_ISO9660_VOLDESC_END): Likewise.
8600 (grub_iso9660_primary_voldesc): New member escape.
8601 (grub_iso9660_data): New member joliet.
8602 (grub_iso9660_convert_string): New function.
8603 (grub_iso9660_mount): Detect joliet extension.
8604 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8605 (grub_iso9660_iso9660_label): Likewise.
8607 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8608 (grub_setup_SOURCES): Add fs/udf.c.
8609 (grub_fstest_SOURCES): Likewise.
8610 (udf_mod_SOURCES): New variable.
8611 (udf_mod_CFLAGS): Likewise.
8612 (udf_mod_LDFLAGS): Likewise.
8614 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8615 (grub_emu_SOURCES): Likewise.
8617 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8619 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8621 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8625 * fs/udf.c: New file.
8627 2008-02-24 Robert Millan <rmh@aybabtu.com>
8629 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8630 (normal/lexer.c_DEPENDENCIES): New variables.
8631 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8632 (normal/lexer.c_DEPENDENCIES): Likewise.
8633 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8634 (normal/lexer.c_DEPENDENCIES): Likewise.
8635 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8636 (normal/lexer.c_DEPENDENCIES): Likewise.
8637 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8638 (normal/lexer.c_DEPENDENCIES): Likewise.
8639 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8640 (normal/lexer.c_DEPENDENCIES): Likewise.
8642 2008-02-23 Robert Millan <rmh@aybabtu.com>
8644 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8645 since they were intended to be in hex. This didn't break previously
8646 because of a bug in gpt_partition_map_iterate() (see below).
8648 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8649 when checking the validity of GPT header.
8650 Remove `partno', since it always provides the same information as `i'.
8652 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8654 * include/grub/efi/time.h: Fix a wrong comment.
8656 2008-02-19 Pavel Roskin <proski@gnu.org>
8658 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8661 2008-02-19 Bean <bean123ch@gmail.com>
8663 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8664 (aout_mod_SOURCES): New variable.
8665 (aout_mod_CFLAGS): Likewise.
8666 (aout_mod_LDFLAGS): Likewise.
8667 (_bsd_mod_SOURCES): New variable.
8668 (_bsd_mod_CFLAGS): Likewise.
8669 (_bsd_mod_LDFLAGS): Likewise.
8670 (bsd_mod_SOURCES): New variable.
8671 (bsd_mod_CFLAGS): Likewise.
8672 (bsd_mod_LDFLAGS): Likewise.
8674 * include/grub/aout.h: New file.
8676 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8678 * include/grub/i386/bsd.h: New file.
8680 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8683 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8684 function is called, so that it's possible to change it inside the hook.
8685 (grub_elf64_load): Likewise.
8686 (grub_elf_file): Don't close the file if elf header is not found.
8687 (grub_elf_close): Close the file if grub_elf_file fails (The new
8688 grub_elf_file won't close it).
8689 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8690 (grub_elf64_size): Likewise.
8692 * kern/i386/loader.S (grub_unix_real_boot): New function.
8694 * loader/aout.c: New file.
8696 * loader/i386/bsd.c: New file.
8698 * loader/i386/bsd_normal.c: New file.
8700 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8702 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8703 can test other formats.
8705 2008-02-19 Robert Millan <rmh@aybabtu.com>
8707 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8708 (grub_gpt_partition_type_empty): Redefine with macro from
8709 `<grub/gpt_partition.h>'.
8710 (gpt_partition_map_iterate): Adjust partition type comparison.
8712 Export `entry' as partmap-specific `part.data' struct.
8713 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8715 * include/grub/gpt_partition.h (grub_gpt_header)
8716 (grub_gpt_partentry): ... to here (new file).
8718 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8720 (grub_gpt_partition_type_bios_boot): New const variable, defined
8721 with macro from `<grub/gpt_partition.h>'.
8723 (setup): Replace `first_start' with `embed_region', which keeps
8724 track of the embed region (and is partmap-agnostic).
8726 Replace find_first_partition_start() with find_usable_region(),
8727 which finds a usable region for embedding using partmap-specific
8728 knowledge (supports PC/MSDOS and GPT).
8730 Fix all assumptions that the embed region start at sector 1, using
8731 `embed_region.start' from now on. Similarly, use `embed_region.end'
8732 rather than `first_start' to calculate available size.
8734 In grub_util_info() message, replace "into after the MBR" with an
8735 indication of the specific sector our embed region starts at.
8737 2008-02-19 Robert Millan <rmh@aybabtu.com>
8739 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8740 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8741 `commands/reboot.c'.
8742 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8743 (halt_mod_SOURCES): Likewise.
8744 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8745 (halt_mod_SOURCES): Likewise.
8747 2008-02-17 Christian Franke <franke@computer.org>
8749 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8751 2008-02-17 Robert Millan <rmh@aybabtu.com>
8753 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8754 set `first_start' to 0 for non-PC/MSDOS partition maps.
8756 2008-02-16 Robert Millan <rmh@aybabtu.com>
8758 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8759 do not assume partition map is PC/MSDOS before performing checks that
8760 are specific to that layout.
8762 2008-02-13 Robert Millan <rmh@aybabtu.com>
8764 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8765 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8766 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8768 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8770 * configure.ac: Only a cosmetic change on the handling of
8771 -fno-stack-protector.
8773 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8775 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8776 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8778 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8779 (halt_mod_SOURCES): New variable.
8780 (halt_mod_CFLAGS): Likewise.
8781 (halt_mod_LDFLAGS): Likewise.
8782 (reboot_mod_SOURCES): Likewise.
8783 (reboot_mod_CFLAGS): Likewise.
8784 (reboot_mod_LDFLAGS): Likewise.
8786 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8787 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8789 (halt_mod_SOURCES): Likewise.
8790 (reboot_mod_SOURCES): Likewise.
8792 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8793 commands/i386/pc/reboot.c by commands/reboot.c.
8794 (reboot_mod_SOURCES): Likewise.
8796 * commands/i386/pc/reboot.c: merge this file ...
8798 * commands/ieee1275/reboot.c: ... and this file ...
8800 * commands/reboot.c: ... to this file.
8801 Add some precompiler directive to include the correct header for
8804 * commands/ieee1275/halt.c: move this file ...
8806 * commands/halt.c: ... to here.
8807 Add some precompiler directive to include the correct header for
8810 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8811 (grub_halt): Likewise.
8813 * kern/efi/efi.c (grub_reboot): New function.
8814 (grub_halt): Likewise.
8816 2008-02-12 Robert Millan <rmh@aybabtu.com>
8818 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8819 /dev (like it is done for /dev/mapper). This doesn't provide support
8820 for EVMS, but at least it is now easy to identify the problem when it
8823 2008-02-11 Robert Millan <rmh@aybabtu.com>
8825 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8826 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8827 comparing it with -1, not 0.
8829 2008-02-10 Robert Millan <rmh@aybabtu.com>
8831 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8833 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8834 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8836 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8837 `disk/lvm.c' to the end of the list.
8838 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8839 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8841 2008-02-10 Robert Millan <rmh@aybabtu.com>
8843 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8844 grub_print_error() instead. This will let user know why we're entering
8846 Based on suggestions from Sam Morris.
8848 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8850 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8851 on remaining N args, instead of "--" arg N times.
8853 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8855 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8856 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8857 pattern for unknown glyphs.
8859 2008-02-09 Robert Millan <rmh@aybabtu.com>
8861 * configure.ac: Probe for `help2man'.
8862 * Makefile.in (builddir): New variable.
8863 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8864 or otherwise add a few flags/options to it.
8865 (install-local): For every executable utility or script that is
8866 installed, invoke $(HELP2MAN) to install a manpage based on --help
8869 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8870 that it doesn't prevent --help from working in build tree.
8872 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8873 with `bug-grub@gnu.org'.
8874 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8875 * util/update-grub.in (usage): New function.
8876 Implement proper argument check, with support for --help and --version
8877 (as well as existing -y).
8879 2008-02-09 Christian Franke <franke@computer.org>
8881 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8882 avoid overwriting previous output.
8883 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8885 2008-02-09 Robert Millan <rmh@aybabtu.com>
8887 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8890 2008-02-09 Robert Millan <rmh@aybabtu.com>
8892 * commands/sleep.c: New file.
8893 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8894 (sleep_mod_SOURCES): New variable.
8895 (sleep_mod_CFLAGS): Likewise.
8896 (sleep_mod_LDFLAGS): Likewise.
8898 2008-02-09 Robert Millan <rmh@aybabtu.com>
8900 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8901 situations in which we can deduce the RAID size and the superblock
8904 2008-02-09 Robert Millan <rmh@aybabtu.com>
8906 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8907 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8908 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8910 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8911 and return a grub_diskmemberlist_t composed of physical array members.
8912 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8914 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8916 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8917 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8918 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8920 * util/grub-probe.c (probe): Move partmap probing code from here ...
8921 (probe_partmap): ... to here.
8922 (probe): Use probe_partmap() once for the disk we're probing, and
8923 additionally, when such disk contains a memberlist() struct member,
8924 once for each disk that is contained in the structure returned by
8927 2008-02-09 Robert Millan <rmh@aybabtu.com>
8929 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8930 environment variable to 'all' in order to obtain debug output from
8932 * util/i386/pc/grub-setup.c (main): Likewise.
8934 2008-02-08 Robert Millan <rmh@aybabtu.com>
8936 * disk/raid.c (grub_raid_scan_device): Check for
8937 `array->device[sb.this_disk.number]' rather than for
8938 `array->device[sb.this_disk.number]->name', since the latter is not
8939 guaranteed to be accessible.
8941 2008-02-08 Robert Millan <rmh@aybabtu.com>
8943 * disk/raid.c: Update copyright.
8944 * fs/cpio.c: Likewise.
8945 * include/grub/raid.h: Likewise.
8946 * loader/i386/pc/multiboot.c: Likewise.
8947 * util/hostfs.c: Likewise.
8949 2008-02-08 Robert Millan <rmh@aybabtu.com>
8951 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8952 to a grub_disk_t array.
8953 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8955 (grub_raid_scan_device): Replace `device[x].name' accesses with
8956 `device[x]->name'. Simplify initialization of `array->device[x]'.
8958 2008-02-08 Robert Millan <rmh@aybabtu.com>
8960 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8961 grub_dprintf() calls.
8962 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8965 2008-02-07 Christian Franke <franke@computer.org>
8967 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8968 instead of fseek and ftell to support large files.
8969 (grub_hostfs_read): Likewise.
8971 2008-02-07 Robert Millan <rmh@aybabtu.com>
8973 Patch from Jeroen Dekkers.
8974 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8975 failure, since successfully reading all array members might not be
8978 2008-02-06 Robert Millan <rmh@aybabtu.com>
8980 * util/grub-probe.c (probe): Simplify partmap probing (with the
8981 assumption that the first word up to the underscore equals to
8984 2008-02-06 Christian Franke <franke@computer.org>
8986 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8987 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8988 last block of a cpio or tar stream.
8989 Check for "TRAILER!!!" instead of any empty data
8990 block to detect last block of a cpio stream.
8991 (grub_cpio_dir): Fix constness of variable np.
8992 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8993 cpio or tar trailer is detected. This fixes a crash
8994 on open of a non existing file.
8996 2008-02-05 Bean <bean123ch@gmail.com>
8998 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9000 (grub_multiboot_load_elf64): Likewise.
9001 (grub_multiboot): Initialize mbi structure.
9003 * util/grub-fstest.c: Don't include unused header file script.h.
9005 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9007 (grub_fstest_SOURCES): Likewise.
9009 2008-02-05 Robert Millan <rmh@aybabtu.com>
9011 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9012 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9013 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9014 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9016 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9017 (translation_table): Replace hardcoded values with macros
9018 provided by `<grub/term.h>'.
9020 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9021 (keyboard_map): Correct/add a few values, with macros provided
9023 (keyboard_map_shift): Zero values that don't differ from their
9024 `keyboard_map' equivalents.
9025 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9026 Discard the second scan code that is always sent by Caps lock.
9027 Only use `keyboard_map_shift' when it provides a non-zero value,
9028 otherwise fallback to `keyboard_map'.
9030 2008-02-04 Bean <bean123ch@gmail.com>
9032 * Makefile.in (enable_grub_fstest): New variable.
9034 * conf/common.rmk (grub_fstest_init.lst): New rule.
9035 (grub_fstest_init.h): Likewise.
9036 (grub_fstest_init.c): Likewise.
9037 (util/grub-fstest.c_DEPENDENCIES): New variable.
9038 (grub_fstest_SOURCES): Likewise.
9040 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9042 * util/grub-fstest.c: New file.
9044 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9046 Make grub-setup handle a separate root device.
9048 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9049 so that the root device can be compared with the destination
9051 When embedding the core image, if the root and destination devices
9052 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9054 When not embedding, set ROOT_DRIVE to 0xFF.
9056 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9058 Add support for having a grub directory in a different drive. This
9059 is still only the data handling part.
9061 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9062 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9063 (grub_root_drive): New variable.
9065 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9066 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9067 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9070 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9072 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9074 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9076 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9077 is bogus, because PXE booting does not specify any drive
9080 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9081 am not sure if this is really correct.
9083 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9084 is always identical to the boot drive when booting from a CD.
9086 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9088 (root_drive): New variable.
9089 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9090 (setup_sectors): Push %dx right after popping it, because %dh will
9092 (copy_buffer): Restore %dx.
9094 2008-02-03 Robert Millan <rmh@aybabtu.com>
9096 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9097 use `cdboot.img' for cdrom images.
9099 2008-02-03 Robert Millan <rmh@aybabtu.com>
9101 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9102 only setup gfxterm when `font' command has succeeded.
9104 2008-02-03 Robert Millan <rmh@aybabtu.com>
9106 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9107 (grub_rescue_cmd_multiboot_loader)
9108 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9110 2008-02-03 Pavel Roskin <proski@gnu.org>
9112 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9113 %edx and %esi from stack only after grub_gate_a20() is called.
9114 grub_gate_a20() clobbers %edx.
9116 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9118 * configure.ac (AC_INIT): Bumped to 1.96.
9120 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9121 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9122 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9123 video/readers/png.c.
9125 2008-02-03 Bean <bean123ch@gmail.com>
9127 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9128 (cdboot_img_SOURCES): New variable.
9129 (cdboot_img_ASFLAGS): New variable.
9130 (cdboot_img_LDFLAGS): New variable.
9132 * boot/i386/pc/cdboot.S: New file.
9134 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9135 (cd_count): Likewise.
9136 (grub_biosdisk_get_drive): Add support for cd device.
9137 (grub_biosdisk_call_hook): Likewise.
9138 (grub_biosdisk_iterate): Likewise.
9139 (grub_biosdisk_open): Likewise.
9140 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9141 (grub_biosdisk_rw): Support reading from cd device.
9142 (GRUB_MOD_INIT): Iterate cd devices.
9144 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9145 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9146 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9148 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9150 2008-02-02 Robert Millan <rmh@aybabtu.com>
9152 * commands/read.c: New file.
9153 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9154 (read_mod_SOURCES): New variable.
9155 (read_mod_CFLAGS): Likewise.
9156 (read_mod_LDFLAGS): Likewise.
9158 2008-02-02 Robert Millan <rmh@aybabtu.com>
9160 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9161 determining whether menu has to be displayed.
9163 2008-02-02 Marco Gerards <marco@gnu.org>
9165 * bus/pci.c: New file.
9167 * include/grub/pci.h: Likewise.
9169 * include/grub/i386/pc/pci.h: Likewise.
9171 * commands/lspci.c: Likewise.
9173 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9175 (pci_mod_SOURCES): New variable.
9176 (pci_mod_CFLAGS): Likewise.
9177 (pci_mod_LDFLAGS): Likewise.
9178 (lspci_mod_SOURCES): Likewise.
9179 (lspci_mod_CFLAGS): Likewise.
9180 (lspci_mod_LDFLAGS): Likewise.
9182 2008-02-02 Bean <bean123ch@gmail.com>
9184 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9185 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9187 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9188 (grub_xfs_btree_node): New structure.
9189 (grub_xfs_btree_root): New structure.
9190 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9191 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9192 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9193 (GRUB_XFS_EXTENT_SIZE): Likewise.
9194 (grub_xfs_read_block): Support btree format type.
9195 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9196 Use directory block as basic unit.
9198 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9200 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9201 __attribute__ ((__regparm__ (1))).
9203 2008-02-01 Robert Millan <rmh@aybabtu.com>
9205 Correct a mistake in previous commit.
9207 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9209 (normal/command.c_DEPENDENCIES): New variable.
9211 2008-02-01 Robert Millan <rmh@aybabtu.com>
9213 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9215 (normal/command.c_DEPENDENCIES): New variable.
9216 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9217 * conf/i386-ieee1275.rmk: Likewise.
9218 * conf/i386-linuxbios.rmk: Likewise.
9219 * conf/i386-pc.rmk: Likewise.
9220 * conf/sparc64-ieee1275.rmk: Likewise.
9221 * conf/powerpc-ieee1275.rmk: Likewise.
9222 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9224 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9226 2008-02-01 Robert Millan <rmh@aybabtu.com>
9228 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9229 call at beginning of function.
9231 2008-01-31 Pavel Roskin <proski@gnu.org>
9233 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9234 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9235 (grub_mkrescue_SOURCES): Likewise.
9236 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9238 2008-01-30 Robert Millan <rmh@aybabtu.com>
9240 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9241 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9242 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9243 (grub_probe_SOURCES): ... to here.
9245 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9246 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9247 * conf/i386-ieee1275.rmk: Likewise.
9248 * conf/i386-linuxbios.rmk: Likewise.
9249 * conf/powerpc-ieee1275.rmk: Likewise.
9251 2008-01-30 Tristan Gingold <gingold@free.fr>
9253 * kern/rescue.c: Silently accept empty lines.
9255 2008-01-29 Bean <bean123ch@gmail.com>
9257 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9258 (real_code_2): Code cleanup and change comment style.
9259 (move_memory): Avoid using 32-bit address mode.
9261 2008-01-29 Bean <bean123ch@gmail.com>
9263 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9264 (png_mod_SOURCES): New variable.
9265 (png_mod_CFLAGS): Likewise.
9266 (png_mod_LDFLAGS): Likewise.
9268 * video/readers/png.c: New file.
9270 2008-01-28 Robert Millan <rmh@aybabtu.com>
9272 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9273 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9274 `ifndef GRUB_MOD_GAP' hack.
9275 * util/elf/grub-mkimage.c (add_segments): Likewise.
9277 2008-01-27 Robert Millan <rmh@aybabtu.com>
9279 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9280 `GRUB_MOD_GAP' for platforms in which it's not defined.
9281 * util/elf/grub-mkimage.c (add_segments): Likewise.
9283 2008-01-27 Robert Millan <rmh@aybabtu.com>
9285 Get grub-emu to build again (including parallel builds).
9287 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9289 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9290 (normal/execute.c_DEPENDENCIES): ... this, ...
9291 (grub-emu_DEPENDENCIES): ... and this.
9293 * conf/i386-efi.rmk: Likewise.
9294 * conf/i386-linuxbios.rmk: Likewise.
9295 * conf/i386-ieee1275.rmk: Likewise.
9296 * conf/powerpc-ieee1275.rmk: Likewise.
9297 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9299 2008-01-27 Robert Millan <rmh@aybabtu.com>
9301 * NEWS: Add a few items.
9303 2008-01-27 Robert Millan <rmh@aybabtu.com>
9305 Fix parallel builds with grub-emu. Based on earlier commit for
9306 grub-probe and grub-setup.
9308 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9309 (util/grub-emu.c_DEPENDENCIES): ... this.
9310 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9311 (util/grub-emu.c_DEPENDENCIES): ... this.
9312 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9313 (util/grub-emu.c_DEPENDENCIES): ... this.
9314 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9315 (util/grub-emu.c_DEPENDENCIES): ... this.
9316 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9317 (util/grub-emu.c_DEPENDENCIES): ... this.
9319 2008-01-27 Pavel Roskin <proski@gnu.org>
9321 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9322 to create a gap between _end and the modules added to the image
9323 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9324 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9325 * util/elf/grub-mkimage.c (add_segments): Likewise.
9327 2008-01-26 Pavel Roskin <proski@gnu.org>
9329 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9330 just return an error.
9332 2008-01-26 Bean <bean123ch@gmail.com>
9334 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9335 (grub_reiserfs_get_item): Save offset of the next item.
9336 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9338 2008-01-25 Robert Millan <rmh@aybabtu.com>
9340 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9341 make all filesystem sources appear together (possibly fixing omissions
9343 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9344 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9345 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9346 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9348 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9350 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9351 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9352 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9353 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9355 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9356 (probe): Add a sanity check to make sure of our ability to read
9357 requested files when probing for filesystem type.
9359 * genmk.rb: Update copyright year (2007).
9361 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9362 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9363 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9364 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9365 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9366 : Remove function prototypes.
9368 2008-01-25 Robert Millan <rmh@aybabtu.com>
9370 Revert my previous commits (based on wrong assumption of how grub_errno
9373 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9374 * kern/file.c (grub_file_open): Likewise.
9376 2008-01-24 Pavel Roskin <proski@gnu.org>
9378 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9379 that hang if GRUB tries to setup colors.
9380 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9381 colors for firmwares that don't support it.
9382 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9383 Recognize Open Hack'Ware, set flags to work around its
9386 2008-01-24 Robert Millan <rmh@aybabtu.com>
9388 * kern/file.c (grub_file_open): Do not account previous failures of
9389 unrelated functions when grub_errno is checked for.
9390 Reported by Oleg Strikov.
9392 2008-01-24 Bean <bean123ch@gmail.com>
9394 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9395 (grub_ufs_sblock): New member volume name.
9396 (grub_ufs_find_file): Fix string copy bug.
9397 (grub_ufs_label): Implement this function properly.
9399 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9400 (grub_hfs_iterate_records): Use the correct file number for extents
9401 and catalog file. Fix problem in next index calculation.
9402 (grub_hfs_find_node): Replace recursive function call with loop.
9403 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9405 2008-01-23 Robert Millan <rmh@aybabtu.com>
9407 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9408 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9409 (grub_multiboot2_real_boot): New function prototype.
9411 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9412 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9414 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9415 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9417 2008-01-23 Robert Millan <rmh@aybabtu.com>
9419 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9420 #ifdef'ed out grub_printf().
9422 2008-01-23 Robert Millan <rmh@aybabtu.com>
9424 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9425 grub_dprintf calls, since they make "debug=all" mode unusable.
9426 (grub_console_checkkey): Likewise.
9428 2008-01-23 Robert Millan <rmh@aybabtu.com>
9430 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9431 `term/i386/pc/at_keyboard.c'.
9432 (pkglib_MODULES): Add `serial.mod'.
9433 (serial_mod_SOURCES): New variable.
9434 (serial_mod_CFLAGS): Likewise.
9435 (serial_mod_LDFLAGS): Likewise.
9437 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9438 `<grub/powerpc/ieee1275/console.h>'.
9439 (grub_keyboard_controller_init): New function prototype.
9440 (grub_console_checkkey): Likewise.
9441 (grub_console_getkey): Likewise.
9443 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9446 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9447 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9449 2008-01-23 Robert Millan <rmh@aybabtu.com>
9451 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9452 present, "(memdisk)/boot/grub" becomes the default prefix.
9454 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9455 a memdisk tarball with all the modules. Add --overlay=DIR option that
9456 allows users to overlay additional files into the image.
9458 2008-01-23 Robert Millan <rmh@aybabtu.com>
9460 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9461 and `machine/memory.h'.
9462 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9463 (_multiboot_mod_SOURCES): New variable.
9464 (_multiboot_mod_CFLAGS): Likewise.
9465 (_multiboot_mod_LDFLAGS): Likewise.
9466 (multiboot_mod_SOURCES): Likewise.
9467 (multiboot_mod_CFLAGS): Likewise.
9468 (multiboot_mod_LDFLAGS): Likewise.
9470 * include/grub/i386/ieee1275/loader.h: New file.
9472 * include/grub/i386/ieee1275/machine.h: Likewise.
9474 * include/grub/i386/ieee1275/memory.h: Likewise.
9476 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9477 variable declaration.
9478 (grub_os_area_size): Likewise.
9480 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9481 (grub_lower_mem, grub_upper_mem): New variables.
9482 (grub_stop_floppy): New function (just to make
9483 grub_multiboot2_real_boot() happy).
9485 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9486 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9487 (grub_stop): New function.
9488 Include `"../realmode.S"' and `"../loader.S"'.
9490 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9491 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9493 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9494 rely on grub_multiboot2_real_boot() for final boot.
9496 2008-01-22 Robert Millan <rmh@aybabtu.com>
9498 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9499 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9500 device that doesn't look like an SD card.
9501 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9502 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9503 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9504 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9507 2008-01-22 Robert Millan <rmh@aybabtu.com>
9509 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9510 avoid claiming over our own code.
9512 2008-01-22 Bean <bean123ch@gmail.com>
9514 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9515 (jpeg_mod_SOURCES): New variable.
9516 (jpeg_mod_CFLAGS): Likewise.
9517 (jpeg_mod_LDFLAGS): Likewise.
9519 * video/readers/jpeg.c : New file.
9521 2008-01-22 Bean <bean123ch@gmail.com>
9523 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9524 there are no more items.
9526 2008-01-21 Robert Millan <rmh@aybabtu.com>
9528 * kern/mm.c (grub_mm_init_region): Improve debug message.
9530 2008-01-21 Robert Millan <rmh@aybabtu.com>
9532 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9533 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9535 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9537 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9538 Indicates start of upper memory.
9539 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9540 (generate_image): Abort when image size is big enough to corrupt
9543 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9544 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9545 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9546 instead of hardcoding 0xA0000.
9547 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9548 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9549 instead of hardcoding 0xA0000.
9551 2008-01-21 Robert Millan <rmh@aybabtu.com>
9553 * disk/memdisk.c (memdisk_size): New variable.
9554 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9556 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9557 image to dynamic memory.
9558 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9559 `memdisk_size'. Free memdisk block.
9561 2008-01-21 Robert Millan <rmh@aybabtu.com>
9563 Fix detection of very small filesystems (like tar).
9565 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9566 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9567 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9568 a problem with this disk).
9570 2008-01-21 Robert Millan <rmh@aybabtu.com>
9572 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9573 on grub_biosdisk_rw_standard() error.
9575 2008-01-21 Robert Millan <rmh@aybabtu.com>
9577 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9579 * kern/elf.c: Likewise.
9580 * kern/ieee1275/ieee1275.c: Likewise.
9581 * kern/powerpc/ieee1275/openfw.c: Likewise.
9582 * term/ieee1275/ofconsole.c: Likewise.
9584 2008-01-21 Robert Millan <rmh@aybabtu.com>
9586 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9588 * include/grub/kernel.h (grub_arch_memdisk_addr)
9589 (grub_arch_memdisk_size): Moved from here ...
9591 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9592 (grub_arch_memdisk_size): ... to here.
9594 2008-01-21 Robert Millan <rmh@aybabtu.com>
9596 Mostly based on bugfix from Bean.
9598 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9599 attribute with hook() parameter.
9600 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9602 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9603 attribute with hook() parameter.
9604 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9607 2008-01-21 Robert Millan <rmh@aybabtu.com>
9609 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9610 (pkglib_MODULES): Add `memdisk.mod'.
9611 (memdisk_mod_SOURCES): New variable.
9612 (memdisk_mod_CFLAGS): Likewise.
9613 (memdisk_mod_LDFLAGS): Likewise.
9615 * disk/memdisk.c: New file.
9617 * include/grub/disk.h (grub_disk_dev_id): Add
9618 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9620 * include/grub/i386/pc/kernel.h
9621 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9622 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9623 (grub_kernel_image_size): New variable declaration.
9624 (grub_total_module_size): Likewise.
9625 (grub_memdisk_image_size): Likewise.
9627 * include/grub/i386/pc/memory.h
9628 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9630 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9631 (grub_arch_memdisk_addr): New variable declaration.
9632 (grub_arch_memdisk_size): Likewise.
9634 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9635 (grub_arch_memdisk_size): Likewise.
9637 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9638 (codestart): Replace hardcoded `0x100000' with
9639 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9641 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9642 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9643 not NULL, append the contents of the file it refers to, at the end of
9644 the compressed kernel image. Initialize `grub_memdisk_image_size'
9645 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9646 (options): Add "memdisk"|'m' option.
9647 (main): Parse --memdisk|-m option, and pass user-provided path as
9648 parameter to generate_image().
9650 2008-01-20 Robert Millan <rmh@aybabtu.com>
9652 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9653 grub_dprintf() calls from here ...
9654 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9656 2008-01-20 Robert Millan <rmh@aybabtu.com>
9658 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9660 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9662 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9663 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9664 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9665 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9667 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9668 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9670 2008-01-19 Robert Millan <rmh@aybabtu.com>
9672 Get rid of confusing function (superseded by
9673 `grub_ieee1275_get_integer_property')
9674 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9676 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9678 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9679 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9680 in native endianness from grub_ieee1275_get_integer_property().
9682 2008-01-19 Robert Millan <rmh@aybabtu.com>
9684 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9685 command after "shut-down", since implementations differ on which
9686 the command for halt is.
9688 2008-01-19 Robert Millan <rmh@aybabtu.com>
9690 * include/grub/i386/linuxbios/console.h: Add header protection.
9691 (grub_keyboard_controller_init): New function prototype.
9692 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9693 (KEYBOARD_COMMAND_READ): Likewise.
9694 (KEYBOARD_COMMAND_WRITE): Likewise.
9695 (KEYBOARD_SCANCODE_SET1): Likewise.
9696 (grub_keyboard_controller_write): New function.
9697 (grub_keyboard_controller_read): Likewise.
9698 (grub_keyboard_controller_init): Likewise.
9700 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9701 (grub_console_init): On coreboot/LinuxBIOS, call
9702 grub_keyboard_controller_init().
9704 2008-01-19 Robert Millan <rmh@aybabtu.com>
9706 PowerPC changes provided by Pavel Roskin.
9708 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9709 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9710 don't rely on cmain() doing it.
9711 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9712 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9714 2008-01-16 Robert Millan <rmh@aybabtu.com>
9716 * include/grub/i386/linuxbios/memory.h
9717 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9718 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9719 receive `table_header' as argument. Instead, probe for it in the
9720 known memory ranges where it can be present.
9721 (grub_available_iterate): Do not pass a fixed `table_header' address
9722 to grub_linuxbios_table_iterate().
9724 2008-01-15 Robert Millan <rmh@aybabtu.com>
9726 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9727 * conf/i386-ieee1275.rmk: New file.
9728 * include/grub/i386/ieee1275/console.h: Likewise.
9729 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9730 * include/grub/i386/ieee1275/kernel.h: Likewise.
9731 * include/grub/i386/ieee1275/time.h: Likewise.
9732 * kern/i386/ieee1275/init.c: Likewise.
9733 * kern/i386/ieee1275/startup.S: Likewise.
9735 2008-01-15 Robert Millan <rmh@aybabtu.com>
9737 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9738 when pointers are 32-bit (but still do set it to one when they are
9741 2008-01-15 Robert Millan <rmh@aybabtu.com>
9743 * include/grub/ieee1275/ieee1275.h
9744 (grub_ieee1275_get_integer_property): New function prototype.
9746 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9747 (grub_ieee1275_get_integer_property): New function. Wraps around
9748 grub_ieee1275_get_property() to handle endianness.
9750 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9751 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9753 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9754 (grub_map): Likewise.
9755 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9757 2008-01-15 Bean <bean123ch@gmail.com>
9759 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9760 (grub_script_execute_cmdline): Reset grub_errno.
9762 * normal/main.c (read_config_file): Reset grub_errno.
9764 * normal/parse.y (script_init): New.
9765 (script): Move function and menuentry here.
9767 (command): Add delimiter at the end of command.
9768 (commands): Adjust to match the new command.
9769 (commandblock): Remove grub_script_lexer_record_start.
9770 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9771 (if): Use the new commands.
9773 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9775 2008-01-15 Robert Millan <rmh@aybabtu.com>
9777 * normal/menu.c (run_menu): Move timeout message from here ...
9778 (print_timeout): ... to here.
9779 (run_menu): Use print_timeout() once during initial draw to print
9780 the whole message, and again in every clock tick to update only
9781 the number of seconds.
9783 2008-01-15 Robert Millan <rmh@aybabtu.com>
9785 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9786 actual size of `available' from grub_ieee1275_get_property(), and
9787 restrict parsing to that bound.
9789 2008-01-15 Christian Franke <franke@computer.org>
9791 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9792 (argp_program_version): Remove variable.
9793 (argp_program_bug_address): Likewise.
9794 (options): Convert from struct argp_option to struct option.
9795 (struct arguments): Remove.
9796 (parse_opt): Remove.
9797 (usage): New function.
9798 (main): Replace struct args members by simple variables.
9799 Replace argp_parse() by getopt_long().
9800 Add switch to evaluate options.
9801 Add missing "(...)" around root_dev in prefix string.
9803 2008-01-14 Robert Millan <rmh@aybabtu.com>
9805 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9806 for grub_ieee1275_exit(), in order to improve portability.
9808 2008-01-14 Robert Millan <rmh@aybabtu.com>
9810 * util/grub.d/10_linux.in (prefix): Define.
9811 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9813 2008-01-13 Pavel Roskin <proski@gnu.org>
9815 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9816 grub_errno if no errors have been detected.
9818 2008-01-12 Robert Millan <rmh@aybabtu.com>
9820 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9821 (grub_util_get_dev_abstraction): New function prototype.
9823 * util/getroot.c: Include `<grub/util/getroot.h>'
9824 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9825 (grub_util_get_dev_abstraction): ... here (new function).
9827 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9828 `PRINT_ABSTRACTION'.
9829 (probe): Probe for abstraction type when requested.
9830 (main): Understand `--target=abstraction'.
9832 * util/i386/efi/grub-install.in: Add abstraction module to core
9833 image when it is found to be necessary.
9834 * util/i386/pc/grub-install.in: Likewise.
9835 * util/powerpc/ieee1275/grub-install.in: Likewise.
9837 * util/update-grub_lib.in (font_path): Return system path without
9838 converting to GRUB path.
9839 * util/update-grub.in: Convert system path returned by font_path()
9840 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9841 abstraction module is needed for loading fonts (if any). Export
9842 that as `GRUB_PRELOAD_MODULES'.
9843 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9846 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9848 Remove some unused code from reiserfs.
9850 * fs/reiserfs.c (struct grub_reiserfs_key)
9851 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9852 (struct grub_reiserfs_node_body): Removed.
9853 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9855 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9857 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9859 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9861 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9863 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9865 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9866 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9867 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9869 2008-01-10 Robert Millan <rmh@aybabtu.com>
9871 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9872 Determines if a file is garbage left by packaging systems, etc.
9873 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9874 for processing /etc/grub.d scripts.
9875 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9876 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9877 as a condition for processing Linux images.
9879 2008-01-10 Pavel Roskin <proski@gnu.org>
9881 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9882 to compile reiserfs.c on PowerPC.
9884 2008-01-10 Robert Millan <rmh@aybabtu.com>
9886 * kern/device.c (grub_device_iterate): Do not abort device iteration
9887 when one of the devices cannot be opened.
9888 * kern/disk.c (grub_disk_open): Do not account previous failures of
9889 unrelated functions when grub_errno is checked for.
9891 2008-01-08 Robert Millan <rmh@aybabtu.com>
9893 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9894 `! grub_linux_is_bzimage', change order of address comparison to make
9895 it more intuitive, and improve "too big zImage" error message.
9897 2008-01-08 Robert Millan <rmh@aybabtu.com>
9899 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9900 `$(update-grub_DATA)'.
9901 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9904 2008-01-07 Robert Millan <rmh@aybabtu.com>
9906 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9907 which instruction is modified by grub-setup during installation
9908 (since it wasn't obvious by only looking at this file).
9910 2008-01-07 Robert Millan <rmh@aybabtu.com>
9912 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9913 listing actual TODO items.
9915 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9917 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9919 (grub_reiserfs_get_key_offset): Likewise.
9920 (grub_reiserfs_set_key_offset): Likewise.
9921 (grub_reiserfs_set_key_type): Likewise.
9922 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9924 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9925 better to remove the bitfield version completely.
9927 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9929 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9930 allocated from the heap, due to the fshelp implementation.
9931 (grub_reiserfs_dir): Free NODE, due to the same reason.
9933 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9935 Mostly from Vincent Pelletier:
9937 * fs/reiserfs.c: New file.
9939 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9940 (reiserfs_mod_SOURCES): New variable.
9941 (reiserfs_mod_CFLAGS): Likewise.
9942 (reiserfs_mod_LDFLAGS): Likewise.
9944 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9945 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9946 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9949 2008-01-06 Robert Millan <rmh@aybabtu.com>
9951 * normal/color.c: Remove `<grub/env.h>'.
9953 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9955 * include/grub/normal.h: Include <grub/env.h>.
9957 2008-01-05 Robert Millan <rmh@aybabtu.com>
9959 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9960 usage example with `(hd0,1)'.
9961 Reported by Samuel Thibault.
9963 2008-01-05 Robert Millan <rmh@aybabtu.com>
9965 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9966 (grub_linux_boot_zimage): Rename to ...
9967 (grub_linux_boot): ... this.
9968 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9969 (grub_linux_boot_zimage): Conditionalize zImage copy.
9971 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9972 (grub_linux_boot_bzimage): Remove prototype.
9973 (grub_linux_boot_zimage): Rename to ...
9974 (grub_linux_boot): ... this.
9976 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9977 (grub_linux_boot): Remove function.
9979 2008-01-05 Robert Millan <rmh@aybabtu.com>
9981 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9982 (grub_env_write_color_highlight): Likewise.
9983 (grub_wait_after_message): Likewise.
9985 * normal/color.c: New file.
9987 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9988 (normal_mod_DEPENDENCIES): Likewise.
9990 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9991 (normal_mod_DEPENDENCIES): Likewise.
9993 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9994 (normal_mod_DEPENDENCIES): Likewise.
9996 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9997 (normal_mod_DEPENDENCIES): Likewise.
9999 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10000 for waiting after a message is printed.
10001 * normal/main.c (read_config_file): Likewise.
10002 (grub_normal_init): Register grub_env_write_color_normal() and
10003 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10004 `color_highlight' variables as global.
10006 * normal/menu.c (grub_wait_after_message): New function.
10007 (grub_color_menu_normal): New variable. Replaces ...
10008 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10009 (grub_color_menu_highlight): New variable. Replaces ...
10010 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10011 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10012 `GRUB_TERM_COLOR_STANDARD'.
10013 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10014 `normal_code' and `highlight_code' to `old_color_normal' and
10015 `old_color_highlight', respectively.
10016 (grub_menu_init_page): Update colors when drawing the menu, based on
10017 `menu_color_normal' and `menu_color_highlight' variables.
10018 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10019 a message is printed.
10021 2008-01-05 Robert Millan <rmh@aybabtu.com>
10023 * kern/env.c (grub_env_context_open): Propagate hooks for global
10024 variables to new context.
10026 * kern/main.c (grub_set_root_dev): Export `root' variable.
10028 2008-01-05 Robert Millan <rmh@aybabtu.com>
10030 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10031 discs unconditionally, since udev and others have options to provide
10034 2008-01-05 Robert Millan <rmh@aybabtu.com>
10036 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10038 2008-01-04 Christian Franke <franke@computer.org>
10040 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10043 2008-01-03 Pavel Roskin <proski@gnu.org>
10045 * kern/i386/linuxbios/init.c: Put "void" to all function
10046 declarations with no arguments.
10047 * kern/powerpc/ieee1275/init.c: Likewise.
10048 * term/i386/pc/at_keyboard.c: Likewise.
10049 * term/i386/pc/vga_text.c: Likewise.
10050 * util/grub-mkdevicemap.c: Likewise.
10052 2008-01-02 Robert Millan <rmh@aybabtu.com>
10054 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10055 message when loaded image is out of bounds.
10056 (grub_multiboot_load_elf64): Likewise.
10058 2008-01-02 Pavel Roskin <proski@gnu.org>
10060 * util/grub.d/10_linux.in: Try version without ".old" when
10061 looking for initrd. It's better to use initrd from the newer
10062 kernel of the same version than no initrd at all.
10064 2008-01-01 Robert Millan <rmh@aybabtu.com>
10066 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10068 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10070 * include/grub/video.h: Added grub_video_unmap_color and
10071 grub_video_get_active_render_target.
10072 (grub_video_adapter): Added unmap_color and get_active_render_target.
10074 * video/video.c: Added grub_video_unmap_color and
10075 grub_video_get_active_render_target.
10076 (grub_video_get_info): Changed method to accept NULL pointer as an
10077 argument to allow detection of active video adapter.
10079 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10080 grub_video_vbe_unmap_color_int.
10081 Added grub_video_vbe_unmap_color and
10082 grub_video_vbe_get_active_render_target.
10083 (grub_video_vbe_adapter): Added unmap_color and
10084 get_active_render_target.
10086 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10087 with grub_video_vbe_unmap_color_int.
10089 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10090 (DEFAULT_NORMAL_COLOR): Likewise.
10091 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10092 (DEFAULT_FG_COLOR): Removed.
10093 (DEFAULT_BG_COLOR): Likewise.
10094 (DEFAULT_CURSOR_COLOR): Changed value.
10095 (grub_virtual_screen): Added standard_color_setting,
10096 normal_color_setting, highlight_color_setting and term_color.
10097 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10098 (bitmap_width): Added.
10099 (bitmap_height): Likewise.
10100 (bitmap): Likewise.
10101 (set_term_color): Likewise.
10102 (grub_virtual_screen_setup): Changed to use new terminal coloring
10104 (grub_gfxterm_init): Added init for bitmap.
10105 (grub_gfxterm_fini): Added destroy for bitmap.
10106 (redraw_screen_rect): Updated to use background bitmap and new
10108 (scroll_up): Added optimization for case when there is no bitmap.
10109 (grub_gfxterm_cls): Fixed to use correct background color.
10110 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10112 (grub_virtual_screen_setcolor): Likewise.
10113 (grub_virtual_screen_getcolor): Added.
10114 (grub_gfxterm_background_image_cmd): Likewise.
10115 (grub_video_term): Added setcolor and getcolor.
10116 (MOD_INIT): Added registration of background_image command.
10117 (MOD_TERM): Added unregistration for background_image command.
10119 2007-12-30 Pavel Roskin <proski@gnu.org>
10121 * loader/multiboot_loader.c: Fix multiboot command
10122 unregistration. Fix all typos in the word "multiboot".
10124 2007-12-29 Pavel Roskin <proski@gnu.org>
10126 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10127 support for initrd names used in Fedora.
10129 2007-12-26 Bean <bean123ch@gmail.com>
10131 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10132 (cpio_mod_SOURCES): New variable.
10133 (cpio_mod_CFLAGS): Likewise.
10134 (cpio_mod_LDFLAGS): Likewise.
10136 * fs/cpio.c: New file.
10138 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10140 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10142 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10144 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10146 2007-12-25 Robert Millan <rmh@aybabtu.com>
10148 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10149 (grub_getcolor): New function.
10151 * kern/term.c (grub_getcolor): New function.
10152 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10153 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10154 (print_entry): Set normal and highlight colors to
10155 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10156 respectively, before printing and restore them to old
10158 (grub_menu_init_page): Likewise. Fill an additional colored space
10159 that would otherwise be left blank.
10161 * term/efi/console.c (grub_console_getcolor): New function.
10162 (struct grub_console_term.getcolor): New variable.
10163 * term/i386/pc/console.c (grub_console_getcolor): New function.
10164 (struct grub_console_term.getcolor): New variable.
10165 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10166 (struct grub_console_term.getcolor): New variable.
10168 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10169 (struct grub_console_term.setcolor): Remove variable.
10170 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10171 (struct grub_console_term.setcolor): Remove variable.
10172 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10173 (struct grub_console_term.setcolor): Remove variable.
10174 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10175 (struct grub_console_term.setcolor): Remove variable.
10177 2007-12-25 Robert Millan <rmh@aybabtu.com>
10179 * configure.ac: Search for possible unifont.hex locations, and
10180 define UNIFONT_HEX if found.
10182 * Makefile.in (UNIFONT_HEX): Define variable.
10183 (DATA): Rename to ...
10184 (PKGLIB): ... this. Update all users.
10185 (PKGDATA): New variable.
10186 (pkgdata_IMAGES): Rename to ...
10187 (pkglib_IMAGES): ... this. Update all users.
10188 (pkgdata_MODULES): Rename to ...
10189 (pkglib_MODULES): ... this. Update all users.
10190 (pkgdata_PROGRAMS): Rename to ...
10191 (pkglib_PROGRAMS): ... this. Update all users.
10192 (pkgdata_DATA): Rename to ...
10193 (pkglib_DATA): ... this. Update all users.
10194 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10195 (unicode.pff, ascii.pff): New rules.
10196 (all-local): Add `$(PKGDATA)' dependency.
10197 (install-local): Process `$(PKGDATA)'.
10199 * util/update-grub_lib.in (font_path): Search for *.pff files in
10200 a few more locations, including `${pkgdata}'.
10202 2007-12-23 Robert Millan <rmh@aybabtu.com>
10204 Patch from Bean <bean123ch@gmail.com>:
10205 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10208 2007-12-21 Bean <bean123ch@gmail.com>
10210 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10211 (ntfscomp_mod_SOURCES): New variable.
10212 (ntfscomp_mod_CFLAGS): Likewise.
10213 (ntfscomp_mod_LDFLAGS): Likewise.
10215 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10216 (grub_probe_SOURCES): Likewise.
10217 (grub_emu_SOURCES): Likewise.
10219 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10220 (grub_emu_SOURCES): Likewise.
10222 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10223 (grub_emu_SOURCES): Likewise.
10225 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10226 (grub_emu_SOURCES): Likewise.
10228 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10229 (read_run_list): Renamed to grub_ntfs_read_run_list.
10230 (decomp_nextvcn): Moved to ntfscomp.c.
10231 (decomp_getch): Likewise.
10232 (decomp_get16): Likewise.
10233 (decomp_block): Likewise.
10234 (read_block): Likewise.
10235 (read_data): Partially moved to ntfscomp.c.
10236 (fixup): Change unsigned to grub_uint16_t.
10237 (read_mft): Change unsigned long to grub_uint32_t.
10238 (read_attr): Likewise.
10239 (read_data): Likewise.
10240 (read_run_data): Likewise.
10241 (read_run_list): Likewise.
10242 (read_mft): Likewise.
10244 * fs/ntfscomp.c: New file.
10246 * include/grub/ntfs.h: New file.
10248 2007-12-16 Robert Millan <rmh@aybabtu.com>
10250 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10251 IDE disk check, since Linux is known to support 20 IDE disks.
10252 Reported by Colin Watson.
10254 2007-12-15 Bean <bean123ch@gmail.com>
10256 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10257 (lnxboot_img_SOURCES): New variable.
10258 (lnxboot_img_ASFLAGS): Likewise.
10259 (lnxboot_img_LDFLAGS): Likewise.
10261 * boot/i386/pc/lnxboot.S: New file.
10263 2007-11-24 Pavel Roskin <proski@gnu.org>
10265 * configure.ac: Test if '--build-id=none' is supported by the
10266 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10267 objcopy to generate incorrect binary files (binutils
10268 2.17.50.0.18-1 as shipped by Fedora 8).
10269 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10270 linking, so that build ID doesn't break the test.
10272 2007-11-24 Pavel Roskin <proski@gnu.org>
10274 * include/grub/i386/time.h: use "void" in the argument list
10275 of grub_cpu_idle().
10276 * include/grub/powerpc/time.h: Likewise.
10277 * include/grub/sparc64/time.h: Likewise.
10279 2007-11-18 Christian Franke <franke@computer.org>
10281 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10282 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10283 This fixes the problem that function keys did not work in grub-emu.
10285 2007-11-18 Christian Franke <franke@computer.org>
10287 * disk/host.c (grub_host_open): Remove attribute unused from
10288 name parameter. Add check for "host". This fixes the problem
10289 that grub-emu does not find partitions.
10291 2007-11-18 Christian Franke <franke@computer.org>
10293 * util/hostfs.c (is_dir): New function.
10294 (grub_hostfs_dir): Handle missing dirent.d_type case.
10295 (grub_hostfs_read): Add missing fseek().
10296 (grub_hostfs_label): Clear label pointer. This fixes a crash
10297 of grub-emu on "ls (host)".
10299 2007-11-18 Christian Franke <franke@computer.org>
10301 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10302 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10303 to 64 bit boundary by default.
10305 2007-11-18 Bean <bean123ch@gmail.com>
10307 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10308 (hexdump_mod_SOURCES): New variable.
10309 (hexdump_mod_CFLAGS): Likewise.
10310 (hexdump_mod_LDFLAGS): Likewise.
10312 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10314 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10316 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10320 * include/grub/hexdump.h: New file.
10322 * commands/hexdump.c: New file.
10324 2007-11-10 Robert Millan <rmh@aybabtu.com>
10326 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10327 in grub_outb() calls.
10328 (beep_on): Likewise.
10330 2007-11-10 Christian Franke <franke@computer.org>
10332 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10333 (grub_menu_run): Likewise.
10335 2007-11-10 Robert Millan <rmh@aybabtu.com>
10337 * include/grub/i386/efi/machine.h: New file.
10338 * include/grub/i386/linuxbios/machine.h: Likewise.
10339 * include/grub/i386/pc/machine.h: Likewise.
10340 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10341 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10343 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10344 (serial_hw_io_addr): New variable.
10345 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10346 instead of `(unsigned short *) 0x400'.
10348 2007-11-10 Bean <bean123ch@gmail.com>
10350 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10352 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10354 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10355 (vga_mod_SOURCES): Added.
10356 (vga_mod_CFLAGS): Likewise.
10357 (vga_mod_LDFLAGS): Likewise.
10359 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10361 (set_map_mask): Likewise.
10362 (set_read_map): Likewise.
10363 (set_read_address): Likewise.
10364 (vga_font): Removed variable.
10365 (get_vga_glyph): Removed function.
10366 (invalidate_char): Likewise.
10367 (write_char): Changed to use grub_font_get_glyph() for font
10369 (grub_vga_putchar): Likewise.
10370 (grub_vga_getcharwidth): Likewise.
10372 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10374 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10376 (pxeboot_img_LDFLAGS): Likewise.
10377 (diskboot_img_LDFLAGS): Likewise.
10378 (kernel_img_LDFLAGS): Likewise.
10380 2007-11-06 Robert Millan <rmh@aybabtu.com>
10382 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10383 in grub_outb() calls.
10384 (serial_hw_init): Likewise.
10386 2007-11-05 Robert Millan <rmh@aybabtu.com>
10388 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10389 spaces. Skip non-regular files.
10391 2007-11-05 Robert Millan <rmh@aybabtu.com>
10393 * kern/disk.c (grub_disk_firmware_fini)
10394 (grub_disk_firmware_is_tainted): New variables.
10396 * include/grub/disk.h (grub_disk_firmware_fini)
10397 (grub_disk_firmware_is_tainted): Likewise.
10399 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10400 (grub_disk_biosdisk_fini): ... to here.
10401 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10402 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10403 is set. Register grub_disk_biosdisk_fini() in
10404 `grub_disk_firmware_fini'.
10406 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10407 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10408 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10409 to finish existing firmware disk interface.
10411 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10412 (ata_mod_SOURCES): New variable.
10413 (ata_mod_CFLAGS): Likewise.
10414 (ata_mod_LDFLAGS): Likewise.
10416 2007-11-05 Robert Millan <rmh@aybabtu.com>
10418 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10419 (grub_ata_wait): Reimplement using grub_millisleep().
10421 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10422 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10424 2007-11-03 Marco Gerards <marco@gnu.org>
10426 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10427 (CRTC_ADDR_PORT): New macro.
10428 (CRTC_DATA_PORT): Likewise.
10429 (CRTC_CURSOR): Likewise.
10430 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10431 (CRTC_CURSOR_ADDR_LOW): Likewise.
10432 (update_cursor): New function.
10433 (grub_console_real_putchar): Call `update_cursor'.
10434 (grub_console_gotoxy): Likewise.
10435 (grub_console_cls): Set the default color when clearing the
10437 (grub_console_setcursor): Implemented.
10439 2007-11-03 Marco Gerards <marco@gnu.org>
10441 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10443 (grub_ata_pio_write): Likewise.
10445 (grub_atapi_identify): Wait after issuing an ATA command.
10446 (grub_atapi_packet): Likewise.
10447 (grub_ata_identify): Likewise.
10448 (grub_ata_readwrite): Likewise.
10450 2007-11-03 Marco Gerards <marco@gnu.org>
10452 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10453 (grub_ata_pio_write): Likewise.
10454 (grub_ata_readwrite): Use `grub_error', instead of
10455 returning `grub_errno'.
10457 2007-11-03 Marco Gerards <marco@gnu.org>
10459 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10460 grub_ata_pio_write once for every single sector, instead of for
10463 2007-10-31 Robert Millan <rmh@aybabtu.com>
10465 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10467 * conf/i386-linuxbios.rmk: New file.
10469 * kern/i386/pc/hardware.c: Likewise.
10470 * term/i386/pc/at_keyboard.c: Likewise.
10471 * term/i386/pc/vga_text.c: Likewise.
10473 * include/grub/i386/linuxbios/boot.h: Likewise.
10474 * include/grub/i386/linuxbios/console.h: Likewise.
10475 * include/grub/i386/linuxbios/init.h: Likewise.
10476 * include/grub/i386/linuxbios/kernel.h: Likewise.
10477 * include/grub/i386/linuxbios/loader.h: Likewise.
10478 * include/grub/i386/linuxbios/memory.h: Likewise.
10479 * include/grub/i386/linuxbios/serial.h: Likewise.
10480 * include/grub/i386/linuxbios/time.h: Likewise.
10482 * kern/i386/linuxbios/init.c: Likewise.
10483 * kern/i386/linuxbios/startup.S: Likewise.
10484 * kern/i386/linuxbios/table.c: Likewise.
10486 2007-10-31 Marco Gerards <marco@gnu.org>
10488 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10489 (ata_mod_SOURCES): New variable.
10490 (ata_mod_CFLAGS): Likewise.
10491 (ata_mod_LDFLAGS): Likewise.
10493 * disk/ata.c: New file.
10495 * include/grub/disk.h (grub_disk_dev_id): Add
10496 `GRUB_DISK_DEV_ATA_ID'.
10498 2007-10-31 Robert Millan <rmh@aybabtu.com>
10500 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10501 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10503 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10504 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10506 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10509 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10511 2007-10-27 Robert Millan <rmh@aybabtu.com>
10513 * include/grub/types.h (ULONG_MAX): Define macro.
10515 2007-10-22 Robert Millan <rmh@aybabtu.com>
10517 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10519 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10521 2007-10-22 Robert Millan <rmh@aybabtu.com>
10523 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10524 (pkgdata_MODULES): Add `biosdisk.mod'.
10525 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10528 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10529 (grub_biosdisk_init): Replace with ...
10530 (GRUB_MOD_INIT(biosdisk)): ... this.
10531 (grub_biosdisk_fini): Replace with ...
10532 (GRUB_MOD_FINI(biosdisk)): ... this.
10534 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10535 (grub_machine_init): Remove call to grub_biosdisk_init().
10536 (grub_machine_fini): Remove call to grub_machine_fini().
10538 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10540 2007-10-22 Robert Millan <rmh@aybabtu.com>
10542 * include/grub/time.h: New file.
10543 * include/grub/i386/time.h: Likewise.
10544 * include/grub/powerpc/time.h: Likewise.
10545 * include/grub/sparc64/time.h: Likewise.
10547 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10549 (KERNEL_MACHINE_TIME_HEADER): ... this.
10550 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10552 (KERNEL_MACHINE_TIME_HEADER): ... this.
10553 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10555 (KERNEL_MACHINE_TIME_HEADER): ... this.
10557 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10558 (grub_millisleep): New function.
10559 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10560 (grub_millisleep): New function.
10561 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10562 Remove `grub/machine/time.h' include.
10563 (grub_millisleep): New function.
10564 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10565 Remove `grub/machine/time.h' include.
10566 (grub_millisleep): New function.
10568 * include/grub/misc.h (grub_div_roundup): New function.
10570 * kern/misc.c: Include `<grub/time.h>'.
10571 (grub_millisleep_generic): New function.
10573 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10575 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10577 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10578 `machine/time.h'. Add `time.h'.
10579 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10581 2007-10-21 Robert Millan <rmh@aybabtu.com>
10583 * include/grub/misc.h (grub_max): New function.
10585 2007-10-21 Robert Millan <rmh@aybabtu.com>
10587 * util/misc.c (grub_util_info): Call fflush() before returning.
10589 2007-10-20 Robert Millan <rmh@aybabtu.com>
10591 * genmk.rb (Image): Copy `extra_flags' from here ...
10592 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10594 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10595 to `argc' and `args' arguments.
10597 2007-10-17 Robert Millan <rmh@aybabtu.com>
10599 * kern/i386/loader.S: New file.
10601 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10602 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10603 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10604 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10605 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10606 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10607 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10608 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10609 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10610 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10611 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10612 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10613 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10614 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10616 * kern/i386/realmode.S: New file.
10618 * kern/i386/pc/startup.S (protstack): Moved from here ...
10619 * kern/i386/realmode.S (protstack)... to here.
10620 * kern/i386/pc/startup.S (gdt): Moved from here ...
10621 * kern/i386/realmode.S (gdt)... to here.
10622 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10623 * kern/i386/realmode.S (prot_to_real)... to here.
10625 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10626 `kern/i386/realmode.S'.
10628 2007-10-17 Robert Millan <rmh@aybabtu.com>
10630 * include/grub/i386/loader.h: New file.
10632 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10633 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10634 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10635 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10636 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10637 * include/grub/i386/loader.h (grub_linux_prot_size)
10638 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10639 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10640 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10641 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10643 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10645 2007-10-15 Robert Millan <rmh@aybabtu.com>
10647 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10648 filesystem when dev->disk is unset.
10649 Do probe for filesystem even when dev->disk->has_partitions is set.
10650 In case a filesystem is found, always report it.
10651 In case it isn't, if dev->disk->has_partitions is set, report that
10652 a partition table was found instead of reporting that no filesystem
10653 could be identified.
10655 2007-10-12 Robert Millan <rmh@aybabtu.com>
10657 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10658 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10660 * include/grub/types.h (grub_host_to_target16): New macro.
10661 (grub_host_to_target32): Likewise.
10662 (grub_host_to_target64): Likewise.
10663 (grub_target_to_host16): Likewise.
10664 (grub_target_to_host32): Likewise.
10665 (grub_target_to_host64): Likewise.
10667 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10668 Renamed from to ...
10669 (GRUB_MOD_ALIGN): ...this. Update all users.
10671 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10672 grub_host_to_target32.
10673 Replace grub_be_to_cpu32 with grub_target_to_host32.
10674 (load_modules): Likewise.
10675 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10676 Replace grub_be_to_cpu32 with grub_target_to_host32.
10677 Replace grub_cpu_to_be16 with grub_host_to_target16.
10678 Replace grub_cpu_to_be32 grub_host_to_target32.
10680 2007-10-12 Robert Millan <rmh@aybabtu.com>
10682 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10683 * util/elf/grub-mkimage.c: ... here.
10685 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10686 `util/powerpc/ieee1275/grub-mkimage.c'.
10688 2007-10-07 Robert Millan <rmh@aybabtu.com>
10690 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10691 and make it easier to figure out.
10692 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10693 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10694 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10695 leave us with less than HEAP_MIN_SIZE total heap.
10696 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10698 2007-10-03 Robert Millan <rmh@aybabtu.com>
10700 * include/grub/i386/io.h: New file.
10701 * commands/i386/pc/play.c (inb): Removed.
10703 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10705 * term/i386/pc/serial.c (inb): Removed.
10707 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10709 * term/i386/pc/vga.c (inb): Removed.
10711 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10714 2007-10-02 Robert Millan <rmh@aybabtu.com>
10716 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10718 Reported by Marcin Kurek.
10720 2007-09-07 Robert Millan <rmh@aybabtu.com>
10722 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10723 SmartFirmware version updates (as released by Sven Luther), and avoid
10724 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10725 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10728 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10730 From Hitoshi Ozeki:
10731 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10732 when merging two regions.
10734 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10736 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10737 * normal/completion.c (grub_normal_do_completion): Likewise.
10738 Reported by Hitoshi Ozeki.
10740 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10742 Do not use devices at boot in chainloading.
10744 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10745 (boot_part_addr): Likewise.
10746 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10747 with BOOT_DRIVE and BOOT_PART_ADDR.
10748 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10749 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10751 2007-08-29 Robert Millan <rmh@aybabtu.com>
10753 Patch from Simon Peter <dn.tlp@gmx.net>:
10754 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10755 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10756 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10757 util/i386/pc/grub-setup.c_DEPENDENCIES.
10758 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10759 util/grub-probe.c_DEPENDENCIES.
10760 * conf/powerpc-ieee1275.rmk: Likewise.
10762 2007-08-28 Robert Millan <rmh@aybabtu.com>
10764 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10765 to tell grub-mkdevicemap how to name devices.
10766 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10769 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10770 util/i386/get_disk_name.c.
10771 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10772 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10773 util/ieee1275/get_disk_name.c.
10775 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10777 * DISTLIST: Add util/i386/get_disk_name.c and
10778 util/ieee1275/get_disk_name.c.
10780 * util/grub-mkdevicemap.c: Replace device naming logic with
10781 grub_util_get_disk_name() calls.
10783 2007-08-20 Robert Millan <rmh@aybabtu.com>
10785 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10786 (so that it works for both plural and singular quantities).
10788 2007-08-05 Robert Millan <rmh@aybabtu.com>
10790 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10791 so that [xz] isn't taken into account when determining order.
10793 2007-08-02 Marco Gerards <marco@gnu.org>
10795 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10796 `include/multiboot2.h', `include/grub/elfload.h',
10797 `include/multiboot.h', `include/grub/multiboot.h',
10798 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10799 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10800 `kern/elf.c', `loader/multiboot_loader.c',
10801 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10802 `loader/i386/pc/multiboot2.c',
10803 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10804 `util/i386/pc/grub-mkrescue.in'. Remove
10805 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10806 `include/grub/i386/pc/util/biosdisk.h' and
10807 `include/grub/powerpc/ieee1275/multiboot.h'.
10809 2007-08-02 Bean <bean123ch@gmail.com>
10811 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10812 (ntfs_mod_SOURCES): New variable.
10813 (ntfs_mod_CFLAGS): Likewise.
10814 (ntfs_mod_LDFLAGS): Likewise.
10816 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10817 (grub_probe_SOURCES): Likewise.
10818 (grub_emu_SOURCES): Likewise.
10820 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10821 (grub_emu_SOURCES): Likewise.
10823 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10824 (grub_emu_SOURCES): Likewise.
10826 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10828 * fs/ntfs.c: New file.
10830 2007-08-02 Bean <bean123ch@gmail.com>
10832 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10834 * file.h (grub_file): Likewise.
10836 * fshelp.h (grub_fshelp_read_file): Likewise.
10838 * util/i386/pc/grub-setup.c (setup): Likewise.
10839 (save_first_sector): Likewise.
10840 (save_blocklists): Likewise.
10842 * fs/affs.c (grub_affs_read_file): Likewise.
10844 * fs/ext2.c (grub_ext2_read_file): Likewise.
10846 * fs/fat.c (grub_fat_read_data): Likewise.
10848 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10850 * fs/hfs.c (grub_hfs_read_file): Likewise.
10852 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10854 * fs/jfs.c (grub_jfs_read_file): Likewise.
10856 * fs/minix.c (grub_minix_read_file): Likewise.
10858 * fs/sfs.c (grub_sfs_read_file): Likewise.
10860 * fs/ufs.c (grub_ufs_read_file): Likewise.
10862 * fs/xfs.c (grub_xfs_read_file): Likewise.
10864 * command/blocklist.c (read_blocklist): Likewise.
10865 (print_blocklist): Likewise.
10867 2007-08-02 Marco Gerards <marco@gnu.org>
10869 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10872 * disk/host.c: New file.
10874 * util/hostfs.c: Likewise.
10876 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10877 return `GRUB_ERR_BAD_FS'.
10878 * fs/sfs.c (grub_sfs_mount): Likewise.
10879 * fs/xfs.c (grub_xfs_mount): Likewise.
10881 * include/grub/disk.h (enum grub_disk_dev_id): Add
10882 `GRUB_DISK_DEVICE_HOST_ID'.
10884 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10886 2007-07-24 Jerone Young <jerone@gmail.com>
10888 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10889 modules for compilation.
10890 * conf/powerpc-ieee1275.rmk: Likewise.
10892 * include/multiboot.h: Move multiboot definitions to one file. Rename
10893 many definitions to not get grub specific.
10894 * include/multiboot2.h: Create header with multiboot 2 definitions.
10895 * include/grub/multiboot.h: Header for grub specific function
10896 prototypes and definitions.
10897 * include/grub/multiboot2.h: Likewise.
10898 * include/grub/multiboot_loader.h: Likewise.
10899 * include/grub/i386/pc/multiboot.h: Removed.
10900 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10902 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10903 and 2 to allow for one multiboot and module commands.
10904 * loader/multiboot2.c: Add multiboot2 functionality.
10905 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10906 and definition names.
10907 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10909 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10910 ieee1275 specific multiboot2 code.
10912 * kern/i386/pc/startup.S: Change headers and definition names for
10913 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10915 2007-07-22 Robert Millan <rmh@aybabtu.com>
10917 * geninitheader.sh: Process file specified in first parameter rather
10918 than hardcoding grub_modules_init.lst.
10919 * geninit.sh: Likewise. Also, construct header name dynamically rather
10920 than hardcoding grub_modules_init.h.
10922 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10923 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10924 grub_probe_init.[ch] and grub_setup_init.[ch].
10926 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10927 grub_modules_init.h with grub_emu_init.h.
10928 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10929 grub_probe_init.[ch] files.
10930 * conf/i386-efi.rmk: Likewise.
10931 * conf/i386-pc.rmk: Likewise.
10932 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10933 grub_setup_init.[ch] files.
10935 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10936 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10937 to initialize modules rather than a list of hardcoded functions.
10938 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10939 grub_init_all() to initialize modules rather than a list of hardcoded
10942 2007-07-22 Robert Millan <rmh@aybabtu.com>
10944 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10945 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10947 2007-07-22 Robert Millan <rmh@aybabtu.com>
10949 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10950 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10951 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10952 flag when running on SmartFirmware.
10953 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10954 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10957 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10958 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10959 rather than decreasing it.
10961 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10962 there's not enough space to do it, fail in the same way as when it
10963 can't be done because there are no partitions.
10965 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10966 when nvsetenv failed.
10968 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10970 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10971 because this rule is automatically generated.
10972 (grub-mkrescue): Removed for the same reason as above.
10974 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10976 Migrate to GNU General Public License Version 3.
10978 * COPYING: Replaced with the plain text version of GPLv3.
10980 * config.guess: Updated from gnulib.
10981 * config.sub: Likewise.
10983 * geninit.sh: Output a GPLv3 copyright notice.
10984 * geninitheader.sh: Likewise.
10985 * genmodsrc.sh: Likewise.
10986 * gensymlist.sh.in: Likewise.
10988 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10989 * boot/i386/pc/diskboot.S: Likewise.
10990 * boot/i386/pc/pxeboot.S: Likewise.
10991 * commands/blocklist.c: Likewise.
10992 * commands/boot.c: Likewise.
10993 * commands/cat.c: Likewise.
10994 * commands/cmp.c: Likewise.
10995 * commands/configfile.c: Likewise.
10996 * commands/echo.c: Likewise.
10997 * commands/help.c: Likewise.
10998 * commands/ls.c: Likewise.
10999 * commands/search.c: Likewise.
11000 * commands/terminal.c: Likewise.
11001 * commands/test.c: Likewise.
11002 * commands/videotest.c: Likewise.
11003 * commands/i386/cpuid.c: Likewise.
11004 * commands/i386/pc/halt.c: Likewise.
11005 * commands/i386/pc/play.c: Likewise.
11006 * commands/i386/pc/reboot.c: Likewise.
11007 * commands/i386/pc/vbeinfo.c: Likewise.
11008 * commands/i386/pc/vbetest.c: Likewise.
11009 * commands/ieee1275/halt.c: Likewise.
11010 * commands/ieee1275/reboot.c: Likewise.
11011 * commands/ieee1275/suspend.c: Likewise.
11012 * disk/loopback.c: Likewise.
11013 * disk/lvm.c: Likewise.
11014 * disk/raid.c: Likewise.
11015 * disk/efi/efidisk.c: Likewise.
11016 * disk/i386/pc/biosdisk.c: Likewise.
11017 * disk/ieee1275/ofdisk.c: Likewise.
11018 * font/manager.c: Likewise.
11019 * fs/affs.c: Likewise.
11020 * fs/ext2.c: Likewise.
11021 * fs/fat.c: Likewise.
11022 * fs/fshelp.c: Likewise.
11023 * fs/hfs.c: Likewise.
11024 * fs/hfsplus.c: Likewise.
11025 * fs/iso9660.c: Likewise.
11026 * fs/jfs.c: Likewise.
11027 * fs/minix.c: Likewise.
11028 * fs/sfs.c: Likewise.
11029 * fs/ufs.c: Likewise.
11030 * fs/xfs.c: Likewise.
11031 * hello/hello.c: Likewise.
11032 * include/grub/acorn_filecore.h: Likewise.
11033 * include/grub/arg.h: Likewise.
11034 * include/grub/bitmap.h: Likewise.
11035 * include/grub/boot.h: Likewise.
11036 * include/grub/cache.h: Likewise.
11037 * include/grub/device.h: Likewise.
11038 * include/grub/disk.h: Likewise.
11039 * include/grub/dl.h: Likewise.
11040 * include/grub/elfload.h: Likewise.
11041 * include/grub/env.h: Likewise.
11042 * include/grub/err.h: Likewise.
11043 * include/grub/file.h: Likewise.
11044 * include/grub/font.h: Likewise.
11045 * include/grub/fs.h: Likewise.
11046 * include/grub/fshelp.h: Likewise.
11047 * include/grub/gzio.h: Likewise.
11048 * include/grub/hfs.h: Likewise.
11049 * include/grub/kernel.h: Likewise.
11050 * include/grub/loader.h: Likewise.
11051 * include/grub/lvm.h: Likewise.
11052 * include/grub/misc.h: Likewise.
11053 * include/grub/mm.h: Likewise.
11054 * include/grub/net.h: Likewise.
11055 * include/grub/normal.h: Likewise.
11056 * include/grub/parser.h: Likewise.
11057 * include/grub/partition.h: Likewise.
11058 * include/grub/pc_partition.h: Likewise.
11059 * include/grub/raid.h: Likewise.
11060 * include/grub/rescue.h: Likewise.
11061 * include/grub/script.h: Likewise.
11062 * include/grub/setjmp.h: Likewise.
11063 * include/grub/symbol.h: Likewise.
11064 * include/grub/term.h: Likewise.
11065 * include/grub/terminfo.h: Likewise.
11066 * include/grub/tparm.h: Likewise.
11067 * include/grub/types.h: Likewise.
11068 * include/grub/video.h: Likewise.
11069 * include/grub/efi/api.h: Likewise.
11070 * include/grub/efi/chainloader.h: Likewise.
11071 * include/grub/efi/console.h: Likewise.
11072 * include/grub/efi/console_control.h: Likewise.
11073 * include/grub/efi/disk.h: Likewise.
11074 * include/grub/efi/efi.h: Likewise.
11075 * include/grub/efi/pe32.h: Likewise.
11076 * include/grub/efi/time.h: Likewise.
11077 * include/grub/i386/linux.h: Likewise.
11078 * include/grub/i386/setjmp.h: Likewise.
11079 * include/grub/i386/types.h: Likewise.
11080 * include/grub/i386/efi/kernel.h: Likewise.
11081 * include/grub/i386/efi/loader.h: Likewise.
11082 * include/grub/i386/efi/time.h: Likewise.
11083 * include/grub/i386/pc/biosdisk.h: Likewise.
11084 * include/grub/i386/pc/boot.h: Likewise.
11085 * include/grub/i386/pc/chainloader.h: Likewise.
11086 * include/grub/i386/pc/console.h: Likewise.
11087 * include/grub/i386/pc/init.h: Likewise.
11088 * include/grub/i386/pc/kernel.h: Likewise.
11089 * include/grub/i386/pc/loader.h: Likewise.
11090 * include/grub/i386/pc/memory.h: Likewise.
11091 * include/grub/i386/pc/multiboot.h: Likewise.
11092 * include/grub/i386/pc/serial.h: Likewise.
11093 * include/grub/i386/pc/time.h: Likewise.
11094 * include/grub/i386/pc/vbe.h: Likewise.
11095 * include/grub/i386/pc/vbeblit.h: Likewise.
11096 * include/grub/i386/pc/vbefill.h: Likewise.
11097 * include/grub/i386/pc/vbeutil.h: Likewise.
11098 * include/grub/i386/pc/vga.h: Likewise.
11099 * include/grub/ieee1275/ieee1275.h: Likewise.
11100 * include/grub/ieee1275/ofdisk.h: Likewise.
11101 * include/grub/powerpc/libgcc.h: Likewise.
11102 * include/grub/powerpc/setjmp.h: Likewise.
11103 * include/grub/powerpc/types.h: Likewise.
11104 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11105 * include/grub/powerpc/ieee1275/console.h: Likewise.
11106 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11107 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11108 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11109 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11110 * include/grub/powerpc/ieee1275/time.h: Likewise.
11111 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11112 * include/grub/sparc64/libgcc.h: Likewise.
11113 * include/grub/sparc64/setjmp.h: Likewise.
11114 * include/grub/sparc64/types.h: Likewise.
11115 * include/grub/sparc64/ieee1275/console.h: Likewise.
11116 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11117 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11118 * include/grub/sparc64/ieee1275/time.h: Likewise.
11119 * include/grub/util/biosdisk.h: Likewise.
11120 * include/grub/util/getroot.h: Likewise.
11121 * include/grub/util/lvm.h: Likewise.
11122 * include/grub/util/misc.h: Likewise.
11123 * include/grub/util/raid.h: Likewise.
11124 * include/grub/util/resolve.h: Likewise.
11125 * io/gzio.c: Likewise.
11126 * kern/device.c: Likewise.
11127 * kern/disk.c: Likewise.
11128 * kern/dl.c: Likewise.
11129 * kern/elf.c: Likewise.
11130 * kern/env.c: Likewise.
11131 * kern/err.c: Likewise.
11132 * kern/file.c: Likewise.
11133 * kern/fs.c: Likewise.
11134 * kern/loader.c: Likewise.
11135 * kern/main.c: Likewise.
11136 * kern/misc.c: Likewise.
11137 * kern/mm.c: Likewise.
11138 * kern/parser.c: Likewise.
11139 * kern/partition.c: Likewise.
11140 * kern/rescue.c: Likewise.
11141 * kern/term.c: Likewise.
11142 * kern/efi/efi.c: Likewise.
11143 * kern/efi/init.c: Likewise.
11144 * kern/efi/mm.c: Likewise.
11145 * kern/i386/dl.c: Likewise.
11146 * kern/i386/efi/init.c: Likewise.
11147 * kern/i386/efi/startup.S: Likewise.
11148 * kern/i386/pc/init.c: Likewise.
11149 * kern/i386/pc/lzo1x.S: Likewise.
11150 * kern/i386/pc/startup.S: Likewise.
11151 * kern/ieee1275/ieee1275.c: Likewise.
11152 * kern/powerpc/cache.S: Likewise.
11153 * kern/powerpc/dl.c: Likewise.
11154 * kern/powerpc/ieee1275/cmain.c: Likewise.
11155 * kern/powerpc/ieee1275/crt0.S: Likewise.
11156 * kern/powerpc/ieee1275/init.c: Likewise.
11157 * kern/powerpc/ieee1275/openfw.c: Likewise.
11158 * kern/sparc64/cache.S: Likewise.
11159 * kern/sparc64/dl.c: Likewise.
11160 * kern/sparc64/ieee1275/init.c: Likewise.
11161 * kern/sparc64/ieee1275/openfw.c: Likewise.
11162 * loader/efi/chainloader.c: Likewise.
11163 * loader/efi/chainloader_normal.c: Likewise.
11164 * loader/i386/efi/linux.c: Likewise.
11165 * loader/i386/efi/linux_normal.c: Likewise.
11166 * loader/i386/pc/chainloader.c: Likewise.
11167 * loader/i386/pc/chainloader_normal.c: Likewise.
11168 * loader/i386/pc/linux.c: Likewise.
11169 * loader/i386/pc/linux_normal.c: Likewise.
11170 * loader/i386/pc/multiboot.c: Likewise.
11171 * loader/i386/pc/multiboot_normal.c: Likewise.
11172 * loader/powerpc/ieee1275/linux.c: Likewise.
11173 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11174 * normal/arg.c: Likewise.
11175 * normal/cmdline.c: Likewise.
11176 * normal/command.c: Likewise.
11177 * normal/completion.c: Likewise.
11178 * normal/execute.c: Likewise.
11179 * normal/function.c: Likewise.
11180 * normal/lexer.c: Likewise.
11181 * normal/main.c: Likewise.
11182 * normal/menu.c: Likewise.
11183 * normal/menu_entry.c: Likewise.
11184 * normal/misc.c: Likewise.
11185 * normal/parser.y: Likewise.
11186 * normal/script.c: Likewise.
11187 * normal/i386/setjmp.S: Likewise.
11188 * normal/powerpc/setjmp.S: Likewise.
11189 * normal/sparc64/setjmp.S: Likewise.
11190 * partmap/acorn.c: Likewise.
11191 * partmap/amiga.c: Likewise.
11192 * partmap/apple.c: Likewise.
11193 * partmap/gpt.c: Likewise.
11194 * partmap/pc.c: Likewise.
11195 * partmap/sun.c: Likewise.
11196 * term/gfxterm.c: Likewise.
11197 * term/terminfo.c: Likewise.
11198 * term/efi/console.c: Likewise.
11199 * term/i386/pc/console.c: Likewise.
11200 * term/i386/pc/serial.c: Likewise.
11201 * term/i386/pc/vesafb.c: Likewise.
11202 * term/i386/pc/vga.c: Likewise.
11203 * term/ieee1275/ofconsole.c: Likewise.
11204 * util/biosdisk.c: Likewise.
11205 * util/console.c: Likewise.
11206 * util/genmoddep.c: Likewise.
11207 * util/getroot.c: Likewise.
11208 * util/grub-emu.c: Likewise.
11209 * util/grub-mkdevicemap.c: Likewise.
11210 * util/grub-probe.c: Likewise.
11211 * util/lvm.c: Likewise.
11212 * util/misc.c: Likewise.
11213 * util/raid.c: Likewise.
11214 * util/resolve.c: Likewise.
11215 * util/update-grub.in: Likewise.
11216 * util/update-grub_lib.in: Likewise.
11217 * util/grub.d/00_header.in: Likewise.
11218 * util/grub.d/10_hurd.in: Likewise.
11219 * util/grub.d/10_linux.in: Likewise.
11220 * util/i386/efi/grub-install.in: Likewise.
11221 * util/i386/efi/grub-mkimage.c: Likewise.
11222 * util/i386/pc/grub-install.in: Likewise.
11223 * util/i386/pc/grub-mkimage.c: Likewise.
11224 * util/i386/pc/grub-mkrescue.in: Likewise.
11225 * util/i386/pc/grub-setup.c: Likewise.
11226 * util/i386/pc/misc.c: Likewise.
11227 * util/powerpc/ieee1275/grub-install.in: Likewise.
11228 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11229 * util/powerpc/ieee1275/misc.c: Likewise.
11230 * video/bitmap.c: Likewise.
11231 * video/video.c: Likewise.
11232 * video/i386/pc/vbe.c: Likewise.
11233 * video/i386/pc/vbeblit.c: Likewise.
11234 * video/i386/pc/vbefill.c: Likewise.
11235 * video/i386/pc/vbeutil.c: Likewise.
11236 * video/readers/tga.c: Likewise.
11238 2007-07-02 Robert Millan <rmh@aybabtu.com>
11240 * conf/i386-efi.rmk: Replace obsolete reference to
11241 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11242 with util/getroot.c.
11243 * conf/powerpc-ieee1275.rmk: Likewise.
11244 * conf/sparc64-ieee1275.rmk: Likewise.
11246 * util/grub-emu.c (main): Fix unchecked pointer handling.
11248 2007-07-02 Robert Millan <rmh@aybabtu.com>
11250 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11251 invocation to fail, in order to support partition-less media.
11253 * util/i386/pc/grub-install.in: Likewise.
11255 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11256 which fs or partmap modules are needed (akin to its sister scripts).
11258 Also use grub-probe to get rid of unportable /proc/mounts check.
11260 Print the same informational message that the other scripts do, before
11263 2007-06-23 Robert Millan <rmh@aybabtu.com>
11265 * util/update-grub_lib.in (font_path): New function. Determine whether
11266 a font file can be found and, if so, echo the GRUB path to it.
11268 * util/update-grub.in: Handle multiple terminals depending on user
11269 input, platform availability and font file presence. Propagate
11270 variables of our findings to /etc/grub.d/ children.
11272 * util/grub.d/00_header.in: Handle multiple terminals, based on
11273 environment setup by update-grub.
11275 2007-06-23 Robert Millan <rmh@aybabtu.com>
11277 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11279 2007-06-21 Robert Millan <rmh@aybabtu.com>
11281 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11282 indicate end of data section in kernel image.
11283 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11284 GRUB_KERNEL_MACHINE_DATA_END.
11286 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11288 * kern/i386/efi/startup.S: Likewise.
11290 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11291 during image generation. Implement --prefix option to override this
11293 * util/i386/efi/grub-mkimage.c: Likewise.
11295 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11296 code to make path relative to its root into a separate function.
11298 * util/i386/pc/grub-install.in: Use newly provided
11299 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11300 pass the result to grub-install --prefix.
11302 2007-06-13 Robert Millan <rmh@aybabtu.com>
11304 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11305 DEFAULT_DEVICE_MAP.
11306 * util/grub-emu.c: Use above definitions from misc.h instead of
11308 * util/grub-mkdevicemap.c: Likewise.
11309 * util/i386/pc/grub-setup.c: Likewise.
11310 * util/grub-probe.c: Likewise.
11311 (probe): Abort with grub_util_error() when either
11312 grub_guess_root_device or grub_util_get_grub_dev fails.
11314 2007-06-12 Robert Millan <rmh@aybabtu.com>
11316 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11317 "pager" assignment.
11318 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11320 * util/grub-probe.c (probe): Likewise for "drive_name".
11322 2007-06-11 Robert Millan <rmh@aybabtu.com>
11324 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11325 not just the cdrom one.
11327 2007-06-11 Robert Millan <rmh@aybabtu.com>
11329 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11330 Add --pkglibdir=DIR option to override pkglibdir.
11331 Mention --image-type=TYPE in help output.
11332 Fix --grub-mkimage (it was a no-op).
11333 Abort gracefully when no parameter is given.
11335 2007-06-11 Robert Millan <rmh@aybabtu.com>
11337 * util/i386/pc/grub-mkrescue.in: New file.
11338 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11339 * Makefile.in: Handle bin_SCRIPTS.
11341 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11343 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11344 list of video modes.
11346 2007-06-06 Robert Millan <rmh@aybabtu.com>
11348 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11349 file doesn't exist, or if it is in a filesystem grub can't read.
11351 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11352 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11353 header comment to fit in 80 columns when the variables are resolved.
11355 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11356 could be identified by update-grub. Remove redundant check for
11357 unifont.pff existence (since convert_system_path_to_grub_path now
11360 2007-06-04 Robert Millan <rmh@aybabtu.com>
11362 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11364 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11366 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11368 2007-06-04 Robert Millan <rmh@aybabtu.com>
11370 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11372 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11373 grub_apple_partition_map_fini.
11376 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11377 to access >2 TiB disks).
11379 Print disk->total_sectors with %llu instead of %lu, since this
11380 variable is always 64-bit (prevents wrong disk size from being displayed
11381 on either >2 TiB disk or big-endian CPU).
11383 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11384 into a generic case that supports all (sane) partition maps.
11386 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11389 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11390 and grub_apple_partition_map_fini() after that.
11392 2007-06-01 Robert Millan <rmh@aybabtu.com>
11394 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11396 * util/grub.d/00_header.in: Only enable gfxterm when
11397 convert_system_path_to_grub_path() succeeds.
11399 2007-05-20 Robert Millan <rmh@aybabtu.com>
11401 * util/update-grub_lib.in: New file.
11402 * DISTLIST: Add update-grub_lib.in.
11403 * conf/common.rmk: Generate update-grub_lib and install it in
11405 * Makefile.in: Add install routine for $(lib_DATA).
11407 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11408 function provided by update-grub_lib to support arbitrary paths of
11410 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11411 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11413 2007-05-19 Robert Millan <rmh@aybabtu.com>
11415 * commands/i386/cpuid.c: New module.
11416 * DISTLIST: Add it.
11417 * conf/i386-efi.rmk: Enable cpuid.mod.
11418 * conf/i386-pc.rmk: Likewise.
11420 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11422 * kern/disk.c (grub_disk_read): Check return value of
11425 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11427 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11429 * disk/raid.c (grub_raid_open): Likewise.
11431 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11433 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11434 stack instead of on the heap.
11436 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11437 before doing a read on it.
11439 * configure.ac: Only use -fno-stack-protector for the target
11442 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11444 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11445 __attribute_ ((unused)) to mode_type argument.
11447 * util/getroot.c (grub_guess_root_device): Fix #endif.
11449 * kern/misc.c (memcmp): Fix prototype.
11451 * include/grub/partition.h [GRUB_UTIL]
11452 (grub_gpt_partition_map_init): Add prototype.
11453 (grub_gpt_partition_map_fini): Likewise.
11455 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11456 at the right place.
11458 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11459 (grub_fat_read_data): Likewise.
11460 (grub_fat_find_dir): Likewise.
11462 * font/manager.c (find_glyph): Make table a const.
11463 (grub_font_get_glyph): Remove bitmap from if statement.
11465 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11467 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11468 code, first search for device in /dev/mapper, then in /dev.
11469 (grub_util_get_grub_dev): New function.
11470 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11472 * util/grub-probe.c (probe): Remove check for RAID, call
11473 grub_util_get_grub_dev() instead of
11474 grub_util_biosdisk_get_grub_dev().
11475 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11476 grub_util_biosdisk_get_grub_dev().
11477 * util/i386/pc/grub-setup.c (main): Likewise.
11479 2007-05-16 Robert Millan <rmh@aybabtu.com>
11481 * DISTLIST: Update for the latest changes.
11482 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11483 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11484 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11485 grub/util/biosdisk.h.
11486 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11487 grub/util/biosdisk.h.
11489 2007-05-16 Robert Millan <rmh@aybabtu.com>
11491 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11493 2007-05-16 Robert Millan <rmh@aybabtu.com>
11495 * util/i386/efi/grub-install.in: New.
11496 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11497 newly added grub-install.
11498 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11500 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11501 grub/util/biosdisk.h.
11502 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11503 grub/util/biosdisk.h.
11505 2007-05-16 Robert Millan <rmh@aybabtu.com>
11507 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11508 * include/grub/util/biosdisk.h: ... here.
11509 * util/i386/pc/biosdisk.c: Moved to ...
11510 * util/biosdisk.c: ... here.
11511 * util/i386/pc/getroot.c: Moved to ...
11512 * util/getroot.c: ... here.
11513 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11514 * util/grub-mkdevicemap.c: ... here.
11515 * util/i386/pc/grub-probe.c: Moved to ...
11516 * util/grub-probe.c: ... here.
11518 2007-05-15 Robert Millan <rmh@aybabtu.com>
11520 * util/update-grub.in: Remove duplicated line in grub.cfg header
11523 2007-05-13 Robert Millan <rmh@aybabtu.com>
11525 * util/update-grub.in: Fix a few assumptions about the devices holding
11526 /, /boot and /boot/grub being the same.
11527 * util/grub.d/00_header.in: Likewise.
11528 * util/grub.d/10_hurd.in: Likewise.
11529 * util/grub.d/10_linux.in: Likewise.
11531 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11532 patterns. Use that to define the `.old' suffix as older than `'.
11534 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11536 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11537 the grub.cfg header message.
11539 2007-05-11 Robert Millan <rmh@aybabtu.com>
11541 * util/update-grub.in: Create device.map if it doesn't already exist,
11542 before attempting to run grub-probe.
11543 Check for grub-probe and grub-mkdevicemap with the same code
11544 grub-install is using.
11547 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11549 * Makefile.in: Add the datarootdir autoconf variable.
11551 2007-05-09 Robert Millan <rmh@aybabtu.com>
11553 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11554 fail gracefully if dev->disk->partition == NULL.
11556 2007-05-07 Robert Millan <rmh@aybabtu.com>
11558 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11559 determine partition map module.
11560 * util/i386/pc/grub-install.in: Use this feature to decide which
11561 partition module to load, instead of hardcoding pc and gpt.
11563 2007-05-07 Robert Millan <rmh@aybabtu.com>
11565 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11566 source directory differs from build directory.
11568 2007-05-05 Robert Millan <rmh@aybabtu.com>
11570 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11573 2007-05-05 Robert Millan <rmh@aybabtu.com>
11575 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11577 2007-05-05 Robert Millan <rmh@aybabtu.com>
11579 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11580 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11582 2007-05-05 Robert Millan <rmh@aybabtu.com>
11584 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11585 (grub_probe_SOURCES): Likewise.
11586 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11587 GPT and initialize dos_part and bsd_part accordingly.
11588 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11590 (main): Activate gpt module for use during partition identification,
11591 and deactivate it afterwards.
11592 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11593 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11594 partition identification, and deactivate it afterwards.
11596 2007-05-05 Robert Millan <rmh@aybabtu.com>
11598 * term/i386/pc/console.c (grub_console_fini): Call
11599 grub_term_set_current() before grub_term_unregister().
11601 2007-05-04 Robert Millan <rmh@aybabtu.com>
11603 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11604 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11605 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11606 and update-grub_DATA.
11607 * conf/common.rmk: Build and install update-grub components.
11608 * conf/common.mk: Regenerate.
11609 * util/update-grub.in: New. Core of update-grub.
11610 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11611 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11612 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11613 * util/grub.d/README: New. Document grub.d directory layout.
11615 2007-05-01 Robert Millan <rmh@aybabtu.com>
11617 * util/grub-emu.c: Move initialization functions
11618 grub_util_biosdisk_init() and grub_init_all() before
11619 grub_util_biosdisk_get_grub_dev(), which relies on them.
11621 2007-04-19 Robert Millan <rmh@aybabtu.com>
11623 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11626 2007-04-18 Jerone Young <jerone@gmail.com>
11628 * kernel/elf.c: Add missing parenthesis for conditional statement
11631 2007-04-10 Jerone Young <jerone@gmail.com>
11633 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11634 continue on and look for device node with real device name.
11636 2007-04-10 Jerone Young <jerone@gmail.com>
11638 * configure.ac: Add argument for autoconf to use transformation
11640 * Makefile.in: Add autoconf package transformation code.
11641 * util/i386/pc/grub-install.in: Likewise.
11642 * util/powerpc/ieee1275/grub-install.in: Likewise.
11644 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11646 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11647 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11648 (EXT2_REVISION): Likewise.
11649 (EXT2_INODE_SIZE): Likewise.
11650 (struct grub_ext2_block_group): Added a missing member
11652 (grub_ext2_read_inode): Divide by the inode size in a superblock
11653 instead of 128 to obtain INODES_PER_BLOCK.
11654 Use the macro EXT2_INODE_SIZE instead of directly using
11655 SBLOCK->INODE_SIZE.
11657 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11659 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11660 superblock instead of the structure size to compute an
11661 offset. This fixes the problem that GRUB could not read a
11662 filesystem when inode size is different from 128-byte.
11664 2007-03-05 Marco Gerards <marco@gnu.org>
11666 * normal/main.c (read_config_file): When "menu" is not set, create
11667 an initial context.
11669 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11671 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11672 (HEAP_LIMIT): New macro.
11673 (grub_claim_heap): Claim memory up to `heaplimit'.
11675 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11677 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11678 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11679 (_start): Likewise.
11680 (grub_arch_modules_addr): Return address after `_end'.
11681 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11682 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11683 (add_segments): Calculate `_end' from phdr size and location.
11684 (ALIGN_UP): Moved to ...
11685 * include/grub/misc.h: here.
11686 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11688 (GRUB_IEEE1275_MODULE_BASE): Removed.
11690 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11692 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11695 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11697 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11699 (grub_elf64_load_hook_t): Likewise.
11700 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11703 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11705 * kern/mm.c: Update copyright.
11706 (grub_mm_debug): Correct syntax error.
11707 (grub_mm_dump_free): New function.
11708 (grub_debug_free): Call `grub_free'.
11709 * include/grub/mm.h: Update copyright.
11710 (grub_mm_dump_free): Add declaration.
11712 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11714 * include/grub/ieee1275/ieee1275.h: Update copyright.
11715 * kern/powerpc/ieee1275/init.c: Likewise.
11716 * kern/powerpc/ieee1275/openfw.c: Likewise.
11718 * loader/powerpc/ieee1275/linux.c: Likewise.
11719 * include/grub/elfload.h: Likewise.
11720 * kern/elf.c: Likewise.
11721 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11723 (grub_elf64_load): Likewise.
11724 (grub_elf32_load_segment): Move to a nested function.
11725 (grub_elf64_load_segment): Likewise.
11727 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11729 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11731 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11732 (grub_heap_len): Likewise.
11733 (HEAP_SIZE): New macro.
11734 (grub_claim_heap): New function.
11735 (grub_machine_init): Don't claim heap directly. Call
11737 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11738 (grub_available_iterate): New function.
11740 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11742 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11743 * configure.ac: Use it for testing the HOST and TARGET compilers.
11745 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11747 * Makefile.in (enable_grub_emu): New variable.
11748 * configure.ac (--enable-grub-emu): New option.
11749 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11750 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11751 * conf/i386-pc.rmk: Likewise.
11752 * conf/powerpc-ieee1275.rmk: Likewise.
11753 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11755 2006-12-12 Marco Gerards <marco@gnu.org>
11757 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11759 * kern/env.c (grub_env_unset): Don't free the member `value' when
11760 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11763 * normal/main.c (current_menu): Removed.
11764 (free_menu): Unset the `menu' environment variable.
11765 (grub_normal_menu_addentry): Make use of the environment variable
11766 `menu', instead of using the global `current_menu'. Allocate
11767 memory for the sourcecode of this entry.
11768 (read_config_file): New argument `nested', changed all callers.
11769 Only in the case of a new context, initialize a new menu. Set the
11770 `menu' environment variable.
11771 (grub_normal_execute): Don't set and unset the environment
11772 variable `menu' here anymore. Only free the menu when leaving the
11775 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11778 2006-12-11 Marco Gerards <marco@gnu.org>
11780 * normal/menu_entry.c (run): Fix off by one bug so the last line
11781 is executed. Move the loader check to outside the loop.
11783 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11785 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11787 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11789 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11790 the number of sectors. Reported by Andrey Shuvikov
11791 <mr_hyro@yahoo.com>.
11793 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11795 * kern/disk.c (grub_disk_read): When there is a read error, always
11796 try to read only the necessary data.
11798 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11800 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11802 [GRUB_UTIL] (grub_raid_fini): Likewise.
11803 [GRUB_UTIL] (grub_lvm_init): Likewise.
11804 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11805 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11806 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11807 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11808 and grub_raid_fini().
11810 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11812 * include/grub/types.h (__unused): Rename to UNUSED.
11813 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11814 (grub_elf64_size): Likewise.
11816 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11818 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11819 grub_error_push and grub_error_pop in the error-handling path.
11820 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11823 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11825 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11826 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11828 (kernel_elf_SOURCES): Likewise.
11829 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11830 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11831 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11832 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11833 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11834 (elf_mod_SOURCES): New variable.
11835 (elf_mod_CFLAGS): Likewise.
11836 (elf_mod_LDFLAGS): Likewise.
11837 * include/grub/types.h (__unused): New macro.
11838 * include/grub/elfload.h: New file.
11839 * kern/elf.c: Likewise.
11840 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11841 (ELF32_LOADMASK): New macro.
11842 (ELF64_LOADMASK): Likewise.
11843 (vmlinux): Removed.
11844 (grub_linux_load32): New function.
11845 (grub_linux_load64): Likewise.
11846 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11847 Use grub_elf_t instead of grub_file_t.
11849 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11851 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11852 `catch_result' to struct set_color_args.
11854 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11856 * normal/menu.c: Include grub/script.h.
11857 * normal/menu_entry.c: Likewise.
11858 * include/grub/normal.h: Do not include grub/script.h.
11860 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11862 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11864 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11866 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11868 (grub_disk_close): Print debug messages when closing a disk.
11869 (grub_disk_read): Print debug messages when disk read fails.
11870 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11872 * kern/partition.c: Include misc.h.
11873 (grub_partition_iterate): Print debug messages when detecting
11876 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11878 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11880 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11882 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11884 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11885 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11887 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11889 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11890 instead of sizeof(lv). Patch by Michael Guntsche.
11892 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11894 * disk/lvm.c: Rename VGS to VG_LIST.
11895 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11896 (grub_lvm_open): Likewise.
11897 Thanks to Michael Guntsche for finding this bug.
11899 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11901 * configure.ac (AC_INIT): Bumped to 1.95.
11903 2006-10-14 Robert Millan <rmh@aybabtu.com>
11905 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11906 with "/dev/.static/dev/md".
11908 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11910 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11911 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11912 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11913 DRIVE_NAME are always freed.
11915 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11916 DOS_PART, as a DOS partition is counted from one instead of zero
11917 now. Reported by Robert Millan.
11919 2006-10-14 Robert Millan <rmh@aybabtu.com>
11921 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11922 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11923 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11924 string returned by grub_guess_root_device.
11925 * util/i386/pc/grub-setup.c: Likewise.
11926 * util/i386/pc/grub-probefs.c: Likewise.
11928 * util/i386/pc/grub-probefs.c: Rename to ...
11929 * util/i386/pc/grub-probe.c: ... this.
11930 * DISTLIST: Remove grub-probefs, add grub-probe.
11931 * conf/i386-efi.rmk: Likewise.
11932 * conf/i386-pc.rmk: Likewise.
11933 * util/i386/pc/grub-install.in: Likewise.
11935 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11936 choose which information we want to print.
11938 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11940 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11941 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11942 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11943 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11944 video/readers/tga.c and video/i386/pc/vbeutil.c.
11946 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11948 Added support for RAID and LVM.
11950 * disk/lvm.c: New file.
11951 * disk/raid.c: Likewise.
11952 * include/grub/lvm.h: Likewise.
11953 * include/grub/raid.h: Likewise.
11954 * include/grub/util/lvm.h: Likewise.
11955 * include/grub/util/raid.h: Likewise.
11956 * util/lvm.c: Likewise.
11957 * util/raid.c: Likewise.
11959 * include/grub/disk.h (grub_disk_dev_id): Add
11960 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11961 (grub_disk_get_size): New prototype.
11962 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11963 returns a partition.
11964 (grub_disk_get_size): New function.
11966 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11967 verbatim if grub_install_dos_part is -2.
11969 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11972 * util/i386/pc/grub-setup.c (setup): New argument
11973 MUST_EMBED. Force embedding of GRUB when the argument is
11974 true. Close FILE before returning.
11975 (main): Add support for RAID and LVM.
11977 * conf/common.rmk: Add RAID and LVM modules.
11978 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11980 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11982 * kern/misc.c (grub_strstr): New function.
11983 * include/grub/misc.h (grub_strstr): New prototype.
11985 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11987 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11989 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11991 * kern/misc.c (grub_strtoull): Guess the base only if not
11994 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11996 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11999 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12001 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12003 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12004 Remove `flags' argument. All callers changed.
12005 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12006 (IEEE1275_IHANDLE_INVALID): New variable.
12007 (IEEE1275_CELL_INVALID): New variable.
12008 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12009 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12010 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12011 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12012 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12013 codes from Open Firmware. All callers updated.
12014 (grub_ieee1275_next_property): Directly return Open Firmware return
12016 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12017 Standardize error checking from `grub_ieee1275_get_property'.
12018 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12019 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12021 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12023 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12024 `instance_to_package_args' to `instance_to_path_args'.
12026 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12027 `grub_ieee1275_chosen'.
12029 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12030 `grub_ieee1275_interpret'.
12032 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12034 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12036 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12038 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12039 (__cmpdi): Likewise.
12041 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12042 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12045 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12047 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12048 to type `grub_ssize_t'.
12049 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12051 2006-09-22 Marco Gerards <marco@gnu.org>
12053 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12056 2006-09-22 Marco Gerards <marco@gnu.org>
12058 * commands/echo.c: New file.
12060 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12062 * conf/common.rmk (echo_mod_SOURCES): New variable.
12063 (echo_mod_CFLAGS): Likewise.
12064 (echo_mod_LDFLAGS): Likewise.
12066 2006-09-22 Marco Gerards <marco@gnu.org>
12068 * normal/main.c (get_line): Malloc memory instead of using
12069 preallocated memory. Removed the arguments `cmdline' and
12070 `max_len'. Updated all callers.
12072 2006-09-22 Marco Gerards <marco@gnu.org>
12074 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12075 (normal_mod_DEPENDENCIES): Likewise.
12077 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12078 (normal_mod_DEPENDENCIES): Likewise.
12080 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12082 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12084 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12086 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12087 (normal_mod_DEPENDENCIES): Likewise.
12088 * conf/i386-pc.mk: Regenerate.
12089 * conf/i386-efi.mk: Likewise
12090 * conf/common.mk: Likewise.
12091 * conf/powerpc-ieee1275.mk: Likewise.
12092 * conf/sparc64-ieee1275.mk: Likewise.
12094 2006-09-22 Robert Millan <rmh@aybabtu.com>
12096 Sync with i386 version.
12097 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12098 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12100 2006-09-21 Robert Millan <rmh@aybabtu.com>
12102 Import from GRUB Legacy (lib/device.c):
12103 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12104 (init_device_map) [__linux__]: Add support for I2O devices.
12106 2006-09-14 Marco Gerards <marco@gnu.org>
12108 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12111 2006-09-14 Robert Millan <rmh@aybabtu.com>
12113 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12116 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12118 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12119 before adding it to device.map.
12121 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12123 * genmk.rb: Let GCC generate dependencies the first time it
12124 compiles a file; using the -MD option.
12125 * conf/common.mk: Regenerate.
12126 * conf/i386-pc.mk: Likewise.
12127 * conf/i386-efi.mk: Likewise.
12128 * conf/powerpc-ieee1275.mk: Likewise.
12129 * conf/sparc64-ieee1275.mk: Likewise.
12131 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12133 Move the prototypes of grub_setjmp and grub_longjmp to
12134 cpu/setjmp.h, so that each architecture may specify different
12137 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12138 (grub_longjmp): Likewise.
12139 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12140 (grub_longjmp): Likewise.
12141 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12142 (grub_longjmp): Likewise.
12144 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12145 [!GRUB_UTIL] (grub_longjmp): Removed.
12147 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12149 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12150 "color!" method does not return any value.
12152 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12154 * include/grub/bitmap.h: New file.
12156 * include/grub/i386/pc/vbeutil.h: Likewise.
12158 * video/bitmap.c: Likewise.
12160 * video/readers/tga.c: Likewise.
12162 * video/i386/pc/vbeutil.c: Likewise.
12164 * commands/videotest.c: Code cleanup and updated to reflect to new
12167 * term/gfxterm.c: Likewise.
12169 * video/video.c: Likewise.
12171 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12172 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12173 (bitmap_mod_SOURCES): New entry.
12174 (bitmap_mod_CFLAGS): Likewise.
12175 (bitmap_mod_LDFLAGS): Likewise.
12176 (tga_mod_SOURCES): Likewise.
12177 (tga_mod_CFLAGS): Likewise.
12178 (tga_mod_LDFLAGS): Likewise.
12180 * include/grub/video.h (grub_video_blit_operators): New enum type.
12181 (grub_video_render_target): Changed as forward declaration and moved
12182 actual definition to be video driver specific.
12183 (grub_video_adapter.blit_bitmap): Added blitting operator.
12184 (grub_video_adapter.blit_render_target): Likewise.
12185 (grub_video_blit_bitmap): Likewise.
12186 (grub_video_blit_render_target): Likewise.
12188 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12189 driver specific render target definition.
12190 (grub_video_vbe_map_rgba): Added driver internal helper.
12191 (grub_video_vbe_unmap_color): Updated to use
12192 grub_video_i386_vbeblit_info.
12193 (grub_video_vbe_get_video_ptr): Likewise.
12195 * include/grub/i386/pc/vbeblit.h
12196 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12197 grub_video_i386_vbeblit_info.
12198 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12199 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12200 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12201 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12202 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12203 (grub_video_i386_vbeblit_index_index): Likewise.
12204 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12205 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12206 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12207 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12209 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12212 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12213 include/grub/i386/pc/vbeblit.h.
12215 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12216 Updated to use grub_video_i386_vbeblit_info.
12217 (grub_video_i386_vbefill_R8G8B8): Likewise.
12218 (grub_video_i386_vbefill_index): Likewise.
12219 (grub_video_i386_vbefill): Added generic filler.
12221 * video/i386/pc/vbefill.c: Updated to reflect changes on
12222 include/grub/i386/pc/vbefill.h.
12224 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12225 grub_video_i386_vbeblit_info.
12226 (grub_video_vbe_unmap_color): Likewise.
12227 (grub_video_vbe_blit_glyph): Likewise.
12228 (grub_video_vbe_scroll): Likewise.
12229 (grub_video_vbe_draw_pixel): Removed function.
12230 (grub_video_vbe_get_pixel): Likewise.
12231 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12232 updated code to use it.
12233 (common_blitter): Added common blitter for render target and bitmap.
12234 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12235 (grub_video_vbe_blit_render_target): Likewise.
12237 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12239 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12240 is in text mode if there is no console control protocol instance
12243 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12245 * include/grub/video.h: Code cleanup.
12247 * include/grub/i386/pc/vbe.h: Likewise.
12249 * video/i386/pc/vbe.c: Likewise.
12251 * video/i386/pc/vbeblit.c: Likewise.
12253 * video/i386/pc/vbefill.c: Likewise.
12255 * video/video.c: Likewise. Also added more comments.
12257 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12259 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12260 (struct grub_biosdisk_dap): Likewise.
12262 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12263 linkage settings for all functions.
12265 2006-07-12 Marco Gerards <marco@gnu.org>
12267 * configure.ac (--enable-mm-debug): Fix typo.
12269 * genkernsyms.sh.in: Use proper quoting for `CC'.
12271 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12273 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12274 (normal_mod_ASFLAGS): Remove "-m32".
12276 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12278 * util/misc.c: Include config.h.
12279 [!HAVE_MEMALIGN]: Do not include malloc.h.
12280 (grub_memalign): Use posix_memalign, if present. Then, use
12281 memalign, if present. Otherwise, emit an error.
12283 * util/grub-emu.c: Do not include malloc.h.
12285 * include/grub/util/misc.h: Include unistd.h. This is required for
12286 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12287 D. Eades III <hde@foobar-qux.org>.
12289 * configure.ac (AC_GNU_SOURCE): Added.
12290 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12293 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12295 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12296 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12298 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12300 * include/grub/types.h (grub_host_addr_t): Rename to
12301 grub_target_addr_t.
12302 (grub_host_off_t): Rename to grub_target_off_t.
12303 (grub_host_size_t): Rename to grub_target_size_t.
12304 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12305 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12307 * include/grub/kernel.h (struct grub_module_header): Change type
12308 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12309 (grub_module_info): Likewise.
12311 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12313 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12314 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12315 Velazquez <jesus.velazquez@gmail.com>.
12317 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12319 Count partitions from 1 instead of 0 in the string representation
12320 of partitions. Still use 0-based internally.
12322 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12323 (sun_partition_map_iterate): Use grub_partition_t instead of
12324 struct grub_partition *. Cast DESC->START_CYLINDER to
12325 grub_uint64_t after converting the endian.
12326 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12327 (sun_partition_map_get_name): Add 1 to P->INDEX.
12329 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12331 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12333 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12334 zero instead of one.
12335 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12336 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12338 * partmap/apple.c (apple_partition_map_iterate): Change the type
12339 of POS to unsigned.
12340 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12341 (apple_partition_map_get_name): Add 1 into P->INDEX.
12343 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12344 of POS to unsigned.
12345 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12346 calculate the offset of a partition.
12347 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12348 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12350 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12351 SECTOR to grub_disk_addr_t.
12352 (acorn_partition_map_iterate): Likewise.
12353 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12354 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12356 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12358 * kern/i386/pc/init.c (make_install_device): Add 1 into
12359 GRUB_INSTALL_DOS_PART.
12361 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12364 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12366 Clean up the code to support 64-bit addressing in disks and
12367 files. This change is not enough for filesystems yet.
12369 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12370 type of "start" to grub_uint64_t.
12371 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12372 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12373 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12376 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12377 to grub_disk_addr_t.
12379 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12382 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12384 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12387 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12389 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12391 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12393 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12394 to grub_off_t, to detect an error from grub_file_seek.
12395 (grub_multiboot_load_elf32): Likewise.
12397 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12398 maximum unsigned long value when an overflow is detected.
12399 (grub_strtoull): New function.
12400 (grub_divmod64): Likewise.
12401 (grub_lltoa): use grub_divmod64.
12403 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12405 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12406 the pointer to next character. Use grub_strtoull instead of
12408 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12409 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12412 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12413 return value is signed.
12414 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12415 test if OFFSET is less than zero, as OFFSET is unsigned now.
12417 * kern/disk.c (struct grub_disk_cache): Change the type of
12418 "sector" to grub_disk_addr_t.
12419 (grub_disk_cache_get_index): Change the type of SECTOR to
12420 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12421 unsigned after shifting.
12422 (grub_disk_cache_invalidate): Change the type of SECTOR to
12424 (grub_disk_cache_unlock): Likewise.
12425 (grub_disk_cache_store): Likewise.
12426 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12427 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12428 grub_disk_addr_t and grub_uint64_t, respectively.
12429 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12430 body, as the value of OFFSET is tweaked by
12431 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12432 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12434 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12435 body, as the value of OFFSET is tweaked by
12436 grub_disk_check_range. Change the types of LEN and N to
12439 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12440 and "saved_offset" to grub_off_t.
12441 (test_header): Cast BUF to char *.
12442 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12444 (grub_gzio_read): Change the types of OFFSET and SIZE to
12445 grub_off_t and grub_size_t, respectively.
12447 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12449 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12450 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12451 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12452 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12453 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12455 * include/grub/types.h (grub_off_t): Unconditionally set to
12457 (grub_disk_addr_t): Changed to grub_uint64_t.
12459 * include/grub/partition.h (struct grub_partition): Change the
12460 types of "start", "len" and "offset" to grub_disk_addr_t,
12461 grub_uint64_t and grub_disk_addr_t, respectively.
12462 (grub_partition_get_start): Return grub_disk_addr_t.
12463 (grub_partition_get_len): Return grub_uint64_t.
12465 * include/grub/misc.h (grub_strtoull): New prototype.
12466 (grub_divmod64): Likewise.
12468 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12469 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12470 grub_off_t, respectively.
12471 All callers and references changed.
12473 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12474 grub_size_t in "read".
12475 All callers and references changed.
12477 * include/grub/file.h (struct grub_file): Change the types of
12478 "offset" and "size" to grub_off_t and grub_off_t,
12479 respectively. Change the type of SECTOR to grub_disk_addr_t in
12481 (grub_file_read): Change the type of LEN to grub_size_t.
12482 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12484 (grub_file_size): Return grub_off_t.
12485 (grub_file_tell): Likewise.
12486 All callers and references changed.
12488 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12489 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12491 (struct grub_disk): Change the type of "total_sectors" to
12492 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12494 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12495 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12496 (grub_disk_write): Likewise.
12497 All callers and references changed.
12499 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12500 char * for grub_strncmp to silence gcc.
12501 (grub_iso9660_mount): Likewise.
12502 (grub_iso9660_mount): Likewise.
12503 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12505 (grub_iso9660_iterate_dir): Likewise.
12506 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12508 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12509 LEN to grub_disk_addr_t and grub_size_t, respectively.
12511 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12513 * fs/jfs.c (grub_jfs_read_file): Likewise.
12515 * fs/minix.c (grub_jfs_read_file): Likewise.
12517 * fs/sfs.c (grub_jfs_read_file): Likewise.
12519 * fs/ufs.c (grub_jfs_read_file): Likewise.
12521 * fs/xfs.c (grub_jfs_read_file): Likewise.
12523 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12524 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12527 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12528 BLKNR to -1 instead of returning GRUB_ERRNO.
12529 (grub_ext2_read_file): Change the types of SECTOR and
12530 LEN to grub_disk_addr_t and grub_size_t, respectively.
12532 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12533 LEN to grub_disk_addr_t and grub_size_t, respectively.
12535 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12538 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12539 string. Do not cast SECTOR explicitly.
12541 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12542 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12543 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12544 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12545 over 2TB and LBA mode is not supported, raise an error.
12546 (get_safe_sectors): New function.
12547 (grub_biosdisk_read): Use get_safe_sectors.
12548 (grub_biosdisk_write): Likewise.
12550 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12551 (grub_efidisk_write): Likewise.
12553 * disk/loopback.c (delete_loopback): Cosmetic changes.
12554 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12556 (grub_loopback_open): Likewise.
12557 (grub_loopback_read): Likewise. Also, change the type of POS to
12558 grub_off_t, and fix the usage of grub_memset.
12560 * commands/i386/pc/play.c: Include grub/machine/time.h.
12562 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12565 * commands/configfile.c: Include grub/env.h.
12567 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12568 GRUB_ERRNO directly instead. Change the type of POS to
12569 grub_off_t. Follow the coding standard.
12571 * commands/blocklist.c: Include grub/partition.h.
12572 (grub_cmd_blocklist): Return an error if the underlying device is
12573 not a disk. Take the starting sector of a partition into account,
12574 if a partition is used.
12576 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12578 (lba_mode): Support 64-bit addresses.
12579 (chs_mode): Likewise.
12580 (copy_buffer): Adapted to the new offsets of a length field and a
12582 (blocklist_default_start): Allocate 64-bit space.
12584 * boot/i386/pc/boot.S (force_lba): Removed.
12585 (boot_drive): Moved to under KERNEL_SECTOR.
12586 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12588 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12590 (lba_mode): Refactored to support a 64-bit address. More size
12592 (setup_sectors): Likewise.
12594 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12596 * DISTLIST: Added include/grub/i386/linux.h. Removed
12597 include/grub/i386/pc/linux.h
12599 * configure.ac (AC_INIT): Bumped to 1.94.
12601 * config.guess: Updated from gnulib.
12602 * config.sub: Likewise.
12603 * install-sh: Likewise.
12604 * mkinstalldirs: Likewise.
12606 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12608 * conf/common.rmk (grub_modules_init.lst): Depended on
12609 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12612 * genmk.rb (PModule::rule): Reverted the previous change.
12614 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12616 * conf/common.rmk (grub_modules_init.lst): Depends on
12617 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12618 that the target does not exist before producing.
12619 (grub_modules_init.h): Remove the target before generating.
12620 (grub_emu_init.c): Likewise.
12622 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12624 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12626 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12627 for the target-specific tests. Make sure that we also have the
12628 up-to-date target variables for those tests.
12630 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12632 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12633 (PModule::rule): Likewise.
12635 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12637 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12638 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12639 target-specific flags should be prefixed.
12640 (PModule::rule): Likewise.
12642 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12644 * configure.ac (CMP): Check if cmp is available explicitly.
12646 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12648 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12649 (target_cpu): New variable.
12650 (pkglibdir): Use target_cpu instead of host_cpu.
12652 * util/i386/pc/grub-install.in (host_cpu): Removed.
12653 (target_cpu): New variable.
12654 (pkglibdir): Use target_cpu instead of host_cpu.
12656 * util/genmoddep.c: Removed.
12658 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12659 instead of GRUB_HOST_SIZEOF_VOID_P.
12660 * kern/dl.c: Likewise.
12662 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12664 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12665 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12666 (GRUB_TARGET_SIZEOF_LONG): ... this.
12667 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12668 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12669 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12671 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12672 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12673 (GRUB_TARGET_SIZEOF_LONG): ... this.
12674 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12675 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12676 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12678 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12679 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12680 (GRUB_TARGET_SIZEOF_LONG): ... this.
12681 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12682 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12684 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12685 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12686 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12687 instead of GRUB_HOST_SIZEOF_LONG.
12688 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12689 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12690 GRUB_CPU_WORDS_BIGENDIAN.
12691 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12692 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12695 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12696 (genmoddep_SOURCES): Likewise.
12697 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12698 (genmoddep_SOURCES): Likewise.
12699 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12700 (genmoddep_SOURCES): Likewise.
12701 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12703 (genmoddep_SOURCES): Likewise.
12705 * genmoddep.awk: New file.
12707 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12708 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12709 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12710 (PModule::rule): Likewise.
12711 (Program::rule): Likewise.
12712 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12713 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12716 * configure.ac: Rewritten intensively to use host and target
12717 instead of build and host, respectively.
12719 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12720 (host_cpu): Removed.
12721 (target_cpu): New variable.
12722 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12723 (BUILD_CC): Removed.
12724 (BUILD_CFLAGS): Likewise.
12725 (BUILD_CPPFLAGS): Likewise.
12726 (TARGET_CC): New variable.
12727 (TARGET_CFLAGS): Likewise.
12728 (TARGET_CPPFLAGS): Likewise.
12729 (TARGET_LDFLAGS): Likewise.
12731 (include): Use target_cpu instead of host_cpu.
12732 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12734 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12736 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12738 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12739 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12740 field 'false' to 'exec_on_false'.
12741 (grub_script_create_cmdif): Renamed argument names to reflect above
12744 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12746 * normal/script.c (grub_script_create_cmdif): Likewise.
12748 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12750 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12752 (grub_hfsplus_btree_recptr): Likewise.
12753 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12754 FILEBLOCK both to pass a block number and store next block
12756 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12757 overflow file correctly. Specify errors appropriately, because
12758 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12759 grub_hfsplus_btree_recptr to get the pointer to a found key.
12760 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12763 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12765 (_linux_mod_SOURCES): New variable.
12766 (_linux_mod_CFLAGS): Likewise.
12767 (_linux_mod_LDFLAGS): Likewise.
12768 (linux_mod_SOURCES): Likewise.
12769 (linux_mod_CFLAGS): Likewise.
12770 (linux_mod_LDFLAGS): Likewise.
12772 * DISTLIST: Added loader/i386/efi/linux.c,
12773 loader/i386/efi/linux_normal.c and
12774 include/grub/i386/efi/loader.h.
12776 * loader/i386/efi/linux.c: New file.
12777 * loader/i386/efi/linux_normal.c: Likewise.
12778 * include/grub/i386/efi/loader.h: Likewise.
12780 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12782 * commands/blocklist.c: New file.
12784 * DISTLIST: Added commands/blocklist.c.
12786 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12787 color for the background, and a darker color for the foreground.
12788 (grub_console_checkkey): Return READ_KEY.
12789 (grub_console_cls): Set the background to
12790 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12792 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12794 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12795 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12797 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12800 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12801 BG. The spec is wrong again.
12803 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12805 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12807 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12808 commands/blocklist.c.
12809 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12811 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12812 (blocklist_mod_SOURCES): New variable.
12813 (blocklist_mod_CFLAGS): Likewise.
12814 (blocklist_mod_LDFLAGS): Likewise.
12816 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12818 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12820 (lba_mode): Use %eax more intensively to reduce the code size.
12822 2006-05-20 Marco Gerards <marco@gnu.org>
12824 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12826 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12828 (script): Accept leading newlines.
12829 (newlines): New rule to describe 0 or more newlines.
12830 (commands): Accept `command' with trailing newline. Fixed the
12831 order in which arguments were passed to `grub_script_add_cmd'.
12832 Accept commands separated by newlines.
12833 (function): Changed to accept newlines.
12834 (menuentry) Rewritten.
12836 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12837 front of the list, instead of to the end.
12839 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12841 * util/i386/pc/grub-install.in (bindir): New variable.
12842 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12843 Shaver <lbgwjl@gmail.com>.
12845 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12847 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12848 grub/machine/linux.h
12849 * loader/i386/pc/linux.c: Likewise.
12851 * include/grub/i386/pc/linux.h: Moved to ...
12852 * include/grub/i386/linux.h: ... here.
12854 * include/grub/i386/linux.h (struct linux_kernel_params): New
12857 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12859 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12861 (grub_video_vbe_blit_glyph): Likewise.
12862 (grub_video_vbe_blit_bitmap): Likewise.
12863 (grub_video_vbe_blit_render_target): Likewise.
12865 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12867 * configure.ac (--with-platform): Properly quote the square
12870 2006-05-08 Marco Gerards <marco@gnu.org>
12872 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12874 (kernel_elf_HEADERS): ...to this. Updated all users.
12875 (grubof_symlist.c): Renamed from this...
12876 (kernel_elf_symlist.c): ...to this. Updated all users.
12877 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12878 (grubof_SOURCES): Renamed from this...
12879 (kernel_elf_SOURCES): ...to this.
12880 (grubof_HEADERS): Renamed from this...
12881 (kernel_elf_HEADERS): ...to this.
12882 (grubof_CFLAGS): Renamed from this...
12883 (kernel_elf_CFLAGS): ...to this.
12884 (grubof_ASFLAGS): Renamed from this...
12885 (kernel_elf_ASFLAGS): ...to this.
12886 (grubof_LDFLAGS): Renamed from this...
12887 (kernel_elf_LDFLAGS): ...to this.
12889 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12891 (kernel_elf_HEADERS): ...to this. Updated all users.
12892 (grubof_symlist.c): Renamed from this...
12893 (kernel_elf_symlist.c): ...to this. Updated all users.
12894 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12895 (grubof_SOURCES): Renamed from this...
12896 (kernel_elf_SOURCES): ...to this.
12897 (grubof_HEADERS): Renamed from this...
12898 (kernel_elf_HEADERS): ...to this.
12899 (grubof_CFLAGS): Renamed from this...
12900 (kernel_elf_CFLAGS): ...to this.
12901 (grubof_ASFLAGS): Renamed from this...
12902 (kernel_elf_ASFLAGS): ...to this.
12903 (grubof_LDFLAGS): Renamed from this...
12904 (kernel_elf_LDFLAGS): ...to this.
12906 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12907 `kernel.elf' instead of `grubof'.
12909 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12911 Add --with-platform to configure. Use pkglibdir instead of
12912 pkgdatadir. This is reported by Roger Leigh.
12914 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12915 (host_vendor): Likewise.
12916 (host_os): Likewise.
12917 (pkgdatadir): Likewise.
12918 (platform): New variable.
12919 (pkglibdir): Likewise.
12920 Use PKGLIBDIR instead of PKGDATADIR.
12922 * util/i386/pc/grub-install.in (datadir): Removed.
12923 (host_vendor): Likewise.
12924 (host_os): Likewise.
12925 (pkgdatadir): Likewise.
12926 (platform): New variable.
12927 (pkglibdir): Likewise.
12928 Use PKGLIBDIR instead of PKGDATADIR.
12930 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12931 instead of GRUB_DATADIR.
12933 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12935 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12938 * configure.ac (--with-platform): New option.
12939 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12941 * Makefile.in: Include a makefile based on PLATFORM instead of
12943 (pkgdatadir): Not appended by the machine type.
12944 (pkglibdir): Appended by the machine type.
12945 (host_vendor): Removed.
12946 (platform): New variable.
12947 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12948 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12949 (uninstall): Likewise.
12951 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12953 Use the environment context in the menu. Remove the commands
12954 "default" and "timeout", and use variables instead.
12956 * normal/menu.c: Include grub/env.h.
12957 (print_entry): Cast TITLE to silence gcc.
12958 (get_timeout): New function.
12959 (set_timeout): Likewise.
12960 (get_entry_number): Likewise.
12961 (run_menu): Use a default entry, a fallback entry and a timeout
12962 in the environment variables "default", "fallback" and
12963 "timeout". Also, tweak the default entry if it is not within the
12964 current menu entries.
12965 (grub_menu_run): Use a fallback entry in the environment variable
12968 * normal/main.c (read_config_file): Do not initialize
12969 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12971 (grub_normal_execute): Use a data slot to store the menu.
12973 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12974 fallback_entry and timeout.
12975 (struct grub_menu_list): Removed.
12976 (grub_menu_list_t): Likewise.
12977 (struct grub_context): Likewise.
12978 (grub_context_t): Likewise.
12979 (grub_context_get): Likewise.
12980 (grub_context_get_current_menu): Likewise.
12981 (grub_context_push_menu): Likewise.
12982 (grub_context_pop_menu): Likewise.
12983 (grub_default_init): Likewise.
12984 (grub_default_fini): Likewise.
12985 (grub_timeout_init): Likewise.
12986 (grub_timeout_fini): Likewise.
12988 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12990 (normal_mod_SOURCES): Removed normal/context.c.
12992 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12993 commands/default.c, commands/timeout.c and normal/context.c.
12994 (normal_mod_SOURCES): Removed normal/context.c.
12996 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12997 commands/timeout.c and normal/context.c.
12998 (normal_mod_SOURCES): Removed normal/context.c.
13000 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13001 commands/default.c, commands/timeout.c and normal/context.c.
13002 (normal_mod_SOURCES): Removed normal/context.c.
13004 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13006 (default_mod_SOURCES): Removed.
13007 (default_mod_CFLAGS): Likewise.
13008 (default_mod_LDFLAGS): Likewise.
13009 (timeout_mod_SOURCES): Removed.
13010 (timeout_mod_CFLAGS): Likewise.
13011 (timeout_mod_LDFLAGS): Likewise.
13013 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13016 * commands/default.c: Removed.
13017 * commands/timeout.c: Likewise.
13018 * normal/context.c: Likewise.
13020 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13022 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13024 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13026 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13027 "next" to "prev" for readability.
13028 (struct grub_env_sorted_var): New struct.
13029 (grub_env_context): Renamed to ...
13030 (initial_context): ... this.
13031 (grub_env_var_context): Renamed to ...
13032 (current_context): ... this.
13033 (grub_env_find): Look only at CURRENT_CONTEXT.
13034 (grub_env_context_open): Rewritten to copy exported variables from
13036 (grub_env_context_close): Rewritten according to the new
13037 scheme. Also, add an assertion to prevent the initial context from
13039 (grub_env_insert): Removed the code for the sorted list.
13040 (grub_env_remove): Likewise.
13041 (grub_env_export): Simply mark the variable with
13042 GRUB_ENV_VAR_GLOBAL.
13043 (grub_env_set): A cosmetic change for naming consistency.
13044 (grub_env_get): Likewise.
13045 (grub_env_unset): Likewise.
13046 (grub_env_iterate): Rewritten to sort variables within this
13048 (grub_register_variable_hook): Fixed for naming consistency. Call
13049 grub_env_find again, only if NAME is not found at the first time.
13050 (mangle_data_slot_name): New function.
13051 (grub_env_set_data_slot): Likewise.
13052 (grub_env_get_data_slot): Likewise.
13053 (grub_env_unset_data_slot): Likewise.
13055 * include/grub/env.h (grub_env_var_type): New enum.
13056 (GRUB_ENV_VAR_LOCAL): New constant.
13057 (GRUB_ENV_VAR_GLOBAL): Likewise.
13058 (GRUB_ENV_VAR_DATA): Likewise.
13059 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13061 (grub_env_set): Replace VAR with NAME for consistency.
13062 (grub_register_variable_hook): Likewise.
13063 (grub_env_export): Specify the name of the argument.
13064 (grub_env_set_data_slot): New prototype.
13065 (grub_env_get_data_slot): Likewise.
13066 (grub_env_unset_data_slot): Likewise.
13068 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13070 Extend the loader so that GRUB can accept a loader which comes
13071 back to GRUB when a loaded image exits. Also, this change adds
13072 support for a chainloader on EFI.
13074 * term/efi/console.c: Include grub/misc.h.
13075 (grub_console_checkkey): Display a scan code on the top for
13076 debugging. This will be removed once the EFI port gets stable.
13077 Correct the scan code mapping.
13079 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13080 allocate memory from larger regions, in order to reduce the number
13081 of allocated regions. Otherwise, the MacOSX loader panics.
13082 (filter_memory_map): Avoid less than 1MB for compatibility with
13084 (add_memory_regions): Allocate from the tail of a region, if
13085 possible, to avoid allocating a region near to 1MB, for the MacOSX
13088 * kern/efi/init.c (grub_efi_set_prefix): Specify
13089 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13091 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13092 argument IMAGE_HANDLE and specify it to get a loaded image.
13093 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13094 grub_efi_get_loaded_image.
13095 (grub_efi_get_filename): Divide the length by the size of
13097 (grub_efi_get_device_path): New function.
13098 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13099 the length by the size of grub_efi_char16_t for a file path device
13102 * kern/loader.c (grub_loader_noreturn): New variable.
13103 (grub_loader_set): Accept a new argument NORETURN. Set
13104 GRUB_LOADER_NORETURN to NORETURN.
13105 All callers changed.
13106 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13109 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13111 (grub_efi_get_loaded_image): Take an argument to specify an image
13114 * include/grub/loader.h (grub_loader_set): Added one more argument
13117 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13118 instead of grub_efi_open_protocol.
13119 (grub_efidisk_get_device_name): Likewise.
13120 (grub_efidisk_close): Print a newline.
13121 (grub_efidisk_get_device_handle): Fixed to use
13122 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13123 GRUB_EFI_DEVICE_PATH_TYPE.
13125 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13126 * kern/efi/efi.c (device_path_guid): ... here.
13128 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13130 (kernel_mod_HEADERS): Added efi/disk.h.
13131 (_chain_mod_SOURCES): New variable.
13132 (_chain_mod_CFLAGS): Likewise.
13133 (_chain_mod_LDFLAGS): Likewise.
13134 (chain_mod_SOURCES): Likewise.
13135 (chain_mod_CFLAGS): Likewise.
13136 (chain_mod_LDFLAGS): Likewise.
13138 * DISTLIST: Added include/grub/efi/chainloader.h,
13139 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13141 * include/grub/efi/chainloader.h: New file.
13142 * loader/efi/chainloader.c: Likewise.
13143 * loader/efi/chainloader_normal.c: Likewise.
13145 2006-04-30 Marco Gerards <marco@gnu.org>
13147 * commands/configfile.c (grub_cmd_source): New function.
13148 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13149 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13151 2006-04-30 Marco Gerards <marco@gnu.org>
13153 * normal/execute.c (grub_script_execute_cmd): Change the return
13154 type to `grub_err_t'. Correctly return the error.
13155 (grub_script_execute_cmdline): In case a command line is not a
13156 command or a function, try to interpret it as an assignment.
13158 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13160 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13161 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13162 skip a node whose name is obviously invalid as UTF-16,
13163 i.e. contains a NUL character. Stop the iteration when the last
13164 directory entry is found. Instead of using the return value of
13165 grub_hfsplus_btree_iterate_node, store the value in RET and use
13166 it, because the iterator can be stopped by the last directory
13169 2006-04-30 Marco Gerards <marco@gnu.org>
13171 * include/grub/env.h (grub_env_export): New prototype. Reported
13172 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13174 2006-04-30 Marco Gerards <marco@gnu.org>
13176 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13177 size of the extents in a catalog file record.
13179 2006-04-29 Marco Gerards <marco@gnu.org>
13181 * commands/configfile.c (grub_cmd_configfile): Execute the
13182 configfile within its own context.
13184 * include/grub/env.h (grub_env_context_open): New prototype.
13185 (grub_env_context_close): Likewise.
13187 * kern/env.c (grub_env): Removed.
13188 (grub_env_sorted): Likewise.
13189 (grub_env_context): New variable.
13190 (grub_env_var_context): Likewise.
13191 (grub_env_find): Search both the active context and the global
13193 (grub_env_context_open): New function.
13194 (grub_env_context_close): Likewise.
13195 (grub_env_insert): Likewise.
13196 (grub_env_remove): Likewise.
13197 (grub_env_export): Likewise.
13198 (grub_env_set): Changed to use helper functions to avoid code
13200 (grub_env_iterate): Rewritten so both the current context and the
13201 global context are being used.
13203 * normal/command.c (export_command): New function.
13204 (grub_command_init): Register the `export' function.
13206 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13208 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13209 explicitly to suppress gcc's warnings.
13210 * fs/fat.c (grub_fat_find_dir): Likewise.
13211 (grub_fat_label): Likewise.
13212 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13213 (grub_xfs_mount): Likewise.
13214 (grub_xfs_label): Likewise.
13215 * fs/affs.c (grub_affs_mount): Likewise.
13216 (grub_affs_label): Likewise.
13217 (grub_affs_iterate_dir): Likewise.
13218 * fs/sfs.c (grub_sfs_mount): Likewise.
13219 (grub_sfs_iterate_dir): Likewise.
13220 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13221 * fs/hfs.c (grub_hfs_mount): Likewise.
13222 (grub_hfs_cmp_catkeys): Likewise.
13223 (grub_hfs_find_dir): Likewise.
13224 (grub_hfs_dir): Likewise.
13225 (grub_hfs_label): Likewise.
13226 * fs/jfs.c (grub_jfs_mount): Likewise.
13227 (grub_jfs_opendir): Likewise.
13228 (grub_jfs_getent): Likewise.
13229 (grub_jfs_lookup_symlink): Likewise.
13230 (grub_jfs_label): Likewise.
13231 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13232 (grub_hfsplus_iterate_dir): Likewise.
13233 (grub_hfsplus_btree_iterate_node): Made static.
13235 * util/grub-emu.c (prefix): New variable.
13236 (grub_machine_set_prefix): New function.
13237 (main): Do not set the environment variable "prefix" here. Only
13238 set PREFIX, which is used later by grub_machine_set_prefix.
13240 * include/grub/video.h: Do not include grub/symbol.h.
13241 (grub_video_register): Not exported. This symbol is not defined in
13243 (grub_video_unregister): Likewise.
13244 (grub_video_iterate): Likewise.
13245 (grub_video_setup): Likewise.
13246 (grub_video_restore): Likewise.
13247 (grub_video_get_info): Likewise.
13248 (grub_video_get_blit_format): Likewise.
13249 (grub_video_set_palette): Likewise.
13250 (grub_video_get_palette): Likewise.
13251 (grub_video_set_viewport): Likewise.
13252 (grub_video_get_viewport): Likewise.
13253 (grub_video_map_color): Likewise.
13254 (grub_video_map_rgb): Likewise.
13255 (grub_video_map_rgba): Likewise.
13256 (grub_video_fill_rect): Likewise.
13257 (grub_video_blit_glyph): Likewise.
13258 (grub_video_blit_bitmap): Likewise.
13259 (grub_video_blit_render_target): Likewise.
13260 (grub_video_scroll): Likewise.
13261 (grub_video_swap_buffers): Likewise.
13262 (grub_video_create_render_target): Likewise.
13263 (grub_video_delete_render_target): Likewise.
13264 (grub_video_set_active_render_target): Likewise.
13266 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13268 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13270 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13271 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13272 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13273 instead of $(srcdir)/genkernsyms.sh.
13275 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13276 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13277 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13278 instead of $(srcdir)/genkernsyms.sh.
13280 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13281 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13282 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13283 instead of $(srcdir)/genkernsyms.sh.
13285 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13286 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13287 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13288 instead of $(srcdir)/genkernsyms.sh.
13290 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13293 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13295 (gensymlist.sh): New target.
13296 (genkernsyms.sh): Likewise.
13298 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13299 genkernsyms.sh.in and gensymlist.sh.in.
13301 * genkernsyms.sh: Removed.
13302 * gensymlist.sh: Likewise.
13304 * genkernsyms.sh.in: New file.
13305 * gensymlist.sh.in: Likewise.
13307 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13309 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13310 clobber "prefix", since we may have already set it manually.
13312 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13314 * kern/misc.c (abort): New alias for grub_abort.
13316 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13318 A new machine-specific function "grub_machine_set_prefix" is
13319 defined. This is called after loading modules, so that a prefix
13320 initialization can use modules. Also, this change adds an
13321 intensive debugging feature for the memory manager via the
13322 configure option "--enable-mm-debug".
13324 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13327 * kern/sparc64/ieee1275/init.c (abort): Removed.
13328 (grub_stop): Likewise.
13329 (grub_exit): New function.
13330 (grub_set_prefix): Renamed to ...
13331 (grub_machine_set_prefix): ... this.
13332 (grub_machine_init): Do not call grub_set_prefix.
13334 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13335 (grub_machine_set_prefix): ... this.
13336 (grub_machine_init): Do not call grub_set_prefix.
13338 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13339 (grub_machine_init): Do not set the prefix here.
13341 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13343 * kern/efi/init.c: Include grub/mm.h.
13344 (grub_efi_set_prefix): New function.
13346 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13347 (grub_efi_get_filename): New function.
13348 (grub_print_device_path): Renamed to ...
13349 (grub_efi_print_device_path): ... this.
13351 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13352 [MM_DEBUG] (grub_realloc): Likewise.
13353 [MM_DEBUG] (grub_free): Likewise.
13354 [MM_DEBUG] (grub_memalign): Likewise.
13355 [MM_DEBUG] (grub_mm_debug): New variable.
13356 [MM_DEBUG] (grub_debug_malloc): New function.
13357 [MM_DEBUG] (grub_debug_free): New function.
13358 [MM_DEBUG] (grub_debug_realloc): New function.
13359 [MM_DEBUG] (grub_debug_memalign): New function.
13361 * kern/misc.c (grub_abort): Print a newline to distinguish
13364 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13365 grub_set_root_dev after loading modules. This is necessary when
13366 setting a prefix depends on modules.
13368 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13369 (grub_efi_print_device_path): ... this.
13370 (grub_efi_get_filename): New prototype.
13371 (grub_efi_set_prefix): Likewise.
13373 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13375 (grub_efidisk_get_device_handle): New prototype.
13376 (grub_efidisk_get_device_name): Likewise.
13378 * include/grub/mm.h: Include config.h.
13379 (MM_DEBUG): Removed.
13380 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13381 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13382 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13383 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13384 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13385 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13386 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13387 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13388 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13390 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13392 * disk/efi/efidisk.c: Include grub/partition.h.
13393 (iterate_child_devices): New function.
13394 (add_device): First, compare only last device path nodes, so that
13395 devices are sorted by the types.
13396 (grub_efidisk_get_device_handle): New function.
13397 (grub_efidisk_get_device_name): Likewise.
13399 * configure.ac (--enable-mm-debug): New option to enable the
13400 memory manager debugging feature. This makes the binary much
13401 bigger, so is disabled by default.
13403 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13405 Use grub_abort instead of grub_stop, and grub_exit must be
13406 define in each architecture now. Also, this change adds support
13409 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13410 (grub_getkey): New function.
13411 (grub_term_get_current): Likewise.
13413 * util/i386/pc/grub-setup.c: Include grub/term.h.
13414 (grub_getkey): New function.
13415 (grub_term_get_current): Likewise.
13417 * util/misc.c (grub_stop): Renamed to ...
13418 (grub_exit): ... this.
13420 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13421 (grub_exit): ... this.
13422 (grub_machine_init): Use grub_abort instead of abort.
13423 (grub_stop): Removed.
13425 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13428 * kern/i386/pc/startup.S (grub_exit): New function.
13429 (cold_reboot): New label.
13431 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13432 (grub_efi_init): Call grub_efidisk_init.
13433 (grub_efi_fini): Call grub_efidisk_fini.
13435 * kern/efi/efi.c: Include grub/mm.h.
13436 (grub_efi_console_control_guid): Renamed to ...
13437 (console_control_guid): ... this.
13438 (grub_efi_loaded_image_guid): Renamed to ...
13439 (loaded_image_guid): ... this.
13440 (grub_efi_locate_handle): New function.
13441 (grub_efi_open_protocol): Likewise.
13442 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13443 GRUB_EFI_CONSOLE_CONTROL_GUID.
13444 (grub_efi_exit): Removed.
13445 (grub_stop): Likewise.
13446 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13447 (grub_exit): New function.
13448 (grub_print_device_path): Likewise.
13450 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13451 (grub_enter_rescue_mode): Register "exit".
13453 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13454 (grub_abort): New function.
13456 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13458 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13460 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13462 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13463 (grub_print_device_path): New prototype.
13464 (grub_efi_locate_handle): Likewise.
13465 (grub_efi_open_protocol): Likewise.
13467 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13468 * disk/efi/efidisk.c: Likewise.
13470 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13472 * include/grub/efi/console_control.h
13473 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13475 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13476 last 8 bytes as an array.
13477 (GRUB_EFI_DISK_IO_GUID): New macro.
13478 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13479 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13480 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13482 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13483 (struct grub_efi_device_path): Rename the member "sub_type" to
13485 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13486 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13487 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13488 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13489 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13490 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13491 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13492 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13493 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13494 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13495 (struct grub_efi_pci_device_path): New structure.
13496 (grub_efi_pci_device_path_t): New type.
13497 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13498 (struct grub_efi_pccard_device_path): New structure.
13499 (grub_efi_pccard_device_path_t): New type.
13500 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13501 (struct grub_efi_memory_mapped_device_path): New structure.
13502 (grub_efi_memory_mapped_device_path_t): New type.
13503 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13504 (struct grub_efi_vendor_device_path): New structure.
13505 (grub_efi_vendor_device_path_t): New type.
13506 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13507 (struct grub_efi_controller_device_path): New structure.
13508 (grub_efi_controller_device_path_t): New type.
13509 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13510 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13511 (struct grub_efi_acpi_device_path): New structure.
13512 (grub_efi_acpi_device_path_t): New type.
13513 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13514 (struct grub_efi_expanded_acpi_device_path): New structure.
13515 (grub_efi_expanded_acpi_device_path_t): New type.
13516 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13517 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13518 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13519 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13520 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13521 (struct grub_efi_atapi_device_path): New structure.
13522 (grub_efi_atapi_device_path_t): New type.
13523 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13524 (struct grub_efi_fibre_channel_device_path): New structure.
13525 (grub_efi_fibre_channel_device_path_t): New type.
13526 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13527 (struct grub_efi_1394_device_path): New structure.
13528 (grub_efi_1394_device_path_t): New type.
13529 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13530 (struct grub_efi_usb_device_path): New structure.
13531 (grub_efi_usb_device_path_t): New type.
13532 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13533 (struct grub_efi_usb_class_device_path): New structure.
13534 (grub_efi_usb_class_device_path_t): New type.
13535 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13536 (struct grub_efi_i2o_device_path): New structure.
13537 (grub_efi_i2o_device_path_t): New type.
13538 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13539 (struct grub_efi_mac_address_device_path): New structure.
13540 (grub_efi_mac_address_device_path_t): New type.
13541 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13542 (struct grub_efi_ipv4_device_path): New structure.
13543 (grub_efi_ipv4_device_path_t): New type.
13544 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13545 (struct grub_efi_ipv6_device_path): New structure.
13546 (grub_efi_ipv6_device_path_t): New type.
13547 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13548 (struct grub_efi_infiniband_device_path): New structure.
13549 (grub_efi_infiniband_device_path_t): New type.
13550 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13551 (struct grub_efi_uart_device_path): New structure.
13552 (grub_efi_uart_device_path_t): New type.
13553 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13554 (struct grub_efi_vendor_messaging_device_path): New structure.
13555 (grub_efi_vendor_messaging_device_path_t): New type.
13556 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13557 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13558 (struct grub_efi_hard_drive_device_path): New structure.
13559 (grub_efi_hard_drive_device_path_t): New type.
13560 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13561 (struct grub_efi_cdrom_device_path): New structure.
13562 (grub_efi_cdrom_device_path_t): New type.
13563 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13564 (struct grub_efi_vendor_media_device_path): New structure.
13565 (grub_efi_vendor_media_device_path_t): New type.
13566 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13567 (struct grub_efi_file_path_device_path): New structure.
13568 (grub_efi_file_path_device_path_t): New type.
13569 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13570 (struct grub_efi_protocol_device_path): New structure.
13571 (grub_efi_protocol_device_path_t): New type.
13572 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13573 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13574 (struct grub_efi_bios_device_path): New structure.
13575 (grub_efi_bios_device_path_t): New type.
13576 (struct grub_efi_disk_io): New structure.
13577 (grub_efi_disk_io_t): New type.
13578 (struct grub_efi_block_io_media): New structure.
13579 (grub_efi_block_io_media_t): New type.
13580 (struct grub_efi_block_io): New structure.
13581 (grub_efi_block_io_t): New type.
13583 * include/grub/misc.h (grub_stop): Removed.
13584 (grub_exit): New prototype.
13585 (grub_abort): Likewise.
13587 * include/grub/disk.h (enum grub_disk_dev_id): Added
13588 GRUB_DISK_DEVICE_EFIDISK_ID.
13590 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13591 disk/efi/efidisk.c.
13592 (kernel_syms.lst): Remove the target if an error occurs.
13594 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13596 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13597 as it was simply too buggy.
13599 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13601 * kern/misc.c (grub_lltoa): New function.
13602 (grub_vsprintf): Added support for the long long suffix,
13605 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13607 * Makefile.in (LDFLAGS): Add variable.
13608 (LD): Remove variable.
13609 * configure.ac: Add -m32 to LDFLAGS.
13610 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13611 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13612 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13613 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13614 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13616 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13617 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13618 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13620 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13622 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13623 length for unknown glyph.
13625 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13627 Add support for pre-loaded modules into the EFI port.
13629 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13630 completely. Accept one more argument DIR. The caller has changed.
13632 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13634 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13635 (grub_efi_loaded_image_guid): New variable.
13636 (grub_efi_get_loaded_image): New function.
13637 (grub_arch_modules_addr): Likewise.
13639 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13642 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13643 (struct grub_efi_loaded_image): New structure.
13644 (grub_efi_loaded_image_t): New type.
13646 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13648 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13649 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13650 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13652 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13654 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13656 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13658 * DISTLIST: Added include/grub/efi/console.h,
13659 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13660 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13662 * include/grub/efi/console.h: New file.
13663 * include/grub/efi/time.h: Likewise.
13664 * include/grub/i386/efi/kernel.h: Likewise.
13665 * kern/efi/init.c: Likewise.
13666 * kern/efi/mm.c: Likewise.
13667 * term/efi/console.c: Likewise.
13669 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13670 (grub_stop): Removed.
13671 (grub_get_rtc): Likewise.
13672 (grub_machine_init): Simply call grub_efi_init.
13673 (grub_machine_fini): Call grub_efi_fini.
13675 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13676 (grub_efi_output_string): Removed.
13677 (grub_efi_stall): New function.
13678 (grub_stop): Likewise.
13679 (grub_get_rtc): Likewise.
13681 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13682 (grub_efi_stall): New prototype.
13683 (grub_efi_allocate_pages): Likewise.
13684 (grub_efi_free_pages): Likewise.
13685 (grub_efi_get_memory_map): Likewise.
13686 (grub_efi_mm_init): Likewise.
13687 (grub_efi_mm_fini): Likewise.
13688 (grub_efi_init): Likewise.
13689 (grub_efi_fini): Likewise.
13691 * include/grub/i386/efi/time.h: Do not include
13692 grub/symbol.h. Include grub/efi/time.h.
13693 (GRUB_TICKS_PER_SECOND): Removed.
13694 (grub_get_rtc): Likewise.
13696 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13697 Added padding. The EFI spec is buggy.
13698 (GRUB_EFI_BLACK): New macro.
13699 (GRUB_EFI_BLUE): Likewise.
13700 (GRUB_EFI_GREEN): Likewise.
13701 (GRUB_EFI_CYAN): Likewise.
13702 (GRUB_EFI_RED): Likewise.
13703 (GRUB_EFI_MAGENTA): Likewise.
13704 (GRUB_EFI_BROWN): Likewise.
13705 (GRUB_EFI_LIGHTGRAY): Likewise.
13706 (GRUB_EFI_BRIGHT): Likewise.
13707 (GRUB_EFI_DARKGRAY): Likewise.
13708 (GRUB_EFI_LIGHTBLUE): Likewise.
13709 (GRUB_EFI_LIGHTGREEN): Likewise.
13710 (GRUB_EFI_LIGHTCYAN): Likewise.
13711 (GRUB_EFI_LIGHTRED): Likewise.
13712 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13713 (GRUB_EFI_YELLOW): Likewise.
13714 (GRUB_EFI_WHITE): Likewise.
13715 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13716 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13717 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13718 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13719 (GRUB_EFI_BACKGROUND_RED): Likewise.
13720 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13721 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13722 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13723 (GRUB_EFI_TEXT_ATTR): Likewise.
13725 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13726 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13727 (kernel_mod_HEADERS): Added efi/time.h.
13729 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13731 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13732 include/grub/efi/api.h, include/grub/efi/console_control.h,
13733 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13734 include/grub/i386/efi/time.h, kern/efi/efi.c,
13735 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13736 and util/i386/efi/grub-mkimage.c.
13738 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13740 * genmk.rb (PModule#rule): Do not export symbols if
13741 #{prefix}_EXPORTS is set to "no".
13743 * conf/i386-efi.mk: New file.
13744 * conf/i386-efi.rmk: Likewise.
13745 * include/grub/efi/api.h: Likewise.
13746 * include/grub/efi/console_control.h: Likewise.
13747 * include/grub/efi/efi.h: Likewise.
13748 * include/grub/efi/pe32.h: Likewise.
13749 * include/grub/i386/efi/time.h: Likewise.
13750 * kern/efi/efi.c: Likewise.
13751 * kern/i386/efi/init.c: Likewise.
13752 * kern/i386/efi/startup.S: Likewise.
13753 * util/i386/efi/grub-mkimage.c: Likewise.
13755 2006-04-17 Marco Gerards <marco@gnu.org>
13757 * include/grub/script.h: Include <grub/parser.h> and
13758 "grub_script.tab.h".
13759 (struct grub_lexer_param): New struct.
13760 (struct grub_parser_param): Likewise.
13761 (grub_script_create_arglist): Pass the state in an argument.
13762 (grub_script_add_arglist): Likewise.
13763 (grub_script_create_cmdline): Likewise.
13764 (grub_script_create_cmdblock): Likewise.
13765 (grub_script_create_cmdif): Likewise.
13766 (grub_script_create_cmdmenu): Likewise.
13767 (grub_script_add_cmd): Likewise.
13768 (grub_script_arg_add): Likewise.
13769 (grub_script_lexer_ref): Likewise.
13770 (grub_script_lexer_deref): Likewise.
13771 (grub_script_lexer_record_start): Likewise.
13772 (grub_script_lexer_record_stop): Likewise.
13773 (grub_script_mem_record): Likewise.
13774 (grub_script_mem_record_stop): Likewise.
13775 (grub_script_malloc): Likewise.
13776 (grub_script_yylex): Likewise.
13777 (grub_script_yyparse): Likewise.
13778 (grub_script_yyerror): Likewise.
13779 (grub_script_yylex): Likewise.
13780 (grub_script_lexer_init): Return the state.
13782 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13783 (grub_script_lexer_done): Likewise.
13784 (grub_script_lexer_getline): Likewise.
13785 (grub_script_lexer_refs): Likewise.
13786 (script): Likewise.
13787 (newscript): Likewise.
13788 (record): Likewise.
13789 (recording): Likewise.
13790 (recordpos): Likewise.
13791 (recordlen): Likewise.
13792 (grub_script_lexer_init): Return the state instead of setting
13794 (grub_script_lexer_ref): Use the newly added argument for state
13795 instead of globals.
13796 (grub_script_lexer_deref): Likewise.
13797 (grub_script_lexer_record_start): Likewise.
13798 (grub_script_lexer_record_stop): Likewise.
13799 (recordchar): Likewise.
13800 (nextchar): Likewise.
13801 (grub_script_yylex2): Likewise.
13802 (grub_script_yylex): Likewise.
13803 (grub_script_yyerror): Likewise.
13805 * normal/parser.y (func_mem): Removed variable.
13806 (menu_entry): Likewise.
13808 (%lex-param): New parser option.
13809 (%parse-param): Likewise.
13810 (script): Always return the AST.
13811 (argument): Pass the state around.
13812 (arguments): Likewise.
13813 (grubcmd): Likewise.
13814 (commands): Likewise.
13815 (function): Likewise.
13816 (menuentry): Likewise.
13817 (if_statement): Likewise.
13820 * normal/script.c (grub_script_memused): Removed variable.
13821 (grub_script_parsed): Likewise.
13822 (grub_script_malloc): Added a state argument. Use that instead of
13824 (grub_script_mem_record): Likewise.
13825 (grub_script_mem_record_stop): Likewise.
13826 (grub_script_arg_add): Likewise.
13827 (grub_script_add_arglist): Likewise.
13828 (grub_script_create_cmdline): Likewise.
13829 (grub_script_create_cmdif): Likewise.
13830 (grub_script_create_cmdmenu): Likewise.
13831 (grub_script_add_cmd): Likewise.
13832 (grub_script_parse): Setup the state before calling the parser.
13834 2006-04-16 Marco Gerards <marco@gnu.org>
13836 * normal/command.c (grub_command_init): Remove the title command.
13838 * normal/lexer.c (grub_script_yylex): Renamed from this...
13839 (grub_script_yylex2): ... to this.
13840 (grub_script_yylex): New function. Temporary
13841 introduced to filter some tokens.
13842 (grub_script_yyerror): Print a newline.
13844 * normal/main.c (read_config_file): Output information about the
13845 lines that contain errors. Wait for a key after all lines have
13846 been processed. Don't return an empty menu.
13848 * normal/parser.y (func_mem): Don't initialize.
13849 (menu_entry): Likewise.
13850 (err): New variable.
13851 (script): Don't return anything when an error was encountered.
13852 (ws, returns): Removed rules.
13853 (argument): Disabled concatenated variable support.
13854 (arguments): Remove explicit separators.
13855 (grubcmd): Likewise.
13856 (function): Likewise.
13857 (menuentry): Likewise.
13859 (commands): Likewise. Add error handling.
13861 * normal/script.c (grub_script_create_cmdline): If
13862 `grub_script_parsed' is 0, assume the parser encountered an error.
13864 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13866 * configure.ac: Add support for EFI. Fix the typo
13867 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13869 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13871 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13872 foreign multibyte characters should be shown correctly.
13874 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13876 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13878 (read_config_file): Made it to close file before returning.
13880 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13882 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13883 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13884 video/i386/pc/vbefill.c.
13886 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13887 video/i386/pc/vbefill.c.
13889 * include/grub/video.h (grub_video_blit_format): New enum.
13890 (grub_video_mode_info): Added new member blit_format.
13891 (grub_video_get_blit_format): New function prototype.
13893 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13894 function prototype.
13895 (grub_video_vbe_map_rgb): Likewise.
13896 (grub_video_vbe_unmap_color): Likewise.
13898 * include/grub/i386/pc/vbeblit.h: New file.
13900 * include/grub/i386/pc/vbefill.h: New file.
13902 * video/video.c (grub_video_get_blit_format): New function.
13903 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13904 (grub_video_vbe_map_rgb): Likewise.
13905 (grub_video_vbe_unmap_color): Likewise.
13907 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13909 (grub_video_vbe_blit_render_target): Changed to use more optimized
13911 (grub_video_vbe_setup): Added detection for optimized settings.
13912 (grub_video_vbe_create_render_target): Likewise.
13914 * video/i386/pc/vbeblit.c: New file.
13916 * video/i386/pc/vbefill.c: New file.
13918 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13920 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13923 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13924 parsing to support both hex and dec ranges. If filename was missing
13925 show usage information.
13927 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13929 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13930 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13932 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13933 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13934 (video_mod_SOURCES): Added.
13935 (video_mod_CFLAGS): Likewise.
13936 (video_mod_LDFLAGS): Likewise.
13937 (gfxterm_mod_SOURCES): Likewise.
13938 (gfxterm_mod_CFLAGS): Likewise.
13939 (gfxterm_mod_LDFLAGS): Likewise.
13940 (videotest_mod_SOURCES): Likewise.
13941 (videotest_mod_CFLAGS): Likewise.
13942 (videotest_mod_LDFLAGS): Likewise.
13943 (vesafb_mod_SOURCES): Removed.
13944 (vesafb_mod_CFLAGS): Likewise.
13945 (vesafb_mod_LDFLAGS): Likewise.
13946 (vga_mod_SOURCES): Likewise.
13947 (vga_mod_CFLAGS): Likewise.
13948 (vga_mod_LDFLAGS): Likewise.
13950 * commands/videotest.c: New file.
13952 * font/manager.c (fill_with_default_glyph): Modified to use
13954 (grub_font_get_glyph): Likewise.
13955 (fontmanager): Renamed from this...
13956 (font_manager): ... to this.
13958 * include/grub/font.h (grub_font_glyph): Added new structure.
13959 (grub_font_get_glyph): Modified to use grub_font_glyph.
13961 * include/grub/misc.h (grub_abs): Added as inline function.
13963 * include/grub/video.h: New file.
13965 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13966 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13967 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13968 (grub_vbe_get_controller_info): Renamed from this...
13969 (grub_vbe_bios_get_controller_info): ... to this.
13970 (grub_vbe_get_mode_info): Renamed from this...
13971 (grub_vbe_bios_get_mode_info): ... to this.
13972 (grub_vbe_set_mode): Renamed from this...
13973 (grub_vbe_bios_set_mode): ... to this.
13974 (grub_vbe_get_mode): Renamed from this...
13975 (grub_vbe_bios_get_mode): ... to this.
13976 (grub_vbe_set_memory_window): Renamed from this...
13977 (grub_vbe_bios_set_memory_window): ... to this.
13978 (grub_vbe_get_memory_window): Renamed from this...
13979 (grub_vbe_bios_get_memory_window): ... to this.
13980 (grub_vbe_set_scanline_length): Renamed from this...
13981 (grub_vbe_set_scanline_length): ... to this.
13982 (grub_vbe_get_scanline_length): Renamed from this...
13983 (grub_vbe_bios_get_scanline_length): ... to this.
13984 (grub_vbe_set_display_start): Renamed from this...
13985 (grub_vbe_bios_set_display_start): ... to this.
13986 (grub_vbe_get_display_start): Renamed from this...
13987 (grub_vbe_bios_get_display_start): ... to this.
13988 (grub_vbe_set_palette_data): Renamed from this...
13989 (grub_vbe_bios_set_palette_data): ... to this.
13990 (grub_vbe_set_pixel_rgb): Removed.
13991 (grub_vbe_set_pixel_index): Likewise.
13993 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13995 (grub_vbe_bios_get_controller_info): ... to this.
13996 (grub_vbe_get_mode_info): Renamed from this...
13997 (grub_vbe_bios_get_mode_info): ... to this.
13998 (grub_vbe_set_mode): Renamed from this...
13999 (grub_vbe_bios_set_mode): ... to this.
14000 (grub_vbe_get_mode): Renamed from this...
14001 (grub_vbe_bios_get_mode): ... to this.
14002 (grub_vbe_set_memory_window): Renamed from this...
14003 (grub_vbe_bios_set_memory_window): ... to this.
14004 (grub_vbe_get_memory_window): Renamed from this...
14005 (grub_vbe_bios_get_memory_window): ... to this.
14006 (grub_vbe_set_scanline_length): Renamed from this...
14007 (grub_vbe_set_scanline_length): ... to this.
14008 (grub_vbe_get_scanline_length): Renamed from this...
14009 (grub_vbe_bios_get_scanline_length): ... to this.
14010 (grub_vbe_set_display_start): Renamed from this...
14011 (grub_vbe_bios_set_display_start): ... to this.
14012 (grub_vbe_get_display_start): Renamed from this...
14013 (grub_vbe_bios_get_display_start): ... to this.
14014 (grub_vbe_set_palette_data): Renamed from this...
14015 (grub_vbe_bios_set_palette_data): ... to this.
14016 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14017 getting corrupted after calling it. Added more pushes and pops.
14018 (grub_vbe_bios_set_mode): Likewise.
14019 (grub_vbe_bios_get_mode): Likewise.
14020 (grub_vbe_bios_get_memory_window): Likewise.
14021 (grub_vbe_bios_set_scanline_length): Likewise.
14022 (grub_vbe_bios_get_scanline_length): Likewise.
14023 (grub_vbe_bios_get_display_start): Likewise.
14024 (grub_vbe_bios_set_palette_data): Likewise.
14026 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14027 (cl_insert): Likewise.
14028 (cl_delete): Likewise.
14030 * term/gfxterm.c: New file.
14032 * term/i386/pc/vesafb.c: Removed file.
14034 * video/video.c: New file.
14036 * video/i386/pc/vbe.c (real2pm): Added new function.
14037 (grub_video_vbe_draw_pixel): Likewise.
14038 (grub_video_vbe_get_video_ptr): Likewise.
14039 (grub_video_vbe_get_pixel): Likewise
14040 (grub_video_vbe_init): Likewise.
14041 (grub_video_vbe_fini): Likewise.
14042 (grub_video_vbe_setup): Likewise.
14043 (grub_video_vbe_get_info): Likewise.
14044 (grub_video_vbe_set_palette): Likewise.
14045 (grub_video_vbe_get_palette): Likewise.
14046 (grub_video_vbe_set_viewport): Likewise.
14047 (grub_video_vbe_get_viewport): Likewise.
14048 (grub_video_vbe_map_color): Likewise.
14049 (grub_video_vbe_map_rgb): Likewise.
14050 (grub_video_vbe_map_rgba): Likewise.
14051 (grub_video_vbe_unmap_color): Likewise.
14052 (grub_video_vbe_fill_rect): Likewise.
14053 (grub_video_vbe_blit_glyph): Likewise.
14054 (grub_video_vbe_blit_bitmap): Likewise.
14055 (grub_video_vbe_blit_render_target): Likewise.
14056 (grub_video_vbe_scroll): Likewise.
14057 (grub_video_vbe_swap_buffers): Likewise.
14058 (grub_video_vbe_create_render_target): Likewise.
14059 (grub_video_vbe_delete_render_target): Likewise.
14060 (grub_video_vbe_set_active_render_target): Likewise.
14061 (grub_vbe_set_pixel_rgb): Remove function.
14062 (grub_vbe_set_pixel_index): Likewise.
14063 (index_color_mode): Remove static variable.
14064 (active_mode): Likewise.
14065 (framebuffer): Likewise.
14066 (bytes_per_scan_line): Likewise.
14067 (grub_video_vbe_adapter): Added new static variable.
14068 (framebuffer): Likewise.
14069 (render_target): Likewise.
14070 (initial_mode): Likewise.
14071 (mode_in_use): Likewise.
14072 (mode_list): Likewise.
14074 2006-03-10 Marco Gerards <marco@gnu.org>
14076 * configure.ac (AC_INIT): Bumped to 1.93.
14078 * DISTLIST: Added `include/grub/hfs.h'.
14080 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14082 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14083 18H, which might help the BIOS falling back to next boot media.
14085 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14087 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14088 Poe Chen <poe.poechen@gmail.com>.
14090 2006-01-17 Marco Gerards <marco@gnu.org>
14092 * include/grub/normal.h: Include <grub/script.h>.
14093 (grub_command_list): Removed struct.
14094 (grub_command_list_t): Removed type.
14095 (grub_menu_entry): Remove members `num' and `command_list'. Add
14096 members `commands' and `sourcecode'.
14097 * include/grub/script.h: Add inclusion guards.
14098 (grub_script_cmd_menuentry): New struct.
14099 (grub_script_execute_menuentry): New prototype.
14100 (grub_script_lexer_record_start): Likewise.
14101 (grub_script_lexer_record_stop): Likewise.
14102 * normal/execute.c (grub_script_execute_menuentry): New function.
14103 * normal/lexer.c (record, recording, recordpos, recordlen): New
14105 (grub_script_lexer_record_start): New function.
14106 (grub_script_lexer_record_stop): Likewise.
14107 (recordchar): Likewise.
14108 (nextchar): Likewise.
14109 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14110 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14111 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14112 (current_menu): New variable.
14113 (free_menu): Mainly rewritten.
14114 (grub_normal_menu_addentry): New function.
14115 (read_config_file): Rewritten.
14116 * normal/menu.c (run_menu_entry): Mainly rewritten.
14117 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14119 (run): Mainly rewritten.
14120 * normal/parser.y (menu_entry): New variable.
14121 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14122 (menuentry): New rule.
14123 (command): Add `menuentry'.
14124 (if_statement): Allow additional returns before `fi'.
14125 * normal/script.c (grub_script_create_cmdmenu): New function.
14127 2006-01-03 Marco Gerards <marco@gnu.org>
14129 * INSTALL: GNU Bison is required.
14130 * configure.ac: Rewritten the test to detect Bison.
14131 * Makefile.in (YACC): New variable. Reported by Xun Sun
14132 <xun.sun.cn@gmail.com>.
14134 2006-01-03 Marco Gerards <marco@gnu.org>
14136 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14137 the HFS+ filesystem to filesystem blocks.
14138 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14139 GCC warning is silenced.
14141 2006-01-03 Marco Gerards <marco@gnu.org>
14143 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14144 read from disk from big endian to host byte order.
14146 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14148 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14150 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14151 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14152 embedded HFS+ filesystem.
14153 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14154 (grub_hfs_sblock): Move from here...
14155 * include/grub/hfs.h: To here... New file.
14156 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14158 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14160 (grub_hfsplus_volheader): Change type of member `magic' to
14162 (grub_hfsplus_data): Add new member `embedded_offset'.
14163 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14165 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14166 Calculate the offset.
14168 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14170 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14172 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14174 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14176 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14177 ENV->NAME is NULL after allocating ENV->VALUE.
14179 2005-12-25 Marco Gerards <marco@gnu.org>
14181 * kern/env.c (grub_env_set): Rewritten the error handling code.
14183 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14185 * geninit.sh: Made more robust, and more portable.
14187 2005-12-25 Marco Gerards <marco@gnu.org>
14189 Add support for Apple HFS+ filesystems.
14191 * fs/hfsplus.c: New file.
14193 * DISTLIST: Added `fs/hfsplus.c'.
14195 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14196 (hfsplus_mod_SOURCES): New variable.
14197 (hfsplus_mod_CFLAGS): Likewise.
14198 (hfsplus_mod_LDFLAGS): Likewise.
14199 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14200 (grub_setup_SOURCES): Likewise.
14201 (grub_mkdevicemap_SOURCES): Likewise.
14202 (grub_emu_SOURCES): Likewise.
14203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14205 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14207 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14209 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14211 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14212 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14213 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14214 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14215 normal/lexer.c, normal/parser.y, normal/script.c, and
14217 Removed kern/sparc64/cache.c.
14219 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14220 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14223 * configure.ac (AC_INIT): Bumped to 1.92.
14225 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14227 * kern/err.c (grub_error_push): Added new function to support error
14229 (grub_error_pop): Likewise.
14230 (grub_error_stack_items): New local variable to support error stacks.
14231 (grub_error_stack_pos): Likewise.
14232 (grub_error_stack_assert): Likewise.
14233 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14235 (grub_print_error): Added support to print errors from error stack.
14237 * include/grub/err.h (grub_error_push): Added function prototype.
14238 (grub_error_pop): Likewise.
14240 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14242 * configure.ac: Accept `powerpc64' as host_cpu.
14243 (amd64): Rename to `biarch32'.
14245 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14246 non-cacheline-aligned addresses.
14248 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14249 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14250 if `size' is non-zero.
14252 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14254 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14255 and `cd' to make sure the filename is not prefixed with a
14257 (pkgdata_MODULES): Add `gpt.mod'.
14258 (gpt_mod_SOURCES): New variable.
14259 (gpt_mod_CFLAGS): Likewise.
14260 (gpt_mod_LDFLAGS): Likewise.
14262 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14264 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14267 * partmap/gpt.c: New file.
14269 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14270 GPT partition map is detected.
14272 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14274 * commands/i386/pc/play.c: New file.
14275 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14276 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14279 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14281 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14282 ((unused))' to silence gcc warning.
14284 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14286 * configure.ac: Correct `AC_PROG_YACC' test.
14288 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14290 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14291 check before installing files.
14293 2005-11-22 Mike Small <smallm@panix.com>
14295 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14296 number regex so multidigit numbers are recognized correctly.
14298 2005-11-22 Mike Small <smallm@panix.com>
14300 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14301 debugging message before attempting to claim memory.
14302 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14303 multiple addresses in case of failure.
14305 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14307 * term/tparm.c (get_space): Remove empty `if' statement.
14309 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14311 * kern/parser.c (check_varstate): Rename `state' to 's'.
14313 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14315 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14316 variable definitions to the beginning of each function. Sort stack
14318 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14319 `buf' argument to `char *'.
14321 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14323 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14324 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14325 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14326 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14327 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14328 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14329 configfile.mod, search.mod, gzio.mod and test.mod.
14330 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14331 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14332 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14333 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14334 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14335 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14336 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14337 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14338 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14339 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14340 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14341 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14342 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14343 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14344 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14345 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14346 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14347 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14348 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14349 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14350 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14351 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14352 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14354 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14356 (pkgdata_MODULES): Add test.mod.
14358 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14360 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14361 appending to variables with "+=".
14362 (PModule): Use full pathname to generate *.lst filenames.
14364 * Makefile.in: Fixed list rules moved from genmk.rb.
14365 (.DELETE_ON_ERROR): New special target.
14366 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14368 * conf/i386-pc.rmk: Include conf/common.mk.
14369 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14370 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14371 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14372 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14373 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14374 configfile.mod, search.mod, gzio.mod and test.mod.
14375 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14376 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14377 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14378 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14379 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14380 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14381 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14382 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14383 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14384 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14385 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14386 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14387 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14388 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14389 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14390 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14391 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14392 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14393 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14394 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14395 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14396 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14397 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14399 * conf/common.rmk: ... to here. New file.
14401 * conf/common.mk: New file.
14403 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14405 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14406 (grub_script.tab.c): ... here.
14408 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14409 (grub_script.tab.c): ... here.
14411 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14412 (grub_script.tab.c): ... here.
14414 * normal/command.c (grub_command_find): Fixed a memory leak of
14415 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14417 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14419 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14420 "@" which marks the start of a comment on ARM.
14421 (VARIABLE): Likewise.
14423 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14425 Add support for Linux/ADFS partition tables.
14427 * partmap/acorn.c: New file.
14429 * include/grub/acorn_filecore.h: Likewise.
14431 * DISTLIST: Added `partmap/acorn.c' and
14432 `include/grub/acorn_filecore.h'.
14434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14436 (pkgdata_MODULES): Add `acorn.mod'.
14437 (acorn_mod_SOURCES): New variable.
14438 (acorn_mod_CFLAGS): Likewise.
14440 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14442 (pkgdata_MODULES): Add `acorn.mod'.
14443 (acorn_mod_SOURCES): New variable.
14444 (acorn_mod_CFLAGS): Likewise.
14446 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14447 (pkgdata_MODULES): Add `acorn.mod'.
14448 (acorn_mod_SOURCES): New variable.
14449 (acorn_mod_CFLAGS): Likewise.
14450 (acorn_mod_LDFLAGS): Likewise.
14452 * include/types.h (grub_disk_addr_t): New typedef.
14454 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14456 * geninit.sh: New file.
14458 * geninitheader.sh: Likewise.
14460 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14461 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14462 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14463 * commands/configfile.c (grub_configfile_init)
14464 (grub_configfile_fini): Likewise.
14465 * commands/default.c (grub_default_init, grub_default_fini):
14467 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14468 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14469 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14470 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14472 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14473 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14475 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14476 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14478 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14480 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14482 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14483 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14484 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14485 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14486 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14487 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14488 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14489 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14490 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14491 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14492 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14493 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14494 * partmap/amiga.c (grub_amiga_partition_map_init)
14495 (grub_amiga_partition_map_fini): Likewise.
14496 * partmap/apple.c (grub_apple_partition_map_init)
14497 (grub_apple_partition_map_fini): Likewise.
14498 * partmap/pc.c (grub_pc_partition_map_init)
14499 (grub_pc_partition_map_fini): Likewise.
14500 * partmap/sun.c (grub_sun_partition_map_init,
14501 grub_sun_partition_map_fini): Likewise.
14502 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14505 * util/grub-emu.c: Include <grub_modules_init.h>.
14506 (main): Don't initialize and de-initialize any modules directly,
14507 use `grub_init_all' and `grub_fini_all' instead.
14509 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14510 `grub_vesafb_mod_init'.
14511 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14513 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14514 `grub_vga_mod_init'. Updated all users.
14515 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14517 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14518 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14521 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14522 Generate a function to initialize the module in utilities.
14523 Updated all callers.
14524 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14525 initialize the module in utilities. Updated all callers.
14527 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14529 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14530 escape sequence and a literal ^L to clear the screen.
14532 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14533 when returning from Open Firmware.
14535 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14537 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14538 (grub_ofconsole_height): Likewise.
14539 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14540 manually insert a '\n'.
14541 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14542 `grub_ofconsole_height'. Return early if these are already set.
14544 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14546 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14547 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14548 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14549 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14550 and `normal/script.c'.
14551 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14552 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14553 (test_mod_SOURCES): New variable.
14554 (test_mod_CFLAGS): Likewise.
14555 (test_mod_LDFLAGS): Likewise.
14556 (pkgdata_MODULES): Add `test.mod'.
14557 (grub_script.tab.c): New rule.
14558 (grub_script.tab.h): Likewise.
14560 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14562 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14563 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14564 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14565 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14566 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14567 (test_mod_SOURCES): New variable.
14568 (test_mod_CFLAGS): Likewise.
14569 (pkgdata_MODULES): Add `test.mod'.
14570 (grub_script.tab.c): New rule.
14571 (grub_script.tab.h): Likewise.
14573 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14575 Add initial scripting support.
14577 * commands/test.c: New file.
14578 * include/grub/script.h: Likewise.
14579 * normal/execute.c: Likewise.
14580 * normal/function.c: Likewise.
14581 * normal/lexer.c: Likewise.
14582 * normal/parser.y: Likewise.
14583 * normal/script.c: Likewise.
14585 * configure.ac: Add `AC_PROG_YACC' test.
14587 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14588 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14589 `normal/function.c' and `normal/script.c'.
14590 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14591 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14592 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14594 (pkgdata_MODULES): Add `test.mod'.
14595 (grub_script.tab.c): New rule.
14596 (grub_script.tab.h): Likewise.
14598 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14600 * include/grub/normal.h (grub_test_init): New prototype.
14601 (grub_test_fini): Likewise.
14603 * normal/command.c: Include <grub/script.h>.
14604 (grub_command_execute): Rewritten.
14606 * util/grub-emu.c (main): Call `grub_test_init' and
14609 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14611 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14613 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14614 there are no pending characters.
14616 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14618 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14619 `grub_strndup' to drop device arguments. Replace unnecessary
14620 `grub_strndup' with `grub_strdup'.
14622 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14624 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14625 `debug' environment variable has been set.
14627 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14629 * Makefile.in (install-local): Use $(DATA).
14630 (uninstall): Likewise.
14631 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14632 (sbin_UTILITIES): ... to here.
14633 (sbin_SCRIPTS): New variable.
14634 (grub_install_SOURCES): New variable.
14635 * util/powerpc/ieee1275/grub-install.in: New file.
14636 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14638 (add_segments): Call `grub_util_get_path'.
14640 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14642 From Timothy Baldwin:
14643 * commands/ls.c (grub_ls_list_files): Close FILE with
14645 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14647 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14649 * include/grub/parser.h: New file.
14651 * kern/parser.c: Likewise.
14653 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14654 (grub_setup_SOURCES): Likewise.
14655 (grub_probefs_SOURCES): Likewise.
14656 (grub_emu_SOURCES): Likewise.
14657 (kernel_img_HEADERS): Add `parser.h'.
14659 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14660 (grub_emu_SOURCES): Add `kern/parser.c'.
14661 (grubof_SOURCES): Likewise.
14663 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14664 (grubof_SOURCES): Add `kern/parser.c'.
14666 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14668 * kern/misc.c (grub_split_cmdline): Removed function.
14670 * kern/rescue.c: Include <grub/parser.h>.
14671 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14672 of `grub_split_cmdline'.
14674 * normal/command.c: Include <grub/parser.h>.
14675 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14676 of `grub_split_cmdline'.
14678 * normal/completion.c: Include <grub/parser.h>.
14679 (cmdline_state): New variable.
14680 (iterate_dir): End the filename with a quote depending on the
14681 command line state.
14682 (get_state): new function.
14683 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14684 split the arguments and determine the current argument. When the
14685 argument string is not quoted, escape all spaces.
14687 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14689 * normal/sparc64/setjmp.S: New file.
14691 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14693 * include/grub/sparc64/libgcc.h: New file.
14694 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14695 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14696 normal/sparc64/setjmp.c.
14698 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14700 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14701 * kern/sparc64/cache.S: New file.
14702 * kern/sparc64/cache.c: Removed.
14703 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14704 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14706 (COMMON_LDFLAGS): Add -melf64_sparc.
14707 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14708 (grubof_SOURCES): Use cache.S instead of cache.c.
14709 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14710 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14711 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14713 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14714 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14715 (linux_mod_CFLAGS): Commented out.
14716 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14717 out because module isn't built.
14718 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14719 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14720 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14721 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14722 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14723 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14724 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14725 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14726 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14727 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14728 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14729 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14730 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14731 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14733 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14735 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14736 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14737 longer, because HFS should not be used on PC.
14739 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14741 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14742 consistently within the loop.
14744 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14746 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14747 directory can not be read.
14749 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14751 * configure.ac (AC_INIT): Increase the version number to 1.91.
14753 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14754 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14755 term/i386/pc/serial.c.
14757 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14759 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14760 file size must be permitted.
14762 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14763 between %ah and %al.
14765 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14767 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14769 Call the hook with a NUL-terminated filename.
14770 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14773 * kern/term.c (cursor_state): New variable.
14774 (grub_term_set_current): Reset the cursor state on a new
14776 (grub_setcursor): Rewritten to use CURSOR_STATE.
14777 (grub_getcursor): New function.
14779 * include/grub/term.h (grub_getcursor): New prototype.
14781 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14782 integers on ARM. Reported by Timothy Baldwin
14783 <T.E.Baldwin99@members.leeds.ac.uk>.
14785 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14787 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14789 (grub_sfs_dir): Likewise.
14791 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14793 Add support for the SFS filesystem.
14795 * fs/sfs.c: New file.
14797 * DISTLIST: Added `fs/sfs.c'.
14799 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14800 (grub_probefs_SOURCES): Likewise.
14801 (grub_emu_SOURCES): Likewise.
14802 (pkgdata_MODULES): Add `sfs.mod'.
14803 (sfs_mod_SOURCES): New variable.
14804 (sfs_mod_CFLAGS): Likewise.
14805 (sfs_mod_LDFLAGS): Likewise.
14807 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14808 (pkgdata_MODULES): Add `sfs.mod'.
14809 (sfs_mod_SOURCES): New variable.
14810 (sfs_mod_CFLAGS): Likewise.
14812 * util/grub-emu.c (main): Call `grub_sfs_init' and
14815 * include/grub/fs.h (grub_sfs_init): New prototype.
14816 (grub_sfs_fini): Likewise.
14818 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14820 Add support for the AFFS filesystem.
14822 * fs/affs.c: New file.
14824 * DISTLIST: Added `fs/affs.c'.
14826 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14827 (grub_probefs_SOURCES): Likewise.
14828 (grub_emu_SOURCES): Likewise.
14829 (pkgdata_MODULES): Add `affs.mod'.
14830 (affs_mod_SOURCES): New variable.
14831 (affs_mod_CFLAGS): Likewise.
14832 (affs_mod_LDFLAGS): Likewise.
14834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14835 (pkgdata_MODULES): Add `affs.mod'.
14836 (affs_mod_SOURCES): New variable.
14837 (affs_mod_CFLAGS): Likewise.
14839 * util/grub-emu.c (main): Call `grub_affs_init' and
14842 * include/grub/fs.h (grub_affs_init): New prototype.
14843 (grub_affs_fini): Likewise.
14845 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14847 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14849 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14851 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14854 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14857 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14858 (COMMON_LDFLAGS): New variable.
14859 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14860 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14861 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14862 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14863 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14864 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14865 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14866 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14867 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14868 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14869 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14870 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14871 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14872 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14873 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14875 (normal_mod_ASFLAGS): Add `-m32'.
14877 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14878 (grub_host_size_t, grub_host_ssize_t): New types.
14879 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14880 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14881 `GRUB_HOST_SIZEOF_VOID_P'.
14883 * include/grub/kernel.h (struct grub_module_header): Type of
14884 member offset changed to `grub_host_off_t'. Type of member size
14885 changed to `grub_host_size_t'.
14886 (struct grub_module_info): Type of member offset changed to
14887 `grub_host_off_t'. Type of member size changed to
14888 `grub_host_size_t'.
14890 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14892 Make GRUB's kernel compliant to Multiboot Specification.
14894 * kern/i386/pc/startup.S (multiboot_header): New label.
14895 (multiboot_entry): Likewise.
14896 (multiboot_trampoline): Likewise.
14898 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14899 Increased to 0x4A0.
14901 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14902 put parentheses after a question mark.
14903 [!GRUB_UTIL] (my_mod): New variable.
14905 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14907 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14909 Adds support for the XFS filesystem. Btrees are not supported
14912 * fs/xfs.c: New file.
14914 * DISTLIST: Added `fs/xfs.c'.
14916 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14917 (grub_probefs_SOURCES): Likewise.
14918 (grub_emu_SOURCES): Likewise.
14919 (pkgdata_MODULES): Add `xfs.mod'.
14920 (xfs_mod_SOURCES): New variable.
14921 (xfs_mod_CFLAGS): Likewise.
14923 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14924 (pkgdata_MODULES): Add `xfs.mod'.
14925 (xfs_mod_SOURCES): New variable.
14926 (xfs_mod_CFLAGS): Likewise.
14928 * util/grub-emu.c (main): Call `grub_xfs_init' and
14931 * include/grub/fs.h (grub_xfs_init): New prototype.
14932 (grub_xfs_fini): Likewise.
14935 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14937 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14938 color modes, allow greater than 16 colors to be configured as
14941 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14943 * normal/completion.c (complete_arguments): Add the qualifier
14944 const into OPTIONS.
14946 From Omniflux <omniflux+lists@omniflux.com>:
14947 * include/grub/terminfo.h: New file.
14948 * include/grub/tparm.h: Likewise.
14949 * include/grub/i386/pc/serial.h: Likewise.
14950 * term/terminfo.c: Likewise.
14951 * term/tparm.c: Likewise.
14952 * term/i386/pc/serial.c: Likewise.
14953 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14955 (terminfo_mod_SOURCES): New variable.
14956 (terminfo_mod_CFLAGS): Likewise.
14957 (serial_mod_SOURCES): Likewise.
14958 (serial_mod_CFLAGS): Likewise.
14960 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14962 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14963 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14964 and kern/powerpc/ieee1275/cmain.c, respectively.
14966 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14967 * kern/powerpc/ieee1275/crt0.S: ... here.
14969 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14970 * kern/powerpc/ieee1275/cmain.c: ... here.
14972 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14973 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14974 instead of boot/powerpc/ieee1275/crt0.S and
14975 boot/powerpc/ieee1275/cmain.c, respectively.
14977 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14978 sectors. It was not used anyway.
14980 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14982 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14983 `unused parameter' warning.
14985 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14987 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14989 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14992 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14994 * include/grub/normal.h (enum grub_completion_type): Added
14995 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14997 * normal/cmdline.c (print_completion): Handle
14998 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14999 * normal/menu_entry.c (store_completion): Likewise.
15001 * normal/completion.c (complete_arguments): New function.
15002 (grub_normal_do_completion): Call `complete_arguments' when the
15003 current words start with a dash.
15005 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15007 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15008 `gzio.mod' instead of `io.mod').
15010 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15012 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15013 (DISTDIRS): Added io and video.
15014 Rewrite the search routine to make an output consistently.
15016 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15017 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15018 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15019 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15020 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15021 util/powerpc/ieee1275/misc.c.
15023 * include/grub/gzio.h: New file.
15024 * io/gzio.c: Likewise.
15026 * kern/file.c (grub_file_close): Call grub_device_close only if
15027 FILE->DEVICE is not NULL.
15029 * include/grub/mm.h [!NULL] (NULL): New macro.
15031 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15034 (pkgdata_MODULES): Added gzio.mod.
15035 (gzio_mod_SOURCES): New variable.
15036 (gzio_mod_CFLAGS): Likewise.
15038 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15039 (pkgdata_MODULES): Added gzio.mod.
15040 (gzio_mod_SOURCES): New variable.
15041 (gzio_mod_CFLAGS): Likewise.
15043 * commands/cat.c: Include grub/gzio.h.
15044 (grub_cmd_cat): Use grub_gzfile_open instead of
15047 * commands/cmp.c: Include grub/gzio.h.
15048 (grub_cmd_cmp): Use grub_gzfile_open instead of
15051 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15052 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15054 (grub_rescue_cmd_module): Likewise.
15056 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15058 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15059 kern/sparc64/ieee1275/init.c because it contains _start.
15060 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15062 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15064 * configure.ac: Add support for sparc64 host with ieee1275
15066 * configure: Generated from configure.ac.
15067 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15069 (grub_ofdisk_read): Likewise.
15070 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15071 pointers as (void *) to remove a warning.
15072 (grub_ofdisk_close): Likewise.
15073 (grub_ofdisk_read): Likewise.
15074 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15075 returns, so make it return void to remove a warning.
15076 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15077 Corresponding prototype change.
15078 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15079 values, and cast the pointers as (void *) to remove a warning.
15080 (grub_mm_dump): Likewise.
15081 * conf/sparc64-ieee1275.mk: New file.
15082 * conf/sparc64-ieee1275.rmk: Likewise.
15083 * include/grub/sparc64/setjmp.h: Likewise.
15084 * include/grub/sparc64/types.h: Likewise.
15085 * include/grub/sparc64/ieee1275/console.h: Likewise.
15086 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15087 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15088 * include/grub/sparc64/ieee1275/time.h: Likewise.
15089 * kern/sparc64/cache.c: Likewise.
15090 * kern/sparc64/dl.c: Likewise.
15091 * kern/sparc64/ieee1275/init.c: Likewise.
15092 * kern/sparc64/ieee1275/openfw.c: Likewise.
15094 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15096 * util/console.c (grub_ncurses_putchar): If C is greater than
15097 0x7f, set C to a question mark.
15098 (grub_ncurses_getcharwidth): New function.
15099 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15102 * normal/menu.c (print_entry): Made aware of Unicode. First,
15103 convert TITLE to UCS-4, and predict the cursor position by
15106 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15108 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15110 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15112 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15113 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15116 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15117 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15118 grub_strcpy and grub_strlen. Take it into account that a space
15119 character is inserted as a delimiter.
15121 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15123 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15124 invalid magic in the error.
15126 * commands/search.c: New file.
15128 * util/grub-emu.c (main): Call grub_search_init and
15131 * kern/rescue.c (grub_rescue_print_disks): Removed.
15132 (grub_rescue_print_devices): New function.
15133 (grub_rescue_cmd_ls): Use grub_device_iterate with
15134 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15135 grub_rescue_print_disks.
15137 * kern/partition.c (grub_partition_iterate): Return the result of
15138 PARTMAP->ITERATE instead of GRUB_ERRNO.
15140 * kern/device.c: Include grub/partition.h.
15141 (grub_device_iterate): New function.
15143 * include/grub/partition.h (grub_partition_iterate): Return int
15144 instead of grub_err_t.
15146 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15148 [GRUB_UTIL] (grub_search_fini): Likewise.
15150 * include/grub/device.h (grub_device_iterate): New prototype.
15152 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15154 (pkgdata_MODULES): Added search.mod.
15155 (search_mod_SOURCES): New variable.
15156 (search_mod_CFLAGS): Likewise.
15158 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15159 (pkgdata_MODULES): Added search.mod.
15160 (search_mod_SOURCES): New variable.
15161 (search_mod_CFLAGS): Likewise.
15163 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15164 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15165 All callers changed.
15167 * DISTLIST: Added commands/search.c.
15169 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15171 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15173 (grub_getcharwidth): New function.
15175 * kern/misc.c (grub_utf8_to_ucs4): New function.
15177 * include/grub/term.h (struct grub_term): Added a new member
15179 (grub_getcharwidth): New prototype.
15181 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15183 * term/i386/pc/console.c (map_char): New function. Segregated from
15184 grub_console_putchar.
15185 (grub_console_putchar): Use map_char.
15186 (grub_console_getcharwidth): New function.
15187 (grub_console_term): Specified grub_console_getcharwidth as
15190 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15191 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15193 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15195 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15196 on grub_strtoul completely.
15197 (write_char): Declare local variables in the beginning of the
15199 (grub_vesafb_getcharwidth): New function.
15200 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15203 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15205 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15206 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15207 commands/i386/pc/vbetest.c.
15209 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15210 call grub_vbe_get_controller_info again, because the returned
15211 information is volatile.
15212 (grub_vbe_set_video_mode): Mostly rewritten.
15213 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15214 grub_vbe_status_t correctly.
15215 (grub_vbe_get_video_mode_info): Likewise.
15216 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15217 several if statements.
15219 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15220 * commands/i386/pc/vbeinfo.c: ... this.
15222 * commands/i386/pc/vbe_test.c: Renamed to ...
15223 * commands/i386/pc/vbetest.c: ... this.
15225 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15227 (grub_cmd_vbeinfo): ... this. Save video modes before
15228 iterating. Skip a video mode, if it is not available, not enough
15229 information is given or it is monochrome. Show the memory
15230 model. Leave the interpretation of MODEVAR to grub_strtoul
15232 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15233 (GRUB_MOD_FINI): Likewise.
15235 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15236 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15237 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15238 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15239 grub_strtoul completely.
15240 (real2pm): Removed.
15241 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15242 (GRUB_MOD_FINI): Likewise.
15244 * normal/misc.c: Include grub/mm.h.
15246 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15247 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15248 (vbe_list_modes_mod_SOURCES): Removed.
15249 (vbe_list_modes_mod_CFLAGS): Likewise.
15250 (vbe_test_mod_SOURCES): Likewise.
15251 (vbe_test_mod_CFLAGS): Likewise.
15252 (vbeinfo_mod_SOURCES): New variable.
15253 (vbeinfo_mod_CFLAGS): Likewise.
15254 (vbetest_mod_SOURCES): Likewise.
15255 (vbetest_mod_CFLAGS): Likewise.
15257 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15259 * normal/misc.c: New file.
15261 * DISTLIST: Added normal/misc.c.
15263 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15264 DISK to HOOK. Call HOOK with DISK.
15265 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15266 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15267 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15269 * normal/menu_entry.c (struct screen): Added a new member
15270 "completion_shown".
15271 (completion_buffer): New global variable.
15272 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15273 (store_completion): New function.
15274 (complete): Likewise.
15275 (clear_completions): Likewise.
15276 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15277 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15278 a tab, call complete.
15280 * normal/completion.c (disk_dev): Removed.
15281 (print_simple_completion): Likewise.
15282 (print_partition_completion): Likewise.
15283 (print_func): New global variable.
15284 (add_completion): Do not take the arguments WHAT or PRINT any
15285 longer. Added a new argument TYPE. Instead of printing directly,
15286 call PRINT_FUNC if not NULL.
15287 All callers changed.
15288 (complete_device): Use a local variable DEV instead of
15289 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15290 (grub_normal_do_completion): Take a new argument HOOK. Do not
15291 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15292 empty string, return NULL instead.
15293 All callers changed.
15295 * normal/cmdline.c (print_completion): New function.
15297 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15299 All callers changed.
15301 * kern/disk.c (grub_print_partinfo): Removed.
15303 * include/grub/partition.h (struct grub_partition_map): Add a new
15304 argument DISK into HOOK of ITERATE.
15305 (grub_partition_iterate): Add a new argument DISK to HOOK.
15307 * include/grub/normal.h (enum grub_completion_type): New enum.
15308 (grub_completion_type_t): New type.
15309 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15310 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15311 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15312 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15313 (grub_normal_do_completion): Added a new argument HOOK.
15314 (grub_normal_print_device_info): New prototype.
15316 * include/grub/disk.h (grub_print_partinfo): Removed.
15318 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15319 (normal_mod_SOURCES): Likewise.
15320 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15321 (normal_mod_SOURCES): Likewise.
15323 * commands/ls.c (grub_ls_list_disks): Use
15324 grub_normal_print_device_info instead of grub_print_partinfo. Free
15326 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15327 duplicating the code.
15329 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15331 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15332 follow GCS more precisely.
15333 * commands/i386/pc/vbe_test.c: Likewise.
15334 * include/grub/i386/pc/vbe.h: Likewise.
15335 * term/i386/pc/vesafb.c: Likewise.
15336 * video/i386/pc/vbe.c: Likewise.
15338 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15340 * DISTLIST: Added term/i386/pc/vesafb.c
15341 DISTLIST: Added video/i386/pc/vbe.c
15342 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15343 DISTLIST: Added commands/i386/pc/vbe_test.c.
15344 * commands/i386/pc/vbe_list_modes.c: New file.
15345 * commands/i386/pc/vbe_test.c: Likewise.
15346 * term/i386/pc/vesafb.c: Likewise.
15347 * video/i386/pc/vbe.c: Likewise.
15348 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15349 (grub_vbe_probe) Added prototype.
15350 (grub_vbe_set_video_mode) Likewise.
15351 (grub_vbe_get_video_mode) Likewise.
15352 (grub_vbe_get_video_mode_info) Likewise.
15353 (grub_vbe_set_pixel_rgb) Likewise.
15354 (grub_vbe_set_pixel_index) Likewise.
15355 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15356 (pkgdata_MODULES): Added vesafb.mod.
15357 (pkgdata_MODULES): Added vbe_list_modes.mod.
15358 (pkgdata_MODULES): Added vbe_test.mod.
15359 (vbe_mod_SOURCES): Added.
15360 (vbe_mod_CFLAGS): Likewise.
15361 (vesafb_mod_SOURCES): Likewise.
15362 (vesafb_mod_CFLAGS): Likewise.
15363 (vbe_list_modes_mod_SOURCES): Likewise.
15364 (vbe_list_modes_mod_CFLAGS): Likewise.
15365 (vbe_test_mod_SOURCES): Likewise.
15366 (vbe_test_mod_CFLAGS): Likewise.
15368 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15370 * normal/command.c (grub_command_execute): If INTERACTIVE is
15371 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15372 CMDLINE. Disable the pager if INTERACTIVE is true.
15373 All callers are changed.
15375 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15376 before reading a config file.
15377 * normal/main.c (read_config_file): Even if a command is not
15378 found, register it if it is within an entry.
15380 * util/grub-emu.c: Include sys/types.h and unistd.h.
15381 (options): Added --hold.
15382 (struct arguments): Added a new member "hold".
15383 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15385 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15386 cleared by a debugger, if it is not zero.
15388 * include/grub/normal.h (grub_command_execute): Add an argument
15391 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15393 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15395 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15397 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15398 program with another one, because the old one didn't detect a bug
15399 in gcc-3.4. Always use regparm 2, because the new test is still
15400 not enough for gcc-4.0. Someone must investigate a simple test
15401 case which detects a bug in gcc-4.0.
15403 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15405 * DISTLIST: Added normal/completion.c.
15407 * normal/completion.c: New file.
15409 * term/i386/pc/console.c (grub_console_getwh): New function.
15410 (grub_console_term): Assign grub_console_getwh to getwh.
15412 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15413 function is defined in normal/completion.c as
15414 grub_normal_do_completion.
15415 (grub_cmdline_get): Use grub_normal_do_completion instead of
15418 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15419 returns non-zero, otherwise return 0.
15420 (grub_partition_iterate): First, probe the partition map. Then,
15421 call ITERATE only for this partition map.
15423 * kern/misc.c (grub_strncmp): Rewritten.
15425 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15426 returns non-zero. Otherwise return 0.
15428 * include/grub/partition.h (grub_partition_map_iterate): Return
15429 int instead of void.
15431 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15433 * include/grub/misc.h (grub_strncmp): Change the type of N to
15436 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15439 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15440 unsigned explicitly before comparing it with I.
15442 * kern/main.c (grub_env_write_root): Add the attribute unused into
15445 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15446 normal/completion.c.
15447 (normal_mod_SOURCES): Likewise.
15448 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15449 (normal_mod_SOURCES): Likewise.
15451 * normal/command.c (grub_iterate_commands): If ITERATE returns
15452 non-zero, return one immediately.
15454 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15456 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15457 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15459 (grub_vbe_get_controller_info): New function.
15460 (grub_vbe_get_mode_info): Likewise.
15461 (grub_vbe_set_mode): Likewise.
15462 (grub_vbe_get_mode): Likewise.
15463 (grub_vbe_set_memory_window): Likewise.
15464 (grub_vbe_get_memory_window): Likewise.
15465 (grub_vbe_set_scanline_length): Likewise.
15466 (grub_vbe_get_scanline_length): Likewise.
15467 (grub_vbe_set_display_start): Likewise.
15468 (grub_vbe_get_display_start): Likewise.
15469 (grub_vbe_set_palette_data): Likewise.
15470 * include/grub/i386/pc/vbe.h: New file.
15472 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15474 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15475 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15476 * DISTLIST: Likewise.
15477 * kern/ieee1275/of.c: Moved to ...
15478 * kern/ieee1275/ieee1275.c: ... here.
15480 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15482 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15483 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15484 Pass 0 as `end' parameter to grub_strtoul().
15486 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15488 * include/grub/powerpc/ieee1275/console.h: Do not include
15489 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15491 (grub_console_cur_color): Remove i386-specific prototype.
15492 (grub_console_real_putchar): Likewise.
15493 (grub_console_checkkey): Likewise.
15494 (grub_console_getkey): Likewise.
15495 (grub_console_getxy): Likewise.
15496 (grub_console_gotoxy): Likewise.
15497 (grub_console_cls): Likewise.
15498 (grub_console_setcursor): Likewise.
15499 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15500 Include <grub/machine/console.h>.
15501 * term/ieee1275/ofconsole.c: Likewise.
15503 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15505 * Makefile.in (LIBLZO): New variable.
15507 * configure.ac: Check for LZO version 2.
15509 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15510 lzo/lzo1x.h instead of lzo1x.h.
15512 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15515 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15516 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15518 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15519 copying the data from PARTITION to P.
15521 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15523 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15524 negative, unload the module.
15526 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15527 map is "pc_partition_map" but not "pc".
15528 (usage): Fix the description. The options are --boot-image and
15529 --core-image but not --boot-file or --core-file.
15530 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15531 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15534 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15535 --core-file. Specify INSTALL_DEVICE as an argument.
15537 * util/console.c: Include config.h.
15538 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15539 [HAVE_NCURSES_H]: Include ncurses.h.
15540 [HAVE_CURSES_H]: Include curses.h.
15541 [!A_NORMAL] (A_NORMAL): Defined as zero.
15542 [!A_STANDOUT] (A_STANDOUT): Likewise.
15544 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15546 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15548 * configure.ac: Check for curses libraries and headers.
15550 * Makefile.in (LIBCURSES): New variable.
15552 * genmk.rb (Script::rule): Set the executable bits.
15554 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15555 name of the PC partition map is "pc_partition_map" but not "pc".
15557 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15559 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15560 (modules): Likewise.
15561 (usage): Added descriptions for --modules and --grub-probefs.
15562 Handle --modules and --grub-probefs. Save the arguments in MODULES
15563 and GRUB_PROBEFS, respectively.
15564 Auto-detect a filesystem module against GRUBDIR. If the result is
15565 empty and modules are not specified explicitly, abort the
15566 installation. Add the result to MODULES.
15568 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15569 disk/powerpc/ieee1275/ofdisk.c,
15570 include/grub/powerpc/ieee1275/init.h and
15571 term/powerpc/ieee1275/ofconsole.c.
15572 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15573 term/ieee1275/ofconsole.c.
15575 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15577 * COPYING: Upgraded to the latest version. Only the address of the
15578 FSF office has changed.
15580 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15582 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15583 kern/ieee1275.c with kern/ieee1275/of.c.
15585 * kern/ieee1275.c: Moved to ...
15586 * kern/ieee1275/of.c: ... here.
15588 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15590 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15593 * config.guess: Updated to the latest version from gnulib.
15594 * config.sub: Likewise.
15595 * install.sh: Likewise.
15596 * mkinstalldirs: Likewise.
15598 * include/grub/console.h: Removed. This file is arch-specific. Do
15599 not put this in include/grub.
15601 * include/grub/i386/pc/console.h: Resurrected.
15603 * util/console.c: Include grub/machine/console.h instead of
15605 * util/grub-emu.c: Likewise.
15607 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15609 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15612 From Vincent Pelletier <subdino2004@yahoo.fr>
15613 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15614 Redefined to use grub_getwh.
15615 (grub_term): New member named getwh.
15616 (grub_getwh): New prototype.
15617 * kern/term.c (grub_getwh): New function.
15618 * term/i386/pc/console.c (grub_console_getwh): New function.
15619 (grub_console_term): New member `getwh'.
15620 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15621 (grub_vga_term): New member `getwh'.
15622 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15624 (grub_ofconsole_getw): New function.
15625 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15626 (grub_ofconsole_term): New field named getwh and new initial
15629 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15631 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15632 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15633 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15634 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15635 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15636 of <grub/machine/ieee1275.h>.
15637 * commands/ieee1275/reboot.c: Likewise.
15638 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15639 * kern/ieee1275.c: ... to here. All users updated. Change all
15640 parameter structs to use new type `grub_ieee1275_cell_t'.
15641 * term/powerpc/ieee1275/ofconsole.c: Move ...
15642 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15643 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15644 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15645 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15647 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15648 Remove unused prototypes. All users updated.
15649 * include/grub/powerpc/ieee1275/console.h: Removed.
15650 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15651 `grub_ieee1275_cell_t'.
15652 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15653 Cast comparisons with -1 to the correct type.
15654 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15655 type to match `grub_ieee1275_entry_fn'.
15657 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15659 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15661 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15662 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15664 (grub_probefs_SOURCES): New variable.
15666 * util/i386/pc/grub-probefs.c: New file.
15668 * util/i386/pc/grub-setup.c (main): Call
15669 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15670 grub_hfs_init and grub_jfs_init to initialize the system. Call
15671 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15672 grub_pc_partition_map_fini to finish the system.
15674 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15676 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15678 (grub_multiboot_load_elf32): Likewise.
15679 (grub_multiboot_is_elf64): Likewise.
15680 (grub_multiboot_load_elf64): Likewise.
15681 (grub_multiboot_load_elf): Likewise.
15682 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15683 an ELF32 or ELF64 file.
15684 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15686 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15687 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15688 NULL before calling FS->LABEL.
15689 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15690 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15691 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15692 before calling FS->LABEL.
15694 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15696 * util/i386/pc/grub-install.in (datadir): New variable.
15698 (pkgdatadir): New variable.
15699 (pkglibdir): Removed.
15701 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15703 * DISTLIST: Added util/i386/pc/grub-install.in.
15705 * util/i386/pc/grub-install.in: New file.
15707 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15708 (grub_install_SOURCES): Likewise.
15710 * genmk.rb: Added support for scripts.
15711 (Script): New class.
15712 (scripts): New variable.
15714 * Makefile.in (install-local): Install sbin_SCRIPTS by
15716 (uninstall): Remove sbin_SCRIPTS.
15718 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15719 device, try to get a GRUB device by
15720 grub_util_biosdisk_get_grub_dev.
15723 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15724 description for --device-map.
15726 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15728 Change the semantics of variable hooks. They now return strings
15729 instead of error values.
15731 * util/i386/pc/grub-setup.c: Include grub/env.h.
15732 (setup): Use grub_device_set_root instead of grub_env_set.
15734 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15735 grub_env_get instead of grub_device_set_root and
15736 grub_device_get_root, respectively.
15738 * kern/main.c (grub_env_write_root): New function.
15739 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15740 grub_env_set instead of grub_device_set_root.
15742 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15744 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15745 rather than calling ENV->WRITE_HOOK afterwards.
15746 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15747 passing a pointer of a pointer.
15748 (grub_register_variable_hook): Change the types of "read_hook" and
15749 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15751 Allocate the default empty string on the heap, because this string
15752 may be freed later.
15754 * kern/device.c: Include grub/env.h.
15755 (grub_device_set_root): Removed.
15756 (grub_device_get_root): Likewise.
15757 (grub_device_open): Use grub_env_get instead of
15758 grub_device_get_root.
15760 * include/grub/env.h (grub_env_read_hook_t): New type.
15761 (grub_env_write_hook_t): Likewise.
15762 (grub_env_var): Change the types of "read_hook" and "write_hook"
15763 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15764 (grub_register_variable_hook): Likewise.
15766 * include/grub/device.h (grub_device_set_root): Removed.
15767 (grub_device_set_root): Likewise.
15769 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15770 make sure that DIRNAME terminates with '/', so that
15771 grub_fat_find_dir will fail if PATH is not a directory.
15773 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15775 Use the qualifier auto for print_files and print_files_long.
15776 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15778 Put a newline only if there is no error.
15779 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15782 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15784 * kern/partition.c (grub_partition_probe): Initialize PART to
15785 NULL. Otherwise, when no partition map is registered, this returns
15788 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15790 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15791 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15794 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15796 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15797 information on each device, if it does not have partitions. Print
15798 "Device" instead of "Disk", because this function is not specific
15801 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15802 static to ensure that it is put on the memory rather than a
15805 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15807 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15808 (grub_cat_init): Likewise.
15809 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15810 (options): Likewise.
15811 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15812 (grub_configfile_init): Likewise.
15813 * font/manager.c (GRUB_MOD_INIT): Likewise.
15814 * commands/help.c (GRUB_MOD_INIT): Likewise.
15815 (grub_help_init): Likewise.
15816 * normal/command.c (grub_command_init): Likewise.
15817 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15818 * disk/loopback.c (grub_loop_init): Likewise.
15819 (GRUB_MOD_INIT): Likewise.
15820 * commands/ls.c (grub_ls_init): Likewise.
15821 (GRUB_MOD_INIT): Likewise.
15822 (options): Likewise.
15823 * commands/boot.c (grub_boot_init): Likewise.
15824 (GRUB_MOD_INIT): Likewise.
15825 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15826 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15827 (GRUB_MOD_INIT): Likewise.
15828 * commands/cmp.c (grub_cmp_init): Likewise.
15829 (GRUB_MOD_INIT): Likewise.
15831 * normal/arg.c: Use <> instead of "" to include header files.
15832 (SHORT_ARG_HELP): New macro.
15833 (SHORT_ARG_USAGE): Likewise.
15834 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15835 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15837 (find_short): Check if C is 'h' or 'u' explicitly.
15838 (grub_arg_show_help): Use space characters instead of tabs. Treat
15839 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15840 are shown with --help and --usage only if they are not used for
15841 the command itself.
15842 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15845 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15846 const into "longarg". Change the type of "shortarg" to int.
15848 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15850 * boot/i386/pc/boot.S (boot_drive_check): New label.
15852 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15855 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15856 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15858 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15860 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15861 When turning off Gate A20, skip the check and return immediately,
15862 because this is not fatal usually.
15864 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15866 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15867 be 0x7C00 instead of 0x8000.
15869 * boot/i386/pc/pxeboot.S: Rewritten.
15871 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15873 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15876 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15878 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15879 robustness. This routine now supports a BIOS call and System
15880 Control Port A to modify the gate A20.
15882 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15883 Increased to 0x440.
15885 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15887 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15888 device path and resulting ihandle.
15889 (grub_ofdisk_close): dprintf the ihandle being closed.
15890 (grub_ofdisk_read): dprintf function parameters.
15891 * kern/mm.c (grub_mm_init_region): Likewise.
15892 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15893 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15894 size, and boot arguments.
15895 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15896 before loading into memory.
15897 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15898 before loading into memory.
15900 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15902 * kern/mm.c: Added much documentation.
15903 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15904 8, set to 5 instead of 8.
15906 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15908 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15910 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15911 (grub_mkdevicemap_SOURCES): New variable.
15913 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15914 lib/device.c of GRUB Legacy.
15916 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15918 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15919 instead of PATH is NULL.
15921 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15923 * commands/cmp.c (BUFFER_SIZE): New macro.
15924 (grub_cmd_cmp): Close the right file at the right time. Compare
15925 only data just read. Don't report files of different size as
15926 identical. Dynamically allocate buffers. Move variable
15927 declarations at the beginning of function.
15929 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15931 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15934 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15936 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15937 when backspace is pressed at beginning of line.
15939 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15941 * DISTLIST: Added genfslist.sh.
15943 * normal/main.c (fs_module_list): New variable.
15944 (autoload_fs_module): New function.
15945 (read_fs_list): Likewise.
15946 (grub_normal_execute): Call read_fs_list.
15948 * kern/fs.c (grub_fs_autoload_hook): New variable.
15949 (grub_fs_probe): Added support for auto-loading.
15951 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15952 (grub_fs_module_list_t): New type.
15954 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15955 (grub_fs_autoload_hook): New prototype.
15957 * genfslist.sh: New file.
15959 * genmk.rb: Added a rule to generate a filesystem list.
15961 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15963 * configure.ac: Fix the test for cross-compiling.
15965 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15966 define GRUB_UTIL anymore.
15968 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15969 so this function works on other systems than just big endian.
15970 (load_modules): Likewise.
15971 (add_segments): Likewise.
15973 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15975 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15976 contains `l' modifier, get a long from va_arg().
15978 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15980 * kern/mm.c (grub_free): If the next free block which is being
15981 merged is the first free block, set the first block to the block
15983 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15985 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15987 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15988 `grub_ieee1275_chosen'.
15990 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15992 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15993 (grub_ieee1275_chosen): New variable.
15994 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15996 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15997 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15998 Rename first argument to `phandle' for consistency.
15999 (grub_ieee1275_get_property_length): Likewise.
16000 (grub_ieee1275_next_property): Likewise. Change type of first argument
16001 to grub_ieee1275_phandle_t.
16002 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16003 Move export next to declaration.
16004 (grub_ieee1275_chosen): New variable.
16005 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16006 Correct cosmetic typo.
16007 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16008 `grub_ieee1275_chosen'.
16009 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16010 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16011 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16012 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16013 `grub_ieee1275_chosen'.
16015 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16017 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16019 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16020 /chosen/bootargs as "variable=value" pairs.
16022 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16024 * include/grub/misc.h (grub_dprintf): New macro.
16025 (grub_real_dprintf): New prototype.
16026 (grub_strword): Likewise.
16027 (grub_iswordseparator): Likewise.
16028 * kern/misc.c (grub_real_dprintf): New function.
16029 (grub_strword): Likewise.
16030 (grub_iswordseparator): Likewise.
16032 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16034 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16035 (roundup): Remove macro.
16036 (grub_ieee1275_flags): Make static.
16037 (grub_ieee1275_realmode): Remove.
16038 (grub_ieee1275_test_flag): New function.
16039 (grub_ieee1275_set_flag): Likewise.
16040 (find_options): Rename to `grub_ieee1275_find_options'; update
16041 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16042 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16043 (cmain): New prototype.
16044 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16045 `grub_ieee1275_flags' directly.
16046 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16047 machine/biosdisk.h.
16048 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16049 Don't include grub/machine/init.h.
16050 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16051 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16053 (grub_ieee1275_realmode): Likewise.
16054 (grub_ieee1275_flag): New enum.
16055 (grub_ieee1275_test_flag): New prototype.
16056 (grub_ieee1275_set_flag): New prototype.
16057 * include/grub/powerpc/ieee1275/init.h: Remove file.
16058 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16059 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16060 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16061 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16063 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16064 `grub_ieee1275_test_flag'.
16065 (grub_ieee1275_encode_devname): Likewise.
16067 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16069 * include/grub/powerpc/ieee1275/ieee1275.h
16070 (grub_ieee1275_encode_devname): New prototype.
16071 (grub_ieee1275_get_filename): Likewise.
16072 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16074 (grub_set_prefix): Likewise.
16075 (grub_machine_init): Call grub_set_prefix.
16076 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16077 (grub_parse_type): New enum.
16078 (grub_ieee1275_get_devargs): New function.
16079 (grub_ieee1275_get_devname): Likewise.
16080 (grub_ieee1275_parse_args): Likewise.
16081 (grub_ieee1275_get_filename): Likewise.
16082 (grub_ieee1275_encode_devname): Likewise.
16084 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16086 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16087 `grub_loader_unset'.
16089 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16091 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16092 instead of grub_ieee1275_interpret.
16093 (grub_halt_init): New function.
16094 (grub_halt_fini): Likewise.
16095 (GRUB_MOD_INIT): Correct message grammar.
16096 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16097 instead of grub_ieee1275_interpret.
16098 (grub_reboot_init): New function.
16099 (grub_reboot_fini): Likewise.
16100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16101 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16102 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16103 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16104 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16106 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16108 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16110 (grub_halt): Likewise.
16111 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16112 (cmain): Remove __attribute__((unused)).
16113 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16114 (grub_heap_len): Likewise.
16115 (grub_machine_fini): New function.
16116 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16117 (grub_halt): Likewise.
16118 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16120 * util/powerpc/ieee1275/misc.c: New file.
16122 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16124 * DISTLIST: New file.
16125 * gendistlist.sh: Likewise.
16127 * Makefile.in (COMMON_DISTFILES): Removed.
16128 (BOOT_DISTFILES): Likewise.
16129 (CONF_DISTFILES): Likewise.
16130 (DISK_DISTFILES): Likewise.
16131 (FS_DISTFILES): Likewise.
16132 (INCLUDE_DISTFILES): Likewise.
16133 (KERN_DISTFILES): Likewise.
16134 (LOADER_DISTFILES): Likewise.
16135 (TERM_DISTFILES): Likewise.
16136 (UTIL_DISTFILES): Likewise.
16137 (DISTFILES): Likewise.
16138 (uninstall): Uninstall files in $(pkgdata_DATA).
16139 (DISTLIST): New target.
16140 (distdir): Use the contents of the file DISTLIST to get a list of
16143 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16145 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16146 descriptor. This is ported from GRUB Legacy.
16148 * gencmdlist.sh: Added an extra semicolon to make it work with
16149 old sed versions. Reported by Robert Bihlmeyer
16150 <robbe@orcus.priv.at>.
16152 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16154 Automatic loading of commands is supported.
16156 * normal/main.c (read_command_list): New function.
16157 (grub_normal_execute): Call read_command_list.
16159 * normal/command.c (grub_register_command): Return zero or CMD.
16160 Allocate CMD->NAME from the heap.
16161 Initialize CMD->MODULE_NAME to zero.
16162 Find the same name as well. If the same command is found and it is
16163 a dummy command, overwrite members. If it is not a dummy command,
16165 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16166 (grub_command_find): If a dummy command is found, load a module
16167 and retry to find a command only once.
16169 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16170 make sure that each command is loaded.
16172 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16174 (struct grub_command): Remove const from the member `name'.
16175 Add a new member `module_name'.
16176 (grub_register_command): Return grub_command_t.
16178 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16179 sure that each command is loaded.
16181 * genmk.rb (PModule::rule): Specify a module name without the
16182 suffix ".mod" to gencmdlist.sh.
16184 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16186 * gencmdlist.sh: New file.
16188 * genmk.rb (PModule::rule): Generate a rule for a command list.
16190 Generate command.lst from $(COMMANDFILES).
16192 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16193 (DATA): Added $(pkgdata_DATA).
16194 (install-local): Install files in $(pkgdata_DATA).
16196 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16198 * term/i386/pc/vga.c (debug_command): Removed.
16199 (GRUB_MOD_INIT): Do not register the command "debug".
16201 From Hollis Blanchard:
16202 * commands/configfile.c: New file.
16203 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16204 commands/configfile.c.
16205 (pkgdata_MODULES): Added configfile.mod.
16206 (configfile_mod_SOURCES): New variable.
16207 (configfile_mod_CFLAGS): Likewise.
16208 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16209 commands/configfile.c.
16210 (pkgdata_MODULES): Added configfile.mod.
16211 (configfile_mod_SOURCES): New variable.
16212 (configfile_mod_CFLAGS): Likewise.
16213 * util/grub-emu.c (main): Call grub_configfile_init and
16214 grub_configfile_fini.
16215 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16217 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16219 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16221 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16224 * commands/help.c (grub_cmd_help): Do not print newlines after
16225 the last command in print_command_help.
16227 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16229 * commands/default.h: New file.
16230 * commands/timeout.h: Likewise.
16231 * normal/context.c: Likewise.
16233 * util/misc.c: Do not include sys/times.h.
16234 Include sys/time.h and grub/machine/time.h.
16235 (grub_get_rtc): Rewritten with gettimeofday.
16237 * util/grub-emu.c (main): Call grub_default_init and
16238 grub_timeout_init before grub_normal_init, and call
16239 grub_timeout_fini and grub_default_fini after grub_main.
16241 * util/console.c (grub_ncurses_checkkey): Return the read
16244 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16247 * normal/main.c (read_config_file): Push MENU. If this fails,
16248 print an error and wait for a user input.
16249 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16250 If a menu is empty or an error occurs, pop MENU.
16251 (grub_normal_execute): Pop and free MENU after grub_menu_run
16254 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16256 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16258 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16260 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16262 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16265 * include/grub/normal.h (struct grub_menu_list): New struct.
16266 (grub_menu_list_t): New type.
16267 (struct grub_context): New struct.
16268 (grub_context_t): New type.
16269 (grub_register_command): Got rid of EXPORT_FUNC.
16270 (grub_unregister_command): Likewise.
16271 (grub_context_get): New prototype.
16272 (grub_context_get_current_menu): Likewise.
16273 (grub_context_push_menu): Likewise.
16274 (grub_context_pop_menu): Likewise.
16275 [GRUB_UTIL] (grub_default_init): Likewise.
16276 [GRUB_UTIL] (grub_default_fini): Likewise.
16277 [GRUB_UTIL] (grub_timeout_init): Likewise.
16278 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16280 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16281 commands/timeout.c and normal/context.c.
16282 (pkgdata_MODULES): Added default.mod and timeout.mod.
16283 (normal_mod_SOURCES): Added normal/context.c.
16284 (default_mod_SOURCES): New variable.
16285 (default_mod_CFLAGS): Likewise.
16286 (timeout_mod_SOURCES): Likewise.
16287 (timeout_mod_CFLAGS): Likewise.
16288 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16290 (pkgdata_MODULES): Added default.mod and timeout.mod.
16291 (normal_mod_SOURCES): Added normal/context.c.
16292 (default_mod_SOURCES): New variable.
16293 (default_mod_CFLAGS): Likewise.
16294 (timeout_mod_SOURCES): Likewise.
16295 (timeout_mod_CFLAGS): Likewise.
16297 * Makefile.in (all-local): Added $(MKFILES).
16299 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16301 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16302 (grub_emu_SOURCES): Likewise.
16303 (pkgdata_MODULES): Add `sun.mod'.
16304 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16307 (pkgdata_MODULES): Add `sun.mod'.
16308 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16309 * include/grub/partition.h (grub_sun_partition_map_init): New
16311 (grub_sun_partition_map_fini): Likewise.
16312 * partmap/sun.c: New file.
16313 * util/grub-emu.c (main): Initialize and de-initialize the sun
16314 partitionmap support.
16316 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16318 This implements an Emacs-like menu entry editor.
16320 * normal/menu_entry.c: New file.
16322 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16323 characters to ASCII.
16324 (saved_char): New variable.
16325 (grub_ncurses_checkkey): Rewritten completely.
16326 (grub_ncurses_getkey): Likewise.
16327 (grub_ncurses_init): Call raw instead of cbreak.
16329 * normal/menu.c (print_entry): Do not put a space.
16330 (init_page): Renamed to ...
16331 (grub_menu_init_page): ... this. All callers changed.
16332 (edit_menu_entry): Removed.
16333 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16335 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16337 * kern/misc.c (grub_vprintf): Call grub_refresh.
16339 * normal/menu.c (DISP_LEFT): Renamed to ...
16340 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16341 * normal/menu.c (DISP_UP): Renamed to ...
16342 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16343 * normal/menu.c (DISP_RIGHT): Renamed to ...
16344 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16345 * normal/menu.c (DISP_DOWN): Renamed to ...
16346 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16347 * normal/menu.c (DISP_HLINE): Renamed to ...
16348 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16349 * normal/menu.c (DISP_VLINE): Renamed to ...
16350 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16351 * normal/menu.c (DISP_UL): Renamed to ...
16352 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16353 * normal/menu.c (DISP_UR): Renamed to ...
16354 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16355 * normal/menu.c (DISP_LL): Renamed to ...
16356 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16357 * normal/menu.c (DISP_LR): Renamed to ...
16358 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16359 * normal/menu.c (TERM_WIDTH): Renamed to ...
16360 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16361 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16362 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16363 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16364 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16365 * normal/menu.c (TERM_MARGIN): Renamed to ...
16366 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16367 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16368 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16369 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16370 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16371 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16372 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16373 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16374 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16375 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16376 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16377 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16378 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16379 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16380 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16381 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16382 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16383 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16384 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16385 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16386 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16387 All callers changed.
16389 * include/grub/normal.h: New prototype.
16391 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16392 normal/menu_entry.c.
16393 (normal_mod_SOURCES): Likewise.
16394 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16395 (normal_mod_SOURCES): Likewise.
16397 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16399 * include/grub/normal.h (grub_halt_init): New prototype.
16400 (grub_halt_fini): Likewise.
16401 (grub_reboot_init): Likewise.
16402 (grub_reboot_fini): Likewise.
16404 * util/grub-emu.c: Include signal.h.
16405 (main_env): New global variable.
16406 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16408 (grub_machine_fini): New function.
16409 (main): Call grub_halt_init and grub_reboot_init before
16410 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16411 Call setjmp with MAIN_ENV to go back afterwards.
16412 Call grub_machine_fini right before return.
16414 * include/grub/util/misc.h: Include setjmp.h.
16415 (main_env): New prototype.
16417 * include/grub/kernel.h (grub_machine_fini): New prototype.
16418 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16419 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16421 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16422 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16423 * term/i386/pc/console.c (grub_console_fini): Likewise.
16425 * util/i386/pc/misc.c: New file.
16427 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16428 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16429 commands/i386/pc/reboot.c.
16431 2005-02-14 Guillem Jover <guillem@hadrons.org>
16433 * include/grub/dl.h (grub_dl_check_header): New prototype.
16434 (grub_arch_dl_check_header): Change return type to grub_err_t,
16435 remove size parameter and export function. Update all callers.
16436 * kern/dl.c (grub_dl_check_header): New function.
16437 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16438 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16439 are inside the core.
16440 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16441 independent ELF header checks.
16442 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16443 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16444 `grub_dl_check_header' instead of explicit checks. Check for the
16446 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16447 `grub_dl_check_header' instead of explicit checks. Remove arch
16448 specific ELF header checks.
16450 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16453 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16455 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16456 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16458 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16460 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16461 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16462 (part_map_iterate): Clear `grub_errno' and return 0 if
16463 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16464 * partmap/amiga.c (amiga_partition_map_iterate): Return
16465 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16466 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16468 2005-02-01 Guillem Jover <guillem@hadrons.org>
16470 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16473 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16475 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16477 (grub_rescue_cmd_linux): New prototype.
16478 (grub_rescue_cmd_initrd): Likewise.
16479 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16481 (grub_linux_release_mem): Release the memory for the initrd.
16482 (grub_load_linux): Renamed from this...
16483 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16484 Changed `entry' not to be static. Loop over memory regions to
16485 find another one when the default fails.
16486 (grub_rescue_cmd_initrd): New function.
16487 (grub_linux_init): Remove function.
16488 (grub_linux_fini): Likewise.
16489 (GRUB_MOD_INIT): Register `initrd'.
16490 (GRUB_MOD_FINI): Unregister `initrd'.
16491 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16493 (grub_linux_normal_fini): Likewise.
16494 (GRUB_MOD_INIT): Register `initrd'.
16495 (GRUB_MOD_FINI): Unregister `initrd'.
16497 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16499 * commands/help.c: New file.
16500 * normal/arg.c (show_help): Renamed to...
16501 (grub_arg_show_help): ... this.
16502 * commands/i386/pc/halt.c: New file.
16503 * commands/i386/pc/reboot.c: Likewise.
16504 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16505 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16506 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16507 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16509 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16511 (pkgdata_MODULES): Add `help.mod'.
16512 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16513 * grub/i386/pc/init.h (grub_reboot): New prototype.
16514 (grub_halt): Likewise.
16515 * include/grub/normal.h (grub_arg_show_help): New prototype.
16516 (grub_help_init): Likewise.
16517 (grub_help_fini): Likewise.
16518 * util/grub-emu.c (main): Initialize and deinitialize the help
16521 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16523 * normal/command.c (grub_command_init): Fixed the description of
16524 the `set' and `unset' commands.
16526 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16528 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16530 * commands/ieee1275/halt.c: New file.
16531 * commands/ieee1275/reboot.c: Likewise.
16532 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16533 `__attribute__ ((unused))'. Some GCS related fixed.
16534 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16535 (grub_suspend_fini): Likewise.
16536 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16538 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16539 (halt_mod_CFLAGS): New variables.
16540 * include/grub/powerpc/ieee1275/ieee1275.h
16541 (grub_ieee1275_interpret): New prototype.
16543 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16545 * include/grub/misc.h (memmove): New prototype.
16546 (memcpy): Likewise.
16548 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16550 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16551 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16553 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16555 * kern/misc.c (grub_strndup): Function rewritten.
16557 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16559 * normal/menu.c (TERM_WIDTH): Macro redefined.
16560 (TERM_TOP_BORDER_Y): Likewise.
16561 (draw_border): Replaced while-loop by a for-loop. Make the number
16562 of lines consistent with the number of lines displayed in
16563 print_entries. Added a margin below the rectangle.
16564 (print_entry): Make the entry fit in the rectangle.
16565 (print_entries): Display the scroll arrows next to the right
16568 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16570 * fs/minix.c (grub_minix_find_file): Reserve more space for
16571 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16572 `grub_strncpy' to copy `path' into it.
16574 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16576 Add the loopback device, a device via which files can be accessed
16579 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16580 (pkgdata_MODULES): Add loopback.mod.
16581 (loopback_mod_SOURCES): New variable.
16582 (loopback_mod_CFLAGS): Likewise.
16583 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16585 (pkgdata_MODULES): Add loopback.mod.
16586 (loopback_mod_SOURCES): New variable.
16587 (loopback_mod_CFLAGS): Likewise.
16588 * disk/loopback.c: new file.
16589 * include/grub/normal.h (grub_loop_init): New prototype.
16590 (grub_loop_fini): New prototype.
16591 * util/grub-emu.c (main): Initialize and de-initialize loopback
16593 * include/grub/disk.h (grub_disk_dev_id): Add
16594 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16596 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16598 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16600 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16601 (suspend_mod_SOURCES): New variable.
16602 (suspend_mod_CFLAGS): Likewise.
16603 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16605 * commands/ieee1275/suspend.c: New file.
16607 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16609 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16610 ((unused))' to `__attribute__ ((used))'.
16611 (GRUB_MOD_FINI): Likewise.
16612 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16613 * genmk.rb (PModule): Assign space to common symbols when linking
16616 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16618 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16619 `unsigned' arguments to `grub_size_t'.
16620 (grub_malloc): Likewise.
16621 (grub_realloc): Likewise.
16622 (grub_memalign): Likewise.
16623 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16624 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16625 * util/misc.c (grub_malloc): Likewise.
16626 (grub_realloc): Likewise.
16627 * kern/mm.c (get_header_from_pointer): Change the casts to
16628 `unsigned' into a cast to `grub_size_t'.
16630 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16631 point to `currnode' when `currnode' is changed.
16633 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16634 Schottelius <nico-linux@schottelius.org>.
16636 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16638 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16639 (note_path): Remove variable.
16640 (GRUB_IEEE1275_NOTE_NAME): New macro.
16641 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16642 (grub_ieee1275_note_hdr): New structure.
16643 (grub_ieee1275_note_desc): Likewise.
16644 (grub_ieee1275_note): Likewise.
16645 (load_note): Remove `dir' argument. All callers updated. Remove
16646 `note_img' and `path'. Do not load a file from `note_path'.
16647 Initialize a struct grub_ieee1275_note and write that to `out'.
16648 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16650 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16652 * util/misc.c (grub_util_read_image): Revert last change. It
16653 called `grub_util_read_at', which seeks from the beginning of the
16656 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16658 * TODO: Add note about endianness in grub-mkimage.
16659 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16661 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16662 (grub_mkimage_SOURCES): New target.
16663 * include/grub/kernel.h (grub_start_addr): Remove variable.
16664 (grub_end_addr): Likewise.
16665 (grub_total_module_size): Likewise.
16666 (grub_kernel_image_size): Likewise.
16667 (GRUB_MODULE_MAGIC): New constant.
16668 (grub_module_info): New structure.
16669 (grub_arch_modules_addr): New prototype.
16670 (grub_get_end_addr): Remove prototype.
16671 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16672 * include/grub/powerpc/ieee1275/kernel.h: New file.
16673 * include/grub/util/misc.h (grub_util_get_fp_size): New
16675 (grub_util_read_at): Likewise.
16676 (grub_util_write_image_at): Likewise.
16677 * kern/main.c (grub_get_end_addr): Remove function.
16678 (grub_load_modules): Call grub_arch_modules_addr instead of using
16679 grub_end_addr. Look for a grub_module_info struct in memory. Use
16680 the grub_module_info fields instead of calling grub_get_end_addr
16681 as loop conditions. Move grub_add_unused_region code here.
16682 (grub_add_unused_region): Remove function.
16683 * kern/i386/pc/init.c: Include grub/cache.h.
16684 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16685 one call to add_mem_region.
16686 (grub_arch_modules_addr): New function.
16687 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16688 (grub_total_module_size): Likewise.
16689 Include grub/machine/kernel.h.
16690 (grub_arch_modules_addr): New function.
16691 * util/grub-emu.c (grub_end_addr): Remove variable.
16692 (grub_total_module_size): Likewise.
16693 (grub_arch_modules_addr): New function.
16694 * util/misc.c: Include unistd.h.
16695 (grub_util_get_fp_size): New function.
16696 (grub_util_read_at): Likewise.
16697 (grub_util_write_image_at): Likewise.
16698 (grub_util_read_image): Call grub_util_read_at.
16699 (grub_util_write_image): Call grub_util_write_image_at.
16700 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16701 additional memory in kernel_img for a struct grub_module_info.
16702 Fill in that grub_module_info.
16703 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16705 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16707 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16709 * include/grub/powerpc/ieee1275/ieee1275.h
16710 (grub_ieee1275_milliseconds): New prototype.
16711 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16713 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16714 grub_ieee1275_milliseconds.
16716 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16718 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16720 (find_options): New function.
16721 (cmain): Call find_options.
16722 * include/grub/powerpc/ieee1275/ieee1275.h
16723 (grub_ieee1275_realmode): New extern variable.
16724 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16725 grub_map if grub_ieee1275_realmode is false.
16727 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16729 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16730 lines are inserted and make it work like readline. Reported by
16731 Vincent Pelletier <subdino2004@yahoo.fr>.
16733 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16735 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16737 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16738 `kern/powerpc/cache.S'.
16740 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16742 * genmk.rb: Handle the `Program' class in the main loop. Written
16743 by Johan Rydberg <jrydberg@gnu.org>.
16744 (Program): New class.
16745 (programs): New variable.
16746 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16747 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16748 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16749 (help_arch): Function removed.
16750 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16751 `powerpc/libgcc.h' and `loader.h'.
16752 (pkgdata_PROGRAMS): New variable.
16753 (sbin_UTILITIES): Variable removed.
16754 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16755 (grubof_SOURCES): Variable re-defined so it only includes the
16756 core functionality.
16757 (grubof_CFLAGS): Remove `-DGRUBOF'.
16758 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16759 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16760 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16761 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16762 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16763 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16764 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16765 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16766 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16767 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16768 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16769 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16770 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16771 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16772 (pc_mod_CFLAGS): New variables.
16773 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16774 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16775 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16776 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16778 * include/grub/i386/pc/init.h (grub_os_area_addr)
16779 (rub_os_area_size): ... to here.
16780 * include/grub/powerpc/ieee1275/ieee1275.h
16781 (grub_ieee1275_entry_fn): Export symbol.
16782 * include/grub/powerpc/ieee1275/init.h: New file.
16783 * include/grub/powerpc/libgcc.h: Likewise.
16784 * include/grub/cache.h: Likewise.
16785 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16786 <hollis@penguinppc.org>.
16787 * kern/dl.c: Include <grub/cache.h>.
16788 (grub_dl_flush_cache): New function.
16789 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16791 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16792 (grub_console_init): Removed prototypes.
16793 (grub_machine_init): Don't initialize the modules anymore.
16794 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16796 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16797 Macro undef removed.
16798 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16799 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16800 relocation `R_PPC_REL32'. Return an error when the relocation is
16802 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16803 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16804 * util/misc.c (grub_arch_sync_caches): Likewise.
16806 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16808 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16809 `symlist.c', add `grubof_symlist.c'.
16810 (symlist.c): Variable removed.
16811 (grubof_HEADERS): Variable added.
16812 (grubof_symlist.c): New target.
16813 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16814 `kernel_img_HEADERS'.
16815 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16816 * kern/powerpc/dl.c: New file.
16817 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16819 (grub_arch_dl_relocate_symbols): Likewise.
16820 (grub_register_exported_symbols): Likewise.
16822 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16824 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16825 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16826 to fail instead. Reported by Vincent Pelletier
16827 <subdino2004@yahoo.fr>.
16829 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16830 it is not allocated. Reported by Vincent Pelletier
16831 <subdino2004@yahoo.fr>.
16833 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16834 output so the output looks better.
16836 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16838 Modulize the partition map support and add support for the amiga
16841 * commands/ls.c: Include <grub/partition.h> instead of
16842 <grub/machine/partition.h>.
16843 * kern/disk.c: Likewise.
16844 * kern/rescue.c: Likewise.
16845 * loader/i386/pc/chainloader.c: Likewise.
16846 * normal/cmdline.c: Likewise.
16847 * kern/powerpc/ieee1275/init.c: Likewise.
16848 (grub_machine_init): Call `grub_pc_partition_map_init',
16849 `grub_amiga_partition_map_init' and
16850 `grub_apple_partition_map_init'.
16851 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16852 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16853 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16854 `partition.h' and `pc_partition.h'.
16855 (grub_setup_SOURCES): Remove
16856 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16857 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16858 (grub_emu_SOURCES): Likewise.
16859 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16860 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16861 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16863 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16864 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16865 (grubof_SOURCES): Likewise.
16866 * disk/i386/pc/partition.c: File removed.
16867 * disk/powerpc/ieee1275/partition.c: Likewise.
16868 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16869 * include/grub/i386/pc/partition.h: Likewise.
16870 * kern/partition.c: New file.
16871 * partmap/amiga.c: Likewise.
16872 * partmap/apple.c: Likewise.
16873 * partmap/pc.c: Likewise.
16874 * include/grub/partition.h: Likewise..
16875 * include/grub/pc_partition.h: Likewise.
16876 * util/grub-emu.c: Include <grub/partition.h> instead of
16877 <grub/machine/partition.h>.
16878 (main): Call `grub_pc_partition_map_init',
16879 `grub_amiga_partition_map_init' and
16880 `grub_apple_partition_map_init' and deinitialize afterwards.
16881 * util/i386/pc/biosdisk.c: Include `#include
16882 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16883 `<grub/machine/partition.h>'.
16884 * util/i386/pc/grub-setup.c: Likewise.
16885 * util/i386/pc/biosdisk.c: Likewise.
16886 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16887 partition information in case of a PC partition.
16888 * util/i386/pc/grub-setup.c: Include `#include
16889 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16890 `<grub/machine/partition.h>'.
16891 (setup): Only access the PC specific partition information in case
16894 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16896 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16897 (grub_longjmp): Likewise.
16898 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16900 * normal/powerpc/setjmp.S: New file.
16901 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16902 `normal/powerpc/setjmp.S'.
16903 (grubof_CFLAGS): Add `-DGRUBOF'.
16904 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16905 [GRUB_UTIL && !GRUBOF].
16907 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16909 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16910 property named `name'. Correctly handle the error returned by
16911 `grub_ieee1275_finddevice' if a device can not be opened.
16913 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16915 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16916 `actual' for negativity.
16917 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16920 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16922 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16923 (PAGE_OFFSET): New macro.
16924 (CRTC_ADDR_PORT): Likewise.
16925 (CRTC_DATA_PORT): Likewise.
16926 (START_ADDR_HIGH_REGISTER): Likewise.
16927 (START_ADDR_LOW_REGISTER): Likewise.
16928 (GRAPHICS_ADDR_PORT): Likewise.
16929 (GRAPHICS_DATA_PORT): Likewise.
16930 (READ_MAP_REGISTER): Likewise.
16931 (INPUT_STATUS1_REGISTER): Likewise.
16932 (INPUT_STATUS1_VERTR_BIT): Likewise.
16933 (page): New variable.
16934 (wait_vretrace): New function.
16935 (set_read_map): Likewise.
16936 (set_start_address): Likewise.
16937 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16939 (check_vga_mem): Take the page into account.
16940 (write_char): Likewise.
16941 (write_cursor): Likewise.
16942 (scroll_up): Likewise. Copy the page to the page that is not
16943 shown and switch between both pages.
16944 (grub_vga_putchar): Fix off by one error.
16945 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16948 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16950 Add support for iso9660 (including rockridge).
16952 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16953 (iso9660_mod_SOURCES): New variable.
16954 (iso9660_mod_CFLAGS): Likewise.
16955 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16956 * include/grub/fs.h (grub_iso9660_init): New prototype.
16957 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16958 * fs/iso9660.c: New file.
16960 * include/grub/misc.h (grub_strncat): New prototype.
16961 * kern/misc.c (grub_strncat): New function.
16963 * fs/hfs.c (grub_hfs_mount): Translate the error
16964 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16965 * fs/jfs.c (grub_jfs_mount): Likewise.
16966 * fs/ufs.c (grub_ufs_mount): Likewise.
16968 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16970 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16971 which initialized BAT registers.
16972 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16973 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16975 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16976 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16978 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16979 (grub_mapclaim): Likewise.
16980 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16981 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16984 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16986 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16987 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16988 -ffreestanding and -msoft-float.
16990 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16992 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16993 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16994 set in grub_ieee1275_flags.
16996 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16998 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17000 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17001 grub_console_init first.
17002 Change the memory range used for grub_ieee1275_claim and
17003 grub_mm_init_region.
17004 Print an error message if the claim fails.
17005 Include <grub/misc.h>.
17007 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17009 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17010 Call grub_children_iterate for device nodes of type `scsi',
17012 (grub_ofdisk_open): Remove manual device alias resolution.
17013 Fix memory leak when device cannot be opened.
17014 * include/grub/powerpc/ieee1275/ieee1275.h
17015 (grub_children_iterate): New prototype.
17016 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17018 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17019 Return -1 if args.size was -1.
17021 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17023 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17024 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17025 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17026 Open Firmware's memory for it; claim memory from _start to _end.
17027 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17028 (_end): New extern.
17029 (_start): Zero BSS from __bss_start to _end.
17030 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17032 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17034 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17036 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17037 -1 if args.base was -1.
17039 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17041 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17042 escape sequence instead of a literal ^L. Also call
17043 grub_ofconsole_gotoxy.
17045 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17047 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17048 void * arguments to grub_addr_t. All callers updated. Also make
17049 the `result' argument optional.
17050 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17051 All callers updated.
17053 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17055 * commands/ls.c (grub_ls_list_files): Use the string following the
17056 initial ')', if present, as the filesystem path.
17057 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17059 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17061 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17063 Make the source code of the menu interface more readable.
17065 * normal/menu.c: Include grub/mm.h.
17066 (TERM_WIDTH): New macro.
17067 (TERM_HEIGHT): Likewise.
17068 (TERM_INFO_HEIGHT): Likewise.
17069 (TERM_MARGIN): Likewise.
17070 (TERM_SCROLL_WIDTH): Likewise.
17071 (TERM_TOP_BORDER_Y): Likewise.
17072 (TERM_LEFT_BORDER_X): Likewise.
17073 (TERM_BORDER_WIDTH): Likewise.
17074 (TERM_MESSAGE_HEIGHT): Likewise.
17075 (TERM_BORDER_HEIGHT): Likewise.
17076 (TERM_NUM_ENTRIES): Likewise.
17077 (TERM_FIRST_ENTRY_Y): Likewise.
17078 (TERM_ENTRY_WIDTH): Likewise.
17079 (TERM_CURSOR_X): Likewise.
17080 (draw_border): Use macros instead of magic numbers.
17081 (print_entry): Likewise.
17082 (print_entries): Likewise.
17083 (run_menu): Likewise. Also, handle the key 'e'.
17084 (run_menu_entry): Ignore empty command lines.
17085 (print_message): Added a new argument EDIT. If EDIT is true,
17086 print a different message.
17087 (init_page): Likewise.
17088 (edit_menu_entry): New function. Not implemented yet.
17090 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17092 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17093 can be loaded from normal mode.
17095 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17097 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17098 (multiboot_mod_CFLAGS): New variables.
17099 * loader/i386/pc/linux_normal.c: New file.
17100 * loader/i386/pc/multiboot_normal.c: Likewise.
17102 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17103 attribute `unused'.
17105 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17106 `fdiro' to read the mode information from instead of `diro'.
17108 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17109 looking up a symlink.
17111 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17113 * normal/command.c (grub_command_execute): Don't parse the
17114 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17115 flags of the command.
17117 * normal/menu.c (grub_menu_run): Fix typo.
17119 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17121 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17123 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17124 `y + 1' instead of `y - 1'.
17126 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17128 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17130 From Hollis Blanchard <hollis@penguinppc.org>:
17131 * kern/misc.c (memmove): New alias for grub_memmove.
17132 (memcmp): New alias for grub_memcmp.
17133 (memset): New alias for grub_memset.
17134 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17135 Change "int handle" to "grub_ieee1275_phandle_t handle".
17136 * include/grub/powerpc/ieee1275/ieee1275.h
17137 (grub_ieee1275_get_property): Likewise.
17139 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17141 Added normal mode command `chainloader' as module chain.mod, which
17142 depends on normal.mod and _chain.mod.
17144 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17145 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17146 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17148 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17149 but arguments parsing moved to ...
17150 (grub_chainloader_cmd): ... here. New function.
17151 * include/grub/i386/pc/chainloader.h: New file.
17152 * loader/i386/pc/chainloader_normal.c: Likewise.
17154 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17156 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17157 (grub_mkimage_LDFLAGS): Likewise.
17158 (grub_emu_SOURCES): Likewise.
17159 (kernel_img_HEADERS): Added fshelp.h.
17160 * fs/ext2.c: Include <grub/fshelp.h>.
17161 (FILETYPE_REG): New macro.
17162 (FILETYPE_INO_REG): Likewise.
17163 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17165 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17167 (grub_fshelp_node): New struct.
17168 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17170 (grub_ext2_get_file_block): Removed function.
17171 (grub_ext2_read_block): New function.
17172 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17173 This function was written.
17174 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17175 (grub_ext2_find_file): Removed function.
17176 (grub_ext2_read_symlink): New function.
17177 (grub_ext2_iterate_dir): Likewise.
17178 (grub_ext2_open): Rewritten.
17179 (grub_ext2_dir): Rewritten.
17180 * include/grub/fshelp.h: New file.
17181 * fs/fshelp.c: Likewise.
17183 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17185 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17186 (print_message): Add a missing newline.
17187 (run_menu): Added timeout support.
17188 (run_menu_entry): New local function.
17189 (grub_menu_run): Added support for booting.
17191 * kern/loader.c (grub_loader_is_loaded): New function.
17193 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17194 (grub_get_rtc): Exported.
17196 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17197 (grub_get_rtc): Exported.
17199 * include/grub/normal.h (struct grub_command_list): Remove
17200 constant from the member `command'.
17202 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17204 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17206 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17208 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17210 Add support for the JFS filesystem.
17212 * fs/jfs.c: New file.
17213 * include/grub/fs.h (grub_jfs_init): New prototype.
17214 (grub_jfs_fini): New prototype.
17215 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17216 (grub_emu_SOURCES): Likewise.
17217 (pkgdata_MODULES): Add jfs.mod.
17218 (jfs_mod_SOURCES): New variable.
17219 (jfs_mod_CFLAGS): Likewise.
17220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17221 (grubof_SOURCES): Likewise.
17222 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17224 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17225 endian to the host endian.
17226 (grub_fat_utf16_to_utf8): Move function from there...
17227 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17228 the endianness of the source string anymore.
17229 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17231 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17233 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17234 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17235 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17236 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17238 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17239 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17240 for `node_found' and `it_dir'.
17241 (grub_hfs_dir): Add prototype for `dir_hook'.
17243 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17244 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17245 and `indir32' to silence a gcc warning.
17247 * include/grub/fs.h (grub_hfs_init): New prototype.
17248 (grub_hfs_fini): Likewise.
17251 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17253 Each disk device has its own id now. This is useful to make use
17254 of multiple disk devices.
17256 * include/grub/disk.h (grub_disk_dev_id): New enum.
17257 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17258 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17260 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17261 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17263 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17264 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17266 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17267 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17269 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17270 "id" which is used by the cache manager.
17272 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17275 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17277 * fs/hfs.c: New file.
17278 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17279 (grub_emu_SOURCES): Likewise.
17280 (pkgdata_MODULES): Add hfs.mod.
17281 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17282 (grubof_SOURCES): Likewise.
17283 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17285 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17286 * kern/misc.c (grub_strncasecmp): Add function.
17288 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17290 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17293 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17294 (grub_ext2_dir): In case the directory entry type is unknown, read
17297 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17299 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17300 grub_load_linux instead of grub_rescue_cmd_linux as second
17301 argument of grub_rescue_register_command.
17303 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17305 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17307 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17309 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17310 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17311 `loader/powerpc/ieee1275/linux.c',
17312 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17313 * include/grub/powerpc/ieee1275/ieee1275.h
17314 (grub_ieee1275_release): New prototype.
17315 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17316 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17317 normal, boot, linux and linux_normal.
17318 * loader/powerpc/ieee1275/linux.c: New file.
17319 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17321 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17323 * normal/arg.c (grub_arg_parse): Correct error handling after
17324 reallocating the argumentlist (check if `argl' is not null instead
17325 of checking if `args' is not null).
17326 * kern/mm.c (grub_realloc): Return the same pointer when using the
17327 same region, instead of returning the header address.
17329 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17331 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17332 one block instead of two when looking for the initial partition.
17333 (grub_partition_probe): Initialize the local variable `p' with 0.
17334 Use base 10 for the grub_strtoul call.
17335 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17336 need for one local variable.
17337 (grub_strtoul): Don't add the new value to `num', instead of that
17340 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17342 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17343 (pxeboot_img_SOURCES): New variable.
17344 (pxeboot_img_ASFLAGS): Likewise.
17345 (pxeboot_img_LDFLAGS): Likewise.
17346 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17347 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17348 <lode_leroy@hotmail.com>.
17350 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17352 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17353 there was no input.
17355 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17357 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17358 the history buffer logic.
17360 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17362 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17363 (FILETYPE_INO_SYMLINK): New macros.
17364 (grub_ext2_find_file): Check if the node is a directory using the
17365 inode stat information instead of using the filetype in the
17366 dirent. Exclude the first character of an absolute symlink.
17367 (grub_ext2_dir): Mask out the filetype part of the mode member of
17370 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17372 Add support for UFS version 1 and 2. Add support for the minix
17373 filesystem version 1 and 2, both the variants with 14 and 30 long
17376 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17378 (grub_emu_SOURCES): Likewise.
17379 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17380 (ufs_mod_SOURCES): New variable.
17381 (ufs_mod_CFLAGS): Likewise.
17382 (minix_mod_SOURCES): Likewise.
17383 (minix_mod_CFLAGS): Likewise.
17384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17386 (grubof_SOURCES): Likewise.
17387 * fs/ufs.c: New file.
17388 * fs/minix.c: New file.
17389 * include/grub/fs.h (grub_ufs_init): New prototype.
17390 (grub_ufs_fini): Likewise.
17391 (grub_minix_init): Likewise.
17392 (grub_minix_fini): Likewise.
17393 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17396 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17399 commands/ls.c, commands/terminal.c, commands/boot.c,
17400 commands/cmp.c and commands/cat.c.
17401 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17403 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17406 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17408 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17409 and grub_, respectively. Because the conversion is trivial and
17410 mechanical, I omit the details here. Please refer to the CVS
17411 if you need more information.
17413 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17415 * include/pupa: Renamed to ...
17416 * include/grub: ... this.
17417 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17418 * util/i386/pc/grub-mkimage.c: ... this.
17419 * util/i386/pc/pupa-setup.c: Renamed to ...
17420 * util/i386/pc/grub-setup.c: ... this.
17421 * util/pupa-emu.c: Renamed to ...
17422 * util/grub-emu.c: ... this.
17424 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17426 Add support for the newworld apple macintosh (PPC). This has been
17427 tested on the powerbook 2000 only. It only adds support for
17428 generic ieee1275 functions, console and disk support. This should
17429 be easy to port to other architectures with support for Open
17432 * configure.ac: Accept the powerpc as host_cpu. In the case of
17433 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17434 specific tests are only executed while building for the i386.
17435 Inverse test for crosscompile.
17436 * genmk.rb (Utility): Allow assembler files.
17437 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17438 * conf/powerpc-ieee1275.rmk: New file.
17439 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17440 * disk/powerpc/ieee1275/partition.c: Likewise.
17441 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17442 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17443 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17444 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17445 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17446 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17447 * include/pupa/powerpc/ieee1275/loader.h
17448 * include/pupa/powerpc/setjmp.h: Likewise.
17449 * include/pupa/powerpc/types.h: Likewise.
17450 * kern/powerpc/ieee1275/init.c: Likewise.
17451 * kern/powerpc/ieee1275/openfw.c: Likewise.
17452 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17454 These files were written by Johan Rydberg
17455 (jrydberg@night.trouble.net) and I only modified them slightly.
17457 * boot/powerpc/ieee1275/cmain.c: New file.
17458 * boot/powerpc/ieee1275/crt0.S: Likewise.
17459 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17460 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17462 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17464 * Makefile.in: Update copyright.
17465 * genmodsrc.sh: Likewise.
17466 * gensymlist.sh: Likewise.
17467 * term/i386/pc/vga.c: Indent correctly.
17469 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17470 bugreporting address.
17471 * util/i386/pc/pupa-setup.c (usage): Likewise,
17472 (main): Call pupa_ext2_init and pupa_ext2_fini.
17474 * fs/fat.c (log2): Renamed to ...
17475 (fat_log2): ... this.
17476 All callers changed.
17477 * kern/misc.c (memcpy): Alias to pupa_memmove.
17478 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17480 * util/console.c (pupa_ncurses_fini): Return 0.
17482 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17483 Move fail label here.
17484 [__GNU__]: Don't warn when using stat.
17485 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17486 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17487 long int. Use strtol instead of strtoul.
17489 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17491 * commands/boot.c: New file.
17492 * commands/cat.c: Likewise.
17493 * commands/cmp.c: Likewise.
17494 * commands/ls.c: Likewise.
17495 * commands/terminal.c: Likewise.
17496 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17497 (pupa_register_command): Changed interface to match the new
17499 (pupa_command_execute): Changed (almost rewritten) so it uses
17500 pupa_split_command. Added support for setting variables using the
17502 (rescue_command): Changed to work with the new argument parser.
17503 (terminal_command): Moved from here to commands/terminal.c.
17504 (set_command): New function.
17505 (unset_command): New function.
17506 (insmod_command): New function.
17507 (rmmod_command): New function.
17508 (lsmod_command): New function.
17509 (pupa_command_init): Don't initialize the command terminal
17510 anymore. Initialize the commands set, unset, insmod, rmmod and
17512 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17513 (kernel_img_HEADERS): Add arg.h and env.h.
17514 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17515 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17516 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17518 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17520 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17521 (boot_mod_SOURCES): New variable.
17522 (terminal_mod_SOURCES): Likewise.
17523 (ls_mod_SOURCES): Likewise.
17524 (cmp_mod_SOURCES): Likewise.
17525 (cat_mod_SOURCES): Likewise.
17527 * normal/arg.c: New file.
17528 * kern/env.c: Likewise.
17529 * include/pupa/arg.h: Likewise.
17530 * include/pupa/env.h: Likewise.
17531 * font/manager.c (font_command): Changed to match argument parsing
17533 (PUPA_MOD_INIT): Likewise.
17534 * hello/hello.c (pupa_cmd_hello): Likewise.
17535 (PUPA_MOD_INIT): Likewise.
17536 * include/pupa/disk.h: Include <pupa/device.h>.
17537 (pupa_print_partinfo): New prototype.
17538 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17539 (pupa_dl_get_prefix): Likewise.
17540 * include/pupa/misc.h: Include <pupa/err.h>.
17541 (pupa_isgraph): New prototype.
17542 (pupa_isdigit): Likewise.
17543 (pupa_split_cmdline): Likewise.
17544 * include/pupa/normal.h: Include <pupa/arg.h>.
17545 (pupa_command): Changed the prototype of the member `func' to
17546 match the argument parsing interface. Added member `options'.
17547 (pupa_register_command): Updated to match function.
17548 (pupa_arg_parse): New prototype.
17549 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17550 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17551 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17552 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17553 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17554 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17555 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17556 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17557 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17558 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17559 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17560 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17561 * kern/disk.c: Include <pupa/file.h>.
17562 (pupa_print_partinfo): New function.
17563 * kern/dl.c: Include <pupa/env.h>.
17564 (pupa_dl_dir): Variable removed.
17565 (pupa_dl_load): Use the environment variable `prefix' instead of
17566 the variable pupa_dl_dir.
17567 (pupa_dl_set_prefix): Function removed.
17568 (pupa_dl_get_prefix): Likewise.
17569 * kern/i386/pc/init.c: Include <pupa/env.h>.
17570 (pupa_machine_init): Use the environment variable `prefix' instead of
17571 using pupa_dl_set_prefix to set the prefix.
17572 * kern/main.c: Include <pupa/env.h>.
17573 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17574 using pupa_dl_get_prefix to get the prefix.
17575 * kern/misc.c: Include <pupa/env.h>.
17576 (pupa_isdigit): New function.
17577 (pupa_isgraph): Likewise.
17578 (pupa_ftoa): Likewise.
17579 (pupa_vsprintf): Added support for printing values of the type
17580 `double'. Make it possible to format variable output when using
17581 formatting like `%1.2%f'.
17582 (pupa_split_cmdline): New function.
17583 * kern/rescue.c: Include <pupa/env.h>.
17584 (next_word): Removed function.
17585 (pupa_rescue_cmd_prefix): Likewise.
17586 (pupa_rescue_cmd_set): New function.
17587 (pupa_rescue_cmd_unset): New function.
17588 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17589 split the command line instead of splitting it here. Added
17590 support for setting variables using the syntax `foo=bar'. Don't
17591 initialize the prefix command anymore. Initialized the set and
17593 * normal/cmdline.c: Include <pupa/env.h>.
17594 (pupa_tab_complete): Added prototypes for print_simple_completion,
17595 print_partition_completion, add_completion, iterate_commands,
17596 iterate_dev, iterate_part and iterate_dir. Moved code to print
17597 partition information from here to kern/disk.c.
17598 (pupa_cmdline_run): Don't check if the function exists anymore.
17599 * normal/main.c: Include <pupa/env.h>.
17600 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17601 instead of using pupa_dl_get_prefix to get the prefix.
17602 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17603 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17605 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17606 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17607 ((unused))' to silence a gcc warning.
17608 (pupa_vga_setcolor): Likewise.
17609 (debug_command): Changed to match argument parsing
17611 * util/pupa-emu.c: Include <pupa/env.h>.
17612 (options): Added 0's for unused fields to silence a gcc warning.
17614 (main): Use the environment variable `prefix' instead of using
17615 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17616 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17619 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17620 * util/misc.c: Include <malloc.h>.
17621 (pupa_malloc): Rewritten so errors are correctly reported.
17622 (pupa_realloc): Likewise.
17623 (pupa_memalign): Likewise.
17624 (pupa_mm_init_region): Declare unused variables with
17625 `__attribute__ ((unused))' to silence a gcc warning.
17626 * normal/i386/setjmp.S: Remove tab at the end of the file to
17627 silence a gcc warning.
17628 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17629 variables with `__attribute__ ((unused))' to silence a gcc
17631 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17632 local variable i unsigned to silence a gcc warning.
17634 * kern/term.c: Include <pupa/misc.h>.
17635 (pupa_more_lines): New variable.
17636 (pupa_more): Likewise.
17637 (pupa_putcode): When the pager is active pause at the end of every
17639 (pupa_set_more): New function.
17640 * include/pupa/term.h (pupa_set_more): New prototype.
17643 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17645 Now this project is GRUB 2 rather than PUPA. The location of
17646 the CVS repository was moved to GRUB's.
17648 * configure.ac: Use bug-grub as the reporting address.
17649 Use GRUB instead of PUPA.
17650 Change the version number to 1.90.
17652 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17654 * genkernsyms.sh: Updated copyright information.
17655 * genmk.rb: Likewise.
17656 * genmodsrc.sh: Likewise.
17657 * gensymlist.sh: Likewise.
17658 * boot/i386/pc/boot.S: Likewise.
17659 * boot/i386/pc/diskboot.S: Likewise.
17660 * disk/i386/pc/biosdisk.c: Likewise.
17661 * disk/i386/pc/partition.c: Likewise.
17662 * font/manager.c: Likewise.
17663 * fs/ext2.c: Likewise.
17664 * fs/fat.c: Likewise.
17665 * include/pupa/boot.h: Likewise.
17666 * include/pupa/device.h: Likewise.
17667 * include/pupa/disk.h: Likewise.
17668 * include/pupa/dl.h: Likewise.
17669 * include/pupa/elf.h: Likewise.
17670 * include/pupa/err.h: Likewise.
17671 * include/pupa/file.h: Likewise.
17672 * include/pupa/font.h: Likewise.
17673 * include/pupa/fs.h: Likewise.
17674 * include/pupa/kernel.h: Likewise.
17675 * include/pupa/loader.h: Likewise.
17676 * include/pupa/misc.h: Likewise.
17677 * include/pupa/mm.h: Likewise.
17678 * include/pupa/net.h: Likewise.
17679 * include/pupa/normal.h: Likewise.
17680 * include/pupa/rescue.h: Likewise.
17681 * include/pupa/setjmp.h: Likewise.
17682 * include/pupa/symbol.h: Likewise.
17683 * include/pupa/term.h: Likewise.
17684 * include/pupa/types.h: Likewise.
17685 * include/pupa/i386/setjmp.h: Likewise.
17686 * include/pupa/i386/types.h: Likewise.
17687 * include/pupa/i386/pc/biosdisk.h: Likewise.
17688 * include/pupa/i386/pc/boot.h: Likewise.
17689 * include/pupa/i386/pc/console.h: Likewise.
17690 * include/pupa/i386/pc/init.h: Likewise.
17691 * include/pupa/i386/pc/kernel.h: Likewise.
17692 * include/pupa/i386/pc/linux.h: Likewise.
17693 * include/pupa/i386/pc/loader.h: Likewise.
17694 * include/pupa/i386/pc/memory.h: Likewise.
17695 * include/pupa/i386/pc/multiboot.h: Likewise.
17696 * include/pupa/i386/pc/partition.h: Likewise.
17697 * include/pupa/i386/pc/time.h: Likewise.
17698 * include/pupa/i386/pc/vga.h: Likewise.
17699 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17700 * include/pupa/util/getroot.h: Likewise.
17701 * include/pupa/util/misc.h: Likewise.
17702 * include/pupa/util/resolve.h: Likewise.
17703 * kern/device.c: Likewise.
17704 * kern/disk.c: Likewise.
17705 * kern/dl.c: Likewise.
17706 * kern/err.c: Likewise.
17707 * kern/file.c: Likewise.
17708 * kern/fs.c: Likewise.
17709 * kern/loader.c: Likewise.
17710 * kern/main.c: Likewise.
17711 * kern/misc.c: Likewise.
17712 * kern/mm.c: Likewise.
17713 * kern/rescue.c: Likewise.
17714 * kern/term.c: Likewise.
17715 * kern/i386/dl.c: Likewise.
17716 * kern/i386/pc/init.c: Likewise.
17717 * kern/i386/pc/lzo1x.S: Likewise.
17718 * kern/i386/pc/startup.S: Likewise.
17719 * loader/i386/pc/chainloader.c: Likewise.
17720 * loader/i386/pc/linux.c: Likewise.
17721 * loader/i386/pc/multiboot.c: Likewise.
17722 * normal/cmdline.c: Likewise.
17723 * normal/command.c: Likewise.
17724 * normal/main.c: Likewise.
17725 * normal/menu.c: Likewise.
17726 * normal/i386/setjmp.S: Likewise.
17727 * term/i386/pc/console.c: Likewise.
17728 * term/i386/pc/vga.c: Likewise.
17729 * util/console.c: Likewise.
17730 * util/genmoddep.c: Likewise.
17731 * util/misc.c: Likewise.
17732 * util/pupa-emu.c: Likewise.
17733 * util/resolve.c: Likewise.
17734 * util/unifont2pff.rb: Likewise.
17735 * util/i386/pc/biosdisk.c: Likewise.
17736 * util/i386/pc/getroot.c: Likewise.
17737 * util/i386/pc/pupa-mkimage.c: Likewise.
17738 * util/i386/pc/pupa-setup.c: Likewise.
17740 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17742 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17743 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17744 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17745 reading and reset it after reading.
17746 (pupa_ext2_close): Return PUPA_ERR_NONE.
17748 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17750 (struct linux_kernel_header): Add kernel_version and
17752 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17753 pupa_file_read succeeds.
17754 (pupa_rescue_cmd_initrd): Implement.
17756 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17758 * fs/ext2.c (pupa_ext2_label): New function.
17759 (pupa_ext2_fs): Added label.
17760 * fs/fat.c (pupa_fat_label): New function.
17761 (pupa_fat_fs): Added label.
17762 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17764 * kern/misc.c (pupa_strndup): New function.
17765 * include/pupa/misc.h (pupa_strndup): New prototype.
17767 * include/pupa/normal.h: Include <pupa/err.h>.
17768 (pupa_set_history): New prototype.
17769 (pupa_iterate_commands): New prototype.
17770 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17771 <pupa/disk.h>, <pupa/file.h>.
17772 (hist_size): New variable.
17773 (hist_lines): Likewise.
17774 (hist_end): Likewise.
17775 (hist_used): Likewise.
17776 (pupa_set_history): New function.
17777 (pupa_history_get): Likewise.
17778 (pupa_history_add): Likewise.
17779 (pupa_history_replace): Likewise.
17780 (pupa_tab_complete): Likewise.
17781 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17782 completion shows partitionnames while completing partitions, this
17783 feature was suggested by Jeff Bailey.
17784 * normal/command.c (pupa_iterate_commands): New function.
17785 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17786 (pupa_normal_init): Initialize history buffer.
17787 (PUPA_MOD_INIT): Likewise.
17788 (pupa_normal_fini): Free the history buffer.
17789 (PUPA_MOD_FINI): Likewise.
17791 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17794 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17795 * configure.ac [i386]: Check for regparam bug.
17796 (NESTED_FUNC_ATTR) [! i386]: Defined.
17798 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17800 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17801 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17802 (pupa_emu_SOURCES): New variable.
17803 (pupa_emu_LDFLAGS): Likewise.
17804 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17805 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17806 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17807 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17808 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17809 (pupa_jmp_buf): New typedef.
17810 (pupa_setjmp) [PUPA_UTIL]: New macro.
17811 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17812 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17813 (pupa_refresh): New prototype.
17814 * include/pupa/util/getroot.h: New file.
17815 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17817 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17818 (pupa_rescue_cmd_cat): Likewise.
17819 (pupa_rescue_cmd_ls): Likewise.
17820 (pupa_rescue_cmd_testload): Likewise.
17821 (pupa_rescue_cmd_lsmod): Likewise.
17822 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17823 * normal/menu.c (run_menu): Likewise.
17824 * kern/term.c (pupa_cls): Likewise.
17825 (pupa_refresh): New function.
17826 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17827 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17828 * util/console.c: New file.
17830 * util/i386/pc/getroot.c: New file.
17831 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17832 (pupa_putchar): New function.
17833 (pupa_refresh): Likewise.
17834 (xgetcwd): Function moved to ...
17835 (strip_extra_slashes): Likewise.
17836 (get_prefix): Likewise.
17837 * util/i386/pc/getroot.c: ... here.
17838 (find_root_device): Function moved and renamed to...
17839 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17840 Changed all callers.
17841 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17843 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17844 Changed all callers.
17845 * util/misc.c (pupa_memalign): New function.
17846 (pupa_mm_init_region): Likewise.
17847 (pupa_register_exported_symbols): Likewise.
17848 (pupa_putchar): Function removed.
17849 * util/pupa-emu.c: New file.
17851 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17853 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17854 (_multiboot_mod_SOURCES): New variable.
17855 (_multiboot_mod_CFLAGS): Likewise.
17856 * loader/i386/pc/multiboot.c: New file.
17857 * include/pupa/i386/pc/multiboot.h: Likewise.
17858 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17859 (pupa_multiboot_real_boot): New function.
17860 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17861 (pupa_multiboot_real_boot): New prototype.
17862 (pupa_rescue_cmd_multiboot): Likewise
17863 (pupa_rescue_cmd_module): Likewise.
17865 * kern/loader.c (pupa_loader_set): Continue when
17866 pupa_loader_unload_func() fails.
17867 (pupa_loader_unset): New function.
17868 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17870 * kern/misc.c (pupa_stpcpy): New function.
17871 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17873 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17875 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17876 for available extensions.
17878 * include/pupa/i386/pc/time.h: New file.
17879 * kern/disk.c: Include <pupa/machine/time.h>.
17880 (PUPA_CACHE_TIMEOUT): New macro.
17881 (pupa_last_time): New variable.
17882 (pupa_disk_open): Flush the cache when there was a timeout.
17883 (pupa_disk_close): Reset the timer.
17884 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17886 * util/misc.c: Include <sys/times.h>
17887 (pupa_get_rtc): New function.
17889 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17891 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17893 (pupa_ext2_get_file_block): Use blocks member.
17895 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17896 first block. Return -1 instead of pupa_errno on error.
17898 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17900 * README: In the pupa-mkimage example use _chain instead of chain
17901 and ext2 instead of fat.
17902 * TODO: Replace ext2fs with jfs as an example. Add an item for
17903 adding journal playback for ext2fs.
17904 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17905 (pkgdata_MODULES): Added ext2.mod.
17906 (ext2_mod_SOURCES): New variable.
17907 (ext2_mod_CFLAGS): Likewise.
17908 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17909 * include/pupa/misc.h (pupa_strncpy): New prototype.
17910 (pupa_strcat): Likewise.
17911 (pupa_strncmp): Likewise.
17912 * kern/misc.c (pupa_strcat): Enable function.
17913 (pupa_strncpy): New function.
17914 (pupa_strncmp): Likewise.
17915 * fs/ext2.c: New file.
17917 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17918 when the read failed before retrying.
17919 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17920 (_FILE_OFFSET_BITS): Likewise.
17921 * configure.ac: Added AC_SYS_LARGEFILE.
17923 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17925 * genmk.rb (PModule#rule): Make sure to get only symbol names
17926 from the output of nm.
17927 Reported by Robert Millan <zeratul2@wanadoo.es>.
17929 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17931 I forgot to check in these changes for a long time. This adds
17932 incomplete support for VGA console, and this is still very
17933 buggy. Also, a lot of consideration is required for I18N,
17934 UNICODE, and VGA font issues. Therefore, assume that this is
17935 such that "better than nothing".
17937 * font/manager.c: New file.
17938 * include/pupa/font.h: Likewise.
17939 * include/pupa/i386/pc/vga.h: Likewise.
17940 * term/i386/pc/vga.c: Likewise.
17941 * util/unifont2pff.rb: Likewise.
17943 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17944 (pkgdata_MODULES): Added vga.mod and font.mod.
17945 (vga_mod_SOURCES): New variables.
17946 (vga_mod_CFLAGS): Likewise.
17947 (font_mod_SOURCES): Likewise.
17948 (font_mod_CFLAGS): Likewise.
17950 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17952 * include/pupa/term.h: Include pupa/err.h.
17953 (struct pupa_term): Added init and fini.
17954 Changed the argument of putchar to pupa_uint32_t.
17956 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17957 (pupa_console_real_putchar): New prototype.
17958 (pupa_console_putchar): Removed.
17959 (pupa_console_checkkey): Exported.
17960 (pupa_console_getkey): Likewise.
17962 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17965 * kern/term.c (pupa_term_set_current): Rewritten.
17966 (pupa_putchar): Likewise.
17967 (pupa_putcode): New function.
17969 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17970 (pupa_console_real_putchar): ... this.
17971 (pupa_vga_set_mode): New function.
17972 (pupa_vga_get_font): Likewise.
17974 * normal/command.c: Include pupa/term.h.
17975 (terminal_command): New function.
17976 (pupa_command_init): Register the command "terminal".
17978 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17979 (DISP_UP): Likewise.
17980 (DISP_RIGHT): Likewise.
17981 (DISP_DOWN): Likewise.
17982 (DISP_HLINE): Likewise.
17983 (DISP_VLINE): Likewise.
17984 (DISP_UL): Likewise.
17985 (DISP_UR): Likewise.
17986 (DISP_LL): Likewise.
17987 (DISP_LR): Likewise.
17989 * term/i386/pc/console.c (pupa_console_putchar): New function.
17991 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17993 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17994 FIX. Reverse the path_list.
17996 * include/pupa/normal.h: Export pupa_register_command and
17997 pupa_unregister_command.
17999 * hello/hello.c (pupa_cmd_hello): New module.
18000 * conf/i386-pc.rmk: Added hello.mod.
18002 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18004 * kern/i386/pc/lzo1x.S: New file.
18006 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18007 (compress_kernel): New variable.
18008 (generate_image): Heavily modified to support compressing a
18009 large part of the core image.
18011 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18013 (pupa_util_load_image): New function.
18015 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18016 (pupa_compressed_size): New variable.
18017 (codestart): Enable Gate A20 here.
18018 Decompress the compressed part of the core image.
18019 Rearrange the code to put functions and variables which are
18020 required for initialization in the non-compressed part.
18023 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18026 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18028 * include/pupa/i386/pc/kernel.h
18029 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18030 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18031 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18032 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18033 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18035 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18037 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18038 (Utility#rule): Likewise.
18040 * configure.ac: Check if LZO is available.
18042 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18044 * include/pupa/normal.h: New file.
18045 * include/pupa/setjmp.h: Likewise.
18046 * include/pupa/i386/setjmp.h: Likewise.
18047 * normal/cmdline.c: Likewise.
18048 * normal/command.c: Likewise.
18049 * normal/main.c: Likewise.
18050 * normal/menu.c: Likewise.
18051 * normal/i386/setjmp.S: Likewise.
18053 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18054 (pupa_rescue_cmd_initrd): Likewise.
18056 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18059 * kern/i386/pc/startup.S (translation_table): New variable.
18060 (translate_keycode): New function.
18061 (pupa_console_getkey): Call translate_keycode.
18063 * kern/rescue.c (attempt_normal_mode): New function.
18064 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18065 it failed, print a message.
18067 * kern/mm.c (pupa_real_malloc): Print more information when a
18068 free magic is broken.
18069 (pupa_free): If the first free header is not free actually, set
18072 * kern/main.c (pupa_load_normal_mode): Just load the module
18074 (pupa_main): Don't print the message
18075 "Entering into rescue mode..." here.
18077 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18079 (pupa_rescue_cmd_initrd): Likewise.
18080 (pupa_rescue_cmd_initrd): Likewise.
18082 * include/pupa/symbol.h (FUNCTION): Specify the type.
18083 (VARIABLE): Likewise.
18085 * include/pupa/err.h (pupa_err_t): Added
18086 PUPA_ERR_UNKNOWN_COMMAND.
18088 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18089 (pupa_dl_get_prefix): Likewise.
18091 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18092 Added _chain.mod and _linux.mod instead of chain.mod and
18094 (chain_mod_SOURCES): Renamed to ...
18095 (_chain_mod_SOURCES): ... this.
18096 (chain_mod_CFLAGS): Renamed to ...
18097 (_chain_mod_CFLAGS): ... this.
18098 (linux_mod_SOURCES): Renamed to ...
18099 (_linux_mod_SOURCES): ... this.
18100 (linux_mod_CFLAGS): Renamed to ...
18101 (_linux_mod_CFLAGS): ... this.
18102 (normal_mod_SOURCES): New variable.
18103 (normal_mod_CFLAGS): Likewise.
18104 (normal_mod_ASFLAGS): Likewise.
18106 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18108 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18111 * kern/dl.c (pupa_dl_ref): Refer depending modules
18113 (pupa_dl_unref): Unrefer depending modules recursively.
18114 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18115 a module is unloaded before one depending on that module is
18117 (pupa_dl_unload): Unload depending modules explicitly,
18120 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18122 * include/pupa/i386/pc/linux.h: New file.
18123 * loader/i386/pc/linux.c: Likewise.
18125 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18127 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18128 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18129 of PUPA_CHAINLOADER_BOOT_SECTOR.
18131 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18132 (pupa_linux_prot_size): New variable.
18133 (pupa_linux_tmp_addr): Likewise.
18134 (pupa_linux_real_addr): Likewise.
18135 (pupa_linux_boot_zimage): New function.
18136 (pupa_linux_boot_bzimage): Likewise.
18138 * kern/i386/pc/init.c (struct mem_region): New structure.
18139 (MAX_REGIONS): New macro.
18140 (mem_regions): New variable.
18141 (num_regions): Likewise.
18142 (pupa_os_area_addr): Likewise.
18143 (pupa_os_area_size): Likewise.
18144 (pupa_lower_mem): Likewise.
18145 (pupa_upper_mem): Likewise.
18146 (add_mem_region): New function.
18147 (compact_mem_regions): Likewise.
18148 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18149 the size of the conventional memory and that of so-called upper
18150 memory (before the first memory hole).
18151 Instead of adding each found region to free memory, use
18152 add_mem_region and add them after removing overlaps.
18153 Also, add only 1/4 of the upper memory to free memory. The rest
18154 is used for loading OS images. Maybe this is ad hoc, but this
18155 makes it much easier to relocate OS images when booting.
18157 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18158 (pupa_enter_rescue_mode): Don't register initrd and module.
18160 * kern/mm.c: Include pupa/dl.h.
18162 * kern/main.c: Include pupa/file.h and pupa/device.h.
18164 * kern/loader.c (pupa_loader_load_module_func): Removed.
18165 (pupa_loader_load_module): Likewise.
18167 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18170 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18171 (pupa_linux_tmp_addr): Likewise.
18172 (pupa_linux_real_addr): Likewise.
18173 (pupa_linux_boot_zimage): Likewise.
18174 (pupa_linux_boot_bzimage): Likewise.
18176 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18177 (pupa_upper_mem): Likewise.
18178 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18179 module is too dangerous.
18181 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18182 (pupa_os_area_size): Likewise.
18183 (pupa_loader_set): Remove the first argument. Loader doesn't
18184 manage modules or initrd any longer.
18185 (pupa_loader_load_module): Removed.
18187 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18188 (linux_mod_SOURCES): New variable.
18189 (linux_mod_CFLAGS): Likewise.
18191 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18193 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18194 the length of a blocklist correctly.
18196 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18197 Use ioctl only if the OS file is a block device.
18198 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18199 not very useful for normal files.
18201 * kern/main.c (pupa_set_root_dev): New function.
18202 (pupa_load_normal_mode): Likewise.
18203 (pupa_main): Call those above.
18205 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18208 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18210 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18212 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18213 (setup): Configure the installed partition information and the
18216 * loader/i386/pc/chainloader.c (my_mod): New variable.
18217 (pupa_chainloader_unload): New function.
18218 (pupa_rescue_cmd_chainloader): Refer itself.
18219 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18221 * kern/i386/pc/startup.S (install_partition): Removed.
18222 (version_string): Likewise.
18223 (config_file): Likewise.
18224 (pupa_install_dos_part): New variable.
18225 (pupa_install_bsd_part): Likewise.
18226 (pupa_prefix): Likewise.
18227 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18229 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18231 (make_install_device): New function.
18232 (pupa_machine_init): Set the dl prefix.
18234 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18235 (buf): Renamed to ...
18236 (linebuf): ... this.
18237 (pupa_rescue_cmd_prefix): New function.
18238 (pupa_rescue_cmd_insmod): Likewise.
18239 (pupa_rescue_cmd_rmmod): Likewise.
18240 (pupa_rescue_cmd_lsmod): Likewise.
18241 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18244 * kern/mm.c (pupa_memalign): If failed even after invalidating
18245 disk caches, unload unneeded modules and retry.
18247 * kern/misc.c (pupa_memmove): New function.
18248 (pupa_memcpy): Removed.
18249 (pupa_strcpy): New function.
18250 (pupa_itoa): Made static.
18252 * kern/dl.c (pupa_dl_iterate): New function.
18253 (pupa_dl_ref): Likewise.
18254 (pupa_dl_unref): Likewise.
18255 (pupa_dl_unload): Return if succeeded or not.
18256 (pupa_dl_unload_unneeded): New function.
18257 (pupa_dl_unload_all): Likewise.
18258 (pupa_dl_init): Renamed to ...
18259 (pupa_dl_set_prefix): ... this.
18260 (pupa_dl_get_prefix): New function.
18262 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18263 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18264 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18265 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18266 (pupa_install_dos_part): Declared.
18267 (pupa_install_bsd_part): Likewise.
18268 (pupa_prefix): Likewise.
18269 (pupa_boot_drive): Likewise.
18271 * include/pupa/types.h: Fix a typo.
18273 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18275 (pupa_memmove): Declared.
18276 (pupa_strcpy): Likewise.
18278 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18279 pupa_mod_init takes one argument, its own module.
18280 (pupa_dl_unload_unneeded): Declared.
18281 (pupa_dl_unload_all): Likewise.
18282 (pupa_dl_ref): Likewise.
18283 (pupa_dl_unref): Likewise.
18284 (pupa_dl_iterate): Likewise.
18285 (pupa_dl_init): Renamed to ...
18286 (pupa_dl_set_prefix): ... this.
18287 (pupa_dl_get_prefix): Declared.
18289 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18290 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18292 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18293 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18295 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18296 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18298 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18300 * util/i386/pc/pupa-setup.c (setup): Define the internal
18301 function find_first_partition_start at the top level, because GCC
18302 3.0.x cannot compile internal functions in deeper scopes
18304 (find_root_device): Use lstat instead of stat.
18305 Don't follow symbolic links.
18306 Fix the path-constructing code.
18308 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18309 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18310 by a BLKGETSIZE ioctl first, because block devices don't fill
18311 the member st_mode of the structure stat on Linux.
18312 [__linux__] (linux_find_partition): Use a temporary buffer
18313 REAL_DEV for the working space. Copy it to DEV before returning.
18314 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18315 buffer cache consistent.
18316 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18317 strncmp. The previous value was merely wrong.
18318 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18320 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18321 FAT size is 12. The previous value was merely wrong.
18323 * kern/main.c (pupa_main): Don't split the starting message from
18326 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18327 LF, because BIOS goes crazy about character attributes in this
18330 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18332 * include/i386/pc/util/biosdisk.h: New file.
18333 * util/i386/pc/biosdisk.c: Likewise.
18334 * util/i386/pc/pupa-setup.c: Likewise.
18336 * Makefile.in (INCLUDE_DISTFILES): Added
18337 include/pupa/i386/pc/util/biosdisk.h.
18338 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18339 directory util/i386/pc.
18340 (install-local): Added a rule for sbin_UTILITIES.
18341 (uninstall): Likewise.
18343 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18345 * util/misc.c (xrealloc): New function.
18346 (pupa_malloc): Likewise.
18347 (pupa_free): Likewise.
18348 (pupa_realloc): Likewise.
18349 (pupa_stop): Likewise.
18350 (pupa_putchar): Likewise.
18352 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18354 * include/pupa/util/misc.h (xrealloc): Declared.
18356 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18358 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18359 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18361 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18362 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18364 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18365 way should be implemented.
18366 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18368 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18369 the size of NAME for safety.
18370 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18373 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18374 (pupa_setup_SOURCES): Likewise.
18376 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18378 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18380 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18381 bunch of pushl's from pusha, because this destroys the return
18384 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18386 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18387 This means that any missing prototypes could be fatal. Also, you
18388 must take care when writing assembly code. See the comments at
18389 the beginning of startup.S, for more details.
18391 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18392 compilation mechanism.
18393 (pupa_chainloader_real_boot): Likewise.
18394 (pupa_biosdisk_rw_int13_extensions): Likewise.
18395 (pupa_biosdisk_rw_standard): Likewise.
18396 (pupa_biosdisk_check_int13_extensions): Likewise.
18397 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18398 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18399 (pupa_get_memsize): Likewise.
18400 (pupa_get_mmap_entry): Likewise.
18401 (pupa_console_putchar): Likewise.
18402 (pupa_console_setcursor): Likewise.
18403 (pupa_getrtsecs): Use pushl instead of push.
18405 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18406 memory instead of the stack for a mmap entry, because some
18407 BIOSes may ignore the maximum size and overflow.
18409 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18411 * genmk.rb (PModule#rule): Compile automatically generated
18412 sources with module-specific CFLAGS as well as other sources.
18414 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18416 * configure.ac: Check ld.
18417 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18418 respectively, before checking endianness and sizes.
18420 * Makefile.in (LD): New variable.
18422 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18424 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18426 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18428 * Changelog: New file.