1 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
5 * commands/blocklist.c (grub_cmd_blocklist): handle nested partitions
6 * commands/hexdump.c (grub_cmd_hexdump): use grub_disk_read
7 * commands/loadenv.c (check_blocklists): handle nested partitions
8 * conf/common.rmk (grub_probe_SOURCES): add partmap/bsdlabel.c
9 (grub_fstest_SOURCES): likewise
10 (pkglib_MODULES): add bsdlabel.mod
11 (bsdlabel_mod_SOURCES): new variable
12 (bsdlabel_mod_CFLAGS): likewise
13 (bsdlabel_mod_LDFLAGS):likewise
14 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add partmap/bsdlabel.c
15 * conf/i386-pc.rmk (grub_setup_SOURCES): likewise
16 (grub_emu_SOURCES): likewise
17 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): likewise
18 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): likewise
19 * include/grub/bsdlabel.h: new file
20 * include/grub/partition.h (grub_partition_map): remove probe and
22 (grub_partition): add parent and number, remove index
23 * include/grub/pc_partition.h: Remove bsd-related entries
24 (grub_pc_partition): remove dos_part, bsd_part, add index.
25 * kern/disk.c (grub_disk_open): free partition data
26 (grub_disk_adjust_range): handle nested partitions
27 * kern/partition.c (grub_partition_map_probe): new function
28 (grub_partition_probe): parse name to number, handle subpartitions
29 (get_partmap): new function
30 (grub_partition_iterate): handle subpartitions
31 (grub_partition_get_name): likewise
32 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
33 * partmap/acorn.c (acorn_partition_map_iterate): don't force raw access
34 Use number instead of index
35 (acorn_partition_map_probe): remove
36 (acorn_partition_map_get_name): likewise
37 * partmap/amiga.c (amiga_partition_map_iterate): don't force raw access
38 Use number instead of index
39 (amiga_partition_map_probe): remove
40 (amiga_partition_map_get_name): likewise
41 * partmap/apple.c (apple_partition_map_iterate): don't force raw access
42 Use number instead of index
43 (apple_partition_map_probe): remove
44 (apple_partition_map_get_name): likewise
45 * partmap/bsdlabel.c: new file
46 * partmap/gpt.c (gpt_partition_map_iterate): don't force raw access
47 Use number instead of index
48 (gpt_partition_map_probe): remove
49 (gpt_partition_map_get_name): likewise
50 * partmap/pc.c (grub_partition_parse): remove
51 (pc_partition_map_iterate): don't force raw access
54 don't handle bsd labels
55 prevent pc_parition from being nested
56 (pc_partition_map_probe): remove
57 (pc_partition_map_get_name): remove
58 * partmap/sun.c (sun_partition_map_iterate): don't force raw access
59 Use number instead of index
60 (sun_partition_map_probe): remove
61 (sun_partition_map_get_name): likewise
62 * parttool/pcpart.c (grub_pcpart_boot): handle nested partitions
64 (grub_pcpart_type): likewise
65 * util/hostdisk.c (open_device): handle new numbering scheme
66 (grub_util_biosdisk_get_grub_dev): handle nested partitions
67 * util/i386/pc/grub-setup.c (setuo): handle new numbering scheme
69 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
73 * commands/hfspbless.c: new file
74 * conf/common.rmk (pkglib_MODULES): add hfspbless.mod
75 (hfspbless_mod_SOURCES): new variable
76 (hfspbless_mod_CFLAGS): likewise
77 (hfspbless_mod_LDFLAGS): likewise
78 * conf/i386-pc.rmk (grub_emu_SOURCES): add commands/hfspbless.c
79 * fs/hfsplus.c: move definitions
80 * include/grub/hfsplus.h: here
81 * fs/hfsplus.c (grub_hfsplus_dir): set inode
82 * include/grub/fs.h (grub_dirhook_info): new fields inode and inodeset
84 2009-07-15 Vladimir Serbinenko <phcoder@gmail.com>
88 * commands/usbreset.c: new file
89 * conf/i386-pc.rmk (pkglib_MODULES): add usbreset.mod
90 (usbreset_mod_SOURCES): new variable
91 (usbreset_mod_CFLAGS): likewise
92 (usbreset_mod_LFFLAGS): likewise
94 2009-07-17 Vladimir Serbinenko <phcoder@gmail.com>
96 Always compile efiemu32.o
98 * Makefile.in (enable_efiemu): change to ...
99 (enable_efiemu64): ... this
100 * commands/i386/cpuid.c (grub_i386_cpuid_has_longmode): new function
101 * conf/i386-pc.rmk (efiemu_mod_SOURCES): remove efiemu/i386/coredetect.c
102 (efiemu32.o): always compile this target
103 * configure.ac: change enable-efiemu to enable-efiemu64.
104 Restrict efiemu compilation to i386-pc
105 * efiemu/i386/coredetect.c: remove file
106 * efiemu/main.c (grub_efiemu_load_file): return error correctly
107 (grub_efiemu_autocore): fallback to efiemu32.o on amd64 if efiemu64.o
109 * efiemu/mm.c (grub_efiemu_mmap_init): correct comment style
110 * include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
112 * include/grub/i386/cpuid.h: new file
114 2009-07-17 Vladimir Serbinenko <phcoder@gmail.com>
116 * util/i386/pc/grub-setup.c (setup): Fix bug when
117 installing on partionless disk.
119 2009-07-17 Vladimir Serbinenko <phcoder@gmail.com>
123 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
124 (grub_fstest_SOURCES): Likewise.
125 (pkglib_MODULES): Add befs.mod.
126 (befs_mod_SOURCES): New variable.
127 (befs_mod_CFLAGS): Likewise.
128 (befs_mod_LDFLAGS): Likewise.
129 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
130 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
131 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
132 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
133 (grub_setup_SOURCES): Likewise.
134 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
135 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
136 (grub_setup_SOURCES): Likewise.
137 * fs/befs.c: New file.
138 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
139 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
140 (GRUB_AFS_SBLOCK_MAGIC1) [BFS]: New conditional declaration.
141 (GRUB_AFS_BTREE_MAGIC) [BFS]: Likewise
142 (B_KEY_INDEX_ALIGN): New declaration.
143 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
144 (grub_afs_bnode) [BFS]: Make key_count and key_size 16-bit
145 (grub_afs_btree) [BFS]: New conditional declaration.
146 (grub_afs_sblock) [BFS]: Remove link_count.
147 (grub_afs_validate_sblock) [BFS]: Support BFS
148 (grub_afs_mount) [BFS]: Likewise.
149 (grub_afs_dir) [BFS]: Divide mtime by 65536 and not 1000000.
150 (grub_afs_fs): Use GRUB_AFS_FSNAME
151 (GRUB_MOD_INIT (afs)) [BFS]: Rename to ...
152 (GRUB_MOD_INIT (befs)) [BFS]: ... this
153 (GRUB_MOD_FINI (afs)) [BFS]: Rename to ...
154 (GRUB_MOD_FINI (befs)) [BFS]: ... this
156 2009-07-17 Vladimir Serbinenko <phcoder@gmail.com>
158 Add symlink, mtime and label support to AtheFS.
160 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
161 (grub_afs_iterate_dir): Handle symlinks.
162 (grub_afs_open): Use grub_afs_read_symlink.
163 (grub_afs_dir): Likewise.
165 (grub_afs_label): New function.
166 (grub_afs_fs): Add grub_afs_label.
167 (grub_afs_read_symlink): New function.
169 2009-07-17 Vladimir Serbinenko <phcoder@gmail.com>
173 * fs/afs.c: Fix comments style.
174 (grub_afs_blockrun): Declare as packed.
175 (grub_afs_datastream): Likewise.
176 (grub_afs_bnode): Likewise.
177 (grub_afs_btree): Likewise.
178 (grub_afs_sblock): Likewise.
179 Declare `name' as char.
180 (grub_afs_inode): Declare as packed.
181 Change void *vnode to grub_uint32_t unused.
182 (grub_afs_iterate_dir): Check that key_size is positive.
183 (grub_afs_mount): Don't read superblock twice.
184 (grub_afs_dir): Don't free node in case of errorx
185 grub_fshelp_find_file already handles this.
186 (grub_afs_open): Likewise.
188 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
190 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
191 * fs/xfs.c (grub_xfs_dir): Likewise.
192 * fs/afs.c (grub_afs_dir): Likewise.
193 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
194 (grub_iso9660_open): Likewise.
195 * fs/jfs.c (grub_jfs_open): Likewise.
196 * fs/ext2.c (grub_ext2_dir): Likewise.
197 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
198 * script/sh/lexer.c (grub_script_yylex): Likewise.
200 2009-07-16 Pavel Roskin <proski@gnu.org>
202 * configure.ac: Never add "-c" to CFLAGS.
204 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
206 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
207 grub_cv_cc_efiemu should be used.
209 * configure.ac: Typo fixes.
211 * kern/mm.c (grub_zalloc): New function.
212 (grub_debug_zalloc): Likewise.
213 * include/grub/mm.h: Declare grub_zalloc() and
215 * util/misc.c (grub_zalloc): New function.
216 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
217 instead of grub_malloc(), remove unneeded initializations.
218 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
219 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
220 * commands/parttool.c (grub_cmd_parttool): Likewise.
221 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
222 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
223 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
224 * disk/usbms.c (grub_usbms_finddevs): Likewise.
225 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
226 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
227 (grub_cmd_efiemu_pnvram): Likewise.
228 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
229 * fs/iso9660.c (grub_iso9660_mount): Likewise.
230 (grub_iso9660_iterate_dir): Likewise.
231 * fs/jfs.c (grub_jfs_opendir): Likewise.
232 * fs/ntfs.c (list_file): Likewise.
233 (grub_ntfs_mount): Likewise.
234 * kern/disk.c (grub_disk_open): Likewise.
235 * kern/dl.c (grub_dl_load_core): Likewise.
236 * kern/elf.c (grub_elf_file): Likewise.
237 * kern/env.c (grub_env_context_open): Likewise.
238 (grub_env_set): Likewise.
239 (grub_env_set_data_slot): Likewise.
240 * kern/file.c (grub_file_open): Likewise.
241 * kern/fs.c (grub_fs_blocklist_open): Likewise.
242 * loader/i386/multiboot.c (grub_module): Likewise.
243 * loader/xnu.c (grub_xnu_create_key): Likewise.
244 (grub_xnu_create_value): Likewise.
245 * normal/main.c (grub_normal_add_menu_entry): Likewise.
246 (read_config_file): Likewise.
247 * normal/menu_entry.c (make_screen): Likewise.
248 * partmap/sun.c (sun_partition_map_iterate): Likewise.
249 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
250 * script/sh/script.c (grub_script_parse): Likewise.
251 * video/bitmap.c (grub_video_bitmap_create): Likewise.
252 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
253 * video/readers/png.c (grub_png_output_byte): Likewise.
254 (grub_video_reader_png): Likewise.
256 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
258 Enable all targets that can be built by default
260 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
261 grub-mkfont and grub-fstest if they can be built
263 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
265 Fix hang and segmentation fault in grub-emu-usb
267 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
268 * util/usb.c (grub_libusb_devices): likewise
269 (grub_libusb_init): rename to ...
270 (GRUB_MOD_INIT (libusb)):...this
271 (grub_libusb_fini): rename to ..
272 (GRUB_MOD_FINI (libusb)):...this
273 * disk/usbms.c (grub_usbms_transfer): fix retry logic
274 * include/grub/disk.h (grub_raid_init): removed, it's useless
275 (grub_raid_fini): likewise
276 (grub_lvm_init): likewise
277 (grub_lvm_fini): likewise
278 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
281 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
285 * Makefile.in (LIBUSB): new macro
286 * genmk.rb (Utility/print_tail): new method
287 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
288 (top level): call util.print_tail at the end.
290 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
292 Make FreeBSD accept zpool.cache
294 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
295 type is /boot/zfs/zpool.cache
297 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
301 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
302 correct wrong typedef
303 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
305 2009-07-15 Pavel Roskin <proski@gnu.org>
307 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
308 * kern/disk.c (struct grub_disk_cache): Likewise.
310 * commands/probe.c (options): Typo fix.
312 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
313 Increase to 0x5a to accommodate FAT32. Adjust other offsets
315 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
317 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
318 the end of "Error" to make the message more readable.
320 * boot/i386/pc/boot.S (kernel_segment): Remove.
321 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
324 * boot/i386/pc/boot.S (boot_version): Remove.
325 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
328 * include/grub/i386/pc/boot.h: Sort all offsets.
329 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
330 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
331 * boot/i386/pc/boot.S: Assert location of every offset listed in
332 include/grub/i386/pc/boot.h.
334 2009-07-13 Pavel Roskin <proski@gnu.org>
336 * include/grub/i386/coreboot/machine.h: Rename
337 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
338 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
339 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
341 * kern/dl.c: Force native word size to suppress warnings when
344 * kern/device.c (grub_device_iterate): Change struct part_ent to
345 hold the name, not a pointer to it. Use one grub_malloc() per
346 partition, not two. Free partition_name if grub_malloc() fails.
347 Set ents to NULL only before grub_partition_iterate() is called.
349 2009-07-11 Bean <bean123ch@gmail.com>
351 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
354 2009-07-10 Bean <bean123ch@gmail.com>
355 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
357 * kern/ieee1275/openfw.c (grub_children_iterate)
358 (grub_devalias_iterate): Fix size evaluation for property or path
359 strings, which was broken since r2132.
361 2009-07-07 Pavel Roskin <proski@gnu.org>
363 * commands/search.c (search_file): Merge into ...
364 (search_fs): ... this. Accept search type as argument.
365 (grub_cmd_search): Pass search type to search_fs().
367 * include/grub/util/console.h: New file.
368 * util/console.c: Use it instead of grub/machine/console.h.
369 * util/grub-emu.c: Likewise.
371 * lib/arg.c (find_long_option): Remove.
372 (find_long): Add `len' argument, make `s' const char *.
373 (grub_arg_parse): Parse long options in place, not in a
376 2009-07-06 Pavel Roskin <proski@gnu.org>
378 * commands/search.c (search_fs): Fix potential NULL pointer
381 * commands/search.c (search_fs): Replace QUID macro with quid_fn
384 2009-07-06 Daniel Mierswa <impulze@impulze.org>
386 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
389 2009-07-05 Pavel Roskin <proski@gnu.org>
391 * include/grub/i386/linux.h (struct linux_kernel_params):
392 Restore padding3, it's still needed.
394 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
396 * util/osdetect.lua: Likewise.
398 2009-07-05 Bean <bean123ch@gmail.com>
400 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
402 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
403 (grub_lua_getenv): Likewise.
404 (grub_lua_setenv): Likewise.
405 (save_errno): New function.
406 (push_result): Likewise.
407 (grub_lua_enum_device): Likewise.
408 (grub_lua_enum_file): Likewise.
409 (grub_lua_file_open): Likewise.
410 (grub_lua_file_close): Likewise.
411 (grub_lua_file_seek): Likewise.
412 (grub_lua_file_read): Likewise.
413 (grub_lua_file_getline): Likewise.
414 (grub_lua_file_getsize): Likewise.
415 (grub_lua_file_getpos): Likewise.
416 (grub_lua_file_eof): Likewise.
417 (grub_lua_file_exist): Likewise.
418 (grub_lua_add_menu): Likewise.
420 * script/lua/grub_lua.h (isupper): New inline function.
423 (isxdigit): Likewise.
424 (strcspn): Change to normal function.
425 (strpbkr): New function declaration.
428 * script/lua/grub_main.c (scan_str): New function.
433 * script/lua/linit.c (lualibs): Enable the string library.
435 * util/osdetect.lua: New file.
437 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
439 * include/grub/i386/linux.h (struct linux_kernel_params): Add
440 `capabilities' member.
442 2009-07-02 Pavel Roskin <proski@gnu.org>
444 * genparttoollist.sh: Add missing newline at the end.
446 2009-07-01 Pavel Roskin <proski@gnu.org>
448 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
450 * util/hostdisk.c (open_device): Remove `const' from
451 `sysctl_size', as sysctlbyname() can change it (in this case it
452 doesn't actually happen).
454 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
455 using signed long int constants.
457 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
458 constant to avoid a warning on FreeBSD.
460 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
463 * Makefile.in: Install include/grub/machine symlink.
465 * Makefile.in: When installing symlinks, use "cp -fR", which
466 works on FreeBSD and MacOSX.
467 From Yves Blusseau <cl7m42e02@sneakemail.com>
469 * kern/dl.c (grub_dl_resolve_symbol): Make static.
470 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
472 * util/misc.c: Move grub_reboot() and grub_halt() ...
473 * util/grub-emu.c: ... here. Make main_env static.
474 * include/grub/util/misc.h: Remove main_env.
476 * kern/mm.c: Use correct format to print size_t.
478 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
479 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
480 * kern/powerpc/dl.c: Likewise.
481 * kern/sparc64/dl.c: Likewise.
482 * kern/x86_64/dl.c: Likewise.
484 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
486 Fix grub-emu build on sparc64-ieee1275.
488 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
489 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
491 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
493 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
494 (grub_reboot, grub_halt): New functions.
496 * util/i386/pc/misc.c: Delete. Update all users.
497 * util/sparc64/ieee1275/misc.c: Likewise.
498 * util/powerpc/ieee1275/misc.c: Likewise.
500 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
502 * conf/i386.rmk (setjmp_mod_SOURCES)
503 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
504 * conf/common.rmk (setjmp_mod_SOURCES)
505 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
506 to use $(target_cpu).
507 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
508 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
509 * conf/powerpc-ieee1275.rmk: Likewise.
510 * conf/sparc64-ieee1275.rmk: Likewise.
512 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
513 $(target_cpu) for kern/$(target_cpu)/dl.c.
514 * conf/i386-efi.rmk: Likewise.
515 * conf/i386-ieee1275.rmk: Likewise.
516 * conf/x86_64-efi.rmk: Likewise.
517 * conf/i386-coreboot.rmk: Likewise.
518 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
519 $(target_cpu) for kern/$(target_cpu)/dl.c and for
520 kern/$(target_cpu)/cache.S.
521 * conf/sparc64-ieee1275.rmk: Likewise.
523 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
525 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
526 type to `grub_uint8_t', and adjust `padding9' accordingly.
528 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
530 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
532 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
533 assembly in final jump, using register constraints.
535 (grub_linux_boot): For text mode, initialize `have_vga' using
536 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
538 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
539 right before the final jump.
541 Set `video_mode' to 0x3.
543 Document initialization of `video_page', `video_mode' and
546 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
548 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
549 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
550 and set GRUB_LINUX_FLAG_QUIET appropiately.
552 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
554 Fix build on Debian / sparc.
556 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
558 2009-06-28 Pavel Roskin <proski@gnu.org>
560 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
563 * util/grub.d/10_linux.in: Match SUSE style initrd names.
565 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
567 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
570 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
574 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
575 file can't be opened. grub_file_open() is already supposed to set
576 grub_errno / grub_errmsg appropiately.
577 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
579 2009-06-27 Pavel Roskin <proski@gnu.org>
580 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
582 * include/grub/dl.h: Include grub/elf.h.
583 (struct grub_dl): Add symtab field.
584 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
585 GRUB_MODULES_MACHINE_READONLY.
586 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
587 of the header for read-only modules.
588 (grub_dl_unload): Free mod->symtab for read-only modules.
589 * kern/i386/dl.c: Use mod->symtab.
590 * kern/powerpc/dl.c: Likewise.
591 * kern/sparc64/dl.c: Likewise.
592 * kern/x86_64/dl.c: Likewise.
594 * conf/i386-qemu.rmk: New file.
595 * kern/i386/qemu/startup.S: Likewise.
596 * kern/i386/qemu/mmap.c: Likewise.
597 * boot/i386/qemu/boot.S: Likewise.
598 * include/grub/i386/qemu/time.h: Likewise.
599 * include/grub/i386/qemu/serial.h: Likewise.
600 * include/grub/i386/qemu/kernel.h: Likewise.
601 * include/grub/i386/qemu/console.h: Likewise.
602 * include/grub/i386/qemu/boot.h: Likewise.
603 * include/grub/i386/qemu/init.h: Likewise.
604 * include/grub/i386/qemu/machine.h: Likewise.
605 * include/grub/i386/qemu/loader.h: Likewise.
606 * include/grub/i386/qemu/memory.h: Likewise.
608 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
609 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
610 [qemu] (pkglib_IMAGES): Add `boot.img'.
611 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
612 [qemu] (boot_img_FORMAT): New variables.
613 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
614 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
615 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
616 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
617 [qemu] (kernel_img_FORMAT): New variables.
619 * configure.ac: Recognise `i386-qemu'.
621 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
622 (for no compression).
623 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
624 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
625 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
626 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
629 2009-06-27 Pavel Roskin <proski@gnu.org>
631 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
633 * efiemu/prepare32.c: Likewise.
634 * efiemu/prepare64.c: Likewise.
636 2009-06-26 Pavel Roskin <proski@gnu.org>
638 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
639 * include/grub/elf.h: Define symbols without "32" or "64" based
640 on GRUB_TARGET_WORDSIZE.
641 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
642 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
644 * efiemu/loadcore64.c: Likewise.
645 * loader/i386/bsd32.c: Likewise.
646 * loader/i386/bsd64.c: Likewise.
647 * kern/dl.c: Remove own ELF definitions.
648 * util/i386/efi/grub-mkimage.c: Likewise.
650 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
652 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
653 segment 0x0 unconditionally, because the reference generated by
654 GAS is an absolute address.
656 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
658 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
659 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
661 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
663 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
664 indexes. Check for -f explicitly.
665 (search_file): Improve error message.
666 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
668 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
670 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
671 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
673 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
675 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
676 * conf/i386-ieee1275.rmk: Likewise.
677 * conf/i386-coreboot.rmk: Likewise.
679 * kern/i386/pc/startup.S (grub_stop): Remove function.
680 * kern/i386/ieee1275/startup.S: Likewise.
681 * kern/i386/coreboot/startup.S: Likewise.
682 * kern/i386/misc.S (grub_stop): New function.
684 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
686 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
687 * kern/i386/realmode.S (real_to_prot): ... to here.
689 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
691 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
693 (kernel_elf_SOURCES): Rename to ...
694 (kernel_img_SOURCES): ... this.
695 (kernel_elf_HEADERS): Rename to ...
696 (kernel_img_HEADERS): ... this. Update all users.
697 (kernel_elf_ASFLAGS): Rename to ...
698 (kernel_img_ASFLAGS): ... this.
699 (kernel_elf_CFLAGS): Rename to ...
700 (kernel_img_CFLAGS): ... this.
701 (kernel_elf_LDFLAGS): Rename to ...
702 (kernel_img_LDFLAGS): ... this.
703 * conf/i386-coreboot.rmk: Likewise.
704 * conf/powerpc-ieee1275.rmk: Likewise.
706 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
709 2009-06-21 Pavel Roskin <proski@gnu.org>
711 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
712 to match nested functions.
713 * loader/sparc64/ieee1275/linux.c: Likewise.
715 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
717 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
719 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
722 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
724 Fix asm file handling on ELF, and remove workarounds.
726 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
727 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
728 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
729 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
731 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
735 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
736 and loader/i386/bsd64.c
737 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
738 (FREEBSD_MODTYPE_ELF_MODULE): New definition
739 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
740 (grub_freebsd_load_elfmodule32): New declaration
741 (grub_freebsd_load_elfmoduleobj64): Likewise
742 (grub_freebsd_load_elf_meta32): Likewise
743 (grub_freebsd_load_elf_meta64): Likewise
744 (grub_freebsd_add_meta): Likewise
745 (grub_freebsd_add_meta_module): Likewise
746 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
747 (grub_freebsd_add_meta_module): Likewise and move module-specific
748 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
749 (grub_cmd_freebsd): Add elf-kernel specific parts
750 based on grub_freebsd_add_meta_module
751 (grub_cmd_freebsd_module): Add type parsing moved from
752 grub_freebsd_add_meta_module
753 (grub_cmd_freebsd_module_elf): New function
754 (cmd_freebsd_module_elf): New variable
755 (GRUB_MOD_INIT): Register freebsd_module_elf
756 * loader/i386/bsd32.c: New file
757 * loader/i386/bsd64.c: Likewise
758 * loader/i386/bsdXX.c: Likewise
759 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
760 (grub_elf64_load): Likewise
761 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
763 (grub_elf64_load_hook_t): Likewise
765 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
767 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
769 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
770 don't write a menu entry for recovery mode.
772 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
774 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
775 after it's no longer needed.
777 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
779 * include/grub/i386/loader.h (grub_linux_prot_size)
780 (grub_linux_tmp_addr, grub_linux_real_addr)
781 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
783 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
784 common grub_util_info() call to ...
785 (generate_image): ... here.
786 Fix use of uninitialized memory, comparison of signed with
787 unsigned integers and memory leak.
788 Remove bogus module address message.
790 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
792 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
794 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
796 2009-06-19 Pavel Roskin <proski@gnu.org>
798 * configure.ac: Remove stray AC_MSG_CHECKING.
800 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
802 * disk/scsi.c (grub_scsi_open): use continue instead of big if
804 2009-06-18 Pavel Roskin <proski@gnu.org>
806 * conf/common.rmk: Add fs_file.mod.
807 * disk/fs_file.c: New file.
808 * include/grub/disk.h (enum grub_disk_dev_id): Add
809 GRUB_DISK_DEVICE_FILE_ID.
811 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
813 Fix build with Apple's toolchain. Part 2
815 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
818 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
820 Fix build with Apple's toolchain. Part 1
822 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
824 * configure.ac: remove a leftover AC_MSG_RESULT
825 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
828 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
832 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
833 (decomp_block): initialize ch
834 use grub_memcpy instead of memcpy
836 2009-06-17 Pavel Roskin <proski@gnu.org>
838 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
839 version, use declarations needed to use vga_text as the startup
842 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
843 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
845 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
846 and grub_at_keyboard_fini(), it's done on module load and
849 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
851 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
853 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
855 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
859 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
860 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
861 (grub_script_yylex): don't segfault on unterminated script
862 newline terminates command and variable
864 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
866 avoid double grub_adjust_range call. Bug reported by David Simner
868 * kern/disk.c (grub_disk_write): change to raw disk access before
871 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
873 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
874 spaces, for the benefit of help2man.
875 * util/i386/efi/grub-mkimage.c (usage): Likewise.
877 2009-06-16 Pavel Roskin <proski@gnu.org>
879 * kern/i386/halt.c: Include grub/machine/init.h.
880 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
882 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
884 * util/grub.d/30_os-prober.in: Use ${root} in the generated
887 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
889 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
892 2009-06-16 Pavel Roskin <proski@gnu.org>
894 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
895 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
896 save %dx, we only need %dl and we never change it.
897 * boot/i386/pc/cdboot.S: Don't set the root drive.
898 * boot/i386/pc/pxeboot.S: Likewise.
899 * include/grub/i386/pc/boot.h: Remove
900 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
901 GRUB_BOOT_MACHINE_DRIVE_CHECK.
902 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
903 * kern/i386/pc/init.c (make_install_device): Remove references
905 * kern/i386/pc/startup.S: Likewise.
906 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
908 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
912 * commands/xnu_uuid.c: new file
913 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
914 (xnu_uuid_mod_SOURCES): new variable
915 (xnu_uuid_mod_CFLAGS): likewise
916 (xnu_uuid_mod_LDFLAGS): likewise
917 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
918 * conf/i386-ieee1275.rmk: likewise
919 * conf/i386-pc.rmk: likewise
920 * conf/powerpc-ieee1275.rmk: likewise
921 * conf/sparc64-ieee1275.rmk: likewise
922 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
924 2009-06-16 Pavel Roskin <proski@gnu.org>
926 * configure.ac: Avoid '==' in test command, it's not portable.
928 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
932 * commands/probe.c: new file
933 * conf/common.rmk (pkglib_MODULES): add probe.mod
934 (probe_mod_SOURCES): new variable
935 (probe_mod_CFLAGS): likewise
936 (probe_mod_LDFLAGS): likewise
937 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
938 * conf/i386-ieee1275.rmk: likewise
939 * conf/i386-pc.rmk: likewise
940 * conf/powerpc-ieee1275.rmk: likewise
941 * conf/sparc64-ieee1275.rmk: likewise
943 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
945 Fix handling of string like \"hello\" and "a
948 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
949 (grub_script_yylex): fix parsing of quoting, escaping and newline
951 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
953 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
956 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
958 * util/grub-mkconfig.in: Fix parsing of --output option.
960 2009-06-12 Pavel Roskin <proski@gnu.org>
962 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
963 genmk.rb don't need to be generated or installed.
965 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
967 * commands/i386/pc/drivemap_int13h.S: add more comments
969 2009-06-11 Pavel Roskin <proski@gnu.org>
971 * Makefile.in (uninstall): Uninstall manuals.
973 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
974 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
975 and update-grub_lib in two places.
976 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
978 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
981 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
982 `entry_lo' to fix variable shadowing.
984 2009-06-11 Christian Franke <franke@computer.org>
986 * kern/misc.c (__enable_execute_stack): Add missing return type
987 to prevent gcc warning.
989 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
991 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
993 2009-06-11 Pavel Roskin <proski@gnu.org>
995 * Makefile.in: Don't rely on any scripts being executable.
996 Always use $(SHELL) to run shell scripts.
998 * configure.ac: Always define ___main if using -nostdlib. This
999 fixes tests on Cygwin.
1001 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1005 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
1006 is in bytes and not in blocks
1008 2009-06-11 Pavel Roskin <proski@gnu.org>
1010 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1013 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1015 * util/grub.d/30_os-prober.in: Fix a comment. Source
1016 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1017 to set the root device. Place drivemap command in the generated
1020 2009-06-11 Pavel Roskin <proski@gnu.org>
1022 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1023 have long been resolved.
1025 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
1027 * util/grub.d/10_linux.in: Capitalise "Linux".
1029 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1031 2009-06-11 Pavel Roskin <proski@gnu.org>
1033 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1034 fix a gcc warning and ensure that the function won't ever exit.
1036 * kern/i386/ieee1275/init.c: Add missing prototype for
1039 * loader/ieee1275/multiboot2.c [__i386__]: Include
1040 grub/cpu/multiboot.h.
1042 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1043 casts to short - they are not portable and cause warnings. Fix
1044 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1046 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1050 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1052 (grub_get_root_biosnumber_saved): new variable
1053 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1054 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
1055 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
1056 %dx after the call if necessary
1057 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1058 (boot_mod_SOURCES): remove
1059 (boot_mod_CFLAGS): remove
1060 (boot_mod_LDFLAGS): remove
1061 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1062 (boot_mod_SOURCES): new variable
1063 (boot_mod_CFLAGS): likewise
1064 (boot_mod_LDFLAGS): likewise
1065 * conf/i386-efi.rmk: likewise
1066 * conf/i386-ieee1275.rmk: likewise
1067 * conf/i386-pc.rmk: likewise
1068 * conf/powerpc-ieee1275.rmk: likewise
1069 * conf/sparc64-ieee1275.rmk: likewise
1070 * conf/x86_64-efi.rmk: likewise
1071 * include/grub/i386/pc/biosnum.h: new file
1072 * lib/i386/pc/biosnum.c: likewise
1073 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1074 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1075 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1077 2009-06-10 Pavel Roskin <proski@gnu.org>
1079 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1080 Use separate variables. Read only the file size at the end, but
1081 not the checksum that we don't use.
1083 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1086 * kern/ieee1275/openfw.c: Remove libc includes.
1087 * kern/ieee1275/cmain.c: Likewise.
1088 * include/grub/ieee1275/ieee1275.h: Likewise.
1090 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1093 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1095 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1096 `genparttoollist.sh'.
1097 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1098 Add `*.sh' to the list find searches for and change `mdate.sh'
1101 2009-06-10 Pavel Roskin <proski@gnu.org>
1103 * include/grub/multiboot2.h: Provide compatibility defines for
1105 * include/multiboot2.h: Include stdint.h only if needed, using
1107 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1109 * loader/ieee1275/multiboot2.c: Likewise.
1110 * loader/multiboot2.c: Likewise.
1111 * loader/multiboot_loader.c: Likewise.
1113 * configure.ac: Use -nostdlib when probing for the target. It
1114 should not be required to have libc for the target.
1116 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1117 they fail without libc headers for the target.
1118 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1120 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1121 preprocessor conditionals.
1123 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1124 build system doesn't need to be aware of the tar.c internals.
1126 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1128 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1130 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1132 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1133 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1135 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1137 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1138 aren't available if ata.mod gets used.
1140 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1142 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1143 initialising controller.
1144 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1146 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1148 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1149 to choose between ata and biosdisk module on i386-pc.
1151 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1153 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1154 Subclass and Programming Interface fields in terms of the 3 byte
1155 Class Code register.
1156 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1158 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1159 interface is OHCI. Add grub_dprintf for symmetry with
1161 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1162 interface is UHCI. Add interf variable for programming
1163 interface. Print interface with class/subclass.
1165 * bus/usb/ohci.c: Set interf with correct field.
1167 * bus/usb/uhci.c: Remove unneeded doubled lines.
1168 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1169 Remove whitespace inside comment.
1171 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1173 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1174 as fallback an equivalent option without depth.
1176 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1178 Not fail if unable to retrieve C/H/S on LBA disks
1180 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1181 if unable to retrieve C/H/S on LBA disks
1183 2009-06-08 Pavel Roskin <proski@gnu.org>
1185 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1188 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1190 * Makefile.in (uninstall): Remove all $lib_DATA files.
1192 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1194 Bugfix: install on partitionless device
1196 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1199 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1201 * Makefile.in (uninstall): Remove all $include_DATA files.
1203 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1205 * commands/true.c: New file. Implement the true and false commands.
1206 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1207 (true_mod_SOURCES): New variable.
1208 (true_mod_CFLAGS): Likewise.
1209 (true_mod_LDFLAGS): Likewise.
1211 2009-06-05 Colin D Bennett <colin@gibibit.com>
1213 Optimized font character lookup using binary search instead of linear
1214 search. Fonts now are required to have the character index ordered by
1217 * font/font.c (load_font_index): Verify that fonts have ordered
1219 (find_glyph): Use binary search instead of linear search to find a
1220 character in a font.
1222 2009-06-05 Michael Scherer <misc@mandriva.org>
1224 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1225 uses case sensitive btree.
1226 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1227 only for case insensitive filesystems.
1229 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1231 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1232 * conf/common.rmk (search_mod_CFLAGS): likewise
1234 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1236 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1237 compensate a compiler bug
1239 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1241 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1244 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1246 Definitions for creating asm symbols with Apple's CC
1248 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1249 [APPLE_CC] (VARIABLE): likewise
1251 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1253 Disable lnxboot.img when compiled
1256 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1257 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1258 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1259 [! APPLE_CC] (CODE_LENG): skip
1260 [! APPLE_CC] (setup_sects): likewise
1261 [! APPLE_CC]: skip filling
1263 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1265 Address in trampolines based on 32-bit registers when compiled
1268 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1270 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1272 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1274 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1276 * kern/misc.c [APPLE_CC] (memcpy): new function
1277 [APPLE_CC] (memmove): likewise
1278 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1279 (memcpy): define alias conditionally on !APPLE_CC
1282 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1283 APPLE_CC are defined
1284 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1285 (grub_assert_fail): make prototype conditional
1287 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1289 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1291 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1293 (CLEANFILES): add grub-macho2img
1294 (grub_macho2img_SOURCES): new variable
1295 * kern/i386/pc/startup.S (bss_start): new variable
1297 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1298 * util/grub-macho2img.c: new file
1300 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1302 Use objconv when compiling with Apple's CC
1304 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1305 (efiemu64.o): likewise
1306 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1307 when compiling with Apple's CC
1308 (efiemu64_s.o): likewise
1309 * configure.ac: check for objconv when compiling with Apple's CC
1310 * genmk.rb: use objconv for modules when compiled with Apple's CC
1312 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1314 Define segment as well as section when compiling with
1317 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1318 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1319 (efiemu_convert_pointer): likewise
1320 (efiemu_set_virtual_address_map): likewise
1321 (efiemu_convert_pointer): likewise
1322 (efiemu_getcrc32): likewise
1323 (init_crc32_table): likewise
1325 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1326 (GRUB_MOD_DEP): likewise
1328 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1330 Allow a compilation without -mcmodel=large
1332 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1333 when compiled without -mcmodel=large
1334 (filter_memory_map): remove memory post 4 GiB when compiled
1335 without -mcmodel=large
1336 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1337 TARGET_CFLAGS when -mcmodel=large isn't supported
1339 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1341 Remove nested functions in efiemu core
1343 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1345 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1347 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1349 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1351 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1353 (grub_cpu_is_tsc_supported): likewise
1354 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1356 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1358 Absolute addressing through constant with Apple's cc
1360 * kern/i386/pc/startup.S: Define necessary constants
1361 and address through it when using ABS with Apple's CC
1362 * boot/i386/pc/diskboot.S: likewise
1363 * boot/i386/pc/boot.S: likewise
1364 * boot/i386/pc/lnxboot.S: likewise
1365 * boot/i386/pc/cdboot.S: likewise
1366 * mmap/i386/pc/mmap_helper.S: likewise
1367 * commands/i386/pc/drivemap_int13h.S: likewise
1369 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1371 Check if compiler is apple cc
1373 * Makefile.in (ASFLAGS): new variable
1374 (TARGET_ASFLAGS): likewise
1375 (TARGET_MODULE_FORMAT): likewise
1376 (TARGET_APPLE_CC): likewise
1378 (TARGET_IMG_CFLAGS): likewise
1379 (TARGET_CPPFLAGS): add includedir
1380 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1381 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1382 Check for linker script only if compiler isn't Apple's CC
1383 (TARGET_MODULE_FORMAT): set
1384 (TARGET_APPLE_CC): likewise
1385 (TARGET_ASFLAGS): likewise
1387 Check for objcopy only if compiler isn't Apple's CC
1388 Check for BSS symbol only if compiler isn't Apple's CC
1389 * genmk.rb: adapt nm options if we use Apple's utils
1390 * aclocal.m4 (grub_apple_cc): new test
1391 (grub_apple_target_cc): likewise
1393 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1395 Simplify sed expressions and improve awk
1397 * Makefile.in (install-local): simplify sed expression
1398 * gencmdlist.sh: likewise
1399 * genmoddep.awk: avoid adding module as a dependency of itself
1401 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1403 Add missing start symbols
1405 * boot/i386/pc/boot.S: add start
1406 * boot/i386/pc/pxeboot.S: likewise
1408 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1410 Fix wrong assumptions with grub-mkimage on EFI
1412 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1413 (relocate_addresses): consider both r_addend and value at offset
1414 (make_mods_section): zerofill modinfo and header
1415 (convert_elf): write prefix here
1417 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1419 Use .asciz instead of .string
1421 * i386/pc/diskboot.S: use .asciz instead of .string
1422 * i386/pc/boot.S: likewise
1423 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1424 (GRUB_MOD_NAME): likewise
1426 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1430 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1431 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1432 (grub_video_setup): remove
1433 (grub_video_set_mode): new prototype
1434 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1436 (linux_vesafb_res): compile only on PCBIOS
1437 (grub_linux_boot): support gfxpayload
1438 * loader/i386/pc/xnu.c (video_hook): new function
1439 (grub_xnu_set_video): support gfxpayload
1440 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1441 (DEFAULT_VIDEO_HEIGHT): likewise
1442 (DEFAULT_VIDEO_FLAGS): likewise
1443 (DEFAULT_VIDEO_MODE): new definition
1444 (video_hook): new function
1445 (grub_gfxterm_init): use grub_video_set_mode
1446 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1448 * video/video.c (grub_video_setup): removed
1449 (grub_video_set_mode): new function based on grub_gfxterm_init and
1452 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1454 Avoid calling biosdisk in drivemap
1456 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1457 (revparse_biosdisk): likewise
1458 (list_mappings): derive name from id directly
1459 (grub_cmd_drivemap): use tryparse_diskstring
1461 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1465 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1466 (grub_lexer_param): add tokenonhold
1467 (grub_script_create_cmdline): remove cmdline. All callers updated
1468 (grub_script_function_create): make functionname
1469 grub_script_arg. All callers updated
1470 (grub_script_execute_argument_to_string): new prototype
1471 * kern/parser.c (state_transitions): reorder
1472 (grub_parser_cmdline_state): fix a bug and make more compact
1473 * script/sh/execute.c (grub_script_execute_argument_to_string):
1475 (grub_script_execute_cmdline): use new format
1476 * script/sh/function.c (grub_script_function_create): make functionname
1477 grub_script_arg. All callers updated
1478 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1479 (grub_script_yylex): remove
1480 (grub_script_yylex2): renamed to ...
1481 (grub_script_yylex): ...renamed
1482 parse the expressions like a${b}c
1483 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1484 (GRUB_PARSER_TOKEN_VAR): remove
1485 (GRUB_PARSER_TOKEN_NAME): likewise
1486 ("if"): declare as typeless
1488 ("function"): likewise
1493 (argument): likewise
1494 (script): accept empty scripts and make exit on error
1495 (arguments): use GRUB_PARSER_TOKEN_ARG
1496 (function): likewise
1497 (command): move error handling to script
1498 (menuentry): move grub_script_lexer_ref before
1499 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1500 argument. All callers updated
1502 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1504 Prevent GRUB from probing floppies during boot.
1506 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1507 * commands/search.c (options): Add --no-floppy.
1508 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1509 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1510 --no-floppy when searching for UUIDs.
1512 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1514 Simplify the code duplication in commands/search.c.
1516 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1517 (search_fs): ... this. Update all users.
1519 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1521 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1523 2009-05-28 Pavel Roskin <proski@gnu.org>
1525 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1526 Remove the original symlink explicitly.
1528 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1529 just one slash. That's how grub_fshelp_find_file() does it.
1531 2009-05-26 Pavel Roskin <proski@gnu.org>
1533 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1536 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1539 2009-05-25 Christian Franke <franke@computer.org>
1541 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1543 (grub_atapi_identify): Add wait after drive select.
1544 (grub_ata_identify): Do more strict status register check before
1545 calling grub_atapi_identify (). Suppress error message if status
1546 register is 0x00 after command failure. Add status register
1547 check after PIO read to avoid bogus identify due to stuck DRQ.
1548 Thanks to Pavel Roskin for testing.
1549 (grub_device_initialize): Remove unsafe status register check.
1550 Thanks to 'phcoder' for problem report and patch.
1551 Prevent sign extension in debug message.
1553 2009-05-23 Colin D Bennett <colin@gibibit.com>
1555 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1556 definition file, and functions defined in `normal/menu.c' have had
1557 their prototypes moved to `include/grub/menu.h' for consistency.
1559 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1561 (grub_menu_get_entry): Likewise.
1562 (grub_menu_get_timeout): Likewise.
1563 (grub_menu_set_timeout): Likewise.
1564 (grub_menu_execute_entry): Likewise.
1565 (grub_menu_execute_with_fallback): Likewise.
1566 (grub_menu_entry_run): Likewise.
1568 * include/grub/normal.h: Re-ordered and grouped function
1569 prototypes by file that the function is defined in.
1570 (grub_menu_execute_callback): Removed; moved to menu.h.
1571 (grub_menu_get_entry): Likewise.
1572 (grub_menu_get_timeout): Likewise.
1573 (grub_menu_set_timeout): Likewise.
1574 (grub_menu_execute_entry): Likewise.
1575 (grub_menu_execute_with_fallback): Likewise.
1576 (grub_menu_entry_run): Likewise.
1577 (grub_menu_addentry): Renamed from this ...
1578 (grub_normal_add_menu_entry): ... to this.
1580 * normal/main.c (grub_menu_addentry): Renamed from this ...
1581 (grub_normal_add_menu_entry): ... to this.
1583 * script/sh/execute.c (grub_script_execute_menuentry): Update
1584 reference to renamed grub_menu_addentry function.
1586 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1588 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1590 2009-05-22 Pavel Roskin <proski@gnu.org>
1592 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1593 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1594 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1595 compiling for the i386 targets, but not for the utilities.
1597 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1599 (grub_root_drive): Likewise.
1600 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1602 (grub_root_drive): Change size to byte.
1603 (grub_start_addr): Remove.
1604 (grub_end_addr): Likewise.
1605 (grub_apm_bios_info): Likewise.
1607 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1609 * normal/i386: Remove.
1610 * normal/powerpc: Likewise.
1611 * normal/sparc64: Likewise.
1612 * normal/x86_64: Likewise.
1614 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1616 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1617 * loader/i386/linux_trampoline.S: Fix indentation
1618 * loader/i386/xnu_helper.S: Likewise
1620 2009-05-18 Colin D Bennett <colin@gibibit.com>
1622 Display error messages when parsing a Lua statement fails.
1623 Previously, executing a syntactically invalid statement like
1624 ")foo" or "bar;" would silently fail.
1626 * script/lua/grub_main.c (handle_lua_error): New function.
1627 (grub_lua_parse_line): Improved reporting of Lua parser and
1630 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1632 Remove -Werror which causes build to fail on some systems
1634 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1635 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1636 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1638 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1640 trampoline for linux on 64-bit platform
1642 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1643 loader/i386/efi/linux_trampoline.S
1644 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1646 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1648 * loader/i386/linux_trampoline.S: moved here
1649 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1651 (jumpvector): removed
1652 (grub_linux_trampoline_start): new declaration
1653 (grub_linux_trampoline_end): likewise
1654 (grub_linux_boot): use trampoline when on 64-bit platform
1655 * loader/i386/linux.c: likewise
1657 2009-05-16 Pavel Roskin <proski@gnu.org>
1659 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1660 const to avoid a warning.
1661 (grub_lua_setenv): Likewise.
1662 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1663 lmsg to fix a warning.
1665 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1667 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1668 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1669 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1670 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1671 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1672 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1673 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1674 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1676 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1678 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1680 2009-05-16 Bean <bean123ch@gmail.com>
1682 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1683 (lua_mod_SOURCES): New variable.
1684 (lua_mod_CFLAGS): Likewise.
1685 (lua_mod_LDFLAGS): Likewise.
1687 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1688 (setjmp_mod_SOURCES): New variable.
1689 (setjmp_mod_CFLAGS): Likewise.
1690 (setjmp_LDFLAGS): Likewise.
1692 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1693 (setjmp_mod_SOURCES): New variable.
1694 (setjmp_mod_CFLAGS): Likewise.
1695 (setjmp_LDFLAGS): Likewise.
1697 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1698 (setjmp_mod_SOURCES): New variable.
1699 (setjmp_mod_CFLAGS): Likewise.
1700 (setjmp_LDFLAGS): Likewise.
1702 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1703 (setjmp_mod_SOURCES): New variable.
1704 (setjmp_mod_CFLAGS): Likewise.
1705 (setjmp_LDFLAGS): Likewise.
1707 * normal/i386/setjmp.S: Moved from here ...
1708 * lib/i386/setjmp.S: ... Moved here
1709 * normal/x86_64/setjmp.S: Moved from here ...
1710 * lib/x86_64/setjmp.S: ... Moved here
1711 * normal/powerpc/setjmp.S: Moved from here ...
1712 * lib/powerpc/setjmp.S: ... Moved here
1713 * normal/sparc64/setjmp.S: Moved from here ...
1714 * lib/sparc64/setjmp.S: ... Moved here
1716 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1717 returns_twice in mingw.
1719 * script/lua/grub_lib.c: New file.
1720 * script/lua/grub_lib.h: Likewise.
1721 * script/lua/grub_lua.h: Likewise.
1722 * script/lua/grub_main.c: Likewise.
1723 * script/lua/lapi.c: Likewise.
1724 * script/lua/lapi.h: Likewise.
1725 * script/lua/lauxlib.c: Likewise.
1726 * script/lua/lauxlib.h: Likewise.
1727 * script/lua/lbaselib.c: Likewise.
1728 * script/lua/lcode.c: Likewise.
1729 * script/lua/lcode.h: Likewise.
1730 * script/lua/ldblib.c: Likewise.
1731 * script/lua/ldebug.c: Likewise.
1732 * script/lua/ldebug.h: Likewise.
1733 * script/lua/ldo.c: Likewise.
1734 * script/lua/ldo.h: Likewise.
1735 * script/lua/ldump.c: Likewise.
1736 * script/lua/lfunc.c: Likewise.
1737 * script/lua/lfunc.h: Likewise.
1738 * script/lua/lgc.c: Likewise.
1739 * script/lua/lgc.h: Likewise.
1740 * script/lua/linit.c: Likewise.
1741 * script/lua/liolib.c: Likewise.
1742 * script/lua/llex.c: Likewise.
1743 * script/lua/llex.h: Likewise.
1744 * script/lua/llimits.h: Likewise.
1745 * script/lua/lmathlib.c: Likewise.
1746 * script/lua/lmem.c: Likewise.
1747 * script/lua/lmem.h: Likewise.
1748 * script/lua/loadlib.c: Likewise.
1749 * script/lua/lobject.c: Likewise.
1750 * script/lua/lobject.h: Likewise.
1751 * script/lua/lopcodes.c: Likewise.
1752 * script/lua/lopcodes.h: Likewise.
1753 * script/lua/loslib.c: Likewise.
1754 * script/lua/lparser.c: Likewise.
1755 * script/lua/lparser.h: Likewise.
1756 * script/lua/lstate.c: Likewise.
1757 * script/lua/lstate.h: Likewise.
1758 * script/lua/lstring.c: Likewise.
1759 * script/lua/lstring.h: Likewise.
1760 * script/lua/lstrlib.c: Likewise.
1761 * script/lua/ltable.c: Likewise.
1762 * script/lua/ltable.h: Likewise.
1763 * script/lua/ltablib.c: Likewise.
1764 * script/lua/ltm.c: Likewise.
1765 * script/lua/ltm.h: Likewise.
1766 * script/lua/lua.h: Likewise.
1767 * script/lua/luaconf.h: Likewise.
1768 * script/lua/lualib.h: Likewise.
1769 * script/lua/lundump.c: Likewise.
1770 * script/lua/lundump.h: Likewise.
1771 * script/lua/lvm.c: Likewise.
1772 * script/lua/lvm.h: Likewise.
1773 * script/lua/lzio.c: Likewise.
1774 * script/lua/lzio.h: Likewise.
1776 2009-05-16 Bean <bean123ch@gmail.com>
1778 * include/grub/kernel.h (grub_module_header_types): Add type
1781 * kern/main.c (grub_load_config): New function.
1782 (grub_main): Call grub_load_config to read boot config.
1784 * grub-mkimage (generate_image): New parameter config_path.
1785 (options): New option --config.
1786 (main): Parse --config option, and pass it to generate_image.
1788 2009-05-14 Christian Franke <franke@computer.org>
1790 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1791 This fixes build on Cygwin.
1793 2009-05-14 Pavel Roskin <proski@gnu.org>
1795 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1796 jump. This saves two bytes, so the typical case of 2 swapped
1797 drives would fit 32 bytes.
1799 2009-05-13 Pavel Roskin <proski@gnu.org>
1801 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1802 grub_uint32_t to avoid a warning.
1804 * loader/i386/linux.c (allocate_pages): When assigning
1805 real_mode_mem, cast through grub_size_t to fix a warning. The
1806 code already makes sure that the value would fit a pointer.
1807 (grub_linux_setup_video): Cast render_target->data to
1808 grub_size_t to fix a warning.
1810 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1812 * commands/i386/pc/drivemap.c: New file - implement drivemap
1814 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1815 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1817 2009-05-13 Pavel Roskin <proski@gnu.org>
1819 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1820 embedding_area_exists.
1822 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1824 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1825 it easier to understand / work with.
1826 Improve warning messages for cases where there's no embedding area,
1827 or when it is too small (or core.img too large).
1829 2009-05-13 Pavel Roskin <proski@gnu.org>
1831 * loader/i386/pc/multiboot2.c: Add necessary includes for
1832 grub_multiboot2_real_boot().
1834 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1835 PX record is always little-endian. We only need the lower 2
1838 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1839 facilitate code reuse.
1840 (grub_cpio_mount): Use "struct head", not a char buffer. This
1841 fixes a warning reported by gcc 4.4.
1843 * kernel/disk.c (grub_disk_read): Use void pointer for the
1845 (grub_disk_write): Use const void pointer for the buffer.
1846 Adjust all callers. Remove unnecessary casts.
1848 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1850 * util/i386/pc/grub-install.in: Update copyright year.
1852 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1856 * commands/gptsync.c: new file
1857 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1858 (gptsync_mod_SOURCES): new variable
1859 (gptsync_mod_CFLAGS): likewise
1860 (gptsync_mod_LDFLAGS): likewise
1861 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1863 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1864 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1865 * conf/i386-ieee1275.rmk: likewise
1866 * conf/i386-pc.rmk: likewise
1867 * conf/powerpc-ieee1275.rmk: likewise
1869 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1873 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1874 (grub_dl_ref): likewise
1876 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1878 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1879 split in two functions (one for msdos and one for gpt).
1881 2009-05-08 Pavel Roskin <proski@gnu.org>
1883 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1886 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1887 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1888 Initialize them with -1. Add sanity check for bad1. Eliminate
1891 2009-05-08 David S. Miller <davem@davemloft.net>
1893 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1895 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1897 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1900 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1902 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1903 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1905 2009-05-05 David S. Miller <davem@davemloft.net>
1907 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1909 2009-05-05 Pavel Roskin <proski@gnu.org>
1911 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1912 of grub_dl_ref() and grub_dl_unref().
1913 * commands/parttool.c: Remove preprocessor conditionals around
1914 grub_dl_ref() and grub_dl_unref().
1915 * fs/affs.c: Likewise.
1916 * fs/afs.c: Likewise.
1917 * fs/cpio.c: Likewise.
1918 * fs/ext2.c: Likewise.
1919 * fs/fat.c: Likewise.
1920 * fs/hfs.c: Likewise.
1921 * fs/hfsplus.c: Likewise.
1922 * fs/iso9660.c: Likewise.
1923 * fs/jfs.c: Likewise.
1924 * fs/minix.c: Likewise.
1925 * fs/ntfs.c: Likewise.
1926 * fs/reiserfs.c: Likewise.
1927 * fs/sfs.c: Likewise.
1928 * fs/udf.c: Likewise.
1929 * fs/ufs.c: Likewise.
1930 * fs/xfs.c: Likewise.
1931 * include/grub/dl.h: Likewise.
1932 * loader/xnu.c: Likewise.
1934 2009-05-04 Pavel Roskin <proski@gnu.org>
1936 * commands/acpi.c: Remove unused variable my_mod.
1937 * partmap/amiga.c: Likewise.
1938 * partmap/apple.c: Likewise.
1939 * partmap/gpt.c: Likewise.
1940 * partmap/pc.c: Likewise.
1941 * partmap/sun.c: Likewise.
1942 * term/gfxterm.c: Likewise.
1943 * term/i386/pc/vesafb.c: Likewise.
1944 * term/i386/pc/vga.c: Likewise.
1946 2009-05-04 David S. Miller <davem@davemloft.net>
1948 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1949 pointer args to grub_ieee1275_get_property().
1951 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1953 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1954 devices, and do not traverse down under controller nodes.
1956 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1957 (grub_ofdisk_open): Use it to un-escape "," characters.
1958 * kern/disk.c (find_part_sep): New.
1959 (grub_disk_open): Use it to find the first non-escaped ','
1960 character in the disk name.
1961 * util/ieee1275/devicemap.c (escape_of_path): New.
1962 (grub_util_emit_devicemap_entry): Use it.
1963 * util/sparc64/ieee1275/grub-install.in: Update script to
1964 strip partition specifiers properly by not triggering on
1965 '\' escaped ',' characters.
1967 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1969 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1971 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1973 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1974 on documentation from Wikipedia).
1976 2009-05-04 Pavel Roskin <proski@gnu.org>
1978 * disk/ata.c: Spelling fixes.
1979 * disk/raid.c: Likewise.
1980 * disk/usbms.c: Likewise.
1981 * disk/dmraid_nvidia.c: Likewise.
1982 * kern/ieee1275/openfw.c: Likewise.
1983 * kern/ieee1275/init.c: Likewise.
1984 * kern/ieee1275/cmain.c: Likewise.
1985 * boot/i386/pc/cdboot.S: Likewise.
1986 * video/readers/png.c: Likewise.
1987 * video/i386/pc/vbe.c: Likewise.
1988 * fs/udf.c: Likewise.
1989 * fs/hfs.c: Likewise.
1990 * fs/reiserfs.c: Likewise.
1991 * efiemu/runtime/efiemu.c: Likewise.
1992 * efiemu/main.c: Likewise.
1993 * efiemu/mm.c: Likewise.
1994 * include/grub/elf.h: Likewise.
1995 * include/grub/xnu.h: Likewise.
1996 * include/grub/usbdesc.h: Likewise.
1997 * include/grub/usb.h: Likewise.
1998 * include/grub/script_sh.h: Likewise.
1999 * include/grub/lib/LzmaEnc.h: Likewise.
2000 * include/grub/efiemu/efiemu.h: Likewise.
2001 * include/grub/command.h: Likewise.
2002 * normal/menu.c: Likewise.
2003 * normal/main.c: Likewise.
2004 * normal/datetime.c: Likewise.
2005 * bus/usb/uhci.c: Likewise.
2006 * mmap/i386/uppermem.c: Likewise.
2007 * mmap/mmap.c: Likewise.
2008 * commands/acpi.c: Likewise.
2009 * commands/test.c: Likewise.
2010 * partmap/apple.c: Likewise.
2011 * font/font.c: Likewise.
2012 * loader/sparc64/ieee1275/linux.c: Likewise.
2013 * loader/macho.c: Likewise.
2014 * loader/i386/bsd_trampoline.S: Likewise.
2015 * loader/i386/bsd.c: Likewise.
2016 * loader/xnu.c: Likewise.
2017 * term/i386/pc/vesafb.c: Likewise.
2018 * term/usb_keyboard.c: Likewise.
2019 * util/resolve.c: Likewise.
2020 * util/getroot.c: Likewise.
2022 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2024 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2026 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2028 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2031 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2033 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2034 parameter only available on BIOS.
2036 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2038 Removed wrong semicolon in declaration
2040 * grub/misc.h (grub_dprintf): remove semicolon
2042 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2044 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2045 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2046 is done by grub_cmd_linux() now).
2047 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2048 restore video to text mode.
2049 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2050 indicates lack of "vga=" parameter. "vga=0" is mapped to
2051 `GRUB_LINUX_VID_MODE_NORMAL'.
2053 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2055 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2056 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2057 and `normal/script.c'. Add `kern/rescue_reader.c',
2058 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
2059 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2060 `grub_script.tab.c'.
2062 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2063 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2065 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2066 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2068 * Makefile.in: Remove duplicated 2008 in Copyright line.
2070 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2072 * util/misc.c (grub_util_warn): New function. Emits a warning
2074 * include/grub/util/misc.h (grub_util_warn): New declaration.
2076 * util/i386/pc/grub-install.in: Understand --force and pass it down
2079 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2081 (setup): Improve error messages and add warnings when requested to
2082 install in odd layouts. Refuse to install using blocklists unless
2085 2009-05-04 martin f. krafft <madduck@madduck.net>
2087 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2089 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2091 Updated copyright year
2093 * fs/hfsplus.c: updated copyright year
2095 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2099 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2100 in the space previously used by unused3
2101 (grub_hfsplus_uuid): new function
2102 (grub_hfsplus_fs): added uuid field
2104 2009-05-03 Pavel Roskin <proski@gnu.org>
2106 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2107 suppress warnings. It's no longer needed.
2108 * disk/host.c: Likewise.
2109 * disk/ata_pthru.c: Likewise.
2110 * disk/loopback.c: Likewise.
2111 * hook/datehook.c: Likewise.
2112 * parttool/pcpart.c: Likewise.
2113 * fs/i386/pc/pxe.c: Likewise.
2114 * fs/ntfscomp.c: Likewise.
2115 * efiemu/main.c: Likewise.
2116 * mmap/mmap.c: Likewise.
2117 * commands/crc.c: Likewise.
2118 * commands/hexdump.c: Likewise.
2119 * commands/hdparm.c: Likewise.
2120 * commands/acpi.c: Likewise.
2121 * commands/echo.c: Likewise.
2122 * commands/minicmd.c: Likewise.
2123 * commands/blocklist.c: Likewise.
2124 * commands/memrw.c: Likewise.
2125 * commands/loadenv.c: Likewise.
2126 * commands/usbtest.c: Likewise.
2127 * commands/lsmmap.c: Likewise.
2128 * commands/boot.c: Likewise.
2129 * commands/parttool.c: Likewise.
2130 * commands/configfile.c: Likewise.
2131 * commands/search.c: Likewise.
2132 * commands/ieee1275/suspend.c: Likewise.
2133 * commands/cat.c: Likewise.
2134 * commands/i386/pc/pxecmd.c: Likewise.
2135 * commands/i386/pc/play.c: Likewise.
2136 * commands/i386/pc/halt.c: Likewise.
2137 * commands/i386/pc/vbeinfo.c: Likewise.
2138 * commands/i386/pc/vbetest.c: Likewise.
2139 * commands/lspci.c: Likewise.
2140 * commands/date.c: Likewise.
2141 * commands/handler.c: Likewise.
2142 * commands/ls.c: Likewise.
2143 * commands/test.c: Likewise.
2144 * commands/cmp.c: Likewise.
2145 * commands/efi/loadbios.c: Likewise.
2146 * commands/efi/fixvideo.c: Likewise.
2147 * commands/halt.c: Likewise.
2148 * commands/help.c: Likewise.
2149 * commands/reboot.c: Likewise.
2150 * hello/hello.c: Likewise.
2151 * script/sh/main.c: Likewise.
2152 * loader/xnu.c: Likewise.
2153 * term/terminfo.c: Likewise.
2154 * term/i386/pc/serial.c: Likewise.
2155 * term/usb_keyboard.c: Likewise.
2157 2009-05-03 David S. Miller <davem@davemloft.net>
2159 * normal/menu.c: Include grub/parser.h
2161 2009-05-03 Pavel Roskin <proski@gnu.org>
2163 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2165 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2166 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2168 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2169 efiemu??.o doesn't exist.
2170 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2173 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2175 FreeBSD 64-bit support
2177 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2178 and loader/i386/bsd_trampoline.S
2179 (bsd_mod_ASFLAGS): new variable
2180 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2181 (FREEBSD_MODTYPE_KERNEL64): likewise
2182 (grub_bsd64_trampoline_start): likewise
2183 (grub_bsd64_trampoline_end): likewise
2184 (grub_bsd64_trampoline_selfjump): likewise
2185 (grub_bsd64_trampoline_gdt): likewise
2186 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2187 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2188 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2189 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2190 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2192 * loader/i386/bsd_pagetable.c: new file
2193 * loader/i386/bsd_trampoline.S: likewise
2194 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2195 (ALIGN_VAR): likewise
2196 (entry_hi): new variable
2197 (kern_end_mdofs): likewise
2198 (is_64bit): likewise
2199 (grub_freebsd_add_meta): use ALIGN_VAR
2200 (grub_e820_mmap): new declaration
2201 (grub_freebsd_add_mmap): new function
2202 (grub_freebsd_add_meta_module): support 64 bit kernels
2203 (grub_freebsd_list_modules): use ALIGN_VAR
2204 (gdt_descriptor): new declaration
2205 (grub_freebsd_boot): support 64 bit kernels
2206 (grub_bsd_elf64_hook): new function
2207 (grub_bsd_load_elf): support elf64
2209 2009-05-03 Bean <bean123ch@gmail.com>
2211 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2212 after we get the result of if statement.
2214 2009-05-03 Bean <bean123ch@gmail.com>
2216 * Makefile.in (enable_efiemu): New variable.
2218 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2220 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2222 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2223 path, add -mno-red-zone option.
2224 (efiemu64_s.o): Likewise.
2225 (efiemu64.o): Use macro $^ for source file.
2227 * configure.ac (--enable-efiemu): New option.
2229 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2233 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2234 (pkglib_MODULES): add xnu.mod
2235 (xnu_mod_SOURCES): new variable
2236 (xnu_mod_CFLAGS): likewise
2237 (xnu_mod_LDFLAGS): likewise
2238 (xnu_mod_ASFLAGS): likewise
2239 * conf/i386-pc.rmk: likewise
2240 * conf/x86_64-efi.rmk: likewise
2241 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2243 * include/grub/i386/macho.h: new file
2244 * include/grub/i386/xnu.h: likewise
2245 * include/grub/macho.h: likewise
2246 * include/grub/machoload.h: likewise
2247 * include/grub/x86_64/macho.h: likewise
2248 * include/grub/x86_64/xnu.h: likewise
2249 * include/grub/xnu.h: likewise
2250 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2251 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2252 * loader/i386/efi/xnu.c: new file
2253 * loader/i386/pc/xnu.c: likewise
2254 * loader/i386/xnu.c: likewise
2255 * loader/i386/xnu_helper.S: likewise
2256 * loader/macho.c: likewise
2257 * loader/xnu.c: likewise
2258 * loader/xnu_resume.c: likewise
2259 * util/grub-dumpdevtree: likewise
2260 * include/grub/i386/pit.h: include grub/err.h
2261 (grub_pit_wait): export
2262 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2264 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2268 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2269 _linux_efi, linux_efi.
2270 new files in grub-emu
2271 new targets efiemu32.o and efiemu64.o
2272 * loader/linux_normal_efiemu.c: likewise
2273 * loader/i386/efi/linux.c: added preliminary efiemu support
2274 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2276 * include/grub/autoefi.h: new file
2277 * include/grub/i386/efiemu.h: likewise
2278 * include/grub/i386/pc/efiemu.h: likewise
2279 * include/grub/efi/api.h: add LL suffix when necessary
2280 new definitions relating to tables
2281 * include/grub/efiemu/efiemu.h: new file
2282 * include/grub/efiemu/runtime.h: likewise
2283 * efiemu/prepare.c: likewise
2284 * efiemu/loadcore_common.c: likewise
2285 * efiemu/loadcore64.c: likewise
2286 * efiemu/runtime/efiemu.sh: likewise
2287 * efiemu/runtime/efiemu.S: likewise
2288 * efiemu/runtime/efiemu.c: likewise
2289 * efiemu/runtime/config.h: likewise
2290 * efiemu/prepare32.c: likewise
2291 * efiemu/main.c: likewise
2292 * efiemu/modules/pnvram.c: likewise
2293 * efiemu/modules/i386: likewise
2294 * efiemu/modules/i386/pc: likewise
2295 * efiemu/modules/acpi.c: likewise
2296 * efiemu/i386/pc/cfgtables.c: likewise
2297 * efiemu/i386/loadcore64.c: likewise
2298 * efiemu/i386/loadcore32.c: likewise
2299 * efiemu/prepare64.c: likewise
2300 * efiemu/loadcore.c: likewise
2301 * efiemu/symbols.c: likewise
2302 * efiemu/mm.c: likewise
2303 * efiemu/loadcore32.c: likewise
2305 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2309 * commands/acpi.c: new file
2310 * commands/i386/pc/acpi.c: likewise
2311 * commands/efi/acpi.c: likewise
2312 * include/grub/acpi.h: likewise
2313 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2314 (acpi_mod_SOURCES): new variable
2315 (acpi_mod_CFLAGS): likewise
2316 (acpi_mod_LDFLAGS): likewise
2317 * conf/i386-efi.rmk: likewise
2318 * conf/x86_64-efi.rmk: likewise
2320 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2322 Missing part from mmap patch
2324 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2325 (grub_mmap_unregister)
2326 (grub_mmap_free_and_unregister): use grub_mmap_register
2328 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2332 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2333 * loader/i386/linux.c (find_mmap_size): likewise
2334 (allocate_pages): likewise
2335 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2336 (grub_fill_multiboot_mmap): likewise
2337 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2338 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2339 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2340 (OPENBSD_MMAP_RESERVED): likewise
2341 * include/grub/i386/pc/memory.h: include grub/memory.h
2342 (grub_lower_mem): removed
2343 (grub_upper_mem): likewise
2344 (GRUB_MACHINE_MEMORY_ACPI): new definition
2345 (GRUB_MACHINE_MEMORY_NVS): likewise
2346 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2347 (GRUB_MACHINE_MEMORY_HOLE): likewise
2348 (grub_machine_mmap_register): likewise
2349 (grub_machine_mmap_unregister): likewise
2350 (grub_machine_get_upper): likewise
2351 (grub_machine_get_lower): likewise
2352 (grub_machine_get_post64): likewise
2353 * include/grub/i386/efi/memory.h: new file
2354 * include/grub/x86_64/efi/memory.h: likewise
2355 * include/grub/efi/memory.h: likewise
2356 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2357 (mmap_mod_SOURCES): new variable
2358 (mmap_mod_LDFLAGS): likewise
2359 (mmap_mod_ASFLAGS): likewise
2360 * conf/i386-coreboot.rmk: likewise
2361 * conf/i386-ieee1275.rmk: likewise
2362 * conf/i386-efi.rmk: likewise
2363 * conf/x86_64-efi.rmk: likewise
2364 * include/grub/types.h (UINT_TO_PTR): new macro
2365 (PTR_TO_UINT32): likewise
2366 (PTR_TO_UINT64): likewise
2367 * include/grub/memory.h: new file
2368 * mmap/i386/pc/mmap.c: likewise
2369 * mmap/i386/pc/mmap_helper.S: likewise
2370 * mmap/i386/uppermem.c: likewise
2371 * mmap/mmap.c: likewise
2372 * mmap/efi/mmap.c: likewise
2373 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2375 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2376 (grub_upper_mem): likewise
2377 (grub_machine_init): don't use grub_upper_mem,
2378 make grub_lower_mem local
2379 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2380 grub_mmap_iterate and grub_mmap_get_upper
2381 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2383 2009-05-02 Bean <bean123ch@gmail.com>
2385 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2387 (pkglib_MODULES): Add normal.mod and sh.mod.
2388 (normal_SOURCES): New variable.
2389 (normal_mod_CFLAGS): Likewise.
2390 (normal_mod_LDFLAGS): Likewise.
2391 (sh_mod_SOURCES): Likewise.
2392 (sh_mod_CFLAGS): Likewise.
2393 (sh_mod_LDFLAGS): Likewise.
2395 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2396 script/sh/lexer.c_DEPENDENCIES.
2397 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2398 kern/rescue_reader.c and kern/rescue_parser.c.
2399 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2400 (grub_emu_SOURCES): Change source files.
2401 (pkglib_MODULES): Remove normal.mod.
2402 (normal_SOURCES): Removed.
2403 (normal_mod_CFLAGS): Likewise.
2404 (normal_mod_LDFLAGS): Likewise.
2405 * conf/i386-coreboot.rmk: Likewise.
2406 * conf/i386-efi.rmk: Likewise.
2407 * conf/i386-ieee1276.rmk: Likewise.
2408 * conf/powerpc-ieee1275.rmk: Likewise.
2409 * conf/sparc64-ieee1275.rmk: Likewise.
2410 * conf/x86_64-efi.rmk: Likewise.
2412 * include/grub/command.h (grub_command_execute): New inline function.
2414 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2416 * include/grub/normal.h: Remove <grub/setjmp.h>.
2417 (grub_fs_module_list): Moved to normal/autofs.c.
2418 (grub_exit_env): Removed.
2419 (grub_command_execute): Likewise.
2420 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2422 (read_command_list): New function declaration.
2423 (read_fs_list): Likewise.
2425 * include/parser.h: Include <grub/reader.h>.
2426 (grub_parser_split_cmdline): Change type of getline parameter.
2427 (grub_parser): New structure.
2428 (grub_parser_class): New variable.
2429 (grub_parser_execute): New function declaration.
2430 (grub_register_rescue_parser): Likewise.
2431 (grub_parser_register): New inline function.
2432 (grub_parser_unregister): Likewise.
2433 (grub_parser_get_current): Likewise.
2434 (grub_parser_set_current): Likewise.
2436 * include/grub/reader.h: New file.
2437 * kern/reader.c: Likewise.
2438 * kern/rescue_parser.c: Likewise.
2439 * kern/rescue_reader.c: Likewise.
2440 * normal/autofs.c: Likewise.
2441 * normal/dyncmd.c: Likewise.
2443 * include/grub/rescue.h: Removed.
2444 * normal/command.h: Likewise.
2446 * include/grub/script.h: Moved to ...
2447 * include/grub/script_sh.h: ... Moved here.
2448 * normal/execute.c: Moved to ...
2449 * script/sh/execute.c: ... Moved here.
2450 * normal/function.c: Moved to ...
2451 * script/sh/function.c: ... Moved here.
2452 * normal/lexer.c: Moved to ...
2453 * script/sh/lexer.c: ... Moved here.
2454 * normal/parser.y: Moved to ...
2455 * script/sh/parser.y: ... Moved here.
2456 * normal/script.c: Moved to ...
2457 * script/sh/script.c: ... Moved here.
2459 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2461 (grub_exit_env): Removed.
2462 (fs_module_list): Moved to normal/autofs.c.
2463 (grub_file_getline): Don't handle comment here.
2464 (free_menu): Skip removed field entry->commands.
2465 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2467 (read_config_file): Removed nested parameter, change getline function.
2468 (grub_enter_normal_mode): Removed.
2469 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2470 (read_command_list): Likewise.
2471 (autoload_fs_module): Moved to normal/autofs.c.
2472 (read_fs_list): Likewise.
2473 (reader_nested): New variable.
2474 (grub_normal_execute): Run parser.sh to switch to sh parser.
2475 (grub_cmd_rescue): Removed.
2476 (cmd_normal): Removed.
2477 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2479 (grub_cmdline_run): New function.
2480 (grub_normal_reader_init): Likewise.
2481 (grub_normal_read_line): Likewise.
2482 (grub_env_write_pager): Likewise.
2483 (cmdline): New variable.
2484 (grub_normal_reader): Likewise.
2485 (GRUB_MOD_INIT): Register normal reader and set as current, register
2486 pager hook, register normal command with grub_register_command_prio,
2487 so that it won't show up in command.lst.
2488 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2489 grub_fs_autoload_hook.
2491 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2492 (grub_menu_execute_entry): Replace grub_script_execute with
2493 grub_parser_execute, change parameter to grub_command_execute.
2495 * normal/menu_text.c: Remove <grub/script.h>.
2497 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2498 and <grub/parser.h>.
2499 (run): Change editor_getline to use new parser interface. Change
2500 parameter to grub_command_execute.
2502 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2503 <grub/reader.h> and <grub/parser.h>.
2504 (grub_load_normal_mode): Execute normal command.
2505 (grub_main): Call grub_register_core_commands,
2506 grub_register_rescue_parser and grub_register_rescue_reader, use
2507 grub_reader_loop to enter input loop.
2509 * kern/parser.c (grub_parser_split_cmdline): Change type of
2511 (grub_parser_class): New variable.
2512 (grub_parser_execute): New function.
2514 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2515 * loader/multiboot2.c: Likewise.
2516 * loader/sparc64/ieee1275/linux.c: Likewise.
2518 * util/grub-emu.c (read_command_list): New dummy function.
2520 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2522 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2523 count to 16 for CCISS and IDA.
2525 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2527 * normal/menu_text.c (grub_wait_after_message): Print a newline
2528 after waiting for user input.
2530 * loader/i386/linux.c: Include `<grub/normal.h>'.
2531 (grub_cmd_linux): Improve the error message about `ask' mode, by
2532 waiting for user input so it's not missed (we can do this, since
2533 user requested interaction).
2535 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2537 Added missing lst to grub-mkrescue
2539 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2540 and ${input_dir}/parttool.lst
2542 2009-04-30 David S. Miller <davem@davemloft.net>
2544 * util/hostdisk.c (device_is_wholedisk): New function.
2545 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2546 zero only if device_is_wholedisk() returns true.
2548 * util/hostdisk.c (convert_system_partition_to_system_disk):
2549 Handle virtual disk devices named /dev/vdiskX as found on sparc
2552 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2553 lettered partition specifier is found, convert to numbered.
2555 2009-04-29 David S. Miller <davem@davemloft.net>
2557 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2558 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2560 * normal/command.c: Add missing newline at end of file.
2562 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2564 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2565 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2566 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2567 ihandles have a 32-bit type but need to be stored in a "void *".
2569 2009-04-28 Pavel Roskin <proski@gnu.org>
2571 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2572 not disk. Adjust all dependencies.
2573 (grub_fs_uuid_close): Use grub_device_close(), not
2576 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2577 parent's partition, don't copy it by reference, as it gets freed
2580 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2582 Preboot hooks support
2584 * commands/boot.c (struct grub_preboot_t): new declaration
2585 (preboots_head): new variable
2586 (preboots_tail): likewise
2587 (grub_loader_register_preboot_hook): new function
2588 (grub_loader_unregister_preboot_hook): likewise
2589 (grub_loader_set): launch preboot hooks
2590 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2591 (grub_loader_register_preboot_hook): new declaration
2592 (grub_loader_unregister_preboot_hook): likewise
2594 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2598 * disk/scsi.c (grub_scsi_open): added missing cast when
2599 calling grub_dprintf
2601 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2603 Bug and warning fixes
2605 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2607 * commands/test.c (test_parse): fixed bug with file tests and corrected
2608 declaration of find_file
2610 2009-04-26 Pavel Roskin <proski@gnu.org>
2612 * Makefile.in: Don't install empty manual pages if help2man is
2613 missing. Use help2man option for output, not shell redirection.
2615 2009-04-26 David S. Miller <davem@davemloft.net>
2617 * util/grub-mkdevicemap.c (make_device_map): Add missing
2618 NESTED_FUNC_ATTR to process_device().
2620 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2624 * commands/test.c: rewritten to use bash-like test
2626 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2628 Parttool autoloading and improvements
2630 * Makefile.in (pkglib_DATA): add parttool.lst
2631 (parttool.lst): new target
2632 * genmk.rb: generate parttool-*
2633 (CLEANFILES): add #{parttool}
2634 (PARTTOOLFILES): new variable
2635 * genparttoollist.sh: new file
2636 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2637 (grub_pcpart_type): likewise
2638 * commands/parttool.c (helpmsg): new variable
2639 (grub_cmd_parttool): output help if not enough arguments are supplied
2641 (GRUB_MOD_INIT(parttool)): use helpmsg
2643 2009-04-24 David S. Miller <davem@davemloft.net>
2645 Avoiding opening same device multiple times in device iterator.
2647 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2648 and use it to build a list of partitions in iterate_disk() and
2649 iterate_partition().
2651 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2654 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2655 grub_devalias_iterate() result instead of unconditional 0.
2656 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2657 Also, capture hook return value, either directly or via
2658 grub_children_iterate(), and propagate to caller.
2659 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2660 grub_children_iterate): Return value is now 'int' instead of
2662 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2663 like a proper iterator, stopping when hooks return non-zero.
2664 (grub_devalias_iterate): Likewise.
2666 2009-04-23 David S. Miller <davem@davemloft.net>
2668 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2670 2009-04-22 David S. Miller <davem@davemloft.net>
2672 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2673 is larger than address_cells, use that value for address_cells too.
2675 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2676 IEEE1275_MAX_PATH_LEN): Define.
2677 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2678 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2679 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2680 'devtype'. Explicitly NULL terminate devalias expansion.
2682 * util/sparc64/ieee1275/misc.c: New file.
2683 * util/sparc64/ieee1275/grub-setup.c: New file.
2684 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2685 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2686 * util/sparc64/ieee1275/grub-install.in: New file.
2687 * util/ieee1275/ofpath.c: New file.
2688 * util/ieee1275/devicemap.c: New file.
2689 * util/devicemap.c: New file.
2690 * util/deviceiter.c: New file.
2691 * kern/sparc64/ieee1275/init.c: New file.
2692 * include/grub/util/ofpath.h: New file.
2693 * include/grub/util/deviceiter.h: New file.
2694 * util/grub-mkdevicemap.c: Include deviceiter.h.
2695 Implement using grub_util_emit_devicemap_entry and
2696 grub_util_iterate_devices.
2697 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2698 util/devicemap.c into grub-mkdevicemap
2699 * conf/i386-efi.rmk: Likewise.
2700 * conf/i386-ieee1275.rmk: Likewise.
2701 * conf/i386-pc.rmk: Likewise.
2702 * conf/powerpc-ieee1275.rmk: Likewise.
2703 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2704 images and installation utilities. Build kernel as image
2705 instead of as elf binary. Use common rules as much as possible.
2707 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2709 Correct GPT definition
2711 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2714 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2716 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2718 2009-04-19 David S. Miller <davem@davemloft.net>
2720 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2721 (grub_rescue_cmd_linux): Rename to...
2722 (grub_cmd_linux): and fix prototype.
2723 (grub_rescue_cmd_initrd): Rename to...
2724 (grub_cmd_initrd): and fix prototype.
2725 (cmd_linux, cmd_initrd): New.
2726 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2727 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2729 2009-04-17 Pavel Roskin <proski@gnu.org>
2731 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2733 (grub_ohci_transfer): Likewise.
2735 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2737 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2738 return without a value. Fix inconsistent indentation.
2740 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2741 match struct grub_fs.
2743 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2744 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2745 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2746 * commands/lspci.c (grub_lspci_iter): Likewise.
2748 2009-04-16 Bean <bean123ch@gmail.com>
2750 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2753 2009-04-15 Pavel Roskin <proski@gnu.org>
2755 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2756 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2757 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2760 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2762 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2763 that no multiple data or metadata areas are supported and `Unknown
2766 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2768 Move loader out of the kernel
2770 * kern/loader.c: moved to ...
2771 * commands/boot.c: ... moved here
2772 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2773 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2774 * include/grub/kernel.h (grub_machine_fini): export
2775 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2776 (grub_loader_set): likewise
2777 (grub_loader_unset): likewise
2778 (grub_loader_boot): likewise
2779 * conf/common.rmk: new module boot.mod
2780 (pkglib_MODULES): add boot.mod
2781 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2782 (grub_emu_SOURCES): likewise
2783 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2784 (grub_emu_SOURCES): likewise
2785 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2786 (grub_emu_SOURCES): likewise
2787 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2788 (grub_emu_SOURCES): likewise
2789 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2790 (grub_emu_SOURCES): likewise
2791 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2792 (grub_emu_SOURCES): likewise
2793 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2794 (grub_emu_SOURCES): likewise
2796 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2798 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2800 * kern/misc.c (grub_itoa): Removed function
2801 (grub_ltoa): likewise
2802 (grub_vsprintf): use grub_lltoa
2804 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2808 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2809 * conf/i386-coreboot.rmk: likewise
2810 * conf/i386-ieee1275.rmk: likewise
2811 * conf/powerpc-ieee1275.rmk: likewise
2813 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2815 * INSTALL: Add that `./autogen.sh' needs to be run before
2818 2009-04-14 Bean <bean123ch@gmail.com>
2820 * Makefile.in (pkglib_DATA): Add handler.lst.
2821 (handler.lst): New rule.
2823 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2824 * conf/i386-coreboot.rmk: Likewise.
2825 * conf/i386-ieee1275.rmk: Likewise.
2826 * conf/i386-efi.rmk: Likewise.
2827 * conf/x86_64-efi.rmk: Likewise.
2828 * conf/powerpc-ieee1275.rmk: Likewise.
2829 * conf/sparc64-ieee1275.rmk: Likewise.
2831 * genhandlerlist.sh: New file.
2833 * genmk.rb: Add rules to generate handler.lst.
2835 * include/grub/normal.h (grub_file_getline): New function definition.
2836 (read_handler_list): Likewise.
2837 (free_handler_list): Likewise.
2839 * include/grub/term.h (grub_term_register_input): Add name parameter
2840 for auto generation of handler.lst.
2841 (grub_term_register_output): Likewise.
2843 * normal/handler.c: New file.
2845 * normal/main.c (get_line): Renamed to grub_file_getline.
2846 (read_config_file): Use the newly renamed grub_file_getline.
2847 (read_command_list): Likewise.
2848 (read_fs_list): Likewise.
2849 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2850 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2852 * term/efi/console.c (grub_console_init): Add name parameter for auto
2853 generation of handler.lst.
2854 * term/gfxterm.c: Likewise.
2855 * term/i386/pc/at_keyboard.c: Likewise.
2856 * term/i386/pc/console.c: Likewise.
2857 * term/i386/pc/serial.c: Likewise.
2858 * term/i386/pc/vesafb.c: Likewise.
2859 * term/i386/pc/vga.c: Likewise.
2860 * term/i386/pc/vga_text.c: Likewise.
2861 * term/ieee1275/ofconsole.c: Likewise.
2862 * term/usb_keyboard.c: Likewise.
2864 2009-04-14 Bean <bean123ch@gmail.com>
2866 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2867 properly with null character.
2869 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2871 * configure: Remove.
2872 * config.h.in: Likewise.
2873 * stamp-h.in: Likewise.
2874 * DISTLIST: Likewise.
2875 * conf/common.mk: Likewise.
2876 * conf/i386-coreboot.mk: Likewise.
2877 * conf/i386-efi.mk: Likewise.
2878 * conf/i386-ieee1275.mk: Likewise.
2879 * conf/i386.mk: Likewise.
2880 * conf/i386-pc.mk: Likewise.
2881 * conf/powerpc-ieee1275.mk: Likewise.
2882 * conf/sparc64-ieee1275.mk: Likewise.
2883 * conf/x86_64-efi.mk: Likewise.
2885 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2888 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2889 David S. Miller <davem@davemloft.net>
2891 * util/hostdisk.c (make_device_name): Fix buffer length
2894 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2896 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2897 <sys/param.h> and <sys/sysctl.h>.
2898 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2899 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2900 opening the device and reset them afterwards.
2902 2009-04-13 Pavel Roskin <proski@gnu.org>
2904 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2905 Reported by John Stanley <jpsinthemix@verizon.net>
2907 2009-04-13 Robert Millan <rmh@aybabtu.com>
2909 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2910 that name for menuentries when appropriate.
2912 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2914 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2916 2009-04-13 Robert Millan <rmh@aybabtu.com>
2918 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2919 to Linux, simply abort telling the user it's no longer supported.
2921 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2923 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2924 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2925 `freebsd_loadenv' only when devices.hints exist.
2927 2009-04-13 Pavel Roskin <proski@gnu.org>
2929 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2931 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2933 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2935 (grub_drive): Likewise.
2937 2009-04-13 David S. Miller <davem@davemloft.net>
2939 * kern/sparc64/ieee1275/ieee1275.c: New file.
2940 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2941 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2942 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2943 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2944 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2945 grub_ieee1275_alloc_physmem): Declare new exported functions.
2947 * include/grub/sparc64/ieee1275/loader.h: New file.
2948 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2949 * include/grub/sparc64/kernel.h: Likewise.
2950 * loader/sparc64/ieee1275/linux.c: Likewise.
2952 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2953 (grub_fstest_SOURCES): Likewise.
2955 * util/hostdisk.c (make_device_name): Do not make any assumptions
2956 about the length of drive names.
2958 * kern/dl.c (grub_dl_load_file): Close file immediately when
2959 we are done using it.
2961 2009-04-12 David S. Miller <davem@davemloft.net>
2963 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2964 values. Noticed by Pavel Roskin.
2966 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2969 * genmk.rb: Add more flexible image type specification, also
2970 pass --strip-unneeded to objcopy.
2971 * conf/i386-pc.rmk: Use *_FORMAT.
2972 * conf/i386-pc.mk: Rebuilt.
2974 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2975 (OFDISK_HASH_SZ): Define.
2976 (ofdisk_hash): New hash table.
2977 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2978 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2979 instead of device phandle which is not unique.
2981 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2982 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2983 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2984 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2985 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2986 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2987 GRUB_KERNEL_MACHINE_DATA_END): Define.
2988 (grub_kernel_image_size, grub_total_module_size): Declare.
2990 2009-04-12 Pavel Roskin <proski@gnu.org>
2992 * configure.ac: Change the logic when we check for target tools.
2993 Do it when the target is specified and it's different from the
2994 specified value of the host.
2996 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2998 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2999 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3000 GNU/kFreeBSD. Check if a device is a character device. Use
3001 DIOCGMEDIASIZE to get the size.
3002 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3003 support for GNU/kFreeBSD.
3004 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3005 is a character device instead of a block device. Add support for
3006 FreeBSD device names.
3008 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3009 is a character device instead of a block device.
3011 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3012 is a character device instead of a block device.
3014 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3016 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3017 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3018 FreeBSD. Check if a device is a character device. Use
3019 DIOCGMEDIASIZE to get the size.
3020 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3021 support for FreeBSD.
3022 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3023 is a character device instead of a block device. Add support for
3024 FreeBSD device names.
3026 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3027 a character device instead of a block device.
3028 (grub_util_check_char_device): New function.
3030 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3031 a character device instead of a block device.
3033 * include/grub/util/getroot.h (grub_util_check_char_device): New
3036 2009-04-11 David S. Miller <davem@davemloft.net>
3038 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3040 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3041 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3042 function, if present.
3043 (__bswapdi2): Likewise.
3045 * include/grub/sparc64/ieee1275/boot.h: New file.
3046 * boot/sparc64/ieee1275/boot.S: Likewise.
3047 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3049 * kern/misc.c (grub_ltoa): New function.
3050 (grub_vsprintf): Use it to format 'long' integers.
3052 2009-04-10 David S. Miller <davem@davemloft.net>
3054 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3055 slots are of type grub_ieee1275_cell_t.
3056 (grub_nand_read): Likewise.
3057 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3058 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3059 macros are used to compare values in arg/ret block of the call.
3060 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3061 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3062 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3063 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3064 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3065 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3066 grub_ieee1275_close, grub_ieee1275_set_property,
3067 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3068 grub_ieee1275_cell_t.
3069 * kern/ieee1275/openfw.c (grub_map): Likewise.
3070 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3071 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3073 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3074 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3075 (grub_devalias_iterate): Likewise.
3077 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3081 * fs/ufs.c (INODE_NBLOCKS): new definition
3082 (struct grub_ufs_dirent): added fields for non-BSD dirents
3083 (grub_ufs_get_file_block): fixed double indirect handling
3084 (grub_ufs_lookup_symlink): use more robust way to determine whether
3086 (grub_ufs_find_file): support for non-BSD dirents
3087 (grub_ufs_dir): support for non-BSD dirents
3089 2009-04-10 Bean <bean123ch@gnail.com>
3091 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3092 attribute, otherwise the size would be wrong for i386 platform.
3094 * include/grub/pci.h (grub_pci_read_word): New inline function.
3095 (grub_pci_read_byte): Likewise.
3096 (grub_pci_write): Likewise.
3097 (grub_pci_write_word): Likewise.
3098 (grub_pci_write_byte): Likewise.
3100 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3102 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3103 (find_framebuf): Scan pci to locate the frame buffer address.
3105 * commands/efi/fixvideo.c: New file.
3107 * commands/efi/loadbios.c: Likewise.
3109 * commands/memrw.c: Likewise.
3111 * util/grub-dumpbios.in: Likewise.
3113 * conf/common.rmk (grub-dumpbios): New utility.
3114 (pkglib_MODULES): New module memrw.mod.
3115 (memrw_mod_SOURCE): New macro.
3116 (memrw_mod_CFLAGS): Likewise.
3117 (memrw_mod_LDFLAGS): Likewise.
3119 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3121 (loadbios_mod_SOURCE): New macro.
3122 (loadbios_mod_CFLAGS): Likewise.
3123 (loadbios_mod_LDFLAGS): Likewise.
3124 (fixvideo_mod_SOURCE): Likewise.
3125 (fixvideo_mod_CFLAGS): Likewise.
3126 (fixvideo_mod_LDFLAGS): Likewise.
3128 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3130 (loadbios_mod_SOURCE): New macro.
3131 (loadbios_mod_CFLAGS): Likewise.
3132 (loadbios_mod_LDFLAGS): Likewise.
3133 (fixvideo_mod_SOURCE): Likewise.
3134 (fixvideo_mod_CFLAGS): Likewise.
3135 (fixvideo_mod_LDFLAGS): Likewise.
3137 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3139 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3141 2009-04-07 David S. Miller <davem@davemloft.net>
3143 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3144 support for R_SPARC_OLO10 relocations. Fix compile warning for
3145 R_SPARC_WDISP30 case.
3146 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3148 2009-04-06 Pavel Roskin <proski@gnu.org>
3150 * include/grub/misc.h (ARRAY_SIZE): New macro.
3151 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3153 * loader/i386/linux.c (allocate_pages): Use free_pages().
3154 (grub_linux_unload): Don't use free_pages().
3155 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3156 wrong index. Treat all other modes as text modes.
3157 (grub_cmd_linux): Initialize vid_mode unconditionally to
3158 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3160 * commands/help.c (print_command_help): Use cmd->prio, not
3161 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3163 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3167 * parttool/pcpart.c: new file
3168 * commands/parttool.c: likewise
3169 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3170 (parttool_mod_SOURCES): new variable
3171 (parttool_mod_CFLAGS): likewise
3172 (parttool_mod_LDFLAGS): likewise
3173 (pcpart_mod_SOURCES): likewise
3174 (pcpart_mod_CFLAGS): likewise
3175 (pcpart_mod_LDFLAGS): likewise
3176 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3177 and parttool/pcpart.c
3178 * conf/i386-efi.rmk: likewise
3179 * conf/i386-ieee1275.rmk: likewise
3180 * conf/i386-pc.rmk: likewise
3181 * conf/powerpc-ieee1275.rmk: likewise
3182 * conf/sparc64-ieee1275.rmk: likewise
3183 * conf/x86_64-ieee1275.rmk: likewise
3185 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3187 Support for mtime and further expandability of dir command
3189 * include/grub/lib/datetime.h: moved to ...
3190 * include/grub/datetime.h: ... moved here and added
3191 declaration of grub_unixtime2datetime. All users updated
3192 * include/grub/fs.h: new syntax for dir and mtime functions in
3194 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3195 and GRUB_FSHELP_FLAGS_MASK
3196 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3197 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3198 (grub_ext2_mtime): new function
3199 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3200 (grub_hfsplus_mtime): new function
3201 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3202 (GRUB_UFS_ATTR_FILE): likewise
3203 (GRUB_UFS_ATTR_LNK): likewise
3204 (struct grub_ufs_sblock): new fields mtime
3205 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3207 (grub_ufs_dir): mtime support
3208 (grub_ufs_mtime): new function
3209 * fs/affs.c (grub_affs_dir): use new dir syntax
3210 * fs/afs.c (grub_afs_dir): likewise
3211 * fs/cpio.c (grub_cpio_dir): likewise
3212 * fs/fat.c (grub_fat_find_dir): likewise
3213 * fs/hfs.c (grub_hfs_dir): likewise
3214 * fs/iso9660.c (grub_iso9660_dir): likewise
3215 * fs/jfs.c (grub_jfs_dir): likewise
3216 * fs/minix.c (grub_minix_dir): likewise
3217 * fs/ntfs.c (grub_ntfs_dir): likewise
3218 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3219 * fs/sfs.c (grub_sfs_dir): likewise
3220 * fs/xfs.c (grub_xfs_dir): likewise
3221 * util/hostfs.c (grub_hostfs_dir): likewise
3222 * lib/datetime.c: moved to ...
3223 * normal/datetime.c: ... moved here
3224 (grub_unixtime2datetime): new function
3225 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3226 * normal/completion.c (iterate_dir): use new dir syntax
3227 * normal/misc.c (grub_normal_print_device_info): tell the
3228 last modification time of a volume
3229 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3230 * conf/common.rmk: added lib/datetime.c to ls.mod
3231 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3232 (normal_mod_SOURCES): likewise
3233 (datetime_mod_SOURCES): Removed lib/datetime.c
3234 * conf/i386-efi.rmk: likewise
3235 * conf/i386-ieee1275.rmk: likewise
3236 * conf/i386-pc.rmk: likewise
3237 * conf/powerpc-ieee1275.rmk: likewise
3238 * conf/sparc64-ieee1275.rmk: likewise
3239 * conf/x86_64-efi.rmk: likewise
3241 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3243 Trim trailing spaces in FAT label and support mtools-like labels
3245 * fs/fat.c (grub_fat_iterate_dir): New function based
3246 on grub_fat_find_dir
3247 (grub_fat_find_dir): use grub_fat_iterate_dir
3248 (grub_fat_label): likewise
3250 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3252 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3254 remove extraneous kernel_elf_HEADERS
3256 2009-04-04 Bean <bean123ch@gnail.com>
3258 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3260 * util/misc.c: Likewise.
3262 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3264 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3265 instead of grub_printf.
3267 2009-04-03 Robert Millan <rmh@aybabtu.com>
3269 * loader/i386/linux.c (grub_linux_setup_video): Fill
3270 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3271 values from `mode info' structure instead of hardcoded
3274 2009-04-01 Pavel Roskin <proski@gnu.org>
3276 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3278 * genmk.rb: Likewise.
3279 * configure.ac: Likewise.
3281 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3283 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3284 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3286 2009-04-01 David S. Miller <davem@davemloft.net>
3288 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3289 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3290 (grub_setjmp): Mark with 'returns_twice' attribute.
3291 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3292 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3293 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3295 2009-04-01 Robert Millan <rmh@aybabtu.com>
3297 Reapply fix from 2008-07-28 which was accidentally reverted; also
3298 perform the same fix to a similar check in same function.
3300 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3301 with the same number are found, just use issue a warning with
3302 grub_dprintf(), as this error has been reported to be non-fatal.
3304 2009-03-31 Pavel Roskin <proski@gnu.org>
3306 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3307 for cross-compilation.
3309 2009-03-30 Robert Millan <rmh@aybabtu.com>
3311 Fix i386-ieee1275 build.
3313 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3316 2009-03-30 Pavel Roskin <proski@gnu.org>
3318 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3319 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3320 zero-terminated, rely only on the strlen value. Fix comparison
3321 of strings differing in length.
3323 2009-03-30 Robert Millan <rmh@aybabtu.com>
3325 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3326 checking for abi version. Improve error messages on BIOS to notify
3327 user about `linux16' command.
3329 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3333 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3334 in case of collision
3335 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3337 2009-03-29 Robert Millan <rmh@aybabtu.com>
3339 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3340 set `vid_mode' accordingly.
3341 (grub_linux_boot): Process `vid_mode' and set video mode.
3343 2009-03-29 Robert Millan <rmh@aybabtu.com>
3345 * util/grub.d/10_linux.in (linux_entry): New function.
3346 Factorize generation of Linux boot entries.
3348 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3350 Make the format of Environment Block plain text. The boot loader
3351 part is not tested well yet.
3353 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3356 (usage): Remove "info" and "clear". Add "unset". Update the
3357 description of "set", as this does not delete variables any
3359 (create_envblk_file): Complete rewrite.
3360 (open_envblk_file): Likewise.
3361 (cmd_info): Removed.
3362 (cmd_list): Likewise.
3363 (cmd_set): Likewise.
3364 (cmd_clear): Likewise.
3365 (list_variables): New function.
3366 (write_envblk): Likewise.
3367 (set_variables): Likewise.
3368 (unset_variables): Likewise.
3369 (main): Complete rewrite.
3371 * commands/loadenv.c (buffer): Removed.
3373 (open_envblk_file): New function.
3374 (read_envblk_file): Complete rewrite.
3375 (grub_cmd_load_env): Likewise.
3376 (grub_cmd_list_env): Likewise.
3377 (struct blocklist): New struct.
3378 (free_blocklists): New function.
3379 (check_blocklists): Likewise.
3380 (write_blocklists): Likewise.
3381 (grub_cmd_save_env): Complete rewrite.
3383 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3384 a plain text signature.
3385 (GRUB_ENVBLK_MAXLEN): Removed.
3386 (struct grub_envblk): Complete rewrite.
3387 (grub_envblk_find): Removed.
3388 (grub_envblk_insert): Likewise.
3389 (grub_envblk_open): New prototype.
3390 (grub_envblk_set): Likewise.
3391 (grub_envblk_delete): Put const to VALUE.
3392 (grub_envblk_iterate): Put const to NAME and VALUE.
3393 (grub_envblk_close): New prototype.
3394 (grub_envblk_buffer): New inline function.
3395 (grub_envblk_size): Likewise.
3397 * lib/envblk.c: Include grub/mm.h.
3398 (grub_env_find): Removed.
3399 (grub_envblk_open): New function.
3400 (grub_envblk_close): Likewise.
3401 (escaped_value_len): Likewise.
3402 (find_next_line): Likewise.
3403 (grub_envblk_insert): Removed.
3404 (grub_envblk_set): New function.
3405 (grub_envblk_delete): Complete rewrite.
3406 (grub_envblk_iterate): Likewise.
3408 2009-03-28 Robert Millan <rmh@aybabtu.com>
3410 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3411 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3412 variables. Use 16-bit loader.
3413 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3415 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3416 (grub_linux16_boot): ... this. Update all users.
3417 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3418 (grub_linux_boot): ... this. Update all users.
3420 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3421 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3422 commands to `linux16' and `initrd16'.
3423 (GRUB_MOD_FINI(linux)): Rename to ...
3424 (GRUB_MOD_FINI(linux16)): ... this.
3426 2009-03-24 Pavel Roskin <proski@gnu.org>
3428 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3429 not just for compilation.
3431 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3433 Move multiboot helper out of kernel
3435 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3436 `loader/i386/multiboot_helper.S'.
3437 * conf/i386-coreboot.rmk: Likewise
3438 * conf/i386-ieee1275.rmk: Likewise
3440 * kern/i386/loader.S: Move multiboot helpers from here...
3441 * loader/i386/multiboot_helper.S: ...moved here
3442 * include/grub/i386/loader.h: Move declarations of multiboot
3443 helpers from here...
3444 * include/grub/i386/multiboot.h: ...moved here
3445 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3447 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3449 * kern/env.c (grub_env_context_open): Added an argument to specify
3450 whether a new context inherits exported variables from current
3451 one. This is useful when making a sandbox to interpret a config
3453 All callers updated.
3455 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3457 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3459 * kern/env.c (grub_env_context_close): Fix memory leaks.
3461 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3463 * normal/main.c (grub_normal_execute): Added an argument
3464 BATCH to specify if an interactive interface should be provided
3465 after reading a config file.
3466 All callers updated.
3467 (read_command_list): Prevent being executed twice.
3468 (read_fs_list): Likewise.
3470 * include/grub/normal.h (grub_normal_execute): Updated the
3473 2009-03-22 Pavel Roskin <proski@gno.org>
3475 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3477 * kern/i386/pc/startup.S: Likewise.
3478 * kern/i386/efi/startup.S: Likewise.
3479 * kern/i386/ieee1275/startup.S: Likewise.
3480 * kern/i386/coreboot/startup.S: Likewise.
3481 * kern/x86_64/efi/startup.S: Likewise.
3483 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3484 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3485 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3487 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3489 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3491 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3493 Use vaddr of correct segment for entry_point.
3495 2009-03-21 Bean <bean123ch@gmail.com>
3497 * commands/blocklist.c: Add include file <grub/command.h>, remove
3498 <grub/normal.h> and <grub/arg.h>.
3499 (grub_cmd_blocklist): Use the new command interface.
3500 (GRUB_MOD_INIT): Likewise.
3501 (GRUB_MOD_FINI): Likewise.
3502 * commands/boot.c: Likewise.
3503 * commands/cat.c: Likewise.
3504 * commands/cmp.c: Likewise.
3505 * commands/configfile.c: Likewise.
3506 * commands/crc.c: Likewise.
3507 * commands/echo.c: Likewise.
3508 * commands/halt.c: Likewise.
3509 * commands/handler.c: Likewise.
3510 * commands/hdparm.c: Likewise.
3511 * commands/help.c: Likewise.
3512 * commands/hexdump.c: Likewise.
3513 * commands/loadenv.c: Likewise.
3514 * commands/ls.c: Likewise.
3515 * commands/lsmmap.c: Likewise.
3516 * commands/lspci.c: Likewise.
3517 * commands/loadenv.c: Likewise.
3518 * commands/read.c: Likewise.
3519 * commands/reboot.c: Likewise.
3520 * commands/search.c: Likewise.
3521 * commands/sleep.c: Likewise.
3522 * commands/test.c: Likewise.
3523 * commands/usbtest.c: Likewise.
3524 * commands/videotest.c: Likewise.
3525 * commands/i386/cpuid.c: Likewise.
3526 * commands/i386/pc/halt.c: Likewise.
3527 * commands/i386/pc/play.c: Likewise.
3528 * commands/i386/pc/pxecmd.c: Likewise.
3529 * commands/i386/pc/vbeinfo.c: Likewise.
3530 * commands/i386/pc/vbetest.c: Likewise.
3531 * commands/ieee1275/suspend.c: Likewise.
3532 * disk/loopback.c: Likewise.
3533 * font/font_cmd.c: Likewise.
3534 * hello/hello.c: Likewise.
3535 * loader/efi/appleloader.c: Likewise.
3536 * loader/efi/chainloader.c: Likewise.
3537 * loader/i386/bsd.c: Likewise.
3538 * loader/i386/efi/linux.c: Likewise.
3539 * loader/i386/ieee1275/linux.c: Likewise.
3540 * loader/i386/linux.c: Likewise.
3541 * loader/i386/pc/chainloader.c: Likewise.
3542 * loader/i386/pc/linux.c: Likewise.
3543 * loader/powerpc/ieee1275/linux.c: Likewise.
3544 * loader/multiboot_loader.c: Likewise.
3545 * term/gfxterm.c: Likewise.
3546 * term/i386/pc/serial.c: Likewise.
3547 * term/terminfo.c: Likewise.
3549 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3550 * term/i386/pc/vga.c: Likewise.
3551 * video/readers/jpeg.c: Likewise.
3552 * video/readers/png.c: Likewise.
3553 * video/readers/tga.c: Likewise.
3555 * util/grub-fstest (cmd_loopback): Removed.
3556 (cmd_blocklist): Likewise.
3558 (grub_register_command): Likewise.
3559 (grub_unregister_command): Likewise.
3560 (execute_command): Use grub_command_find to locate command and execute
3563 * include/grub/efi/chainloader.h: Removed.
3564 * loader/efi/chainloader_normal.c: Likewise.
3565 * loader/i386/bsd_normal.c: Likewise.
3566 * loader/i386/pc/chainloader_normal.c: Likewise.
3567 * loader/i386/pc/multiboot_normal.c: Likewise.
3568 * loader/linux_normal.c: Likewise.
3569 * loader/multiboot_loader_normal.c: Likewise.
3570 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3572 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3573 and grub_register_command_p1.
3575 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3576 kern/command.c, lib/arg.c and commands/extcmd.c.
3577 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3578 (minicmd_mod_SOURCES): New variable.
3579 (minicmd_mod_CFLAGS): Likewise.
3580 (minicmd_mod_LDFLAGS): Likewise.
3581 (extcmd_mod_SOURCES): Likewise.
3582 (extcmd_mod_CFLAGS): Likewise.
3583 (extcmd_mod_LDFLAGS): Likewise.
3584 (boot_mod_SOURCES): Removed.
3585 (boot_mod_CFLAGS): Likewise.
3586 (boot_mod_LDFLAGS): Likewise.
3588 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3590 (kernel_img_HEADERS): Add command.h.
3591 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3592 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3594 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3595 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3596 remove the corresponding normal mode command.
3597 (normal_mod_SOURCES): Remove normal/arg.c.
3598 * conf/i386-coreboot.rmk: Likewise.
3599 * conf/i386-efi.rmk: Likewise.
3600 * conf/i386-ieee1275.rmk: Likewise.
3601 * conf/powerpc-ieee1275.rmk: Likewise.
3602 * conf/x86_64-efi.rmk: Likewise.
3604 * include/grub/arg.h: Move from here ...
3605 * include/grub/lib/arg.h: ... to here.
3607 * normal/arg.c: Move from here ...
3608 * lib/arg.c: ... to here.
3610 * commands/extcmd.c: New file.
3611 * commands/minicmd.c: Likewise.
3612 * include/grub/command.h: Likewise.
3613 * include/grub/extcmd.h: Likewise.
3614 * kern/command.c: Likewise.
3615 * kern/corecmd.c: Likewise.
3617 * kern/list.c (grub_list_iterate): Return int instead of void.
3618 (grub_list_insert): New function.
3619 (grub_prio_list_insert): Likewise.
3621 * kern/rescue.c (grub_rescue_command): Removed.
3622 (grub_rescue_command_list): Likewise.
3623 (grub_rescue_register_command): Likewise.
3624 (grub_rescue_unregister_command): Likewise.
3625 (grub_rescue_cmd_boot): Move to minicmd.c
3626 (grub_rescue_cmd_help): Likewise.
3627 (grub_rescue_cmd_info): Likewise.
3628 (grub_rescue_cmd_boot): Likewise.
3629 (grub_rescue_cmd_testload): Likewise.
3630 (grub_rescue_cmd_dump): Likewise.
3631 (grub_rescue_cmd_rmmod): Likewise.
3632 (grub_rescue_cmd_lsmod): Likewise.
3633 (grub_rescue_cmd_exit): Likewise.
3634 (grub_rescue_print_devices): Moved to corecmd.c.
3635 (grub_rescue_print_files): Likewise.
3636 (grub_rescue_cmd_ls): Likewise.
3637 (grub_rescue_cmd_insmod): Likewise.
3638 (grub_rescue_cmd_set): Likewise.
3639 (grub_rescue_cmd_unset): Likewise.
3640 (attempt_normal_mode): Use grub_command_find to get normal module.
3641 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3642 commands, remove grub_rescue_register_command calls.
3644 * normal/command.c (grub_register_command): Removed.
3645 (grub_unregister_command): Likewise.
3646 (grub_command_find): Likewise.
3647 (grub_iterate_commands): Likewise.
3648 (rescue_command): Likewise.
3649 (export_command): Moved to corecmd.c.
3650 (set_command): Removed.
3651 (unset_command): Likewise.
3652 (insmod_command): Likewise.
3653 (rmmod_command): Likewise.
3654 (lsmod_command): Likewise.
3655 (grub_command_init): Likewise.
3657 * normal/completion.c (iterate_command): Use cmd->prio to check for
3659 (complete_arguments): Use grub_extcmd_t structure to find options.
3660 (grub_normal_do_completion): Change function grub_iterate_commands to
3661 grub_command_iterate.
3663 * normal/execute.c (grub_script_execute_cmd): No need to parse
3666 * normal/main.c (grub_dyncmd_dispatcher): New function.
3667 (read_command_list): Register unload commands as dyncmd.
3668 (grub_cmd_normal): Use new command interface, register rescue,
3669 unregister normal at entry, register normal, unregister rescue at exit.
3671 * include/grub/list.h (grub_list_test_t): New type.
3672 (grub_list_iterate): Return int instead of void.
3673 (grub_list_insert): New function.
3674 (GRUB_AS_NAMED_LIST_P): New macro.
3675 (GRUB_AS_PRIO_LIST): Likewise.
3676 (GRUB_AS_PRIO_LIST_P): Likewise.
3677 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3678 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3679 (grub_prio_list): New structure.
3680 (grub_prio_list_insert): New function.
3681 (grub_prio_list_remove): New inline function.
3683 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3684 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3685 (GRUB_COMMAND_FLAG_MENU): Likewise.
3686 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3687 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3688 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3689 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3690 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3691 (grub_command): Likewise.
3692 (grub_register_command): Likewise.
3693 (grub_command_find): Likewise.
3694 (grub_iterate_commands): Likewise.
3695 (grub_command_init): Likewise.
3696 (grub_arg_parse): Likewise.
3697 (grub_arg_show_help): Likewise.
3699 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3700 (grub_rescue_unregister_command): Likewise.
3702 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3703 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3704 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3706 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3707 grub_rescue_cmd_initrd.
3708 * include/grub/i386/loader.h: Likewise.
3709 * include/grub/x86_64/loader.h: Likewise.
3711 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3713 2009-03-21 Bean <bean123ch@gmail.com>
3715 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3716 instead of stat in mingw environment.
3718 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3720 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3722 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3725 2009-03-21 Bean <bean123ch@gmail.com>
3727 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3730 2009-03-18 Michel Dänzer <michel@daenzer.net>
3732 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3733 checking inode flags for EXT4_EXTENTS_FLAG.
3735 2009-03-18 Robert Millan <rmh@aybabtu.com>
3737 * loader/i386/linux.c: Include `<grub/video.h>' and
3738 `<grub/i386/pc/vbe.h>'..
3739 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3740 (grub_linux32_boot): Attempt to configure video settings with
3741 grub_linux_setup_video().
3742 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3743 to avoid grub_console_fini() which would step out of graphical mode
3746 2009-03-14 Robert Millan <rmh@aybabtu.com>
3748 Fix build on powerpc.
3749 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3751 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3753 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3754 background image command.
3756 2009-03-12 Colin D Bennett <colin@gibibit.com>
3758 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3759 (grub_gfxterm_putchar): Extract pairs of identical calls to
3760 draw_cursor out of conditional blocks.
3762 2009-03-11 Pavel Roskin <proski@gnu.org>
3764 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3765 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3767 2009-03-11 Robert Millan <rmh@aybabtu.com>
3769 * loader/i386/multiboot_elfxx.c
3770 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3772 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3774 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3777 2009-03-11 Robert Millan <rmh@aybabtu.com>
3779 * loader/i386/multiboot.c (code_size): New variable.
3780 (grub_multiboot): Define offsets by adding to `code_size' rather
3781 than subtracting from `grub_multiboot_payload_size'. Provide
3782 4-byte alignment to MBI and others by increasing
3783 `boot_loader_name_length' appropriately.
3785 * loader/i386/multiboot_elfxx.c
3786 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3788 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3790 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3793 2009-03-08 Robert Millan <rmh@aybabtu.com>
3795 Make loader/i386/linux.c usable on i386-pc again.
3797 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3799 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3802 2009-03-07 Bean <bean123ch@gmail.com>
3804 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3807 2009-03-06 Robert Millan <rmh@aybabtu.com>
3809 Fix display issue on terminals with screen size other than 80x25
3810 (e.g. gfxterm with resolution higher than 640x480).
3812 * normal/main.c (grub_normal_init_page): Display title text in a
3813 position relative to the center of the terminal instead of relying
3814 on a hardcoded offset.
3816 2009-03-04 Robert Millan <rmh@aybabtu.com>
3818 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3821 * Makefile.in (host_kernel): New variable.
3822 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3823 scripts instead of just the windows one.
3824 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3826 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3828 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3830 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3831 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3832 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3833 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3834 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3835 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3837 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3839 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3840 or if there's no space for the disk label and print the partition number on a
3843 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3845 * util/misc.c: Include <time.h>.
3846 (grub_millisleep): New function.
3848 2009-03-04 Bean <bean123ch@gmail.com>
3850 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3851 another option -mno-red-zone.
3853 * commands/handler.c: Change module description.
3855 * kern/handler.c: Add missing space at the end of description line.
3857 * kern/list.c: Likewise.
3859 2009-03-03 Robert Millan <rmh@aybabtu.com>
3861 Move more components to the relocation area, and fix mbi pointer
3862 handling to use the destination rather than the origin (thanks to
3863 Vladimir Serbinenko for spotting).
3865 * loader/i386/multiboot.c (mbi_dest): New variable.
3866 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3867 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3870 2009-03-01 Bean <bean123ch@gmail.com>
3872 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3873 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3874 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3875 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3877 * loader/i386/efi/linux.c (acpi_guid): New variable.
3878 (acpi_guid): Likewise.
3879 (EBDA_SEG_ADDR): New constant.
3880 (LOW_MEM_ADDR): Likewise.
3881 (FAKE_EBDA_SEG): Likewise.
3882 (fake_bios_data): New function.
3883 (grub_linux_boot): Call fake_bios_data.
3885 2009-03-01 Bean <bean123ch@gmail.com>
3887 * commands/terminal.c: Removed.
3889 * commands/handler.c: New file.
3891 * include/grub/list.h: Likewise.
3893 * include/grub/handler.h: Likewise.
3895 * kern/list.c: Likewise.
3897 * kern/handler.c: Likewise.
3899 * kern/term.h: Include header file <grub/handler.h>.
3900 (grub_term_input): Move next field to the beginning.
3901 (grub_term_output): Likewise.
3902 (grub_term_input_class): New variable.
3903 (grub_term_output_class): Likewise.
3904 (grub_term_register_input): Changed to inline function.
3905 (grub_term_register_output): Likewise.
3906 (grub_term_unregister_input): Likewise.
3907 (grub_term_unregister_output): Likewise.
3908 (grub_term_set_current_input): Likewise.
3909 (grub_term_set_current_output): Likewise.
3910 (grub_term_get_current_input): Likewise.
3911 (grub_term_get_current_output): Likewise.
3912 (grub_term_iterate_input): Removed.
3913 (grub_term_iterate_output): Likewise.
3915 * kern/term.c (grub_term_list_input): Removed.
3916 (grub_term_list_output): Likewise.
3917 (grub_term_input_class): New variable.
3918 (grub_term_output_class): Likewise.
3919 (grub_cur_term_input): Change variable as macro.
3920 (grub_cur_term_output): Likewise.
3921 (grub_term_register_input): Removed.
3922 (grub_term_register_output): Likewise.
3923 (grub_term_unregister_input): Likewise.
3924 (grub_term_unregister_output): Likewise.
3925 (grub_term_set_current_input): Likewise.
3926 (grub_term_set_current_output): Likewise.
3927 (grub_term_iterate_input): Likewise.
3928 (grub_term_iterate_output): Likewise.
3929 (grub_term_get_current_input): Likewise.
3930 (grub_term_get_current_output): Likewise.
3932 * util/grub-editenv.c: Include header file <grub/handler.h>.
3933 (grub_term_get_current_input): Removed.
3934 (grub_term_get_current_output): Likewise.
3935 (grub_term_input_class): New variable.
3936 (grub_term_output_class): Likewise.
3938 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3939 (grub_term_get_current_output): Likewise.
3940 (grub_term_input_class): New variable.
3941 (grub_term_output_class): Likewise.
3943 * util/grub-probe.c (grub_term_get_current_input): Removed.
3944 (grub_term_get_current_output): Likewise.
3945 (grub_term_input_class): New variable.
3946 (grub_term_output_class): Likewise.
3948 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3949 (grub_term_get_current_output): Likewise.
3950 (grub_term_input_class): New variable.
3951 (grub_term_output_class): Likewise.
3953 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3954 (terminal_mod_SOURCES): Likewise.
3955 (terminal_mod_CFLAGS): Likewise.
3956 (terminal_mod_LDFLAGS): Likewise.
3958 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3960 (kernel_img_SOURCES): Add list.c and handler.c.
3961 (kernel_img_HEADERS): Add list.h and handler.h.
3963 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3965 (kernel_mod_SOURCES): Add list.c and handler.c.
3966 (kernel_mod_HEADERS): Add list.h and handler.h.
3968 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3970 (kernel_elf_SOURCES): Add list.c and handler.c.
3971 (kernel_elf_HEADERS): Add list.h and handler.h.
3973 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3975 (kernel_elf_SOURCES): Add list.c and handler.c.
3976 (kernel_elf_HEADERS): Add list.h and handler.h.
3978 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3980 (kernel_mod_SOURCES): Add list.c and handler.c.
3981 (kernel_mod_HEADERS): Add list.h and handler.h.
3983 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3985 (kernel_elf_SOURCES): Add list.c and handler.c.
3986 (kernel_elf_HEADERS): Add list.h and handler.h.
3988 2009-02-27 Robert Millan <rmh@aybabtu.com>
3990 Factorize elf32 / elf64 code in Multiboot loader. This will
3991 prevent it from getting out of sync again.
3993 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3994 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3995 grub_multiboot_load_elf64): Move from here ...
3996 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3997 grub_multiboot_load_elf): ... to here (new file).
3999 2009-02-27 Robert Millan <rmh@aybabtu.com>
4001 * util/grub.d/10_linux.in: Rename "single-user mode" to
4004 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4006 Don't leak in SCSI code.
4007 * disk/scsi.c (grub_scsi_close): free `scsi'.
4009 2009-02-27 Robert Millan <rmh@aybabtu.com>
4011 * loader/i386/pc/multiboot.c: Move from here ...
4012 * loader/i386/multiboot.c: ... to here. Update all users.
4014 2009-02-27 Robert Millan <rmh@aybabtu.com>
4016 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4017 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4019 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
4021 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4024 2009-02-27 Robert Millan <rmh@aybabtu.com>
4026 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4027 `0x' qualifier as 0 when base is specified as parameter).
4029 2009-02-24 Bean <bean123ch@gmail.com>
4031 * configure.ac: Check for -mcmodel=large in x86_64 target.
4033 * include/grub/efi/api.h (efi_call_10): New macro.
4034 (efi_wrap_10): New function.
4036 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4037 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4038 (GRUB_PE32_REL_BASED_LOW): Likewise.
4039 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4040 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4041 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4042 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4043 (GRUB_PE32_REL_BASED_REL): Likewise.
4044 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4045 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4046 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4048 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4051 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4052 (efi_wrap_10): New function.
4054 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4056 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4057 MB/MBP model (NV chipset).
4058 (devdata_devs): Add devpath_5 to the list.
4060 * load/i386/efi/linux.c (video_base): Remove variable.
4061 (RGB_MASK): New macro.
4062 (RGB_MAGIC): Likewise.
4063 (LINE_MIN): Likewise.
4064 (LINE_MAX): Likewise.
4065 (FBTEST_STEP): Likewise.
4066 (FBTEST_COUNT): Likewise.
4067 (fb_list): New variable.
4068 (grub_find_video_card): Remove function.
4069 (find_framebuf): New function.
4070 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4073 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4076 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4078 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4080 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4083 2009-02-22 Robert Millan <rmh@aybabtu.com>
4085 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4086 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4087 in our relocation, instead of using it directly from heap. Also
4088 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4090 2009-02-21 Robert Millan <rmh@aybabtu.com>
4092 Implement USB keyboard support (based on patch by Marco Gerards)
4094 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4095 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4096 (usb_keyboard_mod_LDFLAGS): New variables.
4098 * term/usb_keyboard.c: New file.
4100 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4102 Corrected wrong declaration
4104 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4106 2009-02-14 Christian Franke <franke@computer.org>
4108 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4109 (grub_lspci_iter): Print class code and programming interface byte.
4111 2009-02-14 Christian Franke <franke@computer.org>
4113 * gendistlist.sh: Ignore `.svn' directories.
4115 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4117 * fs/fat.c: Add 2009 to Copyright line.
4119 2009-02-14 Christian Franke <franke@computer.org>
4121 * commands/hdparm.c: New file. Provides `hdparm' command
4122 which sends ATA commands via grub_disk_ata_pass_through ().
4124 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4126 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4127 and <grub/cpu/io.h> to include/grub/ata.h.
4128 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4129 (GRUB_CDROM_SECTOR_SIZE): Remove.
4130 (GRUB_ATA_*): Move to include/grub/ata.h.
4131 (GRUB_ATAPI_*): Likewise.
4132 (enum grub_ata_commands): Likewise.
4133 (enum grub_ata_timeout_milliseconds): Likewise.
4134 (struct grub_ata_device): Likewise.
4135 (grub_ata_regset): Likewise.
4136 (grub_ata_regget): Likewise.
4137 (grub_ata_regset2): Likewise.
4138 (grub_ata_regget2): Likewise.
4139 (grub_ata_check_ready): Likewise.
4140 (grub_ata_wait_not_busy): Remove static, exported in
4142 (grub_ata_wait_drq): Likewise.
4143 (grub_ata_pio_read): Likewise.
4145 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4146 function for hdparm.mod.
4148 * include/grub/ata.h: New file, contains declarations from
4150 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4152 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4153 (grub_disk_ata_pass_through): New exported variable.
4155 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4157 2009-02-13 Colin D Bennett <colin@gibibit.com>
4159 Support multiple fallback entries, and provide an API to support
4160 executing default+fallback menu entries. Renamed the `terminal' menu
4163 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4164 variable declaration.
4165 (grub_menu_execute_callback): New structure declaration.
4166 (grub_menu_execute_callback_t): New typedef.
4167 (grub_menu_execute_with_fallback): New function declaration.
4168 (grub_menu_get_entry): Likewise.
4169 (grub_menu_get_timeout): Likewise.
4170 (grub_menu_set_timeout): Likewise.
4172 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4174 * normal/menu.c (grub_wait_after_message): Moved to
4175 `normal/menu_text.c'.
4176 (draw_border): Likewise.
4177 (print_message): Likewise.
4178 (print_entry): Likewise.
4179 (print_entries): Likewise.
4180 (grub_menu_init_page): Likewise.
4181 (get_entry_number): Likewise.
4182 (print_timeout): Likewise.
4183 (run_menu): Likewise.
4184 (grub_menu_execute_entry): Likewise.
4185 (show_text_menu): Likewise.
4186 (get_and_remove_first_entry_number): New function.
4187 (grub_menu_execute_with_fallback): Likewise.
4188 (get_entry): Renamed to ...
4189 (grub_menu_get_entry): .. this and made it global.
4190 (get_timeout): Renamed to ...
4191 (grub_menu_get_timeout): ... this and made it global.
4192 (set_timeout): Renamed to ...
4193 (grub_menu_set_timeout): ... this and made it global.
4194 (grub_normal_terminal_menu_viewer): Renamed to ...
4195 (grub_normal_text_menu_viewer): ... this.
4197 * normal/menu_text.c: New file. Extracted text-menu-specific code
4200 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4201 (normal_mod_SOURCES): Likewise.
4203 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4204 (normal_mod_SOURCES): Likewise.
4206 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4207 (normal_mod_SOURCES): Likewise.
4209 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4210 (normal_mod_SOURCES): Likewise.
4212 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4213 (normal_mod_SOURCES): Likewise.
4215 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4216 (normal_mod_SOURCES): Likewise.
4218 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4219 (normal_mod_SOURCES): Likewise.
4221 2009-02-11 Robert Millan <rmh@aybabtu.com>
4223 * util/grub.d/00_header.in: Update old reference to `font' command.
4225 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4227 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4229 Based on patch from Javier MartÃn.
4231 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4233 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4234 to avoid false positives with FAT.
4235 (grub_fstest_SOURCES): Likewise.
4236 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4237 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4238 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4239 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4240 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4241 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4243 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4245 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4246 bpb.version_specific.fat12_or_fat16.fstype and
4247 bpb.version_specific.fat32.fstype.
4249 2009-02-08 Robert Millan <rmh@aybabtu.com>
4251 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4253 2009-02-08 Robert Millan <rmh@aybabtu.com>
4255 * Makefile.in (host_os, host_cpu): New variables.
4256 (target_os): Remove. Update all users.
4258 2009-02-08 Marco Gerards <marco@gnu.org>
4260 * Makefile.in (enable_grub_emu_usb): New variable.
4261 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4262 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4263 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4264 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4265 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4266 `usbtest.mod' and `usbms.mod'.
4267 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4268 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4269 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4270 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4271 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4274 * disk/usbms.c: New file.
4276 * include/grub/usb.h: Likewise.
4278 * include/grub/usbtrans.h: Likewise.
4280 * include/grub/usbdesc.h: Likewise.
4282 * bus/usb/usbtrans.c: Likewise.
4284 * bus/usb/ohci.c: Likewise.
4286 * bus/usb/uhci.c: Likewise.
4288 * bus/usb/usbhub.c: Likewise.
4290 * bus/usb/usb.c: Likewise.
4292 * commands/usbtest.c: Likewise.
4294 * util/usb.c: Likewise.
4296 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4298 * configure.ac: Test for libusb presence.
4300 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4302 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4304 * kern/mm.c: Add more comments.
4306 2009-02-08 Robert Millan <rmh@aybabtu.com>
4308 Patch from Javier MartÃn.
4309 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4310 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4312 2009-02-08 Robert Millan <rmh@aybabtu.com>
4314 * fs/cpio.c: Split tar functionality to ...
4315 * fs/tar.c: ... here (new file). Update all users.
4317 2009-02-07 Robert Millan <rmh@aybabtu.com>
4319 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4320 backward-incompatible features.
4322 Based on patch from Javier MartÃn, with some adjustments.
4324 2009-02-07 Michael Scherer <misc@mandriva.org>
4326 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4328 2009-02-07 Robert Millan <rmh@aybabtu.com>
4330 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4331 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4332 after the RAID stuff.
4334 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4336 Fixes problem when running vbetest command as reported by
4337 Vladimir Serbinenko <phcoder@gmail.com>.
4339 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4341 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4343 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4344 /dev/md/NpN style mdraid devices.
4346 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4348 * util/unifont2pff.rb: Remove.
4350 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4352 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4355 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4357 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4358 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4359 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4360 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4361 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4362 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4363 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4365 2009-02-02 Christian Franke <franke@computer.org>
4367 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4369 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4371 * INSTALL: Note that we now require at least autoconf 2.59 and
4372 that LZO is optional.
4374 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4376 Base on patch on bug #24154 created by Tomas Tintera
4379 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4381 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4383 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4384 <bero@arklinux.org>.
4386 * normal/parser.y (script_init): Add missing semicolon.
4388 2009-01-31 Colin D Bennett <colin@gibibit.com>
4390 * normal/main.c: Add include to grub/menu_viewer.h.
4391 (free_menu_entry_classes): Added.
4392 (grub_normal_menu_addentry): Added class property handling.
4393 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4394 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4396 * normal/menu_viewer.c: New file.
4398 * normal/menu.c (run_menu_entry): Renamed to ...
4399 (grub_menu_execute_entry): ... this and made it as global.
4400 (grub_menu_run): Renamed to ...
4401 (show_text_menu): ... this and made it local.
4402 (show_text_menu): Adapt to new function names.
4403 (grub_normal_terminal_menu_viewer): New global variable.
4405 * include/grub/menu.h: New file.
4407 * include/grub/menu_viewer.h: New file.
4409 * include/grub/normal.h: Added include to grub/menu.h.
4410 (grub_menu_entry): Moved to include/grub/menu.h.
4411 (grub_menu_entry_t): Likewise.
4412 (grub_menu): Likewise.
4413 (grub_menu_t): Likewise.
4414 (grub_normal_terminal_menu_viewer): Added.
4415 (grub_menu_execute_entry): Likewise.
4416 (grub_menu_run): Removed.
4418 * DISTLIST: Added include/grub/menu.h.
4419 Added include/grub/menu_viewer.h.
4420 Added normal/menu_viewer.c.
4422 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4424 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4425 arglist for menutitle arguments.
4427 * normal/main.c (grub_normal_menu_addentry): Likewise.
4429 * normal/parser.y (menuentry): Likewise.
4431 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4433 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4434 (grub_script_create_cmdmenu): Likewise.
4436 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4438 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4441 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4443 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4445 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4447 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4449 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4451 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4453 2009-01-30 Christian Franke <franke@computer.org>
4455 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4456 in option help text.
4458 2009-01-27 Pavel Roskin <proski@gnu.org>
4460 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4462 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4464 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4466 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4468 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4469 unregister function.
4471 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4473 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4475 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4477 * util/grub-mkfont.c (usage): Fix typo.
4479 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4481 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4483 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4485 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4487 * kern/misc.c (grub_strcasecmp): New function.
4488 (grub_strcasecmp): Use grub_size_t instead of int for length.
4490 * include/grub/misc.h: Update function prototypes.
4492 2009-01-26 Robert Millan <rmh@aybabtu.com>
4494 * configure.ac: Fix cross-compilation check.
4496 2009-01-22 Christian Franke <franke@computer.org>
4498 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4499 (precision) digit string. Allow `.format2' without `format1' (width).
4500 Limit input chars for `%s' output to `format2' if specified. This is
4501 compatible with standard printf ().
4503 2009-01-22 Christian Franke <franke@computer.org>
4505 * disk/ata.c (grub_ata_wait_status): Replace by ...
4506 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4507 other status bits may be invalid while BSY is asserted.
4508 (grub_ata_check_ready): New function.
4509 (grub_ata_cmd): Removed.
4510 (grub_ata_wait_drq): New function.
4511 (grub_ata_strncpy): Remove inline.
4512 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4513 and error check now done by grub_ata_wait_drq ().
4514 (grub_ata_pio_write): Likewise.
4515 (grub_atapi_identify): Set DEV before check for !BSY. Use
4516 grub_ata_wait_drq () to wait for data.
4517 (grub_ata_device_initialize): Add status register check to
4518 detect missing SATA slave devices. Add debug messages.
4519 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4520 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4521 transfer loop by grub_ata_pio_write ().
4522 (grub_ata_identify): Set DEV before check for !BSY. Use
4523 grub_ata_wait_drq () to wait for data.
4524 (grub_ata_setaddress): Set DEV before check for !BSY.
4525 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4526 read/write in one loop. Fix invalid command on write. Fix incomplete
4527 command on (size % batch) == 0. Add missing error check after write of
4528 last block. Add debug messages.
4529 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4531 2009-01-19 Christian Franke <franke@computer.org>
4533 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4534 (GRUB_ATAPI_IREASON_*): Likewise.
4535 (grub_ata_pio_write): Fix timeout error return.
4536 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4537 (grub_atapi_wait_drq): New function.
4538 (grub_atapi_packet): New parameter `size'.
4539 Use grub_atapi_wait_drq () and direct write instead of
4540 grub_ata_pio_write ().
4541 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4542 reads the number of bytes requested by the device for each DRQ
4544 (grub_atapi_write): Remove old implementation, return not
4545 implemented instead.
4547 2009-01-19 Christian Franke <franke@computer.org>
4549 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4550 of 512 to calculate data size.
4551 (grub_scsi_read12): Likewise.
4552 (grub_scsi_write10): Likewise.
4553 (grub_scsi_write12): Likewise.
4554 (grub_scsi_read): Adjust size according to blocksize.
4555 Add checks for invalid blocksize and unaligned transfer.
4557 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4559 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4561 * term/gfxterm.c (write_char): Fix background rendering for wide
4564 2009-01-19 Robert Millan <rmh@aybabtu.com>
4566 * config.guess: Update to latest version from config git.
4567 * config.sub: Likewise.
4569 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4571 * Makefile.in: Change font compilation to use new grub-mkfont instead
4574 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4575 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4576 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4577 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4578 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4579 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4580 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4581 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4582 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4584 2009-01-16 Christian Franke <franke@computer.org>
4586 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4587 (enum grub_ata_timeout_milliseconds): New enum.
4588 (grub_ata_wait_status): Add parameter milliseconds.
4589 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4590 recovery from timed-out commands.
4591 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4592 return grub_errno instead of REG_ERROR.
4593 (grub_ata_pio_write): Add parameter milliseconds.
4594 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4595 Pass milliseconds to grub_ata_wait_status () and
4596 grub_ata_pio_read ().
4597 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4598 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4599 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4600 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4601 It is not suitable for device detection, because DEV bit is ignored,
4602 the command may run too long, and not all devices set the signature
4604 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4605 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4606 Fix device selection, DEV bit must be set first to address the registers
4607 of the correct device.
4608 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4609 grub_ata_pio_read/write ().
4610 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4611 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4613 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4615 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4617 2009-01-13 Bean <bean123ch@gmail.com>
4619 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4621 2009-01-13 Bean <bean123ch@gmail.com>
4623 * Makefile.in: (enable_grub_mkfont): New variable.
4624 (freetype_cflags): Likewise.
4625 (freetype_libs): Likewise.
4627 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4628 (grub_mkfont_SOURCES): New variable.
4629 (grub_mkfont_CFLAGS): Likewise.
4630 (grub_mkfont_LDFLAGS): Likewise.
4632 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4633 library if `--enable-grub-mkfont' is requested.
4634 (enable_grub_mkfont): New variable.
4635 (freetype_cflags): Likewise.
4636 (freetype_libs): Likewise.
4638 * util/grub-mkfont.c: New file.
4640 2009-01-12 Christian Franke <franke@computer.org>
4642 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4643 mode check. Fix setting of compat_use[].
4645 2009-01-10 Robert Millan <rmh@aybabtu.com>
4647 Update a few copyright years which we forgot to do in 2008 (only for
4648 files whose changes made in 2008 were copyright-significant)
4650 * Makefile.in: Add 2008 to Copyright line.
4651 * disk/ieee1275/ofdisk.c: Likewise.
4652 * disk/efi/efidisk.c: Likewise.
4653 * kern/dl.c: Likewise.
4654 * kern/sparc64/ieee1275/init.c: Likewise.
4655 * kern/mm.c: Likewise.
4656 * kern/efi/mm.c: Likewise.
4657 * boot/i386/pc/boot.S: Likewise.
4658 * genfslist.sh: Likewise.
4659 * fs/iso9660.c: Likewise.
4660 * fs/hfs.c: Likewise.
4661 * fs/jfs.c: Likewise.
4662 * fs/minix.c: Likewise.
4663 * fs/ufs.c: Likewise.
4664 * gensymlist.sh.in: Likewise.
4665 * genkernsyms.sh.in: Likewise.
4666 * include/grub/misc.h: Likewise.
4667 * include/grub/types.h: Likewise.
4668 * include/grub/symbol.h: Likewise.
4669 * include/grub/elf.h: Likewise.
4670 * include/grub/kernel.h: Likewise.
4671 * include/grub/disk.h: Likewise.
4672 * include/grub/dl.h: Likewise.
4673 * include/grub/i386/linux.h: Likewise.
4674 * include/grub/i386/pc/biosdisk.h: Likewise.
4675 * include/grub/efi/api.h: Likewise.
4676 * include/grub/efi/pe32.h: Likewise.
4677 * include/grub/util/misc.h: Likewise.
4678 * normal/execute.c: Likewise.
4679 * normal/arg.c: Likewise.
4680 * normal/completion.c: Likewise.
4681 * normal/lexer.c: Likewise.
4682 * normal/parser.y: Likewise.
4683 * normal/misc.c: Likewise.
4684 * commands/i386/pc/vbeinfo.c: Likewise.
4685 * commands/hexdump.c: Likewise.
4686 * commands/terminal.c: Likewise.
4687 * commands/ls.c: Likewise.
4688 * commands/help.c: Likewise.
4689 * partmap/pc.c: Likewise.
4690 * loader/efi/chainloader.c: Likewise.
4691 * loader/multiboot_loader.c: Likewise.
4692 * loader/i386/pc/multiboot2.c: Likewise.
4693 * term/efi/console.c: Likewise.
4694 * term/i386/pc/serial.c: Likewise.
4695 * util/lvm.c: Likewise.
4696 * util/console.c: Likewise.
4697 * util/i386/efi/grub-mkimage.c: Likewise.
4698 * util/raid.c: Likewise.
4700 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4702 * commands/videotest.c: Removed include to grub/machine/memory.h.
4704 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4705 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4706 (video_mod_SOURCES): Removed.
4707 (video_mod_CFLAGS): Likewise.
4708 (video_mod_LDFLAGS): Likewise.
4709 (gfxterm_mod_SOURCES): Likewise.
4710 (gfxterm_mod_CFLAGS): Likewise.
4711 (gfxterm_mod_LDFLAGS): Likewise.
4712 (videotest_mod_SOURCES): Likewise.
4713 (videotest_mod_CFLAGS): Likewise.
4714 (videotest_mod_LDFLAGS): Likewise.
4715 (bitmap_mod_SOURCES): Likewise.
4716 (bitmap_mod_CFLAGS): Likewise.
4717 (bitmap_mod_LDFLAGS): Likewise.
4718 (tga_mod_SOURCES): Likewise.
4719 (tga_mod_CFLAGS): Likewise.
4720 (tga_mod_LDFLAGS): Likewise.
4721 (jpeg_mod_SOURCES): Likewise.
4722 (jpeg_mod_CFLAGS): Likewise.
4723 (jpeg_mod_LDFLAGS): Likewise.
4724 (png_mod_SOURCES): Likewise.
4725 (png_mod_CFLAGS): Likewise.
4726 (png_mod_LDFLAGS): Likewise.
4728 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4729 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4730 (video_mod_SOURCES): Added.
4731 (video_mod_CFLAGS): Likewise.
4732 (video_mod_LDFLAGS): Likewise.
4733 (videotest_mod_SOURCES): Likewise.
4734 (videotest_mod_CFLAGS): Likewise.
4735 (videotest_mod_LDFLAGS): Likewise.
4736 (bitmap_mod_SOURCES): Likewise.
4737 (bitmap_mod_CFLAGS): Likewise.
4738 (bitmap_mod_LDFLAGS): Likewise.
4739 (tga_mod_SOURCES): Likewise.
4740 (tga_mod_CFLAGS): Likewise.
4741 (tga_mod_LDFLAGS): Likewise.
4742 (jpeg_mod_SOURCES): Likewise.
4743 (jpeg_mod_CFLAGS): Likewise.
4744 (jpeg_mod_LDFLAGS): Likewise.
4745 (png_mod_SOURCES): Likewise.
4746 (png_mod_CFLAGS): Likewise.
4747 (png_mod_LDFLAGS): Likewise.
4748 (gfxterm_mod_SOURCES): Likewise.
4749 (gfxterm_mod_CFLAGS): Likewise.
4750 (gfxterm_mod_LDFLAGS): Likewise.
4752 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4753 grub/machine/console.h.
4755 2009-01-04 Jerone Young <jerone@gmail.com>
4757 Make on screen instructions clearer
4759 Based on patch created by Jidanni <jidanni@jidanni.org>
4761 * normal/menu.c: print clearer instructions on the screen
4763 2009-01-02 Colin D Bennett <colin@gibibit.com>
4767 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4768 build system and fixed gfxterm.c to work with different sized fonts.
4770 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4772 * configure: Re-generated.
4774 * DISTLIST: Removed font/manager.c.
4776 Added font/font_cmd.c.
4778 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4781 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4783 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4785 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4787 * normal/menu.c: Likewise.
4789 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4790 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4792 * include/grub/font.h: Replaced with new file.
4794 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4795 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4796 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4797 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4798 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4799 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4800 fg_red, fg_green, fg_blue, fg_alpha.
4801 (grub_video_adapter): Removed blit_glyph.
4802 (grub_video_blit_glyph): Removed.
4804 * font/manager.c: Removed file.
4806 * font/font.c: New file.
4808 * font/font_cmd.c: Likewise.
4810 * video/video.c (grub_video_blit_glyph): Removed.
4812 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4813 (grub_video_vbe_map_rgba): Likewise.
4814 (grub_video_vbe_unmap_color_int): Likewise.
4815 (grub_video_vbe_blit_glyph): Removed.
4816 (grub_video_vbe_adapter): Removed blit_glyph.
4818 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4819 (get_pixel): Likewise.
4820 (set_pixel): Likewise.
4822 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4824 * term/gfxterm.c: Adapted to new font engine.
4826 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4828 * term/i386/pc/vga.c: Likewise.
4830 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4832 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4834 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4836 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4838 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4840 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4842 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4844 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4846 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4848 * util/grub.d/00_header.in: Changed to use new loadfont command.
4850 * util/grub-mkconfig_lib.in: Changed font extension.
4852 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4854 * util/getroot.c (grub_util_get_grub_dev): Add support for
4855 /dev/md/dNNpNN style partitionable mdraid devices.
4857 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4859 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4860 at a time limit of the PXE TFTP API correctly.
4861 (grub_pxefs_close): Likewise.
4863 2008-11-29 Robert Millan <rmh@aybabtu.com>
4865 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4866 grub_ata_device_initialize() calls.
4868 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4870 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4872 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4874 2008-11-28 Robert Millan <rmh@aybabtu.com>
4876 Fix build on powerpc-ieee1275. Based on patch created by
4877 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4878 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4879 `kern/ieee1275/mmap.c'.
4880 * include/grub/powerpc/ieee1275/memory.h: New file.
4882 Provide grub-install on coreboot.
4883 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4884 (grub_install_SOURCES): New variable.
4885 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4888 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4890 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4891 to `grub_term_input_t'.
4892 (grub_term_get_current_output): Change return type to
4893 `grub_term_output_t'.
4895 2008-11-22 Robert Millan <rmh@aybabtu.com>
4897 Fix breakage on coreboot due to declaration mismatch.
4898 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4899 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4900 grub_vga_text_cls().
4902 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4903 comments. Avoid copying one more byte than necessary (just in case).
4905 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4906 to 0x200000 (avoids trouble with some OFW implementations, and matches
4907 with the one in Yaboot).
4908 Reported by Manoel Abranches
4910 2008-11-20 Robert Millan <rmh@aybabtu.com>
4912 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4913 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4915 * util/grub-mkconfig_lib.in (grub_warn): New function.
4916 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4917 warnings, to obtain consistent formatting.
4918 * util/grub.d/00_header.in: Likewise.
4919 * util/update-grub_lib.in: Likewise.
4921 * loader/i386/linux.c (allocate_pages): Fix a warning.
4922 Move comment text to `#error' stanza.
4924 Harmonize ieee1275's grub_available_iterate() with the generic
4925 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4926 build problem on i386-ieee1275):
4927 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4928 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4929 parameter `type'. Update all users of this function.
4930 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4931 `kern/ieee1275/mmap.c'.
4932 * kern/ieee1275/init.c
4933 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4935 (grub_machine_mmap_iterate): ... this.
4936 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4937 return type to `grub_err_t'. Update all implementations of this
4939 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4942 Add `lsmmap' command (lists firmware-provided memory map):
4943 * commands/lsmmap.c: New file.
4944 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4945 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4947 * conf/powerpc-ieee1275.rmk: Likewise.
4948 * conf/i386-coreboot.rmk: Likewise.
4949 * conf/i386-ieee1275.rmk: Likewise.
4951 2008-11-19 Robert Millan <rmh@aybabtu.com>
4953 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4954 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4955 constraints to initrd allocation (based on code from
4956 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4957 for Linux to find it.
4959 2008-11-14 Robert Millan <rmh@aybabtu.com>
4961 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4962 order to cope with duplicate slashes.
4964 2008-11-14 Robert Millan <rmh@aybabtu.com>
4966 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4967 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4968 don't want to mess with lower memory, because it is used in the Linux
4971 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4972 an appropriate place in lower memory, between 0x10000 and 0x90000,
4973 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4974 is in our heap (probably as a result of it being corrupted during
4975 decompression). Add #error instance with comment to explain why this
4976 loader isn't currently usable on PC/BIOS.
4978 2008-11-14 Robert Millan <rmh@aybabtu.com>
4980 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4981 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4983 2008-11-12 Robert Millan <rmh@aybabtu.com>
4985 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4987 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4988 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4990 * include/grub/i386/pc/memory.h: ... to here.
4992 2008-11-12 Robert Millan <rmh@aybabtu.com>
4994 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4997 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4998 (grub_console_cur_color, grub_console_real_putchar)
4999 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5000 (grub_console_setcolorstate, grub_console_setcolor)
5001 (grub_console_getcolor): Move from here ...
5002 * include/grub/i386/vga_common.h: ... to here (new file).
5004 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5005 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5007 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5008 `<grub/i386/vga_common.h>'.
5010 2008-11-12 Robert Millan <rmh@aybabtu.com>
5012 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5013 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5014 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5016 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5017 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5019 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5020 grub_console_init() with call to grub_vga_text_init().
5021 (grub_machine_fini): Replace call to
5022 grub_console_fini() with call to grub_vga_text_fini() and
5023 grub_at_keyboard_fini().
5025 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5026 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5027 (grub_console_setcolorstate, grub_console_setcolor)
5028 (grub_console_getcolor): New function prototypes.
5030 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5031 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5032 (grub_vga_text_setcursor): Static-ize.
5033 (grub_vga_text_term): New structure.
5034 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5036 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5037 (grub_console_cur_color, grub_console_standard_color)
5038 (grub_console_normal_color, grub_console_highlight_color)
5039 (map_char, grub_console_putchar, grub_console_getcharwidth)
5040 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5041 (grub_console_getcolor): Move from here ...
5042 * term/i386/vga_common.c: ... to here (same function names).
5044 2008-11-12 Robert Millan <rmh@aybabtu.com>
5046 Use newly-added Multiboot support in coreboot.
5048 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5049 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5051 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5052 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5053 (codestart): Store the MBI in `startup_multiboot_info' when we're
5054 being loaded using Multiboot.
5056 * kern/i386/coreboot/init.c (grub_machine_init): Move
5057 grub_at_keyboard_init() call to beginning of function (useful for
5058 debugging). Call grub_machine_mmap_init() before attempting to use
5059 grub_machine_mmap_iterate().
5060 (grub_lower_mem, grub_upper_mem): Move from here ...
5061 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5064 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5067 2008-11-12 Robert Millan <rmh@aybabtu.com>
5069 Fix a regression introduced by the at_keyboard.mod split. Because
5070 some terminals are default on some platforms and non-default on
5071 others, the first terminal being registered determines which is
5072 going to be default.
5074 * kern/term.c (grub_term_register_input): If this is the first
5075 terminal being registered, set it as the current one.
5076 (grub_term_register_output): Likewise.
5078 * term/efi/console.c (grub_console_init): Do not call
5079 grub_term_set_current_output() or grub_term_set_current_input().
5080 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5081 * term/i386/pc/console.c (grub_console_init): Likewise.
5082 (grub_console_fini): Do not call grub_term_set_current_input()
5083 (but leave grub_term_set_current_output() to restore text mode).
5085 2008-11-10 Robert Millan <rmh@aybabtu.com>
5087 * util/grub.d/00_header.in: Add backward compatibility check for
5088 versions of terminal.mod that don't understand `terminal_input' or
5091 2008-11-09 Robert Millan <rmh@aybabtu.com>
5093 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5094 `terminal_input' / `terminal_output', not `terminal'.
5096 2008-11-08 Robert Millan <rmh@aybabtu.com>
5098 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5099 (DISTCLEANFILES): Add `build_env.mk'.
5101 2008-11-08 Robert Millan <rmh@aybabtu.com>
5103 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5104 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5105 members. Update all users.
5106 * util/console.c (grub_ncurses_term): Split in ...
5107 (grub_ncurses_term_input): ... this, and ...
5108 (grub_ncurses_term_output): ... this. Update all users.
5109 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5111 2008-11-08 Robert Millan <rmh@aybabtu.com>
5113 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5114 (PKGDATA): Add $(pkgdata_SRCDIR).
5115 (pkglib_BUILDDIR): New variable.
5116 (pkgdata_SRCDIR): New variable.
5117 (build_env.mk): New target.
5118 (include_DATA): New variable.
5119 (install-local): Install $(include_DATA) files in $(includedir).
5121 2008-11-07 Pavel Roskin <proski@gnu.org>
5123 * gendistlist.sh: Use C locale for sorting to ensure consistent
5124 output on all systems.
5126 * util/grub.d/00_header.in: Remove incorrect space before
5129 2008-11-07 Robert Millan <rmh@aybabtu.com>
5131 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5133 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5134 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5135 (based on find_multi_boot1_header).
5136 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5137 using find_multi_boot2_header(), and abort if neither Multiboot or
5138 Multiboot headers were found.
5140 2008-11-07 Robert Millan <rmh@aybabtu.com>
5142 Modularize at_keyboard.mod:
5144 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5145 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5146 (at_keyboard_mod_LDFLAGS): New variables.
5148 Actual terminal split:
5150 * include/grub/term.h (struct grub_term): Split in ...
5151 (struct grub_term_input): ... this, and ...
5152 (struct grub_term_output): ... this. Update all users.
5153 (grub_term_set_current): Split in ...
5154 (grub_term_set_current_input): ... this, and ...
5155 (grub_term_set_current_output): ... this.
5156 (grub_term_get_current): Split in ...
5157 (grub_term_get_current_input): ... this, and ...
5158 (grub_term_get_current_output): ... this.
5159 (grub_term_register): Split in ...
5160 (grub_term_register_input): ... this, and ...
5161 (grub_term_register_output): ... this.
5162 (grub_term_unregister): Split in ...
5163 (grub_term_unregister_input): ... this, and ...
5164 (grub_term_unregister_output): ... this.
5165 (grub_term_iterate): Split in ...
5166 (grub_term_iterate_input): ... this, and ...
5167 (grub_term_iterate_output): ... this.
5169 * kern/term.c (grub_term_list): Split in ...
5170 (grub_term_list_input): ... this, and ...
5171 (grub_term_list_output): ... this. Update all users.
5172 (grub_cur_term): Split in ...
5173 (grub_cur_term_input): ... this, and ...
5174 (grub_cur_term_output): ... this. Update all users.
5175 (grub_term_set_current): Split in ...
5176 (grub_term_set_current_input): ... this, and ...
5177 (grub_term_set_current_output): ... this.
5178 (grub_term_get_current): Split in ...
5179 (grub_term_get_current_input): ... this, and ...
5180 (grub_term_get_current_output): ... this.
5181 (grub_term_register): Split in ...
5182 (grub_term_register_input): ... this, and ...
5183 (grub_term_register_output): ... this.
5184 (grub_term_unregister): Split in ...
5185 (grub_term_unregister_input): ... this, and ...
5186 (grub_term_unregister_output): ... this.
5187 (grub_term_iterate): Split in ...
5188 (grub_term_iterate_input): ... this, and ...
5189 (grub_term_iterate_output): ... this.
5191 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5192 a check for input and one for output (and only attempt to get keys
5193 from user when input works).
5195 * util/grub-probe.c (grub_term_get_current): Split in ...
5196 (grub_term_get_current_input): ... this, and ...
5197 (grub_term_get_current_output): ... this.
5198 * util/grub-fstest.c: Likewise.
5199 * util/i386/pc/grub-setup.c: Likewise.
5200 * util/grub-editenv.c: Likewise.
5202 Portability adjustments:
5204 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5205 `term/i386/pc/at_keyboard.c'.
5206 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5207 grub_keyboard_controller_init() (now handled by terminal .init).
5208 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5209 grub_at_keyboard_init().
5210 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5211 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5212 at_keyboard.mod via input terminal interface).
5213 * include/grub/i386/coreboot/console.h: Convert into a stub for
5214 `<grub/i386/pc/console.h>'.
5216 Migrate full terminals to new API:
5218 * term/efi/console.c (grub_console_term): Split into ...
5219 (grub_console_term_input): ... this, and ...
5220 (grub_console_term_output): ... this. Update all users.
5221 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5222 (grub_ofconsole_init): Split into ...
5223 (grub_ofconsole_init_input): ... this, and ...
5224 (grub_ofconsole_init_output): ... this.
5225 (grub_ofconsole_term): Split into ...
5226 (grub_ofconsole_term_input): ... this, and ...
5227 (grub_ofconsole_term_output): ... this. Update all users.
5228 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5229 (grub_serial_term_input): ... this, and ...
5230 (grub_serial_term_output): ... this. Update all users.
5231 * term/i386/pc/console.c (grub_console_term): Split into ...
5232 (grub_console_term_input): ... this, and ...
5233 (grub_console_term_output): ... this. Update all users.
5234 (grub_console_term_input): Only enable it on PC/BIOS platform.
5235 (grub_console_init): Remove grub_keyboard_controller_init() call.
5237 Migrate input terminals to new API:
5239 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5240 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5241 i386-specific anyway).
5242 (grub_console_checkkey): Rename to ...
5243 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5245 (grub_keyboard_controller_orig): New variable.
5246 (grub_console_getkey): Rename to ...
5247 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5249 (grub_keyboard_controller_init): Static-ize. Save original
5250 controller value so that it can be restored ...
5251 (grub_keyboard_controller_fini): ... here (new function).
5252 (grub_at_keyboard_term): New structure.
5253 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5256 Migrate output terminals to new API:
5258 * term/i386/pc/vga.c (grub_vga_term): Change type to
5259 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5260 members. Update all users.
5261 * term/gfxterm.c (grub_video_term): Change type to
5262 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5263 members. Update all users.
5264 * include/grub/i386/pc/console.h (grub_console_checkkey)
5265 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5268 Migrate `terminal' command and userland tools to new API:
5270 * commands/terminal.c (grub_cmd_terminal): Split into ...
5271 (grub_cmd_terminal_input): ... this, and ...
5272 (grub_cmd_terminal_output): ... this.
5273 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5274 `terminal_input' and `terminal_output'.
5275 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5276 `terminal_input' / `terminal_output' API.
5277 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5278 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5279 provided ${GRUB_TERMINAL}, convert it).
5281 2008-11-04 Robert Millan <rmh@aybabtu.com>
5283 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5285 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5287 2008-11-03 Bean <bean123ch@gmail.com>
5289 * kern/elf.c (grub_elf32_load): Revert to previous code.
5290 (grub_elf64_load): Likewise.
5292 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5294 2008-11-01 Robert Millan <rmh@aybabtu.com>
5296 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5297 (TARGET_CPPFLAGS): Likewise.
5298 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5300 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5302 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5304 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5306 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5307 addition of objects until the code is not going to be able to fail.
5309 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5311 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5312 (add a missing NULL check, and correct them by moving the pointer
5313 operations after the actual check).
5315 2008-10-29 Robert Millan <rmh@aybabtu.com>
5317 * util/i386/pc/grub-install.in: Handle empty string as output from
5318 make_system_path_relative_to_its_root().
5320 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5322 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5323 circular metadata worst case scenario. If the metadata is circular
5324 then copy the wrap in place.
5325 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5326 project lib/format_text/layout.h
5327 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5329 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5331 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5333 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5335 * util/update-grub_lib.in: Mention filename in warning message.
5337 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5339 * NEWS: Update for rename of update-grub to grub-mkconfig.
5341 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5343 * util/update-grub_lib.in: Copy to ...
5344 * util/grub-mkconfig_lib.in: ... this. Update all users.
5345 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5346 * util/update-grub.in: Rename to ...
5347 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5348 option. Add `--output' option to allow users to specify the generated
5349 configuration file. Default to stdout.
5350 (update_grub_dir): Rename to ...
5351 (grub_mkconfig_dir): ... this.
5352 (grub_cfg): Default to an empty string.
5353 * conf/common.rmk (update-grub): Rename to ...
5354 (grub-mkconfig): ... this.
5355 (update-grub_lib): Copy to ...
5356 (grub-mkconfig_lib): ... this.
5357 (update-grub_SCRIPTS): Copy to ...
5358 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5359 (update-grub_DATA): Rename to ...
5360 (grub-mkconfig_DATA): ... this.
5362 2008-09-28 Robert Millan <rmh@aybabtu.com>
5364 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5365 to `modified'. Add the real `created' field.
5366 (grub_iso9660_uuid): Use `modified' rather than `created' for
5367 constructing the UUID.
5369 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5371 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5372 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5374 2008-09-28 Bean <bean123ch@gmail.com>
5376 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5377 Thanks to Christian Franke for finding this bug.
5379 2008-09-25 Robert Millan <rmh@aybabtu.com>
5381 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5382 instances of grub_util_get_disk_name() (see previous commit).
5384 2008-09-25 Robert Millan <rmh@aybabtu.com>
5386 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5387 `util/i386/get_disk_name.c'.
5388 * conf/i386-efi.rmk: Likewise.
5389 * conf/x86_64-efi.rmk: Likewise.
5390 * conf/i386-coreboot.rmk: Likewise.
5391 * conf/i386-ieee1275.rmk: Likewise.
5392 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5393 `util/ieee1275/get_disk_name.c'.
5394 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5395 * util/ieee1275/get_disk_name.c: Remove file.
5396 * util/i386/get_disk_name.c: Remove file.
5397 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5398 "hd%d" for device.map entries, rather than using
5399 grub_util_get_disk_name().
5401 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5403 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5405 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5407 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5409 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5411 (GRUB_TERM_PPAGE): Changed to 0x4900.
5413 2008-09-24 Robert Millan <rmh@aybabtu.com>
5415 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5416 macros (they were i386-pc specific).
5417 * include/grub/sparc64/ieee1275/console.h: Likewise.
5418 * include/grub/efi/console.h: Likewise.
5420 2008-09-22 Bean <bean123ch@gmail.com>
5422 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5423 resident and in attribute list.
5425 * include/grub/ntfs.h (BMP_LEN): Removed.
5427 2008-09-22 Bean <bean123ch@gmail.com>
5429 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5430 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5432 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5433 error occurs, as grub_disk_open will call grub_disk_close, which will
5434 call p->close (scsi).
5436 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5438 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5439 (AC_PREREQ): Bumped to 2.59.
5440 (AC_TRY_COMPILE): Replace obsolete macro with ...
5441 (AC_COMPILE_IFELSE): ... this.
5442 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5443 (AC_LINK_IFELSE): ... this.
5445 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5447 * autogen.sh: Add a call to `gendistlist.sh'.
5449 2008-09-19 Christian Franke <franke@computer.org>
5451 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5452 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5453 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5454 Export __enable_execute_stack() to modules.
5455 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5458 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5460 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5463 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5465 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5466 #include <grub/util/hostdisk.h>.
5468 2008-09-08 Robert Millan <rmh@aybabtu.com>
5470 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5471 segments when their filesz is zero (grub_file_read() interprets
5472 zero-size as "read until EOF", which results in memory corruption).
5473 Use `lowest_segment' rather than 0 for calculating the current
5474 segment load address.
5476 2008-09-08 Robert Millan <rmh@aybabtu.com>
5478 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5479 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5480 clobbered useful information.
5482 2008-09-08 Robert Millan <rmh@aybabtu.com>
5484 * include/grub/util/biosdisk.h: Move to ...
5485 * include/grub/util/hostdisk.h: ... here. Update all users.
5486 * util/biosdisk.c: Move to ...
5487 * util/hostdisk.c: ... here. Update all users.
5489 2008-09-07 Robert Millan <rmh@aybabtu.com>
5491 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5493 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5494 and length can be stored directly in the `mbi->mmap_addr' and
5495 `mbi->mmap_length' struct fields.
5497 2008-09-07 Robert Millan <rmh@aybabtu.com>
5499 * conf/i386.rmk: New file. Provides declaration for building
5501 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5502 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5504 Include `conf/i386.mk'.
5505 * conf/i386-efi.rmk: Likewise.
5506 * conf/x86_64-efi.rmk: Likewise.
5507 * conf/i386-coreboot.rmk: Likewise.
5508 * conf/i386-ieee1275.rmk: Likewise.
5510 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5512 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5513 Adds optimization support for BGR based modes.
5515 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5516 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5517 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5518 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5519 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5520 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5521 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5522 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5523 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5524 (grub_video_i386_vbeblit_index_index): Likewise.
5525 (grub_video_i386_vbeblit_replace_directN): Added.
5526 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5527 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5528 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5529 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5530 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5531 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5532 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5533 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5534 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5535 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5536 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5537 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5538 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5540 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5541 (grub_video_i386_vbefill_R8G8B8): Likewise.
5542 (grub_video_i386_vbefill_index): Likewise.
5543 (grub_video_i386_vbefill_direct32): Added.
5544 (grub_video_i386_vbefill_direct24): Likewise.
5545 (grub_video_i386_vbefill_direct16): Likewise.
5546 (grub_video_i386_vbefill_direct8): Likewise.
5548 * include/grub/video.h (grub_video_blit_format): Removed
5549 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5550 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5551 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5552 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5553 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5555 * video/video.c (grub_video_get_blit_format): Updated to use new
5556 blit formats. Added handling for 16 bit color modes.
5558 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5560 (common_blitter): Updated to use new blitters.
5562 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5564 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5565 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5566 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5567 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5568 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5569 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5570 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5571 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5572 (grub_video_i386_vbeblit_index_index): Likewise.
5573 (grub_video_i386_vbeblit_replace_directN): Added.
5574 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5575 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5576 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5577 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5578 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5579 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5580 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5581 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5582 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5583 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5584 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5585 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5586 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5588 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5589 (grub_video_i386_vbefill_R8G8B8): Likewise.
5590 (grub_video_i386_vbefill_index): Likewise.
5591 (grub_video_i386_vbefill_direct32): Added.
5592 (grub_video_i386_vbefill_direct24): Likewise.
5593 (grub_video_i386_vbefill_direct16): Likewise.
5594 (grub_video_i386_vbefill_direct8): Likewise.
5596 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5599 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5602 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5605 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5608 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5610 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5613 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5615 * fs/iso9660.c (grub_iso9660_date): New structure.
5616 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5617 (grub_iso9660_uuid): New function.
5619 2008-09-05 Bean <bean123ch@gmail.com>
5621 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5623 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5624 insensitive bit for names in Win32 and Win32 & DOS namespace.
5626 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5628 * include/grub/types.h (LONG_MAX): Likewise.
5630 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5632 * util/getroot.c: Include <config.h>.
5633 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5634 add support for /dev/md/N devices and handle LVM double dash escaping.
5636 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5638 * config.guess: Update to latest version from config git.
5639 * config.sub: Likewise.
5641 2008-09-03 Robert Millan <rmh@aybabtu.com>
5643 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5644 `disk->total_sectors'.
5646 2008-09-01 Colin D Bennett <colin@gibibit.com>
5648 * include/grub/normal.h: Fixed incorrect comment for
5649 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5651 2008-09-01 Colin D Bennett <colin@gibibit.com>
5653 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5654 values with defines.
5656 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5657 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5658 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5659 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5660 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5661 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5662 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5663 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5664 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5665 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5666 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5667 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5668 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5669 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5670 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5671 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5672 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5673 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5674 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5676 2008-08-31 Robert Millan <rmh@aybabtu.com>
5678 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5680 (grub_multiboot): Fix a few warnings.
5682 2008-08-31 Robert Millan <rmh@aybabtu.com>
5684 * loader/i386/pc/multiboot.c: Update comment not to say that
5685 boot_device support is unimplemented.
5687 2008-08-31 Robert Millan <rmh@aybabtu.com>
5689 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5690 or memory map support are unimplemented.
5692 2008-08-31 Colin D Bennett <colin@gibibit.com>
5694 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5696 2008-08-31 Colin D Bennett <colin@gibibit.com>
5698 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5699 total video memory in 'vbeinfo' output; show color format details for
5702 2008-08-30 Pavel Roskin <proski@gnu.org>
5704 * util/genmoddep.c: Remove for real this time.
5705 * DISTLIST: Remove util/genmoddep.c.
5707 2008-08-30 Robert Millan <rmh@aybabtu.com>
5709 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5710 as required by Multiboot spec (it was already 4-byte aligned, but
5713 2008-08-29 Pavel Roskin <proski@gnu.org>
5715 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5716 * kern/powerpc/ieee1275/startup.S: ... this.
5717 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5718 * DISTLIST: Likewise.
5720 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5721 grub/cpu/kernel.h. Add start label for consistency with other
5722 platforms. Add grub_prefix immediately after start. Add jump
5723 to the code after grub_prefix.
5724 * include/grub/powerpc/kernel.h: Provide valid values for
5725 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5727 2008-08-29 Bean <bean123ch@gmail.com>
5729 * configure.ac: Change host_os to cygwin for mingw.
5730 (asprintf): New check for function.
5732 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5733 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5735 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5736 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5737 sync, sleep and grub_util_get_disk_size for mingw.
5739 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5740 to get size in mingw.
5741 (open_device): Use flag O_BINARY if it's defined.
5742 (find_root_device): Add dummy code for mingw.
5744 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5745 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5746 (get_scsi_disk_name): Return 0 for mingw.
5748 * util/hostfs.c: #include <grub/util/misc.h>.
5749 (grub_hostfs_open): Use "rb" flag to open file, use
5750 grub_util_get_disk_size to get disk size for mingw.
5752 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5753 (asprintf): New function if HAVE_ASPRINTF is not set.
5754 (sync): New function for mingw.
5756 (grub_util_get_disk_size): Likewise.
5758 2008-08-28 Pavel Roskin <proski@gnu.org>
5760 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5763 2008-08-28 Robert Millan <rmh@aybabtu.com>
5765 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5767 2008-08-28 Robert Millan <rmh@aybabtu.com>
5769 Change find_grub_drive() syntax so it doesn't prevent it from
5770 detecting NULL names as errors.
5772 * util/biosdisk.c (find_grub_drive): Move free slot search code
5774 (find_free_slot): ... to here.
5775 (read_device_map): Use find_free_slot() to search for free slots.
5777 2008-08-27 Marco Gerards <marco@gnu.org>
5779 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5780 (scsi_mod_SOURCES): New variable.
5781 (scsi_mod_CFLAGS): Likewise
5782 (scsi_mod_LDFLAGS): Likewise.
5784 * disk/scsi.c: New file.
5786 * include/grub/scsi.h: Likewise.
5788 * include/grub/scsicmd.h: Likewise.
5790 * disk/ata.c: Include <grub/scsi.h>.
5791 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5793 (grub_ata_iterate): Skip ATAPI devices.
5794 (grub_ata_open): Only handle ATAPI devices.
5795 (struct grub_atapi_read): Removed.
5796 (grub_atapi_readsector): Likewise.
5797 (grub_ata_read): No longer handle ATAPI devices.
5798 (grub_ata_write): Likewise.
5799 (grub_atapi_iterate): New function.
5800 (grub_atapi_read): Likewise.
5801 (grub_atapi_write): Likewise.
5802 (grub_atapi_open): Likewise.
5803 (grub_atapi_close): Likewise.
5804 (grub_atapi_dev): New variable.
5805 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5806 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5808 * include/grub/disk.h (enum grub_disk_dev_id): Add
5809 `GRUB_DISK_DEVICE_SCSI_ID'.
5811 2008-08-26 Robert Millan <rmh@aybabtu.com>
5813 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5814 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5817 2008-08-23 Bean <bean123ch@gmail.com>
5819 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5820 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5821 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5822 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5824 (raid5rec_mod_SOURCES): New macro.
5825 (raid5rec_mod_CFLAGS): Likewise.
5826 (raid5rec_mod_LDFLAGS): Likewise.
5827 (raid6rec_mod_SOURCES): Likewise.
5828 (raid6rec_mod_CFLAGS): Likewise.
5829 (raid6rec_mod_LDFLAGS): Likewise.
5830 (mdraid_mod_SOURCES): Likewise.
5831 (mdraid_mod_CFLAGS): Likewise.
5832 (mdraid_mod_LDFLAGS): Likewise.
5833 (dm_nv_mod_SOURCES): Likewise.
5834 (dm_nv_mod_CFLAGS): Likewise.
5835 (dm_nv_mod_LDFLAGS): Likewise.
5837 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5838 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5839 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5841 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5842 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5844 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5846 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5848 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5852 * disk/raid5_recover.c: New file.
5854 * disk/raid6_recover.c: Likewise.
5856 * disk/mdraid_linux.c: Likewise.
5858 * disk/dmraid_nvidia.c: Likewise.
5860 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5863 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5864 calculate the size of raid device.
5865 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5866 different layout of raid5.
5867 (grub_raid_scan_device): Remove code specific to mdraid.
5868 (grub_raid_list): New variable.
5869 (free_array): New function.
5870 (grub_raid_register): Likewise.
5871 (grub_raid_unregister): Likewise.
5872 (grub_raid_rescan): Likewise.
5873 (GRUB_MOD_INIT): Don't iterate device here.
5874 (GRUB_MOD_FINI): Use free_array to release resource.
5876 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5877 (grub_raid5_recover_func_t): New function variable type.
5878 (grub_raid6_recover_func_t): Likewise.
5879 (grub_raid5_recover_func): New variable.
5880 (grub_raid6_recover_func): Likewise.
5881 (grub_raid_register): New function.
5882 (grub_raid_unregister): Likewise.
5883 (grub_raid_rescan): Likewise.
5884 (grub_raid_block_xor): Likewise.
5886 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5887 (CMD_CRC): New macro.
5889 (read_file): Handle device as well as file.
5890 (cmd_crc): New function.
5891 (fstest): Handle multiple disks.
5892 (options): Remove part, raw and long, add root and diskcount.
5893 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5894 (main): Find the first non option entry and ignore subsequent options,
5895 add handling for the new options, support multiple disks.
5897 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5899 2008-08-23 Bean <bean123ch@gmail.com>
5901 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5903 * genfslist.sh: Ignore kernel.mod.
5905 * genpartmaplist.sh: Likewise.
5907 2008-08-23 Robert Millan <rmh@aybabtu.com>
5909 * util/getroot.c (find_root_device): Skip anything that starts with
5910 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5912 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5914 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5915 * util/grub.d/00_header.in: Allow the administrator to change default
5916 gfxmode via ${GRUB_GFXMODE}.
5918 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5920 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5922 2008-08-21 Robert Millan <rmh@aybabtu.com>
5924 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5926 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5927 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5929 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5931 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5932 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5934 2008-08-19 Robert Millan <rmh@aybabtu.com>
5936 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5937 (struct grub_virtual_screen): Remove `cursor_color'.
5938 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5940 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5942 2008-08-18 Robert Millan <rmh@aybabtu.com>
5944 Unify (identical) linux_normal.c files.
5945 * loader/i386/efi/linux_normal.c: Move from here ...
5946 * loader/linux_normal.c: ... to here. Update all users.
5947 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5948 * loader/i386/ieee1275/linux_normal.c: Likewise.
5950 2008-08-18 Robert Millan <rmh@aybabtu.com>
5952 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5953 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5954 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5955 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5956 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5958 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5959 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5960 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5961 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5962 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5963 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5964 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5965 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5966 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5967 portably using grub_getxy().
5968 Replace `-EFI' with `-bzImage' in boot message.
5970 2008-08-17 Robert Millan <rmh@aybabtu.com>
5972 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5974 2008-08-17 Robert Millan <rmh@aybabtu.com>
5976 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5978 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5979 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5980 (grub_machine_mmap_iterate): New function declaration.
5981 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5983 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5986 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5987 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5988 Move e820 parsing from here ...
5989 * kern/i386/pc/mmap.c: New file.
5990 (grub_machine_mmap_iterate): ... to here.
5992 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5993 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5994 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5995 (grub_available_iterate): Redeclare to return `void', and redeclare
5996 its hook to use grub_uint64_t as addr and size parameters, and rename
5998 (grub_machine_mmap_iterate): ... this. Update all users.
6000 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6001 to make it more readable. Rename to ...
6002 (grub_machine_mmap_iterate): ... this.
6004 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6005 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6006 (grub_multiboot): Allocate an extra region after the payload, and fill
6007 it with a Multiboot memory map. Adjust a.out loader to calculate size
6008 with the extra space.
6009 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6010 with the extra space.
6012 2008-08-17 Carles Pina i Estany <carles@pina.cat>
6014 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
6016 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
6018 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6019 mdate-sh to the list `find' searches for.
6020 * DISTLIST: Regenerated.
6022 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
6024 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6025 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
6026 genmoddep.awk, gensymlist.sh.in.
6027 (DISTDIRS): Add bus, docs, hook, lib.
6028 * DISTLIST: Regenerated.
6029 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
6031 2008-08-16 Robert Millan <rmh@aybabtu.com>
6033 * disk/raid.c (grub_raid_init): Handle/report errors set by
6034 grub_device_iterate().
6035 * disk/lvm.c (grub_lvm_init): Likewise.
6037 2008-08-15 Bean <bean123ch@gmail.com>
6039 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6041 (datetime_mod_SOURCES): New macro.
6042 (datetime_mod_CFLAGS): Likewise.
6043 (datetime_mod_LDFLAGS): Likewise.
6044 (date_mod_SOURCES): Likewise.
6045 (date_mod_CFLAGS): Likewise.
6046 (date_mod_LDFLAGS): Likewise.
6047 (datehook_mod_SOURCES): Likewise.
6048 (datehook_mod_CFLAGS): Likewise.
6049 (datehook_mod_LDFLAGS): Likewise.
6051 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6053 (datetime_mod_SOURCES): New macro.
6054 (datetime_mod_CFLAGS): Likewise.
6055 (datetime_mod_LDFLAGS): Likewise.
6056 (date_mod_SOURCES): Likewise.
6057 (date_mod_CFLAGS): Likewise.
6058 (date_mod_LDFLAGS): Likewise.
6059 (datehook_mod_SOURCES): Likewise.
6060 (datehook_mod_CFLAGS): Likewise.
6061 (datehook_mod_LDFLAGS): Likewise.
6063 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6065 (datetime_mod_SOURCES): New macro.
6066 (datetime_mod_CFLAGS): Likewise.
6067 (datetime_mod_LDFLAGS): Likewise.
6068 (date_mod_SOURCES): Likewise.
6069 (date_mod_CFLAGS): Likewise.
6070 (date_mod_LDFLAGS): Likewise.
6071 (datehook_mod_SOURCES): Likewise.
6072 (datehook_mod_CFLAGS): Likewise.
6073 (datehook_mod_LDFLAGS): Likewise.
6075 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6077 (datetime_mod_SOURCES): New macro.
6078 (datetime_mod_CFLAGS): Likewise.
6079 (datetime_mod_LDFLAGS): Likewise.
6080 (date_mod_SOURCES): Likewise.
6081 (date_mod_CFLAGS): Likewise.
6082 (date_mod_LDFLAGS): Likewise.
6083 (datehook_mod_SOURCES): Likewise.
6084 (datehook_mod_CFLAGS): Likewise.
6085 (datehook_mod_LDFLAGS): Likewise.
6087 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6089 (datetime_mod_SOURCES): New macro.
6090 (datetime_mod_CFLAGS): Likewise.
6091 (datetime_mod_LDFLAGS): Likewise.
6092 (date_mod_SOURCES): Likewise.
6093 (date_mod_CFLAGS): Likewise.
6094 (date_mod_LDFLAGS): Likewise.
6095 (datehook_mod_SOURCES): Likewise.
6096 (datehook_mod_CFLAGS): Likewise.
6097 (datehook_mod_LDFLAGS): Likewise.
6099 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6101 * commands/date.c: New file.
6103 * hook/datehook.c: Likewise.
6105 * include/grub/lib/datetime.h: Likewise.
6107 * include/grub/i386/cmos.h: Likewise.
6109 * lib/datetime.c: Likewise.
6111 * lib/i386/datetime.c: Likewise.
6113 * lib/efi/datetime.c: Likewise.
6115 2008-08-14 Robert Millan <rmh@aybabtu.com>
6117 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6118 (grub_mkelfimage_SOURCES): New variable.
6119 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6121 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6122 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6123 * conf/powerpc-ieee1275.rmk: Likewise.
6124 * conf/i386-ieee1275.rmk: Likewise.
6126 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6127 * kern/i386/coreboot/init.c: Likewise.
6129 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6130 with `<grub/cpu/kernel.h>'.
6131 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6133 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6134 * kern/i386/coreboot/startup.S: Likewise.
6136 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6137 (GRUB_MOD_GAP): Remove.
6138 * include/grub/powerpc/kernel.h: New file.
6139 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6140 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6141 * include/grub/i386/kernel.h: New file.
6142 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6143 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6144 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6146 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6148 Use --directory when invoking grub_mkimage.
6150 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6151 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6152 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6153 and GRUB_KERNEL_CPU_PREFIX.
6155 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6157 * include/grub/err.h (grub_err_printf): New function prototype.
6158 * util/misc.c (grub_err_printf): New function.
6159 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6161 * kern/err.c (grub_print_error): Use grub_err_printf.
6163 2008-08-13 Robert Millan <rmh@aybabtu.com>
6165 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6167 2008-08-13 Robert Millan <rmh@aybabtu.com>
6169 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6172 2008-08-12 Robert Millan <rmh@aybabtu.com>
6174 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6175 of the relocation code from here ...
6176 (grub_multiboot): ... to here.
6177 (forward_relocator, backward_relocator): Move from here ...
6178 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6179 (grub_multiboot_backward_relocator): ... to here.
6180 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6181 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6182 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6183 (grub_multiboot_forward_relocator_end)
6184 (grub_multiboot_backward_relocator)
6185 (grub_multiboot_backward_relocator_end): New variables.
6187 2008-08-12 Bean <bean123ch@gmail.com>
6189 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6191 2008-08-11 Robert Millan <rmh@aybabtu.com>
6193 * kern/i386/linuxbios/startup.S: Move from here ...
6194 * kern/i386/coreboot/startup.S: ... to here.
6196 * kern/i386/linuxbios/init.c: Move from here ...
6197 * kern/i386/coreboot/init.c: ... to here.
6199 * kern/i386/linuxbios/table.c: Move from here ...
6200 * kern/i386/coreboot/mmap.c: ... to here.
6202 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6204 2008-08-11 Robert Millan <rmh@aybabtu.com>
6206 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6207 errors. Leave it to the upper layer to handle them.
6209 2008-08-09 Christian Franke <franke@computer.org>
6211 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6212 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6213 Install `grub.d/10_windows' only on Cygwin.
6214 * configure.ac: Add subst of `target_os'.
6215 Check `target_os' also before setting TARGET_OBJ2ELF.
6216 Add `--enable-grub-pe2elf'.
6218 2008-08-08 Robert Millan <rmh@aybabtu.com>
6220 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6221 (grub_last_time): Change type to grub_uint64_t.
6222 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6223 (grub_disk_close): Likewise.
6225 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6226 (run_menu): Migrate code from to using grub_get_time_ms().
6228 * util/misc.c (grub_get_time_ms): New function.
6230 2008-08-08 Marco Gerards <marco@gnu.org>
6232 * disk/ata.c (grub_ata_regget): Change return type to
6234 (grub_ata_regget2): Likewise.
6235 (grub_ata_wait_status): New function.
6236 (grub_ata_wait_busy): Removed function, updated all users to use
6237 `grub_ata_wait_status'.
6238 (grub_ata_wait_drq): Likewise.
6239 (grub_ata_cmd): New function.
6240 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6242 (grub_ata_pio_write): Add error handling.
6243 (grub_atapi_identify): Likewise.
6244 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6246 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6247 handling. Actually use the detected registers. Reorder the
6248 detection logic such that it is easier to read.
6249 (grub_ata_pciinit): Do not assign the same ID to each controller.
6250 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6252 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6254 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6256 2008-08-08 Marco Gerards <marco@gnu.org>
6260 2008-08-07 Bean <bean123ch@gmail.com>
6262 * include/grub/x86_64/pci.h: New file.
6264 2008-08-07 Christian Franke <franke@computer.org>
6266 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6267 (TIMER2_GATE): Likewise.
6268 (grub_pit_wait): Add enable/disable of the timer2 gate
6269 bit of port 0x61. This fixes a possible infinite loop.
6271 2008-08-07 Bean <bean123ch@gmail.com>
6273 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6274 kern/i386/tsc.c and kern/i386/pit.c.
6276 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6279 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6282 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6284 2008-08-07 Bean <bean123ch@gmail.com>
6286 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6288 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6290 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6291 multiple inclusion. Add #include <grub/types.h>.
6293 2008-08-06 Christian Franke <franke@computer.org>
6295 * conf/common.rmk: Build and install `10_windows'.
6296 * util/grub.d/10_windows.in: New script.
6298 2008-08-06 Pavel Roskin <proski@gnu.org>
6300 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6302 2008-08-06 Robert Millan <rmh@aybabtu.com>
6304 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6305 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6307 2008-08-06 Bean <bean123ch@gmail.com>
6309 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6310 (grub_pxefs_fs_int): Remove dummy definition.
6311 (grub_pxefs_open): Use data->block_size to store the current block
6313 (grub_pxefs_read): Use block size stored in data->block_size. As the
6314 value of grub_pxe_blksize can be changed after the file is opened.
6316 2008-08-06 Bean <bean123ch@gmail.com>
6318 * fs/i386/pc/pxe.c (curr_file): new variable.
6319 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6320 require the dummy internal file system anymore.
6321 (grub_pxefs_read): Removed.
6322 (grub_pxefs_close): Likewise.
6323 (grub_pxefs_fs_int): Likewise.
6324 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6325 connection when we switch file.
6326 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6328 2008-08-06 Robert Millan <rmh@aybabtu.com>
6330 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6332 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6333 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6335 * kern/i386/halt.c: New file.
6336 * kern/i386/reboot.c: Likewise.
6337 * include/grub/i386/reboot.h: Likewise.
6338 * include/grub/i386/halt.h: Likewise.
6340 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6341 Include `<grub/cpu/halt.h>'.
6342 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6343 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6345 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6346 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6347 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6348 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6349 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6350 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6352 * include/grub/i386/at_keyboard.h: ... to here.
6354 2008-08-05 Robert Millan <rmh@aybabtu.com>
6356 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6357 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6358 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6359 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6360 `kern/generic/millisleep.c'.
6362 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6363 instead of grub_get_rtc().
6364 (grub_tsc_init): Initialize `tsc_boot_time'.
6366 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6367 (grub_machine_init): Use grub_tsc_init() rather than
6368 installing an RTC-based handler via grub_install_get_time_ms().
6370 * kern/i386/pit.c: New file.
6371 * include/grub/i386/pit.h: Likewise.
6373 2008-08-05 Bean <bean123ch@gmail.com>
6375 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6377 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6378 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6379 (pxe_mod_SOURCES): New macro.
6380 (pxe_mod_CFLAGS): Likewise.
6381 (pxe_mod_LDFLAGS): Likewise.
6382 (pxecmd_mod_SOURCES): Likewise.
6383 (pxecmd_mod_CFLAGS): Likewise.
6384 (pxecmd_mod_LDFLAGS): Likewise.
6386 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6387 (grub_pxe_call): Likewise.
6389 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6391 * commands/i386/pc/pxecmd.c: New file.
6393 * fs/i386/pc/pxe.c: Likewise.
6395 * include/grub/i386/pc/pxe.h: Likewise.
6397 2008-08-05 Bean <bean123ch@gmail.com>
6399 * util/console.c (grub_console_cur_color): New variable.
6400 (grub_console_standard_color): Likewise.
6401 (grub_console_normal_color): Likewise.
6402 (grub_console_highlight_color): Likewise.
6403 (color_map): Likewise.
6404 (use_color): Likewise.
6405 (NUM_COLORS): New macro.
6406 (grub_ncurses_setcolorstate): Handle color properly.
6407 (grub_ncurses_setcolor): Don't change color here, just remember the
6408 settings, color will be set in grub_ncurses_setcolorstate.
6409 (grub_ncurses_getcolor): New function.
6410 (grub_ncurses_init): Initialize color pairs.
6411 (grub_ncurses_term): New member grub_ncurses_getcolor.
6413 2008-08-05 Colin D Bennett <colin@gibibit.com>
6415 High resolution timer support. Implemented for x86 CPUs using TSC.
6416 Extracted generic grub_millisleep() so it's linked in only as needed.
6417 This requires a Pentium compatible CPU; if the RDTSC instruction is
6418 not supported, then it falls back on the generic grub_get_time_ms()
6419 implementation that uses the machine's RTC.
6421 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6422 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6423 `kern/generic/millisleep.c'.
6425 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6426 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6428 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6429 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6431 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6433 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6434 `kern/generic/millisleep.c'.
6436 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6438 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6440 * kern/generic/rtc_get_time_ms.c: New file.
6442 * kern/generic/millisleep.c: New file.
6444 * kern/misc.c: Don't include
6445 <kern/time.h> anymore.
6446 (grub_millisleep_generic): Removed.
6448 * commands/sleep.c (grub_interruptible_millisleep): Uses
6449 grub_get_time_ms() instead of grub_get_rtc().
6451 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6453 (grub_cpu_is_cpuid_supported): New inline function.
6454 (grub_cpu_is_tsc_supported): New inline function.
6455 (grub_tsc_init): New function prototype.
6456 (grub_tsc_get_time_ms): New function prototype.
6458 * kern/i386/tsc.c (grub_get_time_ms): New file.
6460 * include/grub/time.h: Include <grub/types.h.
6461 (grub_millisleep_generic): Removed.
6462 (grub_get_time_ms): New prototype.
6463 (grub_install_get_time_ms): New prototype.
6464 (grub_rtc_get_time_ms): New prototype.
6466 * kern/time.c (grub_get_time_ms): New function.
6467 (grub_install_get_time_ms): New function.
6469 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6470 <grub/time.h> anymore.
6471 (grub_millisleep): Removed.
6472 (grub_machine_init): Call grub_tsc_init.
6474 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6475 get_time_ms() implementation.
6477 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6478 (ieee1275_get_time_ms): New function.
6479 (grub_machine_init): Install get_time_ms() implementation.
6481 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6482 (grub_machine_init): Call grub_tsc_init().
6483 (grub_millisleep): Removed.
6485 * kern/ieee1275/init.c (grub_millisleep): Removed.
6486 (grub_machine_init): Install ieee1275_get_time_ms()
6488 (ieee1275_get_time_ms): New function.
6489 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6492 2008-08-05 Marco Gerards <marco@gnu.org>
6494 * disk/ata.c: Include <grub/pci.h>.
6495 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6496 (grub_ata_initialize): Rewritten.
6497 (grub_ata_device_initialize): New function.
6499 2008-08-04 Pavel Roskin <proski@gnu.org>
6501 * kern/main.c: Include grub/mm.h.
6503 2008-08-04 Robert Millan <rmh@aybabtu.com>
6505 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6506 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6507 corruption problem).
6509 2008-08-04 Robert Millan <rmh@aybabtu.com>
6511 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6512 warnings introduced in my last commit.
6514 2008-08-03 Robert Millan <rmh@aybabtu.com>
6516 Make PCI available on all i386 architectures.
6518 * include/grub/i386/pc/pci.h: Move from here ...
6519 * include/grub/i386/pci.h: ... to here.
6521 * include/grub/i386/pc/pci.h: Remove.
6522 * include/grub/i386/efi/pci.h: Remove.
6523 * include/grub/x86_64/efi/pci.h: Remove.
6525 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6528 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6529 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6530 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6532 * conf/i386-ieee1275.rmk: Likewise.
6534 2008-08-03 Robert Millan <rmh@aybabtu.com>
6536 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6537 (grub_console_setcursor): Make it possible to set cursor off.
6539 2008-08-03 Robert Millan <rmh@aybabtu.com>
6541 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6542 of modules instead of assuming which platform provides what.
6543 * util/update-grub.in: Likewise.
6545 2008-08-03 Robert Millan <rmh@aybabtu.com>
6547 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6548 instead of `grub_install_dos_part' to determine whether a drive needs
6549 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6550 because it can be overridden when loading GRUB via Multiboot).
6552 2008-08-02 Robert Millan <rmh@aybabtu.com>
6554 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6556 2008-08-02 Robert Millan <rmh@aybabtu.com>
6558 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6559 of informational grub_dprintf() calls.
6561 2008-08-02 Robert Millan <rmh@aybabtu.com>
6563 * disk/memdisk.c (memdisk_size): Don't initialize.
6564 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6566 * include/grub/i386/pc/kernel.h
6567 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6568 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6569 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6570 (grub_arch_memdisk_size): Remove.
6572 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6573 field (was only used to transfer a constant). Add `type' field to
6574 support multiple module types.
6575 (grub_module_iterate): New function.
6577 * kern/device.c (grub_device_open): Do not hide error messages
6578 when grub_disk_open() fails. Use grub_print_error() instead.
6580 * kern/i386/pc/init.c (grub_arch_modules_addr)
6581 (grub_arch_memdisk_size): Remove functions.
6582 (grub_arch_modules_addr): Return the module address in high memory
6583 (now that it isn't copied anymore).
6585 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6586 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6587 decompression routine (grub_total_module_size already includes that
6588 now). Don't copy modules back to low memory.
6590 * kern/main.c: Include `<grub/mm.h>'.
6591 (grub_load_modules): Split out (and use) ...
6592 (grub_module_iterate): ... this function, which iterates through
6593 module objects and runs a hook.
6594 Comment out grub_mm_init_region() call, as it would cause non-ELF
6595 modules to be overwritten.
6597 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6598 the memdisk image in its own region, make it part of the module list.
6599 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6600 (main): Parse --memdisk|-m option, and pass user-provided path as
6601 parameter to generate_image().
6602 (add_segments): Pass `memdisk_path' down to load_modules().
6603 (load_modules): Embed memdisk image in module section when requested.
6604 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6605 `header.type' instead of `header.offset'.
6607 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6608 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6609 (memdisk_mod_LDFLAGS): New variables.
6610 * conf/i386-coreboot.rmk: Likewise.
6611 * conf/i386-ieee1275.rmk: Likewise.
6613 2008-08-02 Robert Millan <rmh@aybabtu.com>
6615 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6616 (backward_relocator): New variables. Used to allocate and relocate
6617 the payload, respectively.
6618 (grub_multiboot_load_elf32): Load into heap instead of requested
6619 address, install the appropriate relocator code in each bound of
6620 the payload, and set the entry point such that
6621 grub_multiboot_real_boot() will jump to one of them.
6623 * kern/i386/loader.S (grub_multiboot_payload_size)
6624 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6625 (grub_multiboot_payload_entry_offset): New variables.
6626 (grub_multiboot_real_boot): Set cpu context to what the relocator
6627 expects, and jump to the relocator instead of the payload.
6629 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6630 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6631 (grub_multiboot_payload_entry_offset): Export.
6633 2008-08-01 Bean <bean123ch@gmail.com>
6635 * normal/menu_entry.c (editor_getline): Don't return the original
6636 string as result, as it will be released by lexer once it has done
6639 2008-08-01 Robert Millan <rmh@aybabtu.com>
6641 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6642 within menuentries, not before them.
6643 util/grub.d/10_hurd.in: Likewise.
6645 2008-08-01 Bean <bean123ch@gmail.com>
6647 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6648 (bufio_mod_SOURCES): New macro.
6649 (bufio_mod_CFLAGS): Likewise.
6650 (bufio_mod_LDFLAGS): Likewise.
6652 * include/grub/bufio.h: New file.
6654 * io/bufio.c: Likewise.
6656 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6657 (grub_video_reader_png): Use grub_buffile_open to open file.
6659 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6660 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6662 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6663 (grub_video_reader_tga): Use grub_buffile_open to open file.
6665 * font/manager.c: Include <grub/bufio.h>.
6666 (add_font): Use grub_buffile_open to open file.
6668 2008-07-31 Robert Millan <rmh@aybabtu.com>
6670 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6671 ELF segments, use a macro for arbitrarily accessing any of them instead
6672 of preparing a pointer that allows access to one at a time.
6673 (grub_multiboot_load_elf64): Likewise.
6675 2008-07-31 Bean <bean123ch@gmail.com>
6677 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6678 GRUB_KERNEL_MACHINE_DATA_END.
6680 2008-07-30 Robert Millan <rmh@aybabtu.com>
6682 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6683 Increase from 0x50 to 0x60.
6684 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6685 use UUIDs to identify the root drive for them. If that's not
6687 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6688 check, for cross-disk installs.
6690 2008-07-30 Robert Millan <rmh@aybabtu.com>
6692 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6693 is non-empty, use it to set the `prefix' environment variable instead
6694 of the usual approach.
6695 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6696 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6697 environment variable instead of dummy make_install_device().
6699 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6700 (start): Insert a data section, with `grub_prefix' variable.
6701 * kern/i386/linuxbios/startup.S: Likewise.
6703 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6704 New variable reference.
6705 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6706 New macro. Defines offset of `grub_prefix' within startup.S (relative
6708 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6709 section within startup.S (relative to `start').
6710 * include/grub/i386/coreboot/kernel.h: Likewise.
6712 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6713 Overwrite grub_prefix with its contents, at the beginning of the
6715 (main): Understand -p|--prefix.
6717 2008-07-30 Robert Millan <rmh@aybabtu.com>
6719 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6721 2008-07-30 Robert Millan <rmh@aybabtu.com>
6723 * term/i386/pc/vga_text.c (grub_console_cls): Use
6724 grub_console_gotoxy() to go back to beginning of the screen.
6725 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6727 2008-07-29 Christian Franke <franke@computer.org>
6729 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6730 Add conversion of emulated mount points on Cygwin.
6732 2008-07-29 Christian Franke <franke@computer.org>
6734 * util/update-grub.in: Add a check for admin
6736 Remove old `grub.cfg.new' before creation.
6737 Add `-f' to `mv' to handle the different filesystem
6738 semantics of Windows.
6740 2008-07-29 Bean <bean123ch@gmail.com>
6742 * normal/main.c (get_line): Fix buffer overflow bug.
6744 2008-07-28 Robert Millan <rmh@aybabtu.com>
6746 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6747 (struct grub_apple_header): New struct. Describes the layout of
6749 (apple_partition_map_iterate): Check the header magic as well as the
6750 partition magic (which was already being checked).
6752 2008-07-28 Pavel Roskin <proski@gnu.org>
6754 * genmk.rb: Add a warning to the beginning of the output that
6755 it's a generated file and should not be edited.
6757 2008-07-28 Robert Millan <rmh@aybabtu.com>
6759 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6760 with the same number are found, just use issue a warning with
6761 grub_dprintf(), as this error has been reported to be non-fatal.
6763 2008-07-27 Robert Millan <rmh@aybabtu.com>
6765 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6768 2008-07-27 Bean <bean123ch@gmail.com>
6770 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6771 (grub_fat_find_dir): Ignore case when comparing filename.
6773 2008-07-27 Bean <bean123ch@gmail.com>
6775 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6776 smallino, as it's more descriptive, and i8count can be confused with
6777 the other field count.
6778 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6781 2008-07-27 Bean <bean123ch@gmail.com>
6783 * commands/crc.c: New file.
6785 * lib/crc.c: Likewise.
6787 * include/grub/lib/crc.h: Likewise.
6789 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6791 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6792 (hexdump): Move this function to ...
6794 * lib/hexdump.c: ... here.
6796 * include/grub/hexdump.h: Renamed to ...
6798 * include/grub/lib/hexdump.h: ... this.
6800 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6802 * util/grub-editenv.c: Likewise.
6804 * include/envblk.h: Renamed to ...
6806 * include/lib/envblk.h: ... this.
6808 * util/envblk.c: Renamed to ...
6810 * lib/envblk.c: ... this.
6812 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6814 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6815 (pkglib_MODULES): Add crc.mod.
6816 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6817 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6818 (crc_mod_SOURCES): New macro.
6819 (crc_mod_CFLAGS): Likewise.
6820 (crc_mod_LDFLAGS): Likewise.
6822 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6824 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6826 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6828 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6830 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6832 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6834 * commands/help.c: Include <grub/term.h>.
6835 (TERM_WIDTH): Removed. Updated all users.
6837 2008-07-27 Pavel Roskin <proski@gnu.org>
6839 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6840 spurious warnings about a comment within a comment.
6842 2008-07-25 Robert Millan <rmh@aybabtu.com>
6844 * util/getroot.c (find_root_device): Skip devices that match
6845 /dev/dm-[0-9]. This lets the real device be found for any type of
6846 abstraction (LVM, EVMS, RAID..).
6847 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6848 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6849 device is found first, find_root_device() will now skip it.
6851 2008-07-24 Pavel Roskin <proski@gnu.org>
6853 * include/grub/types.h: Use __builtin_bswap32() and
6854 __builtin_bswap64() with gcc 4.3 and newer.
6856 2008-07-24 Christian Franke <franke@computer.org>
6858 * util/i386/pc/grub-install.in: If `--debug' is specified,
6859 pass `--verbose' to grub-setup.
6860 Abort script if make_system_path_relative_to_its_root() fails.
6862 2008-07-24 Bean <bean123ch@gmail.com>
6864 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6865 variable `target_platform' should be `platform'.
6867 2008-07-24 Bean <bean123ch@gmail.com>
6869 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6870 (grub_png_init_fixed_block): New function.
6871 (grub_png_decode_image_data): Handle fixed huffman code compression.
6873 2008-07-24 Bean <bean123ch@gmail.com>
6875 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6876 (grub_pe2elf_SOURCES): New macro.
6877 (CLEANFILES): Add grub-pe2elf.
6879 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6880 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6881 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6882 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6883 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6884 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6885 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6886 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6887 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6888 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6889 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6890 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6891 (GRUB_PE32_DT_FUNCTION): Likewise.
6892 (GRUB_PE32_REL_I386_DIR32): Likewise.
6893 (GRUB_PE32_REL_I386_REL32): Likewise.
6894 (grub_pe32_symbol): New structure.
6895 (grub_pe32_reloc): Likewise.
6897 * util/grub-pe2elf.c: New file.
6899 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6900 start symbol in non pc platform.
6902 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6904 The following patches are from Christian Franke.
6906 * include/grub/dl.h: Remove .previous, gas supports this only
6909 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6910 Remove .type, gas supports this only for ELF format.
6912 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6913 nullbytes in symbol table. This fixes an infinite loop if table is
6916 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6917 TARGET_IMG_LDFLAGS and EXEEXT.
6919 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6920 TARGET_IMG_LDFLAGS_AC.
6921 (grub_CHECK_STACK_ARG_PROBE): New function.
6923 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6925 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6927 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6928 to set TARGET_IMG_LD* accordingly.
6929 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6930 Add call to grub_CHECK_STACK_ARG_PROBE.
6931 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6933 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6935 * genmk.rb: Add EXEEXT to CLEANFILES.
6937 2008-07-23 Robert Millan <rmh@aybabtu.com>
6939 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6940 define the codes for arrows and lines used for the menu).
6941 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6944 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6945 fonts, because the latter are too slow.
6947 2008-07-21 Bean <bean123ch@gmail.com>
6949 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6950 a20. Run keyboard test last, as it will cause macbook to halt.
6952 2008-07-18 Pavel Roskin <proski@gnu.org>
6954 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6955 load foreign architecture modules correctly anyway. Keep
6956 support for loading host architecture modules, whether we
6957 compile them or not.
6959 2008-07-17 Pavel Roskin <proski@gnu.org>
6961 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6962 change target_cpu. The compiler default can mismatch target_cpu
6965 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6966 * kern/efi/efi.c: Likewise.
6968 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6969 target compiler is functional.
6970 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6973 * configure.ac: Default to efi platform for x86_64-apple. Allow
6974 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6975 adjustments from the rest, only do them if target is not
6976 explicitly given. Merge other adjustments with the final sanity
6977 check. Remove an extraneous check for supported CPU. Be
6978 specific which CPU and which platform is not supported.
6980 * configure.ac: Default to pc platform for x86_64.
6982 2008-07-17 Robert Millan <rmh@aybabtu.com>
6984 Partial LinuxBIOS -> Coreboot rename.
6986 * conf/i386-linuxbios.rmk: Renamed to ...
6987 * conf/i386-coreboot.rmk: ... this.
6988 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6989 * configure.ac: Accept "coreboot" as input platform (but maintain
6990 compatibility with "linuxbios").
6991 * include/grub/i386/linuxbios: Renamed to ...
6992 * include/grub/i386/coreboot: ... this.
6994 2008-07-17 Bean <bean123ch@gmail.com>
6996 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6997 (appleldr_mod_SOURCE): New variable.
6998 (appleldr_mod_CFLAGS): Likewise.
6999 (appleldr_mod_LDFLAGS): Likewise.
7000 (pci_mod_SOURCES): Likewise.
7001 (pci_mod_CFLAGS): Likewise.
7002 (pci_mod_LDFLAGS): Likewise.
7003 (lspci_mod_SOURCES): Likewise.
7004 (lspci_mod_CFLAGS): Likewise.
7005 (lspci_mod_LDFLAGS): Likewise.
7007 * conf/x86_64-efi.rmk: New file.
7009 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7011 (grub_efidisk_write): Likewise.
7013 * include/efi/api.h (efi_call_0): New macro.
7014 (efi_call_1): Likewise.
7015 (efi_call_2): Likewise.
7016 (efi_call_3): Likewise.
7017 (efi_call_4): Likewise.
7018 (efi_call_5): Likewise.
7019 (efi_call_6): Likewise.
7021 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7022 grub_rescue_cmd_chainloader.
7024 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7025 (grub_pe32_optional_header): Change some fields based on i386 or
7027 (GRUB_PE32_PE32_MAGIC): Likewise.
7029 * include/grub/efi/uga_draw.h: New file.
7031 * include/grub/elf.h (STN_ABS): New constant.
7032 (R_X86_64_NONE): Relocation constant for x86_64.
7033 (R_X86_64_64): Likewise.
7034 (R_X86_64_PC32): Likewise.
7035 (R_X86_64_GOT32): Likewise.
7036 (R_X86_64_PLT32): Likewise.
7037 (R_X86_64_COPY): Likewise.
7038 (R_X86_64_GLOB_DAT): Likewise.
7039 (R_X86_64_JUMP_SLOT): Likewise.
7040 (R_X86_64_RELATIVE): Likewise.
7041 (R_X86_64_GOTPCREL): Likewise.
7042 (R_X86_64_32): Likewise.
7043 (R_X86_64_32S): Likewise.
7044 (R_X86_64_16): Likewise.
7045 (R_X86_64_PC16): Likewise.
7046 (R_X86_64_8): Likewise.
7047 (R_X86_64_PC8): Likewise.
7049 * include/grub/i386/efi/pci.h: New file.
7051 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7052 Change it value based on platform.
7053 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7054 (GRUB_E820_RAM): Likewise.
7055 (GRUB_E820_RESERVED): Likewise.
7056 (GRUB_E820_ACPI): Likewise.
7057 (GRUB_E820_NVS): Likewise.
7058 (GRUB_E820_EXEC_CODE): Likewise.
7059 (GRUB_E820_MAX_ENTRY): Likewise.
7060 (grub_e820_mmap): New structure.
7061 (linux_kernel_header): Change the efi field according to different
7062 kernel version, also field from linux_kernel_header.
7064 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7066 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7067 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7068 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7069 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7070 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7071 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7072 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7073 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7074 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7075 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7077 * include/grub/x86_64/efi/kernel.h: New file.
7079 * include/grub/x86_64/efi/loader.h: Likewise.
7081 * include/grub/x86_64/efi/machine.h: Likewise.
7083 * include/grub/x86_64/efi/pci.h: Likewise.
7085 * include/grub/x86_64/efi/time.h: Likewise.
7087 * include/grub/x86_64/linux.h: Likewise.
7089 * include/grub/x86_64/setjmp.h: Likewise.
7091 * include/grub/x86_64/time.h: Likewise.
7093 * include/grub/x86_64/types.h: Likewise.
7095 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7096 GRUB_TARGET_SIZEOF_VOID_P.
7098 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7099 (grub_efi_locate_handle): Likewise.
7100 (grub_efi_open_protocol): Likewise.
7101 (grub_efi_set_text_mode): Likewise.
7102 (grub_efi_stall): Likewise.
7103 (grub_exit): Likewise.
7104 (grub_reboot): Likewise.
7105 (grub_halt): Likewise.
7106 (grub_efi_exit_boot_services): Likewise.
7107 (grub_get_rtc): Likewise.
7109 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7110 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7111 (grub_efi_allocate_pages): Wrap efi calls.
7112 (grub_efi_free_pages): Wrap efi calls.
7113 (grub_efi_get_memory_map): Wrap efi calls.
7115 * kern/x86_64/dl.c: New file.
7117 * kern/x86_64/efi/callwrap.S: Likewise.
7119 * kern/x86_64/efi/startup.S: Likewise.
7121 * loader/efi/appleloader.c: Likewise.
7123 * loader/efi/chainloader.c (cmdline): New variable.
7124 (grub_chainloader_unload): Wrap efi calls.
7125 (grub_chainloader_boot): Likewise.
7126 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7129 * loader/efi/chainloader_normal.c (chainloader_command):
7130 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7133 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7135 (grub_e820_add_region): New function.
7136 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7138 (grub_find_video_card): New function.
7139 (grub_linux_setup_video): New function.
7140 (grub_rescue_cmd_linux): Probe for video information.
7142 * normal/x86_64/setjmp.S: New file.
7144 * term/efi/console.c (map_char): New function.
7145 (grub_console_putchar): Map unicode char.
7146 (grub_console_checkkey): Wrap efi calls.
7147 (grub_console_getkey): Likewise.
7148 (grub_console_getwh): Likewise.
7149 (grub_console_gotoxy): Likewise.
7150 (grub_console_cls): Likewise.
7151 (grub_console_setcolorstate): Likewise.
7152 (grub_console_setcursor): Likewise.
7154 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7156 2008-07-16 Pavel Roskin <proski@gnu.org>
7158 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7161 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7162 pointer, not an integer. This fixes a warning and prevents
7163 precision loss on 64-bit systems.
7164 (relocate_addresses): Remove unneeded cast.
7166 2008-07-15 Pavel Roskin <proski@gnu.org>
7168 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7170 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7172 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7173 Fix comparison between signed and unsigned.
7175 * include/grub/i386/ieee1275/console.h: Declare
7176 grub_console_init() and grub_console_fini().
7178 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7179 It's empty and unused.
7181 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7182 beginning to avoid warnings with some compilers.
7184 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7185 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7187 2008-07-14 Pavel Roskin <proski@gnu.org>
7189 * kern/env.c (grub_register_variable_hook): Don't copy empty
7190 string, it leaks memory. Pass "" to grub_env_set(), it should
7191 handle constant strings.
7193 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7194 * commands/cmp.c (grub_cmd_cmp): Likewise.
7195 * kern/dl.c (grub_dl_flush_cache): Likewise.
7196 (grub_dl_load_core): Likewise.
7197 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7198 (grub_elf64_load_phdrs): Likewise.
7200 2008-07-13 Pavel Roskin <proski@gnu.org>
7202 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7203 between signed and unsigned.
7204 (LzmaEnc_Finish): Fix warning about an unused parameter.
7206 2008-07-13 Bean <bean123ch@gmail.com>
7208 * Makefile.in (enable_lzo): New rule.
7210 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7212 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7214 * boot/i386/pc/lnxboot.S: #include <config.h>.
7216 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7217 its value according to the compression algorithm used, lzo or lzma.
7219 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7220 compression algorithm according to configure macro.
7222 * kern/i386/pc/startup.S (codestart): Likewise.
7224 * kern/i386/pc/lzma_decode.S: New file.
7226 * include/grub/lib/LzFind.h: Likewise.
7228 * include/grub/lib/LzHash.h: Likewise.
7230 * include/grub/lib/LzmaDec.h: Likewise.
7232 * include/grub/lib/LzmaEnc.h: Likewise.
7234 * include/grub/lib/LzmaTypes.h: Likewise.
7236 * lib/LzFind.c: Likewise.
7238 * lib/LzmaDec.c: Likewise.
7240 * lib/LzmaEnc.c: Likewise.
7242 2008-07-13 Bean <bean123ch@gmail.com>
7244 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7245 (grub_ext4_extent_header): New structure.
7246 (grub_ext4_extent): Likewise.
7247 (grub_ext4_extent_idx): Likewise.
7248 (grub_ext4_find_leaf): New function.
7249 (grub_ext2_read_block): Handle extents.
7251 2008-07-12 Robert Millan <rmh@aybabtu.com>
7253 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7255 2008-07-11 Robert Millan <rmh@aybabtu.com>
7257 * util/grub.d/40_custom.in: New file. Example on how to add custom
7258 entries to /etc/grub.d.
7259 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7260 40_custom (implicitly, by merging all the grub.d rules).
7262 2008-07-11 Pavel Roskin <proski@gnu.org>
7264 * commands/read.c (grub_getline): Fix invalid memory access.
7265 Don't add newline to the variable value.
7267 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7268 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7269 (serial_hw_get_port): Check validity of the port number.
7270 (grub_cmd_serial): Check return value of serial_hw_get_port().
7272 2008-07-07 Pavel Roskin <proski@gnu.org>
7274 * boot/i386/pc/diskboot.S (notification_string): Replace
7275 "Loading kernel" with just "loading". This is shorter, less
7276 confusing and saves a few bytes for possible future changes.
7278 2008-07-05 Pavel Roskin <proski@gnu.org>
7280 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7281 size for ATAPI devices, they are undefined. Output sector
7282 number in decimal form.
7284 * disk/ata.c: Use named constants for status bits.
7286 2008-07-04 Pavel Roskin <proski@gnu.org>
7288 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7289 grub_addr_t before casting it to the void pointer to fix a
7290 warning. Non-addressable regions are discarded earlier.
7291 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7292 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7293 (check_signature): Don't shadow table_header.
7294 (grub_linuxbios_table_iterate): Cast numeric constants to
7295 grub_linuxbios_table_header_t.
7296 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7299 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7302 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7303 pointer, which can cause warnings. Support 64-bit addresses.
7305 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7306 of sizeof(long). This fixes PowerPC image generation on x86_64.
7308 2008-07-04 Robert Millan <rmh@aybabtu.com>
7310 This fixes a performance issue when pc & gpt partmap iterators
7311 didn't abort iteration even after our hook found what it was
7312 looking for (often causing expensive probes of non-existent drives).
7314 Some callers relied on previous buggy behaviour, since they would
7315 raise an error when their own hooks caused early abortion of its
7318 * kern/device.c (grub_device_open): Improve error message.
7319 * disk/lvm.c (grub_lvm_open): Likewise.
7320 * disk/raid.c (grub_raid_open): Likewise.
7322 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7323 when hook requests it, independently of grub_errno.
7324 (pc_partition_map_probe): Do not fail when find_func() caused
7325 early abortion of pc_partition_map_iterate().
7327 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7328 when hook requests it, independently of grub_errno.
7329 (gpt_partition_map_probe): Do not fail when find_func() caused
7330 early abortion of gpt_partition_map_iterate().
7332 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7333 when hook requests it, independently of grub_errno. Do not fail when
7334 part_map_iterate_hook() caused early abortion of p->iterate().
7336 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7337 when grub_partition_iterate() returned with non-zero.
7339 2008-07-03 Pavel Roskin <proski@gnu.org>
7341 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7342 like we do in grub_ata_pio_read().
7343 (grub_ata_readwrite): Always write individual sectors. Fix the
7344 sector count for the remainder.
7345 (grub_ata_write): Enable writing to ATA devices. Correctly
7346 report error for ATAPI devices.
7348 2008-07-02 Pavel Roskin <proski@gnu.org>
7350 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7353 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7354 for every read sector, we already increment it for the whole
7355 batch. This fixes reading more than 256 sectors at once.
7357 * util/grub-editenv.c (cmd_info): Cast argument to long
7358 explicitly. ptrdiff_t reduces to int on i386.
7360 * util/grub-editenv.c (main): Be specific which parameter is
7363 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7364 (memdisk): Make memdisk_orig_addr a pointer.
7366 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7367 for file offsets, use grub_off_t instead. Fix printf format
7370 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7371 there. Real unexpected warnings should not drown in the noise
7372 about known problems.
7374 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7375 grub_disk_addr_t for memory addresses.
7377 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7378 explicitly to fix a warning.
7380 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7382 * Makefile.in (MODULE_LDFLAGS): New variable.
7383 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7384 the linker accepts --build-id=none.
7385 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7387 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7389 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7390 those in Linux XFS code. Provide a way to access 64-bit parent
7392 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7393 the end of struct grub_xfs_dir_header.
7395 2008-07-02 Bean <bean123ch@gmail.com>
7397 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7398 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7399 and GRUB_IEEE1275_FLAG_NO_ANSI.
7401 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7402 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7403 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7405 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7406 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7408 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7409 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7411 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7412 esc sequence on non ANSI terminal.
7413 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7415 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7418 2008-07-02 Bean <bean123ch@gmail.com>
7420 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7421 (grub_editenv_SOURCES): New variable.
7422 (pkglib_MODULES): Add loadenv.mod.
7423 (loadenv_mod_SOURCES): New variable.
7424 (loadenv_mod_CFLAGS): Likewise.
7425 (loadenv_mod_LDFLAGS): Likewise.
7427 * include/grub/envblk.h: New file.
7429 * util/envblk.c: New file.
7431 * util/grub-editenv.c: New file.
7433 * commands/loadenv.c: New file.
7435 2008-07-01 Pavel Roskin <proski@gnu.org>
7437 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7438 not unsigned char. This fixes warnings and is consistent with
7441 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7443 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7445 * term/tparm.c (analyze): Always set *popcount.
7447 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7448 cast to fix a warning.
7450 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7451 cast to suppress a warning.
7453 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7454 grub_fshelp_read_file() expects.
7456 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7457 write uuid as a 32-bit value in CPU byte order, so declare and
7460 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7461 long if the format specifier expects it.
7462 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7463 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7464 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7465 long to fix a warning.
7466 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7467 grub_dprintf() arguments to fix warnings.
7469 2008-06-30 Pavel Roskin <proski@gnu.org>
7471 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7472 install_bsd_part immediately before core.img is embedded or
7473 modified on disk. This fixes core.img verification if core.img
7476 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7477 core_path to calculate the blocklist.
7478 Patch from Javier MartÃn <lordhabbit@gmail.com>
7480 2008-06-29 Robert Millan <rmh@aybabtu.com>
7482 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7483 block to disk block.
7484 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7485 Patch from Niels Böhm <bitbucket@arcor.de>
7487 2008-06-29 Robert Millan <rmh@aybabtu.com>
7489 * util/update-grub_lib.in (font_path): Search for fonts in
7490 /boot/grub first, which is more likely to be readable (we aren't
7491 deciding where fonts live, just looking for them).
7493 2008-06-26 Pavel Roskin <proski@gnu.org>
7495 * util/biosdisk.c (read_device_map): Don't leave dead map
7496 entries for devices failing stat() check.
7498 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7499 core_path_dev for the core.img path on the target device.
7501 2008-06-26 Robert Millan <rmh@aybabtu.com>
7503 * disk/fs_uuid.c: New file.
7504 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7505 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7506 (fs_uuid_mod_LDFLAGS): New variables.
7507 * include/grub/disk.h (grub_disk_dev_id): Add
7508 `GRUB_DISK_DEVICE_UUID_ID'.
7509 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7510 implement iterate().
7512 2008-06-26 Robert Millan <rmh@aybabtu.com>
7514 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7515 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7516 Linux image includes no initrd.
7518 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
7520 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7521 call to resolve the core image location that effectively appended the
7524 2008-06-21 Robert Millan <rmh@aybabtu.com>
7526 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7529 * util/grub.d/10_hurd.in: ... to here ...
7530 * util/grub.d/10_linux.in: ... and here.
7532 2008-06-19 Robert Millan <rmh@aybabtu.com>
7534 * kern/main.c (grub_main): Export `prefix' variable immediately
7535 after it has been set by grub_machine_set_prefix().
7537 2008-06-19 Robert Millan <rmh@aybabtu.com>
7539 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7540 search result when not saving to variable, not the other way around.
7541 When saving to variable, abort iteration as soon as a match is found.
7543 2008-06-19 Robert Millan <rmh@aybabtu.com>
7545 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7546 check for partition that provides /boot/grub. Its logic is flawed,
7547 as it prevents prepare_grub_to_access_device() from being called
7550 2008-06-19 Robert Millan <rmh@aybabtu.com>
7552 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7553 "insmod" command directly when abstraction modules are needed,
7554 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7555 since it had already been processed).
7557 2008-06-19 Pavel Roskin <proski@gnu.org>
7559 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7560 changed. This is needed in case GRUB_LIBDIR changes.
7561 * conf/i386-ieee1275.rmk: Likewise.
7562 * conf/i386-linuxbios.rmk: Likewise.
7563 * conf/i386-pc.rmk: Likewise.
7564 * conf/powerpc-ieee1275.rmk: Likewise.
7566 2008-06-18 Pavel Roskin <proski@gnu.org>
7568 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7569 kernel_elf_symlist.c to symlist.c for consistency with other
7570 architectures. Update all users.
7571 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7573 2008-06-18 Robert Millan <rmh@aybabtu.com>
7575 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7578 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7579 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7580 a RAID device, run setup() for all members independently on whether
7581 LVM abstraction is being used.
7582 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7583 If grub-mkimage has set `*install_dos_part == -2', don't override this
7585 Perform *install_dos_part adjustments independently on whether
7586 we're embedding or not.
7587 Clarify error message when image is too big for embedding.
7588 Remove duplicate *install_dos_part stanza.
7590 2008-06-17 Robert Millan <rmh@aybabtu.com>
7592 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7593 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7595 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7596 values in grub_ofconsole_normal_color and
7597 grub_ofconsole_highlight_color (they're not directly related to
7598 background and foreground).
7599 (grub_ofconsole_setcolorstate): Extract background and foreground
7600 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7602 2008-06-17 Robert Millan <rmh@aybabtu.com>
7604 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7605 /boot/grub for the check in last commit, not /boot (they could be
7606 different partitions).
7608 2008-06-16 Robert Millan <rmh@aybabtu.com>
7610 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7611 asked to setup access for the same partition that provides /boot,
7612 don't bother using UUIDs since our root already has the value we
7615 2008-06-16 Robert Millan <rmh@aybabtu.com>
7617 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7619 Patch from Sven Mueller <sven@debian.org>.
7621 2008-06-16 Robert Millan <rmh@aybabtu.com>
7623 * util/update-grub.in: Check for $EUID instead of $UID.
7624 Reported by Vincent Zweije.
7626 2008-06-16 Bean <bean123ch@gmail.com>
7628 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7629 (grub_ext2_read_block): Likewise.
7630 (grub_ext2_read_inode): Likewise.
7631 (grub_ext2_mount): Likewise.
7632 (grub_ext2_close): Likewise.
7633 (grub_ext3_get_journal): Removed.
7635 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7636 (grub_reiserfs_read_symlink): Likewise.
7637 (grub_reiserfs_mount): Likewise.
7638 (grub_reiserfs_open): Likewise.
7639 (grub_reiserfs_read): Likewise.
7640 (grub_reiserfs_close): Likewise.
7641 (grub_reiserfs_get_journal): Removed.
7643 * fs/fshelp.c (grub_fshelp_read): Removed.
7644 (grub_fshelp_map_block): Likewise.
7646 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7647 (grub_fshelp_journal): Likewise.
7648 (grub_fshelp_read): Likewise.
7649 (grub_fshelp_map_block): Likewise.
7651 2008-06-16 Pavel Roskin <proski@gnu.org>
7653 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7654 floating point anymore.
7655 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7657 2008-06-15 Pavel Roskin <proski@gnu.org>
7659 * commands/ls.c (grub_ls_list_files): Use integer calculations
7660 for human readable format, avoid floating point use.
7661 * kern/misc.c (grub_ftoa): Remove.
7662 (grub_vsprintf): Remove floating point support.
7664 2008-06-15 Robert Millan <rmh@aybabtu.com>
7666 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7668 Reported by Max Vozeler.
7670 2008-06-15 Robert Millan <rmh@aybabtu.com>
7672 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7673 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7675 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7676 the beginning of the prefix.
7678 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7679 It is assumed that if we have a memdisk, grub-mkimage has set
7680 grub_prefix to include the "(memdisk)" drive in it.
7682 2008-06-15 Robert Millan <rmh@aybabtu.com>
7684 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7685 Initialize keyboard controller after registering the terminal, so that
7686 grub_printf() can be called from grub_keyboard_controller_init().
7688 2008-06-15 Robert Millan <rmh@aybabtu.com>
7690 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7691 extent-btree which is written as big endian on disk.
7692 Reported by Alain Greppin <al@chilibi.org>.
7694 2008-06-14 Robert Millan <rmh@aybabtu.com>
7696 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7697 * util/i386/pc/grub-install.in (modules): Likewise.
7699 2008-06-13 Pavel Roskin <proski@gnu.org>
7701 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7703 2008-06-13 Bean <bean123ch@gmail.com>
7705 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7707 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7709 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7710 to indicate sparse block.
7712 2008-06-12 Pavel Roskin <proski@gnu.org>
7714 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7715 number, grub_fshelp_read() does it for us.
7717 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7718 linear disk read with journal translation.
7719 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7720 * include/grub/fshelp.h: Declare grub_fshelp_read().
7722 2008-06-09 Pavel Roskin <proski@gnu.org>
7724 * fs/minix.c (grub_minix_mount): Handle error reading
7727 2008-06-08 Robert Millan <rmh@aybabtu.com>
7729 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7730 don't append the RAID prefix afterwards.
7731 Reported by Clint Adams.
7733 2008-06-08 Robert Millan <rmh@aybabtu.com>
7735 Based on description from Pavel:
7736 * kern/disk.c (grub_disk_check_range): Rename to ...
7737 (grub_disk_adjust_range): ... this. Add a comment explaining the
7738 tasks performed by this function.
7740 2008-06-08 Robert Millan <rmh@aybabtu.com>
7742 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7743 `num_serial' (for consistency with other variables).
7744 (struct grub_ntfs_data): Add `uuid' member.
7745 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7746 (grub_ntfs_uuid): New function.
7747 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7749 2008-06-07 Pavel Roskin <proski@gnu.org>
7751 * util/biosdisk.c (open_device): Revert last change to the
7752 function, it broke installation. The sector needs to be
7753 different dependent on which device is opened.
7755 2008-06-06 Robert Millan <rmh@aybabtu.com>
7757 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7758 rest of GRUB, and breakage doesn't happen if its value were modified.
7760 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7761 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7762 a constant (same value).
7763 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7764 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7766 2008-06-06 Robert Millan <rmh@aybabtu.com>
7768 * util/biosdisk.c (open_device): Do not modify sector offset when
7769 accessing a partition. kern/disk.c already handles this for us.
7771 2008-06-06 Robert Millan <rmh@aybabtu.com>
7773 * util/grub-emu.c (grub_machine_init): Move code in this function from
7775 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7776 segfault in case grub_printf() is called).
7778 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7779 grub_probe. Update all users not to explicitly add it again.
7780 (grub_device): New variable; contains corresponding device for grubdir.
7781 (fs_module, partmap_module, devabstraction_module): Pass
7782 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7785 2008-06-05 Robert Millan <rmh@aybabtu.com>
7787 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7788 is found, print it (same layout as with labels).
7790 2008-06-04 Robert Millan <rmh@aybabtu.com>
7792 * util/biosdisk.c (get_drive): Rename to ...
7793 (find_grub_drive): ... this. Update all users.
7795 (get_os_disk): Rename to ...
7796 (convert_system_partition_to_system_disk): ... this. Update all users.
7798 (find_drive): Rename to ...
7799 (find_system_device): ... this. Update all users.
7801 2008-06-04 Robert Millan <rmh@aybabtu.com>
7803 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7804 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7805 (make_device_map): Likewise.
7807 2008-06-01 Robert Millan <rmh@aybabtu.com>
7809 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7810 before dereferencing it.
7812 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7813 union with fat12/fat16-specific ones. Add some new fields, including
7814 `num_serial' for both versions.
7815 (struct grub_fat_data): Add `uuid' member.
7816 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7817 names. Initialize `data->uuid' using `num_serial'.
7818 (grub_fat_uuid): New function.
7819 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7821 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7822 (grub_reiserfs_uuid): New function.
7823 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7826 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7827 (grub_xfs_uuid): New function.
7828 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7830 2008-06-01 Robert Millan <rmh@aybabtu.com>
7832 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7833 code that is backward compatible with pre-uuid search command.
7835 2008-05-31 Robert Millan <rmh@aybabtu.com>
7837 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7838 floppies after everything else, to ensure floppy drive isn't accessed
7839 unnecessarily (patch from Bean).
7841 2008-05-31 Robert Millan <rmh@aybabtu.com>
7843 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7844 not print device names when we were asked to set a variable.
7846 2008-05-31 Robert Millan <rmh@aybabtu.com>
7848 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7849 using "cursor-on" and "cursor-off" commands (understood at least by
7850 the Open Firmware flavour on OLPC).
7852 2008-05-31 Michael Gorven <michael@gorven.za.net>
7854 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7855 on and off sequences.
7857 2008-05-31 Robert Millan <rmh@aybabtu.com>
7859 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7860 * util/update-grub.in: Likewise.
7862 2008-05-30 Pavel Roskin <proski@gnu.org>
7864 * util/biosdisk.c (linux_find_partition): Simplify logic and
7865 make the code more universal. Keep special processing for
7866 devfs, but use a simple rule for all other devices. If the
7867 device ends with a number, append 'p' and the partition number.
7868 Otherwise, append only the partition number.
7870 2008-05-30 Robert Millan <rmh@aybabtu.com>
7872 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7873 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7874 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7875 the `root' parameter to Linux.
7877 2008-05-30 Robert Millan <rmh@aybabtu.com>
7879 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7880 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7881 --fs_uuid with --fs-uuid.
7882 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7883 all filesystems support them).
7885 2008-05-30 Robert Millan <rmh@aybabtu.com>
7887 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7888 grub_printf() flags, since we're printing in units of 2 bytes.
7890 2008-05-30 Robert Millan <rmh@aybabtu.com>
7892 * util/grub.d/00_header.in: Remove obsolete comment referencing
7893 convert_system_path_to_grub_path().
7894 * util/update-grub.in: Likewise.
7895 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7896 (convert_system_path_to_grub_path): Add a warning message explaining
7897 that this function is deprecated. Rely on is_path_readable_by_grub()
7898 for the readability checks.
7899 (font_path): Use is_path_readable_by_grub() for the readability
7900 check rather than convert_system_path_to_grub_path().
7902 2008-05-30 Robert Millan <rmh@aybabtu.com>
7904 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7905 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7906 converting it first.
7907 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7908 grub.cfg for access to font file, and afterwards call it again to set
7911 2008-05-30 Robert Millan <rmh@aybabtu.com>
7913 * commands/search.c (options): Add --fs_uuid option.
7914 (search_fs_uuid): New function.
7915 (grub_cmd_search): Fix --set argument passing.
7916 Use search_fs_uuid() when requested via --fs_uuid.
7917 (grub_search_init): Update help message.
7918 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7919 and redeclare it as an array of 16-bit words.
7920 (grub_ext2_uuid): New function.
7921 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7922 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7923 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7924 (GRUB_DEVICE_BOOT_UUID): New variables.
7925 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7926 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7928 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7929 just assume `root' variable has the right value.
7930 * util/grub.d/10_linux.in: Likewise.
7931 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7933 (main): Recognise `-t fs_uuid' argument.
7935 2008-05-30 Robert Millan <rmh@aybabtu.com>
7937 * util/biosdisk.c (map): Redefine structure to hold information
7938 about GRUB drive name.
7939 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7941 (call_hook): Remove.
7942 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7943 member. Assume drive has partitions.
7944 (grub_util_biosdisk_open): Access device names via `.device' struct
7946 (open_device): Likewise.
7947 (find_drive): Likewise.
7948 (read_device_map): Adjust map[] usage to match the new struct
7949 definition. Don't check for duplicates (still possible, but not cheap
7951 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7952 (make_device_name): Remove assumption of BIOS-like drive names.
7954 2008-05-30 Pavel Roskin <proski@gnu.org>
7956 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7957 compiling execute.c doesn't need grub_script.tab.h anymore.
7958 (normal/command.c_DEPENDENCIES): Likewise.
7959 (normal/function.c_DEPENDENCIES): Likewise.
7960 * conf/i386-ieee1275.rmk: Likewise.
7961 * conf/i386-linuxbios.rmk: Likewise.
7962 * conf/i386-pc.rmk: Likewise.
7963 * conf/powerpc-ieee1275.rmk: Likewise.
7964 * conf/sparc64-ieee1275.rmk: Likewise.
7966 2008-05-29 Pavel Roskin <proski@gnu.org>
7968 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7969 when scanning metadata for volume group name.
7971 * include/grub/script.h: Don't include grub_script.tab.h. It's
7972 a generated file, which may only be included from the files with
7973 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7974 use union YYSTYPE, as the later allows forward declaration.
7975 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7977 2008-05-29 Robert Millan <rmh@aybabtu.com>
7979 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7980 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7981 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7982 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7985 2008-05-29 Robert Millan <rmh@aybabtu.com>
7987 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7988 control key combinations.
7990 2008-05-29 Robert Millan <rmh@aybabtu.com>
7992 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7993 * util/ieee1275/grub-install.in: ... to here.
7994 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7995 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7996 (grub_install_SOURCES): Likewise.
7998 2008-05-29 Robert Millan <rmh@aybabtu.com>
8000 * fs/affs.c: Update copyright year.
8001 * fs/ext2.c: Likewise.
8002 * fs/fshelp.c: Likewise.
8003 * fs/hfsplus.c: Likewise.
8004 * fs/ntfs.c: Likewise.
8005 * fs/xfs.c: Likewise.
8006 * include/grub/fshelp.h: Likewise.
8007 * util/grub-mkdevicemap.c: Likewise.
8009 2008-05-28 Robert Millan <rmh@aybabtu.com>
8011 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8012 might need to be fatfs to support some firmware implementations
8015 2008-05-28 Robert Millan <rmh@aybabtu.com>
8017 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8019 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8020 (make_device_map): Likewise.
8022 2008-05-20 Bean <bean123ch@gmail.com>
8024 * fs/fshelp.c (grub_fshelp_map_block): New function.
8025 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8026 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8028 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8029 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8030 (grub_fshelp_journal): New structure.
8031 (grub_fshelp_map_block): New function prototype.
8032 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8033 (grub_fshelp_map_block): Likewise.
8035 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8036 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8037 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8038 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8039 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8040 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8041 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8042 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8043 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8044 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8045 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8046 (grub_ext2_sblock): New members for journal support.
8047 (grub_ext3_journal_header): New structure.
8048 (grub_ext3_journal_revoke_header): Likewise.
8049 (grub_ext3_journal_block_tag): Likewise.
8050 (grub_ext3_journal_sblock): Likewise.
8051 (grub_fshelp_node): New members logfile and journal.
8052 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8053 grub_fshelp_map_block to get real block number.
8054 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8056 (grub_ext2_read_inode): Likewise.
8057 (grub_ext3_get_journal): New function.
8058 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8059 (grub_ext2_close): Release memory used by journal.
8061 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8062 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8063 (grub_reiserfs_transaction_header): Renamed to
8064 grub_reiserfs_description_block, replace field data with real_blocks.
8065 (grub_reiserfs_commit_block): New structure.
8066 (grub_reiserfs_data): New member journal.
8067 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8069 (grub_reiserfs_read_symlink): Likewise.
8070 (grub_reiserfs_iterate_dir): Likewise.
8071 (grub_reiserfs_open): Likewise.
8072 (grub_reiserfs_read): Likewise.
8073 (grub_reiserfs_get_journal): New function.
8074 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8075 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8076 using grub_reiserfs_get_journal.
8077 (grub_reiserfs_close): Release memory used by journal.
8079 * fs/affs.c (grub_affs_read_block): Change block type to
8080 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8082 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8084 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8086 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8088 * fs/udf.c (grub_udf_read_block): Change block type to
8089 grub_disk_addr_t. Use type cast to avoid warning.
8091 * fs/xfs.c (grub_xfs_read_block): Likewise.
8093 2008-05-16 Christian Franke <franke@computer.org>
8095 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8096 to ensure that break with ESC will always work.
8097 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8098 Remove ESC from keyboard queue.
8100 2008-05-16 Christian Franke <franke@computer.org>
8102 * util/biosdisk.c: [__CYGWIN__] Add includes.
8103 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8104 (get_os_disk): Move variable declarations to OS specific
8105 parts to avoid warning.
8106 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8107 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8108 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8110 * util/getroot.c: [__CYGWIN__] Add includes.
8111 (strip_extra_slashes): Fix "/" case.
8112 [__CYGWIN__] (get_win32_path): New function.
8113 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8114 [__CYGWIN__] (find_root_device): Disable.
8115 [__CYGWIN__] (get_bootsec_serial): New function.
8116 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8117 [__linux__] (grub_guess_root_device): Add early returns to simplify
8119 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8120 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8121 check for Linux only.
8123 2008-05-15 Bean <bean123ch@gmail.com>
8125 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8126 keyboard hang problem in apple's intel mac.
8128 2008-05-09 Robert Millan <rmh@aybabtu.com>
8130 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8132 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8133 (make_device_map): Likewise.
8134 Reported by Aurelien Jarno <aurel32@debian.org>
8136 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8138 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8139 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8140 (make_device_map): Output entries for xvd type disks.
8142 2008-05-07 Robert Millan <rmh@aybabtu.com>
8144 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8146 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8147 (make_device_map): Likewise.
8148 Reported by Roland Dreier <rdreier@cisco.com>
8150 2008-05-07 Robert Millan <rmh@aybabtu.com>
8152 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8153 grub_strstr() call. Correct a few mistakes in failure path handling.
8155 2008-05-06 Robert Millan <rmh@aybabtu.com>
8157 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8158 Do not print a trailing slash (therefore, the root directory is an
8160 (convert_system_path_to_grub_path): Do not remove trailing slash
8161 from make_system_path_relative_to_its_root() output.
8163 * util/i386/pc/grub-install.in: Add trailing slash to output from
8164 make_system_path_relative_to_its_root().
8166 2008-05-06 Robert Millan <rmh@aybabtu.com>
8168 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8169 ensures that output lines aren't intermangled with those sent to
8170 stderr (via grub_util_info()).
8171 * util/grub-probe.c (grub_refresh): Likewise.
8172 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8174 2008-05-05 Christian Franke <franke@computer.org>
8176 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8177 Add Cygwin device names.
8178 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8179 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8180 (check_device): Return error instead of success on empty name.
8181 (make_device_map): Move label inside linux specific code to
8182 prevent compiler warning.
8184 2008-04-30 Robert Millan <rmh@aybabtu.com>
8186 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8187 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8189 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8191 2008-04-29 Robert Millan <rmh@aybabtu.com>
8193 * docs/grub.cfg: New file (example GRUB configuration).
8195 2008-04-26 Robert Millan <rmh@aybabtu.com>
8197 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8198 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8199 and `disk/ieee1275/nand.c'.
8201 2008-04-25 Bean <bean123ch@gmail.com>
8203 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8206 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8207 change the buffer size to 4096 for cdrom device.
8209 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8211 (_linux_mod_SOURCES): New variable.
8212 (_linux_mod_CFLAGS): Likewise.
8213 (_linux_mod_LDFLAGS): Likewise.
8214 (linux_mod_SOURCES): Likewise.
8215 (linux_mod_CFLAGS): Likewise.
8216 (linux_mod_LDFLAGS): Likewise.
8217 (nand_mod_SOURCES): Likewise.
8218 (nand_mod_CFLAGS): Likewise.
8219 (nand_mod_LDFLAGS): Likewise.
8221 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8222 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8223 type property. (nand device in olpc don't have this property)
8225 * include/grub/disk.h (grub_disk_dev_id): New macro
8226 GRUB_DISK_DEVICE_NAND_ID.
8228 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8230 (grub_rescue_cmd_initrd): Likewise.
8232 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8233 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8234 ofw_cif_handler and ofw_idt, adjust padding number.
8236 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8237 GRUB_MACHINE_IEEE1275 is defined.
8239 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8240 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8242 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8243 on nested function heap_init.
8244 (grub_upper_mem): New variable for i386-ieee1275.
8245 (grub_get_extended_memory): New function for i386-ieee1275.
8246 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8248 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8249 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8252 * loader/i386/ieee1275/linux.c: New file.
8254 * loader/i386/ieee1275/linux_normal.c: New file.
8256 * disk/ieee1275/nand.c: New file.
8258 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8260 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8262 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8264 2008-04-18 Robert Millan <rmh@aybabtu.com>
8266 Restructures early code path on ieee1275 to unify grub_main() as
8267 the first C function that is executed in every platform.
8269 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8270 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8272 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8273 * kern/ieee1275/cmain.c (cmain): Rename to ...
8274 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8275 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8278 2008-04-18 Robert Millan <rmh@aybabtu.com>
8280 * util/update-grub.in: Fix syntax error when setting
8281 `GRUB_PRELOAD_MODULES'.
8282 Reported by Stephane Chazelas <stephane@artesyncp.com>
8284 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8286 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8287 section into account, newer toolchains generate unique build ids
8288 * configure.ac: remove the test for --build-id=none acceptance,
8289 we want build ids to be preserved
8290 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8291 far from other sections don't cause the raw binary images grow
8294 2008-04-15 Robert Millan <rmh@aybabtu.com>
8296 * disk/lvm.c: Update copyright year.
8297 * kern/misc.c: Likewise.
8299 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8301 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8302 there is no memory left for physical volume name.
8304 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8306 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8307 volume name mapping to support bigger than 9 character names properly.
8309 2008-04-13 Robert Millan <rmh@aybabtu.com>
8311 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8312 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8314 2008-04-13 Christian Franke <franke@computer.org>
8316 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8317 to create a floppy emulation boot CD when non emulation mode
8319 Enable Joliet CD filesystem extension.
8321 2008-04-13 Robert Millan <rmh@aybabtu.com>
8323 * kern/misc.c (grub_strncat): Fix off-by-one error.
8324 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8326 * kern/env.c (grub_env_context_close): Clear current context, not
8328 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8330 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8332 2008-04-13 Robert Millan <rmh@aybabtu.com>
8334 Improve robustness when handling LVM.
8336 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8337 (and leave `*p' unmodified).
8338 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8340 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8341 iterating through it.
8342 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8344 (grub_lvm_scan_device): Check the return value (and fail gracefully
8345 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8346 Don't assume `vg->pvs != NULL' when iterating through it.
8348 2008-04-13 Robert Millan <rmh@aybabtu.com>
8350 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8351 * genmk.rb (partmap): New variable.
8352 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8353 (#{partmap}): New target rule.
8354 * genpartmaplist.sh: New file.
8355 * Makefile.in (pkglib_DATA): Add partmap.lst.
8356 (partmap.lst): New target rule.
8357 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8358 modules (including all partition maps), instead of preloading them.
8360 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8362 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8363 `linux-boot-prober' (if installed) to detect other operating
8364 systems which are installed on the computer and add them to
8366 * conf/common.rmk: Build and install 30_os-prober.
8368 2008-04-12 Robert Millan <rmh@aybabtu.com>
8370 * kern/powerpc/ieee1275/init.c: Move from here ...
8371 * kern/ieee1275/init.c: ... to here. Update all users.
8373 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8374 * kern/ieee1275/cmain.c: ... to here. Update all users.
8376 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8377 * kern/ieee1275/openfw.c: ... to here. Update all users.
8379 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8380 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8382 2008-04-10 Pavel Roskin <proski@gnu.org>
8384 * configure.ac: Always use "_cv_" in cache variables for
8385 compatibility with Autoconf 2.62.
8387 2008-04-07 Robert Millan <rmh@aybabtu.com>
8389 Revert grub/machine/init.h addition by Pavel (since it breaks on
8390 i386-ieee1275 and others):
8391 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8392 * util/powerpc/ieee1275/misc.c: Likewise.
8394 2008-04-07 Robert Millan <rmh@aybabtu.com>
8396 * util/grub-probe.c (probe): Improve error message.
8398 2008-04-07 Robert Millan <rmh@aybabtu.com>
8400 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8401 (this prevents the presence of a bogus entry from ruining the whole
8404 2008-04-06 Pavel Roskin <proski@gnu.org>
8406 * util/biosdisk.c: Include grub/util/biosdisk.h.
8407 * util/grub-fstest.c (execute_command): Make static.
8408 * util/grub-mkdevicemap.c (check_device): Likewise.
8409 * util/i386/pc/misc.c: Include grub/machine/init.h.
8410 * util/powerpc/ieee1275/misc.c: Likewise.
8411 * util/lvm.c: Include grub/util/lvm.h.
8412 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8414 * util/raid.c: Include grub/util/raid.h.
8415 (grub_util_getdiskname): Make static.
8417 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8418 grub_hostfs_fini(), as they are called from grub_init_all() and
8419 grub_fini_all() respectively. This fixes an infinite loop in
8420 grub-fstest due to double registration of hostfs.
8421 Reported by Christian Franke <Christian.Franke@t-online.de>
8423 2008-04-05 Pavel Roskin <proski@gnu.org>
8425 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8426 all 8 functions. Otherwise, probe function 0 only.
8428 2008-04-04 Pavel Roskin <proski@gnu.org>
8430 * commands/lspci.c (grub_lspci_iter): Print the bus number
8433 * commands/lspci.c (grub_pci_classes): Fix typos.
8434 (grub_lspci_iter): Don't print func twice. Print vendor ID
8435 before device ID, as it's normally done.
8437 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8438 Fix signedness warnings.
8439 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8441 * util/ieee1275/get_disk_name.c: Include config.h so that
8442 _GNU_SOURCE is defined and getline() is declared. Mark an
8443 unused argument as such. Fix a signedness warning.
8445 2008-04-02 Pavel Roskin <proski@gnu.org>
8447 * genkernsyms.sh.in: Use more robust assignments for CC and
8448 srcdir. Quote srcdir.
8449 * gensymlist.sh.in: Likewise. Assert at the compile time that
8450 the symbol table is not empty.
8452 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8453 * fs/cpio.c (grub_cpio_read): Likewise.
8455 2008-04-01 Pavel Roskin <proski@gnu.org>
8457 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8458 * disk/host.c (grub_host_open): Likewise.
8459 * disk/loopback.c (grub_loopback_open): Likewise.
8460 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8461 disk->id as in disk/host.c, not a multi-character constant.
8463 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8464 later is obsolete, potentially dangerous and sets a bad example.
8465 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8466 * util/misc.c (grub_util_get_image_size): Likewise.
8468 * disk/loopback.c (options): Improve help for "--partitions".
8470 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8471 options to align them with the short options, e.g. "echo -e".
8473 2008-03-31 Bean <bean123ch@gmail.com>
8475 * video/reader/png.c (grub_png_data): New member is_16bit and
8477 (grub_png_decode_image_header): Detect 16 bit png image.
8478 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8479 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8480 (grub_video_reader_png): Release memory occupied by image_data.
8482 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8484 (grub_nfs_mount): Skip the test for sector per cluster.
8486 * include/grub/ntfs.h (MAX_SPC): Removed.
8488 2008-03-31 Bean <bean123ch@gmail.com>
8490 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8491 (grub_probe_SOURCES): Add fs/afs.c.
8492 (grub_fstest_SOURCES): Likewise.
8493 (afs_mod_SOURCES): New variable.
8494 (afs_mod_CFLAGS): Likewise.
8495 (afs_mod_LDFLAGS): Likewise.
8497 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8498 (grub_emu_SOURCES): Likewise.
8500 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8502 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8504 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8506 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8508 * fs/afs.c: New file.
8510 2008-03-30 Pavel Roskin <proski@gnu.org>
8512 * disk/host.c: Include grub/misc.h to fix a warning.
8513 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8514 warnings about implicit declarations.
8516 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8518 * include/grub/i386/loader.h: Change declaration of
8519 grub_linux_boot() to match what grub_loader_set() expects.
8520 * util/getroot.c (grub_guess_root_device): Return const char* to
8522 * util/grub-probe.c (probe): Fix a warning about uninitialized
8523 abstraction_name variable.
8524 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8525 second argument as unused to fix a warning.
8527 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8528 missing grub_error() call.
8530 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8531 2.60 and newer uses it to define datadir.
8533 * commands/sleep.c: Fix warning about implicit declaration.
8534 * disk/memdisk.c: Likewise.
8535 * loader/aout.c: Likewise.
8536 * loader/i386/bsd_normal.c: Likewise.
8537 * util/grub-probe.c: Likewise.
8539 * commands/i386/cpuid.c (has_longmode): Make static.
8540 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8541 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8543 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8544 GDT. This is more robust, as %ds can change.
8545 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8546 calling real_to_prot().
8547 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8549 2008-03-28 Pavel Roskin <proski@gnu.org>
8551 * kern/i386/pc/startup.S: Assert that uncompressed functions
8552 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8553 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8554 code, as they push parts of the code (error handlers) beyond
8555 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8556 code as correctness and size.
8558 2008-03-28 Pavel Roskin <proski@gnu.org>
8560 * kern/i386/pc/startup.S
8561 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8562 data block address to the real mode, keep offset minimal. This
8563 works around a bug in AWARD BIOS on old Athlon systems, which
8564 makes CD detection hang.
8566 2008-03-26 Pavel Roskin <proski@gnu.org>
8568 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8570 * include/grub/normal.h: Add grub_parse_color_name_pair()
8573 2008-03-24 Bean <bean123ch@gmail.com>
8575 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8576 (cd_count): Removed.
8577 (cd_drive): New variable.
8578 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8579 (grub_biosdisk_call_hook): Likewise.
8580 (grub_biosdisk_iterate): Change cdrom detection method.
8581 (grub_biosdisk_open): Replace cd_start with cd_drive.
8582 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8583 detect cdrom device.
8585 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8587 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8588 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8589 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8590 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8591 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8592 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8593 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8594 (grub_biosdisk_cdrp): New structure.
8595 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8597 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8599 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8602 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8605 2008-03-20 Robert Millan <rmh@aybabtu.com>
8607 Remove 2 TiB limit in ata.mod.
8608 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8609 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8610 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8611 grub_uint64_t instead of grub_uint32_t.
8613 2008-03-05 Bean <bean123ch@gmail.com>
8615 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8616 (grub_multiboot): Set boot device.
8618 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8620 2008-03-02 Bean <bean123ch@gmail.com>
8622 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8625 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8627 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8630 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8633 * docs/fdl.texi: New file.
8635 * docs/mdate-sh: New file. Copied from gnulib.
8636 * docs/texinfo.tex: Likewise.
8638 * config.guess: Updated from gnulib.
8639 * install-sh: Likewise.
8641 2008-02-28 Robert Millan <rmh@aybabtu.com>
8643 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8644 (aout_mod_SOURCES): New variable.
8645 (aout_mod_CFLAGS): Likewise.
8646 (aout_mod_LDFLAGS): Likewise.
8648 * conf/i386-ieee1275.rmk: Likewise.
8650 2008-02-28 Robert Millan <rmh@aybabtu.com>
8652 * util/update-grub.in: Reorganise terminal validity check. Accept
8653 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8654 Based on suggestion by Franklin PIAT.
8656 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8658 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8660 * util/getroot.c (grub_util_check_block_device): New function that
8661 returns the given argument if it is a block device and returns NULL else.
8662 * util/grub-probe.c (argument_is_device): New variable.
8663 (probe): Promote device_name from a variable to an argument. Receive
8664 device_name from grub_util_check_block_device() if path is NULL and from
8665 grub_guess_root_device() else. Do not free() device_name anymore.
8666 (options): Introduce new parameter '-d, --device'.
8667 (main): Add description of the new parameter to the help screen.
8668 Rename path variable to argument. Set argument_is_device if the '-d'
8669 option is given. Pass argument to probe() depending on
8672 2008-02-24 Bean <bean123ch@gmail.com>
8674 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8675 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8676 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8677 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8678 (GRUB_ISO9660_VOLDESC_END): Likewise.
8679 (grub_iso9660_primary_voldesc): New member escape.
8680 (grub_iso9660_data): New member joliet.
8681 (grub_iso9660_convert_string): New function.
8682 (grub_iso9660_mount): Detect joliet extension.
8683 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8684 (grub_iso9660_iso9660_label): Likewise.
8686 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8687 (grub_setup_SOURCES): Add fs/udf.c.
8688 (grub_fstest_SOURCES): Likewise.
8689 (udf_mod_SOURCES): New variable.
8690 (udf_mod_CFLAGS): Likewise.
8691 (udf_mod_LDFLAGS): Likewise.
8693 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8694 (grub_emu_SOURCES): Likewise.
8696 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8698 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8700 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8704 * fs/udf.c: New file.
8706 2008-02-24 Robert Millan <rmh@aybabtu.com>
8708 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8709 (normal/lexer.c_DEPENDENCIES): New variables.
8710 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8711 (normal/lexer.c_DEPENDENCIES): Likewise.
8712 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8713 (normal/lexer.c_DEPENDENCIES): Likewise.
8714 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8715 (normal/lexer.c_DEPENDENCIES): Likewise.
8716 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8717 (normal/lexer.c_DEPENDENCIES): Likewise.
8718 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8719 (normal/lexer.c_DEPENDENCIES): Likewise.
8721 2008-02-23 Robert Millan <rmh@aybabtu.com>
8723 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8724 since they were intended to be in hex. This didn't break previously
8725 because of a bug in gpt_partition_map_iterate() (see below).
8727 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8728 when checking the validity of GPT header.
8729 Remove `partno', since it always provides the same information as `i'.
8731 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8733 * include/grub/efi/time.h: Fix a wrong comment.
8735 2008-02-19 Pavel Roskin <proski@gnu.org>
8737 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8740 2008-02-19 Bean <bean123ch@gmail.com>
8742 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8743 (aout_mod_SOURCES): New variable.
8744 (aout_mod_CFLAGS): Likewise.
8745 (aout_mod_LDFLAGS): Likewise.
8746 (_bsd_mod_SOURCES): New variable.
8747 (_bsd_mod_CFLAGS): Likewise.
8748 (_bsd_mod_LDFLAGS): Likewise.
8749 (bsd_mod_SOURCES): New variable.
8750 (bsd_mod_CFLAGS): Likewise.
8751 (bsd_mod_LDFLAGS): Likewise.
8753 * include/grub/aout.h: New file.
8755 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8757 * include/grub/i386/bsd.h: New file.
8759 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8762 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8763 function is called, so that it's possible to change it inside the hook.
8764 (grub_elf64_load): Likewise.
8765 (grub_elf_file): Don't close the file if elf header is not found.
8766 (grub_elf_close): Close the file if grub_elf_file fails (The new
8767 grub_elf_file won't close it).
8768 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8769 (grub_elf64_size): Likewise.
8771 * kern/i386/loader.S (grub_unix_real_boot): New function.
8773 * loader/aout.c: New file.
8775 * loader/i386/bsd.c: New file.
8777 * loader/i386/bsd_normal.c: New file.
8779 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8781 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8782 can test other formats.
8784 2008-02-19 Robert Millan <rmh@aybabtu.com>
8786 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8787 (grub_gpt_partition_type_empty): Redefine with macro from
8788 `<grub/gpt_partition.h>'.
8789 (gpt_partition_map_iterate): Adjust partition type comparison.
8791 Export `entry' as partmap-specific `part.data' struct.
8792 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8794 * include/grub/gpt_partition.h (grub_gpt_header)
8795 (grub_gpt_partentry): ... to here (new file).
8797 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8799 (grub_gpt_partition_type_bios_boot): New const variable, defined
8800 with macro from `<grub/gpt_partition.h>'.
8802 (setup): Replace `first_start' with `embed_region', which keeps
8803 track of the embed region (and is partmap-agnostic).
8805 Replace find_first_partition_start() with find_usable_region(),
8806 which finds a usable region for embedding using partmap-specific
8807 knowledge (supports PC/MSDOS and GPT).
8809 Fix all assumptions that the embed region start at sector 1, using
8810 `embed_region.start' from now on. Similarly, use `embed_region.end'
8811 rather than `first_start' to calculate available size.
8813 In grub_util_info() message, replace "into after the MBR" with an
8814 indication of the specific sector our embed region starts at.
8816 2008-02-19 Robert Millan <rmh@aybabtu.com>
8818 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8819 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8820 `commands/reboot.c'.
8821 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8822 (halt_mod_SOURCES): Likewise.
8823 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8824 (halt_mod_SOURCES): Likewise.
8826 2008-02-17 Christian Franke <franke@computer.org>
8828 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8830 2008-02-17 Robert Millan <rmh@aybabtu.com>
8832 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8833 set `first_start' to 0 for non-PC/MSDOS partition maps.
8835 2008-02-16 Robert Millan <rmh@aybabtu.com>
8837 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8838 do not assume partition map is PC/MSDOS before performing checks that
8839 are specific to that layout.
8841 2008-02-13 Robert Millan <rmh@aybabtu.com>
8843 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8844 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8845 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8847 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8849 * configure.ac: Only a cosmetic change on the handling of
8850 -fno-stack-protector.
8852 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8854 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8855 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8857 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8858 (halt_mod_SOURCES): New variable.
8859 (halt_mod_CFLAGS): Likewise.
8860 (halt_mod_LDFLAGS): Likewise.
8861 (reboot_mod_SOURCES): Likewise.
8862 (reboot_mod_CFLAGS): Likewise.
8863 (reboot_mod_LDFLAGS): Likewise.
8865 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8866 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8868 (halt_mod_SOURCES): Likewise.
8869 (reboot_mod_SOURCES): Likewise.
8871 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8872 commands/i386/pc/reboot.c by commands/reboot.c.
8873 (reboot_mod_SOURCES): Likewise.
8875 * commands/i386/pc/reboot.c: merge this file ...
8877 * commands/ieee1275/reboot.c: ... and this file ...
8879 * commands/reboot.c: ... to this file.
8880 Add some precompiler directive to include the correct header for
8883 * commands/ieee1275/halt.c: move this file ...
8885 * commands/halt.c: ... to here.
8886 Add some precompiler directive to include the correct header for
8889 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8890 (grub_halt): Likewise.
8892 * kern/efi/efi.c (grub_reboot): New function.
8893 (grub_halt): Likewise.
8895 2008-02-12 Robert Millan <rmh@aybabtu.com>
8897 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8898 /dev (like it is done for /dev/mapper). This doesn't provide support
8899 for EVMS, but at least it is now easy to identify the problem when it
8902 2008-02-11 Robert Millan <rmh@aybabtu.com>
8904 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8905 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8906 comparing it with -1, not 0.
8908 2008-02-10 Robert Millan <rmh@aybabtu.com>
8910 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8912 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8913 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8915 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8916 `disk/lvm.c' to the end of the list.
8917 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8918 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8920 2008-02-10 Robert Millan <rmh@aybabtu.com>
8922 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8923 grub_print_error() instead. This will let user know why we're entering
8925 Based on suggestions from Sam Morris.
8927 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8929 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8930 on remaining N args, instead of "--" arg N times.
8932 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8934 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8935 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8936 pattern for unknown glyphs.
8938 2008-02-09 Robert Millan <rmh@aybabtu.com>
8940 * configure.ac: Probe for `help2man'.
8941 * Makefile.in (builddir): New variable.
8942 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8943 or otherwise add a few flags/options to it.
8944 (install-local): For every executable utility or script that is
8945 installed, invoke $(HELP2MAN) to install a manpage based on --help
8948 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8949 that it doesn't prevent --help from working in build tree.
8951 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8952 with `bug-grub@gnu.org'.
8953 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8954 * util/update-grub.in (usage): New function.
8955 Implement proper argument check, with support for --help and --version
8956 (as well as existing -y).
8958 2008-02-09 Christian Franke <franke@computer.org>
8960 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8961 avoid overwriting previous output.
8962 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8964 2008-02-09 Robert Millan <rmh@aybabtu.com>
8966 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8969 2008-02-09 Robert Millan <rmh@aybabtu.com>
8971 * commands/sleep.c: New file.
8972 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8973 (sleep_mod_SOURCES): New variable.
8974 (sleep_mod_CFLAGS): Likewise.
8975 (sleep_mod_LDFLAGS): Likewise.
8977 2008-02-09 Robert Millan <rmh@aybabtu.com>
8979 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8980 situations in which we can deduce the RAID size and the superblock
8983 2008-02-09 Robert Millan <rmh@aybabtu.com>
8985 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8986 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8987 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8989 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8990 and return a grub_diskmemberlist_t composed of physical array members.
8991 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8993 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8995 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8996 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8997 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8999 * util/grub-probe.c (probe): Move partmap probing code from here ...
9000 (probe_partmap): ... to here.
9001 (probe): Use probe_partmap() once for the disk we're probing, and
9002 additionally, when such disk contains a memberlist() struct member,
9003 once for each disk that is contained in the structure returned by
9006 2008-02-09 Robert Millan <rmh@aybabtu.com>
9008 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9009 environment variable to 'all' in order to obtain debug output from
9011 * util/i386/pc/grub-setup.c (main): Likewise.
9013 2008-02-08 Robert Millan <rmh@aybabtu.com>
9015 * disk/raid.c (grub_raid_scan_device): Check for
9016 `array->device[sb.this_disk.number]' rather than for
9017 `array->device[sb.this_disk.number]->name', since the latter is not
9018 guaranteed to be accessible.
9020 2008-02-08 Robert Millan <rmh@aybabtu.com>
9022 * disk/raid.c: Update copyright.
9023 * fs/cpio.c: Likewise.
9024 * include/grub/raid.h: Likewise.
9025 * loader/i386/pc/multiboot.c: Likewise.
9026 * util/hostfs.c: Likewise.
9028 2008-02-08 Robert Millan <rmh@aybabtu.com>
9030 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9031 to a grub_disk_t array.
9032 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9034 (grub_raid_scan_device): Replace `device[x].name' accesses with
9035 `device[x]->name'. Simplify initialization of `array->device[x]'.
9037 2008-02-08 Robert Millan <rmh@aybabtu.com>
9039 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9040 grub_dprintf() calls.
9041 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9044 2008-02-07 Christian Franke <franke@computer.org>
9046 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9047 instead of fseek and ftell to support large files.
9048 (grub_hostfs_read): Likewise.
9050 2008-02-07 Robert Millan <rmh@aybabtu.com>
9052 Patch from Jeroen Dekkers.
9053 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
9054 failure, since successfully reading all array members might not be
9057 2008-02-06 Robert Millan <rmh@aybabtu.com>
9059 * util/grub-probe.c (probe): Simplify partmap probing (with the
9060 assumption that the first word up to the underscore equals to
9063 2008-02-06 Christian Franke <franke@computer.org>
9065 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9066 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9067 last block of a cpio or tar stream.
9068 Check for "TRAILER!!!" instead of any empty data
9069 block to detect last block of a cpio stream.
9070 (grub_cpio_dir): Fix constness of variable np.
9071 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9072 cpio or tar trailer is detected. This fixes a crash
9073 on open of a non existing file.
9075 2008-02-05 Bean <bean123ch@gmail.com>
9077 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9079 (grub_multiboot_load_elf64): Likewise.
9080 (grub_multiboot): Initialize mbi structure.
9082 * util/grub-fstest.c: Don't include unused header file script.h.
9084 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9086 (grub_fstest_SOURCES): Likewise.
9088 2008-02-05 Robert Millan <rmh@aybabtu.com>
9090 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9091 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9092 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9093 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9095 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9096 (translation_table): Replace hardcoded values with macros
9097 provided by `<grub/term.h>'.
9099 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9100 (keyboard_map): Correct/add a few values, with macros provided
9102 (keyboard_map_shift): Zero values that don't differ from their
9103 `keyboard_map' equivalents.
9104 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9105 Discard the second scan code that is always sent by Caps lock.
9106 Only use `keyboard_map_shift' when it provides a non-zero value,
9107 otherwise fallback to `keyboard_map'.
9109 2008-02-04 Bean <bean123ch@gmail.com>
9111 * Makefile.in (enable_grub_fstest): New variable.
9113 * conf/common.rmk (grub_fstest_init.lst): New rule.
9114 (grub_fstest_init.h): Likewise.
9115 (grub_fstest_init.c): Likewise.
9116 (util/grub-fstest.c_DEPENDENCIES): New variable.
9117 (grub_fstest_SOURCES): Likewise.
9119 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9121 * util/grub-fstest.c: New file.
9123 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9125 Make grub-setup handle a separate root device.
9127 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9128 so that the root device can be compared with the destination
9130 When embedding the core image, if the root and destination devices
9131 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9133 When not embedding, set ROOT_DRIVE to 0xFF.
9135 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9137 Add support for having a grub directory in a different drive. This
9138 is still only the data handling part.
9140 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9141 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9142 (grub_root_drive): New variable.
9144 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9145 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9146 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9149 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9151 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9153 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9155 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9156 is bogus, because PXE booting does not specify any drive
9159 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9160 am not sure if this is really correct.
9162 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9163 is always identical to the boot drive when booting from a CD.
9165 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9167 (root_drive): New variable.
9168 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9169 (setup_sectors): Push %dx right after popping it, because %dh will
9171 (copy_buffer): Restore %dx.
9173 2008-02-03 Robert Millan <rmh@aybabtu.com>
9175 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9176 use `cdboot.img' for cdrom images.
9178 2008-02-03 Robert Millan <rmh@aybabtu.com>
9180 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9181 only setup gfxterm when `font' command has succeeded.
9183 2008-02-03 Robert Millan <rmh@aybabtu.com>
9185 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9186 (grub_rescue_cmd_multiboot_loader)
9187 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9189 2008-02-03 Pavel Roskin <proski@gnu.org>
9191 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9192 %edx and %esi from stack only after grub_gate_a20() is called.
9193 grub_gate_a20() clobbers %edx.
9195 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9197 * configure.ac (AC_INIT): Bumped to 1.96.
9199 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9200 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9201 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9202 video/readers/png.c.
9204 2008-02-03 Bean <bean123ch@gmail.com>
9206 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9207 (cdboot_img_SOURCES): New variable.
9208 (cdboot_img_ASFLAGS): New variable.
9209 (cdboot_img_LDFLAGS): New variable.
9211 * boot/i386/pc/cdboot.S: New file.
9213 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9214 (cd_count): Likewise.
9215 (grub_biosdisk_get_drive): Add support for cd device.
9216 (grub_biosdisk_call_hook): Likewise.
9217 (grub_biosdisk_iterate): Likewise.
9218 (grub_biosdisk_open): Likewise.
9219 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9220 (grub_biosdisk_rw): Support reading from cd device.
9221 (GRUB_MOD_INIT): Iterate cd devices.
9223 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9224 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9225 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9227 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9229 2008-02-02 Robert Millan <rmh@aybabtu.com>
9231 * commands/read.c: New file.
9232 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9233 (read_mod_SOURCES): New variable.
9234 (read_mod_CFLAGS): Likewise.
9235 (read_mod_LDFLAGS): Likewise.
9237 2008-02-02 Robert Millan <rmh@aybabtu.com>
9239 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9240 determining whether menu has to be displayed.
9242 2008-02-02 Marco Gerards <marco@gnu.org>
9244 * bus/pci.c: New file.
9246 * include/grub/pci.h: Likewise.
9248 * include/grub/i386/pc/pci.h: Likewise.
9250 * commands/lspci.c: Likewise.
9252 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9254 (pci_mod_SOURCES): New variable.
9255 (pci_mod_CFLAGS): Likewise.
9256 (pci_mod_LDFLAGS): Likewise.
9257 (lspci_mod_SOURCES): Likewise.
9258 (lspci_mod_CFLAGS): Likewise.
9259 (lspci_mod_LDFLAGS): Likewise.
9261 2008-02-02 Bean <bean123ch@gmail.com>
9263 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9264 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9266 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9267 (grub_xfs_btree_node): New structure.
9268 (grub_xfs_btree_root): New structure.
9269 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9270 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9271 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9272 (GRUB_XFS_EXTENT_SIZE): Likewise.
9273 (grub_xfs_read_block): Support btree format type.
9274 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9275 Use directory block as basic unit.
9277 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9279 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9280 __attribute__ ((__regparm__ (1))).
9282 2008-02-01 Robert Millan <rmh@aybabtu.com>
9284 Correct a mistake in previous commit.
9286 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9288 (normal/command.c_DEPENDENCIES): New variable.
9290 2008-02-01 Robert Millan <rmh@aybabtu.com>
9292 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9294 (normal/command.c_DEPENDENCIES): New variable.
9295 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9296 * conf/i386-ieee1275.rmk: Likewise.
9297 * conf/i386-linuxbios.rmk: Likewise.
9298 * conf/i386-pc.rmk: Likewise.
9299 * conf/sparc64-ieee1275.rmk: Likewise.
9300 * conf/powerpc-ieee1275.rmk: Likewise.
9301 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9303 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9305 2008-02-01 Robert Millan <rmh@aybabtu.com>
9307 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9308 call at beginning of function.
9310 2008-01-31 Pavel Roskin <proski@gnu.org>
9312 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9313 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9314 (grub_mkrescue_SOURCES): Likewise.
9315 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9317 2008-01-30 Robert Millan <rmh@aybabtu.com>
9319 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9320 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9321 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9322 (grub_probe_SOURCES): ... to here.
9324 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9325 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9326 * conf/i386-ieee1275.rmk: Likewise.
9327 * conf/i386-linuxbios.rmk: Likewise.
9328 * conf/powerpc-ieee1275.rmk: Likewise.
9330 2008-01-30 Tristan Gingold <gingold@free.fr>
9332 * kern/rescue.c: Silently accept empty lines.
9334 2008-01-29 Bean <bean123ch@gmail.com>
9336 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9337 (real_code_2): Code cleanup and change comment style.
9338 (move_memory): Avoid using 32-bit address mode.
9340 2008-01-29 Bean <bean123ch@gmail.com>
9342 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9343 (png_mod_SOURCES): New variable.
9344 (png_mod_CFLAGS): Likewise.
9345 (png_mod_LDFLAGS): Likewise.
9347 * video/readers/png.c: New file.
9349 2008-01-28 Robert Millan <rmh@aybabtu.com>
9351 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9352 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9353 `ifndef GRUB_MOD_GAP' hack.
9354 * util/elf/grub-mkimage.c (add_segments): Likewise.
9356 2008-01-27 Robert Millan <rmh@aybabtu.com>
9358 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9359 `GRUB_MOD_GAP' for platforms in which it's not defined.
9360 * util/elf/grub-mkimage.c (add_segments): Likewise.
9362 2008-01-27 Robert Millan <rmh@aybabtu.com>
9364 Get grub-emu to build again (including parallel builds).
9366 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9368 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9369 (normal/execute.c_DEPENDENCIES): ... this, ...
9370 (grub-emu_DEPENDENCIES): ... and this.
9372 * conf/i386-efi.rmk: Likewise.
9373 * conf/i386-linuxbios.rmk: Likewise.
9374 * conf/i386-ieee1275.rmk: Likewise.
9375 * conf/powerpc-ieee1275.rmk: Likewise.
9376 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9378 2008-01-27 Robert Millan <rmh@aybabtu.com>
9380 * NEWS: Add a few items.
9382 2008-01-27 Robert Millan <rmh@aybabtu.com>
9384 Fix parallel builds with grub-emu. Based on earlier commit for
9385 grub-probe and grub-setup.
9387 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9388 (util/grub-emu.c_DEPENDENCIES): ... this.
9389 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9390 (util/grub-emu.c_DEPENDENCIES): ... this.
9391 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9392 (util/grub-emu.c_DEPENDENCIES): ... this.
9393 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9394 (util/grub-emu.c_DEPENDENCIES): ... this.
9395 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9396 (util/grub-emu.c_DEPENDENCIES): ... this.
9398 2008-01-27 Pavel Roskin <proski@gnu.org>
9400 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9401 to create a gap between _end and the modules added to the image
9402 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9403 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9404 * util/elf/grub-mkimage.c (add_segments): Likewise.
9406 2008-01-26 Pavel Roskin <proski@gnu.org>
9408 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9409 just return an error.
9411 2008-01-26 Bean <bean123ch@gmail.com>
9413 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9414 (grub_reiserfs_get_item): Save offset of the next item.
9415 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9417 2008-01-25 Robert Millan <rmh@aybabtu.com>
9419 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9420 make all filesystem sources appear together (possibly fixing omissions
9422 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9423 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9424 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9427 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9429 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9430 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9431 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9432 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9434 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9435 (probe): Add a sanity check to make sure of our ability to read
9436 requested files when probing for filesystem type.
9438 * genmk.rb: Update copyright year (2007).
9440 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9441 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9442 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9443 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9444 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9445 : Remove function prototypes.
9447 2008-01-25 Robert Millan <rmh@aybabtu.com>
9449 Revert my previous commits (based on wrong assumption of how grub_errno
9452 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9453 * kern/file.c (grub_file_open): Likewise.
9455 2008-01-24 Pavel Roskin <proski@gnu.org>
9457 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9458 that hang if GRUB tries to setup colors.
9459 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9460 colors for firmwares that don't support it.
9461 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9462 Recognize Open Hack'Ware, set flags to work around its
9465 2008-01-24 Robert Millan <rmh@aybabtu.com>
9467 * kern/file.c (grub_file_open): Do not account previous failures of
9468 unrelated functions when grub_errno is checked for.
9469 Reported by Oleg Strikov.
9471 2008-01-24 Bean <bean123ch@gmail.com>
9473 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9474 (grub_ufs_sblock): New member volume name.
9475 (grub_ufs_find_file): Fix string copy bug.
9476 (grub_ufs_label): Implement this function properly.
9478 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9479 (grub_hfs_iterate_records): Use the correct file number for extents
9480 and catalog file. Fix problem in next index calculation.
9481 (grub_hfs_find_node): Replace recursive function call with loop.
9482 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9484 2008-01-23 Robert Millan <rmh@aybabtu.com>
9486 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9487 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9488 (grub_multiboot2_real_boot): New function prototype.
9490 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9491 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9493 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9494 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9496 2008-01-23 Robert Millan <rmh@aybabtu.com>
9498 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9499 #ifdef'ed out grub_printf().
9501 2008-01-23 Robert Millan <rmh@aybabtu.com>
9503 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9504 grub_dprintf calls, since they make "debug=all" mode unusable.
9505 (grub_console_checkkey): Likewise.
9507 2008-01-23 Robert Millan <rmh@aybabtu.com>
9509 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9510 `term/i386/pc/at_keyboard.c'.
9511 (pkglib_MODULES): Add `serial.mod'.
9512 (serial_mod_SOURCES): New variable.
9513 (serial_mod_CFLAGS): Likewise.
9514 (serial_mod_LDFLAGS): Likewise.
9516 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9517 `<grub/powerpc/ieee1275/console.h>'.
9518 (grub_keyboard_controller_init): New function prototype.
9519 (grub_console_checkkey): Likewise.
9520 (grub_console_getkey): Likewise.
9522 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9525 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9526 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9528 2008-01-23 Robert Millan <rmh@aybabtu.com>
9530 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9531 present, "(memdisk)/boot/grub" becomes the default prefix.
9533 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9534 a memdisk tarball with all the modules. Add --overlay=DIR option that
9535 allows users to overlay additional files into the image.
9537 2008-01-23 Robert Millan <rmh@aybabtu.com>
9539 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9540 and `machine/memory.h'.
9541 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9542 (_multiboot_mod_SOURCES): New variable.
9543 (_multiboot_mod_CFLAGS): Likewise.
9544 (_multiboot_mod_LDFLAGS): Likewise.
9545 (multiboot_mod_SOURCES): Likewise.
9546 (multiboot_mod_CFLAGS): Likewise.
9547 (multiboot_mod_LDFLAGS): Likewise.
9549 * include/grub/i386/ieee1275/loader.h: New file.
9551 * include/grub/i386/ieee1275/machine.h: Likewise.
9553 * include/grub/i386/ieee1275/memory.h: Likewise.
9555 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9556 variable declaration.
9557 (grub_os_area_size): Likewise.
9559 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9560 (grub_lower_mem, grub_upper_mem): New variables.
9561 (grub_stop_floppy): New function (just to make
9562 grub_multiboot2_real_boot() happy).
9564 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9565 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9566 (grub_stop): New function.
9567 Include `"../realmode.S"' and `"../loader.S"'.
9569 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9570 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9572 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9573 rely on grub_multiboot2_real_boot() for final boot.
9575 2008-01-22 Robert Millan <rmh@aybabtu.com>
9577 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9578 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9579 device that doesn't look like an SD card.
9580 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9581 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9582 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9583 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9586 2008-01-22 Robert Millan <rmh@aybabtu.com>
9588 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9589 avoid claiming over our own code.
9591 2008-01-22 Bean <bean123ch@gmail.com>
9593 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9594 (jpeg_mod_SOURCES): New variable.
9595 (jpeg_mod_CFLAGS): Likewise.
9596 (jpeg_mod_LDFLAGS): Likewise.
9598 * video/readers/jpeg.c : New file.
9600 2008-01-22 Bean <bean123ch@gmail.com>
9602 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9603 there are no more items.
9605 2008-01-21 Robert Millan <rmh@aybabtu.com>
9607 * kern/mm.c (grub_mm_init_region): Improve debug message.
9609 2008-01-21 Robert Millan <rmh@aybabtu.com>
9611 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9612 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9614 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9616 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9617 Indicates start of upper memory.
9618 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9619 (generate_image): Abort when image size is big enough to corrupt
9622 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9623 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9624 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9625 instead of hardcoding 0xA0000.
9626 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9627 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9628 instead of hardcoding 0xA0000.
9630 2008-01-21 Robert Millan <rmh@aybabtu.com>
9632 * disk/memdisk.c (memdisk_size): New variable.
9633 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9635 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9636 image to dynamic memory.
9637 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9638 `memdisk_size'. Free memdisk block.
9640 2008-01-21 Robert Millan <rmh@aybabtu.com>
9642 Fix detection of very small filesystems (like tar).
9644 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9645 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9646 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9647 a problem with this disk).
9649 2008-01-21 Robert Millan <rmh@aybabtu.com>
9651 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9652 on grub_biosdisk_rw_standard() error.
9654 2008-01-21 Robert Millan <rmh@aybabtu.com>
9656 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9658 * kern/elf.c: Likewise.
9659 * kern/ieee1275/ieee1275.c: Likewise.
9660 * kern/powerpc/ieee1275/openfw.c: Likewise.
9661 * term/ieee1275/ofconsole.c: Likewise.
9663 2008-01-21 Robert Millan <rmh@aybabtu.com>
9665 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9667 * include/grub/kernel.h (grub_arch_memdisk_addr)
9668 (grub_arch_memdisk_size): Moved from here ...
9670 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9671 (grub_arch_memdisk_size): ... to here.
9673 2008-01-21 Robert Millan <rmh@aybabtu.com>
9675 Mostly based on bugfix from Bean.
9677 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9678 attribute with hook() parameter.
9679 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9681 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9682 attribute with hook() parameter.
9683 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9686 2008-01-21 Robert Millan <rmh@aybabtu.com>
9688 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9689 (pkglib_MODULES): Add `memdisk.mod'.
9690 (memdisk_mod_SOURCES): New variable.
9691 (memdisk_mod_CFLAGS): Likewise.
9692 (memdisk_mod_LDFLAGS): Likewise.
9694 * disk/memdisk.c: New file.
9696 * include/grub/disk.h (grub_disk_dev_id): Add
9697 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9699 * include/grub/i386/pc/kernel.h
9700 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9701 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9702 (grub_kernel_image_size): New variable declaration.
9703 (grub_total_module_size): Likewise.
9704 (grub_memdisk_image_size): Likewise.
9706 * include/grub/i386/pc/memory.h
9707 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9709 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9710 (grub_arch_memdisk_addr): New variable declaration.
9711 (grub_arch_memdisk_size): Likewise.
9713 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9714 (grub_arch_memdisk_size): Likewise.
9716 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9717 (codestart): Replace hardcoded `0x100000' with
9718 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9720 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9721 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9722 not NULL, append the contents of the file it refers to, at the end of
9723 the compressed kernel image. Initialize `grub_memdisk_image_size'
9724 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9725 (options): Add "memdisk"|'m' option.
9726 (main): Parse --memdisk|-m option, and pass user-provided path as
9727 parameter to generate_image().
9729 2008-01-20 Robert Millan <rmh@aybabtu.com>
9731 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9732 grub_dprintf() calls from here ...
9733 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9735 2008-01-20 Robert Millan <rmh@aybabtu.com>
9737 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9739 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9741 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9742 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9743 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9744 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9746 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9747 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9749 2008-01-19 Robert Millan <rmh@aybabtu.com>
9751 Get rid of confusing function (superseded by
9752 `grub_ieee1275_get_integer_property')
9753 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9755 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9757 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9758 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9759 in native endianness from grub_ieee1275_get_integer_property().
9761 2008-01-19 Robert Millan <rmh@aybabtu.com>
9763 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9764 command after "shut-down", since implementations differ on which
9765 the command for halt is.
9767 2008-01-19 Robert Millan <rmh@aybabtu.com>
9769 * include/grub/i386/linuxbios/console.h: Add header protection.
9770 (grub_keyboard_controller_init): New function prototype.
9771 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9772 (KEYBOARD_COMMAND_READ): Likewise.
9773 (KEYBOARD_COMMAND_WRITE): Likewise.
9774 (KEYBOARD_SCANCODE_SET1): Likewise.
9775 (grub_keyboard_controller_write): New function.
9776 (grub_keyboard_controller_read): Likewise.
9777 (grub_keyboard_controller_init): Likewise.
9779 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9780 (grub_console_init): On coreboot/LinuxBIOS, call
9781 grub_keyboard_controller_init().
9783 2008-01-19 Robert Millan <rmh@aybabtu.com>
9785 PowerPC changes provided by Pavel Roskin.
9787 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9788 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9789 don't rely on cmain() doing it.
9790 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9791 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9793 2008-01-16 Robert Millan <rmh@aybabtu.com>
9795 * include/grub/i386/linuxbios/memory.h
9796 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9797 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9798 receive `table_header' as argument. Instead, probe for it in the
9799 known memory ranges where it can be present.
9800 (grub_available_iterate): Do not pass a fixed `table_header' address
9801 to grub_linuxbios_table_iterate().
9803 2008-01-15 Robert Millan <rmh@aybabtu.com>
9805 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9806 * conf/i386-ieee1275.rmk: New file.
9807 * include/grub/i386/ieee1275/console.h: Likewise.
9808 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9809 * include/grub/i386/ieee1275/kernel.h: Likewise.
9810 * include/grub/i386/ieee1275/time.h: Likewise.
9811 * kern/i386/ieee1275/init.c: Likewise.
9812 * kern/i386/ieee1275/startup.S: Likewise.
9814 2008-01-15 Robert Millan <rmh@aybabtu.com>
9816 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9817 when pointers are 32-bit (but still do set it to one when they are
9820 2008-01-15 Robert Millan <rmh@aybabtu.com>
9822 * include/grub/ieee1275/ieee1275.h
9823 (grub_ieee1275_get_integer_property): New function prototype.
9825 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9826 (grub_ieee1275_get_integer_property): New function. Wraps around
9827 grub_ieee1275_get_property() to handle endianness.
9829 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9830 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9832 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9833 (grub_map): Likewise.
9834 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9836 2008-01-15 Bean <bean123ch@gmail.com>
9838 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9839 (grub_script_execute_cmdline): Reset grub_errno.
9841 * normal/main.c (read_config_file): Reset grub_errno.
9843 * normal/parse.y (script_init): New.
9844 (script): Move function and menuentry here.
9846 (command): Add delimiter at the end of command.
9847 (commands): Adjust to match the new command.
9848 (commandblock): Remove grub_script_lexer_record_start.
9849 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9850 (if): Use the new commands.
9852 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9854 2008-01-15 Robert Millan <rmh@aybabtu.com>
9856 * normal/menu.c (run_menu): Move timeout message from here ...
9857 (print_timeout): ... to here.
9858 (run_menu): Use print_timeout() once during initial draw to print
9859 the whole message, and again in every clock tick to update only
9860 the number of seconds.
9862 2008-01-15 Robert Millan <rmh@aybabtu.com>
9864 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9865 actual size of `available' from grub_ieee1275_get_property(), and
9866 restrict parsing to that bound.
9868 2008-01-15 Christian Franke <franke@computer.org>
9870 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9871 (argp_program_version): Remove variable.
9872 (argp_program_bug_address): Likewise.
9873 (options): Convert from struct argp_option to struct option.
9874 (struct arguments): Remove.
9875 (parse_opt): Remove.
9876 (usage): New function.
9877 (main): Replace struct args members by simple variables.
9878 Replace argp_parse() by getopt_long().
9879 Add switch to evaluate options.
9880 Add missing "(...)" around root_dev in prefix string.
9882 2008-01-14 Robert Millan <rmh@aybabtu.com>
9884 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9885 for grub_ieee1275_exit(), in order to improve portability.
9887 2008-01-14 Robert Millan <rmh@aybabtu.com>
9889 * util/grub.d/10_linux.in (prefix): Define.
9890 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9892 2008-01-13 Pavel Roskin <proski@gnu.org>
9894 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9895 grub_errno if no errors have been detected.
9897 2008-01-12 Robert Millan <rmh@aybabtu.com>
9899 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9900 (grub_util_get_dev_abstraction): New function prototype.
9902 * util/getroot.c: Include `<grub/util/getroot.h>'
9903 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9904 (grub_util_get_dev_abstraction): ... here (new function).
9906 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9907 `PRINT_ABSTRACTION'.
9908 (probe): Probe for abstraction type when requested.
9909 (main): Understand `--target=abstraction'.
9911 * util/i386/efi/grub-install.in: Add abstraction module to core
9912 image when it is found to be necessary.
9913 * util/i386/pc/grub-install.in: Likewise.
9914 * util/powerpc/ieee1275/grub-install.in: Likewise.
9916 * util/update-grub_lib.in (font_path): Return system path without
9917 converting to GRUB path.
9918 * util/update-grub.in: Convert system path returned by font_path()
9919 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9920 abstraction module is needed for loading fonts (if any). Export
9921 that as `GRUB_PRELOAD_MODULES'.
9922 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9925 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9927 Remove some unused code from reiserfs.
9929 * fs/reiserfs.c (struct grub_reiserfs_key)
9930 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9931 (struct grub_reiserfs_node_body): Removed.
9932 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9934 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9936 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9938 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9940 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9942 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9944 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9945 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9946 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9948 2008-01-10 Robert Millan <rmh@aybabtu.com>
9950 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9951 Determines if a file is garbage left by packaging systems, etc.
9952 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9953 for processing /etc/grub.d scripts.
9954 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9955 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9956 as a condition for processing Linux images.
9958 2008-01-10 Pavel Roskin <proski@gnu.org>
9960 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9961 to compile reiserfs.c on PowerPC.
9963 2008-01-10 Robert Millan <rmh@aybabtu.com>
9965 * kern/device.c (grub_device_iterate): Do not abort device iteration
9966 when one of the devices cannot be opened.
9967 * kern/disk.c (grub_disk_open): Do not account previous failures of
9968 unrelated functions when grub_errno is checked for.
9970 2008-01-08 Robert Millan <rmh@aybabtu.com>
9972 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9973 `! grub_linux_is_bzimage', change order of address comparison to make
9974 it more intuitive, and improve "too big zImage" error message.
9976 2008-01-08 Robert Millan <rmh@aybabtu.com>
9978 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9979 `$(update-grub_DATA)'.
9980 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9983 2008-01-07 Robert Millan <rmh@aybabtu.com>
9985 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9986 which instruction is modified by grub-setup during installation
9987 (since it wasn't obvious by only looking at this file).
9989 2008-01-07 Robert Millan <rmh@aybabtu.com>
9991 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9992 listing actual TODO items.
9994 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9996 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9998 (grub_reiserfs_get_key_offset): Likewise.
9999 (grub_reiserfs_set_key_offset): Likewise.
10000 (grub_reiserfs_set_key_type): Likewise.
10001 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
10003 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10004 better to remove the bitfield version completely.
10006 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10008 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10009 allocated from the heap, due to the fshelp implementation.
10010 (grub_reiserfs_dir): Free NODE, due to the same reason.
10012 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10014 Mostly from Vincent Pelletier:
10016 * fs/reiserfs.c: New file.
10018 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10019 (reiserfs_mod_SOURCES): New variable.
10020 (reiserfs_mod_CFLAGS): Likewise.
10021 (reiserfs_mod_LDFLAGS): Likewise.
10023 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10024 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10025 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10028 2008-01-06 Robert Millan <rmh@aybabtu.com>
10030 * normal/color.c: Remove `<grub/env.h>'.
10032 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10034 * include/grub/normal.h: Include <grub/env.h>.
10036 2008-01-05 Robert Millan <rmh@aybabtu.com>
10038 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10039 usage example with `(hd0,1)'.
10040 Reported by Samuel Thibault.
10042 2008-01-05 Robert Millan <rmh@aybabtu.com>
10044 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10045 (grub_linux_boot_zimage): Rename to ...
10046 (grub_linux_boot): ... this.
10047 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10048 (grub_linux_boot_zimage): Conditionalize zImage copy.
10050 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10051 (grub_linux_boot_bzimage): Remove prototype.
10052 (grub_linux_boot_zimage): Rename to ...
10053 (grub_linux_boot): ... this.
10055 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10056 (grub_linux_boot): Remove function.
10058 2008-01-05 Robert Millan <rmh@aybabtu.com>
10060 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10061 (grub_env_write_color_highlight): Likewise.
10062 (grub_wait_after_message): Likewise.
10064 * normal/color.c: New file.
10066 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10067 (normal_mod_DEPENDENCIES): Likewise.
10069 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10070 (normal_mod_DEPENDENCIES): Likewise.
10072 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10073 (normal_mod_DEPENDENCIES): Likewise.
10075 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10076 (normal_mod_DEPENDENCIES): Likewise.
10078 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10079 for waiting after a message is printed.
10080 * normal/main.c (read_config_file): Likewise.
10081 (grub_normal_init): Register grub_env_write_color_normal() and
10082 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10083 `color_highlight' variables as global.
10085 * normal/menu.c (grub_wait_after_message): New function.
10086 (grub_color_menu_normal): New variable. Replaces ...
10087 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10088 (grub_color_menu_highlight): New variable. Replaces ...
10089 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10090 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10091 `GRUB_TERM_COLOR_STANDARD'.
10092 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10093 `normal_code' and `highlight_code' to `old_color_normal' and
10094 `old_color_highlight', respectively.
10095 (grub_menu_init_page): Update colors when drawing the menu, based on
10096 `menu_color_normal' and `menu_color_highlight' variables.
10097 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10098 a message is printed.
10100 2008-01-05 Robert Millan <rmh@aybabtu.com>
10102 * kern/env.c (grub_env_context_open): Propagate hooks for global
10103 variables to new context.
10105 * kern/main.c (grub_set_root_dev): Export `root' variable.
10107 2008-01-05 Robert Millan <rmh@aybabtu.com>
10109 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10110 discs unconditionally, since udev and others have options to provide
10113 2008-01-05 Robert Millan <rmh@aybabtu.com>
10115 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10117 2008-01-04 Christian Franke <franke@computer.org>
10119 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10122 2008-01-03 Pavel Roskin <proski@gnu.org>
10124 * kern/i386/linuxbios/init.c: Put "void" to all function
10125 declarations with no arguments.
10126 * kern/powerpc/ieee1275/init.c: Likewise.
10127 * term/i386/pc/at_keyboard.c: Likewise.
10128 * term/i386/pc/vga_text.c: Likewise.
10129 * util/grub-mkdevicemap.c: Likewise.
10131 2008-01-02 Robert Millan <rmh@aybabtu.com>
10133 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10134 message when loaded image is out of bounds.
10135 (grub_multiboot_load_elf64): Likewise.
10137 2008-01-02 Pavel Roskin <proski@gnu.org>
10139 * util/grub.d/10_linux.in: Try version without ".old" when
10140 looking for initrd. It's better to use initrd from the newer
10141 kernel of the same version than no initrd at all.
10143 2008-01-01 Robert Millan <rmh@aybabtu.com>
10145 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10147 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10149 * include/grub/video.h: Added grub_video_unmap_color and
10150 grub_video_get_active_render_target.
10151 (grub_video_adapter): Added unmap_color and get_active_render_target.
10153 * video/video.c: Added grub_video_unmap_color and
10154 grub_video_get_active_render_target.
10155 (grub_video_get_info): Changed method to accept NULL pointer as an
10156 argument to allow detection of active video adapter.
10158 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10159 grub_video_vbe_unmap_color_int.
10160 Added grub_video_vbe_unmap_color and
10161 grub_video_vbe_get_active_render_target.
10162 (grub_video_vbe_adapter): Added unmap_color and
10163 get_active_render_target.
10165 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10166 with grub_video_vbe_unmap_color_int.
10168 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10169 (DEFAULT_NORMAL_COLOR): Likewise.
10170 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10171 (DEFAULT_FG_COLOR): Removed.
10172 (DEFAULT_BG_COLOR): Likewise.
10173 (DEFAULT_CURSOR_COLOR): Changed value.
10174 (grub_virtual_screen): Added standard_color_setting,
10175 normal_color_setting, highlight_color_setting and term_color.
10176 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10177 (bitmap_width): Added.
10178 (bitmap_height): Likewise.
10179 (bitmap): Likewise.
10180 (set_term_color): Likewise.
10181 (grub_virtual_screen_setup): Changed to use new terminal coloring
10183 (grub_gfxterm_init): Added init for bitmap.
10184 (grub_gfxterm_fini): Added destroy for bitmap.
10185 (redraw_screen_rect): Updated to use background bitmap and new
10187 (scroll_up): Added optimization for case when there is no bitmap.
10188 (grub_gfxterm_cls): Fixed to use correct background color.
10189 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10191 (grub_virtual_screen_setcolor): Likewise.
10192 (grub_virtual_screen_getcolor): Added.
10193 (grub_gfxterm_background_image_cmd): Likewise.
10194 (grub_video_term): Added setcolor and getcolor.
10195 (MOD_INIT): Added registration of background_image command.
10196 (MOD_TERM): Added unregistration for background_image command.
10198 2007-12-30 Pavel Roskin <proski@gnu.org>
10200 * loader/multiboot_loader.c: Fix multiboot command
10201 unregistration. Fix all typos in the word "multiboot".
10203 2007-12-29 Pavel Roskin <proski@gnu.org>
10205 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10206 support for initrd names used in Fedora.
10208 2007-12-26 Bean <bean123ch@gmail.com>
10210 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10211 (cpio_mod_SOURCES): New variable.
10212 (cpio_mod_CFLAGS): Likewise.
10213 (cpio_mod_LDFLAGS): Likewise.
10215 * fs/cpio.c: New file.
10217 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10219 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10221 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10223 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10225 2007-12-25 Robert Millan <rmh@aybabtu.com>
10227 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10228 (grub_getcolor): New function.
10230 * kern/term.c (grub_getcolor): New function.
10231 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10232 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10233 (print_entry): Set normal and highlight colors to
10234 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10235 respectively, before printing and restore them to old
10237 (grub_menu_init_page): Likewise. Fill an additional colored space
10238 that would otherwise be left blank.
10240 * term/efi/console.c (grub_console_getcolor): New function.
10241 (struct grub_console_term.getcolor): New variable.
10242 * term/i386/pc/console.c (grub_console_getcolor): New function.
10243 (struct grub_console_term.getcolor): New variable.
10244 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10245 (struct grub_console_term.getcolor): New variable.
10247 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10248 (struct grub_console_term.setcolor): Remove variable.
10249 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10250 (struct grub_console_term.setcolor): Remove variable.
10251 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10252 (struct grub_console_term.setcolor): Remove variable.
10253 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10254 (struct grub_console_term.setcolor): Remove variable.
10256 2007-12-25 Robert Millan <rmh@aybabtu.com>
10258 * configure.ac: Search for possible unifont.hex locations, and
10259 define UNIFONT_HEX if found.
10261 * Makefile.in (UNIFONT_HEX): Define variable.
10262 (DATA): Rename to ...
10263 (PKGLIB): ... this. Update all users.
10264 (PKGDATA): New variable.
10265 (pkgdata_IMAGES): Rename to ...
10266 (pkglib_IMAGES): ... this. Update all users.
10267 (pkgdata_MODULES): Rename to ...
10268 (pkglib_MODULES): ... this. Update all users.
10269 (pkgdata_PROGRAMS): Rename to ...
10270 (pkglib_PROGRAMS): ... this. Update all users.
10271 (pkgdata_DATA): Rename to ...
10272 (pkglib_DATA): ... this. Update all users.
10273 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10274 (unicode.pff, ascii.pff): New rules.
10275 (all-local): Add `$(PKGDATA)' dependency.
10276 (install-local): Process `$(PKGDATA)'.
10278 * util/update-grub_lib.in (font_path): Search for *.pff files in
10279 a few more locations, including `${pkgdata}'.
10281 2007-12-23 Robert Millan <rmh@aybabtu.com>
10283 Patch from Bean <bean123ch@gmail.com>:
10284 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10287 2007-12-21 Bean <bean123ch@gmail.com>
10289 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10290 (ntfscomp_mod_SOURCES): New variable.
10291 (ntfscomp_mod_CFLAGS): Likewise.
10292 (ntfscomp_mod_LDFLAGS): Likewise.
10294 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10295 (grub_probe_SOURCES): Likewise.
10296 (grub_emu_SOURCES): Likewise.
10298 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10299 (grub_emu_SOURCES): Likewise.
10301 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10302 (grub_emu_SOURCES): Likewise.
10304 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10305 (grub_emu_SOURCES): Likewise.
10307 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10308 (read_run_list): Renamed to grub_ntfs_read_run_list.
10309 (decomp_nextvcn): Moved to ntfscomp.c.
10310 (decomp_getch): Likewise.
10311 (decomp_get16): Likewise.
10312 (decomp_block): Likewise.
10313 (read_block): Likewise.
10314 (read_data): Partially moved to ntfscomp.c.
10315 (fixup): Change unsigned to grub_uint16_t.
10316 (read_mft): Change unsigned long to grub_uint32_t.
10317 (read_attr): Likewise.
10318 (read_data): Likewise.
10319 (read_run_data): Likewise.
10320 (read_run_list): Likewise.
10321 (read_mft): Likewise.
10323 * fs/ntfscomp.c: New file.
10325 * include/grub/ntfs.h: New file.
10327 2007-12-16 Robert Millan <rmh@aybabtu.com>
10329 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10330 IDE disk check, since Linux is known to support 20 IDE disks.
10331 Reported by Colin Watson.
10333 2007-12-15 Bean <bean123ch@gmail.com>
10335 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10336 (lnxboot_img_SOURCES): New variable.
10337 (lnxboot_img_ASFLAGS): Likewise.
10338 (lnxboot_img_LDFLAGS): Likewise.
10340 * boot/i386/pc/lnxboot.S: New file.
10342 2007-11-24 Pavel Roskin <proski@gnu.org>
10344 * configure.ac: Test if '--build-id=none' is supported by the
10345 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10346 objcopy to generate incorrect binary files (binutils
10347 2.17.50.0.18-1 as shipped by Fedora 8).
10348 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10349 linking, so that build ID doesn't break the test.
10351 2007-11-24 Pavel Roskin <proski@gnu.org>
10353 * include/grub/i386/time.h: use "void" in the argument list
10354 of grub_cpu_idle().
10355 * include/grub/powerpc/time.h: Likewise.
10356 * include/grub/sparc64/time.h: Likewise.
10358 2007-11-18 Christian Franke <franke@computer.org>
10360 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10361 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10362 This fixes the problem that function keys did not work in grub-emu.
10364 2007-11-18 Christian Franke <franke@computer.org>
10366 * disk/host.c (grub_host_open): Remove attribute unused from
10367 name parameter. Add check for "host". This fixes the problem
10368 that grub-emu does not find partitions.
10370 2007-11-18 Christian Franke <franke@computer.org>
10372 * util/hostfs.c (is_dir): New function.
10373 (grub_hostfs_dir): Handle missing dirent.d_type case.
10374 (grub_hostfs_read): Add missing fseek().
10375 (grub_hostfs_label): Clear label pointer. This fixes a crash
10376 of grub-emu on "ls (host)".
10378 2007-11-18 Christian Franke <franke@computer.org>
10380 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10381 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10382 to 64 bit boundary by default.
10384 2007-11-18 Bean <bean123ch@gmail.com>
10386 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10387 (hexdump_mod_SOURCES): New variable.
10388 (hexdump_mod_CFLAGS): Likewise.
10389 (hexdump_mod_LDFLAGS): Likewise.
10391 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10393 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10395 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10399 * include/grub/hexdump.h: New file.
10401 * commands/hexdump.c: New file.
10403 2007-11-10 Robert Millan <rmh@aybabtu.com>
10405 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10406 in grub_outb() calls.
10407 (beep_on): Likewise.
10409 2007-11-10 Christian Franke <franke@computer.org>
10411 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10412 (grub_menu_run): Likewise.
10414 2007-11-10 Robert Millan <rmh@aybabtu.com>
10416 * include/grub/i386/efi/machine.h: New file.
10417 * include/grub/i386/linuxbios/machine.h: Likewise.
10418 * include/grub/i386/pc/machine.h: Likewise.
10419 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10420 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10422 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10423 (serial_hw_io_addr): New variable.
10424 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10425 instead of `(unsigned short *) 0x400'.
10427 2007-11-10 Bean <bean123ch@gmail.com>
10429 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10431 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10433 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10434 (vga_mod_SOURCES): Added.
10435 (vga_mod_CFLAGS): Likewise.
10436 (vga_mod_LDFLAGS): Likewise.
10438 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10440 (set_map_mask): Likewise.
10441 (set_read_map): Likewise.
10442 (set_read_address): Likewise.
10443 (vga_font): Removed variable.
10444 (get_vga_glyph): Removed function.
10445 (invalidate_char): Likewise.
10446 (write_char): Changed to use grub_font_get_glyph() for font
10448 (grub_vga_putchar): Likewise.
10449 (grub_vga_getcharwidth): Likewise.
10451 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10453 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10455 (pxeboot_img_LDFLAGS): Likewise.
10456 (diskboot_img_LDFLAGS): Likewise.
10457 (kernel_img_LDFLAGS): Likewise.
10459 2007-11-06 Robert Millan <rmh@aybabtu.com>
10461 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10462 in grub_outb() calls.
10463 (serial_hw_init): Likewise.
10465 2007-11-05 Robert Millan <rmh@aybabtu.com>
10467 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10468 spaces. Skip non-regular files.
10470 2007-11-05 Robert Millan <rmh@aybabtu.com>
10472 * kern/disk.c (grub_disk_firmware_fini)
10473 (grub_disk_firmware_is_tainted): New variables.
10475 * include/grub/disk.h (grub_disk_firmware_fini)
10476 (grub_disk_firmware_is_tainted): Likewise.
10478 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10479 (grub_disk_biosdisk_fini): ... to here.
10480 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10481 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10482 is set. Register grub_disk_biosdisk_fini() in
10483 `grub_disk_firmware_fini'.
10485 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10486 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10487 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10488 to finish existing firmware disk interface.
10490 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10491 (ata_mod_SOURCES): New variable.
10492 (ata_mod_CFLAGS): Likewise.
10493 (ata_mod_LDFLAGS): Likewise.
10495 2007-11-05 Robert Millan <rmh@aybabtu.com>
10497 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10498 (grub_ata_wait): Reimplement using grub_millisleep().
10500 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10501 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10503 2007-11-03 Marco Gerards <marco@gnu.org>
10505 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10506 (CRTC_ADDR_PORT): New macro.
10507 (CRTC_DATA_PORT): Likewise.
10508 (CRTC_CURSOR): Likewise.
10509 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10510 (CRTC_CURSOR_ADDR_LOW): Likewise.
10511 (update_cursor): New function.
10512 (grub_console_real_putchar): Call `update_cursor'.
10513 (grub_console_gotoxy): Likewise.
10514 (grub_console_cls): Set the default color when clearing the
10516 (grub_console_setcursor): Implemented.
10518 2007-11-03 Marco Gerards <marco@gnu.org>
10520 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10522 (grub_ata_pio_write): Likewise.
10524 (grub_atapi_identify): Wait after issuing an ATA command.
10525 (grub_atapi_packet): Likewise.
10526 (grub_ata_identify): Likewise.
10527 (grub_ata_readwrite): Likewise.
10529 2007-11-03 Marco Gerards <marco@gnu.org>
10531 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10532 (grub_ata_pio_write): Likewise.
10533 (grub_ata_readwrite): Use `grub_error', instead of
10534 returning `grub_errno'.
10536 2007-11-03 Marco Gerards <marco@gnu.org>
10538 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10539 grub_ata_pio_write once for every single sector, instead of for
10542 2007-10-31 Robert Millan <rmh@aybabtu.com>
10544 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10546 * conf/i386-linuxbios.rmk: New file.
10548 * kern/i386/pc/hardware.c: Likewise.
10549 * term/i386/pc/at_keyboard.c: Likewise.
10550 * term/i386/pc/vga_text.c: Likewise.
10552 * include/grub/i386/linuxbios/boot.h: Likewise.
10553 * include/grub/i386/linuxbios/console.h: Likewise.
10554 * include/grub/i386/linuxbios/init.h: Likewise.
10555 * include/grub/i386/linuxbios/kernel.h: Likewise.
10556 * include/grub/i386/linuxbios/loader.h: Likewise.
10557 * include/grub/i386/linuxbios/memory.h: Likewise.
10558 * include/grub/i386/linuxbios/serial.h: Likewise.
10559 * include/grub/i386/linuxbios/time.h: Likewise.
10561 * kern/i386/linuxbios/init.c: Likewise.
10562 * kern/i386/linuxbios/startup.S: Likewise.
10563 * kern/i386/linuxbios/table.c: Likewise.
10565 2007-10-31 Marco Gerards <marco@gnu.org>
10567 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10568 (ata_mod_SOURCES): New variable.
10569 (ata_mod_CFLAGS): Likewise.
10570 (ata_mod_LDFLAGS): Likewise.
10572 * disk/ata.c: New file.
10574 * include/grub/disk.h (grub_disk_dev_id): Add
10575 `GRUB_DISK_DEV_ATA_ID'.
10577 2007-10-31 Robert Millan <rmh@aybabtu.com>
10579 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10580 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10582 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10583 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10585 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10588 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10590 2007-10-27 Robert Millan <rmh@aybabtu.com>
10592 * include/grub/types.h (ULONG_MAX): Define macro.
10594 2007-10-22 Robert Millan <rmh@aybabtu.com>
10596 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10598 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10600 2007-10-22 Robert Millan <rmh@aybabtu.com>
10602 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10603 (pkgdata_MODULES): Add `biosdisk.mod'.
10604 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10607 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10608 (grub_biosdisk_init): Replace with ...
10609 (GRUB_MOD_INIT(biosdisk)): ... this.
10610 (grub_biosdisk_fini): Replace with ...
10611 (GRUB_MOD_FINI(biosdisk)): ... this.
10613 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10614 (grub_machine_init): Remove call to grub_biosdisk_init().
10615 (grub_machine_fini): Remove call to grub_machine_fini().
10617 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10619 2007-10-22 Robert Millan <rmh@aybabtu.com>
10621 * include/grub/time.h: New file.
10622 * include/grub/i386/time.h: Likewise.
10623 * include/grub/powerpc/time.h: Likewise.
10624 * include/grub/sparc64/time.h: Likewise.
10626 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10628 (KERNEL_MACHINE_TIME_HEADER): ... this.
10629 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10631 (KERNEL_MACHINE_TIME_HEADER): ... this.
10632 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10634 (KERNEL_MACHINE_TIME_HEADER): ... this.
10636 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10637 (grub_millisleep): New function.
10638 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10639 (grub_millisleep): New function.
10640 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10641 Remove `grub/machine/time.h' include.
10642 (grub_millisleep): New function.
10643 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10644 Remove `grub/machine/time.h' include.
10645 (grub_millisleep): New function.
10647 * include/grub/misc.h (grub_div_roundup): New function.
10649 * kern/misc.c: Include `<grub/time.h>'.
10650 (grub_millisleep_generic): New function.
10652 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10654 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10656 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10657 `machine/time.h'. Add `time.h'.
10658 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10660 2007-10-21 Robert Millan <rmh@aybabtu.com>
10662 * include/grub/misc.h (grub_max): New function.
10664 2007-10-21 Robert Millan <rmh@aybabtu.com>
10666 * util/misc.c (grub_util_info): Call fflush() before returning.
10668 2007-10-20 Robert Millan <rmh@aybabtu.com>
10670 * genmk.rb (Image): Copy `extra_flags' from here ...
10671 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10673 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10674 to `argc' and `args' arguments.
10676 2007-10-17 Robert Millan <rmh@aybabtu.com>
10678 * kern/i386/loader.S: New file.
10680 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10681 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10682 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10683 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10684 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10685 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10686 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10687 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10688 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10689 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10690 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10691 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10692 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10693 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10695 * kern/i386/realmode.S: New file.
10697 * kern/i386/pc/startup.S (protstack): Moved from here ...
10698 * kern/i386/realmode.S (protstack)... to here.
10699 * kern/i386/pc/startup.S (gdt): Moved from here ...
10700 * kern/i386/realmode.S (gdt)... to here.
10701 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10702 * kern/i386/realmode.S (prot_to_real)... to here.
10704 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10705 `kern/i386/realmode.S'.
10707 2007-10-17 Robert Millan <rmh@aybabtu.com>
10709 * include/grub/i386/loader.h: New file.
10711 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10712 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10713 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10714 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10715 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10716 * include/grub/i386/loader.h (grub_linux_prot_size)
10717 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10718 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10719 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10720 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10722 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10724 2007-10-15 Robert Millan <rmh@aybabtu.com>
10726 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10727 filesystem when dev->disk is unset.
10728 Do probe for filesystem even when dev->disk->has_partitions is set.
10729 In case a filesystem is found, always report it.
10730 In case it isn't, if dev->disk->has_partitions is set, report that
10731 a partition table was found instead of reporting that no filesystem
10732 could be identified.
10734 2007-10-12 Robert Millan <rmh@aybabtu.com>
10736 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10737 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10739 * include/grub/types.h (grub_host_to_target16): New macro.
10740 (grub_host_to_target32): Likewise.
10741 (grub_host_to_target64): Likewise.
10742 (grub_target_to_host16): Likewise.
10743 (grub_target_to_host32): Likewise.
10744 (grub_target_to_host64): Likewise.
10746 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10747 Renamed from to ...
10748 (GRUB_MOD_ALIGN): ...this. Update all users.
10750 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10751 grub_host_to_target32.
10752 Replace grub_be_to_cpu32 with grub_target_to_host32.
10753 (load_modules): Likewise.
10754 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10755 Replace grub_be_to_cpu32 with grub_target_to_host32.
10756 Replace grub_cpu_to_be16 with grub_host_to_target16.
10757 Replace grub_cpu_to_be32 grub_host_to_target32.
10759 2007-10-12 Robert Millan <rmh@aybabtu.com>
10761 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10762 * util/elf/grub-mkimage.c: ... here.
10764 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10765 `util/powerpc/ieee1275/grub-mkimage.c'.
10767 2007-10-07 Robert Millan <rmh@aybabtu.com>
10769 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10770 and make it easier to figure out.
10771 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10772 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10773 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10774 leave us with less than HEAP_MIN_SIZE total heap.
10775 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10777 2007-10-03 Robert Millan <rmh@aybabtu.com>
10779 * include/grub/i386/io.h: New file.
10780 * commands/i386/pc/play.c (inb): Removed.
10782 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10784 * term/i386/pc/serial.c (inb): Removed.
10786 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10788 * term/i386/pc/vga.c (inb): Removed.
10790 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10793 2007-10-02 Robert Millan <rmh@aybabtu.com>
10795 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10796 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10797 Reported by Marcin Kurek.
10799 2007-09-07 Robert Millan <rmh@aybabtu.com>
10801 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10802 SmartFirmware version updates (as released by Sven Luther), and avoid
10803 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10804 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10807 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10809 From Hitoshi Ozeki:
10810 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10811 when merging two regions.
10813 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10815 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10816 * normal/completion.c (grub_normal_do_completion): Likewise.
10817 Reported by Hitoshi Ozeki.
10819 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10821 Do not use devices at boot in chainloading.
10823 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10824 (boot_part_addr): Likewise.
10825 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10826 with BOOT_DRIVE and BOOT_PART_ADDR.
10827 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10828 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10830 2007-08-29 Robert Millan <rmh@aybabtu.com>
10832 Patch from Simon Peter <dn.tlp@gmx.net>:
10833 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10834 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10835 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10836 util/i386/pc/grub-setup.c_DEPENDENCIES.
10837 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10838 util/grub-probe.c_DEPENDENCIES.
10839 * conf/powerpc-ieee1275.rmk: Likewise.
10841 2007-08-28 Robert Millan <rmh@aybabtu.com>
10843 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10844 to tell grub-mkdevicemap how to name devices.
10845 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10848 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10849 util/i386/get_disk_name.c.
10850 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10851 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10852 util/ieee1275/get_disk_name.c.
10854 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10856 * DISTLIST: Add util/i386/get_disk_name.c and
10857 util/ieee1275/get_disk_name.c.
10859 * util/grub-mkdevicemap.c: Replace device naming logic with
10860 grub_util_get_disk_name() calls.
10862 2007-08-20 Robert Millan <rmh@aybabtu.com>
10864 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10865 (so that it works for both plural and singular quantities).
10867 2007-08-05 Robert Millan <rmh@aybabtu.com>
10869 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10870 so that [xz] isn't taken into account when determining order.
10872 2007-08-02 Marco Gerards <marco@gnu.org>
10874 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10875 `include/multiboot2.h', `include/grub/elfload.h',
10876 `include/multiboot.h', `include/grub/multiboot.h',
10877 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10878 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10879 `kern/elf.c', `loader/multiboot_loader.c',
10880 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10881 `loader/i386/pc/multiboot2.c',
10882 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10883 `util/i386/pc/grub-mkrescue.in'. Remove
10884 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10885 `include/grub/i386/pc/util/biosdisk.h' and
10886 `include/grub/powerpc/ieee1275/multiboot.h'.
10888 2007-08-02 Bean <bean123ch@gmail.com>
10890 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10891 (ntfs_mod_SOURCES): New variable.
10892 (ntfs_mod_CFLAGS): Likewise.
10893 (ntfs_mod_LDFLAGS): Likewise.
10895 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10896 (grub_probe_SOURCES): Likewise.
10897 (grub_emu_SOURCES): Likewise.
10899 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10900 (grub_emu_SOURCES): Likewise.
10902 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10903 (grub_emu_SOURCES): Likewise.
10905 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10907 * fs/ntfs.c: New file.
10909 2007-08-02 Bean <bean123ch@gmail.com>
10911 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10913 * file.h (grub_file): Likewise.
10915 * fshelp.h (grub_fshelp_read_file): Likewise.
10917 * util/i386/pc/grub-setup.c (setup): Likewise.
10918 (save_first_sector): Likewise.
10919 (save_blocklists): Likewise.
10921 * fs/affs.c (grub_affs_read_file): Likewise.
10923 * fs/ext2.c (grub_ext2_read_file): Likewise.
10925 * fs/fat.c (grub_fat_read_data): Likewise.
10927 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10929 * fs/hfs.c (grub_hfs_read_file): Likewise.
10931 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10933 * fs/jfs.c (grub_jfs_read_file): Likewise.
10935 * fs/minix.c (grub_minix_read_file): Likewise.
10937 * fs/sfs.c (grub_sfs_read_file): Likewise.
10939 * fs/ufs.c (grub_ufs_read_file): Likewise.
10941 * fs/xfs.c (grub_xfs_read_file): Likewise.
10943 * command/blocklist.c (read_blocklist): Likewise.
10944 (print_blocklist): Likewise.
10946 2007-08-02 Marco Gerards <marco@gnu.org>
10948 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10951 * disk/host.c: New file.
10953 * util/hostfs.c: Likewise.
10955 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10956 return `GRUB_ERR_BAD_FS'.
10957 * fs/sfs.c (grub_sfs_mount): Likewise.
10958 * fs/xfs.c (grub_xfs_mount): Likewise.
10960 * include/grub/disk.h (enum grub_disk_dev_id): Add
10961 `GRUB_DISK_DEVICE_HOST_ID'.
10963 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10965 2007-07-24 Jerone Young <jerone@gmail.com>
10967 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10968 modules for compilation.
10969 * conf/powerpc-ieee1275.rmk: Likewise.
10971 * include/multiboot.h: Move multiboot definitions to one file. Rename
10972 many definitions to not get grub specific.
10973 * include/multiboot2.h: Create header with multiboot 2 definitions.
10974 * include/grub/multiboot.h: Header for grub specific function
10975 prototypes and definitions.
10976 * include/grub/multiboot2.h: Likewise.
10977 * include/grub/multiboot_loader.h: Likewise.
10978 * include/grub/i386/pc/multiboot.h: Removed.
10979 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10981 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10982 and 2 to allow for one multiboot and module commands.
10983 * loader/multiboot2.c: Add multiboot2 functionality.
10984 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10985 and definition names.
10986 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10988 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10989 ieee1275 specific multiboot2 code.
10991 * kern/i386/pc/startup.S: Change headers and definition names for
10992 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10994 2007-07-22 Robert Millan <rmh@aybabtu.com>
10996 * geninitheader.sh: Process file specified in first parameter rather
10997 than hardcoding grub_modules_init.lst.
10998 * geninit.sh: Likewise. Also, construct header name dynamically rather
10999 than hardcoding grub_modules_init.h.
11001 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11002 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11003 grub_probe_init.[ch] and grub_setup_init.[ch].
11005 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11006 grub_modules_init.h with grub_emu_init.h.
11007 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11008 grub_probe_init.[ch] files.
11009 * conf/i386-efi.rmk: Likewise.
11010 * conf/i386-pc.rmk: Likewise.
11011 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11012 grub_setup_init.[ch] files.
11014 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11015 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11016 to initialize modules rather than a list of hardcoded functions.
11017 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11018 grub_init_all() to initialize modules rather than a list of hardcoded
11021 2007-07-22 Robert Millan <rmh@aybabtu.com>
11023 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11024 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11026 2007-07-22 Robert Millan <rmh@aybabtu.com>
11028 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11029 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11030 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11031 flag when running on SmartFirmware.
11032 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11033 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11036 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11037 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11038 rather than decreasing it.
11040 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11041 there's not enough space to do it, fail in the same way as when it
11042 can't be done because there are no partitions.
11044 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11045 when nvsetenv failed.
11047 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11049 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11050 because this rule is automatically generated.
11051 (grub-mkrescue): Removed for the same reason as above.
11053 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11055 Migrate to GNU General Public License Version 3.
11057 * COPYING: Replaced with the plain text version of GPLv3.
11059 * config.guess: Updated from gnulib.
11060 * config.sub: Likewise.
11062 * geninit.sh: Output a GPLv3 copyright notice.
11063 * geninitheader.sh: Likewise.
11064 * genmodsrc.sh: Likewise.
11065 * gensymlist.sh.in: Likewise.
11067 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11068 * boot/i386/pc/diskboot.S: Likewise.
11069 * boot/i386/pc/pxeboot.S: Likewise.
11070 * commands/blocklist.c: Likewise.
11071 * commands/boot.c: Likewise.
11072 * commands/cat.c: Likewise.
11073 * commands/cmp.c: Likewise.
11074 * commands/configfile.c: Likewise.
11075 * commands/echo.c: Likewise.
11076 * commands/help.c: Likewise.
11077 * commands/ls.c: Likewise.
11078 * commands/search.c: Likewise.
11079 * commands/terminal.c: Likewise.
11080 * commands/test.c: Likewise.
11081 * commands/videotest.c: Likewise.
11082 * commands/i386/cpuid.c: Likewise.
11083 * commands/i386/pc/halt.c: Likewise.
11084 * commands/i386/pc/play.c: Likewise.
11085 * commands/i386/pc/reboot.c: Likewise.
11086 * commands/i386/pc/vbeinfo.c: Likewise.
11087 * commands/i386/pc/vbetest.c: Likewise.
11088 * commands/ieee1275/halt.c: Likewise.
11089 * commands/ieee1275/reboot.c: Likewise.
11090 * commands/ieee1275/suspend.c: Likewise.
11091 * disk/loopback.c: Likewise.
11092 * disk/lvm.c: Likewise.
11093 * disk/raid.c: Likewise.
11094 * disk/efi/efidisk.c: Likewise.
11095 * disk/i386/pc/biosdisk.c: Likewise.
11096 * disk/ieee1275/ofdisk.c: Likewise.
11097 * font/manager.c: Likewise.
11098 * fs/affs.c: Likewise.
11099 * fs/ext2.c: Likewise.
11100 * fs/fat.c: Likewise.
11101 * fs/fshelp.c: Likewise.
11102 * fs/hfs.c: Likewise.
11103 * fs/hfsplus.c: Likewise.
11104 * fs/iso9660.c: Likewise.
11105 * fs/jfs.c: Likewise.
11106 * fs/minix.c: Likewise.
11107 * fs/sfs.c: Likewise.
11108 * fs/ufs.c: Likewise.
11109 * fs/xfs.c: Likewise.
11110 * hello/hello.c: Likewise.
11111 * include/grub/acorn_filecore.h: Likewise.
11112 * include/grub/arg.h: Likewise.
11113 * include/grub/bitmap.h: Likewise.
11114 * include/grub/boot.h: Likewise.
11115 * include/grub/cache.h: Likewise.
11116 * include/grub/device.h: Likewise.
11117 * include/grub/disk.h: Likewise.
11118 * include/grub/dl.h: Likewise.
11119 * include/grub/elfload.h: Likewise.
11120 * include/grub/env.h: Likewise.
11121 * include/grub/err.h: Likewise.
11122 * include/grub/file.h: Likewise.
11123 * include/grub/font.h: Likewise.
11124 * include/grub/fs.h: Likewise.
11125 * include/grub/fshelp.h: Likewise.
11126 * include/grub/gzio.h: Likewise.
11127 * include/grub/hfs.h: Likewise.
11128 * include/grub/kernel.h: Likewise.
11129 * include/grub/loader.h: Likewise.
11130 * include/grub/lvm.h: Likewise.
11131 * include/grub/misc.h: Likewise.
11132 * include/grub/mm.h: Likewise.
11133 * include/grub/net.h: Likewise.
11134 * include/grub/normal.h: Likewise.
11135 * include/grub/parser.h: Likewise.
11136 * include/grub/partition.h: Likewise.
11137 * include/grub/pc_partition.h: Likewise.
11138 * include/grub/raid.h: Likewise.
11139 * include/grub/rescue.h: Likewise.
11140 * include/grub/script.h: Likewise.
11141 * include/grub/setjmp.h: Likewise.
11142 * include/grub/symbol.h: Likewise.
11143 * include/grub/term.h: Likewise.
11144 * include/grub/terminfo.h: Likewise.
11145 * include/grub/tparm.h: Likewise.
11146 * include/grub/types.h: Likewise.
11147 * include/grub/video.h: Likewise.
11148 * include/grub/efi/api.h: Likewise.
11149 * include/grub/efi/chainloader.h: Likewise.
11150 * include/grub/efi/console.h: Likewise.
11151 * include/grub/efi/console_control.h: Likewise.
11152 * include/grub/efi/disk.h: Likewise.
11153 * include/grub/efi/efi.h: Likewise.
11154 * include/grub/efi/pe32.h: Likewise.
11155 * include/grub/efi/time.h: Likewise.
11156 * include/grub/i386/linux.h: Likewise.
11157 * include/grub/i386/setjmp.h: Likewise.
11158 * include/grub/i386/types.h: Likewise.
11159 * include/grub/i386/efi/kernel.h: Likewise.
11160 * include/grub/i386/efi/loader.h: Likewise.
11161 * include/grub/i386/efi/time.h: Likewise.
11162 * include/grub/i386/pc/biosdisk.h: Likewise.
11163 * include/grub/i386/pc/boot.h: Likewise.
11164 * include/grub/i386/pc/chainloader.h: Likewise.
11165 * include/grub/i386/pc/console.h: Likewise.
11166 * include/grub/i386/pc/init.h: Likewise.
11167 * include/grub/i386/pc/kernel.h: Likewise.
11168 * include/grub/i386/pc/loader.h: Likewise.
11169 * include/grub/i386/pc/memory.h: Likewise.
11170 * include/grub/i386/pc/multiboot.h: Likewise.
11171 * include/grub/i386/pc/serial.h: Likewise.
11172 * include/grub/i386/pc/time.h: Likewise.
11173 * include/grub/i386/pc/vbe.h: Likewise.
11174 * include/grub/i386/pc/vbeblit.h: Likewise.
11175 * include/grub/i386/pc/vbefill.h: Likewise.
11176 * include/grub/i386/pc/vbeutil.h: Likewise.
11177 * include/grub/i386/pc/vga.h: Likewise.
11178 * include/grub/ieee1275/ieee1275.h: Likewise.
11179 * include/grub/ieee1275/ofdisk.h: Likewise.
11180 * include/grub/powerpc/libgcc.h: Likewise.
11181 * include/grub/powerpc/setjmp.h: Likewise.
11182 * include/grub/powerpc/types.h: Likewise.
11183 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11184 * include/grub/powerpc/ieee1275/console.h: Likewise.
11185 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11186 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11187 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11188 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11189 * include/grub/powerpc/ieee1275/time.h: Likewise.
11190 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11191 * include/grub/sparc64/libgcc.h: Likewise.
11192 * include/grub/sparc64/setjmp.h: Likewise.
11193 * include/grub/sparc64/types.h: Likewise.
11194 * include/grub/sparc64/ieee1275/console.h: Likewise.
11195 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11196 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11197 * include/grub/sparc64/ieee1275/time.h: Likewise.
11198 * include/grub/util/biosdisk.h: Likewise.
11199 * include/grub/util/getroot.h: Likewise.
11200 * include/grub/util/lvm.h: Likewise.
11201 * include/grub/util/misc.h: Likewise.
11202 * include/grub/util/raid.h: Likewise.
11203 * include/grub/util/resolve.h: Likewise.
11204 * io/gzio.c: Likewise.
11205 * kern/device.c: Likewise.
11206 * kern/disk.c: Likewise.
11207 * kern/dl.c: Likewise.
11208 * kern/elf.c: Likewise.
11209 * kern/env.c: Likewise.
11210 * kern/err.c: Likewise.
11211 * kern/file.c: Likewise.
11212 * kern/fs.c: Likewise.
11213 * kern/loader.c: Likewise.
11214 * kern/main.c: Likewise.
11215 * kern/misc.c: Likewise.
11216 * kern/mm.c: Likewise.
11217 * kern/parser.c: Likewise.
11218 * kern/partition.c: Likewise.
11219 * kern/rescue.c: Likewise.
11220 * kern/term.c: Likewise.
11221 * kern/efi/efi.c: Likewise.
11222 * kern/efi/init.c: Likewise.
11223 * kern/efi/mm.c: Likewise.
11224 * kern/i386/dl.c: Likewise.
11225 * kern/i386/efi/init.c: Likewise.
11226 * kern/i386/efi/startup.S: Likewise.
11227 * kern/i386/pc/init.c: Likewise.
11228 * kern/i386/pc/lzo1x.S: Likewise.
11229 * kern/i386/pc/startup.S: Likewise.
11230 * kern/ieee1275/ieee1275.c: Likewise.
11231 * kern/powerpc/cache.S: Likewise.
11232 * kern/powerpc/dl.c: Likewise.
11233 * kern/powerpc/ieee1275/cmain.c: Likewise.
11234 * kern/powerpc/ieee1275/crt0.S: Likewise.
11235 * kern/powerpc/ieee1275/init.c: Likewise.
11236 * kern/powerpc/ieee1275/openfw.c: Likewise.
11237 * kern/sparc64/cache.S: Likewise.
11238 * kern/sparc64/dl.c: Likewise.
11239 * kern/sparc64/ieee1275/init.c: Likewise.
11240 * kern/sparc64/ieee1275/openfw.c: Likewise.
11241 * loader/efi/chainloader.c: Likewise.
11242 * loader/efi/chainloader_normal.c: Likewise.
11243 * loader/i386/efi/linux.c: Likewise.
11244 * loader/i386/efi/linux_normal.c: Likewise.
11245 * loader/i386/pc/chainloader.c: Likewise.
11246 * loader/i386/pc/chainloader_normal.c: Likewise.
11247 * loader/i386/pc/linux.c: Likewise.
11248 * loader/i386/pc/linux_normal.c: Likewise.
11249 * loader/i386/pc/multiboot.c: Likewise.
11250 * loader/i386/pc/multiboot_normal.c: Likewise.
11251 * loader/powerpc/ieee1275/linux.c: Likewise.
11252 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11253 * normal/arg.c: Likewise.
11254 * normal/cmdline.c: Likewise.
11255 * normal/command.c: Likewise.
11256 * normal/completion.c: Likewise.
11257 * normal/execute.c: Likewise.
11258 * normal/function.c: Likewise.
11259 * normal/lexer.c: Likewise.
11260 * normal/main.c: Likewise.
11261 * normal/menu.c: Likewise.
11262 * normal/menu_entry.c: Likewise.
11263 * normal/misc.c: Likewise.
11264 * normal/parser.y: Likewise.
11265 * normal/script.c: Likewise.
11266 * normal/i386/setjmp.S: Likewise.
11267 * normal/powerpc/setjmp.S: Likewise.
11268 * normal/sparc64/setjmp.S: Likewise.
11269 * partmap/acorn.c: Likewise.
11270 * partmap/amiga.c: Likewise.
11271 * partmap/apple.c: Likewise.
11272 * partmap/gpt.c: Likewise.
11273 * partmap/pc.c: Likewise.
11274 * partmap/sun.c: Likewise.
11275 * term/gfxterm.c: Likewise.
11276 * term/terminfo.c: Likewise.
11277 * term/efi/console.c: Likewise.
11278 * term/i386/pc/console.c: Likewise.
11279 * term/i386/pc/serial.c: Likewise.
11280 * term/i386/pc/vesafb.c: Likewise.
11281 * term/i386/pc/vga.c: Likewise.
11282 * term/ieee1275/ofconsole.c: Likewise.
11283 * util/biosdisk.c: Likewise.
11284 * util/console.c: Likewise.
11285 * util/genmoddep.c: Likewise.
11286 * util/getroot.c: Likewise.
11287 * util/grub-emu.c: Likewise.
11288 * util/grub-mkdevicemap.c: Likewise.
11289 * util/grub-probe.c: Likewise.
11290 * util/lvm.c: Likewise.
11291 * util/misc.c: Likewise.
11292 * util/raid.c: Likewise.
11293 * util/resolve.c: Likewise.
11294 * util/update-grub.in: Likewise.
11295 * util/update-grub_lib.in: Likewise.
11296 * util/grub.d/00_header.in: Likewise.
11297 * util/grub.d/10_hurd.in: Likewise.
11298 * util/grub.d/10_linux.in: Likewise.
11299 * util/i386/efi/grub-install.in: Likewise.
11300 * util/i386/efi/grub-mkimage.c: Likewise.
11301 * util/i386/pc/grub-install.in: Likewise.
11302 * util/i386/pc/grub-mkimage.c: Likewise.
11303 * util/i386/pc/grub-mkrescue.in: Likewise.
11304 * util/i386/pc/grub-setup.c: Likewise.
11305 * util/i386/pc/misc.c: Likewise.
11306 * util/powerpc/ieee1275/grub-install.in: Likewise.
11307 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11308 * util/powerpc/ieee1275/misc.c: Likewise.
11309 * video/bitmap.c: Likewise.
11310 * video/video.c: Likewise.
11311 * video/i386/pc/vbe.c: Likewise.
11312 * video/i386/pc/vbeblit.c: Likewise.
11313 * video/i386/pc/vbefill.c: Likewise.
11314 * video/i386/pc/vbeutil.c: Likewise.
11315 * video/readers/tga.c: Likewise.
11317 2007-07-02 Robert Millan <rmh@aybabtu.com>
11319 * conf/i386-efi.rmk: Replace obsolete reference to
11320 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11321 with util/getroot.c.
11322 * conf/powerpc-ieee1275.rmk: Likewise.
11323 * conf/sparc64-ieee1275.rmk: Likewise.
11325 * util/grub-emu.c (main): Fix unchecked pointer handling.
11327 2007-07-02 Robert Millan <rmh@aybabtu.com>
11329 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11330 invocation to fail, in order to support partition-less media.
11332 * util/i386/pc/grub-install.in: Likewise.
11334 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11335 which fs or partmap modules are needed (akin to its sister scripts).
11337 Also use grub-probe to get rid of unportable /proc/mounts check.
11339 Print the same informational message that the other scripts do, before
11342 2007-06-23 Robert Millan <rmh@aybabtu.com>
11344 * util/update-grub_lib.in (font_path): New function. Determine whether
11345 a font file can be found and, if so, echo the GRUB path to it.
11347 * util/update-grub.in: Handle multiple terminals depending on user
11348 input, platform availability and font file presence. Propagate
11349 variables of our findings to /etc/grub.d/ children.
11351 * util/grub.d/00_header.in: Handle multiple terminals, based on
11352 environment setup by update-grub.
11354 2007-06-23 Robert Millan <rmh@aybabtu.com>
11356 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11358 2007-06-21 Robert Millan <rmh@aybabtu.com>
11360 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11361 indicate end of data section in kernel image.
11362 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11363 GRUB_KERNEL_MACHINE_DATA_END.
11365 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11367 * kern/i386/efi/startup.S: Likewise.
11369 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11370 during image generation. Implement --prefix option to override this
11372 * util/i386/efi/grub-mkimage.c: Likewise.
11374 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11375 code to make path relative to its root into a separate function.
11377 * util/i386/pc/grub-install.in: Use newly provided
11378 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11379 pass the result to grub-install --prefix.
11381 2007-06-13 Robert Millan <rmh@aybabtu.com>
11383 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11384 DEFAULT_DEVICE_MAP.
11385 * util/grub-emu.c: Use above definitions from misc.h instead of
11387 * util/grub-mkdevicemap.c: Likewise.
11388 * util/i386/pc/grub-setup.c: Likewise.
11389 * util/grub-probe.c: Likewise.
11390 (probe): Abort with grub_util_error() when either
11391 grub_guess_root_device or grub_util_get_grub_dev fails.
11393 2007-06-12 Robert Millan <rmh@aybabtu.com>
11395 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11396 "pager" assignment.
11397 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11399 * util/grub-probe.c (probe): Likewise for "drive_name".
11401 2007-06-11 Robert Millan <rmh@aybabtu.com>
11403 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11404 not just the cdrom one.
11406 2007-06-11 Robert Millan <rmh@aybabtu.com>
11408 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11409 Add --pkglibdir=DIR option to override pkglibdir.
11410 Mention --image-type=TYPE in help output.
11411 Fix --grub-mkimage (it was a no-op).
11412 Abort gracefully when no parameter is given.
11414 2007-06-11 Robert Millan <rmh@aybabtu.com>
11416 * util/i386/pc/grub-mkrescue.in: New file.
11417 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11418 * Makefile.in: Handle bin_SCRIPTS.
11420 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11422 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11423 list of video modes.
11425 2007-06-06 Robert Millan <rmh@aybabtu.com>
11427 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11428 file doesn't exist, or if it is in a filesystem grub can't read.
11430 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11431 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11432 header comment to fit in 80 columns when the variables are resolved.
11434 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11435 could be identified by update-grub. Remove redundant check for
11436 unifont.pff existence (since convert_system_path_to_grub_path now
11439 2007-06-04 Robert Millan <rmh@aybabtu.com>
11441 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11443 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11445 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11447 2007-06-04 Robert Millan <rmh@aybabtu.com>
11449 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11451 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11452 grub_apple_partition_map_fini.
11455 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11456 to access >2 TiB disks).
11458 Print disk->total_sectors with %llu instead of %lu, since this
11459 variable is always 64-bit (prevents wrong disk size from being displayed
11460 on either >2 TiB disk or big-endian CPU).
11462 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11463 into a generic case that supports all (sane) partition maps.
11465 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11468 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11469 and grub_apple_partition_map_fini() after that.
11471 2007-06-01 Robert Millan <rmh@aybabtu.com>
11473 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11475 * util/grub.d/00_header.in: Only enable gfxterm when
11476 convert_system_path_to_grub_path() succeeds.
11478 2007-05-20 Robert Millan <rmh@aybabtu.com>
11480 * util/update-grub_lib.in: New file.
11481 * DISTLIST: Add update-grub_lib.in.
11482 * conf/common.rmk: Generate update-grub_lib and install it in
11484 * Makefile.in: Add install routine for $(lib_DATA).
11486 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11487 function provided by update-grub_lib to support arbitrary paths of
11489 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11490 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11492 2007-05-19 Robert Millan <rmh@aybabtu.com>
11494 * commands/i386/cpuid.c: New module.
11495 * DISTLIST: Add it.
11496 * conf/i386-efi.rmk: Enable cpuid.mod.
11497 * conf/i386-pc.rmk: Likewise.
11499 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11501 * kern/disk.c (grub_disk_read): Check return value of
11504 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11506 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11508 * disk/raid.c (grub_raid_open): Likewise.
11510 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11512 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11513 stack instead of on the heap.
11515 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11516 before doing a read on it.
11518 * configure.ac: Only use -fno-stack-protector for the target
11521 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11523 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11524 __attribute_ ((unused)) to mode_type argument.
11526 * util/getroot.c (grub_guess_root_device): Fix #endif.
11528 * kern/misc.c (memcmp): Fix prototype.
11530 * include/grub/partition.h [GRUB_UTIL]
11531 (grub_gpt_partition_map_init): Add prototype.
11532 (grub_gpt_partition_map_fini): Likewise.
11534 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11535 at the right place.
11537 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11538 (grub_fat_read_data): Likewise.
11539 (grub_fat_find_dir): Likewise.
11541 * font/manager.c (find_glyph): Make table a const.
11542 (grub_font_get_glyph): Remove bitmap from if statement.
11544 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11546 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11547 code, first search for device in /dev/mapper, then in /dev.
11548 (grub_util_get_grub_dev): New function.
11549 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11551 * util/grub-probe.c (probe): Remove check for RAID, call
11552 grub_util_get_grub_dev() instead of
11553 grub_util_biosdisk_get_grub_dev().
11554 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11555 grub_util_biosdisk_get_grub_dev().
11556 * util/i386/pc/grub-setup.c (main): Likewise.
11558 2007-05-16 Robert Millan <rmh@aybabtu.com>
11560 * DISTLIST: Update for the latest changes.
11561 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11562 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11563 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11564 grub/util/biosdisk.h.
11565 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11566 grub/util/biosdisk.h.
11568 2007-05-16 Robert Millan <rmh@aybabtu.com>
11570 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11572 2007-05-16 Robert Millan <rmh@aybabtu.com>
11574 * util/i386/efi/grub-install.in: New.
11575 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11576 newly added grub-install.
11577 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11579 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11580 grub/util/biosdisk.h.
11581 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11582 grub/util/biosdisk.h.
11584 2007-05-16 Robert Millan <rmh@aybabtu.com>
11586 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11587 * include/grub/util/biosdisk.h: ... here.
11588 * util/i386/pc/biosdisk.c: Moved to ...
11589 * util/biosdisk.c: ... here.
11590 * util/i386/pc/getroot.c: Moved to ...
11591 * util/getroot.c: ... here.
11592 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11593 * util/grub-mkdevicemap.c: ... here.
11594 * util/i386/pc/grub-probe.c: Moved to ...
11595 * util/grub-probe.c: ... here.
11597 2007-05-15 Robert Millan <rmh@aybabtu.com>
11599 * util/update-grub.in: Remove duplicated line in grub.cfg header
11602 2007-05-13 Robert Millan <rmh@aybabtu.com>
11604 * util/update-grub.in: Fix a few assumptions about the devices holding
11605 /, /boot and /boot/grub being the same.
11606 * util/grub.d/00_header.in: Likewise.
11607 * util/grub.d/10_hurd.in: Likewise.
11608 * util/grub.d/10_linux.in: Likewise.
11610 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11611 patterns. Use that to define the `.old' suffix as older than `'.
11613 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11615 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11616 the grub.cfg header message.
11618 2007-05-11 Robert Millan <rmh@aybabtu.com>
11620 * util/update-grub.in: Create device.map if it doesn't already exist,
11621 before attempting to run grub-probe.
11622 Check for grub-probe and grub-mkdevicemap with the same code
11623 grub-install is using.
11626 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11628 * Makefile.in: Add the datarootdir autoconf variable.
11630 2007-05-09 Robert Millan <rmh@aybabtu.com>
11632 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11633 fail gracefully if dev->disk->partition == NULL.
11635 2007-05-07 Robert Millan <rmh@aybabtu.com>
11637 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11638 determine partition map module.
11639 * util/i386/pc/grub-install.in: Use this feature to decide which
11640 partition module to load, instead of hardcoding pc and gpt.
11642 2007-05-07 Robert Millan <rmh@aybabtu.com>
11644 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11645 source directory differs from build directory.
11647 2007-05-05 Robert Millan <rmh@aybabtu.com>
11649 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11652 2007-05-05 Robert Millan <rmh@aybabtu.com>
11654 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11656 2007-05-05 Robert Millan <rmh@aybabtu.com>
11658 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11659 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11661 2007-05-05 Robert Millan <rmh@aybabtu.com>
11663 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11664 (grub_probe_SOURCES): Likewise.
11665 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11666 GPT and initialize dos_part and bsd_part accordingly.
11667 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11669 (main): Activate gpt module for use during partition identification,
11670 and deactivate it afterwards.
11671 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11672 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11673 partition identification, and deactivate it afterwards.
11675 2007-05-05 Robert Millan <rmh@aybabtu.com>
11677 * term/i386/pc/console.c (grub_console_fini): Call
11678 grub_term_set_current() before grub_term_unregister().
11680 2007-05-04 Robert Millan <rmh@aybabtu.com>
11682 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11683 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11684 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11685 and update-grub_DATA.
11686 * conf/common.rmk: Build and install update-grub components.
11687 * conf/common.mk: Regenerate.
11688 * util/update-grub.in: New. Core of update-grub.
11689 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11690 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11691 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11692 * util/grub.d/README: New. Document grub.d directory layout.
11694 2007-05-01 Robert Millan <rmh@aybabtu.com>
11696 * util/grub-emu.c: Move initialization functions
11697 grub_util_biosdisk_init() and grub_init_all() before
11698 grub_util_biosdisk_get_grub_dev(), which relies on them.
11700 2007-04-19 Robert Millan <rmh@aybabtu.com>
11702 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11705 2007-04-18 Jerone Young <jerone@gmail.com>
11707 * kernel/elf.c: Add missing parenthesis for conditional statement
11710 2007-04-10 Jerone Young <jerone@gmail.com>
11712 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11713 continue on and look for device node with real device name.
11715 2007-04-10 Jerone Young <jerone@gmail.com>
11717 * configure.ac: Add argument for autoconf to use transformation
11719 * Makefile.in: Add autoconf package transformation code.
11720 * util/i386/pc/grub-install.in: Likewise.
11721 * util/powerpc/ieee1275/grub-install.in: Likewise.
11723 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11725 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11726 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11727 (EXT2_REVISION): Likewise.
11728 (EXT2_INODE_SIZE): Likewise.
11729 (struct grub_ext2_block_group): Added a missing member
11731 (grub_ext2_read_inode): Divide by the inode size in a superblock
11732 instead of 128 to obtain INODES_PER_BLOCK.
11733 Use the macro EXT2_INODE_SIZE instead of directly using
11734 SBLOCK->INODE_SIZE.
11736 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11738 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11739 superblock instead of the structure size to compute an
11740 offset. This fixes the problem that GRUB could not read a
11741 filesystem when inode size is different from 128-byte.
11743 2007-03-05 Marco Gerards <marco@gnu.org>
11745 * normal/main.c (read_config_file): When "menu" is not set, create
11746 an initial context.
11748 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11750 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11751 (HEAP_LIMIT): New macro.
11752 (grub_claim_heap): Claim memory up to `heaplimit'.
11754 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11756 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11757 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11758 (_start): Likewise.
11759 (grub_arch_modules_addr): Return address after `_end'.
11760 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11761 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11762 (add_segments): Calculate `_end' from phdr size and location.
11763 (ALIGN_UP): Moved to ...
11764 * include/grub/misc.h: here.
11765 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11767 (GRUB_IEEE1275_MODULE_BASE): Removed.
11769 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11771 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11774 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11776 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11778 (grub_elf64_load_hook_t): Likewise.
11779 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11782 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11784 * kern/mm.c: Update copyright.
11785 (grub_mm_debug): Correct syntax error.
11786 (grub_mm_dump_free): New function.
11787 (grub_debug_free): Call `grub_free'.
11788 * include/grub/mm.h: Update copyright.
11789 (grub_mm_dump_free): Add declaration.
11791 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11793 * include/grub/ieee1275/ieee1275.h: Update copyright.
11794 * kern/powerpc/ieee1275/init.c: Likewise.
11795 * kern/powerpc/ieee1275/openfw.c: Likewise.
11797 * loader/powerpc/ieee1275/linux.c: Likewise.
11798 * include/grub/elfload.h: Likewise.
11799 * kern/elf.c: Likewise.
11800 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11802 (grub_elf64_load): Likewise.
11803 (grub_elf32_load_segment): Move to a nested function.
11804 (grub_elf64_load_segment): Likewise.
11806 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11808 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11810 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11811 (grub_heap_len): Likewise.
11812 (HEAP_SIZE): New macro.
11813 (grub_claim_heap): New function.
11814 (grub_machine_init): Don't claim heap directly. Call
11816 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11817 (grub_available_iterate): New function.
11819 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11821 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11822 * configure.ac: Use it for testing the HOST and TARGET compilers.
11824 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11826 * Makefile.in (enable_grub_emu): New variable.
11827 * configure.ac (--enable-grub-emu): New option.
11828 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11829 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11830 * conf/i386-pc.rmk: Likewise.
11831 * conf/powerpc-ieee1275.rmk: Likewise.
11832 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11834 2006-12-12 Marco Gerards <marco@gnu.org>
11836 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11838 * kern/env.c (grub_env_unset): Don't free the member `value' when
11839 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11842 * normal/main.c (current_menu): Removed.
11843 (free_menu): Unset the `menu' environment variable.
11844 (grub_normal_menu_addentry): Make use of the environment variable
11845 `menu', instead of using the global `current_menu'. Allocate
11846 memory for the sourcecode of this entry.
11847 (read_config_file): New argument `nested', changed all callers.
11848 Only in the case of a new context, initialize a new menu. Set the
11849 `menu' environment variable.
11850 (grub_normal_execute): Don't set and unset the environment
11851 variable `menu' here anymore. Only free the menu when leaving the
11854 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11857 2006-12-11 Marco Gerards <marco@gnu.org>
11859 * normal/menu_entry.c (run): Fix off by one bug so the last line
11860 is executed. Move the loader check to outside the loop.
11862 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11864 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11866 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11868 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11869 the number of sectors. Reported by Andrey Shuvikov
11870 <mr_hyro@yahoo.com>.
11872 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11874 * kern/disk.c (grub_disk_read): When there is a read error, always
11875 try to read only the necessary data.
11877 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11879 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11881 [GRUB_UTIL] (grub_raid_fini): Likewise.
11882 [GRUB_UTIL] (grub_lvm_init): Likewise.
11883 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11884 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11885 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11886 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11887 and grub_raid_fini().
11889 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11891 * include/grub/types.h (__unused): Rename to UNUSED.
11892 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11893 (grub_elf64_size): Likewise.
11895 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11897 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11898 grub_error_push and grub_error_pop in the error-handling path.
11899 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11902 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11904 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11905 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11906 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11907 (kernel_elf_SOURCES): Likewise.
11908 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11909 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11910 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11911 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11912 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11913 (elf_mod_SOURCES): New variable.
11914 (elf_mod_CFLAGS): Likewise.
11915 (elf_mod_LDFLAGS): Likewise.
11916 * include/grub/types.h (__unused): New macro.
11917 * include/grub/elfload.h: New file.
11918 * kern/elf.c: Likewise.
11919 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11920 (ELF32_LOADMASK): New macro.
11921 (ELF64_LOADMASK): Likewise.
11922 (vmlinux): Removed.
11923 (grub_linux_load32): New function.
11924 (grub_linux_load64): Likewise.
11925 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11926 Use grub_elf_t instead of grub_file_t.
11928 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11930 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11931 `catch_result' to struct set_color_args.
11933 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11935 * normal/menu.c: Include grub/script.h.
11936 * normal/menu_entry.c: Likewise.
11937 * include/grub/normal.h: Do not include grub/script.h.
11939 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11941 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11943 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11945 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11947 (grub_disk_close): Print debug messages when closing a disk.
11948 (grub_disk_read): Print debug messages when disk read fails.
11949 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11951 * kern/partition.c: Include misc.h.
11952 (grub_partition_iterate): Print debug messages when detecting
11955 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11957 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11959 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11961 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11963 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11964 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11966 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11968 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11969 instead of sizeof(lv). Patch by Michael Guntsche.
11971 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11973 * disk/lvm.c: Rename VGS to VG_LIST.
11974 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11975 (grub_lvm_open): Likewise.
11976 Thanks to Michael Guntsche for finding this bug.
11978 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11980 * configure.ac (AC_INIT): Bumped to 1.95.
11982 2006-10-14 Robert Millan <rmh@aybabtu.com>
11984 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11985 with "/dev/.static/dev/md".
11987 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11989 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11990 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11991 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11992 DRIVE_NAME are always freed.
11994 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11995 DOS_PART, as a DOS partition is counted from one instead of zero
11996 now. Reported by Robert Millan.
11998 2006-10-14 Robert Millan <rmh@aybabtu.com>
12000 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12001 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12002 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12003 string returned by grub_guess_root_device.
12004 * util/i386/pc/grub-setup.c: Likewise.
12005 * util/i386/pc/grub-probefs.c: Likewise.
12007 * util/i386/pc/grub-probefs.c: Rename to ...
12008 * util/i386/pc/grub-probe.c: ... this.
12009 * DISTLIST: Remove grub-probefs, add grub-probe.
12010 * conf/i386-efi.rmk: Likewise.
12011 * conf/i386-pc.rmk: Likewise.
12012 * util/i386/pc/grub-install.in: Likewise.
12014 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12015 choose which information we want to print.
12017 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12019 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12020 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12021 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12022 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12023 video/readers/tga.c and video/i386/pc/vbeutil.c.
12025 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12027 Added support for RAID and LVM.
12029 * disk/lvm.c: New file.
12030 * disk/raid.c: Likewise.
12031 * include/grub/lvm.h: Likewise.
12032 * include/grub/raid.h: Likewise.
12033 * include/grub/util/lvm.h: Likewise.
12034 * include/grub/util/raid.h: Likewise.
12035 * util/lvm.c: Likewise.
12036 * util/raid.c: Likewise.
12038 * include/grub/disk.h (grub_disk_dev_id): Add
12039 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12040 (grub_disk_get_size): New prototype.
12041 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12042 returns a partition.
12043 (grub_disk_get_size): New function.
12045 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12046 verbatim if grub_install_dos_part is -2.
12048 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12051 * util/i386/pc/grub-setup.c (setup): New argument
12052 MUST_EMBED. Force embedding of GRUB when the argument is
12053 true. Close FILE before returning.
12054 (main): Add support for RAID and LVM.
12056 * conf/common.rmk: Add RAID and LVM modules.
12057 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12059 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12061 * kern/misc.c (grub_strstr): New function.
12062 * include/grub/misc.h (grub_strstr): New prototype.
12064 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12066 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12068 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12070 * kern/misc.c (grub_strtoull): Guess the base only if not
12073 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12075 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12078 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12080 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12082 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12083 Remove `flags' argument. All callers changed.
12084 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12085 (IEEE1275_IHANDLE_INVALID): New variable.
12086 (IEEE1275_CELL_INVALID): New variable.
12087 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12088 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12089 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12090 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12091 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12092 codes from Open Firmware. All callers updated.
12093 (grub_ieee1275_next_property): Directly return Open Firmware return
12095 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12096 Standardize error checking from `grub_ieee1275_get_property'.
12097 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12098 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12100 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12102 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12103 `instance_to_package_args' to `instance_to_path_args'.
12105 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12106 `grub_ieee1275_chosen'.
12108 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12109 `grub_ieee1275_interpret'.
12111 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12113 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12115 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12117 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12118 (__cmpdi): Likewise.
12120 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12121 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12124 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12126 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12127 to type `grub_ssize_t'.
12128 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12130 2006-09-22 Marco Gerards <marco@gnu.org>
12132 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12135 2006-09-22 Marco Gerards <marco@gnu.org>
12137 * commands/echo.c: New file.
12139 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12141 * conf/common.rmk (echo_mod_SOURCES): New variable.
12142 (echo_mod_CFLAGS): Likewise.
12143 (echo_mod_LDFLAGS): Likewise.
12145 2006-09-22 Marco Gerards <marco@gnu.org>
12147 * normal/main.c (get_line): Malloc memory instead of using
12148 preallocated memory. Removed the arguments `cmdline' and
12149 `max_len'. Updated all callers.
12151 2006-09-22 Marco Gerards <marco@gnu.org>
12153 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12154 (normal_mod_DEPENDENCIES): Likewise.
12156 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12157 (normal_mod_DEPENDENCIES): Likewise.
12159 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12161 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12163 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12165 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12166 (normal_mod_DEPENDENCIES): Likewise.
12167 * conf/i386-pc.mk: Regenerate.
12168 * conf/i386-efi.mk: Likewise
12169 * conf/common.mk: Likewise.
12170 * conf/powerpc-ieee1275.mk: Likewise.
12171 * conf/sparc64-ieee1275.mk: Likewise.
12173 2006-09-22 Robert Millan <rmh@aybabtu.com>
12175 Sync with i386 version.
12176 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12177 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12179 2006-09-21 Robert Millan <rmh@aybabtu.com>
12181 Import from GRUB Legacy (lib/device.c):
12182 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12183 (init_device_map) [__linux__]: Add support for I2O devices.
12185 2006-09-14 Marco Gerards <marco@gnu.org>
12187 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12190 2006-09-14 Robert Millan <rmh@aybabtu.com>
12192 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12195 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12197 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12198 before adding it to device.map.
12200 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12202 * genmk.rb: Let GCC generate dependencies the first time it
12203 compiles a file; using the -MD option.
12204 * conf/common.mk: Regenerate.
12205 * conf/i386-pc.mk: Likewise.
12206 * conf/i386-efi.mk: Likewise.
12207 * conf/powerpc-ieee1275.mk: Likewise.
12208 * conf/sparc64-ieee1275.mk: Likewise.
12210 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12212 Move the prototypes of grub_setjmp and grub_longjmp to
12213 cpu/setjmp.h, so that each architecture may specify different
12216 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12217 (grub_longjmp): Likewise.
12218 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12219 (grub_longjmp): Likewise.
12220 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12221 (grub_longjmp): Likewise.
12223 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12224 [!GRUB_UTIL] (grub_longjmp): Removed.
12226 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12228 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12229 "color!" method does not return any value.
12231 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12233 * include/grub/bitmap.h: New file.
12235 * include/grub/i386/pc/vbeutil.h: Likewise.
12237 * video/bitmap.c: Likewise.
12239 * video/readers/tga.c: Likewise.
12241 * video/i386/pc/vbeutil.c: Likewise.
12243 * commands/videotest.c: Code cleanup and updated to reflect to new
12246 * term/gfxterm.c: Likewise.
12248 * video/video.c: Likewise.
12250 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12251 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12252 (bitmap_mod_SOURCES): New entry.
12253 (bitmap_mod_CFLAGS): Likewise.
12254 (bitmap_mod_LDFLAGS): Likewise.
12255 (tga_mod_SOURCES): Likewise.
12256 (tga_mod_CFLAGS): Likewise.
12257 (tga_mod_LDFLAGS): Likewise.
12259 * include/grub/video.h (grub_video_blit_operators): New enum type.
12260 (grub_video_render_target): Changed as forward declaration and moved
12261 actual definition to be video driver specific.
12262 (grub_video_adapter.blit_bitmap): Added blitting operator.
12263 (grub_video_adapter.blit_render_target): Likewise.
12264 (grub_video_blit_bitmap): Likewise.
12265 (grub_video_blit_render_target): Likewise.
12267 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12268 driver specific render target definition.
12269 (grub_video_vbe_map_rgba): Added driver internal helper.
12270 (grub_video_vbe_unmap_color): Updated to use
12271 grub_video_i386_vbeblit_info.
12272 (grub_video_vbe_get_video_ptr): Likewise.
12274 * include/grub/i386/pc/vbeblit.h
12275 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12276 grub_video_i386_vbeblit_info.
12277 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12278 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12279 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12280 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12281 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12282 (grub_video_i386_vbeblit_index_index): Likewise.
12283 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12284 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12285 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12286 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12288 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12291 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12292 include/grub/i386/pc/vbeblit.h.
12294 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12295 Updated to use grub_video_i386_vbeblit_info.
12296 (grub_video_i386_vbefill_R8G8B8): Likewise.
12297 (grub_video_i386_vbefill_index): Likewise.
12298 (grub_video_i386_vbefill): Added generic filler.
12300 * video/i386/pc/vbefill.c: Updated to reflect changes on
12301 include/grub/i386/pc/vbefill.h.
12303 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12304 grub_video_i386_vbeblit_info.
12305 (grub_video_vbe_unmap_color): Likewise.
12306 (grub_video_vbe_blit_glyph): Likewise.
12307 (grub_video_vbe_scroll): Likewise.
12308 (grub_video_vbe_draw_pixel): Removed function.
12309 (grub_video_vbe_get_pixel): Likewise.
12310 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12311 updated code to use it.
12312 (common_blitter): Added common blitter for render target and bitmap.
12313 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12314 (grub_video_vbe_blit_render_target): Likewise.
12316 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12318 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12319 is in text mode if there is no console control protocol instance
12322 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12324 * include/grub/video.h: Code cleanup.
12326 * include/grub/i386/pc/vbe.h: Likewise.
12328 * video/i386/pc/vbe.c: Likewise.
12330 * video/i386/pc/vbeblit.c: Likewise.
12332 * video/i386/pc/vbefill.c: Likewise.
12334 * video/video.c: Likewise. Also added more comments.
12336 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12338 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12339 (struct grub_biosdisk_dap): Likewise.
12341 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12342 linkage settings for all functions.
12344 2006-07-12 Marco Gerards <marco@gnu.org>
12346 * configure.ac (--enable-mm-debug): Fix typo.
12348 * genkernsyms.sh.in: Use proper quoting for `CC'.
12350 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12352 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12353 (normal_mod_ASFLAGS): Remove "-m32".
12355 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12357 * util/misc.c: Include config.h.
12358 [!HAVE_MEMALIGN]: Do not include malloc.h.
12359 (grub_memalign): Use posix_memalign, if present. Then, use
12360 memalign, if present. Otherwise, emit an error.
12362 * util/grub-emu.c: Do not include malloc.h.
12364 * include/grub/util/misc.h: Include unistd.h. This is required for
12365 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12366 D. Eades III <hde@foobar-qux.org>.
12368 * configure.ac (AC_GNU_SOURCE): Added.
12369 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12372 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12374 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12375 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12377 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12379 * include/grub/types.h (grub_host_addr_t): Rename to
12380 grub_target_addr_t.
12381 (grub_host_off_t): Rename to grub_target_off_t.
12382 (grub_host_size_t): Rename to grub_target_size_t.
12383 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12384 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12386 * include/grub/kernel.h (struct grub_module_header): Change type
12387 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12388 (grub_module_info): Likewise.
12390 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12392 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12393 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12394 Velazquez <jesus.velazquez@gmail.com>.
12396 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12398 Count partitions from 1 instead of 0 in the string representation
12399 of partitions. Still use 0-based internally.
12401 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12402 (sun_partition_map_iterate): Use grub_partition_t instead of
12403 struct grub_partition *. Cast DESC->START_CYLINDER to
12404 grub_uint64_t after converting the endian.
12405 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12406 (sun_partition_map_get_name): Add 1 to P->INDEX.
12408 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12410 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12412 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12413 zero instead of one.
12414 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12415 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12417 * partmap/apple.c (apple_partition_map_iterate): Change the type
12418 of POS to unsigned.
12419 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12420 (apple_partition_map_get_name): Add 1 into P->INDEX.
12422 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12423 of POS to unsigned.
12424 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12425 calculate the offset of a partition.
12426 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12427 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12429 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12430 SECTOR to grub_disk_addr_t.
12431 (acorn_partition_map_iterate): Likewise.
12432 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12433 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12435 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12437 * kern/i386/pc/init.c (make_install_device): Add 1 into
12438 GRUB_INSTALL_DOS_PART.
12440 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12443 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12445 Clean up the code to support 64-bit addressing in disks and
12446 files. This change is not enough for filesystems yet.
12448 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12449 type of "start" to grub_uint64_t.
12450 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12451 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12452 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12455 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12456 to grub_disk_addr_t.
12458 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12461 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12463 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12466 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12468 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12470 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12472 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12473 to grub_off_t, to detect an error from grub_file_seek.
12474 (grub_multiboot_load_elf32): Likewise.
12476 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12477 maximum unsigned long value when an overflow is detected.
12478 (grub_strtoull): New function.
12479 (grub_divmod64): Likewise.
12480 (grub_lltoa): use grub_divmod64.
12482 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12484 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12485 the pointer to next character. Use grub_strtoull instead of
12487 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12488 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12491 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12492 return value is signed.
12493 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12494 test if OFFSET is less than zero, as OFFSET is unsigned now.
12496 * kern/disk.c (struct grub_disk_cache): Change the type of
12497 "sector" to grub_disk_addr_t.
12498 (grub_disk_cache_get_index): Change the type of SECTOR to
12499 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12500 unsigned after shifting.
12501 (grub_disk_cache_invalidate): Change the type of SECTOR to
12503 (grub_disk_cache_unlock): Likewise.
12504 (grub_disk_cache_store): Likewise.
12505 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12506 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12507 grub_disk_addr_t and grub_uint64_t, respectively.
12508 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12509 body, as the value of OFFSET is tweaked by
12510 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12511 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12513 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12514 body, as the value of OFFSET is tweaked by
12515 grub_disk_check_range. Change the types of LEN and N to
12518 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12519 and "saved_offset" to grub_off_t.
12520 (test_header): Cast BUF to char *.
12521 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12523 (grub_gzio_read): Change the types of OFFSET and SIZE to
12524 grub_off_t and grub_size_t, respectively.
12526 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12528 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12529 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12530 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12531 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12532 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12534 * include/grub/types.h (grub_off_t): Unconditionally set to
12536 (grub_disk_addr_t): Changed to grub_uint64_t.
12538 * include/grub/partition.h (struct grub_partition): Change the
12539 types of "start", "len" and "offset" to grub_disk_addr_t,
12540 grub_uint64_t and grub_disk_addr_t, respectively.
12541 (grub_partition_get_start): Return grub_disk_addr_t.
12542 (grub_partition_get_len): Return grub_uint64_t.
12544 * include/grub/misc.h (grub_strtoull): New prototype.
12545 (grub_divmod64): Likewise.
12547 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12548 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12549 grub_off_t, respectively.
12550 All callers and references changed.
12552 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12553 grub_size_t in "read".
12554 All callers and references changed.
12556 * include/grub/file.h (struct grub_file): Change the types of
12557 "offset" and "size" to grub_off_t and grub_off_t,
12558 respectively. Change the type of SECTOR to grub_disk_addr_t in
12560 (grub_file_read): Change the type of LEN to grub_size_t.
12561 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12563 (grub_file_size): Return grub_off_t.
12564 (grub_file_tell): Likewise.
12565 All callers and references changed.
12567 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12568 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12570 (struct grub_disk): Change the type of "total_sectors" to
12571 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12573 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12574 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12575 (grub_disk_write): Likewise.
12576 All callers and references changed.
12578 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12579 char * for grub_strncmp to silence gcc.
12580 (grub_iso9660_mount): Likewise.
12581 (grub_iso9660_mount): Likewise.
12582 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12584 (grub_iso9660_iterate_dir): Likewise.
12585 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12587 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12588 LEN to grub_disk_addr_t and grub_size_t, respectively.
12590 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12592 * fs/jfs.c (grub_jfs_read_file): Likewise.
12594 * fs/minix.c (grub_jfs_read_file): Likewise.
12596 * fs/sfs.c (grub_jfs_read_file): Likewise.
12598 * fs/ufs.c (grub_jfs_read_file): Likewise.
12600 * fs/xfs.c (grub_jfs_read_file): Likewise.
12602 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12603 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12606 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12607 BLKNR to -1 instead of returning GRUB_ERRNO.
12608 (grub_ext2_read_file): Change the types of SECTOR and
12609 LEN to grub_disk_addr_t and grub_size_t, respectively.
12611 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12612 LEN to grub_disk_addr_t and grub_size_t, respectively.
12614 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12617 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12618 string. Do not cast SECTOR explicitly.
12620 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12621 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12622 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12623 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12624 over 2TB and LBA mode is not supported, raise an error.
12625 (get_safe_sectors): New function.
12626 (grub_biosdisk_read): Use get_safe_sectors.
12627 (grub_biosdisk_write): Likewise.
12629 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12630 (grub_efidisk_write): Likewise.
12632 * disk/loopback.c (delete_loopback): Cosmetic changes.
12633 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12635 (grub_loopback_open): Likewise.
12636 (grub_loopback_read): Likewise. Also, change the type of POS to
12637 grub_off_t, and fix the usage of grub_memset.
12639 * commands/i386/pc/play.c: Include grub/machine/time.h.
12641 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12644 * commands/configfile.c: Include grub/env.h.
12646 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12647 GRUB_ERRNO directly instead. Change the type of POS to
12648 grub_off_t. Follow the coding standard.
12650 * commands/blocklist.c: Include grub/partition.h.
12651 (grub_cmd_blocklist): Return an error if the underlying device is
12652 not a disk. Take the starting sector of a partition into account,
12653 if a partition is used.
12655 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12657 (lba_mode): Support 64-bit addresses.
12658 (chs_mode): Likewise.
12659 (copy_buffer): Adapted to the new offsets of a length field and a
12661 (blocklist_default_start): Allocate 64-bit space.
12663 * boot/i386/pc/boot.S (force_lba): Removed.
12664 (boot_drive): Moved to under KERNEL_SECTOR.
12665 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12667 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12669 (lba_mode): Refactored to support a 64-bit address. More size
12671 (setup_sectors): Likewise.
12673 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12675 * DISTLIST: Added include/grub/i386/linux.h. Removed
12676 include/grub/i386/pc/linux.h
12678 * configure.ac (AC_INIT): Bumped to 1.94.
12680 * config.guess: Updated from gnulib.
12681 * config.sub: Likewise.
12682 * install-sh: Likewise.
12683 * mkinstalldirs: Likewise.
12685 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12687 * conf/common.rmk (grub_modules_init.lst): Depended on
12688 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12691 * genmk.rb (PModule::rule): Reverted the previous change.
12693 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12695 * conf/common.rmk (grub_modules_init.lst): Depends on
12696 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12697 that the target does not exist before producing.
12698 (grub_modules_init.h): Remove the target before generating.
12699 (grub_emu_init.c): Likewise.
12701 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12703 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12705 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12706 for the target-specific tests. Make sure that we also have the
12707 up-to-date target variables for those tests.
12709 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12711 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12712 (PModule::rule): Likewise.
12714 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12716 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12717 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12718 target-specific flags should be prefixed.
12719 (PModule::rule): Likewise.
12721 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12723 * configure.ac (CMP): Check if cmp is available explicitly.
12725 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12727 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12728 (target_cpu): New variable.
12729 (pkglibdir): Use target_cpu instead of host_cpu.
12731 * util/i386/pc/grub-install.in (host_cpu): Removed.
12732 (target_cpu): New variable.
12733 (pkglibdir): Use target_cpu instead of host_cpu.
12735 * util/genmoddep.c: Removed.
12737 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12738 instead of GRUB_HOST_SIZEOF_VOID_P.
12739 * kern/dl.c: Likewise.
12741 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12743 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12744 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12745 (GRUB_TARGET_SIZEOF_LONG): ... this.
12746 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12747 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12748 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12750 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12751 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12752 (GRUB_TARGET_SIZEOF_LONG): ... this.
12753 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12754 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12755 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12757 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12758 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12759 (GRUB_TARGET_SIZEOF_LONG): ... this.
12760 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12761 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12763 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12764 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12765 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12766 instead of GRUB_HOST_SIZEOF_LONG.
12767 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12768 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12769 GRUB_CPU_WORDS_BIGENDIAN.
12770 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12771 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12774 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12775 (genmoddep_SOURCES): Likewise.
12776 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12777 (genmoddep_SOURCES): Likewise.
12778 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12779 (genmoddep_SOURCES): Likewise.
12780 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12782 (genmoddep_SOURCES): Likewise.
12784 * genmoddep.awk: New file.
12786 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12787 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12788 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12789 (PModule::rule): Likewise.
12790 (Program::rule): Likewise.
12791 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12792 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12795 * configure.ac: Rewritten intensively to use host and target
12796 instead of build and host, respectively.
12798 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12799 (host_cpu): Removed.
12800 (target_cpu): New variable.
12801 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12802 (BUILD_CC): Removed.
12803 (BUILD_CFLAGS): Likewise.
12804 (BUILD_CPPFLAGS): Likewise.
12805 (TARGET_CC): New variable.
12806 (TARGET_CFLAGS): Likewise.
12807 (TARGET_CPPFLAGS): Likewise.
12808 (TARGET_LDFLAGS): Likewise.
12810 (include): Use target_cpu instead of host_cpu.
12811 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12813 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12815 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12817 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12818 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12819 field 'false' to 'exec_on_false'.
12820 (grub_script_create_cmdif): Renamed argument names to reflect above
12823 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12825 * normal/script.c (grub_script_create_cmdif): Likewise.
12827 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12829 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12831 (grub_hfsplus_btree_recptr): Likewise.
12832 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12833 FILEBLOCK both to pass a block number and store next block
12835 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12836 overflow file correctly. Specify errors appropriately, because
12837 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12838 grub_hfsplus_btree_recptr to get the pointer to a found key.
12839 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12842 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12844 (_linux_mod_SOURCES): New variable.
12845 (_linux_mod_CFLAGS): Likewise.
12846 (_linux_mod_LDFLAGS): Likewise.
12847 (linux_mod_SOURCES): Likewise.
12848 (linux_mod_CFLAGS): Likewise.
12849 (linux_mod_LDFLAGS): Likewise.
12851 * DISTLIST: Added loader/i386/efi/linux.c,
12852 loader/i386/efi/linux_normal.c and
12853 include/grub/i386/efi/loader.h.
12855 * loader/i386/efi/linux.c: New file.
12856 * loader/i386/efi/linux_normal.c: Likewise.
12857 * include/grub/i386/efi/loader.h: Likewise.
12859 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12861 * commands/blocklist.c: New file.
12863 * DISTLIST: Added commands/blocklist.c.
12865 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12866 color for the background, and a darker color for the foreground.
12867 (grub_console_checkkey): Return READ_KEY.
12868 (grub_console_cls): Set the background to
12869 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12871 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12873 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12874 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12876 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12879 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12880 BG. The spec is wrong again.
12882 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12884 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12886 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12887 commands/blocklist.c.
12888 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12890 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12891 (blocklist_mod_SOURCES): New variable.
12892 (blocklist_mod_CFLAGS): Likewise.
12893 (blocklist_mod_LDFLAGS): Likewise.
12895 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12897 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12899 (lba_mode): Use %eax more intensively to reduce the code size.
12901 2006-05-20 Marco Gerards <marco@gnu.org>
12903 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12905 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12907 (script): Accept leading newlines.
12908 (newlines): New rule to describe 0 or more newlines.
12909 (commands): Accept `command' with trailing newline. Fixed the
12910 order in which arguments were passed to `grub_script_add_cmd'.
12911 Accept commands separated by newlines.
12912 (function): Changed to accept newlines.
12913 (menuentry) Rewritten.
12915 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12916 front of the list, instead of to the end.
12918 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12920 * util/i386/pc/grub-install.in (bindir): New variable.
12921 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12922 Shaver <lbgwjl@gmail.com>.
12924 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12926 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12927 grub/machine/linux.h
12928 * loader/i386/pc/linux.c: Likewise.
12930 * include/grub/i386/pc/linux.h: Moved to ...
12931 * include/grub/i386/linux.h: ... here.
12933 * include/grub/i386/linux.h (struct linux_kernel_params): New
12936 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12938 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12940 (grub_video_vbe_blit_glyph): Likewise.
12941 (grub_video_vbe_blit_bitmap): Likewise.
12942 (grub_video_vbe_blit_render_target): Likewise.
12944 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12946 * configure.ac (--with-platform): Properly quote the square
12949 2006-05-08 Marco Gerards <marco@gnu.org>
12951 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12953 (kernel_elf_HEADERS): ...to this. Updated all users.
12954 (grubof_symlist.c): Renamed from this...
12955 (kernel_elf_symlist.c): ...to this. Updated all users.
12956 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12957 (grubof_SOURCES): Renamed from this...
12958 (kernel_elf_SOURCES): ...to this.
12959 (grubof_HEADERS): Renamed from this...
12960 (kernel_elf_HEADERS): ...to this.
12961 (grubof_CFLAGS): Renamed from this...
12962 (kernel_elf_CFLAGS): ...to this.
12963 (grubof_ASFLAGS): Renamed from this...
12964 (kernel_elf_ASFLAGS): ...to this.
12965 (grubof_LDFLAGS): Renamed from this...
12966 (kernel_elf_LDFLAGS): ...to this.
12968 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12970 (kernel_elf_HEADERS): ...to this. Updated all users.
12971 (grubof_symlist.c): Renamed from this...
12972 (kernel_elf_symlist.c): ...to this. Updated all users.
12973 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12974 (grubof_SOURCES): Renamed from this...
12975 (kernel_elf_SOURCES): ...to this.
12976 (grubof_HEADERS): Renamed from this...
12977 (kernel_elf_HEADERS): ...to this.
12978 (grubof_CFLAGS): Renamed from this...
12979 (kernel_elf_CFLAGS): ...to this.
12980 (grubof_ASFLAGS): Renamed from this...
12981 (kernel_elf_ASFLAGS): ...to this.
12982 (grubof_LDFLAGS): Renamed from this...
12983 (kernel_elf_LDFLAGS): ...to this.
12985 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12986 `kernel.elf' instead of `grubof'.
12988 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12990 Add --with-platform to configure. Use pkglibdir instead of
12991 pkgdatadir. This is reported by Roger Leigh.
12993 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12994 (host_vendor): Likewise.
12995 (host_os): Likewise.
12996 (pkgdatadir): Likewise.
12997 (platform): New variable.
12998 (pkglibdir): Likewise.
12999 Use PKGLIBDIR instead of PKGDATADIR.
13001 * util/i386/pc/grub-install.in (datadir): Removed.
13002 (host_vendor): Likewise.
13003 (host_os): Likewise.
13004 (pkgdatadir): Likewise.
13005 (platform): New variable.
13006 (pkglibdir): Likewise.
13007 Use PKGLIBDIR instead of PKGDATADIR.
13009 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13010 instead of GRUB_DATADIR.
13012 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13014 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13017 * configure.ac (--with-platform): New option.
13018 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13020 * Makefile.in: Include a makefile based on PLATFORM instead of
13022 (pkgdatadir): Not appended by the machine type.
13023 (pkglibdir): Appended by the machine type.
13024 (host_vendor): Removed.
13025 (platform): New variable.
13026 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13027 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13028 (uninstall): Likewise.
13030 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13032 Use the environment context in the menu. Remove the commands
13033 "default" and "timeout", and use variables instead.
13035 * normal/menu.c: Include grub/env.h.
13036 (print_entry): Cast TITLE to silence gcc.
13037 (get_timeout): New function.
13038 (set_timeout): Likewise.
13039 (get_entry_number): Likewise.
13040 (run_menu): Use a default entry, a fallback entry and a timeout
13041 in the environment variables "default", "fallback" and
13042 "timeout". Also, tweak the default entry if it is not within the
13043 current menu entries.
13044 (grub_menu_run): Use a fallback entry in the environment variable
13047 * normal/main.c (read_config_file): Do not initialize
13048 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13050 (grub_normal_execute): Use a data slot to store the menu.
13052 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13053 fallback_entry and timeout.
13054 (struct grub_menu_list): Removed.
13055 (grub_menu_list_t): Likewise.
13056 (struct grub_context): Likewise.
13057 (grub_context_t): Likewise.
13058 (grub_context_get): Likewise.
13059 (grub_context_get_current_menu): Likewise.
13060 (grub_context_push_menu): Likewise.
13061 (grub_context_pop_menu): Likewise.
13062 (grub_default_init): Likewise.
13063 (grub_default_fini): Likewise.
13064 (grub_timeout_init): Likewise.
13065 (grub_timeout_fini): Likewise.
13067 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13069 (normal_mod_SOURCES): Removed normal/context.c.
13071 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13072 commands/default.c, commands/timeout.c and normal/context.c.
13073 (normal_mod_SOURCES): Removed normal/context.c.
13075 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13076 commands/timeout.c and normal/context.c.
13077 (normal_mod_SOURCES): Removed normal/context.c.
13079 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13080 commands/default.c, commands/timeout.c and normal/context.c.
13081 (normal_mod_SOURCES): Removed normal/context.c.
13083 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13085 (default_mod_SOURCES): Removed.
13086 (default_mod_CFLAGS): Likewise.
13087 (default_mod_LDFLAGS): Likewise.
13088 (timeout_mod_SOURCES): Removed.
13089 (timeout_mod_CFLAGS): Likewise.
13090 (timeout_mod_LDFLAGS): Likewise.
13092 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13095 * commands/default.c: Removed.
13096 * commands/timeout.c: Likewise.
13097 * normal/context.c: Likewise.
13099 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13101 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13103 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13105 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13106 "next" to "prev" for readability.
13107 (struct grub_env_sorted_var): New struct.
13108 (grub_env_context): Renamed to ...
13109 (initial_context): ... this.
13110 (grub_env_var_context): Renamed to ...
13111 (current_context): ... this.
13112 (grub_env_find): Look only at CURRENT_CONTEXT.
13113 (grub_env_context_open): Rewritten to copy exported variables from
13115 (grub_env_context_close): Rewritten according to the new
13116 scheme. Also, add an assertion to prevent the initial context from
13118 (grub_env_insert): Removed the code for the sorted list.
13119 (grub_env_remove): Likewise.
13120 (grub_env_export): Simply mark the variable with
13121 GRUB_ENV_VAR_GLOBAL.
13122 (grub_env_set): A cosmetic change for naming consistency.
13123 (grub_env_get): Likewise.
13124 (grub_env_unset): Likewise.
13125 (grub_env_iterate): Rewritten to sort variables within this
13127 (grub_register_variable_hook): Fixed for naming consistency. Call
13128 grub_env_find again, only if NAME is not found at the first time.
13129 (mangle_data_slot_name): New function.
13130 (grub_env_set_data_slot): Likewise.
13131 (grub_env_get_data_slot): Likewise.
13132 (grub_env_unset_data_slot): Likewise.
13134 * include/grub/env.h (grub_env_var_type): New enum.
13135 (GRUB_ENV_VAR_LOCAL): New constant.
13136 (GRUB_ENV_VAR_GLOBAL): Likewise.
13137 (GRUB_ENV_VAR_DATA): Likewise.
13138 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13140 (grub_env_set): Replace VAR with NAME for consistency.
13141 (grub_register_variable_hook): Likewise.
13142 (grub_env_export): Specify the name of the argument.
13143 (grub_env_set_data_slot): New prototype.
13144 (grub_env_get_data_slot): Likewise.
13145 (grub_env_unset_data_slot): Likewise.
13147 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13149 Extend the loader so that GRUB can accept a loader which comes
13150 back to GRUB when a loaded image exits. Also, this change adds
13151 support for a chainloader on EFI.
13153 * term/efi/console.c: Include grub/misc.h.
13154 (grub_console_checkkey): Display a scan code on the top for
13155 debugging. This will be removed once the EFI port gets stable.
13156 Correct the scan code mapping.
13158 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13159 allocate memory from larger regions, in order to reduce the number
13160 of allocated regions. Otherwise, the MacOSX loader panics.
13161 (filter_memory_map): Avoid less than 1MB for compatibility with
13163 (add_memory_regions): Allocate from the tail of a region, if
13164 possible, to avoid allocating a region near to 1MB, for the MacOSX
13167 * kern/efi/init.c (grub_efi_set_prefix): Specify
13168 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13170 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13171 argument IMAGE_HANDLE and specify it to get a loaded image.
13172 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13173 grub_efi_get_loaded_image.
13174 (grub_efi_get_filename): Divide the length by the size of
13176 (grub_efi_get_device_path): New function.
13177 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13178 the length by the size of grub_efi_char16_t for a file path device
13181 * kern/loader.c (grub_loader_noreturn): New variable.
13182 (grub_loader_set): Accept a new argument NORETURN. Set
13183 GRUB_LOADER_NORETURN to NORETURN.
13184 All callers changed.
13185 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13188 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13190 (grub_efi_get_loaded_image): Take an argument to specify an image
13193 * include/grub/loader.h (grub_loader_set): Added one more argument
13196 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13197 instead of grub_efi_open_protocol.
13198 (grub_efidisk_get_device_name): Likewise.
13199 (grub_efidisk_close): Print a newline.
13200 (grub_efidisk_get_device_handle): Fixed to use
13201 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13202 GRUB_EFI_DEVICE_PATH_TYPE.
13204 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13205 * kern/efi/efi.c (device_path_guid): ... here.
13207 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13209 (kernel_mod_HEADERS): Added efi/disk.h.
13210 (_chain_mod_SOURCES): New variable.
13211 (_chain_mod_CFLAGS): Likewise.
13212 (_chain_mod_LDFLAGS): Likewise.
13213 (chain_mod_SOURCES): Likewise.
13214 (chain_mod_CFLAGS): Likewise.
13215 (chain_mod_LDFLAGS): Likewise.
13217 * DISTLIST: Added include/grub/efi/chainloader.h,
13218 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13220 * include/grub/efi/chainloader.h: New file.
13221 * loader/efi/chainloader.c: Likewise.
13222 * loader/efi/chainloader_normal.c: Likewise.
13224 2006-04-30 Marco Gerards <marco@gnu.org>
13226 * commands/configfile.c (grub_cmd_source): New function.
13227 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13228 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13230 2006-04-30 Marco Gerards <marco@gnu.org>
13232 * normal/execute.c (grub_script_execute_cmd): Change the return
13233 type to `grub_err_t'. Correctly return the error.
13234 (grub_script_execute_cmdline): In case a command line is not a
13235 command or a function, try to interpret it as an assignment.
13237 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13239 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13240 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13241 skip a node whose name is obviously invalid as UTF-16,
13242 i.e. contains a NUL character. Stop the iteration when the last
13243 directory entry is found. Instead of using the return value of
13244 grub_hfsplus_btree_iterate_node, store the value in RET and use
13245 it, because the iterator can be stopped by the last directory
13248 2006-04-30 Marco Gerards <marco@gnu.org>
13250 * include/grub/env.h (grub_env_export): New prototype. Reported
13251 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13253 2006-04-30 Marco Gerards <marco@gnu.org>
13255 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13256 size of the extents in a catalog file record.
13258 2006-04-29 Marco Gerards <marco@gnu.org>
13260 * commands/configfile.c (grub_cmd_configfile): Execute the
13261 configfile within its own context.
13263 * include/grub/env.h (grub_env_context_open): New prototype.
13264 (grub_env_context_close): Likewise.
13266 * kern/env.c (grub_env): Removed.
13267 (grub_env_sorted): Likewise.
13268 (grub_env_context): New variable.
13269 (grub_env_var_context): Likewise.
13270 (grub_env_find): Search both the active context and the global
13272 (grub_env_context_open): New function.
13273 (grub_env_context_close): Likewise.
13274 (grub_env_insert): Likewise.
13275 (grub_env_remove): Likewise.
13276 (grub_env_export): Likewise.
13277 (grub_env_set): Changed to use helper functions to avoid code
13279 (grub_env_iterate): Rewritten so both the current context and the
13280 global context are being used.
13282 * normal/command.c (export_command): New function.
13283 (grub_command_init): Register the `export' function.
13285 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13287 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13288 explicitly to suppress gcc's warnings.
13289 * fs/fat.c (grub_fat_find_dir): Likewise.
13290 (grub_fat_label): Likewise.
13291 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13292 (grub_xfs_mount): Likewise.
13293 (grub_xfs_label): Likewise.
13294 * fs/affs.c (grub_affs_mount): Likewise.
13295 (grub_affs_label): Likewise.
13296 (grub_affs_iterate_dir): Likewise.
13297 * fs/sfs.c (grub_sfs_mount): Likewise.
13298 (grub_sfs_iterate_dir): Likewise.
13299 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13300 * fs/hfs.c (grub_hfs_mount): Likewise.
13301 (grub_hfs_cmp_catkeys): Likewise.
13302 (grub_hfs_find_dir): Likewise.
13303 (grub_hfs_dir): Likewise.
13304 (grub_hfs_label): Likewise.
13305 * fs/jfs.c (grub_jfs_mount): Likewise.
13306 (grub_jfs_opendir): Likewise.
13307 (grub_jfs_getent): Likewise.
13308 (grub_jfs_lookup_symlink): Likewise.
13309 (grub_jfs_label): Likewise.
13310 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13311 (grub_hfsplus_iterate_dir): Likewise.
13312 (grub_hfsplus_btree_iterate_node): Made static.
13314 * util/grub-emu.c (prefix): New variable.
13315 (grub_machine_set_prefix): New function.
13316 (main): Do not set the environment variable "prefix" here. Only
13317 set PREFIX, which is used later by grub_machine_set_prefix.
13319 * include/grub/video.h: Do not include grub/symbol.h.
13320 (grub_video_register): Not exported. This symbol is not defined in
13322 (grub_video_unregister): Likewise.
13323 (grub_video_iterate): Likewise.
13324 (grub_video_setup): Likewise.
13325 (grub_video_restore): Likewise.
13326 (grub_video_get_info): Likewise.
13327 (grub_video_get_blit_format): Likewise.
13328 (grub_video_set_palette): Likewise.
13329 (grub_video_get_palette): Likewise.
13330 (grub_video_set_viewport): Likewise.
13331 (grub_video_get_viewport): Likewise.
13332 (grub_video_map_color): Likewise.
13333 (grub_video_map_rgb): Likewise.
13334 (grub_video_map_rgba): Likewise.
13335 (grub_video_fill_rect): Likewise.
13336 (grub_video_blit_glyph): Likewise.
13337 (grub_video_blit_bitmap): Likewise.
13338 (grub_video_blit_render_target): Likewise.
13339 (grub_video_scroll): Likewise.
13340 (grub_video_swap_buffers): Likewise.
13341 (grub_video_create_render_target): Likewise.
13342 (grub_video_delete_render_target): Likewise.
13343 (grub_video_set_active_render_target): Likewise.
13345 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13347 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13349 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13350 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13351 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13352 instead of $(srcdir)/genkernsyms.sh.
13354 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13355 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13356 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13357 instead of $(srcdir)/genkernsyms.sh.
13359 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13360 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13361 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13362 instead of $(srcdir)/genkernsyms.sh.
13364 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13365 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13366 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13367 instead of $(srcdir)/genkernsyms.sh.
13369 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13372 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13374 (gensymlist.sh): New target.
13375 (genkernsyms.sh): Likewise.
13377 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13378 genkernsyms.sh.in and gensymlist.sh.in.
13380 * genkernsyms.sh: Removed.
13381 * gensymlist.sh: Likewise.
13383 * genkernsyms.sh.in: New file.
13384 * gensymlist.sh.in: Likewise.
13386 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13388 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13389 clobber "prefix", since we may have already set it manually.
13391 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13393 * kern/misc.c (abort): New alias for grub_abort.
13395 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13397 A new machine-specific function "grub_machine_set_prefix" is
13398 defined. This is called after loading modules, so that a prefix
13399 initialization can use modules. Also, this change adds an
13400 intensive debugging feature for the memory manager via the
13401 configure option "--enable-mm-debug".
13403 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13406 * kern/sparc64/ieee1275/init.c (abort): Removed.
13407 (grub_stop): Likewise.
13408 (grub_exit): New function.
13409 (grub_set_prefix): Renamed to ...
13410 (grub_machine_set_prefix): ... this.
13411 (grub_machine_init): Do not call grub_set_prefix.
13413 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13414 (grub_machine_set_prefix): ... this.
13415 (grub_machine_init): Do not call grub_set_prefix.
13417 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13418 (grub_machine_init): Do not set the prefix here.
13420 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13422 * kern/efi/init.c: Include grub/mm.h.
13423 (grub_efi_set_prefix): New function.
13425 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13426 (grub_efi_get_filename): New function.
13427 (grub_print_device_path): Renamed to ...
13428 (grub_efi_print_device_path): ... this.
13430 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13431 [MM_DEBUG] (grub_realloc): Likewise.
13432 [MM_DEBUG] (grub_free): Likewise.
13433 [MM_DEBUG] (grub_memalign): Likewise.
13434 [MM_DEBUG] (grub_mm_debug): New variable.
13435 [MM_DEBUG] (grub_debug_malloc): New function.
13436 [MM_DEBUG] (grub_debug_free): New function.
13437 [MM_DEBUG] (grub_debug_realloc): New function.
13438 [MM_DEBUG] (grub_debug_memalign): New function.
13440 * kern/misc.c (grub_abort): Print a newline to distinguish
13443 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13444 grub_set_root_dev after loading modules. This is necessary when
13445 setting a prefix depends on modules.
13447 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13448 (grub_efi_print_device_path): ... this.
13449 (grub_efi_get_filename): New prototype.
13450 (grub_efi_set_prefix): Likewise.
13452 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13454 (grub_efidisk_get_device_handle): New prototype.
13455 (grub_efidisk_get_device_name): Likewise.
13457 * include/grub/mm.h: Include config.h.
13458 (MM_DEBUG): Removed.
13459 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13460 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13461 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13462 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13463 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13464 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13465 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13466 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13467 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13469 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13471 * disk/efi/efidisk.c: Include grub/partition.h.
13472 (iterate_child_devices): New function.
13473 (add_device): First, compare only last device path nodes, so that
13474 devices are sorted by the types.
13475 (grub_efidisk_get_device_handle): New function.
13476 (grub_efidisk_get_device_name): Likewise.
13478 * configure.ac (--enable-mm-debug): New option to enable the
13479 memory manager debugging feature. This makes the binary much
13480 bigger, so is disabled by default.
13482 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13484 Use grub_abort instead of grub_stop, and grub_exit must be
13485 define in each architecture now. Also, this change adds support
13488 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13489 (grub_getkey): New function.
13490 (grub_term_get_current): Likewise.
13492 * util/i386/pc/grub-setup.c: Include grub/term.h.
13493 (grub_getkey): New function.
13494 (grub_term_get_current): Likewise.
13496 * util/misc.c (grub_stop): Renamed to ...
13497 (grub_exit): ... this.
13499 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13500 (grub_exit): ... this.
13501 (grub_machine_init): Use grub_abort instead of abort.
13502 (grub_stop): Removed.
13504 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13507 * kern/i386/pc/startup.S (grub_exit): New function.
13508 (cold_reboot): New label.
13510 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13511 (grub_efi_init): Call grub_efidisk_init.
13512 (grub_efi_fini): Call grub_efidisk_fini.
13514 * kern/efi/efi.c: Include grub/mm.h.
13515 (grub_efi_console_control_guid): Renamed to ...
13516 (console_control_guid): ... this.
13517 (grub_efi_loaded_image_guid): Renamed to ...
13518 (loaded_image_guid): ... this.
13519 (grub_efi_locate_handle): New function.
13520 (grub_efi_open_protocol): Likewise.
13521 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13522 GRUB_EFI_CONSOLE_CONTROL_GUID.
13523 (grub_efi_exit): Removed.
13524 (grub_stop): Likewise.
13525 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13526 (grub_exit): New function.
13527 (grub_print_device_path): Likewise.
13529 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13530 (grub_enter_rescue_mode): Register "exit".
13532 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13533 (grub_abort): New function.
13535 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13537 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13539 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13541 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13542 (grub_print_device_path): New prototype.
13543 (grub_efi_locate_handle): Likewise.
13544 (grub_efi_open_protocol): Likewise.
13546 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13547 * disk/efi/efidisk.c: Likewise.
13549 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13551 * include/grub/efi/console_control.h
13552 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13554 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13555 last 8 bytes as an array.
13556 (GRUB_EFI_DISK_IO_GUID): New macro.
13557 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13558 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13559 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13561 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13562 (struct grub_efi_device_path): Rename the member "sub_type" to
13564 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13565 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13566 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13567 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13568 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13569 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13570 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13571 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13572 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13573 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13574 (struct grub_efi_pci_device_path): New structure.
13575 (grub_efi_pci_device_path_t): New type.
13576 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13577 (struct grub_efi_pccard_device_path): New structure.
13578 (grub_efi_pccard_device_path_t): New type.
13579 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13580 (struct grub_efi_memory_mapped_device_path): New structure.
13581 (grub_efi_memory_mapped_device_path_t): New type.
13582 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13583 (struct grub_efi_vendor_device_path): New structure.
13584 (grub_efi_vendor_device_path_t): New type.
13585 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13586 (struct grub_efi_controller_device_path): New structure.
13587 (grub_efi_controller_device_path_t): New type.
13588 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13589 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13590 (struct grub_efi_acpi_device_path): New structure.
13591 (grub_efi_acpi_device_path_t): New type.
13592 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13593 (struct grub_efi_expanded_acpi_device_path): New structure.
13594 (grub_efi_expanded_acpi_device_path_t): New type.
13595 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13596 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13597 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13598 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13599 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13600 (struct grub_efi_atapi_device_path): New structure.
13601 (grub_efi_atapi_device_path_t): New type.
13602 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13603 (struct grub_efi_fibre_channel_device_path): New structure.
13604 (grub_efi_fibre_channel_device_path_t): New type.
13605 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13606 (struct grub_efi_1394_device_path): New structure.
13607 (grub_efi_1394_device_path_t): New type.
13608 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13609 (struct grub_efi_usb_device_path): New structure.
13610 (grub_efi_usb_device_path_t): New type.
13611 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13612 (struct grub_efi_usb_class_device_path): New structure.
13613 (grub_efi_usb_class_device_path_t): New type.
13614 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13615 (struct grub_efi_i2o_device_path): New structure.
13616 (grub_efi_i2o_device_path_t): New type.
13617 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13618 (struct grub_efi_mac_address_device_path): New structure.
13619 (grub_efi_mac_address_device_path_t): New type.
13620 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13621 (struct grub_efi_ipv4_device_path): New structure.
13622 (grub_efi_ipv4_device_path_t): New type.
13623 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13624 (struct grub_efi_ipv6_device_path): New structure.
13625 (grub_efi_ipv6_device_path_t): New type.
13626 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13627 (struct grub_efi_infiniband_device_path): New structure.
13628 (grub_efi_infiniband_device_path_t): New type.
13629 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13630 (struct grub_efi_uart_device_path): New structure.
13631 (grub_efi_uart_device_path_t): New type.
13632 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13633 (struct grub_efi_vendor_messaging_device_path): New structure.
13634 (grub_efi_vendor_messaging_device_path_t): New type.
13635 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13636 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13637 (struct grub_efi_hard_drive_device_path): New structure.
13638 (grub_efi_hard_drive_device_path_t): New type.
13639 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13640 (struct grub_efi_cdrom_device_path): New structure.
13641 (grub_efi_cdrom_device_path_t): New type.
13642 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13643 (struct grub_efi_vendor_media_device_path): New structure.
13644 (grub_efi_vendor_media_device_path_t): New type.
13645 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13646 (struct grub_efi_file_path_device_path): New structure.
13647 (grub_efi_file_path_device_path_t): New type.
13648 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13649 (struct grub_efi_protocol_device_path): New structure.
13650 (grub_efi_protocol_device_path_t): New type.
13651 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13652 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13653 (struct grub_efi_bios_device_path): New structure.
13654 (grub_efi_bios_device_path_t): New type.
13655 (struct grub_efi_disk_io): New structure.
13656 (grub_efi_disk_io_t): New type.
13657 (struct grub_efi_block_io_media): New structure.
13658 (grub_efi_block_io_media_t): New type.
13659 (struct grub_efi_block_io): New structure.
13660 (grub_efi_block_io_t): New type.
13662 * include/grub/misc.h (grub_stop): Removed.
13663 (grub_exit): New prototype.
13664 (grub_abort): Likewise.
13666 * include/grub/disk.h (enum grub_disk_dev_id): Added
13667 GRUB_DISK_DEVICE_EFIDISK_ID.
13669 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13670 disk/efi/efidisk.c.
13671 (kernel_syms.lst): Remove the target if an error occurs.
13673 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13675 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13676 as it was simply too buggy.
13678 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13680 * kern/misc.c (grub_lltoa): New function.
13681 (grub_vsprintf): Added support for the long long suffix,
13684 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13686 * Makefile.in (LDFLAGS): Add variable.
13687 (LD): Remove variable.
13688 * configure.ac: Add -m32 to LDFLAGS.
13689 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13690 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13691 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13692 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13693 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13695 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13696 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13697 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13699 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13701 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13702 length for unknown glyph.
13704 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13706 Add support for pre-loaded modules into the EFI port.
13708 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13709 completely. Accept one more argument DIR. The caller has changed.
13711 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13713 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13714 (grub_efi_loaded_image_guid): New variable.
13715 (grub_efi_get_loaded_image): New function.
13716 (grub_arch_modules_addr): Likewise.
13718 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13721 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13722 (struct grub_efi_loaded_image): New structure.
13723 (grub_efi_loaded_image_t): New type.
13725 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13727 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13728 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13729 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13731 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13733 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13735 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13737 * DISTLIST: Added include/grub/efi/console.h,
13738 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13739 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13741 * include/grub/efi/console.h: New file.
13742 * include/grub/efi/time.h: Likewise.
13743 * include/grub/i386/efi/kernel.h: Likewise.
13744 * kern/efi/init.c: Likewise.
13745 * kern/efi/mm.c: Likewise.
13746 * term/efi/console.c: Likewise.
13748 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13749 (grub_stop): Removed.
13750 (grub_get_rtc): Likewise.
13751 (grub_machine_init): Simply call grub_efi_init.
13752 (grub_machine_fini): Call grub_efi_fini.
13754 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13755 (grub_efi_output_string): Removed.
13756 (grub_efi_stall): New function.
13757 (grub_stop): Likewise.
13758 (grub_get_rtc): Likewise.
13760 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13761 (grub_efi_stall): New prototype.
13762 (grub_efi_allocate_pages): Likewise.
13763 (grub_efi_free_pages): Likewise.
13764 (grub_efi_get_memory_map): Likewise.
13765 (grub_efi_mm_init): Likewise.
13766 (grub_efi_mm_fini): Likewise.
13767 (grub_efi_init): Likewise.
13768 (grub_efi_fini): Likewise.
13770 * include/grub/i386/efi/time.h: Do not include
13771 grub/symbol.h. Include grub/efi/time.h.
13772 (GRUB_TICKS_PER_SECOND): Removed.
13773 (grub_get_rtc): Likewise.
13775 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13776 Added padding. The EFI spec is buggy.
13777 (GRUB_EFI_BLACK): New macro.
13778 (GRUB_EFI_BLUE): Likewise.
13779 (GRUB_EFI_GREEN): Likewise.
13780 (GRUB_EFI_CYAN): Likewise.
13781 (GRUB_EFI_RED): Likewise.
13782 (GRUB_EFI_MAGENTA): Likewise.
13783 (GRUB_EFI_BROWN): Likewise.
13784 (GRUB_EFI_LIGHTGRAY): Likewise.
13785 (GRUB_EFI_BRIGHT): Likewise.
13786 (GRUB_EFI_DARKGRAY): Likewise.
13787 (GRUB_EFI_LIGHTBLUE): Likewise.
13788 (GRUB_EFI_LIGHTGREEN): Likewise.
13789 (GRUB_EFI_LIGHTCYAN): Likewise.
13790 (GRUB_EFI_LIGHTRED): Likewise.
13791 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13792 (GRUB_EFI_YELLOW): Likewise.
13793 (GRUB_EFI_WHITE): Likewise.
13794 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13795 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13796 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13797 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13798 (GRUB_EFI_BACKGROUND_RED): Likewise.
13799 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13800 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13801 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13802 (GRUB_EFI_TEXT_ATTR): Likewise.
13804 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13805 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13806 (kernel_mod_HEADERS): Added efi/time.h.
13808 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13810 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13811 include/grub/efi/api.h, include/grub/efi/console_control.h,
13812 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13813 include/grub/i386/efi/time.h, kern/efi/efi.c,
13814 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13815 and util/i386/efi/grub-mkimage.c.
13817 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13819 * genmk.rb (PModule#rule): Do not export symbols if
13820 #{prefix}_EXPORTS is set to "no".
13822 * conf/i386-efi.mk: New file.
13823 * conf/i386-efi.rmk: Likewise.
13824 * include/grub/efi/api.h: Likewise.
13825 * include/grub/efi/console_control.h: Likewise.
13826 * include/grub/efi/efi.h: Likewise.
13827 * include/grub/efi/pe32.h: Likewise.
13828 * include/grub/i386/efi/time.h: Likewise.
13829 * kern/efi/efi.c: Likewise.
13830 * kern/i386/efi/init.c: Likewise.
13831 * kern/i386/efi/startup.S: Likewise.
13832 * util/i386/efi/grub-mkimage.c: Likewise.
13834 2006-04-17 Marco Gerards <marco@gnu.org>
13836 * include/grub/script.h: Include <grub/parser.h> and
13837 "grub_script.tab.h".
13838 (struct grub_lexer_param): New struct.
13839 (struct grub_parser_param): Likewise.
13840 (grub_script_create_arglist): Pass the state in an argument.
13841 (grub_script_add_arglist): Likewise.
13842 (grub_script_create_cmdline): Likewise.
13843 (grub_script_create_cmdblock): Likewise.
13844 (grub_script_create_cmdif): Likewise.
13845 (grub_script_create_cmdmenu): Likewise.
13846 (grub_script_add_cmd): Likewise.
13847 (grub_script_arg_add): Likewise.
13848 (grub_script_lexer_ref): Likewise.
13849 (grub_script_lexer_deref): Likewise.
13850 (grub_script_lexer_record_start): Likewise.
13851 (grub_script_lexer_record_stop): Likewise.
13852 (grub_script_mem_record): Likewise.
13853 (grub_script_mem_record_stop): Likewise.
13854 (grub_script_malloc): Likewise.
13855 (grub_script_yylex): Likewise.
13856 (grub_script_yyparse): Likewise.
13857 (grub_script_yyerror): Likewise.
13858 (grub_script_yylex): Likewise.
13859 (grub_script_lexer_init): Return the state.
13861 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13862 (grub_script_lexer_done): Likewise.
13863 (grub_script_lexer_getline): Likewise.
13864 (grub_script_lexer_refs): Likewise.
13865 (script): Likewise.
13866 (newscript): Likewise.
13867 (record): Likewise.
13868 (recording): Likewise.
13869 (recordpos): Likewise.
13870 (recordlen): Likewise.
13871 (grub_script_lexer_init): Return the state instead of setting
13873 (grub_script_lexer_ref): Use the newly added argument for state
13874 instead of globals.
13875 (grub_script_lexer_deref): Likewise.
13876 (grub_script_lexer_record_start): Likewise.
13877 (grub_script_lexer_record_stop): Likewise.
13878 (recordchar): Likewise.
13879 (nextchar): Likewise.
13880 (grub_script_yylex2): Likewise.
13881 (grub_script_yylex): Likewise.
13882 (grub_script_yyerror): Likewise.
13884 * normal/parser.y (func_mem): Removed variable.
13885 (menu_entry): Likewise.
13887 (%lex-param): New parser option.
13888 (%parse-param): Likewise.
13889 (script): Always return the AST.
13890 (argument): Pass the state around.
13891 (arguments): Likewise.
13892 (grubcmd): Likewise.
13893 (commands): Likewise.
13894 (function): Likewise.
13895 (menuentry): Likewise.
13896 (if_statement): Likewise.
13899 * normal/script.c (grub_script_memused): Removed variable.
13900 (grub_script_parsed): Likewise.
13901 (grub_script_malloc): Added a state argument. Use that instead of
13903 (grub_script_mem_record): Likewise.
13904 (grub_script_mem_record_stop): Likewise.
13905 (grub_script_arg_add): Likewise.
13906 (grub_script_add_arglist): Likewise.
13907 (grub_script_create_cmdline): Likewise.
13908 (grub_script_create_cmdif): Likewise.
13909 (grub_script_create_cmdmenu): Likewise.
13910 (grub_script_add_cmd): Likewise.
13911 (grub_script_parse): Setup the state before calling the parser.
13913 2006-04-16 Marco Gerards <marco@gnu.org>
13915 * normal/command.c (grub_command_init): Remove the title command.
13917 * normal/lexer.c (grub_script_yylex): Renamed from this...
13918 (grub_script_yylex2): ... to this.
13919 (grub_script_yylex): New function. Temporary
13920 introduced to filter some tokens.
13921 (grub_script_yyerror): Print a newline.
13923 * normal/main.c (read_config_file): Output information about the
13924 lines that contain errors. Wait for a key after all lines have
13925 been processed. Don't return an empty menu.
13927 * normal/parser.y (func_mem): Don't initialize.
13928 (menu_entry): Likewise.
13929 (err): New variable.
13930 (script): Don't return anything when an error was encountered.
13931 (ws, returns): Removed rules.
13932 (argument): Disabled concatenated variable support.
13933 (arguments): Remove explicit separators.
13934 (grubcmd): Likewise.
13935 (function): Likewise.
13936 (menuentry): Likewise.
13938 (commands): Likewise. Add error handling.
13940 * normal/script.c (grub_script_create_cmdline): If
13941 `grub_script_parsed' is 0, assume the parser encountered an error.
13943 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13945 * configure.ac: Add support for EFI. Fix the typo
13946 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13948 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13950 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13951 foreign multibyte characters should be shown correctly.
13953 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13955 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13957 (read_config_file): Made it to close file before returning.
13959 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13961 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13962 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13963 video/i386/pc/vbefill.c.
13965 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13966 video/i386/pc/vbefill.c.
13968 * include/grub/video.h (grub_video_blit_format): New enum.
13969 (grub_video_mode_info): Added new member blit_format.
13970 (grub_video_get_blit_format): New function prototype.
13972 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13973 function prototype.
13974 (grub_video_vbe_map_rgb): Likewise.
13975 (grub_video_vbe_unmap_color): Likewise.
13977 * include/grub/i386/pc/vbeblit.h: New file.
13979 * include/grub/i386/pc/vbefill.h: New file.
13981 * video/video.c (grub_video_get_blit_format): New function.
13982 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13983 (grub_video_vbe_map_rgb): Likewise.
13984 (grub_video_vbe_unmap_color): Likewise.
13986 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13988 (grub_video_vbe_blit_render_target): Changed to use more optimized
13990 (grub_video_vbe_setup): Added detection for optimized settings.
13991 (grub_video_vbe_create_render_target): Likewise.
13993 * video/i386/pc/vbeblit.c: New file.
13995 * video/i386/pc/vbefill.c: New file.
13997 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13999 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14002 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14003 parsing to support both hex and dec ranges. If filename was missing
14004 show usage information.
14006 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14008 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14009 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14011 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14012 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14013 (video_mod_SOURCES): Added.
14014 (video_mod_CFLAGS): Likewise.
14015 (video_mod_LDFLAGS): Likewise.
14016 (gfxterm_mod_SOURCES): Likewise.
14017 (gfxterm_mod_CFLAGS): Likewise.
14018 (gfxterm_mod_LDFLAGS): Likewise.
14019 (videotest_mod_SOURCES): Likewise.
14020 (videotest_mod_CFLAGS): Likewise.
14021 (videotest_mod_LDFLAGS): Likewise.
14022 (vesafb_mod_SOURCES): Removed.
14023 (vesafb_mod_CFLAGS): Likewise.
14024 (vesafb_mod_LDFLAGS): Likewise.
14025 (vga_mod_SOURCES): Likewise.
14026 (vga_mod_CFLAGS): Likewise.
14027 (vga_mod_LDFLAGS): Likewise.
14029 * commands/videotest.c: New file.
14031 * font/manager.c (fill_with_default_glyph): Modified to use
14033 (grub_font_get_glyph): Likewise.
14034 (fontmanager): Renamed from this...
14035 (font_manager): ... to this.
14037 * include/grub/font.h (grub_font_glyph): Added new structure.
14038 (grub_font_get_glyph): Modified to use grub_font_glyph.
14040 * include/grub/misc.h (grub_abs): Added as inline function.
14042 * include/grub/video.h: New file.
14044 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14045 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14046 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14047 (grub_vbe_get_controller_info): Renamed from this...
14048 (grub_vbe_bios_get_controller_info): ... to this.
14049 (grub_vbe_get_mode_info): Renamed from this...
14050 (grub_vbe_bios_get_mode_info): ... to this.
14051 (grub_vbe_set_mode): Renamed from this...
14052 (grub_vbe_bios_set_mode): ... to this.
14053 (grub_vbe_get_mode): Renamed from this...
14054 (grub_vbe_bios_get_mode): ... to this.
14055 (grub_vbe_set_memory_window): Renamed from this...
14056 (grub_vbe_bios_set_memory_window): ... to this.
14057 (grub_vbe_get_memory_window): Renamed from this...
14058 (grub_vbe_bios_get_memory_window): ... to this.
14059 (grub_vbe_set_scanline_length): Renamed from this...
14060 (grub_vbe_set_scanline_length): ... to this.
14061 (grub_vbe_get_scanline_length): Renamed from this...
14062 (grub_vbe_bios_get_scanline_length): ... to this.
14063 (grub_vbe_set_display_start): Renamed from this...
14064 (grub_vbe_bios_set_display_start): ... to this.
14065 (grub_vbe_get_display_start): Renamed from this...
14066 (grub_vbe_bios_get_display_start): ... to this.
14067 (grub_vbe_set_palette_data): Renamed from this...
14068 (grub_vbe_bios_set_palette_data): ... to this.
14069 (grub_vbe_set_pixel_rgb): Removed.
14070 (grub_vbe_set_pixel_index): Likewise.
14072 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14074 (grub_vbe_bios_get_controller_info): ... to this.
14075 (grub_vbe_get_mode_info): Renamed from this...
14076 (grub_vbe_bios_get_mode_info): ... to this.
14077 (grub_vbe_set_mode): Renamed from this...
14078 (grub_vbe_bios_set_mode): ... to this.
14079 (grub_vbe_get_mode): Renamed from this...
14080 (grub_vbe_bios_get_mode): ... to this.
14081 (grub_vbe_set_memory_window): Renamed from this...
14082 (grub_vbe_bios_set_memory_window): ... to this.
14083 (grub_vbe_get_memory_window): Renamed from this...
14084 (grub_vbe_bios_get_memory_window): ... to this.
14085 (grub_vbe_set_scanline_length): Renamed from this...
14086 (grub_vbe_set_scanline_length): ... to this.
14087 (grub_vbe_get_scanline_length): Renamed from this...
14088 (grub_vbe_bios_get_scanline_length): ... to this.
14089 (grub_vbe_set_display_start): Renamed from this...
14090 (grub_vbe_bios_set_display_start): ... to this.
14091 (grub_vbe_get_display_start): Renamed from this...
14092 (grub_vbe_bios_get_display_start): ... to this.
14093 (grub_vbe_set_palette_data): Renamed from this...
14094 (grub_vbe_bios_set_palette_data): ... to this.
14095 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14096 getting corrupted after calling it. Added more pushes and pops.
14097 (grub_vbe_bios_set_mode): Likewise.
14098 (grub_vbe_bios_get_mode): Likewise.
14099 (grub_vbe_bios_get_memory_window): Likewise.
14100 (grub_vbe_bios_set_scanline_length): Likewise.
14101 (grub_vbe_bios_get_scanline_length): Likewise.
14102 (grub_vbe_bios_get_display_start): Likewise.
14103 (grub_vbe_bios_set_palette_data): Likewise.
14105 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14106 (cl_insert): Likewise.
14107 (cl_delete): Likewise.
14109 * term/gfxterm.c: New file.
14111 * term/i386/pc/vesafb.c: Removed file.
14113 * video/video.c: New file.
14115 * video/i386/pc/vbe.c (real2pm): Added new function.
14116 (grub_video_vbe_draw_pixel): Likewise.
14117 (grub_video_vbe_get_video_ptr): Likewise.
14118 (grub_video_vbe_get_pixel): Likewise
14119 (grub_video_vbe_init): Likewise.
14120 (grub_video_vbe_fini): Likewise.
14121 (grub_video_vbe_setup): Likewise.
14122 (grub_video_vbe_get_info): Likewise.
14123 (grub_video_vbe_set_palette): Likewise.
14124 (grub_video_vbe_get_palette): Likewise.
14125 (grub_video_vbe_set_viewport): Likewise.
14126 (grub_video_vbe_get_viewport): Likewise.
14127 (grub_video_vbe_map_color): Likewise.
14128 (grub_video_vbe_map_rgb): Likewise.
14129 (grub_video_vbe_map_rgba): Likewise.
14130 (grub_video_vbe_unmap_color): Likewise.
14131 (grub_video_vbe_fill_rect): Likewise.
14132 (grub_video_vbe_blit_glyph): Likewise.
14133 (grub_video_vbe_blit_bitmap): Likewise.
14134 (grub_video_vbe_blit_render_target): Likewise.
14135 (grub_video_vbe_scroll): Likewise.
14136 (grub_video_vbe_swap_buffers): Likewise.
14137 (grub_video_vbe_create_render_target): Likewise.
14138 (grub_video_vbe_delete_render_target): Likewise.
14139 (grub_video_vbe_set_active_render_target): Likewise.
14140 (grub_vbe_set_pixel_rgb): Remove function.
14141 (grub_vbe_set_pixel_index): Likewise.
14142 (index_color_mode): Remove static variable.
14143 (active_mode): Likewise.
14144 (framebuffer): Likewise.
14145 (bytes_per_scan_line): Likewise.
14146 (grub_video_vbe_adapter): Added new static variable.
14147 (framebuffer): Likewise.
14148 (render_target): Likewise.
14149 (initial_mode): Likewise.
14150 (mode_in_use): Likewise.
14151 (mode_list): Likewise.
14153 2006-03-10 Marco Gerards <marco@gnu.org>
14155 * configure.ac (AC_INIT): Bumped to 1.93.
14157 * DISTLIST: Added `include/grub/hfs.h'.
14159 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14161 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14162 18H, which might help the BIOS falling back to next boot media.
14164 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14166 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14167 Poe Chen <poe.poechen@gmail.com>.
14169 2006-01-17 Marco Gerards <marco@gnu.org>
14171 * include/grub/normal.h: Include <grub/script.h>.
14172 (grub_command_list): Removed struct.
14173 (grub_command_list_t): Removed type.
14174 (grub_menu_entry): Remove members `num' and `command_list'. Add
14175 members `commands' and `sourcecode'.
14176 * include/grub/script.h: Add inclusion guards.
14177 (grub_script_cmd_menuentry): New struct.
14178 (grub_script_execute_menuentry): New prototype.
14179 (grub_script_lexer_record_start): Likewise.
14180 (grub_script_lexer_record_stop): Likewise.
14181 * normal/execute.c (grub_script_execute_menuentry): New function.
14182 * normal/lexer.c (record, recording, recordpos, recordlen): New
14184 (grub_script_lexer_record_start): New function.
14185 (grub_script_lexer_record_stop): Likewise.
14186 (recordchar): Likewise.
14187 (nextchar): Likewise.
14188 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14189 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14190 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14191 (current_menu): New variable.
14192 (free_menu): Mainly rewritten.
14193 (grub_normal_menu_addentry): New function.
14194 (read_config_file): Rewritten.
14195 * normal/menu.c (run_menu_entry): Mainly rewritten.
14196 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14198 (run): Mainly rewritten.
14199 * normal/parser.y (menu_entry): New variable.
14200 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14201 (menuentry): New rule.
14202 (command): Add `menuentry'.
14203 (if_statement): Allow additional returns before `fi'.
14204 * normal/script.c (grub_script_create_cmdmenu): New function.
14206 2006-01-03 Marco Gerards <marco@gnu.org>
14208 * INSTALL: GNU Bison is required.
14209 * configure.ac: Rewritten the test to detect Bison.
14210 * Makefile.in (YACC): New variable. Reported by Xun Sun
14211 <xun.sun.cn@gmail.com>.
14213 2006-01-03 Marco Gerards <marco@gnu.org>
14215 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14216 the HFS+ filesystem to filesystem blocks.
14217 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14218 GCC warning is silenced.
14220 2006-01-03 Marco Gerards <marco@gnu.org>
14222 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14223 read from disk from big endian to host byte order.
14225 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14227 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14229 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14230 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14231 embedded HFS+ filesystem.
14232 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14233 (grub_hfs_sblock): Move from here...
14234 * include/grub/hfs.h: To here... New file.
14235 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14237 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14239 (grub_hfsplus_volheader): Change type of member `magic' to
14241 (grub_hfsplus_data): Add new member `embedded_offset'.
14242 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14244 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14245 Calculate the offset.
14247 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14249 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14251 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14253 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14255 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14256 ENV->NAME is NULL after allocating ENV->VALUE.
14258 2005-12-25 Marco Gerards <marco@gnu.org>
14260 * kern/env.c (grub_env_set): Rewritten the error handling code.
14262 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14264 * geninit.sh: Made more robust, and more portable.
14266 2005-12-25 Marco Gerards <marco@gnu.org>
14268 Add support for Apple HFS+ filesystems.
14270 * fs/hfsplus.c: New file.
14272 * DISTLIST: Added `fs/hfsplus.c'.
14274 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14275 (hfsplus_mod_SOURCES): New variable.
14276 (hfsplus_mod_CFLAGS): Likewise.
14277 (hfsplus_mod_LDFLAGS): Likewise.
14278 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14279 (grub_setup_SOURCES): Likewise.
14280 (grub_mkdevicemap_SOURCES): Likewise.
14281 (grub_emu_SOURCES): Likewise.
14282 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14284 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14286 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14288 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14290 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14291 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14292 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14293 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14294 normal/lexer.c, normal/parser.y, normal/script.c, and
14296 Removed kern/sparc64/cache.c.
14298 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14299 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14302 * configure.ac (AC_INIT): Bumped to 1.92.
14304 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14306 * kern/err.c (grub_error_push): Added new function to support error
14308 (grub_error_pop): Likewise.
14309 (grub_error_stack_items): New local variable to support error stacks.
14310 (grub_error_stack_pos): Likewise.
14311 (grub_error_stack_assert): Likewise.
14312 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14314 (grub_print_error): Added support to print errors from error stack.
14316 * include/grub/err.h (grub_error_push): Added function prototype.
14317 (grub_error_pop): Likewise.
14319 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14321 * configure.ac: Accept `powerpc64' as host_cpu.
14322 (amd64): Rename to `biarch32'.
14324 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14325 non-cacheline-aligned addresses.
14327 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14328 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14329 if `size' is non-zero.
14331 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14333 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14334 and `cd' to make sure the filename is not prefixed with a
14336 (pkgdata_MODULES): Add `gpt.mod'.
14337 (gpt_mod_SOURCES): New variable.
14338 (gpt_mod_CFLAGS): Likewise.
14339 (gpt_mod_LDFLAGS): Likewise.
14341 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14343 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14346 * partmap/gpt.c: New file.
14348 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14349 GPT partition map is detected.
14351 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14353 * commands/i386/pc/play.c: New file.
14354 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14355 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14358 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14360 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14361 ((unused))' to silence gcc warning.
14363 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14365 * configure.ac: Correct `AC_PROG_YACC' test.
14367 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14369 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14370 check before installing files.
14372 2005-11-22 Mike Small <smallm@panix.com>
14374 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14375 number regex so multidigit numbers are recognized correctly.
14377 2005-11-22 Mike Small <smallm@panix.com>
14379 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14380 debugging message before attempting to claim memory.
14381 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14382 multiple addresses in case of failure.
14384 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14386 * term/tparm.c (get_space): Remove empty `if' statement.
14388 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14390 * kern/parser.c (check_varstate): Rename `state' to 's'.
14392 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14394 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14395 variable definitions to the beginning of each function. Sort stack
14397 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14398 `buf' argument to `char *'.
14400 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14402 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14403 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14404 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14405 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14406 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14407 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14408 configfile.mod, search.mod, gzio.mod and test.mod.
14409 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14410 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14411 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14412 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14413 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14414 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14415 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14416 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14417 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14418 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14419 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14420 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14421 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14422 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14423 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14424 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14425 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14426 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14427 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14428 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14429 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14430 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14431 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14433 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14435 (pkgdata_MODULES): Add test.mod.
14437 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14439 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14440 appending to variables with "+=".
14441 (PModule): Use full pathname to generate *.lst filenames.
14443 * Makefile.in: Fixed list rules moved from genmk.rb.
14444 (.DELETE_ON_ERROR): New special target.
14445 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14447 * conf/i386-pc.rmk: Include conf/common.mk.
14448 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14449 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14450 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14451 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14452 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14453 configfile.mod, search.mod, gzio.mod and test.mod.
14454 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14455 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14456 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14457 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14458 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14459 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14460 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14461 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14462 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14463 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14464 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14465 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14466 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14467 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14468 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14469 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14470 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14471 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14472 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14473 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14474 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14475 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14476 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14478 * conf/common.rmk: ... to here. New file.
14480 * conf/common.mk: New file.
14482 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14484 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14485 (grub_script.tab.c): ... here.
14487 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14488 (grub_script.tab.c): ... here.
14490 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14491 (grub_script.tab.c): ... here.
14493 * normal/command.c (grub_command_find): Fixed a memory leak of
14494 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14496 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14498 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14499 "@" which marks the start of a comment on ARM.
14500 (VARIABLE): Likewise.
14502 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14504 Add support for Linux/ADFS partition tables.
14506 * partmap/acorn.c: New file.
14508 * include/grub/acorn_filecore.h: Likewise.
14510 * DISTLIST: Added `partmap/acorn.c' and
14511 `include/grub/acorn_filecore.h'.
14513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14515 (pkgdata_MODULES): Add `acorn.mod'.
14516 (acorn_mod_SOURCES): New variable.
14517 (acorn_mod_CFLAGS): Likewise.
14519 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14521 (pkgdata_MODULES): Add `acorn.mod'.
14522 (acorn_mod_SOURCES): New variable.
14523 (acorn_mod_CFLAGS): Likewise.
14525 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14526 (pkgdata_MODULES): Add `acorn.mod'.
14527 (acorn_mod_SOURCES): New variable.
14528 (acorn_mod_CFLAGS): Likewise.
14529 (acorn_mod_LDFLAGS): Likewise.
14531 * include/types.h (grub_disk_addr_t): New typedef.
14533 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14535 * geninit.sh: New file.
14537 * geninitheader.sh: Likewise.
14539 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14540 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14541 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14542 * commands/configfile.c (grub_configfile_init)
14543 (grub_configfile_fini): Likewise.
14544 * commands/default.c (grub_default_init, grub_default_fini):
14546 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14547 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14548 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14549 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14551 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14552 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14554 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14555 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14557 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14559 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14561 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14562 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14563 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14564 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14565 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14566 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14567 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14568 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14569 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14570 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14571 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14572 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14573 * partmap/amiga.c (grub_amiga_partition_map_init)
14574 (grub_amiga_partition_map_fini): Likewise.
14575 * partmap/apple.c (grub_apple_partition_map_init)
14576 (grub_apple_partition_map_fini): Likewise.
14577 * partmap/pc.c (grub_pc_partition_map_init)
14578 (grub_pc_partition_map_fini): Likewise.
14579 * partmap/sun.c (grub_sun_partition_map_init,
14580 grub_sun_partition_map_fini): Likewise.
14581 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14584 * util/grub-emu.c: Include <grub_modules_init.h>.
14585 (main): Don't initialize and de-initialize any modules directly,
14586 use `grub_init_all' and `grub_fini_all' instead.
14588 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14589 `grub_vesafb_mod_init'.
14590 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14592 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14593 `grub_vga_mod_init'. Updated all users.
14594 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14596 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14597 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14600 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14601 Generate a function to initialize the module in utilities.
14602 Updated all callers.
14603 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14604 initialize the module in utilities. Updated all callers.
14606 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14608 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14609 escape sequence and a literal ^L to clear the screen.
14611 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14612 when returning from Open Firmware.
14614 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14616 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14617 (grub_ofconsole_height): Likewise.
14618 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14619 manually insert a '\n'.
14620 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14621 `grub_ofconsole_height'. Return early if these are already set.
14623 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14625 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14626 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14627 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14628 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14629 and `normal/script.c'.
14630 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14631 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14632 (test_mod_SOURCES): New variable.
14633 (test_mod_CFLAGS): Likewise.
14634 (test_mod_LDFLAGS): Likewise.
14635 (pkgdata_MODULES): Add `test.mod'.
14636 (grub_script.tab.c): New rule.
14637 (grub_script.tab.h): Likewise.
14639 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14642 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14643 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14644 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14645 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14646 (test_mod_SOURCES): New variable.
14647 (test_mod_CFLAGS): Likewise.
14648 (pkgdata_MODULES): Add `test.mod'.
14649 (grub_script.tab.c): New rule.
14650 (grub_script.tab.h): Likewise.
14652 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14654 Add initial scripting support.
14656 * commands/test.c: New file.
14657 * include/grub/script.h: Likewise.
14658 * normal/execute.c: Likewise.
14659 * normal/function.c: Likewise.
14660 * normal/lexer.c: Likewise.
14661 * normal/parser.y: Likewise.
14662 * normal/script.c: Likewise.
14664 * configure.ac: Add `AC_PROG_YACC' test.
14666 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14667 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14668 `normal/function.c' and `normal/script.c'.
14669 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14670 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14671 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14673 (pkgdata_MODULES): Add `test.mod'.
14674 (grub_script.tab.c): New rule.
14675 (grub_script.tab.h): Likewise.
14677 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14679 * include/grub/normal.h (grub_test_init): New prototype.
14680 (grub_test_fini): Likewise.
14682 * normal/command.c: Include <grub/script.h>.
14683 (grub_command_execute): Rewritten.
14685 * util/grub-emu.c (main): Call `grub_test_init' and
14688 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14690 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14692 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14693 there are no pending characters.
14695 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14697 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14698 `grub_strndup' to drop device arguments. Replace unnecessary
14699 `grub_strndup' with `grub_strdup'.
14701 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14703 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14704 `debug' environment variable has been set.
14706 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14708 * Makefile.in (install-local): Use $(DATA).
14709 (uninstall): Likewise.
14710 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14711 (sbin_UTILITIES): ... to here.
14712 (sbin_SCRIPTS): New variable.
14713 (grub_install_SOURCES): New variable.
14714 * util/powerpc/ieee1275/grub-install.in: New file.
14715 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14717 (add_segments): Call `grub_util_get_path'.
14719 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14721 From Timothy Baldwin:
14722 * commands/ls.c (grub_ls_list_files): Close FILE with
14724 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14726 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14728 * include/grub/parser.h: New file.
14730 * kern/parser.c: Likewise.
14732 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14733 (grub_setup_SOURCES): Likewise.
14734 (grub_probefs_SOURCES): Likewise.
14735 (grub_emu_SOURCES): Likewise.
14736 (kernel_img_HEADERS): Add `parser.h'.
14738 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14739 (grub_emu_SOURCES): Add `kern/parser.c'.
14740 (grubof_SOURCES): Likewise.
14742 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14743 (grubof_SOURCES): Add `kern/parser.c'.
14745 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14747 * kern/misc.c (grub_split_cmdline): Removed function.
14749 * kern/rescue.c: Include <grub/parser.h>.
14750 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14751 of `grub_split_cmdline'.
14753 * normal/command.c: Include <grub/parser.h>.
14754 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14755 of `grub_split_cmdline'.
14757 * normal/completion.c: Include <grub/parser.h>.
14758 (cmdline_state): New variable.
14759 (iterate_dir): End the filename with a quote depending on the
14760 command line state.
14761 (get_state): new function.
14762 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14763 split the arguments and determine the current argument. When the
14764 argument string is not quoted, escape all spaces.
14766 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14768 * normal/sparc64/setjmp.S: New file.
14770 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14772 * include/grub/sparc64/libgcc.h: New file.
14773 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14774 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14775 normal/sparc64/setjmp.c.
14777 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14779 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14780 * kern/sparc64/cache.S: New file.
14781 * kern/sparc64/cache.c: Removed.
14782 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14783 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14785 (COMMON_LDFLAGS): Add -melf64_sparc.
14786 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14787 (grubof_SOURCES): Use cache.S instead of cache.c.
14788 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14789 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14790 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14792 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14793 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14794 (linux_mod_CFLAGS): Commented out.
14795 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14796 out because module isn't built.
14797 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14798 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14799 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14800 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14801 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14802 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14803 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14804 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14805 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14806 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14807 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14808 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14809 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14810 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14812 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14814 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14815 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14816 longer, because HFS should not be used on PC.
14818 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14820 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14821 consistently within the loop.
14823 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14825 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14826 directory can not be read.
14828 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14830 * configure.ac (AC_INIT): Increase the version number to 1.91.
14832 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14833 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14834 term/i386/pc/serial.c.
14836 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14838 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14839 file size must be permitted.
14841 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14842 between %ah and %al.
14844 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14846 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14848 Call the hook with a NUL-terminated filename.
14849 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14852 * kern/term.c (cursor_state): New variable.
14853 (grub_term_set_current): Reset the cursor state on a new
14855 (grub_setcursor): Rewritten to use CURSOR_STATE.
14856 (grub_getcursor): New function.
14858 * include/grub/term.h (grub_getcursor): New prototype.
14860 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14861 integers on ARM. Reported by Timothy Baldwin
14862 <T.E.Baldwin99@members.leeds.ac.uk>.
14864 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14866 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14868 (grub_sfs_dir): Likewise.
14870 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14872 Add support for the SFS filesystem.
14874 * fs/sfs.c: New file.
14876 * DISTLIST: Added `fs/sfs.c'.
14878 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14879 (grub_probefs_SOURCES): Likewise.
14880 (grub_emu_SOURCES): Likewise.
14881 (pkgdata_MODULES): Add `sfs.mod'.
14882 (sfs_mod_SOURCES): New variable.
14883 (sfs_mod_CFLAGS): Likewise.
14884 (sfs_mod_LDFLAGS): Likewise.
14886 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14887 (pkgdata_MODULES): Add `sfs.mod'.
14888 (sfs_mod_SOURCES): New variable.
14889 (sfs_mod_CFLAGS): Likewise.
14891 * util/grub-emu.c (main): Call `grub_sfs_init' and
14894 * include/grub/fs.h (grub_sfs_init): New prototype.
14895 (grub_sfs_fini): Likewise.
14897 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14899 Add support for the AFFS filesystem.
14901 * fs/affs.c: New file.
14903 * DISTLIST: Added `fs/affs.c'.
14905 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14906 (grub_probefs_SOURCES): Likewise.
14907 (grub_emu_SOURCES): Likewise.
14908 (pkgdata_MODULES): Add `affs.mod'.
14909 (affs_mod_SOURCES): New variable.
14910 (affs_mod_CFLAGS): Likewise.
14911 (affs_mod_LDFLAGS): Likewise.
14913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14914 (pkgdata_MODULES): Add `affs.mod'.
14915 (affs_mod_SOURCES): New variable.
14916 (affs_mod_CFLAGS): Likewise.
14918 * util/grub-emu.c (main): Call `grub_affs_init' and
14921 * include/grub/fs.h (grub_affs_init): New prototype.
14922 (grub_affs_fini): Likewise.
14924 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14926 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14928 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14930 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14933 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14936 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14937 (COMMON_LDFLAGS): New variable.
14938 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14939 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14940 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14941 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14942 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14943 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14944 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14945 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14946 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14947 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14948 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14949 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14950 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14951 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14952 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14954 (normal_mod_ASFLAGS): Add `-m32'.
14956 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14957 (grub_host_size_t, grub_host_ssize_t): New types.
14958 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14959 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14960 `GRUB_HOST_SIZEOF_VOID_P'.
14962 * include/grub/kernel.h (struct grub_module_header): Type of
14963 member offset changed to `grub_host_off_t'. Type of member size
14964 changed to `grub_host_size_t'.
14965 (struct grub_module_info): Type of member offset changed to
14966 `grub_host_off_t'. Type of member size changed to
14967 `grub_host_size_t'.
14969 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14971 Make GRUB's kernel compliant to Multiboot Specification.
14973 * kern/i386/pc/startup.S (multiboot_header): New label.
14974 (multiboot_entry): Likewise.
14975 (multiboot_trampoline): Likewise.
14977 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14978 Increased to 0x4A0.
14980 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14981 put parentheses after a question mark.
14982 [!GRUB_UTIL] (my_mod): New variable.
14984 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14986 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14988 Adds support for the XFS filesystem. Btrees are not supported
14991 * fs/xfs.c: New file.
14993 * DISTLIST: Added `fs/xfs.c'.
14995 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14996 (grub_probefs_SOURCES): Likewise.
14997 (grub_emu_SOURCES): Likewise.
14998 (pkgdata_MODULES): Add `xfs.mod'.
14999 (xfs_mod_SOURCES): New variable.
15000 (xfs_mod_CFLAGS): Likewise.
15002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15003 (pkgdata_MODULES): Add `xfs.mod'.
15004 (xfs_mod_SOURCES): New variable.
15005 (xfs_mod_CFLAGS): Likewise.
15007 * util/grub-emu.c (main): Call `grub_xfs_init' and
15010 * include/grub/fs.h (grub_xfs_init): New prototype.
15011 (grub_xfs_fini): Likewise.
15014 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15016 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15017 color modes, allow greater than 16 colors to be configured as
15020 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15022 * normal/completion.c (complete_arguments): Add the qualifier
15023 const into OPTIONS.
15025 From Omniflux <omniflux+lists@omniflux.com>:
15026 * include/grub/terminfo.h: New file.
15027 * include/grub/tparm.h: Likewise.
15028 * include/grub/i386/pc/serial.h: Likewise.
15029 * term/terminfo.c: Likewise.
15030 * term/tparm.c: Likewise.
15031 * term/i386/pc/serial.c: Likewise.
15032 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15034 (terminfo_mod_SOURCES): New variable.
15035 (terminfo_mod_CFLAGS): Likewise.
15036 (serial_mod_SOURCES): Likewise.
15037 (serial_mod_CFLAGS): Likewise.
15039 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15041 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15042 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15043 and kern/powerpc/ieee1275/cmain.c, respectively.
15045 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15046 * kern/powerpc/ieee1275/crt0.S: ... here.
15048 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15049 * kern/powerpc/ieee1275/cmain.c: ... here.
15051 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15052 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15053 instead of boot/powerpc/ieee1275/crt0.S and
15054 boot/powerpc/ieee1275/cmain.c, respectively.
15056 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15057 sectors. It was not used anyway.
15059 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15061 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15062 `unused parameter' warning.
15064 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15066 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15068 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15071 2005-08-28 Marco Gerards <metgerards@student.han.nl>
15073 * include/grub/normal.h (enum grub_completion_type): Added
15074 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15076 * normal/cmdline.c (print_completion): Handle
15077 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15078 * normal/menu_entry.c (store_completion): Likewise.
15080 * normal/completion.c (complete_arguments): New function.
15081 (grub_normal_do_completion): Call `complete_arguments' when the
15082 current words start with a dash.
15084 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15086 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15087 `gzio.mod' instead of `io.mod').
15089 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15091 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15092 (DISTDIRS): Added io and video.
15093 Rewrite the search routine to make an output consistently.
15095 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15096 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15097 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15098 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15099 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15100 util/powerpc/ieee1275/misc.c.
15102 * include/grub/gzio.h: New file.
15103 * io/gzio.c: Likewise.
15105 * kern/file.c (grub_file_close): Call grub_device_close only if
15106 FILE->DEVICE is not NULL.
15108 * include/grub/mm.h [!NULL] (NULL): New macro.
15110 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15113 (pkgdata_MODULES): Added gzio.mod.
15114 (gzio_mod_SOURCES): New variable.
15115 (gzio_mod_CFLAGS): Likewise.
15117 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15118 (pkgdata_MODULES): Added gzio.mod.
15119 (gzio_mod_SOURCES): New variable.
15120 (gzio_mod_CFLAGS): Likewise.
15122 * commands/cat.c: Include grub/gzio.h.
15123 (grub_cmd_cat): Use grub_gzfile_open instead of
15126 * commands/cmp.c: Include grub/gzio.h.
15127 (grub_cmd_cmp): Use grub_gzfile_open instead of
15130 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15131 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15133 (grub_rescue_cmd_module): Likewise.
15135 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15137 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15138 kern/sparc64/ieee1275/init.c because it contains _start.
15139 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15141 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15143 * configure.ac: Add support for sparc64 host with ieee1275
15145 * configure: Generated from configure.ac.
15146 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15148 (grub_ofdisk_read): Likewise.
15149 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15150 pointers as (void *) to remove a warning.
15151 (grub_ofdisk_close): Likewise.
15152 (grub_ofdisk_read): Likewise.
15153 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15154 returns, so make it return void to remove a warning.
15155 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15156 Corresponding prototype change.
15157 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15158 values, and cast the pointers as (void *) to remove a warning.
15159 (grub_mm_dump): Likewise.
15160 * conf/sparc64-ieee1275.mk: New file.
15161 * conf/sparc64-ieee1275.rmk: Likewise.
15162 * include/grub/sparc64/setjmp.h: Likewise.
15163 * include/grub/sparc64/types.h: Likewise.
15164 * include/grub/sparc64/ieee1275/console.h: Likewise.
15165 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15166 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15167 * include/grub/sparc64/ieee1275/time.h: Likewise.
15168 * kern/sparc64/cache.c: Likewise.
15169 * kern/sparc64/dl.c: Likewise.
15170 * kern/sparc64/ieee1275/init.c: Likewise.
15171 * kern/sparc64/ieee1275/openfw.c: Likewise.
15173 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15175 * util/console.c (grub_ncurses_putchar): If C is greater than
15176 0x7f, set C to a question mark.
15177 (grub_ncurses_getcharwidth): New function.
15178 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15181 * normal/menu.c (print_entry): Made aware of Unicode. First,
15182 convert TITLE to UCS-4, and predict the cursor position by
15185 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15187 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15189 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15191 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15192 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15195 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15196 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15197 grub_strcpy and grub_strlen. Take it into account that a space
15198 character is inserted as a delimiter.
15200 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15202 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15203 invalid magic in the error.
15205 * commands/search.c: New file.
15207 * util/grub-emu.c (main): Call grub_search_init and
15210 * kern/rescue.c (grub_rescue_print_disks): Removed.
15211 (grub_rescue_print_devices): New function.
15212 (grub_rescue_cmd_ls): Use grub_device_iterate with
15213 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15214 grub_rescue_print_disks.
15216 * kern/partition.c (grub_partition_iterate): Return the result of
15217 PARTMAP->ITERATE instead of GRUB_ERRNO.
15219 * kern/device.c: Include grub/partition.h.
15220 (grub_device_iterate): New function.
15222 * include/grub/partition.h (grub_partition_iterate): Return int
15223 instead of grub_err_t.
15225 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15227 [GRUB_UTIL] (grub_search_fini): Likewise.
15229 * include/grub/device.h (grub_device_iterate): New prototype.
15231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15233 (pkgdata_MODULES): Added search.mod.
15234 (search_mod_SOURCES): New variable.
15235 (search_mod_CFLAGS): Likewise.
15237 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15238 (pkgdata_MODULES): Added search.mod.
15239 (search_mod_SOURCES): New variable.
15240 (search_mod_CFLAGS): Likewise.
15242 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15243 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15244 All callers changed.
15246 * DISTLIST: Added commands/search.c.
15248 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15250 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15252 (grub_getcharwidth): New function.
15254 * kern/misc.c (grub_utf8_to_ucs4): New function.
15256 * include/grub/term.h (struct grub_term): Added a new member
15258 (grub_getcharwidth): New prototype.
15260 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15262 * term/i386/pc/console.c (map_char): New function. Segregated from
15263 grub_console_putchar.
15264 (grub_console_putchar): Use map_char.
15265 (grub_console_getcharwidth): New function.
15266 (grub_console_term): Specified grub_console_getcharwidth as
15269 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15270 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15272 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15274 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15275 on grub_strtoul completely.
15276 (write_char): Declare local variables in the beginning of the
15278 (grub_vesafb_getcharwidth): New function.
15279 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15282 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15284 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15285 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15286 commands/i386/pc/vbetest.c.
15288 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15289 call grub_vbe_get_controller_info again, because the returned
15290 information is volatile.
15291 (grub_vbe_set_video_mode): Mostly rewritten.
15292 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15293 grub_vbe_status_t correctly.
15294 (grub_vbe_get_video_mode_info): Likewise.
15295 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15296 several if statements.
15298 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15299 * commands/i386/pc/vbeinfo.c: ... this.
15301 * commands/i386/pc/vbe_test.c: Renamed to ...
15302 * commands/i386/pc/vbetest.c: ... this.
15304 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15306 (grub_cmd_vbeinfo): ... this. Save video modes before
15307 iterating. Skip a video mode, if it is not available, not enough
15308 information is given or it is monochrome. Show the memory
15309 model. Leave the interpretation of MODEVAR to grub_strtoul
15311 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15312 (GRUB_MOD_FINI): Likewise.
15314 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15315 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15316 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15317 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15318 grub_strtoul completely.
15319 (real2pm): Removed.
15320 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15321 (GRUB_MOD_FINI): Likewise.
15323 * normal/misc.c: Include grub/mm.h.
15325 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15326 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15327 (vbe_list_modes_mod_SOURCES): Removed.
15328 (vbe_list_modes_mod_CFLAGS): Likewise.
15329 (vbe_test_mod_SOURCES): Likewise.
15330 (vbe_test_mod_CFLAGS): Likewise.
15331 (vbeinfo_mod_SOURCES): New variable.
15332 (vbeinfo_mod_CFLAGS): Likewise.
15333 (vbetest_mod_SOURCES): Likewise.
15334 (vbetest_mod_CFLAGS): Likewise.
15336 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15338 * normal/misc.c: New file.
15340 * DISTLIST: Added normal/misc.c.
15342 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15343 DISK to HOOK. Call HOOK with DISK.
15344 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15345 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15346 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15348 * normal/menu_entry.c (struct screen): Added a new member
15349 "completion_shown".
15350 (completion_buffer): New global variable.
15351 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15352 (store_completion): New function.
15353 (complete): Likewise.
15354 (clear_completions): Likewise.
15355 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15356 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15357 a tab, call complete.
15359 * normal/completion.c (disk_dev): Removed.
15360 (print_simple_completion): Likewise.
15361 (print_partition_completion): Likewise.
15362 (print_func): New global variable.
15363 (add_completion): Do not take the arguments WHAT or PRINT any
15364 longer. Added a new argument TYPE. Instead of printing directly,
15365 call PRINT_FUNC if not NULL.
15366 All callers changed.
15367 (complete_device): Use a local variable DEV instead of
15368 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15369 (grub_normal_do_completion): Take a new argument HOOK. Do not
15370 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15371 empty string, return NULL instead.
15372 All callers changed.
15374 * normal/cmdline.c (print_completion): New function.
15376 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15378 All callers changed.
15380 * kern/disk.c (grub_print_partinfo): Removed.
15382 * include/grub/partition.h (struct grub_partition_map): Add a new
15383 argument DISK into HOOK of ITERATE.
15384 (grub_partition_iterate): Add a new argument DISK to HOOK.
15386 * include/grub/normal.h (enum grub_completion_type): New enum.
15387 (grub_completion_type_t): New type.
15388 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15389 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15390 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15391 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15392 (grub_normal_do_completion): Added a new argument HOOK.
15393 (grub_normal_print_device_info): New prototype.
15395 * include/grub/disk.h (grub_print_partinfo): Removed.
15397 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15398 (normal_mod_SOURCES): Likewise.
15399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15400 (normal_mod_SOURCES): Likewise.
15402 * commands/ls.c (grub_ls_list_disks): Use
15403 grub_normal_print_device_info instead of grub_print_partinfo. Free
15405 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15406 duplicating the code.
15408 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15410 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15411 follow GCS more precisely.
15412 * commands/i386/pc/vbe_test.c: Likewise.
15413 * include/grub/i386/pc/vbe.h: Likewise.
15414 * term/i386/pc/vesafb.c: Likewise.
15415 * video/i386/pc/vbe.c: Likewise.
15417 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15419 * DISTLIST: Added term/i386/pc/vesafb.c
15420 DISTLIST: Added video/i386/pc/vbe.c
15421 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15422 DISTLIST: Added commands/i386/pc/vbe_test.c.
15423 * commands/i386/pc/vbe_list_modes.c: New file.
15424 * commands/i386/pc/vbe_test.c: Likewise.
15425 * term/i386/pc/vesafb.c: Likewise.
15426 * video/i386/pc/vbe.c: Likewise.
15427 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15428 (grub_vbe_probe) Added prototype.
15429 (grub_vbe_set_video_mode) Likewise.
15430 (grub_vbe_get_video_mode) Likewise.
15431 (grub_vbe_get_video_mode_info) Likewise.
15432 (grub_vbe_set_pixel_rgb) Likewise.
15433 (grub_vbe_set_pixel_index) Likewise.
15434 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15435 (pkgdata_MODULES): Added vesafb.mod.
15436 (pkgdata_MODULES): Added vbe_list_modes.mod.
15437 (pkgdata_MODULES): Added vbe_test.mod.
15438 (vbe_mod_SOURCES): Added.
15439 (vbe_mod_CFLAGS): Likewise.
15440 (vesafb_mod_SOURCES): Likewise.
15441 (vesafb_mod_CFLAGS): Likewise.
15442 (vbe_list_modes_mod_SOURCES): Likewise.
15443 (vbe_list_modes_mod_CFLAGS): Likewise.
15444 (vbe_test_mod_SOURCES): Likewise.
15445 (vbe_test_mod_CFLAGS): Likewise.
15447 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15449 * normal/command.c (grub_command_execute): If INTERACTIVE is
15450 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15451 CMDLINE. Disable the pager if INTERACTIVE is true.
15452 All callers are changed.
15454 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15455 before reading a config file.
15456 * normal/main.c (read_config_file): Even if a command is not
15457 found, register it if it is within an entry.
15459 * util/grub-emu.c: Include sys/types.h and unistd.h.
15460 (options): Added --hold.
15461 (struct arguments): Added a new member "hold".
15462 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15464 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15465 cleared by a debugger, if it is not zero.
15467 * include/grub/normal.h (grub_command_execute): Add an argument
15470 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15472 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15474 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15476 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15477 program with another one, because the old one didn't detect a bug
15478 in gcc-3.4. Always use regparm 2, because the new test is still
15479 not enough for gcc-4.0. Someone must investigate a simple test
15480 case which detects a bug in gcc-4.0.
15482 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15484 * DISTLIST: Added normal/completion.c.
15486 * normal/completion.c: New file.
15488 * term/i386/pc/console.c (grub_console_getwh): New function.
15489 (grub_console_term): Assign grub_console_getwh to getwh.
15491 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15492 function is defined in normal/completion.c as
15493 grub_normal_do_completion.
15494 (grub_cmdline_get): Use grub_normal_do_completion instead of
15497 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15498 returns non-zero, otherwise return 0.
15499 (grub_partition_iterate): First, probe the partition map. Then,
15500 call ITERATE only for this partition map.
15502 * kern/misc.c (grub_strncmp): Rewritten.
15504 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15505 returns non-zero. Otherwise return 0.
15507 * include/grub/partition.h (grub_partition_map_iterate): Return
15508 int instead of void.
15510 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15512 * include/grub/misc.h (grub_strncmp): Change the type of N to
15515 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15518 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15519 unsigned explicitly before comparing it with I.
15521 * kern/main.c (grub_env_write_root): Add the attribute unused into
15524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15525 normal/completion.c.
15526 (normal_mod_SOURCES): Likewise.
15527 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15528 (normal_mod_SOURCES): Likewise.
15530 * normal/command.c (grub_iterate_commands): If ITERATE returns
15531 non-zero, return one immediately.
15533 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15535 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15536 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15538 (grub_vbe_get_controller_info): New function.
15539 (grub_vbe_get_mode_info): Likewise.
15540 (grub_vbe_set_mode): Likewise.
15541 (grub_vbe_get_mode): Likewise.
15542 (grub_vbe_set_memory_window): Likewise.
15543 (grub_vbe_get_memory_window): Likewise.
15544 (grub_vbe_set_scanline_length): Likewise.
15545 (grub_vbe_get_scanline_length): Likewise.
15546 (grub_vbe_set_display_start): Likewise.
15547 (grub_vbe_get_display_start): Likewise.
15548 (grub_vbe_set_palette_data): Likewise.
15549 * include/grub/i386/pc/vbe.h: New file.
15551 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15553 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15554 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15555 * DISTLIST: Likewise.
15556 * kern/ieee1275/of.c: Moved to ...
15557 * kern/ieee1275/ieee1275.c: ... here.
15559 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15561 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15562 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15563 Pass 0 as `end' parameter to grub_strtoul().
15565 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15567 * include/grub/powerpc/ieee1275/console.h: Do not include
15568 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15570 (grub_console_cur_color): Remove i386-specific prototype.
15571 (grub_console_real_putchar): Likewise.
15572 (grub_console_checkkey): Likewise.
15573 (grub_console_getkey): Likewise.
15574 (grub_console_getxy): Likewise.
15575 (grub_console_gotoxy): Likewise.
15576 (grub_console_cls): Likewise.
15577 (grub_console_setcursor): Likewise.
15578 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15579 Include <grub/machine/console.h>.
15580 * term/ieee1275/ofconsole.c: Likewise.
15582 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15584 * Makefile.in (LIBLZO): New variable.
15586 * configure.ac: Check for LZO version 2.
15588 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15589 lzo/lzo1x.h instead of lzo1x.h.
15591 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15594 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15595 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15597 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15598 copying the data from PARTITION to P.
15600 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15602 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15603 negative, unload the module.
15605 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15606 map is "pc_partition_map" but not "pc".
15607 (usage): Fix the description. The options are --boot-image and
15608 --core-image but not --boot-file or --core-file.
15609 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15610 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15613 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15614 --core-file. Specify INSTALL_DEVICE as an argument.
15616 * util/console.c: Include config.h.
15617 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15618 [HAVE_NCURSES_H]: Include ncurses.h.
15619 [HAVE_CURSES_H]: Include curses.h.
15620 [!A_NORMAL] (A_NORMAL): Defined as zero.
15621 [!A_STANDOUT] (A_STANDOUT): Likewise.
15623 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15625 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15627 * configure.ac: Check for curses libraries and headers.
15629 * Makefile.in (LIBCURSES): New variable.
15631 * genmk.rb (Script::rule): Set the executable bits.
15633 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15634 name of the PC partition map is "pc_partition_map" but not "pc".
15636 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15638 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15639 (modules): Likewise.
15640 (usage): Added descriptions for --modules and --grub-probefs.
15641 Handle --modules and --grub-probefs. Save the arguments in MODULES
15642 and GRUB_PROBEFS, respectively.
15643 Auto-detect a filesystem module against GRUBDIR. If the result is
15644 empty and modules are not specified explicitly, abort the
15645 installation. Add the result to MODULES.
15647 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15648 disk/powerpc/ieee1275/ofdisk.c,
15649 include/grub/powerpc/ieee1275/init.h and
15650 term/powerpc/ieee1275/ofconsole.c.
15651 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15652 term/ieee1275/ofconsole.c.
15654 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15656 * COPYING: Upgraded to the latest version. Only the address of the
15657 FSF office has changed.
15659 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15661 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15662 kern/ieee1275.c with kern/ieee1275/of.c.
15664 * kern/ieee1275.c: Moved to ...
15665 * kern/ieee1275/of.c: ... here.
15667 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15669 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15672 * config.guess: Updated to the latest version from gnulib.
15673 * config.sub: Likewise.
15674 * install.sh: Likewise.
15675 * mkinstalldirs: Likewise.
15677 * include/grub/console.h: Removed. This file is arch-specific. Do
15678 not put this in include/grub.
15680 * include/grub/i386/pc/console.h: Resurrected.
15682 * util/console.c: Include grub/machine/console.h instead of
15684 * util/grub-emu.c: Likewise.
15686 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15688 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15691 From Vincent Pelletier <subdino2004@yahoo.fr>
15692 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15693 Redefined to use grub_getwh.
15694 (grub_term): New member named getwh.
15695 (grub_getwh): New prototype.
15696 * kern/term.c (grub_getwh): New function.
15697 * term/i386/pc/console.c (grub_console_getwh): New function.
15698 (grub_console_term): New member `getwh'.
15699 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15700 (grub_vga_term): New member `getwh'.
15701 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15703 (grub_ofconsole_getw): New function.
15704 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15705 (grub_ofconsole_term): New field named getwh and new initial
15708 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15710 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15711 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15712 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15713 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15714 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15715 of <grub/machine/ieee1275.h>.
15716 * commands/ieee1275/reboot.c: Likewise.
15717 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15718 * kern/ieee1275.c: ... to here. All users updated. Change all
15719 parameter structs to use new type `grub_ieee1275_cell_t'.
15720 * term/powerpc/ieee1275/ofconsole.c: Move ...
15721 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15722 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15723 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15724 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15726 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15727 Remove unused prototypes. All users updated.
15728 * include/grub/powerpc/ieee1275/console.h: Removed.
15729 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15730 `grub_ieee1275_cell_t'.
15731 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15732 Cast comparisons with -1 to the correct type.
15733 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15734 type to match `grub_ieee1275_entry_fn'.
15736 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15738 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15740 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15741 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15743 (grub_probefs_SOURCES): New variable.
15745 * util/i386/pc/grub-probefs.c: New file.
15747 * util/i386/pc/grub-setup.c (main): Call
15748 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15749 grub_hfs_init and grub_jfs_init to initialize the system. Call
15750 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15751 grub_pc_partition_map_fini to finish the system.
15753 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15755 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15757 (grub_multiboot_load_elf32): Likewise.
15758 (grub_multiboot_is_elf64): Likewise.
15759 (grub_multiboot_load_elf64): Likewise.
15760 (grub_multiboot_load_elf): Likewise.
15761 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15762 an ELF32 or ELF64 file.
15763 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15765 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15766 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15767 NULL before calling FS->LABEL.
15768 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15769 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15770 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15771 before calling FS->LABEL.
15773 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15775 * util/i386/pc/grub-install.in (datadir): New variable.
15777 (pkgdatadir): New variable.
15778 (pkglibdir): Removed.
15780 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15782 * DISTLIST: Added util/i386/pc/grub-install.in.
15784 * util/i386/pc/grub-install.in: New file.
15786 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15787 (grub_install_SOURCES): Likewise.
15789 * genmk.rb: Added support for scripts.
15790 (Script): New class.
15791 (scripts): New variable.
15793 * Makefile.in (install-local): Install sbin_SCRIPTS by
15795 (uninstall): Remove sbin_SCRIPTS.
15797 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15798 device, try to get a GRUB device by
15799 grub_util_biosdisk_get_grub_dev.
15802 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15803 description for --device-map.
15805 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15807 Change the semantics of variable hooks. They now return strings
15808 instead of error values.
15810 * util/i386/pc/grub-setup.c: Include grub/env.h.
15811 (setup): Use grub_device_set_root instead of grub_env_set.
15813 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15814 grub_env_get instead of grub_device_set_root and
15815 grub_device_get_root, respectively.
15817 * kern/main.c (grub_env_write_root): New function.
15818 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15819 grub_env_set instead of grub_device_set_root.
15821 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15823 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15824 rather than calling ENV->WRITE_HOOK afterwards.
15825 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15826 passing a pointer of a pointer.
15827 (grub_register_variable_hook): Change the types of "read_hook" and
15828 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15830 Allocate the default empty string on the heap, because this string
15831 may be freed later.
15833 * kern/device.c: Include grub/env.h.
15834 (grub_device_set_root): Removed.
15835 (grub_device_get_root): Likewise.
15836 (grub_device_open): Use grub_env_get instead of
15837 grub_device_get_root.
15839 * include/grub/env.h (grub_env_read_hook_t): New type.
15840 (grub_env_write_hook_t): Likewise.
15841 (grub_env_var): Change the types of "read_hook" and "write_hook"
15842 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15843 (grub_register_variable_hook): Likewise.
15845 * include/grub/device.h (grub_device_set_root): Removed.
15846 (grub_device_set_root): Likewise.
15848 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15849 make sure that DIRNAME terminates with '/', so that
15850 grub_fat_find_dir will fail if PATH is not a directory.
15852 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15854 Use the qualifier auto for print_files and print_files_long.
15855 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15857 Put a newline only if there is no error.
15858 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15861 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15863 * kern/partition.c (grub_partition_probe): Initialize PART to
15864 NULL. Otherwise, when no partition map is registered, this returns
15867 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15869 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15870 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15873 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15875 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15876 information on each device, if it does not have partitions. Print
15877 "Device" instead of "Disk", because this function is not specific
15880 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15881 static to ensure that it is put on the memory rather than a
15884 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15886 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15887 (grub_cat_init): Likewise.
15888 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15889 (options): Likewise.
15890 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15891 (grub_configfile_init): Likewise.
15892 * font/manager.c (GRUB_MOD_INIT): Likewise.
15893 * commands/help.c (GRUB_MOD_INIT): Likewise.
15894 (grub_help_init): Likewise.
15895 * normal/command.c (grub_command_init): Likewise.
15896 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15897 * disk/loopback.c (grub_loop_init): Likewise.
15898 (GRUB_MOD_INIT): Likewise.
15899 * commands/ls.c (grub_ls_init): Likewise.
15900 (GRUB_MOD_INIT): Likewise.
15901 (options): Likewise.
15902 * commands/boot.c (grub_boot_init): Likewise.
15903 (GRUB_MOD_INIT): Likewise.
15904 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15905 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15906 (GRUB_MOD_INIT): Likewise.
15907 * commands/cmp.c (grub_cmp_init): Likewise.
15908 (GRUB_MOD_INIT): Likewise.
15910 * normal/arg.c: Use <> instead of "" to include header files.
15911 (SHORT_ARG_HELP): New macro.
15912 (SHORT_ARG_USAGE): Likewise.
15913 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15914 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15916 (find_short): Check if C is 'h' or 'u' explicitly.
15917 (grub_arg_show_help): Use space characters instead of tabs. Treat
15918 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15919 are shown with --help and --usage only if they are not used for
15920 the command itself.
15921 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15924 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15925 const into "longarg". Change the type of "shortarg" to int.
15927 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15929 * boot/i386/pc/boot.S (boot_drive_check): New label.
15931 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15934 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15935 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15937 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15939 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15940 When turning off Gate A20, skip the check and return immediately,
15941 because this is not fatal usually.
15943 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15945 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15946 be 0x7C00 instead of 0x8000.
15948 * boot/i386/pc/pxeboot.S: Rewritten.
15950 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15952 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15955 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15957 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15958 robustness. This routine now supports a BIOS call and System
15959 Control Port A to modify the gate A20.
15961 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15962 Increased to 0x440.
15964 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15966 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15967 device path and resulting ihandle.
15968 (grub_ofdisk_close): dprintf the ihandle being closed.
15969 (grub_ofdisk_read): dprintf function parameters.
15970 * kern/mm.c (grub_mm_init_region): Likewise.
15971 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15972 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15973 size, and boot arguments.
15974 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15975 before loading into memory.
15976 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15977 before loading into memory.
15979 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15981 * kern/mm.c: Added much documentation.
15982 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15983 8, set to 5 instead of 8.
15985 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15987 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15989 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15990 (grub_mkdevicemap_SOURCES): New variable.
15992 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15993 lib/device.c of GRUB Legacy.
15995 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15997 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15998 instead of PATH is NULL.
16000 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16002 * commands/cmp.c (BUFFER_SIZE): New macro.
16003 (grub_cmd_cmp): Close the right file at the right time. Compare
16004 only data just read. Don't report files of different size as
16005 identical. Dynamically allocate buffers. Move variable
16006 declarations at the beginning of function.
16008 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
16010 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16013 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16015 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16016 when backspace is pressed at beginning of line.
16018 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
16020 * DISTLIST: Added genfslist.sh.
16022 * normal/main.c (fs_module_list): New variable.
16023 (autoload_fs_module): New function.
16024 (read_fs_list): Likewise.
16025 (grub_normal_execute): Call read_fs_list.
16027 * kern/fs.c (grub_fs_autoload_hook): New variable.
16028 (grub_fs_probe): Added support for auto-loading.
16030 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16031 (grub_fs_module_list_t): New type.
16033 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16034 (grub_fs_autoload_hook): New prototype.
16036 * genfslist.sh: New file.
16038 * genmk.rb: Added a rule to generate a filesystem list.
16040 2005-06-30 Marco Gerards <metgerards@student.han.nl>
16042 * configure.ac: Fix the test for cross-compiling.
16044 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16045 define GRUB_UTIL anymore.
16047 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16048 so this function works on other systems than just big endian.
16049 (load_modules): Likewise.
16050 (add_segments): Likewise.
16052 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16054 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16055 contains `l' modifier, get a long from va_arg().
16057 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16059 * kern/mm.c (grub_free): If the next free block which is being
16060 merged is the first free block, set the first block to the block
16062 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16064 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16066 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16067 `grub_ieee1275_chosen'.
16069 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16071 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16072 (grub_ieee1275_chosen): New variable.
16073 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16075 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16076 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16077 Rename first argument to `phandle' for consistency.
16078 (grub_ieee1275_get_property_length): Likewise.
16079 (grub_ieee1275_next_property): Likewise. Change type of first argument
16080 to grub_ieee1275_phandle_t.
16081 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16082 Move export next to declaration.
16083 (grub_ieee1275_chosen): New variable.
16084 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16085 Correct cosmetic typo.
16086 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16087 `grub_ieee1275_chosen'.
16088 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16089 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16090 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16091 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16092 `grub_ieee1275_chosen'.
16094 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16096 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16098 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16099 /chosen/bootargs as "variable=value" pairs.
16101 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16103 * include/grub/misc.h (grub_dprintf): New macro.
16104 (grub_real_dprintf): New prototype.
16105 (grub_strword): Likewise.
16106 (grub_iswordseparator): Likewise.
16107 * kern/misc.c (grub_real_dprintf): New function.
16108 (grub_strword): Likewise.
16109 (grub_iswordseparator): Likewise.
16111 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16113 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16114 (roundup): Remove macro.
16115 (grub_ieee1275_flags): Make static.
16116 (grub_ieee1275_realmode): Remove.
16117 (grub_ieee1275_test_flag): New function.
16118 (grub_ieee1275_set_flag): Likewise.
16119 (find_options): Rename to `grub_ieee1275_find_options'; update
16120 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16121 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16122 (cmain): New prototype.
16123 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16124 `grub_ieee1275_flags' directly.
16125 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16126 machine/biosdisk.h.
16127 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16128 Don't include grub/machine/init.h.
16129 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16130 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16132 (grub_ieee1275_realmode): Likewise.
16133 (grub_ieee1275_flag): New enum.
16134 (grub_ieee1275_test_flag): New prototype.
16135 (grub_ieee1275_set_flag): New prototype.
16136 * include/grub/powerpc/ieee1275/init.h: Remove file.
16137 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16138 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16139 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16140 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16142 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16143 `grub_ieee1275_test_flag'.
16144 (grub_ieee1275_encode_devname): Likewise.
16146 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16148 * include/grub/powerpc/ieee1275/ieee1275.h
16149 (grub_ieee1275_encode_devname): New prototype.
16150 (grub_ieee1275_get_filename): Likewise.
16151 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16153 (grub_set_prefix): Likewise.
16154 (grub_machine_init): Call grub_set_prefix.
16155 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16156 (grub_parse_type): New enum.
16157 (grub_ieee1275_get_devargs): New function.
16158 (grub_ieee1275_get_devname): Likewise.
16159 (grub_ieee1275_parse_args): Likewise.
16160 (grub_ieee1275_get_filename): Likewise.
16161 (grub_ieee1275_encode_devname): Likewise.
16163 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16165 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16166 `grub_loader_unset'.
16168 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16170 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16171 instead of grub_ieee1275_interpret.
16172 (grub_halt_init): New function.
16173 (grub_halt_fini): Likewise.
16174 (GRUB_MOD_INIT): Correct message grammar.
16175 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16176 instead of grub_ieee1275_interpret.
16177 (grub_reboot_init): New function.
16178 (grub_reboot_fini): Likewise.
16179 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16180 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16181 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16182 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16183 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16185 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16187 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16189 (grub_halt): Likewise.
16190 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16191 (cmain): Remove __attribute__((unused)).
16192 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16193 (grub_heap_len): Likewise.
16194 (grub_machine_fini): New function.
16195 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16196 (grub_halt): Likewise.
16197 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16199 * util/powerpc/ieee1275/misc.c: New file.
16201 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16203 * DISTLIST: New file.
16204 * gendistlist.sh: Likewise.
16206 * Makefile.in (COMMON_DISTFILES): Removed.
16207 (BOOT_DISTFILES): Likewise.
16208 (CONF_DISTFILES): Likewise.
16209 (DISK_DISTFILES): Likewise.
16210 (FS_DISTFILES): Likewise.
16211 (INCLUDE_DISTFILES): Likewise.
16212 (KERN_DISTFILES): Likewise.
16213 (LOADER_DISTFILES): Likewise.
16214 (TERM_DISTFILES): Likewise.
16215 (UTIL_DISTFILES): Likewise.
16216 (DISTFILES): Likewise.
16217 (uninstall): Uninstall files in $(pkgdata_DATA).
16218 (DISTLIST): New target.
16219 (distdir): Use the contents of the file DISTLIST to get a list of
16222 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16224 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16225 descriptor. This is ported from GRUB Legacy.
16227 * gencmdlist.sh: Added an extra semicolon to make it work with
16228 old sed versions. Reported by Robert Bihlmeyer
16229 <robbe@orcus.priv.at>.
16231 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16233 Automatic loading of commands is supported.
16235 * normal/main.c (read_command_list): New function.
16236 (grub_normal_execute): Call read_command_list.
16238 * normal/command.c (grub_register_command): Return zero or CMD.
16239 Allocate CMD->NAME from the heap.
16240 Initialize CMD->MODULE_NAME to zero.
16241 Find the same name as well. If the same command is found and it is
16242 a dummy command, overwrite members. If it is not a dummy command,
16244 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16245 (grub_command_find): If a dummy command is found, load a module
16246 and retry to find a command only once.
16248 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16249 make sure that each command is loaded.
16251 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16253 (struct grub_command): Remove const from the member `name'.
16254 Add a new member `module_name'.
16255 (grub_register_command): Return grub_command_t.
16257 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16258 sure that each command is loaded.
16260 * genmk.rb (PModule::rule): Specify a module name without the
16261 suffix ".mod" to gencmdlist.sh.
16263 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16265 * gencmdlist.sh: New file.
16267 * genmk.rb (PModule::rule): Generate a rule for a command list.
16269 Generate command.lst from $(COMMANDFILES).
16271 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16272 (DATA): Added $(pkgdata_DATA).
16273 (install-local): Install files in $(pkgdata_DATA).
16275 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16277 * term/i386/pc/vga.c (debug_command): Removed.
16278 (GRUB_MOD_INIT): Do not register the command "debug".
16280 From Hollis Blanchard:
16281 * commands/configfile.c: New file.
16282 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16283 commands/configfile.c.
16284 (pkgdata_MODULES): Added configfile.mod.
16285 (configfile_mod_SOURCES): New variable.
16286 (configfile_mod_CFLAGS): Likewise.
16287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16288 commands/configfile.c.
16289 (pkgdata_MODULES): Added configfile.mod.
16290 (configfile_mod_SOURCES): New variable.
16291 (configfile_mod_CFLAGS): Likewise.
16292 * util/grub-emu.c (main): Call grub_configfile_init and
16293 grub_configfile_fini.
16294 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16296 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16298 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16300 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16303 * commands/help.c (grub_cmd_help): Do not print newlines after
16304 the last command in print_command_help.
16306 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16308 * commands/default.h: New file.
16309 * commands/timeout.h: Likewise.
16310 * normal/context.c: Likewise.
16312 * util/misc.c: Do not include sys/times.h.
16313 Include sys/time.h and grub/machine/time.h.
16314 (grub_get_rtc): Rewritten with gettimeofday.
16316 * util/grub-emu.c (main): Call grub_default_init and
16317 grub_timeout_init before grub_normal_init, and call
16318 grub_timeout_fini and grub_default_fini after grub_main.
16320 * util/console.c (grub_ncurses_checkkey): Return the read
16323 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16326 * normal/main.c (read_config_file): Push MENU. If this fails,
16327 print an error and wait for a user input.
16328 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16329 If a menu is empty or an error occurs, pop MENU.
16330 (grub_normal_execute): Pop and free MENU after grub_menu_run
16333 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16335 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16337 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16339 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16341 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16344 * include/grub/normal.h (struct grub_menu_list): New struct.
16345 (grub_menu_list_t): New type.
16346 (struct grub_context): New struct.
16347 (grub_context_t): New type.
16348 (grub_register_command): Got rid of EXPORT_FUNC.
16349 (grub_unregister_command): Likewise.
16350 (grub_context_get): New prototype.
16351 (grub_context_get_current_menu): Likewise.
16352 (grub_context_push_menu): Likewise.
16353 (grub_context_pop_menu): Likewise.
16354 [GRUB_UTIL] (grub_default_init): Likewise.
16355 [GRUB_UTIL] (grub_default_fini): Likewise.
16356 [GRUB_UTIL] (grub_timeout_init): Likewise.
16357 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16359 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16360 commands/timeout.c and normal/context.c.
16361 (pkgdata_MODULES): Added default.mod and timeout.mod.
16362 (normal_mod_SOURCES): Added normal/context.c.
16363 (default_mod_SOURCES): New variable.
16364 (default_mod_CFLAGS): Likewise.
16365 (timeout_mod_SOURCES): Likewise.
16366 (timeout_mod_CFLAGS): Likewise.
16367 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16369 (pkgdata_MODULES): Added default.mod and timeout.mod.
16370 (normal_mod_SOURCES): Added normal/context.c.
16371 (default_mod_SOURCES): New variable.
16372 (default_mod_CFLAGS): Likewise.
16373 (timeout_mod_SOURCES): Likewise.
16374 (timeout_mod_CFLAGS): Likewise.
16376 * Makefile.in (all-local): Added $(MKFILES).
16378 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16380 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16381 (grub_emu_SOURCES): Likewise.
16382 (pkgdata_MODULES): Add `sun.mod'.
16383 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16386 (pkgdata_MODULES): Add `sun.mod'.
16387 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16388 * include/grub/partition.h (grub_sun_partition_map_init): New
16390 (grub_sun_partition_map_fini): Likewise.
16391 * partmap/sun.c: New file.
16392 * util/grub-emu.c (main): Initialize and de-initialize the sun
16393 partitionmap support.
16395 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16397 This implements an Emacs-like menu entry editor.
16399 * normal/menu_entry.c: New file.
16401 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16402 characters to ASCII.
16403 (saved_char): New variable.
16404 (grub_ncurses_checkkey): Rewritten completely.
16405 (grub_ncurses_getkey): Likewise.
16406 (grub_ncurses_init): Call raw instead of cbreak.
16408 * normal/menu.c (print_entry): Do not put a space.
16409 (init_page): Renamed to ...
16410 (grub_menu_init_page): ... this. All callers changed.
16411 (edit_menu_entry): Removed.
16412 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16414 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16416 * kern/misc.c (grub_vprintf): Call grub_refresh.
16418 * normal/menu.c (DISP_LEFT): Renamed to ...
16419 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16420 * normal/menu.c (DISP_UP): Renamed to ...
16421 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16422 * normal/menu.c (DISP_RIGHT): Renamed to ...
16423 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16424 * normal/menu.c (DISP_DOWN): Renamed to ...
16425 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16426 * normal/menu.c (DISP_HLINE): Renamed to ...
16427 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16428 * normal/menu.c (DISP_VLINE): Renamed to ...
16429 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16430 * normal/menu.c (DISP_UL): Renamed to ...
16431 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16432 * normal/menu.c (DISP_UR): Renamed to ...
16433 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16434 * normal/menu.c (DISP_LL): Renamed to ...
16435 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16436 * normal/menu.c (DISP_LR): Renamed to ...
16437 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16438 * normal/menu.c (TERM_WIDTH): Renamed to ...
16439 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16440 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16441 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16442 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16443 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16444 * normal/menu.c (TERM_MARGIN): Renamed to ...
16445 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16446 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16447 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16448 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16449 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16450 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16451 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16452 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16453 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16454 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16455 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16456 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16457 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16458 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16459 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16460 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16461 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16462 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16463 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16464 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16465 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16466 All callers changed.
16468 * include/grub/normal.h: New prototype.
16470 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16471 normal/menu_entry.c.
16472 (normal_mod_SOURCES): Likewise.
16473 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16474 (normal_mod_SOURCES): Likewise.
16476 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16478 * include/grub/normal.h (grub_halt_init): New prototype.
16479 (grub_halt_fini): Likewise.
16480 (grub_reboot_init): Likewise.
16481 (grub_reboot_fini): Likewise.
16483 * util/grub-emu.c: Include signal.h.
16484 (main_env): New global variable.
16485 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16487 (grub_machine_fini): New function.
16488 (main): Call grub_halt_init and grub_reboot_init before
16489 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16490 Call setjmp with MAIN_ENV to go back afterwards.
16491 Call grub_machine_fini right before return.
16493 * include/grub/util/misc.h: Include setjmp.h.
16494 (main_env): New prototype.
16496 * include/grub/kernel.h (grub_machine_fini): New prototype.
16497 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16498 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16500 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16501 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16502 * term/i386/pc/console.c (grub_console_fini): Likewise.
16504 * util/i386/pc/misc.c: New file.
16506 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16507 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16508 commands/i386/pc/reboot.c.
16510 2005-02-14 Guillem Jover <guillem@hadrons.org>
16512 * include/grub/dl.h (grub_dl_check_header): New prototype.
16513 (grub_arch_dl_check_header): Change return type to grub_err_t,
16514 remove size parameter and export function. Update all callers.
16515 * kern/dl.c (grub_dl_check_header): New function.
16516 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16517 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16518 are inside the core.
16519 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16520 independent ELF header checks.
16521 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16522 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16523 `grub_dl_check_header' instead of explicit checks. Check for the
16525 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16526 `grub_dl_check_header' instead of explicit checks. Remove arch
16527 specific ELF header checks.
16529 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16532 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16534 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16535 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16537 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16539 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16540 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16541 (part_map_iterate): Clear `grub_errno' and return 0 if
16542 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16543 * partmap/amiga.c (amiga_partition_map_iterate): Return
16544 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16545 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16547 2005-02-01 Guillem Jover <guillem@hadrons.org>
16549 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16552 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16554 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16556 (grub_rescue_cmd_linux): New prototype.
16557 (grub_rescue_cmd_initrd): Likewise.
16558 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16560 (grub_linux_release_mem): Release the memory for the initrd.
16561 (grub_load_linux): Renamed from this...
16562 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16563 Changed `entry' not to be static. Loop over memory regions to
16564 find another one when the default fails.
16565 (grub_rescue_cmd_initrd): New function.
16566 (grub_linux_init): Remove function.
16567 (grub_linux_fini): Likewise.
16568 (GRUB_MOD_INIT): Register `initrd'.
16569 (GRUB_MOD_FINI): Unregister `initrd'.
16570 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16572 (grub_linux_normal_fini): Likewise.
16573 (GRUB_MOD_INIT): Register `initrd'.
16574 (GRUB_MOD_FINI): Unregister `initrd'.
16576 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16578 * commands/help.c: New file.
16579 * normal/arg.c (show_help): Renamed to...
16580 (grub_arg_show_help): ... this.
16581 * commands/i386/pc/halt.c: New file.
16582 * commands/i386/pc/reboot.c: Likewise.
16583 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16584 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16585 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16586 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16588 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16590 (pkgdata_MODULES): Add `help.mod'.
16591 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16592 * grub/i386/pc/init.h (grub_reboot): New prototype.
16593 (grub_halt): Likewise.
16594 * include/grub/normal.h (grub_arg_show_help): New prototype.
16595 (grub_help_init): Likewise.
16596 (grub_help_fini): Likewise.
16597 * util/grub-emu.c (main): Initialize and deinitialize the help
16600 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16602 * normal/command.c (grub_command_init): Fixed the description of
16603 the `set' and `unset' commands.
16605 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16607 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16609 * commands/ieee1275/halt.c: New file.
16610 * commands/ieee1275/reboot.c: Likewise.
16611 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16612 `__attribute__ ((unused))'. Some GCS related fixed.
16613 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16614 (grub_suspend_fini): Likewise.
16615 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16617 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16618 (halt_mod_CFLAGS): New variables.
16619 * include/grub/powerpc/ieee1275/ieee1275.h
16620 (grub_ieee1275_interpret): New prototype.
16622 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16624 * include/grub/misc.h (memmove): New prototype.
16625 (memcpy): Likewise.
16627 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16629 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16630 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16632 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16634 * kern/misc.c (grub_strndup): Function rewritten.
16636 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16638 * normal/menu.c (TERM_WIDTH): Macro redefined.
16639 (TERM_TOP_BORDER_Y): Likewise.
16640 (draw_border): Replaced while-loop by a for-loop. Make the number
16641 of lines consistent with the number of lines displayed in
16642 print_entries. Added a margin below the rectangle.
16643 (print_entry): Make the entry fit in the rectangle.
16644 (print_entries): Display the scroll arrows next to the right
16647 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16649 * fs/minix.c (grub_minix_find_file): Reserve more space for
16650 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16651 `grub_strncpy' to copy `path' into it.
16653 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16655 Add the loopback device, a device via which files can be accessed
16658 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16659 (pkgdata_MODULES): Add loopback.mod.
16660 (loopback_mod_SOURCES): New variable.
16661 (loopback_mod_CFLAGS): Likewise.
16662 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16664 (pkgdata_MODULES): Add loopback.mod.
16665 (loopback_mod_SOURCES): New variable.
16666 (loopback_mod_CFLAGS): Likewise.
16667 * disk/loopback.c: new file.
16668 * include/grub/normal.h (grub_loop_init): New prototype.
16669 (grub_loop_fini): New prototype.
16670 * util/grub-emu.c (main): Initialize and de-initialize loopback
16672 * include/grub/disk.h (grub_disk_dev_id): Add
16673 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16675 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16677 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16679 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16680 (suspend_mod_SOURCES): New variable.
16681 (suspend_mod_CFLAGS): Likewise.
16682 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16684 * commands/ieee1275/suspend.c: New file.
16686 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16688 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16689 ((unused))' to `__attribute__ ((used))'.
16690 (GRUB_MOD_FINI): Likewise.
16691 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16692 * genmk.rb (PModule): Assign space to common symbols when linking
16695 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16697 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16698 `unsigned' arguments to `grub_size_t'.
16699 (grub_malloc): Likewise.
16700 (grub_realloc): Likewise.
16701 (grub_memalign): Likewise.
16702 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16703 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16704 * util/misc.c (grub_malloc): Likewise.
16705 (grub_realloc): Likewise.
16706 * kern/mm.c (get_header_from_pointer): Change the casts to
16707 `unsigned' into a cast to `grub_size_t'.
16709 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16710 point to `currnode' when `currnode' is changed.
16712 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16713 Schottelius <nico-linux@schottelius.org>.
16715 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16717 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16718 (note_path): Remove variable.
16719 (GRUB_IEEE1275_NOTE_NAME): New macro.
16720 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16721 (grub_ieee1275_note_hdr): New structure.
16722 (grub_ieee1275_note_desc): Likewise.
16723 (grub_ieee1275_note): Likewise.
16724 (load_note): Remove `dir' argument. All callers updated. Remove
16725 `note_img' and `path'. Do not load a file from `note_path'.
16726 Initialize a struct grub_ieee1275_note and write that to `out'.
16727 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16729 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16731 * util/misc.c (grub_util_read_image): Revert last change. It
16732 called `grub_util_read_at', which seeks from the beginning of the
16735 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16737 * TODO: Add note about endianness in grub-mkimage.
16738 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16740 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16741 (grub_mkimage_SOURCES): New target.
16742 * include/grub/kernel.h (grub_start_addr): Remove variable.
16743 (grub_end_addr): Likewise.
16744 (grub_total_module_size): Likewise.
16745 (grub_kernel_image_size): Likewise.
16746 (GRUB_MODULE_MAGIC): New constant.
16747 (grub_module_info): New structure.
16748 (grub_arch_modules_addr): New prototype.
16749 (grub_get_end_addr): Remove prototype.
16750 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16751 * include/grub/powerpc/ieee1275/kernel.h: New file.
16752 * include/grub/util/misc.h (grub_util_get_fp_size): New
16754 (grub_util_read_at): Likewise.
16755 (grub_util_write_image_at): Likewise.
16756 * kern/main.c (grub_get_end_addr): Remove function.
16757 (grub_load_modules): Call grub_arch_modules_addr instead of using
16758 grub_end_addr. Look for a grub_module_info struct in memory. Use
16759 the grub_module_info fields instead of calling grub_get_end_addr
16760 as loop conditions. Move grub_add_unused_region code here.
16761 (grub_add_unused_region): Remove function.
16762 * kern/i386/pc/init.c: Include grub/cache.h.
16763 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16764 one call to add_mem_region.
16765 (grub_arch_modules_addr): New function.
16766 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16767 (grub_total_module_size): Likewise.
16768 Include grub/machine/kernel.h.
16769 (grub_arch_modules_addr): New function.
16770 * util/grub-emu.c (grub_end_addr): Remove variable.
16771 (grub_total_module_size): Likewise.
16772 (grub_arch_modules_addr): New function.
16773 * util/misc.c: Include unistd.h.
16774 (grub_util_get_fp_size): New function.
16775 (grub_util_read_at): Likewise.
16776 (grub_util_write_image_at): Likewise.
16777 (grub_util_read_image): Call grub_util_read_at.
16778 (grub_util_write_image): Call grub_util_write_image_at.
16779 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16780 additional memory in kernel_img for a struct grub_module_info.
16781 Fill in that grub_module_info.
16782 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16784 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16786 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16788 * include/grub/powerpc/ieee1275/ieee1275.h
16789 (grub_ieee1275_milliseconds): New prototype.
16790 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16792 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16793 grub_ieee1275_milliseconds.
16795 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16797 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16799 (find_options): New function.
16800 (cmain): Call find_options.
16801 * include/grub/powerpc/ieee1275/ieee1275.h
16802 (grub_ieee1275_realmode): New extern variable.
16803 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16804 grub_map if grub_ieee1275_realmode is false.
16806 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16808 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16809 lines are inserted and make it work like readline. Reported by
16810 Vincent Pelletier <subdino2004@yahoo.fr>.
16812 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16814 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16816 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16817 `kern/powerpc/cache.S'.
16819 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16821 * genmk.rb: Handle the `Program' class in the main loop. Written
16822 by Johan Rydberg <jrydberg@gnu.org>.
16823 (Program): New class.
16824 (programs): New variable.
16825 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16826 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16827 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16828 (help_arch): Function removed.
16829 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16830 `powerpc/libgcc.h' and `loader.h'.
16831 (pkgdata_PROGRAMS): New variable.
16832 (sbin_UTILITIES): Variable removed.
16833 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16834 (grubof_SOURCES): Variable re-defined so it only includes the
16835 core functionality.
16836 (grubof_CFLAGS): Remove `-DGRUBOF'.
16837 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16838 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16839 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16840 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16841 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16842 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16843 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16844 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16845 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16846 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16847 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16848 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16849 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16850 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16851 (pc_mod_CFLAGS): New variables.
16852 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16853 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16854 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16855 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16857 * include/grub/i386/pc/init.h (grub_os_area_addr)
16858 (rub_os_area_size): ... to here.
16859 * include/grub/powerpc/ieee1275/ieee1275.h
16860 (grub_ieee1275_entry_fn): Export symbol.
16861 * include/grub/powerpc/ieee1275/init.h: New file.
16862 * include/grub/powerpc/libgcc.h: Likewise.
16863 * include/grub/cache.h: Likewise.
16864 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16865 <hollis@penguinppc.org>.
16866 * kern/dl.c: Include <grub/cache.h>.
16867 (grub_dl_flush_cache): New function.
16868 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16870 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16871 (grub_console_init): Removed prototypes.
16872 (grub_machine_init): Don't initialize the modules anymore.
16873 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16875 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16876 Macro undef removed.
16877 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16878 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16879 relocation `R_PPC_REL32'. Return an error when the relocation is
16881 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16882 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16883 * util/misc.c (grub_arch_sync_caches): Likewise.
16885 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16887 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16888 `symlist.c', add `grubof_symlist.c'.
16889 (symlist.c): Variable removed.
16890 (grubof_HEADERS): Variable added.
16891 (grubof_symlist.c): New target.
16892 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16893 `kernel_img_HEADERS'.
16894 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16895 * kern/powerpc/dl.c: New file.
16896 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16898 (grub_arch_dl_relocate_symbols): Likewise.
16899 (grub_register_exported_symbols): Likewise.
16901 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16903 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16904 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16905 to fail instead. Reported by Vincent Pelletier
16906 <subdino2004@yahoo.fr>.
16908 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16909 it is not allocated. Reported by Vincent Pelletier
16910 <subdino2004@yahoo.fr>.
16912 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16913 output so the output looks better.
16915 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16917 Modulize the partition map support and add support for the amiga
16920 * commands/ls.c: Include <grub/partition.h> instead of
16921 <grub/machine/partition.h>.
16922 * kern/disk.c: Likewise.
16923 * kern/rescue.c: Likewise.
16924 * loader/i386/pc/chainloader.c: Likewise.
16925 * normal/cmdline.c: Likewise.
16926 * kern/powerpc/ieee1275/init.c: Likewise.
16927 (grub_machine_init): Call `grub_pc_partition_map_init',
16928 `grub_amiga_partition_map_init' and
16929 `grub_apple_partition_map_init'.
16930 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16931 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16932 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16933 `partition.h' and `pc_partition.h'.
16934 (grub_setup_SOURCES): Remove
16935 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16936 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16937 (grub_emu_SOURCES): Likewise.
16938 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16939 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16940 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16941 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16942 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16943 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16944 (grubof_SOURCES): Likewise.
16945 * disk/i386/pc/partition.c: File removed.
16946 * disk/powerpc/ieee1275/partition.c: Likewise.
16947 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16948 * include/grub/i386/pc/partition.h: Likewise.
16949 * kern/partition.c: New file.
16950 * partmap/amiga.c: Likewise.
16951 * partmap/apple.c: Likewise.
16952 * partmap/pc.c: Likewise.
16953 * include/grub/partition.h: Likewise..
16954 * include/grub/pc_partition.h: Likewise.
16955 * util/grub-emu.c: Include <grub/partition.h> instead of
16956 <grub/machine/partition.h>.
16957 (main): Call `grub_pc_partition_map_init',
16958 `grub_amiga_partition_map_init' and
16959 `grub_apple_partition_map_init' and deinitialize afterwards.
16960 * util/i386/pc/biosdisk.c: Include `#include
16961 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16962 `<grub/machine/partition.h>'.
16963 * util/i386/pc/grub-setup.c: Likewise.
16964 * util/i386/pc/biosdisk.c: Likewise.
16965 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16966 partition information in case of a PC partition.
16967 * util/i386/pc/grub-setup.c: Include `#include
16968 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16969 `<grub/machine/partition.h>'.
16970 (setup): Only access the PC specific partition information in case
16973 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16975 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16976 (grub_longjmp): Likewise.
16977 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16979 * normal/powerpc/setjmp.S: New file.
16980 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16981 `normal/powerpc/setjmp.S'.
16982 (grubof_CFLAGS): Add `-DGRUBOF'.
16983 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16984 [GRUB_UTIL && !GRUBOF].
16986 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16988 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16989 property named `name'. Correctly handle the error returned by
16990 `grub_ieee1275_finddevice' if a device can not be opened.
16992 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16994 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16995 `actual' for negativity.
16996 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16999 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17001 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17002 (PAGE_OFFSET): New macro.
17003 (CRTC_ADDR_PORT): Likewise.
17004 (CRTC_DATA_PORT): Likewise.
17005 (START_ADDR_HIGH_REGISTER): Likewise.
17006 (START_ADDR_LOW_REGISTER): Likewise.
17007 (GRAPHICS_ADDR_PORT): Likewise.
17008 (GRAPHICS_DATA_PORT): Likewise.
17009 (READ_MAP_REGISTER): Likewise.
17010 (INPUT_STATUS1_REGISTER): Likewise.
17011 (INPUT_STATUS1_VERTR_BIT): Likewise.
17012 (page): New variable.
17013 (wait_vretrace): New function.
17014 (set_read_map): Likewise.
17015 (set_start_address): Likewise.
17016 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17018 (check_vga_mem): Take the page into account.
17019 (write_char): Likewise.
17020 (write_cursor): Likewise.
17021 (scroll_up): Likewise. Copy the page to the page that is not
17022 shown and switch between both pages.
17023 (grub_vga_putchar): Fix off by one error.
17024 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17027 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17029 Add support for iso9660 (including rockridge).
17031 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17032 (iso9660_mod_SOURCES): New variable.
17033 (iso9660_mod_CFLAGS): Likewise.
17034 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17035 * include/grub/fs.h (grub_iso9660_init): New prototype.
17036 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17037 * fs/iso9660.c: New file.
17039 * include/grub/misc.h (grub_strncat): New prototype.
17040 * kern/misc.c (grub_strncat): New function.
17042 * fs/hfs.c (grub_hfs_mount): Translate the error
17043 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17044 * fs/jfs.c (grub_jfs_mount): Likewise.
17045 * fs/ufs.c (grub_ufs_mount): Likewise.
17047 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17049 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17050 which initialized BAT registers.
17051 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17052 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17054 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17055 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17057 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17058 (grub_mapclaim): Likewise.
17059 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17060 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17063 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17065 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17066 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17067 -ffreestanding and -msoft-float.
17069 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17071 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17072 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17073 set in grub_ieee1275_flags.
17075 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17077 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17079 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17080 grub_console_init first.
17081 Change the memory range used for grub_ieee1275_claim and
17082 grub_mm_init_region.
17083 Print an error message if the claim fails.
17084 Include <grub/misc.h>.
17086 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17088 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17089 Call grub_children_iterate for device nodes of type `scsi',
17091 (grub_ofdisk_open): Remove manual device alias resolution.
17092 Fix memory leak when device cannot be opened.
17093 * include/grub/powerpc/ieee1275/ieee1275.h
17094 (grub_children_iterate): New prototype.
17095 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17097 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17098 Return -1 if args.size was -1.
17100 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17102 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17103 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17104 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17105 Open Firmware's memory for it; claim memory from _start to _end.
17106 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17107 (_end): New extern.
17108 (_start): Zero BSS from __bss_start to _end.
17109 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17111 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17113 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17115 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17116 -1 if args.base was -1.
17118 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17120 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17121 escape sequence instead of a literal ^L. Also call
17122 grub_ofconsole_gotoxy.
17124 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17126 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17127 void * arguments to grub_addr_t. All callers updated. Also make
17128 the `result' argument optional.
17129 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17130 All callers updated.
17132 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17134 * commands/ls.c (grub_ls_list_files): Use the string following the
17135 initial ')', if present, as the filesystem path.
17136 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17138 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17140 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17142 Make the source code of the menu interface more readable.
17144 * normal/menu.c: Include grub/mm.h.
17145 (TERM_WIDTH): New macro.
17146 (TERM_HEIGHT): Likewise.
17147 (TERM_INFO_HEIGHT): Likewise.
17148 (TERM_MARGIN): Likewise.
17149 (TERM_SCROLL_WIDTH): Likewise.
17150 (TERM_TOP_BORDER_Y): Likewise.
17151 (TERM_LEFT_BORDER_X): Likewise.
17152 (TERM_BORDER_WIDTH): Likewise.
17153 (TERM_MESSAGE_HEIGHT): Likewise.
17154 (TERM_BORDER_HEIGHT): Likewise.
17155 (TERM_NUM_ENTRIES): Likewise.
17156 (TERM_FIRST_ENTRY_Y): Likewise.
17157 (TERM_ENTRY_WIDTH): Likewise.
17158 (TERM_CURSOR_X): Likewise.
17159 (draw_border): Use macros instead of magic numbers.
17160 (print_entry): Likewise.
17161 (print_entries): Likewise.
17162 (run_menu): Likewise. Also, handle the key 'e'.
17163 (run_menu_entry): Ignore empty command lines.
17164 (print_message): Added a new argument EDIT. If EDIT is true,
17165 print a different message.
17166 (init_page): Likewise.
17167 (edit_menu_entry): New function. Not implemented yet.
17169 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17171 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17172 can be loaded from normal mode.
17174 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17176 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17177 (multiboot_mod_CFLAGS): New variables.
17178 * loader/i386/pc/linux_normal.c: New file.
17179 * loader/i386/pc/multiboot_normal.c: Likewise.
17181 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17182 attribute `unused'.
17184 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17185 `fdiro' to read the mode information from instead of `diro'.
17187 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17188 looking up a symlink.
17190 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17192 * normal/command.c (grub_command_execute): Don't parse the
17193 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17194 flags of the command.
17196 * normal/menu.c (grub_menu_run): Fix typo.
17198 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17200 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17202 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17203 `y + 1' instead of `y - 1'.
17205 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17207 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17209 From Hollis Blanchard <hollis@penguinppc.org>:
17210 * kern/misc.c (memmove): New alias for grub_memmove.
17211 (memcmp): New alias for grub_memcmp.
17212 (memset): New alias for grub_memset.
17213 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17214 Change "int handle" to "grub_ieee1275_phandle_t handle".
17215 * include/grub/powerpc/ieee1275/ieee1275.h
17216 (grub_ieee1275_get_property): Likewise.
17218 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17220 Added normal mode command `chainloader' as module chain.mod, which
17221 depends on normal.mod and _chain.mod.
17223 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17224 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17225 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17227 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17228 but arguments parsing moved to ...
17229 (grub_chainloader_cmd): ... here. New function.
17230 * include/grub/i386/pc/chainloader.h: New file.
17231 * loader/i386/pc/chainloader_normal.c: Likewise.
17233 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17235 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17236 (grub_mkimage_LDFLAGS): Likewise.
17237 (grub_emu_SOURCES): Likewise.
17238 (kernel_img_HEADERS): Added fshelp.h.
17239 * fs/ext2.c: Include <grub/fshelp.h>.
17240 (FILETYPE_REG): New macro.
17241 (FILETYPE_INO_REG): Likewise.
17242 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17244 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17246 (grub_fshelp_node): New struct.
17247 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17249 (grub_ext2_get_file_block): Removed function.
17250 (grub_ext2_read_block): New function.
17251 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17252 This function was written.
17253 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17254 (grub_ext2_find_file): Removed function.
17255 (grub_ext2_read_symlink): New function.
17256 (grub_ext2_iterate_dir): Likewise.
17257 (grub_ext2_open): Rewritten.
17258 (grub_ext2_dir): Rewritten.
17259 * include/grub/fshelp.h: New file.
17260 * fs/fshelp.c: Likewise.
17262 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17264 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17265 (print_message): Add a missing newline.
17266 (run_menu): Added timeout support.
17267 (run_menu_entry): New local function.
17268 (grub_menu_run): Added support for booting.
17270 * kern/loader.c (grub_loader_is_loaded): New function.
17272 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17273 (grub_get_rtc): Exported.
17275 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17276 (grub_get_rtc): Exported.
17278 * include/grub/normal.h (struct grub_command_list): Remove
17279 constant from the member `command'.
17281 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17283 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17285 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17287 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17289 Add support for the JFS filesystem.
17291 * fs/jfs.c: New file.
17292 * include/grub/fs.h (grub_jfs_init): New prototype.
17293 (grub_jfs_fini): New prototype.
17294 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17295 (grub_emu_SOURCES): Likewise.
17296 (pkgdata_MODULES): Add jfs.mod.
17297 (jfs_mod_SOURCES): New variable.
17298 (jfs_mod_CFLAGS): Likewise.
17299 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17300 (grubof_SOURCES): Likewise.
17301 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17303 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17304 endian to the host endian.
17305 (grub_fat_utf16_to_utf8): Move function from there...
17306 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17307 the endianness of the source string anymore.
17308 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17310 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17312 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17313 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17314 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17315 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17317 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17318 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17319 for `node_found' and `it_dir'.
17320 (grub_hfs_dir): Add prototype for `dir_hook'.
17322 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17323 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17324 and `indir32' to silence a gcc warning.
17326 * include/grub/fs.h (grub_hfs_init): New prototype.
17327 (grub_hfs_fini): Likewise.
17330 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17332 Each disk device has its own id now. This is useful to make use
17333 of multiple disk devices.
17335 * include/grub/disk.h (grub_disk_dev_id): New enum.
17336 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17337 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17339 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17340 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17342 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17343 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17345 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17346 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17348 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17349 "id" which is used by the cache manager.
17351 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17354 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17356 * fs/hfs.c: New file.
17357 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17358 (grub_emu_SOURCES): Likewise.
17359 (pkgdata_MODULES): Add hfs.mod.
17360 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17361 (grubof_SOURCES): Likewise.
17362 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17364 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17365 * kern/misc.c (grub_strncasecmp): Add function.
17367 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17369 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17372 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17373 (grub_ext2_dir): In case the directory entry type is unknown, read
17376 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17378 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17379 grub_load_linux instead of grub_rescue_cmd_linux as second
17380 argument of grub_rescue_register_command.
17382 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17384 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17386 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17388 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17389 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17390 `loader/powerpc/ieee1275/linux.c',
17391 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17392 * include/grub/powerpc/ieee1275/ieee1275.h
17393 (grub_ieee1275_release): New prototype.
17394 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17395 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17396 normal, boot, linux and linux_normal.
17397 * loader/powerpc/ieee1275/linux.c: New file.
17398 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17400 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17402 * normal/arg.c (grub_arg_parse): Correct error handling after
17403 reallocating the argumentlist (check if `argl' is not null instead
17404 of checking if `args' is not null).
17405 * kern/mm.c (grub_realloc): Return the same pointer when using the
17406 same region, instead of returning the header address.
17408 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17410 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17411 one block instead of two when looking for the initial partition.
17412 (grub_partition_probe): Initialize the local variable `p' with 0.
17413 Use base 10 for the grub_strtoul call.
17414 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17415 need for one local variable.
17416 (grub_strtoul): Don't add the new value to `num', instead of that
17419 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17421 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17422 (pxeboot_img_SOURCES): New variable.
17423 (pxeboot_img_ASFLAGS): Likewise.
17424 (pxeboot_img_LDFLAGS): Likewise.
17425 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17426 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17427 <lode_leroy@hotmail.com>.
17429 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17431 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17432 there was no input.
17434 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17436 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17437 the history buffer logic.
17439 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17441 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17442 (FILETYPE_INO_SYMLINK): New macros.
17443 (grub_ext2_find_file): Check if the node is a directory using the
17444 inode stat information instead of using the filetype in the
17445 dirent. Exclude the first character of an absolute symlink.
17446 (grub_ext2_dir): Mask out the filetype part of the mode member of
17449 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17451 Add support for UFS version 1 and 2. Add support for the minix
17452 filesystem version 1 and 2, both the variants with 14 and 30 long
17455 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17457 (grub_emu_SOURCES): Likewise.
17458 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17459 (ufs_mod_SOURCES): New variable.
17460 (ufs_mod_CFLAGS): Likewise.
17461 (minix_mod_SOURCES): Likewise.
17462 (minix_mod_CFLAGS): Likewise.
17463 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17465 (grubof_SOURCES): Likewise.
17466 * fs/ufs.c: New file.
17467 * fs/minix.c: New file.
17468 * include/grub/fs.h (grub_ufs_init): New prototype.
17469 (grub_ufs_fini): Likewise.
17470 (grub_minix_init): Likewise.
17471 (grub_minix_fini): Likewise.
17472 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17475 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17478 commands/ls.c, commands/terminal.c, commands/boot.c,
17479 commands/cmp.c and commands/cat.c.
17480 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17482 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17485 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17487 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17488 and grub_, respectively. Because the conversion is trivial and
17489 mechanical, I omit the details here. Please refer to the CVS
17490 if you need more information.
17492 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17494 * include/pupa: Renamed to ...
17495 * include/grub: ... this.
17496 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17497 * util/i386/pc/grub-mkimage.c: ... this.
17498 * util/i386/pc/pupa-setup.c: Renamed to ...
17499 * util/i386/pc/grub-setup.c: ... this.
17500 * util/pupa-emu.c: Renamed to ...
17501 * util/grub-emu.c: ... this.
17503 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17505 Add support for the newworld apple macintosh (PPC). This has been
17506 tested on the powerbook 2000 only. It only adds support for
17507 generic ieee1275 functions, console and disk support. This should
17508 be easy to port to other architectures with support for Open
17511 * configure.ac: Accept the powerpc as host_cpu. In the case of
17512 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17513 specific tests are only executed while building for the i386.
17514 Inverse test for crosscompile.
17515 * genmk.rb (Utility): Allow assembler files.
17516 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17517 * conf/powerpc-ieee1275.rmk: New file.
17518 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17519 * disk/powerpc/ieee1275/partition.c: Likewise.
17520 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17521 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17522 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17523 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17524 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17525 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17526 * include/pupa/powerpc/ieee1275/loader.h
17527 * include/pupa/powerpc/setjmp.h: Likewise.
17528 * include/pupa/powerpc/types.h: Likewise.
17529 * kern/powerpc/ieee1275/init.c: Likewise.
17530 * kern/powerpc/ieee1275/openfw.c: Likewise.
17531 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17533 These files were written by Johan Rydberg
17534 (jrydberg@night.trouble.net) and I only modified them slightly.
17536 * boot/powerpc/ieee1275/cmain.c: New file.
17537 * boot/powerpc/ieee1275/crt0.S: Likewise.
17538 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17539 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17541 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17543 * Makefile.in: Update copyright.
17544 * genmodsrc.sh: Likewise.
17545 * gensymlist.sh: Likewise.
17546 * term/i386/pc/vga.c: Indent correctly.
17548 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17549 bugreporting address.
17550 * util/i386/pc/pupa-setup.c (usage): Likewise,
17551 (main): Call pupa_ext2_init and pupa_ext2_fini.
17553 * fs/fat.c (log2): Renamed to ...
17554 (fat_log2): ... this.
17555 All callers changed.
17556 * kern/misc.c (memcpy): Alias to pupa_memmove.
17557 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17559 * util/console.c (pupa_ncurses_fini): Return 0.
17561 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17562 Move fail label here.
17563 [__GNU__]: Don't warn when using stat.
17564 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17565 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17566 long int. Use strtol instead of strtoul.
17568 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17570 * commands/boot.c: New file.
17571 * commands/cat.c: Likewise.
17572 * commands/cmp.c: Likewise.
17573 * commands/ls.c: Likewise.
17574 * commands/terminal.c: Likewise.
17575 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17576 (pupa_register_command): Changed interface to match the new
17578 (pupa_command_execute): Changed (almost rewritten) so it uses
17579 pupa_split_command. Added support for setting variables using the
17581 (rescue_command): Changed to work with the new argument parser.
17582 (terminal_command): Moved from here to commands/terminal.c.
17583 (set_command): New function.
17584 (unset_command): New function.
17585 (insmod_command): New function.
17586 (rmmod_command): New function.
17587 (lsmod_command): New function.
17588 (pupa_command_init): Don't initialize the command terminal
17589 anymore. Initialize the commands set, unset, insmod, rmmod and
17591 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17592 (kernel_img_HEADERS): Add arg.h and env.h.
17593 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17594 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17595 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17597 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17599 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17600 (boot_mod_SOURCES): New variable.
17601 (terminal_mod_SOURCES): Likewise.
17602 (ls_mod_SOURCES): Likewise.
17603 (cmp_mod_SOURCES): Likewise.
17604 (cat_mod_SOURCES): Likewise.
17606 * normal/arg.c: New file.
17607 * kern/env.c: Likewise.
17608 * include/pupa/arg.h: Likewise.
17609 * include/pupa/env.h: Likewise.
17610 * font/manager.c (font_command): Changed to match argument parsing
17612 (PUPA_MOD_INIT): Likewise.
17613 * hello/hello.c (pupa_cmd_hello): Likewise.
17614 (PUPA_MOD_INIT): Likewise.
17615 * include/pupa/disk.h: Include <pupa/device.h>.
17616 (pupa_print_partinfo): New prototype.
17617 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17618 (pupa_dl_get_prefix): Likewise.
17619 * include/pupa/misc.h: Include <pupa/err.h>.
17620 (pupa_isgraph): New prototype.
17621 (pupa_isdigit): Likewise.
17622 (pupa_split_cmdline): Likewise.
17623 * include/pupa/normal.h: Include <pupa/arg.h>.
17624 (pupa_command): Changed the prototype of the member `func' to
17625 match the argument parsing interface. Added member `options'.
17626 (pupa_register_command): Updated to match function.
17627 (pupa_arg_parse): New prototype.
17628 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17629 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17630 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17631 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17632 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17633 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17634 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17635 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17636 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17637 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17638 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17639 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17640 * kern/disk.c: Include <pupa/file.h>.
17641 (pupa_print_partinfo): New function.
17642 * kern/dl.c: Include <pupa/env.h>.
17643 (pupa_dl_dir): Variable removed.
17644 (pupa_dl_load): Use the environment variable `prefix' instead of
17645 the variable pupa_dl_dir.
17646 (pupa_dl_set_prefix): Function removed.
17647 (pupa_dl_get_prefix): Likewise.
17648 * kern/i386/pc/init.c: Include <pupa/env.h>.
17649 (pupa_machine_init): Use the environment variable `prefix' instead of
17650 using pupa_dl_set_prefix to set the prefix.
17651 * kern/main.c: Include <pupa/env.h>.
17652 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17653 using pupa_dl_get_prefix to get the prefix.
17654 * kern/misc.c: Include <pupa/env.h>.
17655 (pupa_isdigit): New function.
17656 (pupa_isgraph): Likewise.
17657 (pupa_ftoa): Likewise.
17658 (pupa_vsprintf): Added support for printing values of the type
17659 `double'. Make it possible to format variable output when using
17660 formatting like `%1.2%f'.
17661 (pupa_split_cmdline): New function.
17662 * kern/rescue.c: Include <pupa/env.h>.
17663 (next_word): Removed function.
17664 (pupa_rescue_cmd_prefix): Likewise.
17665 (pupa_rescue_cmd_set): New function.
17666 (pupa_rescue_cmd_unset): New function.
17667 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17668 split the command line instead of splitting it here. Added
17669 support for setting variables using the syntax `foo=bar'. Don't
17670 initialize the prefix command anymore. Initialized the set and
17672 * normal/cmdline.c: Include <pupa/env.h>.
17673 (pupa_tab_complete): Added prototypes for print_simple_completion,
17674 print_partition_completion, add_completion, iterate_commands,
17675 iterate_dev, iterate_part and iterate_dir. Moved code to print
17676 partition information from here to kern/disk.c.
17677 (pupa_cmdline_run): Don't check if the function exists anymore.
17678 * normal/main.c: Include <pupa/env.h>.
17679 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17680 instead of using pupa_dl_get_prefix to get the prefix.
17681 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17682 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17684 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17685 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17686 ((unused))' to silence a gcc warning.
17687 (pupa_vga_setcolor): Likewise.
17688 (debug_command): Changed to match argument parsing
17690 * util/pupa-emu.c: Include <pupa/env.h>.
17691 (options): Added 0's for unused fields to silence a gcc warning.
17693 (main): Use the environment variable `prefix' instead of using
17694 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17695 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17698 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17699 * util/misc.c: Include <malloc.h>.
17700 (pupa_malloc): Rewritten so errors are correctly reported.
17701 (pupa_realloc): Likewise.
17702 (pupa_memalign): Likewise.
17703 (pupa_mm_init_region): Declare unused variables with
17704 `__attribute__ ((unused))' to silence a gcc warning.
17705 * normal/i386/setjmp.S: Remove tab at the end of the file to
17706 silence a gcc warning.
17707 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17708 variables with `__attribute__ ((unused))' to silence a gcc
17710 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17711 local variable i unsigned to silence a gcc warning.
17713 * kern/term.c: Include <pupa/misc.h>.
17714 (pupa_more_lines): New variable.
17715 (pupa_more): Likewise.
17716 (pupa_putcode): When the pager is active pause at the end of every
17718 (pupa_set_more): New function.
17719 * include/pupa/term.h (pupa_set_more): New prototype.
17722 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17724 Now this project is GRUB 2 rather than PUPA. The location of
17725 the CVS repository was moved to GRUB's.
17727 * configure.ac: Use bug-grub as the reporting address.
17728 Use GRUB instead of PUPA.
17729 Change the version number to 1.90.
17731 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17733 * genkernsyms.sh: Updated copyright information.
17734 * genmk.rb: Likewise.
17735 * genmodsrc.sh: Likewise.
17736 * gensymlist.sh: Likewise.
17737 * boot/i386/pc/boot.S: Likewise.
17738 * boot/i386/pc/diskboot.S: Likewise.
17739 * disk/i386/pc/biosdisk.c: Likewise.
17740 * disk/i386/pc/partition.c: Likewise.
17741 * font/manager.c: Likewise.
17742 * fs/ext2.c: Likewise.
17743 * fs/fat.c: Likewise.
17744 * include/pupa/boot.h: Likewise.
17745 * include/pupa/device.h: Likewise.
17746 * include/pupa/disk.h: Likewise.
17747 * include/pupa/dl.h: Likewise.
17748 * include/pupa/elf.h: Likewise.
17749 * include/pupa/err.h: Likewise.
17750 * include/pupa/file.h: Likewise.
17751 * include/pupa/font.h: Likewise.
17752 * include/pupa/fs.h: Likewise.
17753 * include/pupa/kernel.h: Likewise.
17754 * include/pupa/loader.h: Likewise.
17755 * include/pupa/misc.h: Likewise.
17756 * include/pupa/mm.h: Likewise.
17757 * include/pupa/net.h: Likewise.
17758 * include/pupa/normal.h: Likewise.
17759 * include/pupa/rescue.h: Likewise.
17760 * include/pupa/setjmp.h: Likewise.
17761 * include/pupa/symbol.h: Likewise.
17762 * include/pupa/term.h: Likewise.
17763 * include/pupa/types.h: Likewise.
17764 * include/pupa/i386/setjmp.h: Likewise.
17765 * include/pupa/i386/types.h: Likewise.
17766 * include/pupa/i386/pc/biosdisk.h: Likewise.
17767 * include/pupa/i386/pc/boot.h: Likewise.
17768 * include/pupa/i386/pc/console.h: Likewise.
17769 * include/pupa/i386/pc/init.h: Likewise.
17770 * include/pupa/i386/pc/kernel.h: Likewise.
17771 * include/pupa/i386/pc/linux.h: Likewise.
17772 * include/pupa/i386/pc/loader.h: Likewise.
17773 * include/pupa/i386/pc/memory.h: Likewise.
17774 * include/pupa/i386/pc/multiboot.h: Likewise.
17775 * include/pupa/i386/pc/partition.h: Likewise.
17776 * include/pupa/i386/pc/time.h: Likewise.
17777 * include/pupa/i386/pc/vga.h: Likewise.
17778 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17779 * include/pupa/util/getroot.h: Likewise.
17780 * include/pupa/util/misc.h: Likewise.
17781 * include/pupa/util/resolve.h: Likewise.
17782 * kern/device.c: Likewise.
17783 * kern/disk.c: Likewise.
17784 * kern/dl.c: Likewise.
17785 * kern/err.c: Likewise.
17786 * kern/file.c: Likewise.
17787 * kern/fs.c: Likewise.
17788 * kern/loader.c: Likewise.
17789 * kern/main.c: Likewise.
17790 * kern/misc.c: Likewise.
17791 * kern/mm.c: Likewise.
17792 * kern/rescue.c: Likewise.
17793 * kern/term.c: Likewise.
17794 * kern/i386/dl.c: Likewise.
17795 * kern/i386/pc/init.c: Likewise.
17796 * kern/i386/pc/lzo1x.S: Likewise.
17797 * kern/i386/pc/startup.S: Likewise.
17798 * loader/i386/pc/chainloader.c: Likewise.
17799 * loader/i386/pc/linux.c: Likewise.
17800 * loader/i386/pc/multiboot.c: Likewise.
17801 * normal/cmdline.c: Likewise.
17802 * normal/command.c: Likewise.
17803 * normal/main.c: Likewise.
17804 * normal/menu.c: Likewise.
17805 * normal/i386/setjmp.S: Likewise.
17806 * term/i386/pc/console.c: Likewise.
17807 * term/i386/pc/vga.c: Likewise.
17808 * util/console.c: Likewise.
17809 * util/genmoddep.c: Likewise.
17810 * util/misc.c: Likewise.
17811 * util/pupa-emu.c: Likewise.
17812 * util/resolve.c: Likewise.
17813 * util/unifont2pff.rb: Likewise.
17814 * util/i386/pc/biosdisk.c: Likewise.
17815 * util/i386/pc/getroot.c: Likewise.
17816 * util/i386/pc/pupa-mkimage.c: Likewise.
17817 * util/i386/pc/pupa-setup.c: Likewise.
17819 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17821 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17822 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17823 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17824 reading and reset it after reading.
17825 (pupa_ext2_close): Return PUPA_ERR_NONE.
17827 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17829 (struct linux_kernel_header): Add kernel_version and
17831 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17832 pupa_file_read succeeds.
17833 (pupa_rescue_cmd_initrd): Implement.
17835 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17837 * fs/ext2.c (pupa_ext2_label): New function.
17838 (pupa_ext2_fs): Added label.
17839 * fs/fat.c (pupa_fat_label): New function.
17840 (pupa_fat_fs): Added label.
17841 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17843 * kern/misc.c (pupa_strndup): New function.
17844 * include/pupa/misc.h (pupa_strndup): New prototype.
17846 * include/pupa/normal.h: Include <pupa/err.h>.
17847 (pupa_set_history): New prototype.
17848 (pupa_iterate_commands): New prototype.
17849 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17850 <pupa/disk.h>, <pupa/file.h>.
17851 (hist_size): New variable.
17852 (hist_lines): Likewise.
17853 (hist_end): Likewise.
17854 (hist_used): Likewise.
17855 (pupa_set_history): New function.
17856 (pupa_history_get): Likewise.
17857 (pupa_history_add): Likewise.
17858 (pupa_history_replace): Likewise.
17859 (pupa_tab_complete): Likewise.
17860 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17861 completion shows partitionnames while completing partitions, this
17862 feature was suggested by Jeff Bailey.
17863 * normal/command.c (pupa_iterate_commands): New function.
17864 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17865 (pupa_normal_init): Initialize history buffer.
17866 (PUPA_MOD_INIT): Likewise.
17867 (pupa_normal_fini): Free the history buffer.
17868 (PUPA_MOD_FINI): Likewise.
17870 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17873 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17874 * configure.ac [i386]: Check for regparam bug.
17875 (NESTED_FUNC_ATTR) [! i386]: Defined.
17877 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17879 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17880 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17881 (pupa_emu_SOURCES): New variable.
17882 (pupa_emu_LDFLAGS): Likewise.
17883 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17884 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17885 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17886 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17887 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17888 (pupa_jmp_buf): New typedef.
17889 (pupa_setjmp) [PUPA_UTIL]: New macro.
17890 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17891 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17892 (pupa_refresh): New prototype.
17893 * include/pupa/util/getroot.h: New file.
17894 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17896 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17897 (pupa_rescue_cmd_cat): Likewise.
17898 (pupa_rescue_cmd_ls): Likewise.
17899 (pupa_rescue_cmd_testload): Likewise.
17900 (pupa_rescue_cmd_lsmod): Likewise.
17901 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17902 * normal/menu.c (run_menu): Likewise.
17903 * kern/term.c (pupa_cls): Likewise.
17904 (pupa_refresh): New function.
17905 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17906 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17907 * util/console.c: New file.
17909 * util/i386/pc/getroot.c: New file.
17910 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17911 (pupa_putchar): New function.
17912 (pupa_refresh): Likewise.
17913 (xgetcwd): Function moved to ...
17914 (strip_extra_slashes): Likewise.
17915 (get_prefix): Likewise.
17916 * util/i386/pc/getroot.c: ... here.
17917 (find_root_device): Function moved and renamed to...
17918 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17919 Changed all callers.
17920 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17922 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17923 Changed all callers.
17924 * util/misc.c (pupa_memalign): New function.
17925 (pupa_mm_init_region): Likewise.
17926 (pupa_register_exported_symbols): Likewise.
17927 (pupa_putchar): Function removed.
17928 * util/pupa-emu.c: New file.
17930 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17932 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17933 (_multiboot_mod_SOURCES): New variable.
17934 (_multiboot_mod_CFLAGS): Likewise.
17935 * loader/i386/pc/multiboot.c: New file.
17936 * include/pupa/i386/pc/multiboot.h: Likewise.
17937 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17938 (pupa_multiboot_real_boot): New function.
17939 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17940 (pupa_multiboot_real_boot): New prototype.
17941 (pupa_rescue_cmd_multiboot): Likewise
17942 (pupa_rescue_cmd_module): Likewise.
17944 * kern/loader.c (pupa_loader_set): Continue when
17945 pupa_loader_unload_func() fails.
17946 (pupa_loader_unset): New function.
17947 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17949 * kern/misc.c (pupa_stpcpy): New function.
17950 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17952 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17954 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17955 for available extensions.
17957 * include/pupa/i386/pc/time.h: New file.
17958 * kern/disk.c: Include <pupa/machine/time.h>.
17959 (PUPA_CACHE_TIMEOUT): New macro.
17960 (pupa_last_time): New variable.
17961 (pupa_disk_open): Flush the cache when there was a timeout.
17962 (pupa_disk_close): Reset the timer.
17963 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17965 * util/misc.c: Include <sys/times.h>
17966 (pupa_get_rtc): New function.
17968 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17970 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17972 (pupa_ext2_get_file_block): Use blocks member.
17974 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17975 first block. Return -1 instead of pupa_errno on error.
17977 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17979 * README: In the pupa-mkimage example use _chain instead of chain
17980 and ext2 instead of fat.
17981 * TODO: Replace ext2fs with jfs as an example. Add an item for
17982 adding journal playback for ext2fs.
17983 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17984 (pkgdata_MODULES): Added ext2.mod.
17985 (ext2_mod_SOURCES): New variable.
17986 (ext2_mod_CFLAGS): Likewise.
17987 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17988 * include/pupa/misc.h (pupa_strncpy): New prototype.
17989 (pupa_strcat): Likewise.
17990 (pupa_strncmp): Likewise.
17991 * kern/misc.c (pupa_strcat): Enable function.
17992 (pupa_strncpy): New function.
17993 (pupa_strncmp): Likewise.
17994 * fs/ext2.c: New file.
17996 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17997 when the read failed before retrying.
17998 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17999 (_FILE_OFFSET_BITS): Likewise.
18000 * configure.ac: Added AC_SYS_LARGEFILE.
18002 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18004 * genmk.rb (PModule#rule): Make sure to get only symbol names
18005 from the output of nm.
18006 Reported by Robert Millan <zeratul2@wanadoo.es>.
18008 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18010 I forgot to check in these changes for a long time. This adds
18011 incomplete support for VGA console, and this is still very
18012 buggy. Also, a lot of consideration is required for I18N,
18013 UNICODE, and VGA font issues. Therefore, assume that this is
18014 such that "better than nothing".
18016 * font/manager.c: New file.
18017 * include/pupa/font.h: Likewise.
18018 * include/pupa/i386/pc/vga.h: Likewise.
18019 * term/i386/pc/vga.c: Likewise.
18020 * util/unifont2pff.rb: Likewise.
18022 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18023 (pkgdata_MODULES): Added vga.mod and font.mod.
18024 (vga_mod_SOURCES): New variables.
18025 (vga_mod_CFLAGS): Likewise.
18026 (font_mod_SOURCES): Likewise.
18027 (font_mod_CFLAGS): Likewise.
18029 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18031 * include/pupa/term.h: Include pupa/err.h.
18032 (struct pupa_term): Added init and fini.
18033 Changed the argument of putchar to pupa_uint32_t.
18035 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18036 (pupa_console_real_putchar): New prototype.
18037 (pupa_console_putchar): Removed.
18038 (pupa_console_checkkey): Exported.
18039 (pupa_console_getkey): Likewise.
18041 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18044 * kern/term.c (pupa_term_set_current): Rewritten.
18045 (pupa_putchar): Likewise.
18046 (pupa_putcode): New function.
18048 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18049 (pupa_console_real_putchar): ... this.
18050 (pupa_vga_set_mode): New function.
18051 (pupa_vga_get_font): Likewise.
18053 * normal/command.c: Include pupa/term.h.
18054 (terminal_command): New function.
18055 (pupa_command_init): Register the command "terminal".
18057 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18058 (DISP_UP): Likewise.
18059 (DISP_RIGHT): Likewise.
18060 (DISP_DOWN): Likewise.
18061 (DISP_HLINE): Likewise.
18062 (DISP_VLINE): Likewise.
18063 (DISP_UL): Likewise.
18064 (DISP_UR): Likewise.
18065 (DISP_LL): Likewise.
18066 (DISP_LR): Likewise.
18068 * term/i386/pc/console.c (pupa_console_putchar): New function.
18070 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18072 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18073 FIX. Reverse the path_list.
18075 * include/pupa/normal.h: Export pupa_register_command and
18076 pupa_unregister_command.
18078 * hello/hello.c (pupa_cmd_hello): New module.
18079 * conf/i386-pc.rmk: Added hello.mod.
18081 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18083 * kern/i386/pc/lzo1x.S: New file.
18085 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18086 (compress_kernel): New variable.
18087 (generate_image): Heavily modified to support compressing a
18088 large part of the core image.
18090 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18092 (pupa_util_load_image): New function.
18094 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18095 (pupa_compressed_size): New variable.
18096 (codestart): Enable Gate A20 here.
18097 Decompress the compressed part of the core image.
18098 Rearrange the code to put functions and variables which are
18099 required for initialization in the non-compressed part.
18102 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18105 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18107 * include/pupa/i386/pc/kernel.h
18108 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18109 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18110 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18111 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18112 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18114 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18116 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18117 (Utility#rule): Likewise.
18119 * configure.ac: Check if LZO is available.
18121 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18123 * include/pupa/normal.h: New file.
18124 * include/pupa/setjmp.h: Likewise.
18125 * include/pupa/i386/setjmp.h: Likewise.
18126 * normal/cmdline.c: Likewise.
18127 * normal/command.c: Likewise.
18128 * normal/main.c: Likewise.
18129 * normal/menu.c: Likewise.
18130 * normal/i386/setjmp.S: Likewise.
18132 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18133 (pupa_rescue_cmd_initrd): Likewise.
18135 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18138 * kern/i386/pc/startup.S (translation_table): New variable.
18139 (translate_keycode): New function.
18140 (pupa_console_getkey): Call translate_keycode.
18142 * kern/rescue.c (attempt_normal_mode): New function.
18143 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18144 it failed, print a message.
18146 * kern/mm.c (pupa_real_malloc): Print more information when a
18147 free magic is broken.
18148 (pupa_free): If the first free header is not free actually, set
18151 * kern/main.c (pupa_load_normal_mode): Just load the module
18153 (pupa_main): Don't print the message
18154 "Entering into rescue mode..." here.
18156 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18158 (pupa_rescue_cmd_initrd): Likewise.
18159 (pupa_rescue_cmd_initrd): Likewise.
18161 * include/pupa/symbol.h (FUNCTION): Specify the type.
18162 (VARIABLE): Likewise.
18164 * include/pupa/err.h (pupa_err_t): Added
18165 PUPA_ERR_UNKNOWN_COMMAND.
18167 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18168 (pupa_dl_get_prefix): Likewise.
18170 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18171 Added _chain.mod and _linux.mod instead of chain.mod and
18173 (chain_mod_SOURCES): Renamed to ...
18174 (_chain_mod_SOURCES): ... this.
18175 (chain_mod_CFLAGS): Renamed to ...
18176 (_chain_mod_CFLAGS): ... this.
18177 (linux_mod_SOURCES): Renamed to ...
18178 (_linux_mod_SOURCES): ... this.
18179 (linux_mod_CFLAGS): Renamed to ...
18180 (_linux_mod_CFLAGS): ... this.
18181 (normal_mod_SOURCES): New variable.
18182 (normal_mod_CFLAGS): Likewise.
18183 (normal_mod_ASFLAGS): Likewise.
18185 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18187 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18190 * kern/dl.c (pupa_dl_ref): Refer depending modules
18192 (pupa_dl_unref): Unrefer depending modules recursively.
18193 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18194 a module is unloaded before one depending on that module is
18196 (pupa_dl_unload): Unload depending modules explicitly,
18199 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18201 * include/pupa/i386/pc/linux.h: New file.
18202 * loader/i386/pc/linux.c: Likewise.
18204 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18206 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18207 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18208 of PUPA_CHAINLOADER_BOOT_SECTOR.
18210 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18211 (pupa_linux_prot_size): New variable.
18212 (pupa_linux_tmp_addr): Likewise.
18213 (pupa_linux_real_addr): Likewise.
18214 (pupa_linux_boot_zimage): New function.
18215 (pupa_linux_boot_bzimage): Likewise.
18217 * kern/i386/pc/init.c (struct mem_region): New structure.
18218 (MAX_REGIONS): New macro.
18219 (mem_regions): New variable.
18220 (num_regions): Likewise.
18221 (pupa_os_area_addr): Likewise.
18222 (pupa_os_area_size): Likewise.
18223 (pupa_lower_mem): Likewise.
18224 (pupa_upper_mem): Likewise.
18225 (add_mem_region): New function.
18226 (compact_mem_regions): Likewise.
18227 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18228 the size of the conventional memory and that of so-called upper
18229 memory (before the first memory hole).
18230 Instead of adding each found region to free memory, use
18231 add_mem_region and add them after removing overlaps.
18232 Also, add only 1/4 of the upper memory to free memory. The rest
18233 is used for loading OS images. Maybe this is ad hoc, but this
18234 makes it much easier to relocate OS images when booting.
18236 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18237 (pupa_enter_rescue_mode): Don't register initrd and module.
18239 * kern/mm.c: Include pupa/dl.h.
18241 * kern/main.c: Include pupa/file.h and pupa/device.h.
18243 * kern/loader.c (pupa_loader_load_module_func): Removed.
18244 (pupa_loader_load_module): Likewise.
18246 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18249 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18250 (pupa_linux_tmp_addr): Likewise.
18251 (pupa_linux_real_addr): Likewise.
18252 (pupa_linux_boot_zimage): Likewise.
18253 (pupa_linux_boot_bzimage): Likewise.
18255 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18256 (pupa_upper_mem): Likewise.
18257 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18258 module is too dangerous.
18260 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18261 (pupa_os_area_size): Likewise.
18262 (pupa_loader_set): Remove the first argument. Loader doesn't
18263 manage modules or initrd any longer.
18264 (pupa_loader_load_module): Removed.
18266 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18267 (linux_mod_SOURCES): New variable.
18268 (linux_mod_CFLAGS): Likewise.
18270 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18272 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18273 the length of a blocklist correctly.
18275 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18276 Use ioctl only if the OS file is a block device.
18277 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18278 not very useful for normal files.
18280 * kern/main.c (pupa_set_root_dev): New function.
18281 (pupa_load_normal_mode): Likewise.
18282 (pupa_main): Call those above.
18284 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18287 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18289 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18291 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18292 (setup): Configure the installed partition information and the
18295 * loader/i386/pc/chainloader.c (my_mod): New variable.
18296 (pupa_chainloader_unload): New function.
18297 (pupa_rescue_cmd_chainloader): Refer itself.
18298 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18300 * kern/i386/pc/startup.S (install_partition): Removed.
18301 (version_string): Likewise.
18302 (config_file): Likewise.
18303 (pupa_install_dos_part): New variable.
18304 (pupa_install_bsd_part): Likewise.
18305 (pupa_prefix): Likewise.
18306 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18308 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18310 (make_install_device): New function.
18311 (pupa_machine_init): Set the dl prefix.
18313 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18314 (buf): Renamed to ...
18315 (linebuf): ... this.
18316 (pupa_rescue_cmd_prefix): New function.
18317 (pupa_rescue_cmd_insmod): Likewise.
18318 (pupa_rescue_cmd_rmmod): Likewise.
18319 (pupa_rescue_cmd_lsmod): Likewise.
18320 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18323 * kern/mm.c (pupa_memalign): If failed even after invalidating
18324 disk caches, unload unneeded modules and retry.
18326 * kern/misc.c (pupa_memmove): New function.
18327 (pupa_memcpy): Removed.
18328 (pupa_strcpy): New function.
18329 (pupa_itoa): Made static.
18331 * kern/dl.c (pupa_dl_iterate): New function.
18332 (pupa_dl_ref): Likewise.
18333 (pupa_dl_unref): Likewise.
18334 (pupa_dl_unload): Return if succeeded or not.
18335 (pupa_dl_unload_unneeded): New function.
18336 (pupa_dl_unload_all): Likewise.
18337 (pupa_dl_init): Renamed to ...
18338 (pupa_dl_set_prefix): ... this.
18339 (pupa_dl_get_prefix): New function.
18341 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18342 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18343 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18344 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18345 (pupa_install_dos_part): Declared.
18346 (pupa_install_bsd_part): Likewise.
18347 (pupa_prefix): Likewise.
18348 (pupa_boot_drive): Likewise.
18350 * include/pupa/types.h: Fix a typo.
18352 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18354 (pupa_memmove): Declared.
18355 (pupa_strcpy): Likewise.
18357 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18358 pupa_mod_init takes one argument, its own module.
18359 (pupa_dl_unload_unneeded): Declared.
18360 (pupa_dl_unload_all): Likewise.
18361 (pupa_dl_ref): Likewise.
18362 (pupa_dl_unref): Likewise.
18363 (pupa_dl_iterate): Likewise.
18364 (pupa_dl_init): Renamed to ...
18365 (pupa_dl_set_prefix): ... this.
18366 (pupa_dl_get_prefix): Declared.
18368 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18369 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18371 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18372 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18374 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18375 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18377 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18379 * util/i386/pc/pupa-setup.c (setup): Define the internal
18380 function find_first_partition_start at the top level, because GCC
18381 3.0.x cannot compile internal functions in deeper scopes
18383 (find_root_device): Use lstat instead of stat.
18384 Don't follow symbolic links.
18385 Fix the path-constructing code.
18387 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18388 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18389 by a BLKGETSIZE ioctl first, because block devices don't fill
18390 the member st_mode of the structure stat on Linux.
18391 [__linux__] (linux_find_partition): Use a temporary buffer
18392 REAL_DEV for the working space. Copy it to DEV before returning.
18393 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18394 buffer cache consistent.
18395 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18396 strncmp. The previous value was merely wrong.
18397 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18399 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18400 FAT size is 12. The previous value was merely wrong.
18402 * kern/main.c (pupa_main): Don't split the starting message from
18405 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18406 LF, because BIOS goes crazy about character attributes in this
18409 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18411 * include/i386/pc/util/biosdisk.h: New file.
18412 * util/i386/pc/biosdisk.c: Likewise.
18413 * util/i386/pc/pupa-setup.c: Likewise.
18415 * Makefile.in (INCLUDE_DISTFILES): Added
18416 include/pupa/i386/pc/util/biosdisk.h.
18417 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18418 directory util/i386/pc.
18419 (install-local): Added a rule for sbin_UTILITIES.
18420 (uninstall): Likewise.
18422 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18424 * util/misc.c (xrealloc): New function.
18425 (pupa_malloc): Likewise.
18426 (pupa_free): Likewise.
18427 (pupa_realloc): Likewise.
18428 (pupa_stop): Likewise.
18429 (pupa_putchar): Likewise.
18431 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18433 * include/pupa/util/misc.h (xrealloc): Declared.
18435 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18437 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18438 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18440 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18441 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18443 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18444 way should be implemented.
18445 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18447 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18448 the size of NAME for safety.
18449 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18452 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18453 (pupa_setup_SOURCES): Likewise.
18455 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18457 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18459 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18460 bunch of pushl's from pusha, because this destroys the return
18463 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18465 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18466 This means that any missing prototypes could be fatal. Also, you
18467 must take care when writing assembly code. See the comments at
18468 the beginning of startup.S, for more details.
18470 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18471 compilation mechanism.
18472 (pupa_chainloader_real_boot): Likewise.
18473 (pupa_biosdisk_rw_int13_extensions): Likewise.
18474 (pupa_biosdisk_rw_standard): Likewise.
18475 (pupa_biosdisk_check_int13_extensions): Likewise.
18476 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18477 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18478 (pupa_get_memsize): Likewise.
18479 (pupa_get_mmap_entry): Likewise.
18480 (pupa_console_putchar): Likewise.
18481 (pupa_console_setcursor): Likewise.
18482 (pupa_getrtsecs): Use pushl instead of push.
18484 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18485 memory instead of the stack for a mmap entry, because some
18486 BIOSes may ignore the maximum size and overflow.
18488 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18490 * genmk.rb (PModule#rule): Compile automatically generated
18491 sources with module-specific CFLAGS as well as other sources.
18493 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18495 * configure.ac: Check ld.
18496 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18497 respectively, before checking endianness and sizes.
18499 * Makefile.in (LD): New variable.
18501 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18503 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18505 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18507 * Changelog: New file.