Merge branch 'makefile' into haiku
[grub2/phcoder.git] / ChangeLog
blob552243b183fcc59e0db16f4733c280e9bb9c29d0
1 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
3         Nested partitions
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
21         get_name
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
52         move index to pcdata
53         make pcdata a pointer
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
63         use index from data
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
68         
69 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
71         HFS+ blessing
72         
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>
86         Reset USB controller
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 
108         is unavailable
109         * efiemu/mm.c (grub_efiemu_mmap_init): correct comment style
110         * include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
111         remove
112         * include/grub/i386/cpuid.h: new file
113         
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-21  Vladimir Serbinenko  <phcoder@gmail.com>
121         UUID support for UFS
123         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
124         (grub_ufs_uuid): New function.
125         (grub_ufs_fs): add .uuid
127 2009-07-21  Pavel Roskin  <proski@gnu.org>
129         * kern/dl.c (grub_dl_check_header): Make static.
131 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
133         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
134         add drivemap for Vista.  It breaks Windows 7.
136 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
138         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
139         128 bytes
141 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
143         Add BFS support
145         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
146         (grub_fstest_SOURCES): Likewise.
147         (pkglib_MODULES): Add befs.mod.
148         (befs_mod_SOURCES): New variable.
149         (befs_mod_CFLAGS): Likewise.
150         (befs_mod_LDFLAGS): Likewise.
151         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
152         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
153         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
154         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
155         (grub_setup_SOURCES): Likewise.
156         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
157         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
158         (grub_setup_SOURCES): Likewise.
159         * fs/befs.c: New file.
160         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
161         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
162 <<<<<<< HEAD:ChangeLog
163         (GRUB_AFS_SBLOCK_MAGIC1) [BFS]: New conditional declaration.
164         (GRUB_AFS_BTREE_MAGIC) [BFS]: Likewise
165         (B_KEY_INDEX_ALIGN): New declaration.
166         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
167         (grub_afs_bnode) [BFS]: Make key_count and key_size 16-bit
168         (grub_afs_btree) [BFS]: New conditional declaration.
169         (grub_afs_sblock) [BFS]: Remove link_count.
170         (grub_afs_validate_sblock) [BFS]: Support BFS
171         (grub_afs_mount) [BFS]: Likewise.
172         (grub_afs_dir) [BFS]: Divide mtime by 65536 and not 1000000.
173         (grub_afs_fs): Use GRUB_AFS_FSNAME
174         (GRUB_MOD_INIT (afs)) [BFS]: Rename to ...
175         (GRUB_MOD_INIT (befs)) [BFS]: ... this
176         (GRUB_MOD_FINI (afs)) [BFS]: Rename to ...
177         (GRUB_MOD_FINI (befs)) [BFS]: ... this
178         
179 2009-07-17  Vladimir Serbinenko  <phcoder@gmail.com>
180 =======
181         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
182         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
183         (B_KEY_INDEX_ALIGN): New declaration.
184         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
185         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
186         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
187         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
188         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
189         (grub_afs_mount) [MODE_BFS]: Likewise.
190         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
191         (grub_afs_fs): Use GRUB_AFS_FSNAME
192         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
193         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
194         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
195         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
197 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
199         * util/getroot.c (find_root_device): Add support for MacOSX.
200         * util/hostdisk.c: Likewise.
202 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
204         * font/font.c (find_glyph): Check whether a font is present to avoid
205         segmentation fault.
207 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
209         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
211 2009-07-20  Pavel Roskin  <proski@gnu.org>
213         * configure.ac: Trim excessively wordy excuses.
215 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
216 >>>>>>> makefile:ChangeLog
218         Add symlink, mtime and label support to AtheFS.
220         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
221         (grub_afs_iterate_dir): Handle symlinks.
222         (grub_afs_open): Use grub_afs_read_symlink.
223         (grub_afs_dir): Likewise.
224         Pass mtime.
225         (grub_afs_label): New function.
226         (grub_afs_fs): Add grub_afs_label.
227         (grub_afs_read_symlink): New function.
229 <<<<<<< HEAD:ChangeLog
230 2009-07-17  Vladimir Serbinenko  <phcoder@gmail.com>
231 =======
232 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
233 >>>>>>> makefile:ChangeLog
235         Fix AtheFS support.
237         * fs/afs.c: Fix comments style.
238         (grub_afs_blockrun): Declare as packed.
239         (grub_afs_datastream): Likewise.
240         (grub_afs_bnode): Likewise.
241         (grub_afs_btree): Likewise.
242         (grub_afs_sblock): Likewise.
243         Declare `name' as char.
244         (grub_afs_inode): Declare as packed.
245         Change void *vnode to grub_uint32_t unused.
246         (grub_afs_iterate_dir): Check that key_size is positive.
247         (grub_afs_mount): Don't read superblock twice.
248 <<<<<<< HEAD:ChangeLog
249         (grub_afs_dir): Don't free node in case of errorx
250         grub_fshelp_find_file already handles this.
251         (grub_afs_open): Likewise.
253 =======
254         (grub_afs_dir): Don't free node in case of error,
255         grub_fshelp_find_file already handles this.
256         (grub_afs_open): Likewise.
258 2009-07-19  Pavel Roskin  <proski@gnu.org>
260         * Makefile.in: Remove LIBLZO and enable_lzo.
261         * conf/i386-pc.rmk: Remove lzo support.
262         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
263         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
264         support.
265         * kern/i386/pc/lzo1x.S: Remove.
266         * kern/i386/pc/startup.S: Remove lzo support.
267         * util/i386/pc/grub-mkimage.c: Likewise.
269 >>>>>>> makefile:ChangeLog
270 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
272         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
273         * fs/xfs.c (grub_xfs_dir): Likewise.
274         * fs/afs.c (grub_afs_dir): Likewise.
275         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
276         (grub_iso9660_open): Likewise.
277         * fs/jfs.c (grub_jfs_open): Likewise.
278         * fs/ext2.c (grub_ext2_dir): Likewise.
279         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
280         * script/sh/lexer.c (grub_script_yylex): Likewise.
282 2009-07-16  Pavel Roskin  <proski@gnu.org>
284         * configure.ac: Never add "-c" to CFLAGS.
286         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
288         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
289         grub_cv_cc_efiemu should be used.
291         * configure.ac: Typo fixes.
293         * kern/mm.c (grub_zalloc): New function.
294         (grub_debug_zalloc): Likewise.
295         * include/grub/mm.h: Declare grub_zalloc() and
296         grub_debug_zalloc().
297         * util/misc.c (grub_zalloc): New function.
298         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
299         instead of grub_malloc(), remove unneeded initializations.
300         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
301         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
302         * commands/parttool.c (grub_cmd_parttool): Likewise.
303         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
304         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
305         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
306         * disk/usbms.c (grub_usbms_finddevs): Likewise.
307         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
308         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
309         (grub_cmd_efiemu_pnvram): Likewise.
310         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
311         * fs/iso9660.c (grub_iso9660_mount): Likewise.
312         (grub_iso9660_iterate_dir): Likewise.
313         * fs/jfs.c (grub_jfs_opendir): Likewise.
314         * fs/ntfs.c (list_file): Likewise.
315         (grub_ntfs_mount): Likewise.
316         * kern/disk.c (grub_disk_open): Likewise.
317         * kern/dl.c (grub_dl_load_core): Likewise.
318         * kern/elf.c (grub_elf_file): Likewise.
319         * kern/env.c (grub_env_context_open): Likewise.
320         (grub_env_set): Likewise.
321         (grub_env_set_data_slot): Likewise.
322         * kern/file.c (grub_file_open): Likewise.
323         * kern/fs.c (grub_fs_blocklist_open): Likewise.
324         * loader/i386/multiboot.c (grub_module): Likewise.
325         * loader/xnu.c (grub_xnu_create_key): Likewise.
326         (grub_xnu_create_value): Likewise.
327         * normal/main.c (grub_normal_add_menu_entry): Likewise.
328         (read_config_file): Likewise.
329         * normal/menu_entry.c (make_screen): Likewise.
330         * partmap/sun.c (sun_partition_map_iterate): Likewise.
331         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
332         * script/sh/script.c (grub_script_parse): Likewise.
333         * video/bitmap.c (grub_video_bitmap_create): Likewise.
334         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
335         * video/readers/png.c (grub_png_output_byte): Likewise.
336         (grub_video_reader_png): Likewise.
338 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
340         Enable all targets that can be built by default
342         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
343         grub-mkfont and grub-fstest if they can be built
345 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
347         Fix hang and segmentation fault in grub-emu-usb
349         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
350         * util/usb.c (grub_libusb_devices): likewise
351         (grub_libusb_init): rename to ...
352         (GRUB_MOD_INIT (libusb)):...this
353         (grub_libusb_fini): rename to ..
354         (GRUB_MOD_FINI (libusb)):...this
355         * disk/usbms.c (grub_usbms_transfer): fix retry logic
356         * include/grub/disk.h (grub_raid_init): removed, it's useless
357         (grub_raid_fini): likewise
358         (grub_lvm_init): likewise
359         (grub_lvm_fini): likewise
360         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
361         by grub_init_all
363 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
365         Fix libusb
367         * Makefile.in (LIBUSB): new macro
368         * genmk.rb (Utility/print_tail): new method
369         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
370         (top level): call util.print_tail at the end.
372 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
374         Make FreeBSD accept zpool.cache
376         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
377         type is /boot/zfs/zpool.cache
379 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
381         Fix 64-bit efiemu
383         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
384         correct wrong typedef
385         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
387 2009-07-15  Pavel Roskin  <proski@gnu.org>
389         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
390         * kern/disk.c (struct grub_disk_cache): Likewise.
392         * commands/probe.c (options): Typo fix.
394         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
395         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
396         accordingly.
397         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
399         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
400         the end of "Error" to make the message more readable.
402         * boot/i386/pc/boot.S (kernel_segment): Remove.
403         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
404         for destination.
406         * boot/i386/pc/boot.S (boot_version): Remove.
407         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
408         Remove.
410         * include/grub/i386/pc/boot.h: Sort all offsets.
411         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
412         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
413         * boot/i386/pc/boot.S: Assert location of every offset listed in
414         include/grub/i386/pc/boot.h.
416 2009-07-13  Pavel Roskin  <proski@gnu.org>
418         * include/grub/i386/coreboot/machine.h: Rename
419         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
420         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
421         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
423         * kern/dl.c: Force native word size to suppress warnings when
424         compiling grub-emu.
426         * kern/device.c (grub_device_iterate): Change struct part_ent to
427         hold the name, not a pointer to it.  Use one grub_malloc() per
428         partition, not two.  Free partition_name if grub_malloc() fails.
429         Set ents to NULL only before grub_partition_iterate() is called.
431 2009-07-11  Bean  <bean123ch@gmail.com>
433         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
434         childname.
436 2009-07-10  Bean  <bean123ch@gmail.com>
437 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
439         * kern/ieee1275/openfw.c (grub_children_iterate)
440         (grub_devalias_iterate): Fix size evaluation for property or path
441         strings, which was broken since r2132.
443 2009-07-07  Pavel Roskin  <proski@gnu.org>
445         * commands/search.c (search_file): Merge into ...
446         (search_fs): ... this.  Accept search type as argument.
447         (grub_cmd_search): Pass search type to search_fs().
449         * include/grub/util/console.h: New file.
450         * util/console.c: Use it instead of grub/machine/console.h.
451         * util/grub-emu.c: Likewise.
453         * lib/arg.c (find_long_option): Remove.
454         (find_long): Add `len' argument, make `s' const char *.
455         (grub_arg_parse): Parse long options in place, not in a
456         temporary buffer.
458 2009-07-06  Pavel Roskin  <proski@gnu.org>
460         * commands/search.c (search_fs): Fix potential NULL pointer
461         dereference.
463         * commands/search.c (search_fs): Replace QUID macro with quid_fn
464         function pointer.
466 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
468         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
469         comparison.
471 2009-07-05  Pavel Roskin  <proski@gnu.org>
473         * include/grub/i386/linux.h (struct linux_kernel_params):
474         Restore padding3, it's still needed.
476         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
477         FreeBSD.
478         * util/osdetect.lua: Likewise.
480 2009-07-05  Bean  <bean123ch@gmail.com>
482         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
484         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
485         (grub_lua_getenv): Likewise.
486         (grub_lua_setenv): Likewise.
487         (save_errno): New function.
488         (push_result): Likewise.
489         (grub_lua_enum_device): Likewise.
490         (grub_lua_enum_file): Likewise.
491         (grub_lua_file_open): Likewise.
492         (grub_lua_file_close): Likewise.
493         (grub_lua_file_seek): Likewise.
494         (grub_lua_file_read): Likewise.
495         (grub_lua_file_getline): Likewise.
496         (grub_lua_file_getsize): Likewise.
497         (grub_lua_file_getpos): Likewise.
498         (grub_lua_file_eof): Likewise.
499         (grub_lua_file_exist): Likewise.
500         (grub_lua_add_menu): Likewise.
502         * script/lua/grub_lua.h (isupper): New inline function.
503         (islower): Likewise.
504         (ispunct): Likewise.
505         (isxdigit): Likewise.
506         (strcspn): Change to normal function.
507         (strpbkr): New function declaration.
508         (memchr): Likewise.
510         * script/lua/grub_main.c (scan_str): New function.
511         (strcspn): Likewise.
512         (strpbrk): Likewise.
513         (memchr): Likewise.
515         * script/lua/linit.c (lualibs): Enable the string library.
517         * util/osdetect.lua: New file.
519 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
521         * include/grub/i386/linux.h (struct linux_kernel_params): Add
522         `capabilities' member.
524 2009-07-02  Pavel Roskin  <proski@gnu.org>
526         * genparttoollist.sh: Add missing newline at the end.
528 2009-07-01  Pavel Roskin  <proski@gnu.org>
530         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
532         * util/hostdisk.c (open_device): Remove `const' from
533         `sysctl_size', as sysctlbyname() can change it (in this case it
534         doesn't actually happen).
536         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
537         using signed long int constants.
539         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
540         constant to avoid a warning on FreeBSD.
542         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
543         where it's needed.
545         * Makefile.in: Install include/grub/machine symlink.
547         * Makefile.in: When installing symlinks, use "cp -fR", which
548         works on FreeBSD and MacOSX.
549         From Yves Blusseau <cl7m42e02@sneakemail.com>
551         * kern/dl.c (grub_dl_resolve_symbol): Make static.
552         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
554         * util/misc.c: Move grub_reboot() and grub_halt() ...
555         * util/grub-emu.c: ... here.  Make main_env static.
556         * include/grub/util/misc.h: Remove main_env.
558         * kern/mm.c: Use correct format to print size_t.
560         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
561         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
562         * kern/powerpc/dl.c: Likewise.
563         * kern/sparc64/dl.c: Likewise.
564         * kern/x86_64/dl.c: Likewise.
566 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
568         Fix grub-emu build on sparc64-ieee1275.
570         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
571         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
573 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
575         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
576         (grub_reboot, grub_halt): New functions.
578         * util/i386/pc/misc.c: Delete.  Update all users.
579         * util/sparc64/ieee1275/misc.c: Likewise.
580         * util/powerpc/ieee1275/misc.c: Likewise.
582 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
584         * conf/i386.rmk (setjmp_mod_SOURCES)
585         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
586         * conf/common.rmk (setjmp_mod_SOURCES)
587         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
588         to use $(target_cpu).
589         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
590         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
591         * conf/powerpc-ieee1275.rmk: Likewise.
592         * conf/sparc64-ieee1275.rmk: Likewise.
594         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
595         $(target_cpu) for kern/$(target_cpu)/dl.c.
596         * conf/i386-efi.rmk: Likewise.
597         * conf/i386-ieee1275.rmk: Likewise.
598         * conf/x86_64-efi.rmk: Likewise.
599         * conf/i386-coreboot.rmk: Likewise.
600         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
601         $(target_cpu) for kern/$(target_cpu)/dl.c and for
602         kern/$(target_cpu)/cache.S.
603         * conf/sparc64-ieee1275.rmk: Likewise.
605 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
607         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
608         type to `grub_uint8_t', and adjust `padding9' accordingly.
610 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
612         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
614         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
615         assembly in final jump, using register constraints.
617         (grub_linux_boot): For text mode, initialize `have_vga' using
618         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
620         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
621         right before the final jump.
623         Set `video_mode' to 0x3.
625         Document initialization of `video_page', `video_mode' and
626         `video_ega_bx'.
628 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
630         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
631         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
632         and set GRUB_LINUX_FLAG_QUIET appropriately.
634 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
636         Fix build on Debian / sparc.
638         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
640 2009-06-28  Pavel Roskin  <proski@gnu.org>
642         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
643         fix a warning.
645         * util/grub.d/10_linux.in: Match SUSE style initrd names.
647 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
649         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
650         `err'.
652 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
654         Revert r2338.
656         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
657         file can't be opened.  grub_file_open() is already supposed to set
658         grub_errno / grub_errmsg appropriately.
659         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
661 2009-06-27  Pavel Roskin  <proski@gnu.org>
662 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
664         * include/grub/dl.h: Include grub/elf.h.
665         (struct grub_dl): Add symtab field.
666         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
667         GRUB_MODULES_MACHINE_READONLY.
668         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
669         of the header for read-only modules.
670         (grub_dl_unload): Free mod->symtab for read-only modules.
671         * kern/i386/dl.c: Use mod->symtab.
672         * kern/powerpc/dl.c: Likewise.
673         * kern/sparc64/dl.c: Likewise.
674         * kern/x86_64/dl.c: Likewise.
676         * conf/i386-qemu.rmk: New file.
677         * kern/i386/qemu/startup.S: Likewise.
678         * kern/i386/qemu/mmap.c: Likewise.
679         * boot/i386/qemu/boot.S: Likewise.
680         * include/grub/i386/qemu/time.h: Likewise.
681         * include/grub/i386/qemu/serial.h: Likewise.
682         * include/grub/i386/qemu/kernel.h: Likewise.
683         * include/grub/i386/qemu/console.h: Likewise.
684         * include/grub/i386/qemu/boot.h: Likewise.
685         * include/grub/i386/qemu/init.h: Likewise.
686         * include/grub/i386/qemu/machine.h: Likewise.
687         * include/grub/i386/qemu/loader.h: Likewise.
688         * include/grub/i386/qemu/memory.h: Likewise.
690         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
691         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
692         [qemu] (pkglib_IMAGES): Add `boot.img'.
693         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
694         [qemu] (boot_img_FORMAT): New variables.
695         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
696         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
697         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
698         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
699         [qemu] (kernel_img_FORMAT): New variables.
701         * configure.ac: Recognise `i386-qemu'.
703         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
704         (for no compression).
705         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
706         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
707         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
708         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
709         ifdefs).
711 2009-06-27  Pavel Roskin  <proski@gnu.org>
713         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
714         read.
715         * efiemu/prepare32.c: Likewise.
716         * efiemu/prepare64.c: Likewise.
718 2009-06-26  Pavel Roskin  <proski@gnu.org>
720         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
721         * include/grub/elf.h: Define symbols without "32" or "64" based
722         on GRUB_TARGET_WORDSIZE.
723         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
724         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
725         ELF definitions.
726         * efiemu/loadcore64.c: Likewise.
727         * loader/i386/bsd32.c: Likewise.
728         * loader/i386/bsd64.c: Likewise.
729         * kern/dl.c: Remove own ELF definitions.
730         * util/i386/efi/grub-mkimage.c: Likewise.
732 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
734         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
735         segment 0x0 unconditionally, because the reference generated by
736         GAS is an absolute address.
738 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
740         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
741         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
743 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
745         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
746         indexes.  Check for -f explicitly.
747         (search_file): Improve error message.
748         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
750 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
752         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
753         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
755 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
757         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
758         * conf/i386-ieee1275.rmk: Likewise.
759         * conf/i386-coreboot.rmk: Likewise.
761         * kern/i386/pc/startup.S (grub_stop): Remove function.
762         * kern/i386/ieee1275/startup.S: Likewise.
763         * kern/i386/coreboot/startup.S: Likewise.
764         * kern/i386/misc.S (grub_stop): New function.
766 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
768         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
769         * kern/i386/realmode.S (real_to_prot): ... to here.
771 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
773         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
774         with `kernel.img'.
775         (kernel_elf_SOURCES): Rename to ...
776         (kernel_img_SOURCES): ... this.
777         (kernel_elf_HEADERS): Rename to ...
778         (kernel_img_HEADERS): ... this.  Update all users.
779         (kernel_elf_ASFLAGS): Rename to ...
780         (kernel_img_ASFLAGS): ... this.
781         (kernel_elf_CFLAGS): Rename to ...
782         (kernel_img_CFLAGS): ... this.
783         (kernel_elf_LDFLAGS): Rename to ...
784         (kernel_img_LDFLAGS): ... this.
785         * conf/i386-coreboot.rmk: Likewise.
786         * conf/powerpc-ieee1275.rmk: Likewise.
788         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
789         with "kernel.img".
791 2009-06-21  Pavel Roskin  <proski@gnu.org>
793         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
794         to match nested functions.
795         * loader/sparc64/ieee1275/linux.c: Likewise.
797         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
799 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
801         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
802         all i386 platforms.
804 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
806         Fix asm file handling on ELF, and remove workarounds.
808         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
809         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
810         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
811         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
813 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
815         Load BSD ELF modules
817         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
818         and loader/i386/bsd64.c
819         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
820         (FREEBSD_MODTYPE_ELF_MODULE): New definition
821         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
822         (grub_freebsd_load_elfmodule32): New declaration
823         (grub_freebsd_load_elfmoduleobj64): Likewise
824         (grub_freebsd_load_elf_meta32): Likewise
825         (grub_freebsd_load_elf_meta64): Likewise
826         (grub_freebsd_add_meta): Likewise
827         (grub_freebsd_add_meta_module): Likewise
828         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
829         (grub_freebsd_add_meta_module): Likewise and move module-specific
830         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
831         (grub_cmd_freebsd): Add elf-kernel specific parts
832         based on grub_freebsd_add_meta_module
833         (grub_cmd_freebsd_module): Add type parsing moved from
834         grub_freebsd_add_meta_module
835         (grub_cmd_freebsd_module_elf): New function
836         (cmd_freebsd_module_elf): New variable
837         (GRUB_MOD_INIT): Register freebsd_module_elf
838         * loader/i386/bsd32.c: New file
839         * loader/i386/bsd64.c: Likewise
840         * loader/i386/bsdXX.c: Likewise
841         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
842         (grub_elf64_load): Likewise
843         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
844         All users updated
845         (grub_elf64_load_hook_t): Likewise
847 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
849         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
850         variable.
851         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
852         don't write a menu entry for recovery mode.
854 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
856         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
857         after it's no longer needed.
859 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
861         * include/grub/i386/loader.h (grub_linux_prot_size)
862         (grub_linux_tmp_addr, grub_linux_real_addr)
863         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
864         GRUB_MACHINE_PCBIOS.
865         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
866         common grub_util_info() call to ...
867         (generate_image): ... here.
868         Fix use of uninitialized memory, comparison of signed with
869         unsigned integers and memory leak.
870         Remove bogus module address message.
872 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
874         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
875         grub_raid_register
876         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
878 2009-06-19  Pavel Roskin  <proski@gnu.org>
880         * configure.ac: Remove stray AC_MSG_CHECKING.
882 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
884         * disk/scsi.c (grub_scsi_open): use continue instead of big if
886 2009-06-18  Pavel Roskin  <proski@gnu.org>
888         * conf/common.rmk: Add fs_file.mod.
889         * disk/fs_file.c: New file.
890         * include/grub/disk.h (enum grub_disk_dev_id): Add
891         GRUB_DISK_DEVICE_FILE_ID.
893 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
895         Fix build with Apple's toolchain. Part 2
897         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
898         a fake start
900 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
902         Fix build with Apple's toolchain. Part 1
904         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
905         for long calls
906         * configure.ac: remove a leftover AC_MSG_RESULT
907         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
908         Apple's toolchain
910 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
912         Fix warnings
914         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
915         (decomp_block): initialize ch
916         use grub_memcpy instead of memcpy
918 2009-06-17  Pavel Roskin  <proski@gnu.org>
920         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
921         version, use declarations needed to use vga_text as the startup
922         console.
924         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
925         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
926         the kernel.
927         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
928         and grub_at_keyboard_fini(), it's done on module load and
929         unload.
931 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
933         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
934         file can't be found.
935         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
937 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
939         Fix newline handling
941         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
942         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
943         (grub_script_yylex): don't segfault on unterminated script
944         newline terminates command and variable
946 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
948         avoid double grub_adjust_range call. Bug reported by David Simner
950         * kern/disk.c (grub_disk_write): change to raw disk access before
951         calling disk_read
953 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
955         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
956         spaces, for the benefit of help2man.
957         * util/i386/efi/grub-mkimage.c (usage): Likewise.
959 2009-06-16  Pavel Roskin  <proski@gnu.org>
961         * kern/i386/halt.c: Include grub/machine/init.h.
962         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
964 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
966         * util/grub.d/30_os-prober.in: Use ${root} in the generated
967         drivemap menuentry.
969 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
971         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
972         `echo' command.
974 2009-06-16  Pavel Roskin  <proski@gnu.org>
976         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
977         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
978         save %dx, we only need %dl and we never change it.
979         * boot/i386/pc/cdboot.S: Don't set the root drive.
980         * boot/i386/pc/pxeboot.S: Likewise.
981         * include/grub/i386/pc/boot.h: Remove
982         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
983         GRUB_BOOT_MACHINE_DRIVE_CHECK.
984         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
985         * kern/i386/pc/init.c (make_install_device): Remove references
986         to grub_root_drive.
987         * kern/i386/pc/startup.S: Likewise.
988         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
990 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
992         xnu_uuid command
994         * commands/xnu_uuid.c: new file
995         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
996         (xnu_uuid_mod_SOURCES): new variable
997         (xnu_uuid_mod_CFLAGS): likewise
998         (xnu_uuid_mod_LDFLAGS): likewise
999         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1000         * conf/i386-ieee1275.rmk: likewise
1001         * conf/i386-pc.rmk: likewise
1002         * conf/powerpc-ieee1275.rmk: likewise
1003         * conf/sparc64-ieee1275.rmk: likewise
1004         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1006 2009-06-16  Pavel Roskin  <proski@gnu.org>
1008         * configure.ac: Avoid '==' in test command, it's not portable.
1010 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
1012         Probe command
1014         * commands/probe.c: new file
1015         * conf/common.rmk (pkglib_MODULES): add probe.mod
1016         (probe_mod_SOURCES): new variable
1017         (probe_mod_CFLAGS): likewise
1018         (probe_mod_LDFLAGS): likewise
1019         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1020         * conf/i386-ieee1275.rmk: likewise
1021         * conf/i386-pc.rmk: likewise
1022         * conf/powerpc-ieee1275.rmk: likewise
1023         * conf/sparc64-ieee1275.rmk: likewise
1025 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
1027         Fix handling of string like \"hello\" and "a
1028         b"
1030         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1031         (grub_script_yylex): fix parsing of quoting, escaping and newline
1033 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
1035         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
1036         handling
1038 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
1040         * util/grub-mkconfig.in: Fix parsing of --output option.
1042 2009-06-12  Pavel Roskin  <proski@gnu.org>
1044         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
1045         genmk.rb don't need to be generated or installed.
1047 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
1049         * commands/i386/pc/drivemap_int13h.S: add more comments
1051 2009-06-11  Pavel Roskin  <proski@gnu.org>
1053         * Makefile.in (uninstall): Uninstall manuals.
1055         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1056         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
1057         and update-grub_lib in two places.
1058         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1060         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1061         a compiler warning.
1063         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1064         `entry_lo' to fix variable shadowing.
1066 2009-06-11  Christian Franke  <franke@computer.org>
1068         * kern/misc.c (__enable_execute_stack): Add missing return type
1069         to prevent gcc warning.
1071 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
1073         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1075 2009-06-11  Pavel Roskin  <proski@gnu.org>
1077         * Makefile.in: Don't rely on any scripts being executable.
1078         Always use $(SHELL) to run shell scripts.
1080         * configure.ac: Always define ___main if using -nostdlib.  This
1081         fixes tests on Cygwin.
1083 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
1085         UDF fix
1087         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
1088         is in bytes and not in blocks
1090 2009-06-11  Pavel Roskin  <proski@gnu.org>
1092         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1093         warning.
1095 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
1097         * util/grub.d/30_os-prober.in: Fix a comment. Source
1098         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
1099         to set the root device.  Place drivemap command in the generated
1100         chain entry.
1102 2009-06-11  Pavel Roskin  <proski@gnu.org>
1104         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
1105         have long been resolved.
1107 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
1109         * util/grub.d/10_linux.in: Capitalise "Linux".
1111         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1113 2009-06-11  Pavel Roskin  <proski@gnu.org>
1115         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1116         fix a gcc warning and ensure that the function won't ever exit.
1118         * kern/i386/ieee1275/init.c: Add missing prototype for
1119         grub_stop_floppy().
1121         * loader/ieee1275/multiboot2.c [__i386__]: Include
1122         grub/cpu/multiboot.h.
1124         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1125         casts to short - they are not portable and cause warnings.  Fix
1126         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
1128 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
1130         Drivemap fixes
1132         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1133         new function
1134         (grub_get_root_biosnumber_saved): new variable
1135         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1136         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
1137         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
1138         %dx after the call if necessary
1139         * conf/common.rmk (pkglib_MODULES): remove boot.mod
1140         (boot_mod_SOURCES): remove
1141         (boot_mod_CFLAGS): remove
1142         (boot_mod_LDFLAGS): remove
1143         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1144         (boot_mod_SOURCES): new variable
1145         (boot_mod_CFLAGS): likewise
1146         (boot_mod_LDFLAGS): likewise
1147         * conf/i386-efi.rmk: likewise
1148         * conf/i386-ieee1275.rmk: likewise
1149         * conf/i386-pc.rmk: likewise
1150         * conf/powerpc-ieee1275.rmk: likewise
1151         * conf/sparc64-ieee1275.rmk: likewise
1152         * conf/x86_64-efi.rmk: likewise
1153         * include/grub/i386/pc/biosnum.h: new file
1154         * lib/i386/pc/biosnum.c: likewise
1155         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1156         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1157         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1159 2009-06-10  Pavel Roskin  <proski@gnu.org>
1161         * io/gzio.c (test_header): Don't reuse one buffer for all data.
1162         Use separate variables.  Read only the file size at the end, but
1163         not the checksum that we don't use.
1165         * kern/file.c (grub_file_read): Use void pointer for the buffer.
1166         Adjust all callers.
1168         * kern/ieee1275/openfw.c: Remove libc includes.
1169         * kern/ieee1275/cmain.c: Likewise.
1170         * include/grub/ieee1275/ieee1275.h: Likewise.
1172         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1173         compiler warnings.
1175 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
1177         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1178         `genparttoollist.sh'.
1179         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1180         Add `*.sh' to the list find searches for and change `mdate.sh'
1181         to `mdate-sh'.
1183 2009-06-10  Pavel Roskin  <proski@gnu.org>
1185         * include/grub/multiboot2.h: Provide compatibility defines for
1186         multiboot2.h.
1187         * include/multiboot2.h: Include stdint.h only if needed, using
1188         angle brackets.
1189         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1190         grub/multiboot2.h.
1191         * loader/ieee1275/multiboot2.c: Likewise.
1192         * loader/multiboot2.c: Likewise.
1193         * loader/multiboot_loader.c: Likewise.
1195         * configure.ac: Use -nostdlib when probing for the target.  It
1196         should not be required to have libc for the target.
1198         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1199         they fail without libc headers for the target.
1200         * include/grub/powerpc/libgcc.h: Use weak attribute for all
1201         exports.
1202         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
1203         preprocessor conditionals.
1205         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
1206         build system doesn't need to be aware of the tar.c internals.
1208 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
1210         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1212 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
1214         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1215         disk limit to 26 for IDE, Virtio, Xen and SCSI.
1217 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
1219         * util/i386/pc/grub-install.in: Change the error message if UUIDs
1220         aren't available if ata.mod gets used.
1222 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
1224         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1225         initialising controller.
1226         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1228 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1230         * util/i386/pc/grub-install.in: Add a parameter --disk-module
1231         to choose between ata and biosdisk module on i386-pc.
1233 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
1235         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1236         Subclass and Programming Interface fields in terms of the 3 byte
1237         Class Code register.
1238         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1240         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1241         interface is OHCI.  Add grub_dprintf for symmetry with
1242         bus/usb/uhci.c.
1243         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1244         interface is UHCI.  Add interf variable for programming
1245         interface.  Print interface with class/subclass.
1247         * bus/usb/ohci.c: Set interf with correct field.
1249         * bus/usb/uhci.c: Remove unneeded doubled lines.
1250         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1251         Remove whitespace inside comment.
1253 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
1255         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1256         as fallback an equivalent option without depth.
1258 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1260         Not fail if unable to retrieve C/H/S on LBA disks
1262         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1263         if unable to retrieve C/H/S on LBA disks
1265 2009-06-08  Pavel Roskin  <proski@gnu.org>
1267         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1268         about aliasing.
1270 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1272         * Makefile.in (uninstall): Remove all $lib_DATA files.
1274 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1276         Bugfix: install on partitionless device
1278         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1279         is a whole disk
1281 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1283         * Makefile.in (uninstall): Remove all $include_DATA files.
1285 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1287         * commands/true.c: New file.  Implement the true and false commands.
1288         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1289         (true_mod_SOURCES): New variable.
1290         (true_mod_CFLAGS): Likewise.
1291         (true_mod_LDFLAGS): Likewise.
1293 2009-06-05  Colin D Bennett  <colin@gibibit.com>
1295         Optimized font character lookup using binary search instead of linear
1296         search.  Fonts now are required to have the character index ordered by
1297         code point.
1299         * font/font.c (load_font_index): Verify that fonts have ordered
1300         character indices.
1301         (find_glyph): Use binary search instead of linear search to find a
1302         character in a font.
1304 2009-06-05  Michael Scherer  <misc@mandriva.org>
1306         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1307         uses case sensitive btree.
1308         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1309         only for case insensitive filesystems.
1311 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
1313         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1314         * conf/common.rmk (search_mod_CFLAGS): likewise
1316 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1318         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1319         compensate a compiler bug
1321 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1323         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1324         instead of '\b'
1326 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1328         Definitions for creating asm symbols with Apple's CC
1330         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1331         [APPLE_CC] (VARIABLE): likewise
1333 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1335         Disable lnxboot.img when compiled
1336         with Apple's CC
1338         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1339         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1340         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1341         [! APPLE_CC] (CODE_LENG): skip
1342         [! APPLE_CC] (setup_sects): likewise
1343         [! APPLE_CC]: skip filling
1345 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1347         Address in trampolines based on 32-bit registers when compiled
1348         with Apple's CC
1350         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1351         for addresses
1352         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1354 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1356         Avoid aliases when compiling with Apple's CC for PCBIOS machine
1358         * kern/misc.c [APPLE_CC] (memcpy): new function
1359         [APPLE_CC] (memmove): likewise
1360         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1361         (memcpy): define alias conditionally on !APPLE_CC
1362         (memset): likewise
1363         (abort): likewise
1364         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1365         APPLE_CC are defined
1366         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1367         (grub_assert_fail): make prototype conditional
1369 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1371         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1373         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1374         grub-macho2img
1375         (CLEANFILES): add grub-macho2img
1376         (grub_macho2img_SOURCES): new variable
1377         * kern/i386/pc/startup.S (bss_start): new variable
1378         (bss_end): likewise
1379         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1380         * util/grub-macho2img.c: new file
1382 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1384         Use objconv when compiling with Apple's CC
1386         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1387         (efiemu64.o): likewise
1388         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1389         when compiling with Apple's CC
1390         (efiemu64_s.o): likewise
1391         * configure.ac: check for objconv when compiling with Apple's CC
1392         * genmk.rb: use objconv for modules when compiled with Apple's CC
1394 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1396         Define segment as well as section when compiling with
1397         Apple's CC
1399         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1400         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1401         (efiemu_convert_pointer): likewise
1402         (efiemu_set_virtual_address_map): likewise
1403         (efiemu_convert_pointer): likewise
1404         (efiemu_getcrc32): likewise
1405         (init_crc32_table): likewise
1406         (reflect): likewise
1407         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1408         (GRUB_MOD_DEP): likewise
1410 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1412         Allow a compilation without -mcmodel=large
1414         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1415         when compiled without -mcmodel=large
1416         (filter_memory_map): remove memory post 4 GiB when compiled
1417         without -mcmodel=large
1418         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1419         TARGET_CFLAGS when -mcmodel=large isn't supported
1421 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1423         Remove nested functions in efiemu core
1425         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1427 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1429         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1431         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1432         temporary storage
1433         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1434         using Apple's CC
1435         (grub_cpu_is_tsc_supported): likewise
1436         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1438 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1440         Absolute addressing through constant with Apple's cc
1442         * kern/i386/pc/startup.S: Define necessary constants
1443         and address through it when using ABS with Apple's CC
1444         * boot/i386/pc/diskboot.S: likewise
1445         * boot/i386/pc/boot.S: likewise
1446         * boot/i386/pc/lnxboot.S: likewise
1447         * boot/i386/pc/cdboot.S: likewise
1448         * mmap/i386/pc/mmap_helper.S: likewise
1449         * commands/i386/pc/drivemap_int13h.S: likewise
1451 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1453         Check if compiler is apple cc
1455         * Makefile.in (ASFLAGS): new variable
1456         (TARGET_ASFLAGS): likewise
1457         (TARGET_MODULE_FORMAT): likewise
1458         (TARGET_APPLE_CC): likewise
1459         (OBJCONV): likewise
1460         (TARGET_IMG_CFLAGS): likewise
1461         (TARGET_CPPFLAGS): add includedir
1462         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1463         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1464         Check for linker script only if compiler isn't Apple's CC
1465         (TARGET_MODULE_FORMAT): set
1466         (TARGET_APPLE_CC): likewise
1467         (TARGET_ASFLAGS): likewise
1468         (ASFLAGS): likewise
1469         Check for objcopy only if compiler isn't Apple's CC
1470         Check for BSS symbol only if compiler isn't Apple's CC
1471         * genmk.rb: adapt nm options if we use Apple's utils
1472         * aclocal.m4 (grub_apple_cc): new test
1473         (grub_apple_target_cc): likewise
1475 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1477         Simplify sed expressions and improve awk
1479         * Makefile.in (install-local): simplify sed expression
1480         * gencmdlist.sh: likewise
1481         * genmoddep.awk: avoid adding module as a dependency of itself
1483 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1485         Add missing start symbols
1487         * boot/i386/pc/boot.S: add start
1488         * boot/i386/pc/pxeboot.S: likewise
1490 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1492         Fix wrong assumptions with grub-mkimage on EFI
1494         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1495         (relocate_addresses): consider both r_addend and value at offset
1496         (make_mods_section): zerofill modinfo and header
1497         (convert_elf): write prefix here
1499 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1501         Use .asciz instead of .string
1503         * i386/pc/diskboot.S: use .asciz instead of .string
1504         * i386/pc/boot.S: likewise
1505         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1506         (GRUB_MOD_NAME): likewise
1508 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1510         gfxpayload support
1512         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1513         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1514         (grub_video_setup): remove
1515         (grub_video_set_mode): new prototype
1516         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1517         (vid_mode): remove
1518         (linux_vesafb_res): compile only on PCBIOS
1519         (grub_linux_boot): support gfxpayload
1520         * loader/i386/pc/xnu.c (video_hook): new function
1521         (grub_xnu_set_video): support gfxpayload
1522         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1523         (DEFAULT_VIDEO_HEIGHT): likewise
1524         (DEFAULT_VIDEO_FLAGS): likewise
1525         (DEFAULT_VIDEO_MODE): new definition
1526         (video_hook): new function
1527         (grub_gfxterm_init): use grub_video_set_mode
1528         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1529         loading xnu
1530         * video/video.c (grub_video_setup): removed
1531         (grub_video_set_mode): new function based on grub_gfxterm_init and
1532         grub_video_setup
1534 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1536         Avoid calling biosdisk in drivemap
1538         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1539         (revparse_biosdisk): likewise
1540         (list_mappings): derive name from id directly
1541         (grub_cmd_drivemap): use tryparse_diskstring
1543 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1545         Script fixes
1547         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1548         (grub_lexer_param): add tokenonhold
1549         (grub_script_create_cmdline): remove cmdline. All callers updated
1550         (grub_script_function_create): make functionname
1551         grub_script_arg. All callers updated
1552         (grub_script_execute_argument_to_string): new prototype
1553         * kern/parser.c (state_transitions): reorder
1554         (grub_parser_cmdline_state): fix a bug and make more compact
1555         * script/sh/execute.c (grub_script_execute_argument_to_string):
1556         make global
1557         (grub_script_execute_cmdline): use new format
1558         * script/sh/function.c (grub_script_function_create): make functionname
1559         grub_script_arg. All callers updated
1560         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1561         (grub_script_yylex): remove
1562         (grub_script_yylex2): renamed to ...
1563         (grub_script_yylex): ...renamed
1564         parse the expressions like a${b}c
1565         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1566         (GRUB_PARSER_TOKEN_VAR): remove
1567         (GRUB_PARSER_TOKEN_NAME): likewise
1568         ("if"): declare as typeless
1569         ("while"): likewise
1570         ("function"): likewise
1571         ("else"): likewise
1572         ("then"): likewise
1573         ("fi"): likewise
1574         (text): remove
1575         (argument): likewise
1576         (script): accept empty scripts and make exit on error
1577         (arguments): use GRUB_PARSER_TOKEN_ARG
1578         (function): likewise
1579         (command): move error handling to script
1580         (menuentry): move grub_script_lexer_ref before
1581         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1582         argument. All callers updated
1584 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1586         Prevent GRUB from probing floppies during boot.
1588         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1589         * commands/search.c (options): Add --no-floppy.
1590         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1591         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1592         --no-floppy when searching for UUIDs.
1594 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1596         Simplify the code duplication in commands/search.c.
1598         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1599         (search_fs): ... this.  Update all users.
1601 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1603         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1605 2009-05-28  Pavel Roskin  <proski@gnu.org>
1607         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1608         Remove the original symlink explicitly.
1610         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1611         just one slash.  That's how grub_fshelp_find_file() does it.
1613 2009-05-26  Pavel Roskin  <proski@gnu.org>
1615         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1616         to `str'.
1618         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1619         possibly unused.
1621 2009-05-25  Christian Franke  <franke@computer.org>
1623         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1624         register.
1625         (grub_atapi_identify): Add wait after drive select.
1626         (grub_ata_identify): Do more strict status register check before
1627         calling grub_atapi_identify ().  Suppress error message if status
1628         register is 0x00 after command failure.  Add status register
1629         check after PIO read to avoid bogus identify due to stuck DRQ.
1630         Thanks to Pavel Roskin for testing.
1631         (grub_device_initialize): Remove unsafe status register check.
1632         Thanks to 'phcoder' for problem report and patch.
1633         Prevent sign extension in debug message.
1635 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1637         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1638         definition file, and functions defined in `normal/menu.c' have had
1639         their prototypes moved to `include/grub/menu.h' for consistency.
1641         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1642         from normal.h.
1643         (grub_menu_get_entry): Likewise.
1644         (grub_menu_get_timeout): Likewise.
1645         (grub_menu_set_timeout): Likewise.
1646         (grub_menu_execute_entry): Likewise.
1647         (grub_menu_execute_with_fallback): Likewise.
1648         (grub_menu_entry_run): Likewise.
1650         * include/grub/normal.h: Re-ordered and grouped function
1651         prototypes by file that the function is defined in.
1652         (grub_menu_execute_callback): Removed; moved to menu.h.
1653         (grub_menu_get_entry): Likewise.
1654         (grub_menu_get_timeout): Likewise.
1655         (grub_menu_set_timeout): Likewise.
1656         (grub_menu_execute_entry): Likewise.
1657         (grub_menu_execute_with_fallback): Likewise.
1658         (grub_menu_entry_run): Likewise.
1659         (grub_menu_addentry): Renamed from this ...
1660         (grub_normal_add_menu_entry): ... to this.
1662         * normal/main.c (grub_menu_addentry): Renamed from this ...
1663         (grub_normal_add_menu_entry): ... to this.
1665         * script/sh/execute.c (grub_script_execute_menuentry): Update
1666         reference to renamed grub_menu_addentry function.
1668 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1670         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1672 2009-05-22  Pavel Roskin  <proski@gnu.org>
1674         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1675         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1676         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1677         compiling for the i386 targets, but not for the utilities.
1679         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1680         to grub_uint8_t.
1681         (grub_root_drive): Likewise.
1682         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1683         remove alignment.
1684         (grub_root_drive): Change size to byte.
1685         (grub_start_addr): Remove.
1686         (grub_end_addr): Likewise.
1687         (grub_apm_bios_info): Likewise.
1689 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1691         * normal/i386: Remove.
1692         * normal/powerpc: Likewise.
1693         * normal/sparc64: Likewise.
1694         * normal/x86_64: Likewise.
1696 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1698         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1699         * loader/i386/linux_trampoline.S: Fix indentation
1700         * loader/i386/xnu_helper.S: Likewise
1702 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1704         Display error messages when parsing a Lua statement fails.
1705         Previously, executing a syntactically invalid statement like
1706         ")foo" or "bar;" would silently fail.
1708         * script/lua/grub_main.c (handle_lua_error): New function.
1709         (grub_lua_parse_line): Improved reporting of Lua parser and
1710         execution errors.
1712 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1714         Remove -Werror which causes build to fail on some systems
1716         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1717         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1718         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1720 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1722         trampoline for linux on 64-bit platform
1724         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1725         loader/i386/efi/linux_trampoline.S
1726         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1727         declaration
1728         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1729         here
1730         * loader/i386/linux_trampoline.S: moved here
1731         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1732         trampoline
1733         (jumpvector): removed
1734         (grub_linux_trampoline_start): new declaration
1735         (grub_linux_trampoline_end): likewise
1736         (grub_linux_boot): use trampoline when on 64-bit platform
1737         * loader/i386/linux.c: likewise
1739 2009-05-16  Pavel Roskin  <proski@gnu.org>
1741         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1742         const to avoid a warning.
1743         (grub_lua_setenv): Likewise.
1744         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1745         lmsg to fix a warning.
1747 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1749         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1750         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1751         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1752         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1753         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1754         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1755         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1756         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1758 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1760         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1762 2009-05-16  Bean  <bean123ch@gmail.com>
1764         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1765         (lua_mod_SOURCES): New variable.
1766         (lua_mod_CFLAGS): Likewise.
1767         (lua_mod_LDFLAGS): Likewise.
1769         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1770         (setjmp_mod_SOURCES): New variable.
1771         (setjmp_mod_CFLAGS): Likewise.
1772         (setjmp_LDFLAGS): Likewise.
1774         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1775         (setjmp_mod_SOURCES): New variable.
1776         (setjmp_mod_CFLAGS): Likewise.
1777         (setjmp_LDFLAGS): Likewise.
1779         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1780         (setjmp_mod_SOURCES): New variable.
1781         (setjmp_mod_CFLAGS): Likewise.
1782         (setjmp_LDFLAGS): Likewise.
1784         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1785         (setjmp_mod_SOURCES): New variable.
1786         (setjmp_mod_CFLAGS): Likewise.
1787         (setjmp_LDFLAGS): Likewise.
1789         * normal/i386/setjmp.S: Moved from here ...
1790         * lib/i386/setjmp.S: ... Moved here
1791         * normal/x86_64/setjmp.S: Moved from here ...
1792         * lib/x86_64/setjmp.S: ... Moved here
1793         * normal/powerpc/setjmp.S: Moved from here ...
1794         * lib/powerpc/setjmp.S: ... Moved here
1795         * normal/sparc64/setjmp.S: Moved from here ...
1796         * lib/sparc64/setjmp.S: ... Moved here
1798         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1799         returns_twice in mingw.
1801         * script/lua/grub_lib.c: New file.
1802         * script/lua/grub_lib.h: Likewise.
1803         * script/lua/grub_lua.h: Likewise.
1804         * script/lua/grub_main.c: Likewise.
1805         * script/lua/lapi.c: Likewise.
1806         * script/lua/lapi.h: Likewise.
1807         * script/lua/lauxlib.c: Likewise.
1808         * script/lua/lauxlib.h: Likewise.
1809         * script/lua/lbaselib.c: Likewise.
1810         * script/lua/lcode.c: Likewise.
1811         * script/lua/lcode.h: Likewise.
1812         * script/lua/ldblib.c: Likewise.
1813         * script/lua/ldebug.c: Likewise.
1814         * script/lua/ldebug.h: Likewise.
1815         * script/lua/ldo.c: Likewise.
1816         * script/lua/ldo.h: Likewise.
1817         * script/lua/ldump.c: Likewise.
1818         * script/lua/lfunc.c: Likewise.
1819         * script/lua/lfunc.h: Likewise.
1820         * script/lua/lgc.c: Likewise.
1821         * script/lua/lgc.h: Likewise.
1822         * script/lua/linit.c: Likewise.
1823         * script/lua/liolib.c: Likewise.
1824         * script/lua/llex.c: Likewise.
1825         * script/lua/llex.h: Likewise.
1826         * script/lua/llimits.h: Likewise.
1827         * script/lua/lmathlib.c: Likewise.
1828         * script/lua/lmem.c: Likewise.
1829         * script/lua/lmem.h: Likewise.
1830         * script/lua/loadlib.c: Likewise.
1831         * script/lua/lobject.c: Likewise.
1832         * script/lua/lobject.h: Likewise.
1833         * script/lua/lopcodes.c: Likewise.
1834         * script/lua/lopcodes.h: Likewise.
1835         * script/lua/loslib.c: Likewise.
1836         * script/lua/lparser.c: Likewise.
1837         * script/lua/lparser.h: Likewise.
1838         * script/lua/lstate.c: Likewise.
1839         * script/lua/lstate.h: Likewise.
1840         * script/lua/lstring.c: Likewise.
1841         * script/lua/lstring.h: Likewise.
1842         * script/lua/lstrlib.c: Likewise.
1843         * script/lua/ltable.c: Likewise.
1844         * script/lua/ltable.h: Likewise.
1845         * script/lua/ltablib.c: Likewise.
1846         * script/lua/ltm.c: Likewise.
1847         * script/lua/ltm.h: Likewise.
1848         * script/lua/lua.h: Likewise.
1849         * script/lua/luaconf.h: Likewise.
1850         * script/lua/lualib.h: Likewise.
1851         * script/lua/lundump.c: Likewise.
1852         * script/lua/lundump.h: Likewise.
1853         * script/lua/lvm.c: Likewise.
1854         * script/lua/lvm.h: Likewise.
1855         * script/lua/lzio.c: Likewise.
1856         * script/lua/lzio.h: Likewise.
1858 2009-05-16  Bean  <bean123ch@gmail.com>
1860         * include/grub/kernel.h (grub_module_header_types): Add type
1861         OBJ_TYPE_CONFIG.
1863         * kern/main.c (grub_load_config): New function.
1864         (grub_main): Call grub_load_config to read boot config.
1866         * grub-mkimage (generate_image): New parameter config_path.
1867         (options): New option --config.
1868         (main): Parse --config option, and pass it to generate_image.
1870 2009-05-14  Christian Franke  <franke@computer.org>
1872         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1873         This fixes build on Cygwin.
1875 2009-05-14  Pavel Roskin  <proski@gnu.org>
1877         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1878         jump.  This saves two bytes, so the typical case of 2 swapped
1879         drives would fit 32 bytes.
1881 2009-05-13  Pavel Roskin  <proski@gnu.org>
1883         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1884         grub_uint32_t to avoid a warning.
1886         * loader/i386/linux.c (allocate_pages): When assigning
1887         real_mode_mem, cast through grub_size_t to fix a warning.  The
1888         code already makes sure that the value would fit a pointer.
1889         (grub_linux_setup_video): Cast render_target->data to
1890         grub_size_t to fix a warning.
1892 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1894         * commands/i386/pc/drivemap.c: New file - implement drivemap
1895         command.
1896         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1897         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1899 2009-05-13  Pavel Roskin  <proski@gnu.org>
1901         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1902         embedding_area_exists.
1904 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1906         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1907         it easier to understand / work with.
1908         Improve warning messages for cases where there's no embedding area,
1909         or when it is too small (or core.img too large).
1911 2009-05-13  Pavel Roskin  <proski@gnu.org>
1913         * loader/i386/pc/multiboot2.c: Add necessary includes for
1914         grub_multiboot2_real_boot().
1916         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1917         PX record is always little-endian.  We only need the lower 2
1918         bytes of the mode.
1920         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1921         facilitate code reuse.
1922         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1923         fixes a warning reported by gcc 4.4.
1925         * kernel/disk.c (grub_disk_read): Use void pointer for the
1926         buffer.
1927         (grub_disk_write): Use const void pointer for the buffer.
1928         Adjust all callers.  Remove unnecessary casts.
1930 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1932         * util/i386/pc/grub-install.in: Update copyright year.
1934 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1936         gptsync
1938         * commands/gptsync.c: new file
1939         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1940         (gptsync_mod_SOURCES): new variable
1941         (gptsync_mod_CFLAGS): likewise
1942         (gptsync_mod_LDFLAGS): likewise
1943         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1944         new definition
1945         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1946         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1947         * conf/i386-ieee1275.rmk: likewise
1948         * conf/i386-pc.rmk: likewise
1949         * conf/powerpc-ieee1275.rmk: likewise
1951 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1953         Fixed grub-emu
1955         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1956         (grub_dl_ref): likewise
1958 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1960         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1961         split in two functions (one for msdos and one for gpt).
1963 2009-05-08  Pavel Roskin  <proski@gnu.org>
1965         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1966         not modified.
1968         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1969         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1970         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1971         nerr variable.
1973 2009-05-08  David S. Miller  <davem@davemloft.net>
1975         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1977 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1979         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1980         existence.
1982 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1984         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1985         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1987 2009-05-05  David S. Miller  <davem@davemloft.net>
1989         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1991 2009-05-05  Pavel Roskin  <proski@gnu.org>
1993         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1994         of grub_dl_ref() and grub_dl_unref().
1995         * commands/parttool.c: Remove preprocessor conditionals around
1996         grub_dl_ref() and grub_dl_unref().
1997         * fs/affs.c: Likewise.
1998         * fs/afs.c: Likewise.
1999         * fs/cpio.c: Likewise.
2000         * fs/ext2.c: Likewise.
2001         * fs/fat.c: Likewise.
2002         * fs/hfs.c: Likewise.
2003         * fs/hfsplus.c: Likewise.
2004         * fs/iso9660.c: Likewise.
2005         * fs/jfs.c: Likewise.
2006         * fs/minix.c: Likewise.
2007         * fs/ntfs.c: Likewise.
2008         * fs/reiserfs.c: Likewise.
2009         * fs/sfs.c: Likewise.
2010         * fs/udf.c: Likewise.
2011         * fs/ufs.c: Likewise.
2012         * fs/xfs.c: Likewise.
2013         * include/grub/dl.h: Likewise.
2014         * loader/xnu.c: Likewise.
2016 2009-05-04  Pavel Roskin  <proski@gnu.org>
2018         * commands/acpi.c: Remove unused variable my_mod.
2019         * partmap/amiga.c: Likewise.
2020         * partmap/apple.c: Likewise.
2021         * partmap/gpt.c: Likewise.
2022         * partmap/pc.c: Likewise.
2023         * partmap/sun.c: Likewise.
2024         * term/gfxterm.c: Likewise.
2025         * term/i386/pc/vesafb.c: Likewise.
2026         * term/i386/pc/vga.c: Likewise.
2028 2009-05-04  David S. Miller  <davem@davemloft.net>
2030         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
2031         pointer args to grub_ieee1275_get_property().
2033         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
2035         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
2036         devices, and do not traverse down under controller nodes.
2038         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
2039         (grub_ofdisk_open): Use it to un-escape "," characters.
2040         * kern/disk.c (find_part_sep): New.
2041         (grub_disk_open): Use it to find the first non-escaped ','
2042         character in the disk name.
2043         * util/ieee1275/devicemap.c (escape_of_path): New.
2044         (grub_util_emit_devicemap_entry): Use it.
2045         * util/sparc64/ieee1275/grub-install.in: Update script to
2046         strip partition specifiers properly by not triggering on
2047         '\' escaped ',' characters.
2049 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
2051         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2052         to 0x300.
2053         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2054         resolutions.
2055         (linux_vesafb_modes): Add a lot of additional modes to the list (based
2056         on documentation from Wikipedia).
2058 2009-05-04  Pavel Roskin  <proski@gnu.org>
2060         * disk/ata.c: Spelling fixes.
2061         * disk/raid.c: Likewise.
2062         * disk/usbms.c: Likewise.
2063         * disk/dmraid_nvidia.c: Likewise.
2064         * kern/ieee1275/openfw.c: Likewise.
2065         * kern/ieee1275/init.c: Likewise.
2066         * kern/ieee1275/cmain.c: Likewise.
2067         * boot/i386/pc/cdboot.S: Likewise.
2068         * video/readers/png.c: Likewise.
2069         * video/i386/pc/vbe.c: Likewise.
2070         * fs/udf.c: Likewise.
2071         * fs/hfs.c: Likewise.
2072         * fs/reiserfs.c: Likewise.
2073         * efiemu/runtime/efiemu.c: Likewise.
2074         * efiemu/main.c: Likewise.
2075         * efiemu/mm.c: Likewise.
2076         * include/grub/elf.h: Likewise.
2077         * include/grub/xnu.h: Likewise.
2078         * include/grub/usbdesc.h: Likewise.
2079         * include/grub/usb.h: Likewise.
2080         * include/grub/script_sh.h: Likewise.
2081         * include/grub/lib/LzmaEnc.h: Likewise.
2082         * include/grub/efiemu/efiemu.h: Likewise.
2083         * include/grub/command.h: Likewise.
2084         * normal/menu.c: Likewise.
2085         * normal/main.c: Likewise.
2086         * normal/datetime.c: Likewise.
2087         * bus/usb/uhci.c: Likewise.
2088         * mmap/i386/uppermem.c: Likewise.
2089         * mmap/mmap.c: Likewise.
2090         * commands/acpi.c: Likewise.
2091         * commands/test.c: Likewise.
2092         * partmap/apple.c: Likewise.
2093         * font/font.c: Likewise.
2094         * loader/sparc64/ieee1275/linux.c: Likewise.
2095         * loader/macho.c: Likewise.
2096         * loader/i386/bsd_trampoline.S: Likewise.
2097         * loader/i386/bsd.c: Likewise.
2098         * loader/xnu.c: Likewise.
2099         * term/i386/pc/vesafb.c: Likewise.
2100         * term/usb_keyboard.c: Likewise.
2101         * util/resolve.c: Likewise.
2102         * util/getroot.c: Likewise.
2104 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
2106         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2108 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
2110         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2111         build error.
2113 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
2115         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2116         parameter only available on BIOS.
2118 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
2120         Removed wrong semicolon in declaration
2122         * grub/misc.h (grub_dprintf): remove semicolon
2124 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
2126         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2127         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2128         is done by grub_cmd_linux() now).
2129         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2130         restore video to text mode.
2131         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2132         indicates lack of "vga=" parameter.  "vga=0" is mapped to
2133         `GRUB_LINUX_VID_MODE_NORMAL'.
2135 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
2137         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2138         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2139         and `normal/script.c'.  Add `kern/rescue_reader.c',
2140         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
2141         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2142         `grub_script.tab.c'.
2144         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2145         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2146         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2147         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2148         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2150         * Makefile.in: Remove duplicated 2008 in Copyright line.
2152 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
2154         * util/misc.c (grub_util_warn): New function.  Emits a warning
2155         unconditionally.
2156         * include/grub/util/misc.h (grub_util_warn): New declaration.
2158         * util/i386/pc/grub-install.in: Understand --force and pass it down
2159         to grub-setup.
2161         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2162         down to setup().
2163         (setup): Improve error messages and add warnings when requested to
2164         install in odd layouts.  Refuse to install using blocklists unless
2165         --force was set.
2167 2009-05-04  martin f. krafft  <madduck@madduck.net>
2169         * disk/raid.c (grub_raid_scan_device): Improve debug message.
2171 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
2173         Updated copyright year
2175         * fs/hfsplus.c: updated copyright year
2177 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
2179         HFS+ UUID
2181         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2182         in the space previously used by unused3
2183         (grub_hfsplus_uuid): new function
2184         (grub_hfsplus_fs): added uuid field
2186 2009-05-03  Pavel Roskin  <proski@gnu.org>
2188         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2189         suppress warnings.  It's no longer needed.
2190         * disk/host.c: Likewise.
2191         * disk/ata_pthru.c: Likewise.
2192         * disk/loopback.c: Likewise.
2193         * hook/datehook.c: Likewise.
2194         * parttool/pcpart.c: Likewise.
2195         * fs/i386/pc/pxe.c: Likewise.
2196         * fs/ntfscomp.c: Likewise.
2197         * efiemu/main.c: Likewise.
2198         * mmap/mmap.c: Likewise.
2199         * commands/crc.c: Likewise.
2200         * commands/hexdump.c: Likewise.
2201         * commands/hdparm.c: Likewise.
2202         * commands/acpi.c: Likewise.
2203         * commands/echo.c: Likewise.
2204         * commands/minicmd.c: Likewise.
2205         * commands/blocklist.c: Likewise.
2206         * commands/memrw.c: Likewise.
2207         * commands/loadenv.c: Likewise.
2208         * commands/usbtest.c: Likewise.
2209         * commands/lsmmap.c: Likewise.
2210         * commands/boot.c: Likewise.
2211         * commands/parttool.c: Likewise.
2212         * commands/configfile.c: Likewise.
2213         * commands/search.c: Likewise.
2214         * commands/ieee1275/suspend.c: Likewise.
2215         * commands/cat.c: Likewise.
2216         * commands/i386/pc/pxecmd.c: Likewise.
2217         * commands/i386/pc/play.c: Likewise.
2218         * commands/i386/pc/halt.c: Likewise.
2219         * commands/i386/pc/vbeinfo.c: Likewise.
2220         * commands/i386/pc/vbetest.c: Likewise.
2221         * commands/lspci.c: Likewise.
2222         * commands/date.c: Likewise.
2223         * commands/handler.c: Likewise.
2224         * commands/ls.c: Likewise.
2225         * commands/test.c: Likewise.
2226         * commands/cmp.c: Likewise.
2227         * commands/efi/loadbios.c: Likewise.
2228         * commands/efi/fixvideo.c: Likewise.
2229         * commands/halt.c: Likewise.
2230         * commands/help.c: Likewise.
2231         * commands/reboot.c: Likewise.
2232         * hello/hello.c: Likewise.
2233         * script/sh/main.c: Likewise.
2234         * loader/xnu.c: Likewise.
2235         * term/terminfo.c: Likewise.
2236         * term/i386/pc/serial.c: Likewise.
2237         * term/usb_keyboard.c: Likewise.
2239 2009-05-03  David S. Miller  <davem@davemloft.net>
2241         * normal/menu.c: Include grub/parser.h
2243 2009-05-03  Pavel Roskin  <proski@gnu.org>
2245         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2246         not char*.
2247         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2248         Suggested by Javier Martín <lordhabbit@gmail.com>
2250         * util/i386/pc/grub-mkrescue.in: Allow for the case when
2251         efiemu??.o doesn't exist.
2252         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
2253         copying.
2255 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
2257         FreeBSD 64-bit support
2259         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2260         and loader/i386/bsd_trampoline.S
2261         (bsd_mod_ASFLAGS): new variable
2262         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2263         (FREEBSD_MODTYPE_KERNEL64): likewise
2264         (grub_bsd64_trampoline_start): likewise
2265         (grub_bsd64_trampoline_end): likewise
2266         (grub_bsd64_trampoline_selfjump): likewise
2267         (grub_bsd64_trampoline_gdt): likewise
2268         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2269         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2270         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2271         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2272         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2273         of "attrib" member
2274         * loader/i386/bsd_pagetable.c: new file
2275         * loader/i386/bsd_trampoline.S: likewise
2276         * loader/i386/bsd.c (ALIGN_QWORD): new macro
2277         (ALIGN_VAR): likewise
2278         (entry_hi): new variable
2279         (kern_end_mdofs): likewise
2280         (is_64bit): likewise
2281         (grub_freebsd_add_meta): use ALIGN_VAR
2282         (grub_e820_mmap): new declaration
2283         (grub_freebsd_add_mmap): new function
2284         (grub_freebsd_add_meta_module): support 64 bit kernels
2285         (grub_freebsd_list_modules): use ALIGN_VAR
2286         (gdt_descriptor): new declaration
2287         (grub_freebsd_boot): support 64 bit kernels
2288         (grub_bsd_elf64_hook): new function
2289         (grub_bsd_load_elf): support elf64
2291 2009-05-03  Bean  <bean123ch@gmail.com>
2293         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2294         after we get the result of if statement.
2296 2009-05-03  Bean  <bean123ch@gmail.com>
2298         * Makefile.in (enable_efiemu): New variable.
2300         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2301         set.
2302         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2303         path.
2304         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2305         path, add -mno-red-zone option.
2306         (efiemu64_s.o): Likewise.
2307         (efiemu64.o): Use macro $^ for source file.
2309         * configure.ac (--enable-efiemu): New option.
2311 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
2313         xnu support
2315         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2316         (pkglib_MODULES): add xnu.mod
2317         (xnu_mod_SOURCES): new variable
2318         (xnu_mod_CFLAGS): likewise
2319         (xnu_mod_LDFLAGS): likewise
2320         (xnu_mod_ASFLAGS): likewise
2321         * conf/i386-pc.rmk: likewise
2322         * conf/x86_64-efi.rmk: likewise
2323         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2324         new declaration
2325         * include/grub/i386/macho.h: new file
2326         * include/grub/i386/xnu.h: likewise
2327         * include/grub/macho.h: likewise
2328         * include/grub/machoload.h: likewise
2329         * include/grub/x86_64/macho.h: likewise
2330         * include/grub/x86_64/xnu.h: likewise
2331         * include/grub/xnu.h: likewise
2332         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2333         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2334         * loader/i386/efi/xnu.c: new file
2335         * loader/i386/pc/xnu.c: likewise
2336         * loader/i386/xnu.c: likewise
2337         * loader/i386/xnu_helper.S: likewise
2338         * loader/macho.c: likewise
2339         * loader/xnu.c: likewise
2340         * loader/xnu_resume.c: likewise
2341         * util/grub-dumpdevtree: likewise
2342         * include/grub/i386/pit.h: include grub/err.h
2343         (grub_pit_wait): export
2344         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2346 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2348         Efiemu
2350         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2351         _linux_efi, linux_efi.
2352         new files in grub-emu
2353         new targets efiemu32.o and efiemu64.o
2354         * loader/linux_normal_efiemu.c: likewise
2355         * loader/i386/efi/linux.c: added preliminary efiemu support
2356         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2357         files to copy
2358         * include/grub/autoefi.h: new file
2359         * include/grub/i386/efiemu.h: likewise
2360         * include/grub/i386/pc/efiemu.h: likewise
2361         * include/grub/efi/api.h: add LL suffix when necessary
2362         new definitions relating to tables
2363         * include/grub/efiemu/efiemu.h: new file
2364         * include/grub/efiemu/runtime.h: likewise
2365         * efiemu/prepare.c: likewise
2366         * efiemu/loadcore_common.c: likewise
2367         * efiemu/loadcore64.c: likewise
2368         * efiemu/runtime/efiemu.sh: likewise
2369         * efiemu/runtime/efiemu.S: likewise
2370         * efiemu/runtime/efiemu.c: likewise
2371         * efiemu/runtime/config.h: likewise
2372         * efiemu/prepare32.c: likewise
2373         * efiemu/main.c: likewise
2374         * efiemu/modules/pnvram.c: likewise
2375         * efiemu/modules/i386: likewise
2376         * efiemu/modules/i386/pc: likewise
2377         * efiemu/modules/acpi.c: likewise
2378         * efiemu/i386/pc/cfgtables.c: likewise
2379         * efiemu/i386/loadcore64.c: likewise
2380         * efiemu/i386/loadcore32.c: likewise
2381         * efiemu/prepare64.c: likewise
2382         * efiemu/loadcore.c: likewise
2383         * efiemu/symbols.c: likewise
2384         * efiemu/mm.c: likewise
2385         * efiemu/loadcore32.c: likewise
2387 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2389         ACPI spoofing
2391         * commands/acpi.c: new file
2392         * commands/i386/pc/acpi.c: likewise
2393         * commands/efi/acpi.c: likewise
2394         * include/grub/acpi.h: likewise
2395         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2396         (acpi_mod_SOURCES): new variable
2397         (acpi_mod_CFLAGS): likewise
2398         (acpi_mod_LDFLAGS): likewise
2399         * conf/i386-efi.rmk: likewise
2400         * conf/x86_64-efi.rmk: likewise
2402 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2404         Missing part from mmap patch
2406         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2407         (grub_mmap_unregister)
2408         (grub_mmap_free_and_unregister): use grub_mmap_register
2410 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2412         Mmap services
2414         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2415         * loader/i386/linux.c (find_mmap_size): likewise
2416         (allocate_pages): likewise
2417         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2418         (grub_fill_multiboot_mmap): likewise
2419         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2420         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2421         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2422         (OPENBSD_MMAP_RESERVED): likewise
2423         * include/grub/i386/pc/memory.h: include grub/memory.h
2424         (grub_lower_mem): removed
2425         (grub_upper_mem): likewise
2426         (GRUB_MACHINE_MEMORY_ACPI): new definition
2427         (GRUB_MACHINE_MEMORY_NVS): likewise
2428         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2429         (GRUB_MACHINE_MEMORY_HOLE): likewise
2430         (grub_machine_mmap_register): likewise
2431         (grub_machine_mmap_unregister): likewise
2432         (grub_machine_get_upper): likewise
2433         (grub_machine_get_lower): likewise
2434         (grub_machine_get_post64): likewise
2435         * include/grub/i386/efi/memory.h: new file
2436         * include/grub/x86_64/efi/memory.h: likewise
2437         * include/grub/efi/memory.h: likewise
2438         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2439         (mmap_mod_SOURCES): new variable
2440         (mmap_mod_LDFLAGS): likewise
2441         (mmap_mod_ASFLAGS): likewise
2442         * conf/i386-coreboot.rmk: likewise
2443         * conf/i386-ieee1275.rmk: likewise
2444         * conf/i386-efi.rmk: likewise
2445         * conf/x86_64-efi.rmk: likewise
2446         * include/grub/types.h (UINT_TO_PTR): new macro
2447         (PTR_TO_UINT32): likewise
2448         (PTR_TO_UINT64): likewise
2449         * include/grub/memory.h: new file
2450         * mmap/i386/pc/mmap.c: likewise
2451         * mmap/i386/pc/mmap_helper.S: likewise
2452         * mmap/i386/uppermem.c: likewise
2453         * mmap/mmap.c: likewise
2454         * mmap/efi/mmap.c: likewise
2455         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2456         grub_upper_mem
2457         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2458         (grub_upper_mem): likewise
2459         (grub_machine_init): don't use grub_upper_mem,
2460         make grub_lower_mem local
2461         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2462         grub_mmap_iterate and grub_mmap_get_upper
2463         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2465 2009-05-02  Bean  <bean123ch@gmail.com>
2467         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2468         script/sh/parser.y.
2469         (pkglib_MODULES): Add normal.mod and sh.mod.
2470         (normal_SOURCES): New variable.
2471         (normal_mod_CFLAGS): Likewise.
2472         (normal_mod_LDFLAGS): Likewise.
2473         (sh_mod_SOURCES): Likewise.
2474         (sh_mod_CFLAGS): Likewise.
2475         (sh_mod_LDFLAGS): Likewise.
2477         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2478         script/sh/lexer.c_DEPENDENCIES.
2479         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2480         kern/rescue_reader.c and kern/rescue_parser.c.
2481         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2482         (grub_emu_SOURCES): Change source files.
2483         (pkglib_MODULES): Remove normal.mod.
2484         (normal_SOURCES): Removed.
2485         (normal_mod_CFLAGS): Likewise.
2486         (normal_mod_LDFLAGS): Likewise.
2487         * conf/i386-coreboot.rmk: Likewise.
2488         * conf/i386-efi.rmk: Likewise.
2489         * conf/i386-ieee1276.rmk: Likewise.
2490         * conf/powerpc-ieee1275.rmk: Likewise.
2491         * conf/sparc64-ieee1275.rmk: Likewise.
2492         * conf/x86_64-efi.rmk: Likewise.
2494         * include/grub/command.h (grub_command_execute): New inline function.
2496         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2498         * include/grub/normal.h: Remove <grub/setjmp.h>.
2499         (grub_fs_module_list): Moved to normal/autofs.c.
2500         (grub_exit_env): Removed.
2501         (grub_command_execute): Likewise.
2502         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2503         parameter script.
2504         (read_command_list): New function declaration.
2505         (read_fs_list): Likewise.
2507         * include/parser.h: Include <grub/reader.h>.
2508         (grub_parser_split_cmdline): Change type of getline parameter.
2509         (grub_parser): New structure.
2510         (grub_parser_class): New variable.
2511         (grub_parser_execute): New function declaration.
2512         (grub_register_rescue_parser): Likewise.
2513         (grub_parser_register): New inline function.
2514         (grub_parser_unregister): Likewise.
2515         (grub_parser_get_current): Likewise.
2516         (grub_parser_set_current): Likewise.
2518         * include/grub/reader.h: New file.
2519         * kern/reader.c: Likewise.
2520         * kern/rescue_parser.c: Likewise.
2521         * kern/rescue_reader.c: Likewise.
2522         * normal/autofs.c: Likewise.
2523         * normal/dyncmd.c: Likewise.
2525         * include/grub/rescue.h: Removed.
2526         * normal/command.h: Likewise.
2528         * include/grub/script.h: Moved to ...
2529         * include/grub/script_sh.h: ... Moved here.
2530         * normal/execute.c: Moved to ...
2531         * script/sh/execute.c: ... Moved here.
2532         * normal/function.c: Moved to ...
2533         * script/sh/function.c: ... Moved here.
2534         * normal/lexer.c: Moved to ...
2535         * script/sh/lexer.c: ... Moved here.
2536         * normal/parser.y: Moved to ...
2537         * script/sh/parser.y: ... Moved here.
2538         * normal/script.c: Moved to ...
2539         * script/sh/script.c: ... Moved here.
2541         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2542         <grub/reader.h>.
2543         (grub_exit_env): Removed.
2544         (fs_module_list): Moved to normal/autofs.c.
2545         (grub_file_getline): Don't handle comment here.
2546         (free_menu): Skip removed field entry->commands.
2547         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2548         script parameter.
2549         (read_config_file): Removed nested parameter, change getline function.
2550         (grub_enter_normal_mode): Removed.
2551         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2552         (read_command_list): Likewise.
2553         (autoload_fs_module): Moved to normal/autofs.c.
2554         (read_fs_list): Likewise.
2555         (reader_nested): New variable.
2556         (grub_normal_execute): Run parser.sh to switch to sh parser.
2557         (grub_cmd_rescue): Removed.
2558         (cmd_normal): Removed.
2559         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2560         rescue command.
2561         (grub_cmdline_run): New function.
2562         (grub_normal_reader_init): Likewise.
2563         (grub_normal_read_line): Likewise.
2564         (grub_env_write_pager): Likewise.
2565         (cmdline): New variable.
2566         (grub_normal_reader): Likewise.
2567         (GRUB_MOD_INIT): Register normal reader and set as current, register
2568         pager hook, register normal command with grub_register_command_prio,
2569         so that it won't show up in command.lst.
2570         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2571         grub_fs_autoload_hook.
2573         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2574         (grub_menu_execute_entry): Replace grub_script_execute with
2575         grub_parser_execute, change parameter to grub_command_execute.
2577         * normal/menu_text.c: Remove <grub/script.h>.
2579         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2580         and <grub/parser.h>.
2581         (run): Change editor_getline to use new parser interface. Change
2582         parameter to grub_command_execute.
2584         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2585         <grub/reader.h> and <grub/parser.h>.
2586         (grub_load_normal_mode): Execute normal command.
2587         (grub_main): Call grub_register_core_commands,
2588         grub_register_rescue_parser and grub_register_rescue_reader, use
2589         grub_reader_loop to enter input loop.
2591         * kern/parser.c (grub_parser_split_cmdline): Change type of
2592         getline parameter.
2593         (grub_parser_class): New variable.
2594         (grub_parser_execute): New function.
2596         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2597         * loader/multiboot2.c: Likewise.
2598         * loader/sparc64/ieee1275/linux.c: Likewise.
2600         * util/grub-emu.c (read_command_list): New dummy function.
2602 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2604         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2605         count to 16 for CCISS and IDA.
2607 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2609         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2610         after waiting for user input.
2612         * loader/i386/linux.c: Include `<grub/normal.h>'.
2613         (grub_cmd_linux): Improve the error message about `ask' mode, by
2614         waiting for user input so it's not missed (we can do this, since
2615         user requested interaction).
2617 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2619         Added missing lst to grub-mkrescue
2621         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2622         and ${input_dir}/parttool.lst
2624 2009-04-30  David S. Miller  <davem@davemloft.net>
2626         * util/hostdisk.c (device_is_wholedisk): New function.
2627         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2628         zero only if device_is_wholedisk() returns true.
2630         * util/hostdisk.c (convert_system_partition_to_system_disk):
2631         Handle virtual disk devices named /dev/vdiskX as found on sparc
2632         and powerpc.
2634         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2635         lettered partition specifier is found, convert to numbered.
2637 2009-04-29  David S. Miller  <davem@davemloft.net>
2639         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2640         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2642         * normal/command.c: Add missing newline at end of file.
2644         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2645         warnings.
2646         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2647         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2648         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2649         ihandles have a 32-bit type but need to be stored in a "void *".
2651 2009-04-28  Pavel Roskin  <proski@gnu.org>
2653         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2654         not disk.  Adjust all dependencies.
2655         (grub_fs_uuid_close): Use grub_device_close(), not
2656         grub_disk_close().
2658         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2659         parent's partition, don't copy it by reference, as it gets freed
2660         on close.
2662 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2664         Preboot hooks support
2666         * commands/boot.c (struct grub_preboot_t): new declaration
2667         (preboots_head): new variable
2668         (preboots_tail): likewise
2669         (grub_loader_register_preboot_hook): new function
2670         (grub_loader_unregister_preboot_hook): likewise
2671         (grub_loader_set): launch preboot hooks
2672         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2673         (grub_loader_register_preboot_hook): new declaration
2674         (grub_loader_unregister_preboot_hook): likewise
2676 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2678         Warning fix
2680         * disk/scsi.c (grub_scsi_open): added missing cast when
2681         calling grub_dprintf
2683 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2685         Bug and warning fixes
2687         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2688         declaration
2689         * commands/test.c (test_parse): fixed bug with file tests and corrected
2690         declaration of find_file
2692 2009-04-26  Pavel Roskin  <proski@gnu.org>
2694         * Makefile.in: Don't install empty manual pages if help2man is
2695         missing.  Use help2man option for output, not shell redirection.
2697 2009-04-26  David S. Miller  <davem@davemloft.net>
2699         * util/grub-mkdevicemap.c (make_device_map): Add missing
2700         NESTED_FUNC_ATTR to process_device().
2702 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2704         Test command
2706         * commands/test.c: rewritten to use bash-like test
2708 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2710         Parttool autoloading and improvements
2712         * Makefile.in (pkglib_DATA): add parttool.lst
2713         (parttool.lst): new target
2714         * genmk.rb: generate parttool-*
2715         (CLEANFILES): add #{parttool}
2716         (PARTTOOLFILES): new variable
2717         * genparttoollist.sh: new file
2718         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2719         (grub_pcpart_type): likewise
2720         * commands/parttool.c (helpmsg): new variable
2721         (grub_cmd_parttool): output help if not enough arguments are supplied
2722         autoload modules
2723         (GRUB_MOD_INIT(parttool)): use helpmsg
2725 2009-04-24  David S. Miller  <davem@davemloft.net>
2727         Avoiding opening same device multiple times in device iterator.
2729         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2730         and use it to build a list of partitions in iterate_disk() and
2731         iterate_partition().
2733         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2734         on disk->data.
2736         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2737         grub_devalias_iterate() result instead of unconditional 0.
2738         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2739         Also, capture hook return value, either directly or via
2740         grub_children_iterate(), and propagate to caller.
2741         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2742         grub_children_iterate): Return value is now 'int' instead of
2743         'grub_err_t'.
2744         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2745         like a proper iterator, stopping when hooks return non-zero.
2746         (grub_devalias_iterate): Likewise.
2748 2009-04-23  David S. Miller  <davem@davemloft.net>
2750         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2752 2009-04-22  David S. Miller  <davem@davemloft.net>
2754         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2755         is larger than address_cells, use that value for address_cells too.
2757         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2758         IEEE1275_MAX_PATH_LEN): Define.
2759         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2760         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2761         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2762         'devtype'.  Explicitly NULL terminate devalias expansion.
2764         * util/sparc64/ieee1275/misc.c: New file.
2765         * util/sparc64/ieee1275/grub-setup.c: New file.
2766         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2767         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2768         * util/sparc64/ieee1275/grub-install.in: New file.
2769         * util/ieee1275/ofpath.c: New file.
2770         * util/ieee1275/devicemap.c: New file.
2771         * util/devicemap.c: New file.
2772         * util/deviceiter.c: New file.
2773         * kern/sparc64/ieee1275/init.c: New file.
2774         * include/grub/util/ofpath.h: New file.
2775         * include/grub/util/deviceiter.h: New file.
2776         * util/grub-mkdevicemap.c: Include deviceiter.h.
2777         Implement using grub_util_emit_devicemap_entry and
2778         grub_util_iterate_devices.
2779         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2780         util/devicemap.c into grub-mkdevicemap
2781         * conf/i386-efi.rmk: Likewise.
2782         * conf/i386-ieee1275.rmk: Likewise.
2783         * conf/i386-pc.rmk: Likewise.
2784         * conf/powerpc-ieee1275.rmk: Likewise.
2785         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2786         images and installation utilities.  Build kernel as image
2787         instead of as elf binary.  Use common rules as much as possible.
2789 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2791         Correct GPT definition
2793         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2794         of "attrib" member
2796 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2798         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2800 2009-04-19  David S. Miller  <davem@davemloft.net>
2802         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2803         (grub_rescue_cmd_linux): Rename to...
2804         (grub_cmd_linux): and fix prototype.
2805         (grub_rescue_cmd_initrd): Rename to...
2806         (grub_cmd_initrd): and fix prototype.
2807         (cmd_linux, cmd_initrd): New.
2808         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2809         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2811 2009-04-17  Pavel Roskin  <proski@gnu.org>
2813         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2814         format.
2815         (grub_ohci_transfer): Likewise.
2817         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2819         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2820         return without a value.  Fix inconsistent indentation.
2822         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2823         match struct grub_fs.
2825         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2826         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2827         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2828         * commands/lspci.c (grub_lspci_iter): Likewise.
2830 2009-04-16  Bean  <bean123ch@gmail.com>
2832         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2833         value.
2835 2009-04-15  Pavel Roskin  <proski@gnu.org>
2837         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2838         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2839         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2840         definitions.
2842 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2844         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2845         that no multiple data or metadata areas are supported and `Unknown
2846         metadata header'.
2848 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2850         Move loader out of the kernel
2852         * kern/loader.c: moved to ...
2853         * commands/boot.c: ... moved here
2854         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2855         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2856         * include/grub/kernel.h (grub_machine_fini): export
2857         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2858         (grub_loader_set): likewise
2859         (grub_loader_unset): likewise
2860         (grub_loader_boot): likewise
2861         * conf/common.rmk: new module boot.mod
2862         (pkglib_MODULES): add boot.mod
2863         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2864         (grub_emu_SOURCES): likewise
2865         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2866         (grub_emu_SOURCES): likewise
2867         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2868         (grub_emu_SOURCES): likewise
2869         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2870         (grub_emu_SOURCES): likewise
2871         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2872         (grub_emu_SOURCES): likewise
2873         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2874         (grub_emu_SOURCES): likewise
2875         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2876         (grub_emu_SOURCES): likewise
2878 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2880         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2882         * kern/misc.c (grub_itoa): Removed function
2883         (grub_ltoa): likewise
2884         (grub_vsprintf): use grub_lltoa
2886 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2888         Restore grub-emu
2890         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2891         * conf/i386-coreboot.rmk: likewise
2892         * conf/i386-ieee1275.rmk: likewise
2893         * conf/powerpc-ieee1275.rmk: likewise
2895 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2897         * INSTALL: Add that `./autogen.sh' needs to be run before
2898         `./configure.'.
2900 2009-04-14  Bean  <bean123ch@gmail.com>
2902         * Makefile.in (pkglib_DATA): Add handler.lst.
2903         (handler.lst): New rule.
2905         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2906         * conf/i386-coreboot.rmk: Likewise.
2907         * conf/i386-ieee1275.rmk: Likewise.
2908         * conf/i386-efi.rmk: Likewise.
2909         * conf/x86_64-efi.rmk: Likewise.
2910         * conf/powerpc-ieee1275.rmk: Likewise.
2911         * conf/sparc64-ieee1275.rmk: Likewise.
2913         * genhandlerlist.sh: New file.
2915         * genmk.rb: Add rules to generate handler.lst.
2917         * include/grub/normal.h (grub_file_getline): New function definition.
2918         (read_handler_list): Likewise.
2919         (free_handler_list): Likewise.
2921         * include/grub/term.h (grub_term_register_input): Add name parameter
2922         for auto generation of handler.lst.
2923         (grub_term_register_output): Likewise.
2925         * normal/handler.c: New file.
2927         * normal/main.c (get_line): Renamed to grub_file_getline.
2928         (read_config_file): Use the newly renamed grub_file_getline.
2929         (read_command_list): Likewise.
2930         (read_fs_list): Likewise.
2931         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2932         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2934         * term/efi/console.c (grub_console_init): Add name parameter for auto
2935         generation of handler.lst.
2936         * term/gfxterm.c: Likewise.
2937         * term/i386/pc/at_keyboard.c: Likewise.
2938         * term/i386/pc/console.c: Likewise.
2939         * term/i386/pc/serial.c: Likewise.
2940         * term/i386/pc/vesafb.c: Likewise.
2941         * term/i386/pc/vga.c: Likewise.
2942         * term/i386/pc/vga_text.c: Likewise.
2943         * term/ieee1275/ofconsole.c: Likewise.
2944         * term/usb_keyboard.c: Likewise.
2946 2009-04-14  Bean  <bean123ch@gmail.com>
2948         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2949         properly with null character.
2951 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2953         * configure: Remove.
2954         * config.h.in: Likewise.
2955         * stamp-h.in: Likewise.
2956         * DISTLIST: Likewise.
2957         * conf/common.mk: Likewise.
2958         * conf/i386-coreboot.mk: Likewise.
2959         * conf/i386-efi.mk: Likewise.
2960         * conf/i386-ieee1275.mk: Likewise.
2961         * conf/i386.mk: Likewise.
2962         * conf/i386-pc.mk: Likewise.
2963         * conf/powerpc-ieee1275.mk: Likewise.
2964         * conf/sparc64-ieee1275.mk: Likewise.
2965         * conf/x86_64-efi.mk: Likewise.
2967         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2968         develop on GRUB.
2970 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2971             David S. Miller  <davem@davemloft.net>
2973         * util/hostdisk.c (make_device_name): Fix buffer length
2974         calculations.
2976 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2978         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2979         <sys/param.h> and <sys/sysctl.h>.
2980         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2981         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2982         opening the device and reset them afterwards.
2984 2009-04-13  Pavel Roskin  <proski@gnu.org>
2986         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2987         Reported by John Stanley <jpsinthemix@verizon.net>
2989 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2991         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2992         that name for menuentries when appropriate.
2994 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2996         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2998 2009-04-13  Robert Millan  <rmh@aybabtu.com>
3000         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
3001         to Linux, simply abort telling the user it's no longer supported.
3003 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
3005         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
3006         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
3007         `freebsd_loadenv' only when devices.hints exist.
3009 2009-04-13  Pavel Roskin  <proski@gnu.org>
3011         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
3013 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
3015         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
3016         partition number.
3017         (grub_drive): Likewise.
3019 2009-04-13  David S. Miller  <davem@davemloft.net>
3021         * kern/sparc64/ieee1275/ieee1275.c: New file.
3022         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
3023         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
3024         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
3025         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
3026         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
3027         grub_ieee1275_alloc_physmem): Declare new exported functions.
3029         * include/grub/sparc64/ieee1275/loader.h: New file.
3030         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3031         * include/grub/sparc64/kernel.h: Likewise.
3032         * loader/sparc64/ieee1275/linux.c: Likewise.
3034         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
3035         (grub_fstest_SOURCES): Likewise.
3037         * util/hostdisk.c (make_device_name): Do not make any assumptions
3038         about the length of drive names.
3040         * kern/dl.c (grub_dl_load_file): Close file immediately when
3041         we are done using it.
3043 2009-04-12  David S. Miller  <davem@davemloft.net>
3045         * kern/misc.c (grub_ltoa): Fix cast when handling negative
3046         values.  Noticed by Pavel Roskin.
3048         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3049         target compiler.
3051         * genmk.rb: Add more flexible image type specification, also
3052         pass --strip-unneeded to objcopy.
3053         * conf/i386-pc.rmk: Use *_FORMAT.
3054         * conf/i386-pc.mk: Rebuilt.
3056         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3057         (OFDISK_HASH_SZ): Define.
3058         (ofdisk_hash): New hash table.
3059         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3060         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3061         instead of device phandle which is not unique.
3063         * kern/sparc64/ieee1275/init.c: Delete, replace with...
3064         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3065         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3066         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3067         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3068         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3069         GRUB_KERNEL_MACHINE_DATA_END): Define.
3070         (grub_kernel_image_size, grub_total_module_size): Declare.
3072 2009-04-12  Pavel Roskin  <proski@gnu.org>
3074          * configure.ac: Change the logic when we check for target tools.
3075          Do it when the target is specified and it's different from the
3076          specified value of the host.
3078 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
3080         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3081         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3082         GNU/kFreeBSD. Check if a device is a character device. Use
3083         DIOCGMEDIASIZE to get the size.
3084         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3085         support for GNU/kFreeBSD.
3086         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3087         is a character device instead of a block device. Add support for
3088         FreeBSD device names.
3090         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3091         is a character device instead of a block device.
3093         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3094         is a character device instead of a block device.
3096 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
3098         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3099         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3100         FreeBSD. Check if a device is a character device. Use
3101         DIOCGMEDIASIZE to get the size.
3102         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3103         support for FreeBSD.
3104         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3105         is a character device instead of a block device. Add support for
3106         FreeBSD device names.
3108         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3109         a character device instead of a block device.
3110         (grub_util_check_char_device): New function.
3112         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3113         a character device instead of a block device.
3115         * include/grub/util/getroot.h (grub_util_check_char_device): New
3116         prototype.
3118 2009-04-11  David S. Miller  <davem@davemloft.net>
3120         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3121         static libgcc.
3122         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3123         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3124         function, if present.
3125         (__bswapdi2): Likewise.
3127         * include/grub/sparc64/ieee1275/boot.h: New file.
3128         * boot/sparc64/ieee1275/boot.S: Likewise.
3129         * boot/sparc64/ieee1275/diskboot.S: Likewise.
3131         * kern/misc.c (grub_ltoa): New function.
3132         (grub_vsprintf): Use it to format 'long' integers.
3134 2009-04-10  David S. Miller  <davem@davemloft.net>
3136         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3137         slots are of type grub_ieee1275_cell_t.
3138         (grub_nand_read): Likewise.
3139         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3140         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3141         macros are used to compare values in arg/ret block of the call.
3142         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3143         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3144         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3145         grub_ieee1275_instance_to_path, grub_ieee1275_write,
3146         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3147         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3148         grub_ieee1275_close, grub_ieee1275_set_property,
3149         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3150         grub_ieee1275_cell_t.
3151         * kern/ieee1275/openfw.c (grub_map): Likewise.
3152         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3153         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3155         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3156         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3157         (grub_devalias_iterate): Likewise.
3159 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
3161         UFS improvements
3163         * fs/ufs.c (INODE_NBLOCKS): new definition
3164         (struct grub_ufs_dirent): added fields for non-BSD dirents
3165         (grub_ufs_get_file_block): fixed double indirect handling
3166         (grub_ufs_lookup_symlink): use more robust way to determine whether
3167         symlink is inline
3168         (grub_ufs_find_file): support for non-BSD dirents
3169         (grub_ufs_dir): support for non-BSD dirents
3171 2009-04-10  Bean  <bean123ch@gnail.com>
3173         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3174         attribute, otherwise the size would be wrong for i386 platform.
3176         * include/grub/pci.h (grub_pci_read_word): New inline function.
3177         (grub_pci_read_byte): Likewise.
3178         (grub_pci_write): Likewise.
3179         (grub_pci_write_word): Likewise.
3180         (grub_pci_write_byte): Likewise.
3182         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3184         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3185         (find_framebuf): Scan pci to locate the frame buffer address.
3187         * commands/efi/fixvideo.c: New file.
3189         * commands/efi/loadbios.c: Likewise.
3191         * commands/memrw.c: Likewise.
3193         * util/grub-dumpbios.in: Likewise.
3195         * conf/common.rmk (grub-dumpbios): New utility.
3196         (pkglib_MODULES): New module memrw.mod.
3197         (memrw_mod_SOURCE): New macro.
3198         (memrw_mod_CFLAGS): Likewise.
3199         (memrw_mod_LDFLAGS): Likewise.
3201         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3202         fixvideo.mod.
3203         (loadbios_mod_SOURCE): New macro.
3204         (loadbios_mod_CFLAGS): Likewise.
3205         (loadbios_mod_LDFLAGS): Likewise.
3206         (fixvideo_mod_SOURCE): Likewise.
3207         (fixvideo_mod_CFLAGS): Likewise.
3208         (fixvideo_mod_LDFLAGS): Likewise.
3210         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3211         fixvideo.mod.
3212         (loadbios_mod_SOURCE): New macro.
3213         (loadbios_mod_CFLAGS): Likewise.
3214         (loadbios_mod_LDFLAGS): Likewise.
3215         (fixvideo_mod_SOURCE): Likewise.
3216         (fixvideo_mod_CFLAGS): Likewise.
3217         (fixvideo_mod_LDFLAGS): Likewise.
3219 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
3221         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3223 2009-04-07  David S. Miller  <davem@davemloft.net>
3225         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3226         support for R_SPARC_OLO10 relocations.  Fix compile warning for
3227         R_SPARC_WDISP30 case.
3228         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3230 2009-04-06  Pavel Roskin  <proski@gnu.org>
3232         * include/grub/misc.h (ARRAY_SIZE): New macro.
3233         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3234         New macro.
3235         * loader/i386/linux.c (allocate_pages): Use free_pages().
3236         (grub_linux_unload): Don't use free_pages().
3237         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3238         wrong index.  Treat all other modes as text modes.
3239         (grub_cmd_linux): Initialize vid_mode unconditionally to
3240         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
3242         * commands/help.c (print_command_help): Use cmd->prio, not
3243         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3245 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
3247         Parttool
3249         * parttool/pcpart.c: new file
3250         * commands/parttool.c: likewise
3251         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3252         (parttool_mod_SOURCES): new variable
3253         (parttool_mod_CFLAGS): likewise
3254         (parttool_mod_LDFLAGS): likewise
3255         (pcpart_mod_SOURCES): likewise
3256         (pcpart_mod_CFLAGS): likewise
3257         (pcpart_mod_LDFLAGS): likewise
3258         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3259         and parttool/pcpart.c
3260         * conf/i386-efi.rmk: likewise
3261         * conf/i386-ieee1275.rmk: likewise
3262         * conf/i386-pc.rmk: likewise
3263         * conf/powerpc-ieee1275.rmk: likewise
3264         * conf/sparc64-ieee1275.rmk: likewise
3265         * conf/x86_64-ieee1275.rmk: likewise
3267 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3269         Support for mtime and further expandability of dir command
3271         * include/grub/lib/datetime.h: moved to ...
3272         * include/grub/datetime.h: ... moved here and added
3273         declaration of grub_unixtime2datetime. All users updated
3274         * include/grub/fs.h: new syntax for dir and mtime functions in
3275         struct grub_fs
3276         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3277         and GRUB_FSHELP_FLAGS_MASK
3278         * commands/ls.c (grub_ls_list_files): Write mtime in long format
3279         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3280         (grub_ext2_mtime): new function
3281         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3282         (grub_hfsplus_mtime): new function
3283         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3284         (GRUB_UFS_ATTR_FILE): likewise
3285         (GRUB_UFS_ATTR_LNK): likewise
3286         (struct grub_ufs_sblock): new fields mtime
3287         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3288         all users updated
3289         (grub_ufs_dir): mtime support
3290         (grub_ufs_mtime): new function
3291         * fs/affs.c (grub_affs_dir): use new dir syntax
3292         * fs/afs.c (grub_afs_dir): likewise
3293         * fs/cpio.c (grub_cpio_dir): likewise
3294         * fs/fat.c (grub_fat_find_dir): likewise
3295         * fs/hfs.c (grub_hfs_dir): likewise
3296         * fs/iso9660.c (grub_iso9660_dir): likewise
3297         * fs/jfs.c (grub_jfs_dir): likewise
3298         * fs/minix.c (grub_minix_dir): likewise
3299         * fs/ntfs.c (grub_ntfs_dir): likewise
3300         * fs/reiserfs.c (grub_reiserfs_dir): likewise
3301         * fs/sfs.c (grub_sfs_dir): likewise
3302         * fs/xfs.c (grub_xfs_dir): likewise
3303         * util/hostfs.c (grub_hostfs_dir): likewise
3304         * lib/datetime.c: moved to ...
3305         * normal/datetime.c: ... moved here
3306         (grub_unixtime2datetime): new function
3307         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3308         * normal/completion.c (iterate_dir): use new dir syntax
3309         * normal/misc.c (grub_normal_print_device_info): tell the
3310         last modification time of a volume
3311         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3312         * conf/common.rmk: added lib/datetime.c to ls.mod
3313         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3314         (normal_mod_SOURCES): likewise
3315         (datetime_mod_SOURCES): Removed lib/datetime.c
3316         * conf/i386-efi.rmk: likewise
3317         * conf/i386-ieee1275.rmk: likewise
3318         * conf/i386-pc.rmk: likewise
3319         * conf/powerpc-ieee1275.rmk: likewise
3320         * conf/sparc64-ieee1275.rmk: likewise
3321         * conf/x86_64-efi.rmk: likewise
3323 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3325         Trim trailing spaces in FAT label and support mtools-like labels
3327         * fs/fat.c (grub_fat_iterate_dir): New function based
3328         on grub_fat_find_dir
3329         (grub_fat_find_dir): use grub_fat_iterate_dir
3330         (grub_fat_label): likewise
3332 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
3334         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3335         and command.h
3336         remove extraneous kernel_elf_HEADERS
3338 2009-04-04  Bean  <bean123ch@gnail.com>
3340         * include/grub/util/misc.h: Add dummy function fsync for mingw.
3342         * util/misc.c: Likewise.
3344 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
3346         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3347         instead of grub_printf.
3349 2009-04-03  Robert Millan  <rmh@aybabtu.com>
3351         * loader/i386/linux.c (grub_linux_setup_video): Fill
3352         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3353         values from `mode info' structure instead of hardcoded
3354         values.
3356 2009-04-01  Pavel Roskin  <proski@gnu.org>
3358         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3359         unused now.
3360         * genmk.rb: Likewise.
3361         * configure.ac: Likewise.
3363 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
3365         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3366         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
3368 2009-04-01  David S. Miller  <davem@davemloft.net>
3370         * normal/sparc64/setjmp.S: Fix setjmp implementation.
3371         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3372         (grub_setjmp): Mark with 'returns_twice' attribute.
3373         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3374         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3375         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3377 2009-04-01  Robert Millan  <rmh@aybabtu.com>
3379         Reapply fix from 2008-07-28 which was accidentally reverted; also
3380         perform the same fix to a similar check in same function.
3382         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3383         with the same number are found, just use issue a warning with
3384         grub_dprintf(), as this error has been reported to be non-fatal.
3386 2009-03-31  Pavel Roskin  <proski@gnu.org>
3388         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3389         for cross-compilation.
3391 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3393         Fix i386-ieee1275 build.
3395         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3396         Remove declaration.
3398 2009-03-30  Pavel Roskin  <proski@gnu.org>
3400         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3401         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3402         zero-terminated, rely only on the strlen value.  Fix comparison
3403         of strings differing in length.
3405 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3407         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3408         checking for abi version.  Improve error messages on BIOS to notify
3409         user about `linux16' command.
3411 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3413         Leak fixes
3415         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3416         in case of collision
3417         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3419 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3421         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3422         set `vid_mode' accordingly.
3423         (grub_linux_boot): Process `vid_mode' and set video mode.
3425 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3427         * util/grub.d/10_linux.in (linux_entry): New function.
3428         Factorize generation of Linux boot entries.
3430 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3432         Make the format of Environment Block plain text. The boot loader
3433         part is not tested well yet.
3435         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3436         (buffer): Removed.
3437         (envblk): Likewise.
3438         (usage): Remove "info" and "clear". Add "unset". Update the
3439         description of "set", as this does not delete variables any
3440         longer.
3441         (create_envblk_file): Complete rewrite.
3442         (open_envblk_file): Likewise.
3443         (cmd_info): Removed.
3444         (cmd_list): Likewise.
3445         (cmd_set): Likewise.
3446         (cmd_clear): Likewise.
3447         (list_variables): New function.
3448         (write_envblk): Likewise.
3449         (set_variables): Likewise.
3450         (unset_variables): Likewise.
3451         (main): Complete rewrite.
3453         * commands/loadenv.c (buffer): Removed.
3454         (envblk): Likewise.
3455         (open_envblk_file): New function.
3456         (read_envblk_file): Complete rewrite.
3457         (grub_cmd_load_env): Likewise.
3458         (grub_cmd_list_env): Likewise.
3459         (struct blocklist): New struct.
3460         (free_blocklists): New function.
3461         (check_blocklists): Likewise.
3462         (write_blocklists): Likewise.
3463         (grub_cmd_save_env): Complete rewrite.
3465         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3466         a plain text signature.
3467         (GRUB_ENVBLK_MAXLEN): Removed.
3468         (struct grub_envblk): Complete rewrite.
3469         (grub_envblk_find): Removed.
3470         (grub_envblk_insert): Likewise.
3471         (grub_envblk_open): New prototype.
3472         (grub_envblk_set): Likewise.
3473         (grub_envblk_delete): Put const to VALUE.
3474         (grub_envblk_iterate): Put const to NAME and VALUE.
3475         (grub_envblk_close): New prototype.
3476         (grub_envblk_buffer): New inline function.
3477         (grub_envblk_size): Likewise.
3479         * lib/envblk.c: Include grub/mm.h.
3480         (grub_env_find): Removed.
3481         (grub_envblk_open): New function.
3482         (grub_envblk_close): Likewise.
3483         (escaped_value_len): Likewise.
3484         (find_next_line): Likewise.
3485         (grub_envblk_insert): Removed.
3486         (grub_envblk_set): New function.
3487         (grub_envblk_delete): Complete rewrite.
3488         (grub_envblk_iterate): Likewise.
3490 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3492         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3493         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3494         variables.  Use 16-bit loader.
3495         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3496         loader.
3497         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3498         (grub_linux16_boot): ... this.  Update all users.
3499         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3500         (grub_linux_boot): ... this.  Update all users.
3502         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3503         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3504         commands to `linux16' and `initrd16'.
3505         (GRUB_MOD_FINI(linux)): Rename to ...
3506         (GRUB_MOD_FINI(linux16)): ... this.
3508 2009-03-24  Pavel Roskin  <proski@gnu.org>
3510         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3511         not just for compilation.
3513 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3515         Move multiboot helper out of kernel
3517         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3518         `loader/i386/multiboot_helper.S'.
3519         * conf/i386-coreboot.rmk: Likewise
3520         * conf/i386-ieee1275.rmk: Likewise
3522         * kern/i386/loader.S: Move multiboot helpers from here...
3523         * loader/i386/multiboot_helper.S: ...moved here
3524         * include/grub/i386/loader.h: Move declarations of multiboot
3525         helpers from here...
3526         * include/grub/i386/multiboot.h: ...moved here
3527         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3529 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3531         * kern/env.c (grub_env_context_open): Added an argument to specify
3532         whether a new context inherits exported variables from current
3533         one. This is useful when making a sandbox to interpret a config
3534         file.
3535         All callers updated.
3537         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3539 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3541         * kern/env.c (grub_env_context_close): Fix memory leaks.
3543 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3545         * normal/main.c (grub_normal_execute): Added an argument
3546         BATCH to specify if an interactive interface should be provided
3547         after reading a config file.
3548         All callers updated.
3549         (read_command_list): Prevent being executed twice.
3550         (read_fs_list): Likewise.
3552         * include/grub/normal.h (grub_normal_execute): Updated the
3553         prototype.
3555 2009-03-22  Pavel Roskin  <proski@gno.org>
3557         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3558         _start.
3559         * kern/i386/pc/startup.S: Likewise.
3560         * kern/i386/efi/startup.S: Likewise.
3561         * kern/i386/ieee1275/startup.S: Likewise.
3562         * kern/i386/coreboot/startup.S: Likewise.
3563         * kern/x86_64/efi/startup.S: Likewise.
3565         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3566         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3567         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3569 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3571         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3573         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3574         limit detection.
3575         Use vaddr of correct segment for entry_point.
3577 2009-03-21  Bean  <bean123ch@gmail.com>
3579         * commands/blocklist.c: Add include file <grub/command.h>, remove
3580         <grub/normal.h> and <grub/arg.h>.
3581         (grub_cmd_blocklist): Use the new command interface.
3582         (GRUB_MOD_INIT): Likewise.
3583         (GRUB_MOD_FINI): Likewise.
3584         * commands/boot.c: Likewise.
3585         * commands/cat.c: Likewise.
3586         * commands/cmp.c: Likewise.
3587         * commands/configfile.c: Likewise.
3588         * commands/crc.c: Likewise.
3589         * commands/echo.c: Likewise.
3590         * commands/halt.c: Likewise.
3591         * commands/handler.c: Likewise.
3592         * commands/hdparm.c: Likewise.
3593         * commands/help.c: Likewise.
3594         * commands/hexdump.c: Likewise.
3595         * commands/loadenv.c: Likewise.
3596         * commands/ls.c: Likewise.
3597         * commands/lsmmap.c: Likewise.
3598         * commands/lspci.c: Likewise.
3599         * commands/loadenv.c: Likewise.
3600         * commands/read.c: Likewise.
3601         * commands/reboot.c: Likewise.
3602         * commands/search.c: Likewise.
3603         * commands/sleep.c: Likewise.
3604         * commands/test.c: Likewise.
3605         * commands/usbtest.c: Likewise.
3606         * commands/videotest.c: Likewise.
3607         * commands/i386/cpuid.c: Likewise.
3608         * commands/i386/pc/halt.c: Likewise.
3609         * commands/i386/pc/play.c: Likewise.
3610         * commands/i386/pc/pxecmd.c: Likewise.
3611         * commands/i386/pc/vbeinfo.c: Likewise.
3612         * commands/i386/pc/vbetest.c: Likewise.
3613         * commands/ieee1275/suspend.c: Likewise.
3614         * disk/loopback.c: Likewise.
3615         * font/font_cmd.c: Likewise.
3616         * hello/hello.c: Likewise.
3617         * loader/efi/appleloader.c: Likewise.
3618         * loader/efi/chainloader.c: Likewise.
3619         * loader/i386/bsd.c: Likewise.
3620         * loader/i386/efi/linux.c: Likewise.
3621         * loader/i386/ieee1275/linux.c: Likewise.
3622         * loader/i386/linux.c: Likewise.
3623         * loader/i386/pc/chainloader.c: Likewise.
3624         * loader/i386/pc/linux.c: Likewise.
3625         * loader/powerpc/ieee1275/linux.c: Likewise.
3626         * loader/multiboot_loader.c: Likewise.
3627         * term/gfxterm.c: Likewise.
3628         * term/i386/pc/serial.c: Likewise.
3629         * term/terminfo.c: Likewise.
3631         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3632         * term/i386/pc/vga.c: Likewise.
3633         * video/readers/jpeg.c: Likewise.
3634         * video/readers/png.c: Likewise.
3635         * video/readers/tga.c: Likewise.
3637         * util/grub-fstest (cmd_loopback): Removed.
3638         (cmd_blocklist): Likewise.
3639         (cmd_ls): Likewise.
3640         (grub_register_command): Likewise.
3641         (grub_unregister_command): Likewise.
3642         (execute_command): Use grub_command_find to locate command and execute
3643         it.
3645         * include/grub/efi/chainloader.h: Removed.
3646         * loader/efi/chainloader_normal.c: Likewise.
3647         * loader/i386/bsd_normal.c: Likewise.
3648         * loader/i386/pc/chainloader_normal.c: Likewise.
3649         * loader/i386/pc/multiboot_normal.c: Likewise.
3650         * loader/linux_normal.c: Likewise.
3651         * loader/multiboot_loader_normal.c: Likewise.
3652         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3654         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3655         and grub_register_command_p1.
3657         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3658         kern/command.c, lib/arg.c and commands/extcmd.c.
3659         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3660         (minicmd_mod_SOURCES): New variable.
3661         (minicmd_mod_CFLAGS): Likewise.
3662         (minicmd_mod_LDFLAGS): Likewise.
3663         (extcmd_mod_SOURCES): Likewise.
3664         (extcmd_mod_CFLAGS): Likewise.
3665         (extcmd_mod_LDFLAGS): Likewise.
3666         (boot_mod_SOURCES): Removed.
3667         (boot_mod_CFLAGS): Likewise.
3668         (boot_mod_LDFLAGS): Likewise.
3670         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3671         kern/corecmd.c.
3672         (kernel_img_HEADERS): Add command.h.
3673         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3674         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3675         and lib/arg.c.
3676         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3677         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3678         remove the corresponding normal mode command.
3679         (normal_mod_SOURCES): Remove normal/arg.c.
3680         * conf/i386-coreboot.rmk: Likewise.
3681         * conf/i386-efi.rmk: Likewise.
3682         * conf/i386-ieee1275.rmk: Likewise.
3683         * conf/powerpc-ieee1275.rmk: Likewise.
3684         * conf/x86_64-efi.rmk: Likewise.
3686         * include/grub/arg.h: Move from here ...
3687         * include/grub/lib/arg.h: ... to here.
3689         * normal/arg.c: Move from here ...
3690         * lib/arg.c: ... to here.
3692         * commands/extcmd.c: New file.
3693         * commands/minicmd.c: Likewise.
3694         * include/grub/command.h: Likewise.
3695         * include/grub/extcmd.h: Likewise.
3696         * kern/command.c: Likewise.
3697         * kern/corecmd.c: Likewise.
3699         * kern/list.c (grub_list_iterate): Return int instead of void.
3700         (grub_list_insert): New function.
3701         (grub_prio_list_insert): Likewise.
3703         * kern/rescue.c (grub_rescue_command): Removed.
3704         (grub_rescue_command_list): Likewise.
3705         (grub_rescue_register_command): Likewise.
3706         (grub_rescue_unregister_command): Likewise.
3707         (grub_rescue_cmd_boot): Move to minicmd.c
3708         (grub_rescue_cmd_help): Likewise.
3709         (grub_rescue_cmd_info): Likewise.
3710         (grub_rescue_cmd_boot): Likewise.
3711         (grub_rescue_cmd_testload): Likewise.
3712         (grub_rescue_cmd_dump): Likewise.
3713         (grub_rescue_cmd_rmmod): Likewise.
3714         (grub_rescue_cmd_lsmod): Likewise.
3715         (grub_rescue_cmd_exit): Likewise.
3716         (grub_rescue_print_devices): Moved to corecmd.c.
3717         (grub_rescue_print_files): Likewise.
3718         (grub_rescue_cmd_ls): Likewise.
3719         (grub_rescue_cmd_insmod): Likewise.
3720         (grub_rescue_cmd_set): Likewise.
3721         (grub_rescue_cmd_unset): Likewise.
3722         (attempt_normal_mode): Use grub_command_find to get normal module.
3723         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3724         commands, remove grub_rescue_register_command calls.
3726         * normal/command.c (grub_register_command): Removed.
3727         (grub_unregister_command): Likewise.
3728         (grub_command_find): Likewise.
3729         (grub_iterate_commands): Likewise.
3730         (rescue_command): Likewise.
3731         (export_command): Moved to corecmd.c.
3732         (set_command): Removed.
3733         (unset_command): Likewise.
3734         (insmod_command): Likewise.
3735         (rmmod_command): Likewise.
3736         (lsmod_command): Likewise.
3737         (grub_command_init): Likewise.
3739         * normal/completion.c (iterate_command): Use cmd->prio to check for
3740         active command.
3741         (complete_arguments): Use grub_extcmd_t structure to find options.
3742         (grub_normal_do_completion): Change function grub_iterate_commands to
3743         grub_command_iterate.
3745         * normal/execute.c (grub_script_execute_cmd): No need to parse
3746         argument here.
3748         * normal/main.c (grub_dyncmd_dispatcher): New function.
3749         (read_command_list): Register unload commands as dyncmd.
3750         (grub_cmd_normal): Use new command interface, register rescue,
3751         unregister normal at entry, register normal, unregister rescue at exit.
3753         * include/grub/list.h (grub_list_test_t): New type.
3754         (grub_list_iterate): Return int instead of void.
3755         (grub_list_insert): New function.
3756         (GRUB_AS_NAMED_LIST_P): New macro.
3757         (GRUB_AS_PRIO_LIST): Likewise.
3758         (GRUB_AS_PRIO_LIST_P): Likewise.
3759         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3760         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3761         (grub_prio_list): New structure.
3762         (grub_prio_list_insert): New function.
3763         (grub_prio_list_remove): New inline function.
3765         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3766         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3767         (GRUB_COMMAND_FLAG_MENU): Likewise.
3768         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3769         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3770         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3771         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3772         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3773         (grub_command): Likewise.
3774         (grub_register_command): Likewise.
3775         (grub_command_find): Likewise.
3776         (grub_iterate_commands): Likewise.
3777         (grub_command_init): Likewise.
3778         (grub_arg_parse): Likewise.
3779         (grub_arg_show_help): Likewise.
3781         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3782         (grub_rescue_unregister_command): Likewise.
3784         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3785         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3786         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3788         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3789         grub_rescue_cmd_initrd.
3790         * include/grub/i386/loader.h: Likewise.
3791         * include/grub/x86_64/loader.h: Likewise.
3793         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3795 2009-03-21  Bean  <bean123ch@gmail.com>
3797         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3798         instead of stat in mingw environment.
3800         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3802         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3804         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3805         AC_CONFIG_LINKS.
3807 2009-03-21  Bean  <bean123ch@gmail.com>
3809         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3810         out of range error.
3812 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3814         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3815         checking inode flags for EXT4_EXTENTS_FLAG.
3817 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3819         * loader/i386/linux.c: Include `<grub/video.h>' and
3820         `<grub/i386/pc/vbe.h>'..
3821         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3822         (grub_linux32_boot): Attempt to configure video settings with
3823         grub_linux_setup_video().
3824         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3825         to avoid grub_console_fini() which would step out of graphical mode
3826         unconditionally.
3828 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3830         Fix build on powerpc.
3831         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3833 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3835         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3836         background image command.
3838 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3840         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3841         (grub_gfxterm_putchar): Extract pairs of identical calls to
3842         draw_cursor out of conditional blocks.
3844 2009-03-11  Pavel Roskin  <proski@gnu.org>
3846         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3847         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3849 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3851         * loader/i386/multiboot_elfxx.c
3852         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3854 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3856         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3857         `kern/handler.c'.
3859 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3861         * loader/i386/multiboot.c (code_size): New variable.
3862         (grub_multiboot): Define offsets by adding to `code_size' rather
3863         than subtracting from `grub_multiboot_payload_size'.  Provide
3864         4-byte alignment to MBI and others by increasing
3865         `boot_loader_name_length' appropriately.
3867         * loader/i386/multiboot_elfxx.c
3868         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3870 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3872         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3873         `fs/ext2.c'.
3875 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3877         Make loader/i386/linux.c usable on i386-pc again.
3879         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3880         memory to heap.
3881         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3882         `#error' stanza.
3884 2009-03-07  Bean  <bean123ch@gmail.com>
3886         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3887         allocation.
3889 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3891         Fix display issue on terminals with screen size other than 80x25
3892         (e.g. gfxterm with resolution higher than 640x480).
3894         * normal/main.c (grub_normal_init_page): Display title text in a
3895         position relative to the center of the terminal instead of relying
3896         on a hardcoded offset.
3898 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3900         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3901         installed.
3903         * Makefile.in (host_kernel): New variable.
3904         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3905         scripts instead of just the windows one.
3906         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3908 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3910         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3911         `kern/handler.c'.
3912         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3913         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3914         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3915         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3916         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3917         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3919 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3921         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3922         or if there's no space for the disk label and print the partition number on a
3923         invalid magic.
3925 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3927         * util/misc.c: Include <time.h>.
3928         (grub_millisleep): New function.
3930 2009-03-04  Bean  <bean123ch@gmail.com>
3932         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3933         another option -mno-red-zone.
3935         * commands/handler.c: Change module description.
3937         * kern/handler.c: Add missing space at the end of description line.
3939         * kern/list.c: Likewise.
3941 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3943         Move more components to the relocation area, and fix mbi pointer
3944         handling to use the destination rather than the origin (thanks to
3945         Vladimir Serbinenko for spotting).
3947         * loader/i386/multiboot.c (mbi_dest): New variable.
3948         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3949         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3950         relocation area.
3952 2009-03-01  Bean  <bean123ch@gmail.com>
3954         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3955         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3956         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3957         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3959         * loader/i386/efi/linux.c (acpi_guid): New variable.
3960         (acpi_guid): Likewise.
3961         (EBDA_SEG_ADDR): New constant.
3962         (LOW_MEM_ADDR): Likewise.
3963         (FAKE_EBDA_SEG): Likewise.
3964         (fake_bios_data): New function.
3965         (grub_linux_boot): Call fake_bios_data.
3967 2009-03-01  Bean  <bean123ch@gmail.com>
3969         * commands/terminal.c: Removed.
3971         * commands/handler.c: New file.
3973         * include/grub/list.h: Likewise.
3975         * include/grub/handler.h: Likewise.
3977         * kern/list.c: Likewise.
3979         * kern/handler.c: Likewise.
3981         * kern/term.h: Include header file <grub/handler.h>.
3982         (grub_term_input): Move next field to the beginning.
3983         (grub_term_output): Likewise.
3984         (grub_term_input_class): New variable.
3985         (grub_term_output_class): Likewise.
3986         (grub_term_register_input): Changed to inline function.
3987         (grub_term_register_output): Likewise.
3988         (grub_term_unregister_input): Likewise.
3989         (grub_term_unregister_output): Likewise.
3990         (grub_term_set_current_input): Likewise.
3991         (grub_term_set_current_output): Likewise.
3992         (grub_term_get_current_input): Likewise.
3993         (grub_term_get_current_output): Likewise.
3994         (grub_term_iterate_input): Removed.
3995         (grub_term_iterate_output): Likewise.
3997         * kern/term.c (grub_term_list_input): Removed.
3998         (grub_term_list_output): Likewise.
3999         (grub_term_input_class): New variable.
4000         (grub_term_output_class): Likewise.
4001         (grub_cur_term_input): Change variable as macro.
4002         (grub_cur_term_output): Likewise.
4003         (grub_term_register_input): Removed.
4004         (grub_term_register_output): Likewise.
4005         (grub_term_unregister_input): Likewise.
4006         (grub_term_unregister_output): Likewise.
4007         (grub_term_set_current_input): Likewise.
4008         (grub_term_set_current_output): Likewise.
4009         (grub_term_iterate_input): Likewise.
4010         (grub_term_iterate_output): Likewise.
4011         (grub_term_get_current_input): Likewise.
4012         (grub_term_get_current_output): Likewise.
4014         * util/grub-editenv.c: Include header file <grub/handler.h>.
4015         (grub_term_get_current_input): Removed.
4016         (grub_term_get_current_output): Likewise.
4017         (grub_term_input_class): New variable.
4018         (grub_term_output_class): Likewise.
4020         * util/grub-fstest.c (grub_term_get_current_input): Removed.
4021         (grub_term_get_current_output): Likewise.
4022         (grub_term_input_class): New variable.
4023         (grub_term_output_class): Likewise.
4025         * util/grub-probe.c (grub_term_get_current_input): Removed.
4026         (grub_term_get_current_output): Likewise.
4027         (grub_term_input_class): New variable.
4028         (grub_term_output_class): Likewise.
4030         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
4031         (grub_term_get_current_output): Likewise.
4032         (grub_term_input_class): New variable.
4033         (grub_term_output_class): Likewise.
4035         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
4036         (terminal_mod_SOURCES): Likewise.
4037         (terminal_mod_CFLAGS): Likewise.
4038         (terminal_mod_LDFLAGS): Likewise.
4040         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4041         handler.c.
4042         (kernel_img_SOURCES): Add list.c and handler.c.
4043         (kernel_img_HEADERS): Add list.h and handler.h.
4045         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4046         handler.c.
4047         (kernel_mod_SOURCES): Add list.c and handler.c.
4048         (kernel_mod_HEADERS): Add list.h and handler.h.
4050         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4051         handler.c.
4052         (kernel_elf_SOURCES): Add list.c and handler.c.
4053         (kernel_elf_HEADERS): Add list.h and handler.h.
4055         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4056         handler.c.
4057         (kernel_elf_SOURCES): Add list.c and handler.c.
4058         (kernel_elf_HEADERS): Add list.h and handler.h.
4060         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4061         handler.c.
4062         (kernel_mod_SOURCES): Add list.c and handler.c.
4063         (kernel_mod_HEADERS): Add list.h and handler.h.
4065         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4066         handler.c.
4067         (kernel_elf_SOURCES): Add list.c and handler.c.
4068         (kernel_elf_HEADERS): Add list.h and handler.h.
4070 2009-02-27  Robert Millan  <rmh@aybabtu.com>
4072         Factorize elf32 / elf64 code in Multiboot loader.  This will
4073         prevent it from getting out of sync again.
4075         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4076         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4077         grub_multiboot_load_elf64): Move from here ...
4078         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4079         grub_multiboot_load_elf): ... to here (new file).
4081 2009-02-27  Robert Millan  <rmh@aybabtu.com>
4083         * util/grub.d/10_linux.in: Rename "single-user mode" to
4084         "recovery mode".
4086 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
4088         Don't leak in SCSI code.
4089         * disk/scsi.c (grub_scsi_close): free `scsi'.
4091 2009-02-27  Robert Millan  <rmh@aybabtu.com>
4093         * loader/i386/pc/multiboot.c: Move from here ...
4094         * loader/i386/multiboot.c: ... to here.  Update all users.
4096 2009-02-27  Robert Millan  <rmh@aybabtu.com>
4098         Patch from Alexandre Bique <bique.alexandre@gmail.com>
4099         * util/i386/pc/grub-setup.c (setup): Fix directory path.
4101 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
4103         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4104         b-tree.
4106 2009-02-27  Robert Millan  <rmh@aybabtu.com>
4108         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4109         `0x' qualifier as 0 when base is specified as parameter).
4111 2009-02-24  Bean  <bean123ch@gmail.com>
4113         * configure.ac: Check for -mcmodel=large in x86_64 target.
4115         * include/grub/efi/api.h (efi_call_10): New macro.
4116         (efi_wrap_10): New function.
4118         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4119         (GRUB_PE32_REL_BASED_HIGH): Likewise.
4120         (GRUB_PE32_REL_BASED_LOW): Likewise.
4121         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4122         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4123         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4124         (GRUB_PE32_REL_BASED_SECTION): Likewise.
4125         (GRUB_PE32_REL_BASED_REL): Likewise.
4126         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4127         (GRUB_PE32_REL_BASED_DIR64): Likewise.
4128         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4130         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4131         issue.
4133         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4134         (efi_wrap_10): New function.
4136         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4138         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4139         MB/MBP model (NV chipset).
4140         (devdata_devs): Add devpath_5 to the list.
4142         * load/i386/efi/linux.c (video_base): Remove variable.
4143         (RGB_MASK): New macro.
4144         (RGB_MAGIC): Likewise.
4145         (LINE_MIN): Likewise.
4146         (LINE_MAX): Likewise.
4147         (FBTEST_STEP): Likewise.
4148         (FBTEST_COUNT): Likewise.
4149         (fb_list): New variable.
4150         (grub_find_video_card): Remove function.
4151         (find_framebuf): New function.
4152         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4153         line length.
4155         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4156         problem for x86_64.
4158 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
4160         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4162         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4163         coding tool name.
4165 2009-02-22  Robert Millan  <rmh@aybabtu.com>
4167         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4168         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4169         in our relocation, instead of using it directly from heap.  Also
4170         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4172 2009-02-21  Robert Millan  <rmh@aybabtu.com>
4174         Implement USB keyboard support (based on patch by Marco Gerards)
4176         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4177         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4178         (usb_keyboard_mod_LDFLAGS): New variables.
4180         * term/usb_keyboard.c: New file.
4182 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
4184         Corrected wrong declaration
4186         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4188 2009-02-14  Christian Franke  <franke@computer.org>
4190         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4191         (grub_lspci_iter): Print class code and programming interface byte.
4193 2009-02-14  Christian Franke  <franke@computer.org>
4195         * gendistlist.sh: Ignore `.svn' directories.
4197 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
4199         * fs/fat.c: Add 2009 to Copyright line.
4201 2009-02-14  Christian Franke  <franke@computer.org>
4203         * commands/hdparm.c: New file.  Provides `hdparm' command
4204         which sends ATA commands via grub_disk_ata_pass_through ().
4206         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4208         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
4209         and <grub/cpu/io.h> to include/grub/ata.h.
4210         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4211         (GRUB_CDROM_SECTOR_SIZE): Remove.
4212         (GRUB_ATA_*): Move to include/grub/ata.h.
4213         (GRUB_ATAPI_*): Likewise.
4214         (enum grub_ata_commands): Likewise.
4215         (enum grub_ata_timeout_milliseconds): Likewise.
4216         (struct grub_ata_device): Likewise.
4217         (grub_ata_regset): Likewise.
4218         (grub_ata_regget): Likewise.
4219         (grub_ata_regset2): Likewise.
4220         (grub_ata_regget2): Likewise.
4221         (grub_ata_check_ready): Likewise.
4222         (grub_ata_wait_not_busy): Remove static, exported in
4223         include/grub/ata.h.
4224         (grub_ata_wait_drq): Likewise.
4225         (grub_ata_pio_read): Likewise.
4227         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
4228         function for hdparm.mod.
4230         * include/grub/ata.h: New file, contains declarations from
4231         disk/ata.c.
4232         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4234         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4235         (grub_disk_ata_pass_through): New exported variable.
4237         * kern/disk.c (grub_disk_ata_pass_through): New variable.
4239 2009-02-13  Colin D Bennett  <colin@gibibit.com>
4241         Support multiple fallback entries, and provide an API to support
4242         executing default+fallback menu entries.  Renamed the `terminal' menu
4243         viewer to `text'.
4245         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4246         variable declaration.
4247         (grub_menu_execute_callback): New structure declaration.
4248         (grub_menu_execute_callback_t): New typedef.
4249         (grub_menu_execute_with_fallback): New function declaration.
4250         (grub_menu_get_entry): Likewise.
4251         (grub_menu_get_timeout): Likewise.
4252         (grub_menu_set_timeout): Likewise.
4254         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4256         * normal/menu.c (grub_wait_after_message): Moved to
4257         `normal/menu_text.c'.
4258         (draw_border): Likewise.
4259         (print_message): Likewise.
4260         (print_entry): Likewise.
4261         (print_entries): Likewise.
4262         (grub_menu_init_page): Likewise.
4263         (get_entry_number): Likewise.
4264         (print_timeout): Likewise.
4265         (run_menu): Likewise.
4266         (grub_menu_execute_entry): Likewise.
4267         (show_text_menu): Likewise.
4268         (get_and_remove_first_entry_number): New function.
4269         (grub_menu_execute_with_fallback): Likewise.
4270         (get_entry): Renamed to ...
4271         (grub_menu_get_entry): .. this and made it global.
4272         (get_timeout): Renamed to ...
4273         (grub_menu_get_timeout): ... this and made it global.
4274         (set_timeout): Renamed to ...
4275         (grub_menu_set_timeout): ... this and made it global.
4276         (grub_normal_terminal_menu_viewer): Renamed to ...
4277         (grub_normal_text_menu_viewer): ... this.
4279         * normal/menu_text.c: New file.  Extracted text-menu-specific code
4280         from normal/menu.c.
4282         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4283         (normal_mod_SOURCES): Likewise.
4285         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4286         (normal_mod_SOURCES): Likewise.
4288         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4289         (normal_mod_SOURCES): Likewise.
4291         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4292         (normal_mod_SOURCES): Likewise.
4294         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4295         (normal_mod_SOURCES): Likewise.
4297         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4298         (normal_mod_SOURCES): Likewise.
4300         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4301         (normal_mod_SOURCES): Likewise.
4303 2009-02-11  Robert Millan  <rmh@aybabtu.com>
4305         * util/grub.d/00_header.in: Update old reference to `font' command.
4307 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
4309         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4311         Based on patch from Javier Martín.
4313 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4315         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4316         to avoid false positives with FAT.
4317         (grub_fstest_SOURCES): Likewise.
4318         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4319         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4320         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4321         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4322         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4323         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4325 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4327         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4328         bpb.version_specific.fat12_or_fat16.fstype and
4329         bpb.version_specific.fat32.fstype.
4331 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4333         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4335 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4337         * Makefile.in (host_os, host_cpu): New variables.
4338         (target_os): Remove.  Update all users.
4340 2009-02-08  Marco Gerards  <marco@gnu.org>
4342         * Makefile.in (enable_grub_emu_usb): New variable.
4343         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4344         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4345         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4346         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4347         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4348         `usbtest.mod' and `usbms.mod'.
4349         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4350         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4351         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4352         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4353         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4354         variables.
4356         * disk/usbms.c: New file.
4358         * include/grub/usb.h: Likewise.
4360         * include/grub/usbtrans.h: Likewise.
4362         * include/grub/usbdesc.h: Likewise.
4364         * bus/usb/usbtrans.c: Likewise.
4366         * bus/usb/ohci.c: Likewise.
4368         * bus/usb/uhci.c: Likewise.
4370         * bus/usb/usbhub.c: Likewise.
4372         * bus/usb/usb.c: Likewise.
4374         * commands/usbtest.c: Likewise.
4376         * util/usb.c: Likewise.
4378         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4380         * configure.ac: Test for libusb presence.
4382         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4384 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
4386         * kern/mm.c: Add more comments.
4388 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4390         Patch from Javier Martín.
4391         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4392         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4394 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4396         * fs/cpio.c: Split tar functionality to ...
4397         * fs/tar.c: ... here (new file).  Update all users.
4399 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4401         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4402         backward-incompatible features.
4404         Based on patch from Javier Martín, with some adjustments.
4406 2009-02-07  Michael Scherer  <misc@mandriva.org>
4408         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4410 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4412         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4413         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4414         after the RAID stuff.
4416 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4418         Fixes problem when running vbetest command as reported by
4419         Vladimir Serbinenko <phcoder@gmail.com>.
4421         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4423 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4425         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4426         /dev/md/NpN style mdraid devices.
4428 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4430         * util/unifont2pff.rb: Remove.
4432 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4434         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4435         `#'.
4437 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4439         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4440         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4441         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4442         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4443         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4444         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4445         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4447 2009-02-02  Christian Franke  <franke@computer.org>
4449         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4451 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4453         * INSTALL: Note that we now require at least autoconf 2.59 and
4454         that LZO is optional.
4456 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4458         Base on patch on bug #24154 created by Tomas Tintera
4459         <trosos@seznam.cz>.
4461         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4463 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4465         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4466         <bero@arklinux.org>.
4468         * normal/parser.y (script_init): Add missing semicolon.
4470 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4472         * normal/main.c: Add include to grub/menu_viewer.h.
4473         (free_menu_entry_classes): Added.
4474         (grub_normal_menu_addentry): Added class property handling.
4475         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4476         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4478         * normal/menu_viewer.c: New file.
4480         * normal/menu.c (run_menu_entry): Renamed to ...
4481         (grub_menu_execute_entry): ... this and made it as global.
4482         (grub_menu_run): Renamed to ...
4483         (show_text_menu): ... this and made it local.
4484         (show_text_menu): Adapt to new function names.
4485         (grub_normal_terminal_menu_viewer): New global variable.
4487         * include/grub/menu.h: New file.
4489         * include/grub/menu_viewer.h: New file.
4491         * include/grub/normal.h: Added include to grub/menu.h.
4492         (grub_menu_entry): Moved to include/grub/menu.h.
4493         (grub_menu_entry_t): Likewise.
4494         (grub_menu): Likewise.
4495         (grub_menu_t): Likewise.
4496         (grub_normal_terminal_menu_viewer): Added.
4497         (grub_menu_execute_entry): Likewise.
4498         (grub_menu_run): Removed.
4500         * DISTLIST: Added include/grub/menu.h.
4501         Added include/grub/menu_viewer.h.
4502         Added normal/menu_viewer.c.
4504 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4506         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4507         arglist for menutitle arguments.
4509         * normal/main.c (grub_normal_menu_addentry): Likewise.
4511         * normal/parser.y (menuentry): Likewise.
4513         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4515         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4516         (grub_script_create_cmdmenu): Likewise.
4518         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4520         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4521         changes.
4523         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4525         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4527         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4529         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4531         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4533         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4535 2009-01-30  Christian Franke  <franke@computer.org>
4537         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4538         in option help text.
4540 2009-01-27  Pavel Roskin  <proski@gnu.org>
4542         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4544 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4546         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4548         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4550         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4551         unregister function.
4553 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4555         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4557         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4559         * util/grub-mkfont.c (usage): Fix typo.
4561         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4563 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4565         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4567         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4569         * kern/misc.c (grub_strcasecmp): New function.
4570         (grub_strcasecmp): Use grub_size_t instead of int for length.
4571         Fix return value.
4572         * include/grub/misc.h: Update function prototypes.
4574 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4576         * configure.ac: Fix cross-compilation check.
4578 2009-01-22  Christian Franke  <franke@computer.org>
4580         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4581         (precision) digit string.  Allow `.format2' without `format1' (width).
4582         Limit input chars for `%s' output to `format2' if specified.  This is
4583         compatible with standard printf ().
4585 2009-01-22  Christian Franke  <franke@computer.org>
4587         * disk/ata.c (grub_ata_wait_status): Replace by ...
4588         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4589         other status bits may be invalid while BSY is asserted.
4590         (grub_ata_check_ready): New function.
4591         (grub_ata_cmd): Removed.
4592         (grub_ata_wait_drq): New function.
4593         (grub_ata_strncpy): Remove inline.
4594         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4595         and error check now done by grub_ata_wait_drq ().
4596         (grub_ata_pio_write): Likewise.
4597         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4598         grub_ata_wait_drq () to wait for data.
4599         (grub_ata_device_initialize): Add status register check to
4600         detect missing SATA slave devices.  Add debug messages.
4601         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4602         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4603         transfer loop by grub_ata_pio_write ().
4604         (grub_ata_identify): Set DEV before check for !BSY. Use
4605         grub_ata_wait_drq () to wait for data.
4606         (grub_ata_setaddress): Set DEV before check for !BSY.
4607         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4608         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4609         command on (size % batch) == 0.  Add missing error check after write of
4610         last block.  Add debug messages.
4611         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4613 2009-01-19  Christian Franke  <franke@computer.org>
4615         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4616         (GRUB_ATAPI_IREASON_*): Likewise.
4617         (grub_ata_pio_write): Fix timeout error return.
4618         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4619         (grub_atapi_wait_drq): New function.
4620         (grub_atapi_packet): New parameter `size'.
4621         Use grub_atapi_wait_drq () and direct write instead of
4622         grub_ata_pio_write ().
4623         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4624         reads the number of bytes requested by the device for each DRQ
4625         assertion.
4626         (grub_atapi_write): Remove old implementation, return not
4627         implemented instead.
4629 2009-01-19  Christian Franke  <franke@computer.org>
4631         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4632         of 512 to calculate data size.
4633         (grub_scsi_read12): Likewise.
4634         (grub_scsi_write10): Likewise.
4635         (grub_scsi_write12): Likewise.
4636         (grub_scsi_read): Adjust size according to blocksize.
4637         Add checks for invalid blocksize and unaligned transfer.
4639 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4641         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4643         * term/gfxterm.c (write_char): Fix background rendering for wide
4644         width glyphs.
4646 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4648         * config.guess: Update to latest version from config git.
4649         * config.sub: Likewise.
4651 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4653         * Makefile.in: Change font compilation to use new grub-mkfont instead
4654         of java version.
4656         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4657         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4658         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4659         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4660         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4661         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4662         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4663         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4664         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4666 2009-01-16  Christian Franke  <franke@computer.org>
4668         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4669         (enum grub_ata_timeout_milliseconds): New enum.
4670         (grub_ata_wait_status): Add parameter milliseconds.
4671         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4672         recovery from timed-out commands.
4673         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4674         return grub_errno instead of REG_ERROR.
4675         (grub_ata_pio_write): Add parameter milliseconds.
4676         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4677         Pass milliseconds to grub_ata_wait_status () and
4678         grub_ata_pio_read ().
4679         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4680         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4681         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4682         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4683         It is not suitable for device detection, because DEV bit is ignored,
4684         the command may run too long, and not all devices set the signature
4685         properly.
4686         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4687         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4688         Fix device selection, DEV bit must be set first to address the registers
4689         of the correct device.
4690         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4691         grub_ata_pio_read/write ().
4692         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4693         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4695 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4697         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4699 2009-01-13  Bean  <bean123ch@gmail.com>
4701         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4703 2009-01-13  Bean  <bean123ch@gmail.com>
4705         * Makefile.in: (enable_grub_mkfont): New variable.
4706         (freetype_cflags): Likewise.
4707         (freetype_libs): Likewise.
4709         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4710         (grub_mkfont_SOURCES): New variable.
4711         (grub_mkfont_CFLAGS): Likewise.
4712         (grub_mkfont_LDFLAGS): Likewise.
4714         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4715         library if `--enable-grub-mkfont' is requested.
4716         (enable_grub_mkfont): New variable.
4717         (freetype_cflags): Likewise.
4718         (freetype_libs): Likewise.
4720         * util/grub-mkfont.c: New file.
4722 2009-01-12  Christian Franke  <franke@computer.org>
4724         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4725         mode check.  Fix setting of compat_use[].
4727 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4729         Update a few copyright years which we forgot to do in 2008 (only for
4730         files whose changes made in 2008 were copyright-significant)
4732         * Makefile.in: Add 2008 to Copyright line.
4733         * disk/ieee1275/ofdisk.c: Likewise.
4734         * disk/efi/efidisk.c: Likewise.
4735         * kern/dl.c: Likewise.
4736         * kern/sparc64/ieee1275/init.c: Likewise.
4737         * kern/mm.c: Likewise.
4738         * kern/efi/mm.c: Likewise.
4739         * boot/i386/pc/boot.S: Likewise.
4740         * genfslist.sh: Likewise.
4741         * fs/iso9660.c: Likewise.
4742         * fs/hfs.c: Likewise.
4743         * fs/jfs.c: Likewise.
4744         * fs/minix.c: Likewise.
4745         * fs/ufs.c: Likewise.
4746         * gensymlist.sh.in: Likewise.
4747         * genkernsyms.sh.in: Likewise.
4748         * include/grub/misc.h: Likewise.
4749         * include/grub/types.h: Likewise.
4750         * include/grub/symbol.h: Likewise.
4751         * include/grub/elf.h: Likewise.
4752         * include/grub/kernel.h: Likewise.
4753         * include/grub/disk.h: Likewise.
4754         * include/grub/dl.h: Likewise.
4755         * include/grub/i386/linux.h: Likewise.
4756         * include/grub/i386/pc/biosdisk.h: Likewise.
4757         * include/grub/efi/api.h: Likewise.
4758         * include/grub/efi/pe32.h: Likewise.
4759         * include/grub/util/misc.h: Likewise.
4760         * normal/execute.c: Likewise.
4761         * normal/arg.c: Likewise.
4762         * normal/completion.c: Likewise.
4763         * normal/lexer.c: Likewise.
4764         * normal/parser.y: Likewise.
4765         * normal/misc.c: Likewise.
4766         * commands/i386/pc/vbeinfo.c: Likewise.
4767         * commands/hexdump.c: Likewise.
4768         * commands/terminal.c: Likewise.
4769         * commands/ls.c: Likewise.
4770         * commands/help.c: Likewise.
4771         * partmap/pc.c: Likewise.
4772         * loader/efi/chainloader.c: Likewise.
4773         * loader/multiboot_loader.c: Likewise.
4774         * loader/i386/pc/multiboot2.c: Likewise.
4775         * term/efi/console.c: Likewise.
4776         * term/i386/pc/serial.c: Likewise.
4777         * util/lvm.c: Likewise.
4778         * util/console.c: Likewise.
4779         * util/i386/efi/grub-mkimage.c: Likewise.
4780         * util/raid.c: Likewise.
4782 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4784         * commands/videotest.c: Removed include to grub/machine/memory.h.
4786         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4787         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4788         (video_mod_SOURCES): Removed.
4789         (video_mod_CFLAGS): Likewise.
4790         (video_mod_LDFLAGS): Likewise.
4791         (gfxterm_mod_SOURCES): Likewise.
4792         (gfxterm_mod_CFLAGS): Likewise.
4793         (gfxterm_mod_LDFLAGS): Likewise.
4794         (videotest_mod_SOURCES): Likewise.
4795         (videotest_mod_CFLAGS): Likewise.
4796         (videotest_mod_LDFLAGS): Likewise.
4797         (bitmap_mod_SOURCES): Likewise.
4798         (bitmap_mod_CFLAGS): Likewise.
4799         (bitmap_mod_LDFLAGS): Likewise.
4800         (tga_mod_SOURCES): Likewise.
4801         (tga_mod_CFLAGS): Likewise.
4802         (tga_mod_LDFLAGS): Likewise.
4803         (jpeg_mod_SOURCES): Likewise.
4804         (jpeg_mod_CFLAGS): Likewise.
4805         (jpeg_mod_LDFLAGS): Likewise.
4806         (png_mod_SOURCES): Likewise.
4807         (png_mod_CFLAGS): Likewise.
4808         (png_mod_LDFLAGS): Likewise.
4810         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4811         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4812         (video_mod_SOURCES): Added.
4813         (video_mod_CFLAGS): Likewise.
4814         (video_mod_LDFLAGS): Likewise.
4815         (videotest_mod_SOURCES): Likewise.
4816         (videotest_mod_CFLAGS): Likewise.
4817         (videotest_mod_LDFLAGS): Likewise.
4818         (bitmap_mod_SOURCES): Likewise.
4819         (bitmap_mod_CFLAGS): Likewise.
4820         (bitmap_mod_LDFLAGS): Likewise.
4821         (tga_mod_SOURCES): Likewise.
4822         (tga_mod_CFLAGS): Likewise.
4823         (tga_mod_LDFLAGS): Likewise.
4824         (jpeg_mod_SOURCES): Likewise.
4825         (jpeg_mod_CFLAGS): Likewise.
4826         (jpeg_mod_LDFLAGS): Likewise.
4827         (png_mod_SOURCES): Likewise.
4828         (png_mod_CFLAGS): Likewise.
4829         (png_mod_LDFLAGS): Likewise.
4830         (gfxterm_mod_SOURCES): Likewise.
4831         (gfxterm_mod_CFLAGS): Likewise.
4832         (gfxterm_mod_LDFLAGS): Likewise.
4834         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4835         grub/machine/console.h.
4837 2009-01-04  Jerone Young  <jerone@gmail.com>
4839         Make on screen instructions clearer
4841         Based on patch created by Jidanni <jidanni@jidanni.org>
4843         * normal/menu.c: print clearer instructions on the screen
4845 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4847         New font engine.
4849         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4850         build system and fixed gfxterm.c to work with different sized fonts.
4852         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4854         * configure: Re-generated.
4856         * DISTLIST: Removed font/manager.c.
4857         Added font/font.c.
4858         Added font/font_cmd.c.
4860         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4861         compilation.
4863         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4865         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4867         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4869         * normal/menu.c: Likewise.
4871         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4872         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4874         * include/grub/font.h: Replaced with new file.
4876         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4877         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4878         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4879         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4880         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4881         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4882         fg_red, fg_green, fg_blue, fg_alpha.
4883         (grub_video_adapter): Removed blit_glyph.
4884         (grub_video_blit_glyph): Removed.
4886         * font/manager.c: Removed file.
4888         * font/font.c: New file.
4890         * font/font_cmd.c: Likewise.
4892         * video/video.c (grub_video_blit_glyph): Removed.
4894         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4895         (grub_video_vbe_map_rgba): Likewise.
4896         (grub_video_vbe_unmap_color_int): Likewise.
4897         (grub_video_vbe_blit_glyph): Removed.
4898         (grub_video_vbe_adapter): Removed blit_glyph.
4900         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4901         (get_pixel): Likewise.
4902         (set_pixel): Likewise.
4904         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4906         * term/gfxterm.c: Adapted to new font engine.
4908         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4910         * term/i386/pc/vga.c: Likewise.
4912         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4914         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4916         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4918         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4920         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4922         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4924         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4926         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4928         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4930         * util/grub.d/00_header.in: Changed to use new loadfont command.
4932         * util/grub-mkconfig_lib.in: Changed font extension.
4934 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4936         * util/getroot.c (grub_util_get_grub_dev): Add support for
4937         /dev/md/dNNpNN style partitionable mdraid devices.
4939 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4941         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4942         at a time limit of the PXE TFTP API correctly.
4943         (grub_pxefs_close): Likewise.
4945 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4947         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4948         grub_ata_device_initialize() calls.
4950 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4952         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4953         iteration failed.
4954         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4956 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4958         Fix build on powerpc-ieee1275.  Based on patch created by
4959         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4960         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4961         `kern/ieee1275/mmap.c'.
4962         * include/grub/powerpc/ieee1275/memory.h: New file.
4964         Provide grub-install on coreboot.
4965         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4966         (grub_install_SOURCES): New variable.
4967         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4968         usable on coreboot.
4970 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4972         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4973         to `grub_term_input_t'.
4974         (grub_term_get_current_output): Change return type to
4975         `grub_term_output_t'.
4977 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4979         Fix breakage on coreboot due to declaration mismatch.
4980         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4981         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4982         grub_vga_text_cls().
4984         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4985         comments.  Avoid copying one more byte than necessary (just in case).
4987         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4988         to 0x200000 (avoids trouble with some OFW implementations, and matches
4989         with the one in Yaboot).
4990         Reported by Manoel Abranches
4992 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4994         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4995         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4997         * util/grub-mkconfig_lib.in (grub_warn): New function.
4998         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4999         warnings, to obtain consistent formatting.
5000         * util/grub.d/00_header.in: Likewise.
5001         * util/update-grub_lib.in: Likewise.
5003         * loader/i386/linux.c (allocate_pages): Fix a warning.
5004         Move comment text to `#error' stanza.
5006         Harmonize ieee1275's grub_available_iterate() with the generic
5007         grub_machine_mmap_iterate() interface (fixes a recently-introduced
5008         build problem on i386-ieee1275):
5009         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
5010         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
5011         parameter `type'.  Update all users of this function.
5012         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5013         `kern/ieee1275/mmap.c'.
5014         * kern/ieee1275/init.c
5015         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
5016         with ...
5017         (grub_machine_mmap_iterate): ... this.
5018         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
5019         return type to `grub_err_t'.  Update all implementations of this
5020         function prototype.
5021         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
5022         Likewise.
5024         Add `lsmmap' command (lists firmware-provided memory map):
5025         * commands/lsmmap.c: New file.
5026         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
5027         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
5028         variables.
5029         * conf/powerpc-ieee1275.rmk: Likewise.
5030         * conf/i386-coreboot.rmk: Likewise.
5031         * conf/i386-ieee1275.rmk: Likewise.
5033 2008-11-19  Robert Millan  <rmh@aybabtu.com>
5035         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
5036         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5037         constraints to initrd allocation (based on code from
5038         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
5039         for Linux to find it.
5041 2008-11-14  Robert Millan  <rmh@aybabtu.com>
5043         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5044         order to cope with duplicate slashes.
5046 2008-11-14  Robert Millan  <rmh@aybabtu.com>
5048         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5049         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
5050         don't want to mess with lower memory, because it is used in the Linux
5051         loader.
5053         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
5054         an appropriate place in lower memory, between 0x10000 and 0x90000,
5055         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
5056         is in our heap (probably as a result of it being corrupted during
5057         decompression).  Add #error instance with comment to explain why this
5058         loader isn't currently usable on PC/BIOS.
5060 2008-11-14  Robert Millan  <rmh@aybabtu.com>
5062         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
5063         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
5065 2008-11-12  Robert Millan  <rmh@aybabtu.com>
5067         Make loader/i386/linux.c buildable on i386-pc (although disabled).
5069         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5070         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5071         from here ...
5072         * include/grub/i386/pc/memory.h: ... to here.
5074 2008-11-12  Robert Millan  <rmh@aybabtu.com>
5076         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5077         split).
5079         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5080         (grub_console_cur_color, grub_console_real_putchar)
5081         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5082         (grub_console_setcolorstate, grub_console_setcolor)
5083         (grub_console_getcolor): Move from here ...
5084         * include/grub/i386/vga_common.h: ... to here (new file).
5086         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5087         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5088         `<grub/i386/io.h>'.
5089         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5090         `<grub/i386/vga_common.h>'.
5092 2008-11-12  Robert Millan  <rmh@aybabtu.com>
5094         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5095         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5096         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5097         variables.
5098         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5099         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5101         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5102         grub_console_init() with call to grub_vga_text_init().
5103         (grub_machine_fini): Replace call to
5104         grub_console_fini() with call to grub_vga_text_fini() and
5105         grub_at_keyboard_fini().
5107         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5108         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5109         (grub_console_setcolorstate, grub_console_setcolor)
5110         (grub_console_getcolor): New function prototypes.
5112         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5113         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5114         (grub_vga_text_setcursor): Static-ize.
5115         (grub_vga_text_term): New structure.
5116         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5118         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5119         (grub_console_cur_color, grub_console_standard_color)
5120         (grub_console_normal_color, grub_console_highlight_color)
5121         (map_char, grub_console_putchar, grub_console_getcharwidth)
5122         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5123         (grub_console_getcolor): Move from here ...
5124         * term/i386/vga_common.c: ... to here (same function names).
5126 2008-11-12  Robert Millan  <rmh@aybabtu.com>
5128         Use newly-added Multiboot support in coreboot.
5130         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5131         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5133         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5134         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5135         (codestart): Store the MBI in `startup_multiboot_info' when we're
5136         being loaded using Multiboot.
5138         * kern/i386/coreboot/init.c (grub_machine_init): Move
5139         grub_at_keyboard_init() call to beginning of function (useful for
5140         debugging).  Call grub_machine_mmap_init() before attempting to use
5141         grub_machine_mmap_iterate().
5142         (grub_lower_mem, grub_upper_mem): Move from here ...
5143         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5144         here (new file).
5146         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5147         function prototype.
5149 2008-11-12  Robert Millan  <rmh@aybabtu.com>
5151         Fix a regression introduced by the at_keyboard.mod split.  Because
5152         some terminals are default on some platforms and non-default on
5153         others, the first terminal being registered determines which is
5154         going to be default.
5156         * kern/term.c (grub_term_register_input): If this is the first
5157         terminal being registered, set it as the current one.
5158         (grub_term_register_output): Likewise.
5160         * term/efi/console.c (grub_console_init): Do not call
5161         grub_term_set_current_output() or grub_term_set_current_input().
5162         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5163         * term/i386/pc/console.c (grub_console_init): Likewise.
5164         (grub_console_fini): Do not call grub_term_set_current_input()
5165         (but leave grub_term_set_current_output() to restore text mode).
5167 2008-11-10  Robert Millan  <rmh@aybabtu.com>
5169         * util/grub.d/00_header.in: Add backward compatibility check for
5170         versions of terminal.mod that don't understand `terminal_input' or
5171         `terminal_output'.
5173 2008-11-09  Robert Millan  <rmh@aybabtu.com>
5175         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5176         `terminal_input' / `terminal_output', not `terminal'.
5178 2008-11-08  Robert Millan  <rmh@aybabtu.com>
5180         * Makefile.in (include_DATA): Fix srcdir=. assumption.
5181         (DISTCLEANFILES): Add `build_env.mk'.
5183 2008-11-08  Robert Millan  <rmh@aybabtu.com>
5185         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5186         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
5187         members.  Update all users.
5188         * util/console.c (grub_ncurses_term): Split in ...
5189         (grub_ncurses_term_input): ... this, and ...
5190         (grub_ncurses_term_output): ... this.  Update all users.
5191         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5193 2008-11-08  Robert Millan  <rmh@aybabtu.com>
5195         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5196         (PKGDATA): Add $(pkgdata_SRCDIR).
5197         (pkglib_BUILDDIR): New variable.
5198         (pkgdata_SRCDIR): New variable.
5199         (build_env.mk): New target.
5200         (include_DATA): New variable.
5201         (install-local): Install $(include_DATA) files in $(includedir).
5203 2008-11-07  Pavel Roskin  <proski@gnu.org>
5205         * gendistlist.sh: Use C locale for sorting to ensure consistent
5206         output on all systems.
5208         * util/grub.d/00_header.in: Remove incorrect space before
5209         "serial".
5211 2008-11-07  Robert Millan  <rmh@aybabtu.com>
5213         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5214         per specification.
5215         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5216         * loader/multiboot_loader.c (find_multi_boot2_header): New function
5217         (based on find_multi_boot1_header).
5218         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5219         using find_multi_boot2_header(), and abort if neither Multiboot or
5220         Multiboot headers were found.
5222 2008-11-07  Robert Millan  <rmh@aybabtu.com>
5224         Modularize at_keyboard.mod:
5226         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5227         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5228         (at_keyboard_mod_LDFLAGS): New variables.
5230         Actual terminal split:
5232         * include/grub/term.h (struct grub_term): Split in ...
5233         (struct grub_term_input): ... this, and ...
5234         (struct grub_term_output): ... this.  Update all users.
5235         (grub_term_set_current): Split in ...
5236         (grub_term_set_current_input): ... this, and ...
5237         (grub_term_set_current_output): ... this.
5238         (grub_term_get_current): Split in ...
5239         (grub_term_get_current_input): ... this, and ...
5240         (grub_term_get_current_output): ... this.
5241         (grub_term_register): Split in ...
5242         (grub_term_register_input): ... this, and ...
5243         (grub_term_register_output): ... this.
5244         (grub_term_unregister): Split in ...
5245         (grub_term_unregister_input): ... this, and ...
5246         (grub_term_unregister_output): ... this.
5247         (grub_term_iterate): Split in ...
5248         (grub_term_iterate_input): ... this, and ...
5249         (grub_term_iterate_output): ... this.
5251         * kern/term.c (grub_term_list): Split in ...
5252         (grub_term_list_input): ... this, and ...
5253         (grub_term_list_output): ... this.  Update all users.
5254         (grub_cur_term): Split in ...
5255         (grub_cur_term_input): ... this, and ...
5256         (grub_cur_term_output): ... this.  Update all users.
5257         (grub_term_set_current): Split in ...
5258         (grub_term_set_current_input): ... this, and ...
5259         (grub_term_set_current_output): ... this.
5260         (grub_term_get_current): Split in ...
5261         (grub_term_get_current_input): ... this, and ...
5262         (grub_term_get_current_output): ... this.
5263         (grub_term_register): Split in ...
5264         (grub_term_register_input): ... this, and ...
5265         (grub_term_register_output): ... this.
5266         (grub_term_unregister): Split in ...
5267         (grub_term_unregister_input): ... this, and ...
5268         (grub_term_unregister_output): ... this.
5269         (grub_term_iterate): Split in ...
5270         (grub_term_iterate_input): ... this, and ...
5271         (grub_term_iterate_output): ... this.
5273         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5274         a check for input and one for output (and only attempt to get keys
5275         from user when input works).
5277         * util/grub-probe.c (grub_term_get_current): Split in ...
5278         (grub_term_get_current_input): ... this, and ...
5279         (grub_term_get_current_output): ... this.
5280         * util/grub-fstest.c: Likewise.
5281         * util/i386/pc/grub-setup.c: Likewise.
5282         * util/grub-editenv.c: Likewise.
5284         Portability adjustments:
5286         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5287         `term/i386/pc/at_keyboard.c'.
5288         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5289         grub_keyboard_controller_init() (now handled by terminal .init).
5290         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5291         grub_at_keyboard_init().
5292         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5293         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5294         at_keyboard.mod via input terminal interface).
5295         * include/grub/i386/coreboot/console.h: Convert into a stub for
5296         `<grub/i386/pc/console.h>'.
5298         Migrate full terminals to new API:
5300         * term/efi/console.c (grub_console_term): Split into ...
5301         (grub_console_term_input): ... this, and ...
5302         (grub_console_term_output): ... this.  Update all users.
5303         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5304         (grub_ofconsole_init): Split into ...
5305         (grub_ofconsole_init_input): ... this, and ...
5306         (grub_ofconsole_init_output): ... this.
5307         (grub_ofconsole_term): Split into ...
5308         (grub_ofconsole_term_input): ... this, and ...
5309         (grub_ofconsole_term_output): ... this.  Update all users.
5310         * term/i386/pc/serial.c (grub_serial_term): Split into ...
5311         (grub_serial_term_input): ... this, and ...
5312         (grub_serial_term_output): ... this.  Update all users.
5313         * term/i386/pc/console.c (grub_console_term): Split into ...
5314         (grub_console_term_input): ... this, and ...
5315         (grub_console_term_output): ... this.  Update all users.
5316         (grub_console_term_input): Only enable it on PC/BIOS platform.
5317         (grub_console_init): Remove grub_keyboard_controller_init() call.
5319         Migrate input terminals to new API:
5321         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5322         `i386' and `i386/pc' to enable build on x86_64 (this driver is
5323         i386-specific anyway).
5324         (grub_console_checkkey): Rename to ...
5325         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
5326         users.
5327         (grub_keyboard_controller_orig): New variable.
5328         (grub_console_getkey): Rename to ...
5329         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
5330         users.
5331         (grub_keyboard_controller_init): Static-ize.  Save original
5332         controller value so that it can be restored ...
5333         (grub_keyboard_controller_fini): ... here (new function).
5334         (grub_at_keyboard_term): New structure.
5335         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5336         functions.
5338         Migrate output terminals to new API:
5340         * term/i386/pc/vga.c (grub_vga_term): Change type to
5341         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5342         members.  Update all users.
5343         * term/gfxterm.c (grub_video_term): Change type to
5344         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5345         members.  Update all users.
5346         * include/grub/i386/pc/console.h (grub_console_checkkey)
5347         (grub_console_getkey): Do not export (no longer needed by gfxterm,
5348         etc).
5350         Migrate `terminal' command and userland tools to new API:
5352         * commands/terminal.c (grub_cmd_terminal): Split into ...
5353         (grub_cmd_terminal_input): ... this, and ...
5354         (grub_cmd_terminal_output): ... this.
5355         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5356         `terminal_input' and `terminal_output'.
5357         * util/grub.d/00_header.in: Adjust `terminal' calls to new
5358         `terminal_input' / `terminal_output' API.
5359         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5360         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5361         provided ${GRUB_TERMINAL}, convert it).
5363 2008-11-04  Robert Millan  <rmh@aybabtu.com>
5365         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
5366         for FreeBSD.
5367         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5369 2008-11-03  Bean  <bean123ch@gmail.com>
5371         * kern/elf.c (grub_elf32_load): Revert to previous code.
5372         (grub_elf64_load): Likewise.
5374         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5376 2008-11-01  Robert Millan  <rmh@aybabtu.com>
5378         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5379         (TARGET_CPPFLAGS): Likewise.
5380         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5382 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
5384         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5386 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5388         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5389         addition of objects until the code is not going to be able to fail.
5391 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5393         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5394         (add a missing NULL check, and correct them by moving the pointer
5395         operations after the actual check).
5397 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5399         * util/i386/pc/grub-install.in: Handle empty string as output from
5400         make_system_path_relative_to_its_root().
5402 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5404         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5405         circular metadata worst case scenario. If the metadata is circular
5406         then copy the wrap in place.
5407         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5408         project lib/format_text/layout.h
5409         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5411 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5413         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5415 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5417         * util/update-grub_lib.in: Mention filename in warning message.
5419 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5421         * NEWS: Update for rename of update-grub to grub-mkconfig.
5423 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5425         * util/update-grub_lib.in: Copy to ...
5426         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5427         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5428         * util/update-grub.in: Rename to ...
5429         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5430         option. Add `--output' option to allow users to specify the generated
5431         configuration file.  Default to stdout.
5432         (update_grub_dir): Rename to ...
5433         (grub_mkconfig_dir): ... this.
5434         (grub_cfg): Default to an empty string.
5435         * conf/common.rmk (update-grub): Rename to ...
5436         (grub-mkconfig): ... this.
5437         (update-grub_lib): Copy to ...
5438         (grub-mkconfig_lib): ... this.
5439         (update-grub_SCRIPTS): Copy to ...
5440         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5441         (update-grub_DATA): Rename to ...
5442         (grub-mkconfig_DATA): ... this.
5444 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5446         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5447         to `modified'.  Add the real `created' field.
5448         (grub_iso9660_uuid): Use `modified' rather than `created' for
5449         constructing the UUID.
5451 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5453         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5454         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5456 2008-09-28  Bean  <bean123ch@gmail.com>
5458         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5459         Thanks to Christian Franke for finding this bug.
5461 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5463         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5464         instances of grub_util_get_disk_name() (see previous commit).
5466 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5468         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5469         `util/i386/get_disk_name.c'.
5470         * conf/i386-efi.rmk: Likewise.
5471         * conf/x86_64-efi.rmk: Likewise.
5472         * conf/i386-coreboot.rmk: Likewise.
5473         * conf/i386-ieee1275.rmk: Likewise.
5474         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5475         `util/ieee1275/get_disk_name.c'.
5476         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5477         * util/ieee1275/get_disk_name.c: Remove file.
5478         * util/i386/get_disk_name.c: Remove file.
5479         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5480         "hd%d" for device.map entries, rather than using
5481         grub_util_get_disk_name().
5483 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5485         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5486         warning.
5487         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5489 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5491         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5492         Changed to 0x5100.
5493         (GRUB_TERM_PPAGE): Changed to 0x4900.
5495 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5497         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5498         macros (they were i386-pc specific).
5499         * include/grub/sparc64/ieee1275/console.h: Likewise.
5500         * include/grub/efi/console.h: Likewise.
5502 2008-09-22  Bean  <bean123ch@gmail.com>
5504         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5505         resident and in attribute list.
5507         * include/grub/ntfs.h (BMP_LEN): Removed.
5509 2008-09-22  Bean  <bean123ch@gmail.com>
5511         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5512         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5514         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5515         error occurs, as grub_disk_open will call grub_disk_close, which will
5516         call p->close (scsi).
5518 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5520         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5521         (AC_PREREQ): Bumped to 2.59.
5522         (AC_TRY_COMPILE): Replace obsolete macro with ...
5523         (AC_COMPILE_IFELSE): ... this.
5524         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5525         (AC_LINK_IFELSE): ... this.
5527 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5529         * autogen.sh: Add a call to `gendistlist.sh'.
5531 2008-09-19  Christian Franke  <franke@computer.org>
5533         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5534         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5535         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5536         Export __enable_execute_stack() to modules.
5537         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5538         New function.
5540 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5542         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5543         Sort the list.
5545 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5547         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5548         #include <grub/util/hostdisk.h>.
5550 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5552         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5553         segments when their filesz is zero (grub_file_read() interprets
5554         zero-size as "read until EOF", which results in memory corruption).
5555         Use `lowest_segment' rather than 0 for calculating the current
5556         segment load address.
5558 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5560         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5561         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5562         clobbered useful information.
5564 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5566         * include/grub/util/biosdisk.h: Move to ...
5567         * include/grub/util/hostdisk.h: ... here.  Update all users.
5568         * util/biosdisk.c: Move to ...
5569         * util/hostdisk.c: ... here.  Update all users.
5571 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5573         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5574         variables.
5575         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5576         and length can be stored directly in the `mbi->mmap_addr' and
5577         `mbi->mmap_length' struct fields.
5579 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5581         * conf/i386.rmk: New file.  Provides declaration for building
5582         `cpuid.mod'.
5583         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5584         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5585         variables.
5586         Include `conf/i386.mk'.
5587         * conf/i386-efi.rmk: Likewise.
5588         * conf/x86_64-efi.rmk: Likewise.
5589         * conf/i386-coreboot.rmk: Likewise.
5590         * conf/i386-ieee1275.rmk: Likewise.
5592 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5594         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5595         Adds optimization support for BGR based modes.
5597         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5598         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5599         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5600         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5601         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5602         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5603         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5604         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5605         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5606         (grub_video_i386_vbeblit_index_index): Likewise.
5607         (grub_video_i386_vbeblit_replace_directN): Added.
5608         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5609         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5610         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5611         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5612         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5613         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5614         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5615         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5616         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5617         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5618         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5619         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5620         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5622         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5623         (grub_video_i386_vbefill_R8G8B8): Likewise.
5624         (grub_video_i386_vbefill_index): Likewise.
5625         (grub_video_i386_vbefill_direct32): Added.
5626         (grub_video_i386_vbefill_direct24): Likewise.
5627         (grub_video_i386_vbefill_direct16): Likewise.
5628         (grub_video_i386_vbefill_direct8): Likewise.
5630         * include/grub/video.h (grub_video_blit_format): Removed
5631         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5632         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5633         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5634         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5635         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5637         * video/video.c (grub_video_get_blit_format): Updated to use new
5638         blit formats.  Added handling for 16 bit color modes.
5640         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5641         fillers.
5642         (common_blitter): Updated to use new blitters.
5644         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5645         Removed.
5646         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5647         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5648         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5649         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5650         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5651         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5652         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5653         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5654         (grub_video_i386_vbeblit_index_index): Likewise.
5655         (grub_video_i386_vbeblit_replace_directN): Added.
5656         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5657         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5658         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5659         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5660         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5661         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5662         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5663         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5664         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5665         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5666         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5667         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5668         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5670         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5671         (grub_video_i386_vbefill_R8G8B8): Likewise.
5672         (grub_video_i386_vbefill_index): Likewise.
5673         (grub_video_i386_vbefill_direct32): Added.
5674         (grub_video_i386_vbefill_direct24): Likewise.
5675         (grub_video_i386_vbefill_direct16): Likewise.
5676         (grub_video_i386_vbefill_direct8): Likewise.
5678         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5679         types.
5681         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5682         types.
5684         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5685         blitter types.
5687         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5688         types.
5690 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5692         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5693         RAID level 1.
5695 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5697         * fs/iso9660.c (grub_iso9660_date): New structure.
5698         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5699         (grub_iso9660_uuid): New function.
5701 2008-09-05  Bean  <bean123ch@gmail.com>
5703         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5705         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5706         insensitive bit for names in Win32 and Win32 & DOS namespace.
5708         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5710         * include/grub/types.h (LONG_MAX): Likewise.
5712 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5714         * util/getroot.c: Include <config.h>.
5715         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5716         add support for /dev/md/N devices and handle LVM double dash escaping.
5718 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5720         * config.guess: Update to latest version from config git.
5721         * config.sub: Likewise.
5723 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5725         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5726         `disk->total_sectors'.
5728 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5730         * include/grub/normal.h: Fixed incorrect comment for
5731         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5733 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5735         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5736         values with defines.
5738         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5739         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5740         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5741         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5742         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5743         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5744         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5745         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5746         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5747         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5748         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5749         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5750         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5751         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5752         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5753         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5754         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5755         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5756         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5758 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5760         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5761         declaration.
5762         (grub_multiboot): Fix a few warnings.
5764 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5766         * loader/i386/pc/multiboot.c: Update comment not to say that
5767         boot_device support is unimplemented.
5769 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5771         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5772         or memory map support are unimplemented.
5774 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5776         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5778 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5780         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5781         total video memory in 'vbeinfo' output; show color format details for
5782         each video mode.
5784 2008-08-30  Pavel Roskin  <proski@gnu.org>
5786         * util/genmoddep.c: Remove for real this time.
5787         * DISTLIST: Remove util/genmoddep.c.
5789 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5791         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5792         as required by Multiboot spec (it was already 4-byte aligned, but
5793         only by chance).
5795 2008-08-29  Pavel Roskin  <proski@gnu.org>
5797         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5798         * kern/powerpc/ieee1275/startup.S: ... this.
5799         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5800         * DISTLIST: Likewise.
5802         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5803         grub/cpu/kernel.h.  Add start label for consistency with other
5804         platforms.  Add grub_prefix immediately after start.  Add jump
5805         to the code after grub_prefix.
5806         * include/grub/powerpc/kernel.h: Provide valid values for
5807         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5809 2008-08-29  Bean  <bean123ch@gmail.com>
5811         * configure.ac: Change host_os to cygwin for mingw.
5812         (asprintf): New check for function.
5814         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5815         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5817         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5818         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5819         sync, sleep and grub_util_get_disk_size for mingw.
5821         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5822         to get size in mingw.
5823         (open_device): Use flag O_BINARY if it's defined.
5824         (find_root_device): Add dummy code for mingw.
5826         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5827         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5828         (get_scsi_disk_name): Return 0 for mingw.
5830         * util/hostfs.c: #include <grub/util/misc.h>.
5831         (grub_hostfs_open): Use "rb" flag to open file, use
5832         grub_util_get_disk_size to get disk size for mingw.
5834         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5835         (asprintf): New function if HAVE_ASPRINTF is not set.
5836         (sync): New function for mingw.
5837         (sleep): Likewise.
5838         (grub_util_get_disk_size): Likewise.
5840 2008-08-28  Pavel Roskin  <proski@gnu.org>
5842         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5843         kern/time.c.
5845 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5847         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5849 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5851         Change find_grub_drive() syntax so it doesn't prevent it from
5852         detecting NULL names as errors.
5854         * util/biosdisk.c (find_grub_drive): Move free slot search code
5855         from here ...
5856         (find_free_slot): ... to here.
5857         (read_device_map): Use find_free_slot() to search for free slots.
5859 2008-08-27  Marco Gerards  <marco@gnu.org>
5861         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5862         (scsi_mod_SOURCES): New variable.
5863         (scsi_mod_CFLAGS): Likewise
5864         (scsi_mod_LDFLAGS): Likewise.
5866         * disk/scsi.c: New file.
5868         * include/grub/scsi.h: Likewise.
5870         * include/grub/scsicmd.h: Likewise.
5872         * disk/ata.c: Include <grub/scsi.h>.
5873         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5874         instead.
5875         (grub_ata_iterate): Skip ATAPI devices.
5876         (grub_ata_open): Only handle ATAPI devices.
5877         (struct grub_atapi_read): Removed.
5878         (grub_atapi_readsector): Likewise.
5879         (grub_ata_read): No longer handle ATAPI devices.
5880         (grub_ata_write): Likewise.
5881         (grub_atapi_iterate): New function.
5882         (grub_atapi_read): Likewise.
5883         (grub_atapi_write): Likewise.
5884         (grub_atapi_open): Likewise.
5885         (grub_atapi_close): Likewise.
5886         (grub_atapi_dev): New variable.
5887         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5888         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5890         * include/grub/disk.h (enum grub_disk_dev_id): Add
5891         `GRUB_DISK_DEVICE_SCSI_ID'.
5893 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5895         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5896         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5897         descriptive.
5899 2008-08-23  Bean  <bean123ch@gmail.com>
5901         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5902         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5903         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5904         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5905         dm_nv.mod.
5906         (raid5rec_mod_SOURCES): New macro.
5907         (raid5rec_mod_CFLAGS): Likewise.
5908         (raid5rec_mod_LDFLAGS): Likewise.
5909         (raid6rec_mod_SOURCES): Likewise.
5910         (raid6rec_mod_CFLAGS): Likewise.
5911         (raid6rec_mod_LDFLAGS): Likewise.
5912         (mdraid_mod_SOURCES): Likewise.
5913         (mdraid_mod_CFLAGS): Likewise.
5914         (mdraid_mod_LDFLAGS): Likewise.
5915         (dm_nv_mod_SOURCES): Likewise.
5916         (dm_nv_mod_CFLAGS): Likewise.
5917         (dm_nv_mod_LDFLAGS): Likewise.
5919         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5920         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5921         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5923         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5924         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5926         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5928         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5930         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5932         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5934         * disk/raid5_recover.c: New file.
5936         * disk/raid6_recover.c: Likewise.
5938         * disk/mdraid_linux.c: Likewise.
5940         * disk/dmraid_nvidia.c: Likewise.
5942         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5943         ULONG_MAX.
5945         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5946         calculate the size of raid device.
5947         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5948         different layout of raid5.
5949         (grub_raid_scan_device): Remove code specific to mdraid.
5950         (grub_raid_list): New variable.
5951         (free_array): New function.
5952         (grub_raid_register): Likewise.
5953         (grub_raid_unregister): Likewise.
5954         (grub_raid_rescan): Likewise.
5955         (GRUB_MOD_INIT): Don't iterate device here.
5956         (GRUB_MOD_FINI): Use free_array to release resource.
5958         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5959         (grub_raid5_recover_func_t): New function variable type.
5960         (grub_raid6_recover_func_t): Likewise.
5961         (grub_raid5_recover_func): New variable.
5962         (grub_raid6_recover_func): Likewise.
5963         (grub_raid_register): New function.
5964         (grub_raid_unregister): Likewise.
5965         (grub_raid_rescan): Likewise.
5966         (grub_raid_block_xor): Likewise.
5968         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5969         (CMD_CRC): New macro.
5970         (part): Removed.
5971         (read_file): Handle device as well as file.
5972         (cmd_crc): New function.
5973         (fstest): Handle multiple disks.
5974         (options): Remove part, raw and long, add root and diskcount.
5975         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5976         (main): Find the first non option entry and ignore subsequent options,
5977         add handling for the new options, support multiple disks.
5979         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5981 2008-08-23  Bean  <bean123ch@gmail.com>
5983         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5985         * genfslist.sh: Ignore kernel.mod.
5987         * genpartmaplist.sh: Likewise.
5989 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5991         * util/getroot.c (find_root_device): Skip anything that starts with
5992         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5994 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5996         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5997         * util/grub.d/00_header.in: Allow the administrator to change default
5998         gfxmode via ${GRUB_GFXMODE}.
6000 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
6002         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
6004 2008-08-21  Robert Millan  <rmh@aybabtu.com>
6006         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
6007         loader.
6008         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
6009         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
6011 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
6013         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
6014         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
6016 2008-08-19  Robert Millan  <rmh@aybabtu.com>
6018         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
6019         (struct grub_virtual_screen): Remove `cursor_color'.
6020         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
6021         initialization.
6022         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
6024 2008-08-18  Robert Millan  <rmh@aybabtu.com>
6026         Unify (identical) linux_normal.c files.
6027         * loader/i386/efi/linux_normal.c: Move from here ...
6028         * loader/linux_normal.c: ... to here.  Update all users.
6029         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
6030         * loader/i386/ieee1275/linux_normal.c: Likewise.
6032 2008-08-18  Robert Millan  <rmh@aybabtu.com>
6034         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
6035         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
6036         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
6037         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
6038         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
6039         New macros.
6040         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6041         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6042         (GRUB_LINUX_CL_END_OFFSET): ... to here.
6043         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6044         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
6045         (GRUB_EFI_CL_END_OFFSET): Rename to ...
6046         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
6047         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6048         Initialize `params->video_cursor_x' and `params->video_cursor_y'
6049         portably using grub_getxy().
6050         Replace `-EFI' with `-bzImage' in boot message.
6052 2008-08-17  Robert Millan  <rmh@aybabtu.com>
6054         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6056 2008-08-17  Robert Millan  <rmh@aybabtu.com>
6058         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6060         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6061         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6062         (grub_machine_mmap_iterate): New function declaration.
6063         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6064         structure.
6065         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6066         macros.
6068         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6069         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6070         Move e820 parsing from here ...
6071         * kern/i386/pc/mmap.c: New file.
6072         (grub_machine_mmap_iterate): ... to here.
6074         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6075         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6076         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
6077         (grub_available_iterate): Redeclare to return `void', and redeclare
6078         its hook to use grub_uint64_t as addr and size parameters, and rename
6079         to ...
6080         (grub_machine_mmap_iterate): ... this.  Update all users.
6082         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6083         to make it more readable.  Rename to ...
6084         (grub_machine_mmap_iterate): ... this.
6086         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6087         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6088         (grub_multiboot): Allocate an extra region after the payload, and fill
6089         it with a Multiboot memory map.  Adjust a.out loader to calculate size
6090         with the extra space.
6091         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6092         with the extra space.
6094 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
6096         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
6098 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
6100         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6101         mdate-sh to the list `find' searches for.
6102         * DISTLIST: Regenerated.
6104 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
6106         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6107         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
6108         genmoddep.awk, gensymlist.sh.in.
6109         (DISTDIRS): Add bus, docs, hook, lib.
6110         * DISTLIST: Regenerated.
6111         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
6113 2008-08-16  Robert Millan  <rmh@aybabtu.com>
6115         * disk/raid.c (grub_raid_init): Handle/report errors set by
6116         grub_device_iterate().
6117         * disk/lvm.c (grub_lvm_init): Likewise.
6119 2008-08-15  Bean  <bean123ch@gmail.com>
6121         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6122         and datehook.mod.
6123         (datetime_mod_SOURCES): New macro.
6124         (datetime_mod_CFLAGS): Likewise.
6125         (datetime_mod_LDFLAGS): Likewise.
6126         (date_mod_SOURCES): Likewise.
6127         (date_mod_CFLAGS): Likewise.
6128         (date_mod_LDFLAGS): Likewise.
6129         (datehook_mod_SOURCES): Likewise.
6130         (datehook_mod_CFLAGS): Likewise.
6131         (datehook_mod_LDFLAGS): Likewise.
6133         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6134         and datehook.mod.
6135         (datetime_mod_SOURCES): New macro.
6136         (datetime_mod_CFLAGS): Likewise.
6137         (datetime_mod_LDFLAGS): Likewise.
6138         (date_mod_SOURCES): Likewise.
6139         (date_mod_CFLAGS): Likewise.
6140         (date_mod_LDFLAGS): Likewise.
6141         (datehook_mod_SOURCES): Likewise.
6142         (datehook_mod_CFLAGS): Likewise.
6143         (datehook_mod_LDFLAGS): Likewise.
6145         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6146         and datehook.mod.
6147         (datetime_mod_SOURCES): New macro.
6148         (datetime_mod_CFLAGS): Likewise.
6149         (datetime_mod_LDFLAGS): Likewise.
6150         (date_mod_SOURCES): Likewise.
6151         (date_mod_CFLAGS): Likewise.
6152         (date_mod_LDFLAGS): Likewise.
6153         (datehook_mod_SOURCES): Likewise.
6154         (datehook_mod_CFLAGS): Likewise.
6155         (datehook_mod_LDFLAGS): Likewise.
6157         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6158         and datehook.mod.
6159         (datetime_mod_SOURCES): New macro.
6160         (datetime_mod_CFLAGS): Likewise.
6161         (datetime_mod_LDFLAGS): Likewise.
6162         (date_mod_SOURCES): Likewise.
6163         (date_mod_CFLAGS): Likewise.
6164         (date_mod_LDFLAGS): Likewise.
6165         (datehook_mod_SOURCES): Likewise.
6166         (datehook_mod_CFLAGS): Likewise.
6167         (datehook_mod_LDFLAGS): Likewise.
6169         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6170         and datehook.mod.
6171         (datetime_mod_SOURCES): New macro.
6172         (datetime_mod_CFLAGS): Likewise.
6173         (datetime_mod_LDFLAGS): Likewise.
6174         (date_mod_SOURCES): Likewise.
6175         (date_mod_CFLAGS): Likewise.
6176         (date_mod_LDFLAGS): Likewise.
6177         (datehook_mod_SOURCES): Likewise.
6178         (datehook_mod_CFLAGS): Likewise.
6179         (datehook_mod_LDFLAGS): Likewise.
6181         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6183         * commands/date.c: New file.
6185         * hook/datehook.c: Likewise.
6187         * include/grub/lib/datetime.h: Likewise.
6189         * include/grub/i386/cmos.h: Likewise.
6191         * lib/datetime.c: Likewise.
6193         * lib/i386/datetime.c: Likewise.
6195         * lib/efi/datetime.c: Likewise.
6197 2008-08-14  Robert Millan  <rmh@aybabtu.com>
6199         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6200         (grub_mkelfimage_SOURCES): New variable.
6201         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6203         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6204         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6205         * conf/powerpc-ieee1275.rmk: Likewise.
6206         * conf/i386-ieee1275.rmk: Likewise.
6208         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6209         * kern/i386/coreboot/init.c: Likewise.
6211         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6212         with `<grub/cpu/kernel.h>'.
6213         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6214         to ...
6215         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6216         * kern/i386/coreboot/startup.S: Likewise.
6218         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6219         (GRUB_MOD_GAP): Remove.
6220         * include/grub/powerpc/kernel.h: New file.
6221         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6222         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6223         * include/grub/i386/kernel.h: New file.
6224         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6225         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6226         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6228         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6229         `grub-mkelfimage'.
6230         Use --directory when invoking grub_mkimage.
6232         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6233         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6234         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6235         and GRUB_KERNEL_CPU_PREFIX.
6237 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
6239         * include/grub/err.h (grub_err_printf): New function prototype.
6240         * util/misc.c (grub_err_printf): New function.
6241         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6242         grub_printf.
6243         * kern/err.c (grub_print_error): Use grub_err_printf.
6245 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6247         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6249 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6251         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6252         boot entry.
6254 2008-08-12  Robert Millan  <rmh@aybabtu.com>
6256         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6257         of the relocation code from here ...
6258         (grub_multiboot): ... to here.
6259         (forward_relocator, backward_relocator): Move from here ...
6260         * kern/i386/loader.S (grub_multiboot_forward_relocator)
6261         (grub_multiboot_backward_relocator): ... to here.
6262         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
6263         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
6264         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6265         (grub_multiboot_forward_relocator_end)
6266         (grub_multiboot_backward_relocator)
6267         (grub_multiboot_backward_relocator_end): New variables.
6269 2008-08-12  Bean  <bean123ch@gmail.com>
6271         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6273 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6275         * kern/i386/linuxbios/startup.S: Move from here ...
6276         * kern/i386/coreboot/startup.S: ... to here.
6278         * kern/i386/linuxbios/init.c: Move from here ...
6279         * kern/i386/coreboot/init.c: ... to here.
6281         * kern/i386/linuxbios/table.c: Move from here ...
6282         * kern/i386/coreboot/mmap.c: ... to here.
6284         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6286 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6288         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6289         errors.  Leave it to the upper layer to handle them.
6291 2008-08-09  Christian Franke  <franke@computer.org>
6293         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6294         * conf/common.rmk: Install `grub-pe2elf' only if requested.
6295         Install `grub.d/10_windows' only on Cygwin.
6296         * configure.ac: Add subst of `target_os'.
6297         Check `target_os' also before setting TARGET_OBJ2ELF.
6298         Add `--enable-grub-pe2elf'.
6300 2008-08-08  Robert Millan  <rmh@aybabtu.com>
6302         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6303         (grub_last_time): Change type to grub_uint64_t.
6304         (grub_disk_open): Migrate code from to using grub_get_time_ms().
6305         (grub_disk_close): Likewise.
6307         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6308         (run_menu): Migrate code from to using grub_get_time_ms().
6310         * util/misc.c (grub_get_time_ms): New function.
6312 2008-08-08  Marco Gerards  <marco@gnu.org>
6314         * disk/ata.c (grub_ata_regget): Change return type to
6315         `grub_uint8_t'.
6316         (grub_ata_regget2): Likewise.
6317         (grub_ata_wait_status): New function.
6318         (grub_ata_wait_busy): Removed function, updated all users to use
6319         `grub_ata_wait_status'.
6320         (grub_ata_wait_drq): Likewise.
6321         (grub_ata_cmd): New function.
6322         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
6323         error handling.
6324         (grub_ata_pio_write): Add error handling.
6325         (grub_atapi_identify): Likewise.
6326         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6327         handling.
6328         (grub_ata_identify): Use `grub_ata_cmd' and improve error
6329         handling.  Actually use the detected registers.  Reorder the
6330         detection logic such that it is easier to read.
6331         (grub_ata_pciinit): Do not assign the same ID to each controller.
6332         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6333         handling.
6334         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6336         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6338 2008-08-08  Marco Gerards  <marco@gnu.org>
6340         * NEWS: Update.
6342 2008-08-07  Bean  <bean123ch@gmail.com>
6344         * include/grub/x86_64/pci.h: New file.
6346 2008-08-07  Christian Franke  <franke@computer.org>
6348         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6349         (TIMER2_GATE): Likewise.
6350         (grub_pit_wait): Add enable/disable of the timer2 gate
6351         bit of port 0x61.  This fixes a possible infinite loop.
6353 2008-08-07  Bean  <bean123ch@gmail.com>
6355         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6356         kern/i386/tsc.c and kern/i386/pit.c.
6358         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6359         x86_64 platform.
6361         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6362         <grub/i386/tsc.h>.
6364         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6366 2008-08-07  Bean  <bean123ch@gmail.com>
6368         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6370         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6372         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6373         multiple inclusion. Add #include <grub/types.h>.
6375 2008-08-06  Christian Franke  <franke@computer.org>
6377         * conf/common.rmk: Build and install `10_windows'.
6378         * util/grub.d/10_windows.in: New script.
6380 2008-08-06  Pavel Roskin  <proski@gnu.org>
6382         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6384 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6386         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6387         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6389 2008-08-06  Bean  <bean123ch@gmail.com>
6391         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6392         (grub_pxefs_fs_int): Remove dummy definition.
6393         (grub_pxefs_open): Use data->block_size to store the current block
6394         size setting.
6395         (grub_pxefs_read): Use block size stored in data->block_size. As the
6396         value of grub_pxe_blksize can be changed after the file is opened.
6398 2008-08-06  Bean  <bean123ch@gmail.com>
6400         * fs/i386/pc/pxe.c (curr_file): new variable.
6401         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6402         require the dummy internal file system anymore.
6403         (grub_pxefs_read): Removed.
6404         (grub_pxefs_close): Likewise.
6405         (grub_pxefs_fs_int): Likewise.
6406         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6407         connection when we switch file.
6408         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6410 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6412         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6413         `halt.mod'.
6414         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6415         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6417         * kern/i386/halt.c: New file.
6418         * kern/i386/reboot.c: Likewise.
6419         * include/grub/i386/reboot.h: Likewise.
6420         * include/grub/i386/halt.h: Likewise.
6422         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6423         Include `<grub/cpu/halt.h>'.
6424         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6425         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6427         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6428         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6429         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6430         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6431         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6432         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6433         from here ...
6434         * include/grub/i386/at_keyboard.h: ... to here.
6436 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6438         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6439         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6440         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6441         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6442         `kern/generic/millisleep.c'.
6444         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6445         instead of grub_get_rtc().
6446         (grub_tsc_init): Initialize `tsc_boot_time'.
6448         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6449         (grub_machine_init): Use grub_tsc_init() rather than
6450         installing an RTC-based handler via grub_install_get_time_ms().
6452         * kern/i386/pit.c: New file.
6453         * include/grub/i386/pit.h: Likewise.
6455 2008-08-05  Bean  <bean123ch@gmail.com>
6457         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6459         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6460         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6461         (pxe_mod_SOURCES): New macro.
6462         (pxe_mod_CFLAGS): Likewise.
6463         (pxe_mod_LDFLAGS): Likewise.
6464         (pxecmd_mod_SOURCES): Likewise.
6465         (pxecmd_mod_CFLAGS): Likewise.
6466         (pxecmd_mod_LDFLAGS): Likewise.
6468         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6469         (grub_pxe_call): Likewise.
6471         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6473         * commands/i386/pc/pxecmd.c: New file.
6475         * fs/i386/pc/pxe.c: Likewise.
6477         * include/grub/i386/pc/pxe.h: Likewise.
6479 2008-08-05  Bean  <bean123ch@gmail.com>
6481         * util/console.c (grub_console_cur_color): New variable.
6482         (grub_console_standard_color): Likewise.
6483         (grub_console_normal_color): Likewise.
6484         (grub_console_highlight_color): Likewise.
6485         (color_map): Likewise.
6486         (use_color): Likewise.
6487         (NUM_COLORS): New macro.
6488         (grub_ncurses_setcolorstate): Handle color properly.
6489         (grub_ncurses_setcolor): Don't change color here, just remember the
6490         settings, color will be set in grub_ncurses_setcolorstate.
6491         (grub_ncurses_getcolor): New function.
6492         (grub_ncurses_init): Initialize color pairs.
6493         (grub_ncurses_term): New member grub_ncurses_getcolor.
6495 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6497         High resolution timer support.  Implemented for x86 CPUs using TSC.
6498         Extracted generic grub_millisleep() so it's linked in only as needed.
6499         This requires a Pentium compatible CPU; if the RDTSC instruction is
6500         not supported, then it falls back on the generic grub_get_time_ms()
6501         implementation that uses the machine's RTC.
6503         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6504         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6505         `kern/generic/millisleep.c'.
6507         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6508         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6510         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6511         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6513         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6515         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6516         `kern/generic/millisleep.c'.
6518         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6520         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6522         * kern/generic/rtc_get_time_ms.c: New file.
6524         * kern/generic/millisleep.c: New file.
6526         * kern/misc.c: Don't include
6527         <kern/time.h> anymore.
6528         (grub_millisleep_generic): Removed.
6530         * commands/sleep.c (grub_interruptible_millisleep): Uses
6531         grub_get_time_ms() instead of grub_get_rtc().
6533         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6534         function.
6535         (grub_cpu_is_cpuid_supported): New inline function.
6536         (grub_cpu_is_tsc_supported): New inline function.
6537         (grub_tsc_init): New function prototype.
6538         (grub_tsc_get_time_ms): New function prototype.
6540         * kern/i386/tsc.c (grub_get_time_ms): New file.
6542         * include/grub/time.h: Include <grub/types.h.
6543         (grub_millisleep_generic): Removed.
6544         (grub_get_time_ms): New prototype.
6545         (grub_install_get_time_ms): New prototype.
6546         (grub_rtc_get_time_ms): New prototype.
6548         * kern/time.c (grub_get_time_ms): New function.
6549         (grub_install_get_time_ms): New function.
6551         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6552         <grub/time.h> anymore.
6553         (grub_millisleep): Removed.
6554         (grub_machine_init): Call grub_tsc_init.
6556         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6557         get_time_ms() implementation.
6559         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6560         (ieee1275_get_time_ms): New function.
6561         (grub_machine_init): Install get_time_ms() implementation.
6563         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6564         (grub_machine_init): Call grub_tsc_init().
6565         (grub_millisleep): Removed.
6567         * kern/ieee1275/init.c (grub_millisleep): Removed.
6568         (grub_machine_init): Install ieee1275_get_time_ms()
6569         implementation.
6570         (ieee1275_get_time_ms): New function.
6571         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6572         real work.
6574 2008-08-05  Marco Gerards  <marco@gnu.org>
6576         * disk/ata.c: Include <grub/pci.h>.
6577         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6578         (grub_ata_initialize): Rewritten.
6579         (grub_ata_device_initialize): New function.
6581 2008-08-04  Pavel Roskin  <proski@gnu.org>
6583         * kern/main.c: Include grub/mm.h.
6585 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6587         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6588         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6589         corruption problem).
6591 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6593         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6594         warnings introduced in my last commit.
6596 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6598         Make PCI available on all i386 architectures.
6600         * include/grub/i386/pc/pci.h: Move from here ...
6601         * include/grub/i386/pci.h: ... to here.
6603         * include/grub/i386/pc/pci.h: Remove.
6604         * include/grub/i386/efi/pci.h: Remove.
6605         * include/grub/x86_64/efi/pci.h: Remove.
6607         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6608         `<grub/cpu/pci.h>'.
6610         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6611         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6612         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6614         * conf/i386-ieee1275.rmk: Likewise.
6616 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6618         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6619         (grub_console_setcursor): Make it possible to set cursor off.
6621 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6623         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6624         of modules instead of assuming which platform provides what.
6625         * util/update-grub.in: Likewise.
6627 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6629         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6630         instead of `grub_install_dos_part' to determine whether a drive needs
6631         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6632         because it can be overridden when loading GRUB via Multiboot).
6634 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6636         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6638 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6640         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6641         of informational grub_dprintf() calls.
6643 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6645         * disk/memdisk.c (memdisk_size): Don't initialize.
6646         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6648         * include/grub/i386/pc/kernel.h
6649         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6650         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6651         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6652         (grub_arch_memdisk_size): Remove.
6654         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6655         field (was only used to transfer a constant).  Add `type' field to
6656         support multiple module types.
6657         (grub_module_iterate): New function.
6659         * kern/device.c (grub_device_open): Do not hide error messages
6660         when grub_disk_open() fails.  Use grub_print_error() instead.
6662         * kern/i386/pc/init.c (grub_arch_modules_addr)
6663         (grub_arch_memdisk_size): Remove functions.
6664         (grub_arch_modules_addr): Return the module address in high memory
6665         (now that it isn't copied anymore).
6667         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6668         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6669         decompression routine (grub_total_module_size already includes that
6670         now).  Don't copy modules back to low memory.
6672         * kern/main.c: Include `<grub/mm.h>'.
6673         (grub_load_modules): Split out (and use) ...
6674         (grub_module_iterate): ... this function, which iterates through
6675         module objects and runs a hook.
6676         Comment out grub_mm_init_region() call, as it would cause non-ELF
6677         modules to be overwritten.
6679         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6680         the memdisk image in its own region, make it part of the module list.
6681         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6682         (main): Parse --memdisk|-m option, and pass user-provided path as
6683         parameter to generate_image().
6684         (add_segments): Pass `memdisk_path' down to load_modules().
6685         (load_modules): Embed memdisk image in module section when requested.
6686         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6687         `header.type' instead of `header.offset'.
6689         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6690         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6691         (memdisk_mod_LDFLAGS): New variables.
6692         * conf/i386-coreboot.rmk: Likewise.
6693         * conf/i386-ieee1275.rmk: Likewise.
6695 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6697         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6698         (backward_relocator): New variables.  Used to allocate and relocate
6699         the payload, respectively.
6700         (grub_multiboot_load_elf32): Load into heap instead of requested
6701         address, install the appropriate relocator code in each bound of
6702         the payload, and set the entry point such that
6703         grub_multiboot_real_boot() will jump to one of them.
6705         * kern/i386/loader.S (grub_multiboot_payload_size)
6706         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6707         (grub_multiboot_payload_entry_offset): New variables.
6708         (grub_multiboot_real_boot): Set cpu context to what the relocator
6709         expects, and jump to the relocator instead of the payload.
6711         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6712         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6713         (grub_multiboot_payload_entry_offset): Export.
6715 2008-08-01  Bean  <bean123ch@gmail.com>
6717         * normal/menu_entry.c (editor_getline): Don't return the original
6718         string as result, as it will be released by lexer once it has done
6719         using it.
6721 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6723         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6724         within menuentries, not before them.
6725         util/grub.d/10_hurd.in: Likewise.
6727 2008-08-01  Bean  <bean123ch@gmail.com>
6729         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6730         (bufio_mod_SOURCES): New macro.
6731         (bufio_mod_CFLAGS): Likewise.
6732         (bufio_mod_LDFLAGS): Likewise.
6734         * include/grub/bufio.h: New file.
6736         * io/bufio.c: Likewise.
6738         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6739         (grub_video_reader_png): Use grub_buffile_open to open file.
6741         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6742         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6744         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6745         (grub_video_reader_tga): Use grub_buffile_open to open file.
6747         * font/manager.c: Include <grub/bufio.h>.
6748         (add_font): Use grub_buffile_open to open file.
6750 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6752         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6753         ELF segments, use a macro for arbitrarily accessing any of them instead
6754         of preparing a pointer that allows access to one at a time.
6755         (grub_multiboot_load_elf64): Likewise.
6757 2008-07-31  Bean  <bean123ch@gmail.com>
6759         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6760         GRUB_KERNEL_MACHINE_DATA_END.
6762 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6764         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6765         Increase from 0x50 to 0x60.
6766         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6767         use UUIDs to identify the root drive for them.  If that's not
6768         possible, abort.
6769         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6770         check, for cross-disk installs.
6772 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6774         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6775         is non-empty, use it to set the `prefix' environment variable instead
6776         of the usual approach.
6777         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6778         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6779         environment variable instead of dummy make_install_device().
6781         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6782         (start): Insert a data section, with `grub_prefix' variable.
6783         * kern/i386/linuxbios/startup.S: Likewise.
6785         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6786         New variable reference.
6787         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6788         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6789         to `start').
6790         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6791         section within startup.S (relative to `start').
6792         * include/grub/i386/coreboot/kernel.h: Likewise.
6794         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6795         Overwrite grub_prefix with its contents, at the beginning of the
6796         first segment.
6797         (main): Understand -p|--prefix.
6799 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6801         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6803 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6805         * term/i386/pc/vga_text.c (grub_console_cls): Use
6806         grub_console_gotoxy() to go back to beginning of the screen.
6807         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6809 2008-07-29  Christian Franke  <franke@computer.org>
6811         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6812         Add conversion of emulated mount points on Cygwin.
6814 2008-07-29  Christian Franke  <franke@computer.org>
6816         * util/update-grub.in: Add a check for admin
6817         group on Cygwin.
6818         Remove old `grub.cfg.new' before creation.
6819         Add `-f' to `mv' to handle the different filesystem
6820         semantics of Windows.
6822 2008-07-29  Bean  <bean123ch@gmail.com>
6824         * normal/main.c (get_line): Fix buffer overflow bug.
6826 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6828         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6829         (struct grub_apple_header): New struct.  Describes the layout of
6830         the partmap header.
6831         (apple_partition_map_iterate): Check the header magic as well as the
6832         partition magic (which was already being checked).
6834 2008-07-28  Pavel Roskin  <proski@gnu.org>
6836         * genmk.rb: Add a warning to the beginning of the output that
6837         it's a generated file and should not be edited.
6839 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6841         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6842         with the same number are found, just use issue a warning with
6843         grub_dprintf(), as this error has been reported to be non-fatal.
6845 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6847         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6848         information.
6850 2008-07-27  Bean  <bean123ch@gmail.com>
6852         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6853         (grub_fat_find_dir): Ignore case when comparing filename.
6855 2008-07-27  Bean  <bean123ch@gmail.com>
6857         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6858         smallino, as it's more descriptive, and i8count can be confused with
6859         the other field count.
6860         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6861         inode type.
6863 2008-07-27  Bean  <bean123ch@gmail.com>
6865         * commands/crc.c: New file.
6867         * lib/crc.c: Likewise.
6869         * include/grub/lib/crc.h: Likewise.
6871         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6873         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6874         (hexdump): Move this function to ...
6876         * lib/hexdump.c: ... here.
6878         * include/grub/hexdump.h: Renamed to ...
6880         * include/grub/lib/hexdump.h: ... this.
6882         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6884         * util/grub-editenv.c: Likewise.
6886         * include/envblk.h: Renamed to ...
6888         * include/lib/envblk.h: ... this.
6890         * util/envblk.c: Renamed to ...
6892         * lib/envblk.c: ... this.
6894         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6895         lib/hexdump.c.
6896         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6897         (pkglib_MODULES): Add crc.mod.
6898         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6899         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6900         (crc_mod_SOURCES): New macro.
6901         (crc_mod_CFLAGS): Likewise.
6902         (crc_mod_LDFLAGS): Likewise.
6904         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6906         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6908         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6910         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6912         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6914 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6916         * commands/help.c: Include <grub/term.h>.
6917         (TERM_WIDTH): Removed.  Updated all users.
6919 2008-07-27  Pavel Roskin  <proski@gnu.org>
6921         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6922         spurious warnings about a comment within a comment.
6924 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6926         * util/getroot.c (find_root_device): Skip devices that match
6927         /dev/dm-[0-9].  This lets the real device be found for any type of
6928         abstraction (LVM, EVMS, RAID..).
6929         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6930         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6931         device is found first, find_root_device() will now skip it.
6933 2008-07-24  Pavel Roskin  <proski@gnu.org>
6935         * include/grub/types.h: Use __builtin_bswap32() and
6936         __builtin_bswap64() with gcc 4.3 and newer.
6938 2008-07-24  Christian Franke  <franke@computer.org>
6940         * util/i386/pc/grub-install.in: If `--debug' is specified,
6941         pass `--verbose' to grub-setup.
6942         Abort script if make_system_path_relative_to_its_root() fails.
6944 2008-07-24  Bean  <bean123ch@gmail.com>
6946         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6947         variable `target_platform' should be `platform'.
6949 2008-07-24  Bean  <bean123ch@gmail.com>
6951         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6952         (grub_png_init_fixed_block): New function.
6953         (grub_png_decode_image_data): Handle fixed huffman code compression.
6955 2008-07-24  Bean  <bean123ch@gmail.com>
6957         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6958         (grub_pe2elf_SOURCES): New macro.
6959         (CLEANFILES): Add grub-pe2elf.
6961         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6962         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6963         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6964         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6965         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6966         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6967         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6968         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6969         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6970         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6971         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6972         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6973         (GRUB_PE32_DT_FUNCTION): Likewise.
6974         (GRUB_PE32_REL_I386_DIR32): Likewise.
6975         (GRUB_PE32_REL_I386_REL32): Likewise.
6976         (grub_pe32_symbol): New structure.
6977         (grub_pe32_reloc): Likewise.
6979         * util/grub-pe2elf.c: New file.
6981         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6982         start symbol in non pc platform.
6984         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6986         The following patches are from Christian Franke.
6988         * include/grub/dl.h: Remove .previous, gas supports this only
6989         for ELF format.
6991         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6992         Remove .type, gas supports this only for ELF format.
6994         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6995         nullbytes in symbol table. This fixes an infinite loop if table is
6996         zero filled.
6998         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6999         TARGET_IMG_LDFLAGS and EXEEXT.
7001         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
7002         TARGET_IMG_LDFLAGS_AC.
7003         (grub_CHECK_STACK_ARG_PROBE): New function.
7005         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
7007         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
7009         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
7010         to set TARGET_IMG_LD* accordingly.
7011         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
7012         Add call to grub_CHECK_STACK_ARG_PROBE.
7013         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
7015         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
7017         * genmk.rb: Add EXEEXT to CLEANFILES.
7019 2008-07-23  Robert Millan  <rmh@aybabtu.com>
7021         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
7022         define the codes for arrows and lines used for the menu).
7023         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
7024         as well.
7026         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
7027         fonts, because the latter are too slow.
7029 2008-07-21  Bean  <bean123ch@gmail.com>
7031         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
7032         a20. Run keyboard test last, as it will cause macbook to halt.
7034 2008-07-18  Pavel Roskin  <proski@gnu.org>
7036         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
7037         load foreign architecture modules correctly anyway.  Keep
7038         support for loading host architecture modules, whether we
7039         compile them or not.
7041 2008-07-17  Pavel Roskin  <proski@gnu.org>
7043         * configure.ac: Use -m32 or -m64 regardless of whether we had to
7044         change target_cpu.  The compiler default can mismatch target_cpu
7045         in any case.
7047         * disk/efi/efidisk.c: Fix format warnings on x86_64.
7048         * kern/efi/efi.c: Likewise.
7050         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
7051         target compiler is functional.
7052         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7053         are set up.
7055         * configure.ac: Default to efi platform for x86_64-apple.  Allow
7056         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
7057         adjustments from the rest, only do them if target is not
7058         explicitly given.  Merge other adjustments with the final sanity
7059         check.  Remove an extraneous check for supported CPU.  Be
7060         specific which CPU and which platform is not supported.
7062         * configure.ac: Default to pc platform for x86_64.
7064 2008-07-17  Robert Millan  <rmh@aybabtu.com>
7066         Partial LinuxBIOS -> Coreboot rename.
7068         * conf/i386-linuxbios.rmk: Renamed to ...
7069         * conf/i386-coreboot.rmk: ... this.
7070         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7071         * configure.ac: Accept "coreboot" as input platform (but maintain
7072         compatibility with "linuxbios").
7073         * include/grub/i386/linuxbios: Renamed to ...
7074         * include/grub/i386/coreboot: ... this.
7076 2008-07-17  Bean  <bean123ch@gmail.com>
7078         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
7079         (appleldr_mod_SOURCE): New variable.
7080         (appleldr_mod_CFLAGS): Likewise.
7081         (appleldr_mod_LDFLAGS): Likewise.
7082         (pci_mod_SOURCES): Likewise.
7083         (pci_mod_CFLAGS): Likewise.
7084         (pci_mod_LDFLAGS): Likewise.
7085         (lspci_mod_SOURCES): Likewise.
7086         (lspci_mod_CFLAGS): Likewise.
7087         (lspci_mod_LDFLAGS): Likewise.
7089         * conf/x86_64-efi.rmk: New file.
7091         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7092         macro.
7093         (grub_efidisk_write): Likewise.
7095         * include/efi/api.h (efi_call_0): New macro.
7096         (efi_call_1): Likewise.
7097         (efi_call_2): Likewise.
7098         (efi_call_3): Likewise.
7099         (efi_call_4): Likewise.
7100         (efi_call_5): Likewise.
7101         (efi_call_6): Likewise.
7103         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7104         grub_rescue_cmd_chainloader.
7106         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7107         (grub_pe32_optional_header): Change some fields based on i386 or
7108         x86_64 platform.
7109         (GRUB_PE32_PE32_MAGIC): Likewise.
7111         * include/grub/efi/uga_draw.h: New file.
7113         * include/grub/elf.h (STN_ABS): New constant.
7114         (R_X86_64_NONE): Relocation constant for x86_64.
7115         (R_X86_64_64): Likewise.
7116         (R_X86_64_PC32): Likewise.
7117         (R_X86_64_GOT32): Likewise.
7118         (R_X86_64_PLT32): Likewise.
7119         (R_X86_64_COPY): Likewise.
7120         (R_X86_64_GLOB_DAT): Likewise.
7121         (R_X86_64_JUMP_SLOT): Likewise.
7122         (R_X86_64_RELATIVE): Likewise.
7123         (R_X86_64_GOTPCREL): Likewise.
7124         (R_X86_64_32): Likewise.
7125         (R_X86_64_32S): Likewise.
7126         (R_X86_64_16): Likewise.
7127         (R_X86_64_PC16): Likewise.
7128         (R_X86_64_8): Likewise.
7129         (R_X86_64_PC8): Likewise.
7131         * include/grub/i386/efi/pci.h: New file.
7133         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7134         Change it value based on platform.
7135         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7136         (GRUB_E820_RAM): Likewise.
7137         (GRUB_E820_RESERVED): Likewise.
7138         (GRUB_E820_ACPI): Likewise.
7139         (GRUB_E820_NVS): Likewise.
7140         (GRUB_E820_EXEC_CODE): Likewise.
7141         (GRUB_E820_MAX_ENTRY): Likewise.
7142         (grub_e820_mmap): New structure.
7143         (linux_kernel_header): Change the efi field according to different
7144         kernel version, also field from linux_kernel_header.
7146         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7148         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7149         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7150         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7151         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7152         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7153         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7154         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7155         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7156         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7157         (GRUB_PCI_ADDR_IO_MASK): Likewise.
7159         * include/grub/x86_64/efi/kernel.h: New file.
7161         * include/grub/x86_64/efi/loader.h: Likewise.
7163         * include/grub/x86_64/efi/machine.h: Likewise.
7165         * include/grub/x86_64/efi/pci.h: Likewise.
7167         * include/grub/x86_64/efi/time.h: Likewise.
7169         * include/grub/x86_64/linux.h: Likewise.
7171         * include/grub/x86_64/setjmp.h: Likewise.
7173         * include/grub/x86_64/time.h: Likewise.
7175         * include/grub/x86_64/types.h: Likewise.
7177         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7178          GRUB_TARGET_SIZEOF_VOID_P.
7180         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7181         (grub_efi_locate_handle): Likewise.
7182         (grub_efi_open_protocol): Likewise.
7183         (grub_efi_set_text_mode): Likewise.
7184         (grub_efi_stall): Likewise.
7185         (grub_exit): Likewise.
7186         (grub_reboot): Likewise.
7187         (grub_halt): Likewise.
7188         (grub_efi_exit_boot_services): Likewise.
7189         (grub_get_rtc): Likewise.
7191         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7192         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7193         (grub_efi_allocate_pages): Wrap efi calls.
7194         (grub_efi_free_pages): Wrap efi calls.
7195         (grub_efi_get_memory_map): Wrap efi calls.
7197         * kern/x86_64/dl.c: New file.
7199         * kern/x86_64/efi/callwrap.S: Likewise.
7201         * kern/x86_64/efi/startup.S: Likewise.
7203         * loader/efi/appleloader.c: Likewise.
7205         * loader/efi/chainloader.c (cmdline): New variable.
7206         (grub_chainloader_unload): Wrap efi calls.
7207         (grub_chainloader_boot): Likewise.
7208         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7209         command line.
7211         * loader/efi/chainloader_normal.c (chainloader_command):
7212         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7213         command line.
7215         * loader/i386/efi/linux.c (allocate_pages): Change allocation
7216         method.
7217         (grub_e820_add_region): New function.
7218         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7219         booting.
7220         (grub_find_video_card): New function.
7221         (grub_linux_setup_video): New function.
7222         (grub_rescue_cmd_linux): Probe for video information.
7224         * normal/x86_64/setjmp.S: New file.
7226         * term/efi/console.c (map_char): New function.
7227         (grub_console_putchar): Map unicode char.
7228         (grub_console_checkkey): Wrap efi calls.
7229         (grub_console_getkey): Likewise.
7230         (grub_console_getwh): Likewise.
7231         (grub_console_gotoxy): Likewise.
7232         (grub_console_cls): Likewise.
7233         (grub_console_setcolorstate): Likewise.
7234         (grub_console_setcursor): Likewise.
7236         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7238 2008-07-16  Pavel Roskin  <proski@gnu.org>
7240         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7241         format strings.
7243         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7244         pointer, not an integer.  This fixes a warning and prevents
7245         precision loss on 64-bit systems.
7246         (relocate_addresses): Remove unneeded cast.
7248 2008-07-15  Pavel Roskin  <proski@gnu.org>
7250         * kern/i386/ieee1275/init.c: Include grub/cache.h.
7252         * term/ieee1275/ofconsole.c: Disable code unused on i386.
7254         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7255         Fix comparison between signed and unsigned.
7257         * include/grub/i386/ieee1275/console.h: Declare
7258         grub_console_init() and grub_console_fini().
7260         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7261         It's empty and unused.
7263         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7264         beginning to avoid warnings with some compilers.
7266         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7267         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7269 2008-07-14  Pavel Roskin  <proski@gnu.org>
7271         * kern/env.c (grub_register_variable_hook): Don't copy empty
7272         string, it leaks memory.  Pass "" to grub_env_set(), it should
7273         handle constant strings.
7275         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7276         * commands/cmp.c (grub_cmd_cmp): Likewise.
7277         * kern/dl.c (grub_dl_flush_cache): Likewise.
7278         (grub_dl_load_core): Likewise.
7279         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7280         (grub_elf64_load_phdrs): Likewise.
7282 2008-07-13  Pavel Roskin  <proski@gnu.org>
7284         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7285         between signed and unsigned.
7286         (LzmaEnc_Finish): Fix warning about an unused parameter.
7288 2008-07-13  Bean  <bean123ch@gmail.com>
7290         * Makefile.in (enable_lzo): New rule.
7292         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7294         * configure.ac (ENABLE_LZO): New option --enable-lzo.
7296         * boot/i386/pc/lnxboot.S: #include <config.h>.
7298         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7299         its value according to the compression algorithm used, lzo or lzma.
7301         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7302         compression algorithm according to configure macro.
7304         * kern/i386/pc/startup.S (codestart): Likewise.
7306         * kern/i386/pc/lzma_decode.S: New file.
7308         * include/grub/lib/LzFind.h: Likewise.
7310         * include/grub/lib/LzHash.h: Likewise.
7312         * include/grub/lib/LzmaDec.h: Likewise.
7314         * include/grub/lib/LzmaEnc.h: Likewise.
7316         * include/grub/lib/LzmaTypes.h: Likewise.
7318         * lib/LzFind.c: Likewise.
7320         * lib/LzmaDec.c: Likewise.
7322         * lib/LzmaEnc.c: Likewise.
7324 2008-07-13  Bean  <bean123ch@gmail.com>
7326         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7327         (grub_ext4_extent_header): New structure.
7328         (grub_ext4_extent): Likewise.
7329         (grub_ext4_extent_idx): Likewise.
7330         (grub_ext4_find_leaf): New function.
7331         (grub_ext2_read_block): Handle extents.
7333 2008-07-12  Robert Millan  <rmh@aybabtu.com>
7335         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7337 2008-07-11  Robert Millan  <rmh@aybabtu.com>
7339         * util/grub.d/40_custom.in: New file. Example on how to add custom
7340         entries to /etc/grub.d.
7341         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7342         40_custom (implicitly, by merging all the grub.d rules).
7344 2008-07-11  Pavel Roskin  <proski@gnu.org>
7346         * commands/read.c (grub_getline): Fix invalid memory access.
7347         Don't add newline to the variable value.
7349         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7350         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7351         (serial_hw_get_port): Check validity of the port number.
7352         (grub_cmd_serial): Check return value of serial_hw_get_port().
7354 2008-07-07  Pavel Roskin  <proski@gnu.org>
7356         * boot/i386/pc/diskboot.S (notification_string): Replace
7357         "Loading kernel" with just "loading".  This is shorter, less
7358         confusing and saves a few bytes for possible future changes.
7360 2008-07-05  Pavel Roskin  <proski@gnu.org>
7362         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7363         size for ATAPI devices, they are undefined.  Output sector
7364         number in decimal form.
7366         * disk/ata.c: Use named constants for status bits.
7368 2008-07-04  Pavel Roskin  <proski@gnu.org>
7370         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7371         grub_addr_t before casting it to the void pointer to fix a
7372         warning.  Non-addressable regions are discarded earlier.
7373         (grub_arch_modules_addr): Cast _end to grub_addr_t.
7374         * kern/i386/linuxbios/table.c: Include grub/misc.h.
7375         (check_signature): Don't shadow table_header.
7376         (grub_linuxbios_table_iterate): Cast numeric constants to
7377         grub_linuxbios_table_header_t.
7378         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7379         grub_stop().
7381         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7382         prevent warnings.
7384         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7385         pointer, which can cause warnings.  Support 64-bit addresses.
7387         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7388         of sizeof(long).  This fixes PowerPC image generation on x86_64.
7390 2008-07-04  Robert Millan  <rmh@aybabtu.com>
7392         This fixes a performance issue when pc & gpt partmap iterators
7393         didn't abort iteration even after our hook found what it was
7394         looking for (often causing expensive probes of non-existent drives).
7396         Some callers relied on previous buggy behaviour, since they would
7397         raise an error when their own hooks caused early abortion of its
7398         iteration.
7400         * kern/device.c (grub_device_open): Improve error message.
7401         * disk/lvm.c (grub_lvm_open): Likewise.
7402         * disk/raid.c (grub_raid_open): Likewise.
7404         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7405         when hook requests it, independently of grub_errno.
7406         (pc_partition_map_probe): Do not fail when find_func() caused
7407         early abortion of pc_partition_map_iterate().
7409         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7410         when hook requests it, independently of grub_errno.
7411         (gpt_partition_map_probe): Do not fail when find_func() caused
7412         early abortion of gpt_partition_map_iterate().
7414         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7415         when hook requests it, independently of grub_errno.  Do not fail when
7416         part_map_iterate_hook() caused early abortion of p->iterate().
7418         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7419         when grub_partition_iterate() returned with non-zero.
7421 2008-07-03  Pavel Roskin  <proski@gnu.org>
7423         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7424         like we do in grub_ata_pio_read().
7425         (grub_ata_readwrite): Always write individual sectors.  Fix the
7426         sector count for the remainder.
7427         (grub_ata_write): Enable writing to ATA devices.  Correctly
7428         report error for ATAPI devices.
7430 2008-07-02  Pavel Roskin  <proski@gnu.org>
7432         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7433         warning.
7435         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7436         for every read sector, we already increment it for the whole
7437         batch.  This fixes reading more than 256 sectors at once.
7439         * util/grub-editenv.c (cmd_info): Cast argument to long
7440         explicitly.  ptrdiff_t reduces to int on i386.
7442         * util/grub-editenv.c (main): Be specific which parameter is
7443         missing.
7445         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7446         (memdisk): Make memdisk_orig_addr a pointer.
7448         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7449         for file offsets, use grub_off_t instead.  Fix printf format
7450         warnings.
7452         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7453         there.  Real unexpected warnings should not drown in the noise
7454         about known problems.
7456         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7457         grub_disk_addr_t for memory addresses.
7459         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7460         explicitly to fix a warning.
7462         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7464         * Makefile.in (MODULE_LDFLAGS): New variable.
7465         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7466         the linker accepts --build-id=none.
7467         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7468         MODULE_LDFLAGS.
7469         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7471         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7472         those in Linux XFS code.  Provide a way to access 64-bit parent
7473         inode.
7474         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7475         the end of struct grub_xfs_dir_header.
7477 2008-07-02  Bean  <bean123ch@gmail.com>
7479         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7480         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7481         and GRUB_IEEE1275_FLAG_NO_ANSI.
7483         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7484         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7485         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7487         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7488         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7490         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7491         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7493         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7494         esc sequence on non ANSI terminal.
7495         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7497         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7498         beginning of file.
7500 2008-07-02  Bean  <bean123ch@gmail.com>
7502         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7503         (grub_editenv_SOURCES): New variable.
7504         (pkglib_MODULES): Add loadenv.mod.
7505         (loadenv_mod_SOURCES): New variable.
7506         (loadenv_mod_CFLAGS): Likewise.
7507         (loadenv_mod_LDFLAGS): Likewise.
7509         * include/grub/envblk.h: New file.
7511         * util/envblk.c: New file.
7513         * util/grub-editenv.c: New file.
7515         * commands/loadenv.c: New file.
7517 2008-07-01  Pavel Roskin  <proski@gnu.org>
7519         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7520         not unsigned char.  This fixes warnings and is consistent with
7521         other tags.
7523         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7525         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7527         * term/tparm.c (analyze): Always set *popcount.
7529         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7530         cast to fix a warning.
7532         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7533         cast to suppress a warning.
7535         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7536         grub_fshelp_read_file() expects.
7538         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7539         write uuid as a 32-bit value in CPU byte order, so declare and
7540         use it as such.
7542         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7543         long if the format specifier expects it.
7544         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7545         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7546         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7547         long to fix a warning.
7548         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7549         grub_dprintf() arguments to fix warnings.
7551 2008-06-30  Pavel Roskin  <proski@gnu.org>
7553         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7554         install_bsd_part immediately before core.img is embedded or
7555         modified on disk.  This fixes core.img verification if core.img
7556         cannot be embedded.
7558         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7559         core_path to calculate the blocklist.
7560         Patch from Javier Martín <lordhabbit@gmail.com>
7562 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7564         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7565         block to disk block.
7566         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7567         Patch from Niels Böhm <bitbucket@arcor.de>
7569 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7571         * util/update-grub_lib.in (font_path): Search for fonts in
7572         /boot/grub first, which is more likely to be readable (we aren't
7573         deciding where fonts live, just looking for them).
7575 2008-06-26  Pavel Roskin  <proski@gnu.org>
7577         * util/biosdisk.c (read_device_map): Don't leave dead map
7578         entries for devices failing stat() check.
7580         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7581         core_path_dev for the core.img path on the target device.
7583 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7585         * disk/fs_uuid.c: New file.
7586         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7587         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7588         (fs_uuid_mod_LDFLAGS): New variables.
7589         * include/grub/disk.h (grub_disk_dev_id): Add
7590         `GRUB_DISK_DEVICE_UUID_ID'.
7591         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7592         implement iterate().
7594 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7596         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7597         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7598         Linux image includes no initrd.
7600 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7602         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7603         call to resolve the core image location that effectively appended the
7604         name twice.
7606 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7608         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7609         call from here ...
7611         * util/grub.d/10_hurd.in: ... to here ...
7612         * util/grub.d/10_linux.in: ... and here.
7614 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7616         * kern/main.c (grub_main): Export `prefix' variable immediately
7617         after it has been set by grub_machine_set_prefix().
7619 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7621         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7622         search result when not saving to variable, not the other way around.
7623         When saving to variable, abort iteration as soon as a match is found.
7625 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7627         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7628         check for partition that provides /boot/grub.  Its logic is flawed,
7629         as it prevents prepare_grub_to_access_device() from being called
7630         multiple times.
7632 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7634         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7635         "insmod" command directly when abstraction modules are needed,
7636         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7637         since it had already been processed).
7639 2008-06-19  Pavel Roskin  <proski@gnu.org>
7641         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7642         changed.  This is needed in case GRUB_LIBDIR changes.
7643         * conf/i386-ieee1275.rmk: Likewise.
7644         * conf/i386-linuxbios.rmk: Likewise.
7645         * conf/i386-pc.rmk: Likewise.
7646         * conf/powerpc-ieee1275.rmk: Likewise.
7648 2008-06-18  Pavel Roskin  <proski@gnu.org>
7650         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7651         kernel_elf_symlist.c to symlist.c for consistency with other
7652         architectures.  Update all users.
7653         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7655 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7657         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7658         it in prefix.
7660         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7661         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7662         a RAID device, run setup() for all members independently on whether
7663         LVM abstraction is being used.
7664         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7665         If grub-mkimage has set `*install_dos_part == -2', don't override this
7666         value.
7667         Perform *install_dos_part adjustments independently on whether
7668         we're embedding or not.
7669         Clarify error message when image is too big for embedding.
7670         Remove duplicate *install_dos_part stanza.
7672 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7674         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7675         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7676         variables.
7677         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7678         values in grub_ofconsole_normal_color and
7679         grub_ofconsole_highlight_color (they're not directly related to
7680         background and foreground).
7681         (grub_ofconsole_setcolorstate): Extract background and foreground
7682         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7684 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7686         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7687         /boot/grub for the check in last commit, not /boot (they could be
7688         different partitions).
7690 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7692         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7693         asked to setup access for the same partition that provides /boot,
7694         don't bother using UUIDs since our root already has the value we
7695         want.
7697 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7699         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7700         I2O devices.
7701         Patch from Sven Mueller <sven@debian.org>.
7703 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7705         * util/update-grub.in: Check for $EUID instead of $UID.
7706         Reported by Vincent Zweije.
7708 2008-06-16  Bean  <bean123ch@gmail.com>
7710         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7711         (grub_ext2_read_block): Likewise.
7712         (grub_ext2_read_inode): Likewise.
7713         (grub_ext2_mount): Likewise.
7714         (grub_ext2_close): Likewise.
7715         (grub_ext3_get_journal): Removed.
7717         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7718         (grub_reiserfs_read_symlink): Likewise.
7719         (grub_reiserfs_mount): Likewise.
7720         (grub_reiserfs_open): Likewise.
7721         (grub_reiserfs_read): Likewise.
7722         (grub_reiserfs_close): Likewise.
7723         (grub_reiserfs_get_journal): Removed.
7725         * fs/fshelp.c (grub_fshelp_read): Removed.
7726         (grub_fshelp_map_block): Likewise.
7728         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7729         (grub_fshelp_journal): Likewise.
7730         (grub_fshelp_read): Likewise.
7731         (grub_fshelp_map_block): Likewise.
7733 2008-06-16  Pavel Roskin  <proski@gnu.org>
7735         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7736         floating point anymore.
7737         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7739 2008-06-15  Pavel Roskin  <proski@gnu.org>
7741         * commands/ls.c (grub_ls_list_files): Use integer calculations
7742         for human readable format, avoid floating point use.
7743         * kern/misc.c (grub_ftoa): Remove.
7744         (grub_vsprintf): Remove floating point support.
7746 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7748         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7749         devices.
7750         Reported by Max Vozeler.
7752 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7754         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7755         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7756         skipped later.
7757         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7758         the beginning of the prefix.
7760         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7761         It is assumed that if we have a memdisk, grub-mkimage has set
7762         grub_prefix to include the "(memdisk)" drive in it.
7764 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7766         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7767         Initialize keyboard controller after registering the terminal, so that
7768         grub_printf() can be called from grub_keyboard_controller_init().
7770 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7772         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7773         extent-btree which is written as big endian on disk.
7774         Reported by Alain Greppin  <al@chilibi.org>.
7776 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7778         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7779         * util/i386/pc/grub-install.in (modules): Likewise.
7781 2008-06-13  Pavel Roskin  <proski@gnu.org>
7783         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7785 2008-06-13  Bean  <bean123ch@gmail.com>
7787         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7789         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7791         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7792         to indicate sparse block.
7794 2008-06-12  Pavel Roskin  <proski@gnu.org>
7796         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7797         number, grub_fshelp_read() does it for us.
7799         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7800         linear disk read with journal translation.
7801         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7802         * include/grub/fshelp.h: Declare grub_fshelp_read().
7804 2008-06-09  Pavel Roskin  <proski@gnu.org>
7806         * fs/minix.c (grub_minix_mount): Handle error reading
7807         superblock.
7809 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7811         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7812         don't append the RAID prefix afterwards.
7813         Reported by Clint Adams.
7815 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7817         Based on description from Pavel:
7818         * kern/disk.c (grub_disk_check_range): Rename to ...
7819         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7820         tasks performed by this function.
7822 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7824         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7825         `num_serial' (for consistency with other variables).
7826         (struct grub_ntfs_data): Add `uuid' member.
7827         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7828         (grub_ntfs_uuid): New function.
7829         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7831 2008-06-07  Pavel Roskin  <proski@gnu.org>
7833         * util/biosdisk.c (open_device): Revert last change to the
7834         function, it broke installation.  The sector needs to be
7835         different dependent on which device is opened.
7837 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7839         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7840         rest of GRUB, and breakage doesn't happen if its value were modified.
7842         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7843         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7844         a constant (same value).
7845         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7846         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7848 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7850         * util/biosdisk.c (open_device): Do not modify sector offset when
7851         accessing a partition.  kern/disk.c already handles this for us.
7853 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7855         * util/grub-emu.c (grub_machine_init): Move code in this function from
7856         here ...
7857         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7858         segfault in case grub_printf() is called).
7860         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7861         grub_probe.  Update all users not to explicitly add it again.
7862         (grub_device): New variable; contains corresponding device for grubdir.
7863         (fs_module, partmap_module, devabstraction_module): Pass
7864         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7865         every time.
7867 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7869         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7870         is found, print it (same layout as with labels).
7872 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7874         * util/biosdisk.c (get_drive): Rename to ...
7875         (find_grub_drive): ... this.  Update all users.
7877         (get_os_disk): Rename to ...
7878         (convert_system_partition_to_system_disk): ... this.  Update all users.
7880         (find_drive): Rename to ...
7881         (find_system_device): ... this.  Update all users.
7883 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7885         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7886         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7887         (make_device_map): Likewise.
7889 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7891         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7892         before dereferencing it.
7894         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7895         union with fat12/fat16-specific ones.  Add some new fields, including
7896         `num_serial' for both versions.
7897         (struct grub_fat_data): Add `uuid' member.
7898         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7899         names.  Initialize `data->uuid' using `num_serial'.
7900         (grub_fat_uuid): New function.
7901         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7903         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7904         (grub_reiserfs_uuid): New function.
7905         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7906         member.
7908         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7909         (grub_xfs_uuid): New function.
7910         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7912 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7914         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7915         code that is backward compatible with pre-uuid search command.
7917 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7919         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7920         floppies after everything else, to ensure floppy drive isn't accessed
7921         unnecessarily (patch from Bean).
7923 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7925         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7926         not print device names when we were asked to set a variable.
7928 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7930         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7931         using "cursor-on" and "cursor-off" commands (understood at least by
7932         the Open Firmware flavour on OLPC).
7934 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7936         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7937         on and off sequences.
7939 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7941         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7942         * util/update-grub.in: Likewise.
7944 2008-05-30  Pavel Roskin  <proski@gnu.org>
7946         * util/biosdisk.c (linux_find_partition): Simplify logic and
7947         make the code more universal.  Keep special processing for
7948         devfs, but use a simple rule for all other devices.  If the
7949         device ends with a number, append 'p' and the partition number.
7950         Otherwise, append only the partition number.
7952 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7954         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7955         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7956         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7957         the `root' parameter to Linux.
7959 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7961         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7962         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7963         --fs_uuid with --fs-uuid.
7964         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7965         all filesystems support them).
7967 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7969         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7970         grub_printf() flags, since we're printing in units of 2 bytes.
7972 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7974         * util/grub.d/00_header.in: Remove obsolete comment referencing
7975         convert_system_path_to_grub_path().
7976         * util/update-grub.in: Likewise.
7977         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7978         (convert_system_path_to_grub_path): Add a warning message explaining
7979         that this function is deprecated.  Rely on is_path_readable_by_grub()
7980         for the readability checks.
7981         (font_path): Use is_path_readable_by_grub() for the readability
7982         check rather than convert_system_path_to_grub_path().
7984 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7986         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7987         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7988         converting it first.
7989         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7990         grub.cfg for access to font file, and afterwards call it again to set
7991         the root device.
7993 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7995         * commands/search.c (options): Add --fs_uuid option.
7996         (search_fs_uuid): New function.
7997         (grub_cmd_search): Fix --set argument passing.
7998         Use search_fs_uuid() when requested via --fs_uuid.
7999         (grub_search_init): Update help message.
8000         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
8001         and redeclare it as an array of 16-bit words.
8002         (grub_ext2_uuid): New function.
8003         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
8004         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
8005         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
8006         (GRUB_DEVICE_BOOT_UUID): New variables.
8007         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
8008         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
8009         whenever possible.
8010         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
8011         just assume `root' variable has the right value.
8012         * util/grub.d/10_linux.in: Likewise.
8013         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
8014         via PRINT_FS_UUID.
8015         (main): Recognise `-t fs_uuid' argument.
8017 2008-05-30  Robert Millan  <rmh@aybabtu.com>
8019         * util/biosdisk.c (map): Redefine structure to hold information
8020         about GRUB drive name.
8021         (get_drive): Reimplement without assuming (and verifying) BIOS-like
8022         drive names.
8023         (call_hook): Remove.
8024         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
8025         member.  Assume drive has partitions.
8026         (grub_util_biosdisk_open): Access device names via `.device' struct
8027         member.
8028         (open_device): Likewise.
8029         (find_drive): Likewise.
8030         (read_device_map): Adjust map[] usage to match the new struct
8031         definition.  Don't check for duplicates (still possible, but not cheap
8032         anymore).
8033         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
8034         (make_device_name): Remove assumption of BIOS-like drive names.
8036 2008-05-30  Pavel Roskin  <proski@gnu.org>
8038         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
8039         compiling execute.c doesn't need grub_script.tab.h anymore.
8040         (normal/command.c_DEPENDENCIES): Likewise.
8041         (normal/function.c_DEPENDENCIES): Likewise.
8042         * conf/i386-ieee1275.rmk: Likewise.
8043         * conf/i386-linuxbios.rmk: Likewise.
8044         * conf/i386-pc.rmk: Likewise.
8045         * conf/powerpc-ieee1275.rmk: Likewise.
8046         * conf/sparc64-ieee1275.rmk: Likewise.
8048 2008-05-29  Pavel Roskin  <proski@gnu.org>
8050         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8051         when scanning metadata for volume group name.
8053         * include/grub/script.h: Don't include grub_script.tab.h.  It's
8054         a generated file, which may only be included from the files with
8055         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
8056         use union YYSTYPE, as the later allows forward declaration.
8057         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8059 2008-05-29  Robert Millan  <rmh@aybabtu.com>
8061         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8062         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8063         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8064         (grub_console_checkkey): Add grub_dprintf() call to report unknown
8065         scan codes.
8067 2008-05-29  Robert Millan  <rmh@aybabtu.com>
8069         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8070         control key combinations.
8072 2008-05-29  Robert Millan  <rmh@aybabtu.com>
8074         * util/powerpc/ieee1275/grub-install.in: Move from here ...
8075         * util/ieee1275/grub-install.in: ... to here.
8076         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8077         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8078         (grub_install_SOURCES): Likewise.
8080 2008-05-29  Robert Millan  <rmh@aybabtu.com>
8082         * fs/affs.c: Update copyright year.
8083         * fs/ext2.c: Likewise.
8084         * fs/fshelp.c: Likewise.
8085         * fs/hfsplus.c: Likewise.
8086         * fs/ntfs.c: Likewise.
8087         * fs/xfs.c: Likewise.
8088         * include/grub/fshelp.h: Likewise.
8089         * util/grub-mkdevicemap.c: Likewise.
8091 2008-05-28  Robert Millan  <rmh@aybabtu.com>
8093         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8094         might need to be fatfs to support some firmware implementations
8095         (e.g. OFW or EFI).
8097 2008-05-28  Robert Millan  <rmh@aybabtu.com>
8099         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8100         devices.
8101         * util/grub-mkdevicemap.c (get_mmc_disk_name)
8102         (make_device_map): Likewise.
8104 2008-05-20  Bean  <bean123ch@gmail.com>
8106         * fs/fshelp.c (grub_fshelp_map_block): New function.
8107         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8108         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8110         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8111         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8112         (grub_fshelp_journal): New structure.
8113         (grub_fshelp_map_block): New function prototype.
8114         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8115         (grub_fshelp_map_block): Likewise.
8117         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8118         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8119         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8120         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8121         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8122         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8123         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8124         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8125         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8126         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8127         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8128         (grub_ext2_sblock): New members for journal support.
8129         (grub_ext3_journal_header): New structure.
8130         (grub_ext3_journal_revoke_header): Likewise.
8131         (grub_ext3_journal_block_tag): Likewise.
8132         (grub_ext3_journal_sblock): Likewise.
8133         (grub_fshelp_node): New members logfile and journal.
8134         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8135         grub_fshelp_map_block to get real block number.
8136         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8137         number.
8138         (grub_ext2_read_inode): Likewise.
8139         (grub_ext3_get_journal): New function.
8140         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8141         (grub_ext2_close): Release memory used by journal.
8143         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8144         (REISERFS_MAGIC_DESC_BLOCK): New macro.
8145         (grub_reiserfs_transaction_header): Renamed to
8146         grub_reiserfs_description_block, replace field data with real_blocks.
8147         (grub_reiserfs_commit_block): New structure.
8148         (grub_reiserfs_data): New member journal.
8149         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8150         number.
8151         (grub_reiserfs_read_symlink): Likewise.
8152         (grub_reiserfs_iterate_dir): Likewise.
8153         (grub_reiserfs_open): Likewise.
8154         (grub_reiserfs_read): Likewise.
8155         (grub_reiserfs_get_journal): New function.
8156         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8157         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8158         using grub_reiserfs_get_journal.
8159         (grub_reiserfs_close): Release memory used by journal.
8161         * fs/affs.c (grub_affs_read_block): Change block type to
8162         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8164         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8166         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8168         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8170         * fs/udf.c (grub_udf_read_block): Change block type to
8171         grub_disk_addr_t. Use type cast to avoid warning.
8173         * fs/xfs.c (grub_xfs_read_block): Likewise.
8175 2008-05-16  Christian Franke  <franke@computer.org>
8177         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8178         to ensure that break with ESC will always work.
8179         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8180         Remove ESC from keyboard queue.
8182 2008-05-16  Christian Franke  <franke@computer.org>
8184         * util/biosdisk.c: [__CYGWIN__] Add includes.
8185         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8186         (get_os_disk): Move variable declarations to OS specific
8187         parts to avoid warning.
8188         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8189         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8190         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8191         Cygwin.
8192         * util/getroot.c: [__CYGWIN__] Add includes.
8193         (strip_extra_slashes): Fix "/" case.
8194         [__CYGWIN__] (get_win32_path): New function.
8195         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8196         [__CYGWIN__] (find_root_device): Disable.
8197         [__CYGWIN__] (get_bootsec_serial): New function.
8198         [__CYGWIN__] (find_cygwin_root_device): Likewise.
8199         [__linux__] (grub_guess_root_device): Add early returns to simplify
8200         structure.
8201         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8202         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8203         check for Linux only.
8205 2008-05-15  Bean  <bean123ch@gmail.com>
8207         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8208         keyboard hang problem in apple's intel mac.
8210 2008-05-09  Robert Millan  <rmh@aybabtu.com>
8212         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8213         devices.
8214         * util/grub-mkdevicemap.c (get_virtio_disk_name)
8215         (make_device_map): Likewise.
8216         Reported by Aurelien Jarno <aurel32@debian.org>
8218 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
8220         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8221         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8222         (make_device_map): Output entries for xvd type disks.
8224 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8226         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8227         devices.
8228         * util/grub-mkdevicemap.c (get_cciss_disk_name)
8229         (make_device_map): Likewise.
8230         Reported by Roland Dreier <rdreier@cisco.com>
8232 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8234         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8235         grub_strstr() call.  Correct a few mistakes in failure path handling.
8237 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8239         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8240         Do not print a trailing slash (therefore, the root directory is an
8241         empty string).
8242         (convert_system_path_to_grub_path): Do not remove trailing slash
8243         from make_system_path_relative_to_its_root() output.
8245         * util/i386/pc/grub-install.in: Add trailing slash to output from
8246         make_system_path_relative_to_its_root().
8248 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8250         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
8251         ensures that output lines aren't intermangled with those sent to
8252         stderr (via grub_util_info()).
8253         * util/grub-probe.c (grub_refresh): Likewise.
8254         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8256 2008-05-05  Christian Franke  <franke@computer.org>
8258         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8259         Add Cygwin device names.
8260         (get_ide_disk_name) [__CYGWIN__]: Likewise.
8261         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8262         (check_device): Return error instead of success on empty name.
8263         (make_device_map): Move label inside linux specific code to
8264         prevent compiler warning.
8266 2008-04-30  Robert Millan  <rmh@aybabtu.com>
8268         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8269         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8270         first boot option.
8271         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8273 2008-04-29  Robert Millan  <rmh@aybabtu.com>
8275         * docs/grub.cfg: New file (example GRUB configuration).
8277 2008-04-26  Robert Millan  <rmh@aybabtu.com>
8279         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
8280         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8281         and `disk/ieee1275/nand.c'.
8283 2008-04-25  Bean  <bean123ch@gmail.com>
8285         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8286         i386-linuxbios.
8288         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8289         change the buffer size to 4096 for cdrom device.
8291         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8292         and nand.mod.
8293         (_linux_mod_SOURCES): New variable.
8294         (_linux_mod_CFLAGS): Likewise.
8295         (_linux_mod_LDFLAGS): Likewise.
8296         (linux_mod_SOURCES): Likewise.
8297         (linux_mod_CFLAGS): Likewise.
8298         (linux_mod_LDFLAGS): Likewise.
8299         (nand_mod_SOURCES): Likewise.
8300         (nand_mod_CFLAGS): Likewise.
8301         (nand_mod_LDFLAGS): Likewise.
8303         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8304         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8305         type property. (nand device in olpc don't have this property)
8307         * include/grub/disk.h (grub_disk_dev_id): New macro
8308         GRUB_DISK_DEVICE_NAND_ID.
8310         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8311         function prototype.
8312         (grub_rescue_cmd_initrd): Likewise.
8314         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8315         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8316         ofw_cif_handler and ofw_idt, adjust padding number.
8318         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8319         GRUB_MACHINE_IEEE1275 is defined.
8321         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8322         Use NESTED_FUNC_ATTR attribute on the hook parameter.
8324         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8325         on nested function heap_init.
8326         (grub_upper_mem): New variable for i386-ieee1275.
8327         (grub_get_extended_memory): New function for i386-ieee1275.
8328         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8330         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8331         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8332         property.
8334         * loader/i386/ieee1275/linux.c: New file.
8336         * loader/i386/ieee1275/linux_normal.c: New file.
8338         * disk/ieee1275/nand.c: New file.
8340 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
8342         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8343         value.
8344         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8346 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8348         Restructures early code path on ieee1275 to unify grub_main() as
8349         the first C function that is executed in every platform.
8351         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8352         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8353         cmain().
8354         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8355         * kern/ieee1275/cmain.c (cmain): Rename to ...
8356         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8357         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8358         at the beginning.
8360 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8362         * util/update-grub.in: Fix syntax error when setting
8363         `GRUB_PRELOAD_MODULES'.
8364         Reported by Stephane Chazelas <stephane@artesyncp.com>
8366 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
8368         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8369         section into account, newer toolchains generate unique build ids
8370         * configure.ac: remove the test for --build-id=none acceptance,
8371         we want build ids to be preserved
8372         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8373         far from other sections don't cause the raw binary images grow
8374         size
8376 2008-04-15  Robert Millan  <rmh@aybabtu.com>
8378         * disk/lvm.c: Update copyright year.
8379         * kern/misc.c: Likewise.
8381 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8383         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8384         there is no memory left for physical volume name.
8386 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8388         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8389         volume name mapping to support bigger than 9 character names properly.
8391 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8393         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8394         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8396 2008-04-13  Christian Franke  <franke@computer.org>
8398         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8399         to create a floppy emulation boot CD when non emulation mode
8400         does not work.
8401         Enable Joliet CD filesystem extension.
8403 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8405         * kern/misc.c (grub_strncat): Fix off-by-one error.
8406         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8408         * kern/env.c (grub_env_context_close): Clear current context, not
8409         previous one.
8410         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8412         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8414 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8416         Improve robustness when handling LVM.
8418         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8419         (and leave `*p' unmodified).
8420         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8421         through it.
8422         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8423         iterating through it.
8424         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8425         through it.
8426         (grub_lvm_scan_device): Check the return value (and fail gracefully
8427         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8428         Don't assume `vg->pvs != NULL' when iterating through it.
8430 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8432         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8433         * genmk.rb (partmap): New variable.
8434         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8435         (#{partmap}): New target rule.
8436         * genpartmaplist.sh: New file.
8437         * Makefile.in (pkglib_DATA): Add partmap.lst.
8438         (partmap.lst): New target rule.
8439         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8440         modules (including all partition maps), instead of preloading them.
8442 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8444         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8445         `linux-boot-prober' (if installed) to detect other operating
8446         systems which are installed on the computer and add them to
8447         the boot menu.
8448         * conf/common.rmk: Build and install 30_os-prober.
8450 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8452         * kern/powerpc/ieee1275/init.c: Move from here ...
8453         * kern/ieee1275/init.c: ... to here.  Update all users.
8455         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8456         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8458         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8459         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8461         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8462         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8464 2008-04-10  Pavel Roskin  <proski@gnu.org>
8466         * configure.ac: Always use "_cv_" in cache variables for
8467         compatibility with Autoconf 2.62.
8469 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8471         Revert grub/machine/init.h addition by Pavel (since it breaks on
8472         i386-ieee1275 and others):
8473         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8474         * util/powerpc/ieee1275/misc.c: Likewise.
8476 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8478         * util/grub-probe.c (probe): Improve error message.
8480 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8482         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8483         (this prevents the presence of a bogus entry from ruining the whole
8484         thing).
8486 2008-04-06  Pavel Roskin  <proski@gnu.org>
8488         * util/biosdisk.c: Include grub/util/biosdisk.h.
8489         * util/grub-fstest.c (execute_command): Make static.
8490         * util/grub-mkdevicemap.c (check_device): Likewise.
8491         * util/i386/pc/misc.c: Include grub/machine/init.h.
8492         * util/powerpc/ieee1275/misc.c: Likewise.
8493         * util/lvm.c: Include grub/util/lvm.h.
8494         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8495         grub/cache.h.
8496         * util/raid.c: Include grub/util/raid.h.
8497         (grub_util_getdiskname): Make static.
8499         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8500         grub_hostfs_fini(), as they are called from grub_init_all() and
8501         grub_fini_all() respectively.  This fixes an infinite loop in
8502         grub-fstest due to double registration of hostfs.
8503         Reported by Christian Franke <Christian.Franke@t-online.de>
8505 2008-04-05  Pavel Roskin  <proski@gnu.org>
8507         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8508         all 8 functions.  Otherwise, probe function 0 only.
8510 2008-04-04  Pavel Roskin  <proski@gnu.org>
8512         * commands/lspci.c (grub_lspci_iter): Print the bus number
8513         correctly.
8515         * commands/lspci.c (grub_pci_classes): Fix typos.
8516         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8517         before device ID, as it's normally done.
8519         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8520         Fix signedness warnings.
8521         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8522         Likewise.
8523         * util/ieee1275/get_disk_name.c: Include config.h so that
8524         _GNU_SOURCE is defined and getline() is declared.  Mark an
8525         unused argument as such.  Fix a signedness warning.
8527 2008-04-02  Pavel Roskin  <proski@gnu.org>
8529         * genkernsyms.sh.in: Use more robust assignments for CC and
8530         srcdir.  Quote srcdir.
8531         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8532         the symbol table is not empty.
8534         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8535         * fs/cpio.c (grub_cpio_read): Likewise.
8537 2008-04-01  Pavel Roskin  <proski@gnu.org>
8539         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8540         * disk/host.c (grub_host_open): Likewise.
8541         * disk/loopback.c (grub_loopback_open): Likewise.
8542         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8543         disk->id as in disk/host.c, not a multi-character constant.
8545         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8546         later is obsolete, potentially dangerous and sets a bad example.
8547         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8548         * util/misc.c (grub_util_get_image_size): Likewise.
8550         * disk/loopback.c (options): Improve help for "--partitions".
8552         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8553         options to align them with the short options, e.g. "echo -e".
8555 2008-03-31  Bean  <bean123ch@gmail.com>
8557         * video/reader/png.c (grub_png_data): New member is_16bit and
8558         image_data.
8559         (grub_png_decode_image_header): Detect 16 bit png image.
8560         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8561         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8562         (grub_video_reader_png): Release memory occupied by image_data.
8564         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8565         4096 bytes.
8566         (grub_nfs_mount): Skip the test for sector per cluster.
8568         * include/grub/ntfs.h (MAX_SPC): Removed.
8570 2008-03-31  Bean  <bean123ch@gmail.com>
8572         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8573         (grub_probe_SOURCES): Add fs/afs.c.
8574         (grub_fstest_SOURCES): Likewise.
8575         (afs_mod_SOURCES): New variable.
8576         (afs_mod_CFLAGS): Likewise.
8577         (afs_mod_LDFLAGS): Likewise.
8579         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8580         (grub_emu_SOURCES): Likewise.
8582         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8584         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8586         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8588         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8590         * fs/afs.c: New file.
8592 2008-03-30  Pavel Roskin  <proski@gnu.org>
8594         * disk/host.c: Include grub/misc.h to fix a warning.
8595         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8596         warnings about implicit declarations.
8598         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8599         variable.
8600         * include/grub/i386/loader.h: Change declaration of
8601         grub_linux_boot() to match what grub_loader_set() expects.
8602         * util/getroot.c (grub_guess_root_device): Return const char* to
8603         fix a warning.
8604         * util/grub-probe.c (probe): Fix a warning about uninitialized
8605         abstraction_name variable.
8606         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8607         second argument as unused to fix a warning.
8609         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8610         missing grub_error() call.
8612         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8613         2.60 and newer uses it to define datadir.
8615         * commands/sleep.c: Fix warning about implicit declaration.
8616         * disk/memdisk.c: Likewise.
8617         * loader/aout.c: Likewise.
8618         * loader/i386/bsd_normal.c: Likewise.
8619         * util/grub-probe.c: Likewise.
8621         * commands/i386/cpuid.c (has_longmode): Make static.
8622         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8623         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8625         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8626         GDT.  This is more robust, as %ds can change.
8627         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8628         calling real_to_prot().
8629         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8631 2008-03-28  Pavel Roskin  <proski@gnu.org>
8633         * kern/i386/pc/startup.S: Assert that uncompressed functions
8634         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8635         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8636         code, as they push parts of the code (error handlers) beyond
8637         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8638         code as correctness and size.
8640 2008-03-28  Pavel Roskin  <proski@gnu.org>
8642         * kern/i386/pc/startup.S
8643         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8644         data block address to the real mode, keep offset minimal.  This
8645         works around a bug in AWARD BIOS on old Athlon systems, which
8646         makes CD detection hang.
8648 2008-03-26  Pavel Roskin  <proski@gnu.org>
8650         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8651         const.
8652         * include/grub/normal.h: Add grub_parse_color_name_pair()
8653         declaration.
8655 2008-03-24  Bean  <bean123ch@gmail.com>
8657         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8658         (cd_count): Removed.
8659         (cd_drive): New variable.
8660         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8661         (grub_biosdisk_call_hook): Likewise.
8662         (grub_biosdisk_iterate): Change cdrom detection method.
8663         (grub_biosdisk_open): Replace cd_start with cd_drive.
8664         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8665         detect cdrom device.
8667         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8668         Removed.
8669         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8670         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8671         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8672         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8673         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8674         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8675         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8676         (grub_biosdisk_cdrp): New structure.
8677         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8679         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8681         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8682         device.
8684         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8685         New function.
8687 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8689         Remove 2 TiB limit in ata.mod.
8690         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8691         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8692         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8693         grub_uint64_t instead of grub_uint32_t.
8695 2008-03-05  Bean  <bean123ch@gmail.com>
8697         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8698         (grub_multiboot): Set boot device.
8700         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8702 2008-03-02  Bean  <bean123ch@gmail.com>
8704         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8705         symlink_buffer.
8707 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8709         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8710         texinfo.tex.
8712         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8713         modified.
8715         * docs/fdl.texi: New file.
8717         * docs/mdate-sh: New file. Copied from gnulib.
8718         * docs/texinfo.tex: Likewise.
8720         * config.guess: Updated from gnulib.
8721         * install-sh: Likewise.
8723 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8725         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8726         (aout_mod_SOURCES): New variable.
8727         (aout_mod_CFLAGS): Likewise.
8728         (aout_mod_LDFLAGS): Likewise.
8730         * conf/i386-ieee1275.rmk: Likewise.
8732 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8734         * util/update-grub.in: Reorganise terminal validity check.  Accept
8735         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8736         Based on suggestion by Franklin PIAT.
8738 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8740         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8741         function.
8742         * util/getroot.c (grub_util_check_block_device): New function that
8743         returns the given argument if it is a block device and returns NULL else.
8744         * util/grub-probe.c (argument_is_device): New variable.
8745         (probe): Promote device_name from a variable to an argument. Receive
8746         device_name from grub_util_check_block_device() if path is NULL and from
8747         grub_guess_root_device() else. Do not free() device_name anymore.
8748         (options): Introduce new parameter '-d, --device'.
8749         (main): Add description of the new parameter to the help screen.
8750         Rename path variable to argument. Set argument_is_device if the '-d'
8751         option is given. Pass argument to probe() depending on
8752         argument_is_device.
8754 2008-02-24  Bean  <bean123ch@gmail.com>
8756         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8757         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8758         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8759         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8760         (GRUB_ISO9660_VOLDESC_END): Likewise.
8761         (grub_iso9660_primary_voldesc): New member escape.
8762         (grub_iso9660_data): New member joliet.
8763         (grub_iso9660_convert_string): New function.
8764         (grub_iso9660_mount): Detect joliet extension.
8765         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8766         (grub_iso9660_iso9660_label): Likewise.
8768         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8769         (grub_setup_SOURCES): Add fs/udf.c.
8770         (grub_fstest_SOURCES): Likewise.
8771         (udf_mod_SOURCES): New variable.
8772         (udf_mod_CFLAGS): Likewise.
8773         (udf_mod_LDFLAGS): Likewise.
8775         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8776         (grub_emu_SOURCES): Likewise.
8778         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8780         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8782         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8784         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8786         * fs/udf.c: New file.
8788 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8790         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8791         (normal/lexer.c_DEPENDENCIES): New variables.
8792         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8793         (normal/lexer.c_DEPENDENCIES): Likewise.
8794         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8795         (normal/lexer.c_DEPENDENCIES): Likewise.
8796         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8797         (normal/lexer.c_DEPENDENCIES): Likewise.
8798         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8799         (normal/lexer.c_DEPENDENCIES): Likewise.
8800         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8801         (normal/lexer.c_DEPENDENCIES): Likewise.
8803 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8805         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8806         since they were intended to be in hex.  This didn't break previously
8807         because of a bug in gpt_partition_map_iterate() (see below).
8809         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8810         when checking the validity of GPT header.
8811         Remove `partno', since it always provides the same information as `i'.
8813 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8815         * include/grub/efi/time.h: Fix a wrong comment.
8817 2008-02-19  Pavel Roskin  <proski@gnu.org>
8819         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8820         message.
8822 2008-02-19  Bean  <bean123ch@gmail.com>
8824         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8825         (aout_mod_SOURCES): New variable.
8826         (aout_mod_CFLAGS): Likewise.
8827         (aout_mod_LDFLAGS): Likewise.
8828         (_bsd_mod_SOURCES): New variable.
8829         (_bsd_mod_CFLAGS): Likewise.
8830         (_bsd_mod_LDFLAGS): Likewise.
8831         (bsd_mod_SOURCES): New variable.
8832         (bsd_mod_CFLAGS): Likewise.
8833         (bsd_mod_LDFLAGS): Likewise.
8835         * include/grub/aout.h: New file.
8837         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8839         * include/grub/i386/bsd.h: New file.
8841         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8842         to make it public.
8844         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8845         function is called, so that it's possible to change it inside the hook.
8846         (grub_elf64_load): Likewise.
8847         (grub_elf_file): Don't close the file if elf header is not found.
8848         (grub_elf_close): Close the file if grub_elf_file fails (The new
8849         grub_elf_file won't close it).
8850         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8851         (grub_elf64_size): Likewise.
8853         * kern/i386/loader.S (grub_unix_real_boot): New function.
8855         * loader/aout.c: New file.
8857         * loader/i386/bsd.c: New file.
8859         * loader/i386/bsd_normal.c: New file.
8861         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8863         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8864         can test other formats.
8866 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8868         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8869         (grub_gpt_partition_type_empty): Redefine with macro from
8870         `<grub/gpt_partition.h>'.
8871         (gpt_partition_map_iterate): Adjust partition type comparison.
8873         Export `entry' as partmap-specific `part.data' struct.
8874         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8876         * include/grub/gpt_partition.h (grub_gpt_header)
8877         (grub_gpt_partentry): ... to here (new file).
8879         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8881         (grub_gpt_partition_type_bios_boot): New const variable, defined
8882         with macro from `<grub/gpt_partition.h>'.
8884         (setup): Replace `first_start' with `embed_region', which keeps
8885         track of the embed region (and is partmap-agnostic).
8887         Replace find_first_partition_start() with find_usable_region(),
8888         which finds a usable region for embedding using partmap-specific
8889         knowledge (supports PC/MSDOS and GPT).
8891         Fix all assumptions that the embed region start at sector 1, using
8892         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8893         rather than `first_start' to calculate available size.
8895         In grub_util_info() message, replace "into after the MBR" with an
8896         indication of the specific sector our embed region starts at.
8898 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8900         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8901         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8902         `commands/reboot.c'.
8903         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8904         (halt_mod_SOURCES): Likewise.
8905         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8906         (halt_mod_SOURCES): Likewise.
8908 2008-02-17  Christian Franke  <franke@computer.org>
8910         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8912 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8914         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8915         set `first_start' to 0 for non-PC/MSDOS partition maps.
8917 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8919         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8920         do not assume partition map is PC/MSDOS before performing checks that
8921         are specific to that layout.
8923 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8925         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8926         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8927         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8929 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8931         * configure.ac: Only a cosmetic change on the handling of
8932         -fno-stack-protector.
8934 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8936         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8937         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8938         reboot.c.
8939         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8940         (halt_mod_SOURCES): New variable.
8941         (halt_mod_CFLAGS): Likewise.
8942         (halt_mod_LDFLAGS): Likewise.
8943         (reboot_mod_SOURCES): Likewise.
8944         (reboot_mod_CFLAGS): Likewise.
8945         (reboot_mod_LDFLAGS): Likewise.
8947         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8948         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8949         reboot.c.
8950         (halt_mod_SOURCES): Likewise.
8951         (reboot_mod_SOURCES): Likewise.
8953         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8954         commands/i386/pc/reboot.c by commands/reboot.c.
8955         (reboot_mod_SOURCES): Likewise.
8957         * commands/i386/pc/reboot.c: merge this file ...
8959         * commands/ieee1275/reboot.c: ... and this file ...
8961         * commands/reboot.c: ... to this file.
8962         Add some precompiler directive to include the correct header for
8963         each machine.
8965         * commands/ieee1275/halt.c: move this file ...
8967         * commands/halt.c: ... to here.
8968         Add some precompiler directive to include the correct header for
8969         each machine.
8971         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8972         (grub_halt): Likewise.
8974         * kern/efi/efi.c (grub_reboot): New function.
8975         (grub_halt): Likewise.
8977 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8979         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8980         /dev (like it is done for /dev/mapper).  This doesn't provide support
8981         for EVMS, but at least it is now easy to identify the problem when it
8982         arises.
8984 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8986         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8987         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8988         comparing it with -1, not 0.
8990 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8992         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8993         `disk/lvm.c'.
8994         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8995         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8997         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8998         `disk/lvm.c' to the end of the list.
8999         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9000         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9002 2008-02-10  Robert Millan  <rmh@aybabtu.com>
9004         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
9005         grub_print_error() instead.  This will let user know why we're entering
9006         rescue mode.
9007         Based on suggestions from Sam Morris.
9009 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
9011         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
9012         on remaining N args, instead of "--" arg N times.
9014 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
9016         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
9017         (fill_with_default_glyph): Changed to use unknown_glyph for fill
9018         pattern for unknown glyphs.
9020 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9022         * configure.ac: Probe for `help2man'.
9023         * Makefile.in (builddir): New variable.
9024         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
9025         or otherwise add a few flags/options to it.
9026         (install-local): For every executable utility or script that is
9027         installed, invoke $(HELP2MAN) to install a manpage based on --help
9028         output.
9030         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
9031         that it doesn't prevent --help from working in build tree.
9033         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
9034         with `bug-grub@gnu.org'.
9035         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
9036         * util/update-grub.in (usage): New function.
9037         Implement proper argument check, with support for --help and --version
9038         (as well as existing -y).
9040 2008-02-09  Christian Franke  <franke@computer.org>
9042         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9043         avoid overwriting previous output.
9044         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9046 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9048         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9049         drawing the menu.
9051 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9053         * commands/sleep.c: New file.
9054         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9055         (sleep_mod_SOURCES): New variable.
9056         (sleep_mod_CFLAGS): Likewise.
9057         (sleep_mod_LDFLAGS): Likewise.
9059 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9061         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9062         situations in which we can deduce the RAID size and the superblock
9063         doesn't match it.
9065 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9067         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
9068         and return a grub_diskmemberlist_t composed of LVM physical volumes.
9069         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9071         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
9072         and return a grub_diskmemberlist_t composed of physical array members.
9073         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9075         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9076         prototype.
9077         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9078         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9079         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9081         * util/grub-probe.c (probe): Move partmap probing code from here ...
9082         (probe_partmap): ... to here.
9083         (probe): Use probe_partmap() once for the disk we're probing, and
9084         additionally, when such disk contains a memberlist() struct member,
9085         once for each disk that is contained in the structure returned by
9086         memberlist().
9088 2008-02-09  Robert Millan  <rmh@aybabtu.com>
9090         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9091         environment variable to 'all' in order to obtain debug output from
9092         non-util/ code.
9093         * util/i386/pc/grub-setup.c (main): Likewise.
9095 2008-02-08  Robert Millan  <rmh@aybabtu.com>
9097         * disk/raid.c (grub_raid_scan_device): Check for
9098         `array->device[sb.this_disk.number]' rather than for
9099         `array->device[sb.this_disk.number]->name', since the latter is not
9100         guaranteed to be accessible.
9102 2008-02-08  Robert Millan  <rmh@aybabtu.com>
9104         * disk/raid.c: Update copyright.
9105         * fs/cpio.c: Likewise.
9106         * include/grub/raid.h: Likewise.
9107         * loader/i386/pc/multiboot.c: Likewise.
9108         * util/hostfs.c: Likewise.
9110 2008-02-08  Robert Millan  <rmh@aybabtu.com>
9112         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9113         to a grub_disk_t array.
9114         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9115         `device[x]'.
9116         (grub_raid_scan_device): Replace `device[x].name' accesses with
9117         `device[x]->name'.  Simplify initialization of `array->device[x]'.
9119 2008-02-08  Robert Millan  <rmh@aybabtu.com>
9121         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9122         grub_dprintf() calls.
9123         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9124         error message.
9126 2008-02-07  Christian Franke  <franke@computer.org>
9128         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9129         instead of fseek and ftell to support large files.
9130         (grub_hostfs_read): Likewise.
9132 2008-02-07  Robert Millan  <rmh@aybabtu.com>
9134         Patch from Jeroen Dekkers.
9135         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
9136         failure, since successfully reading all array members might not be
9137         required.
9139 2008-02-06  Robert Millan  <rmh@aybabtu.com>
9141         * util/grub-probe.c (probe): Simplify partmap probing (with the
9142         assumption that the first word up to the underscore equals to
9143         the module name).
9145 2008-02-06  Christian Franke  <franke@computer.org>
9147         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9148         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9149         last block of a cpio or tar stream.
9150         Check for "TRAILER!!!" instead of any empty data
9151         block to detect last block of a cpio stream.
9152         (grub_cpio_dir): Fix constness of variable np.
9153         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9154         cpio or tar trailer is detected.  This fixes a crash
9155         on open of a non existing file.
9157 2008-02-05  Bean  <bean123ch@gmail.com>
9159         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9160         address of entry.
9161         (grub_multiboot_load_elf64): Likewise.
9162         (grub_multiboot): Initialize mbi structure.
9164         * util/grub-fstest.c: Don't include unused header file script.h.
9166         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9167         of file.
9168         (grub_fstest_SOURCES): Likewise.
9170 2008-02-05  Robert Millan  <rmh@aybabtu.com>
9172         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9173         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9174         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9175         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9177         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9178         (translation_table): Replace hardcoded values with macros
9179         provided by `<grub/term.h>'.
9181         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9182         (keyboard_map): Correct/add a few values, with macros provided
9183         by `<grub/term.h>'.
9184         (keyboard_map_shift): Zero values that don't differ from their
9185         `keyboard_map' equivalents.
9186         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9187         Discard the second scan code that is always sent by Caps lock.
9188         Only use `keyboard_map_shift' when it provides a non-zero value,
9189         otherwise fallback to `keyboard_map'.
9191 2008-02-04  Bean  <bean123ch@gmail.com>
9193         * Makefile.in (enable_grub_fstest): New variable.
9195         * conf/common.rmk (grub_fstest_init.lst): New rule.
9196         (grub_fstest_init.h): Likewise.
9197         (grub_fstest_init.c): Likewise.
9198         (util/grub-fstest.c_DEPENDENCIES): New variable.
9199         (grub_fstest_SOURCES): Likewise.
9201         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9203         * util/grub-fstest.c: New file.
9205 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9207         Make grub-setup handle a separate root device.
9209         * util/i386/pc/grub-setup.c (setup): Always open the root device,
9210         so that the root device can be compared with the destination
9211         device.
9212         When embedding the core image, if the root and destination devices
9213         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9214         0xFF.
9215         When not embedding, set ROOT_DRIVE to 0xFF.
9217 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9219         Add support for having a grub directory in a different drive. This
9220         is still only the data handling part.
9222         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9223         (codestart): Save %dh in GRUB_ROOT_DRIVE.
9224         (grub_root_drive): New variable.
9226         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9227         instead of GRUB_BOOT_DRIVE to construct a device name. Set
9228         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9229         as it was.
9231         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9233         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9234         macro.
9235         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9237         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9238         is bogus, because PXE booting does not specify any drive
9239         correctly.
9241         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9242         am not sure if this is really correct.
9244         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9245         is always identical to the boot drive when booting from a CD.
9247         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9248         longer.
9249         (root_drive): New variable.
9250         (real_start): Unconditionally set %dh to ROOT_DRIVE.
9251         (setup_sectors): Push %dx right after popping it, because %dh will
9252         be modified later.
9253         (copy_buffer): Restore %dx.
9255 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9257         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9258         use `cdboot.img' for cdrom images.
9260 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9262         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9263         only setup gfxterm when `font' command has succeeded.
9265 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9267         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9268         (grub_rescue_cmd_multiboot_loader)
9269         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9271 2008-02-03  Pavel Roskin  <proski@gnu.org>
9273         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9274         %edx and %esi from stack only after grub_gate_a20() is called.
9275         grub_gate_a20() clobbers %edx.
9277 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9279         * configure.ac (AC_INIT): Bumped to 1.96.
9281         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9282         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9283         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9284         video/readers/png.c.
9286 2008-02-03  Bean  <bean123ch@gmail.com>
9288         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9289         (cdboot_img_SOURCES): New variable.
9290         (cdboot_img_ASFLAGS): New variable.
9291         (cdboot_img_LDFLAGS): New variable.
9293         * boot/i386/pc/cdboot.S: New file.
9295         * disk/i386/pc/biosdisk.c (cd_start): New variable.
9296         (cd_count): Likewise.
9297         (grub_biosdisk_get_drive): Add support for cd device.
9298         (grub_biosdisk_call_hook): Likewise.
9299         (grub_biosdisk_iterate): Likewise.
9300         (grub_biosdisk_open): Likewise.
9301         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9302         (grub_biosdisk_rw): Support reading from cd device.
9303         (GRUB_MOD_INIT): Iterate cd devices.
9305         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9306         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9307         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9309         * kern/i386/pc/init.c (make_install_device): Check for cd device.
9311 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9313         * commands/read.c: New file.
9314         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9315         (read_mod_SOURCES): New variable.
9316         (read_mod_CFLAGS): Likewise.
9317         (read_mod_LDFLAGS): Likewise.
9319 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9321         * normal/main.c (grub_normal_execute): Check for `menu->size' when
9322         determining whether menu has to be displayed.
9324 2008-02-02  Marco Gerards  <marco@gnu.org>
9326         * bus/pci.c: New file.
9328         * include/grub/pci.h: Likewise.
9330         * include/grub/i386/pc/pci.h: Likewise.
9332         * commands/lspci.c: Likewise.
9334         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9335         `lspci.mod'.
9336         (pci_mod_SOURCES): New variable.
9337         (pci_mod_CFLAGS): Likewise.
9338         (pci_mod_LDFLAGS): Likewise.
9339         (lspci_mod_SOURCES): Likewise.
9340         (lspci_mod_CFLAGS): Likewise.
9341         (lspci_mod_LDFLAGS): Likewise.
9343 2008-02-02  Bean  <bean123ch@gmail.com>
9345         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9346         (grub_ufs_get_file_block): Fix indirect block calculation problem.
9348         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9349         (grub_xfs_btree_node): New structure.
9350         (grub_xfs_btree_root): New structure.
9351         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9352         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9353         (GRUB_XFS_EXTENT_BLOCK): Likewise.
9354         (GRUB_XFS_EXTENT_SIZE): Likewise.
9355         (grub_xfs_read_block): Support btree format type.
9356         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9357         Use directory block as basic unit.
9359         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9361         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9362         __attribute__ ((__regparm__ (1))).
9364 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9366         Correct a mistake in previous commit.
9368         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9369         top.
9370         (normal/command.c_DEPENDENCIES): New variable.
9372 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9374         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9375         top.
9376         (normal/command.c_DEPENDENCIES): New variable.
9377         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9378         * conf/i386-ieee1275.rmk: Likewise.
9379         * conf/i386-linuxbios.rmk: Likewise.
9380         * conf/i386-pc.rmk: Likewise.
9381         * conf/sparc64-ieee1275.rmk: Likewise.
9382         * conf/powerpc-ieee1275.rmk: Likewise.
9383         (grub_emu_SOURCES): Add `fs/fshelp.c'.
9385         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9387 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9389         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9390         call at beginning of function.
9392 2008-01-31  Pavel Roskin  <proski@gnu.org>
9394         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9395         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9396         (grub_mkrescue_SOURCES): Likewise.
9397         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9399 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9401         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9402         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9403         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9404         (grub_probe_SOURCES): ... to here.
9406         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9407         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9408         * conf/i386-ieee1275.rmk: Likewise.
9409         * conf/i386-linuxbios.rmk: Likewise.
9410         * conf/powerpc-ieee1275.rmk: Likewise.
9412 2008-01-30  Tristan Gingold  <gingold@free.fr>
9414         * kern/rescue.c: Silently accept empty lines.
9416 2008-01-29  Bean  <bean123ch@gmail.com>
9418         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9419         (real_code_2): Code cleanup and change comment style.
9420         (move_memory): Avoid using 32-bit address mode.
9422 2008-01-29  Bean  <bean123ch@gmail.com>
9424         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9425         (png_mod_SOURCES): New variable.
9426         (png_mod_CFLAGS): Likewise.
9427         (png_mod_LDFLAGS): Likewise.
9429         * video/readers/png.c: New file.
9431 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9433         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9434         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9435         `ifndef GRUB_MOD_GAP' hack.
9436         * util/elf/grub-mkimage.c (add_segments): Likewise.
9438 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9440         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9441         `GRUB_MOD_GAP' for platforms in which it's not defined.
9442         * util/elf/grub-mkimage.c (add_segments): Likewise.
9444 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9446         Get grub-emu to build again (including parallel builds).
9448         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9449         Split into ...
9450         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9451         (normal/execute.c_DEPENDENCIES): ... this, ...
9452         (grub-emu_DEPENDENCIES): ... and this.
9454         * conf/i386-efi.rmk: Likewise.
9455         * conf/i386-linuxbios.rmk: Likewise.
9456         * conf/i386-ieee1275.rmk: Likewise.
9457         * conf/powerpc-ieee1275.rmk: Likewise.
9458         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9460 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9462         * NEWS: Add a few items.
9464 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9466         Fix parallel builds with grub-emu.  Based on earlier commit for
9467         grub-probe and grub-setup.
9469         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9470         (util/grub-emu.c_DEPENDENCIES): ... this.
9471         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9472         (util/grub-emu.c_DEPENDENCIES): ... this.
9473         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9474         (util/grub-emu.c_DEPENDENCIES): ... this.
9475         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9476         (util/grub-emu.c_DEPENDENCIES): ... this.
9477         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9478         (util/grub-emu.c_DEPENDENCIES): ... this.
9480 2008-01-27  Pavel Roskin  <proski@gnu.org>
9482         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9483         to create a gap between _end and the modules added to the image
9484         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9485         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9486         * util/elf/grub-mkimage.c (add_segments): Likewise.
9488 2008-01-26  Pavel Roskin  <proski@gnu.org>
9490         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9491         just return an error.
9493 2008-01-26  Bean  <bean123ch@gmail.com>
9495         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9496         (grub_reiserfs_get_item): Save offset of the next item.
9497         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9499 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9501         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9502         make all filesystem sources appear together (possibly fixing omissions
9503         while at it).
9504         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9505         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9506         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9507         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9509         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9510         add `kern/file.c'.
9511         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9512         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9513         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9514         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9516         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9517         (probe): Add a sanity check to make sure of our ability to read
9518         requested files when probing for filesystem type.
9520         * genmk.rb: Update copyright year (2007).
9522         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9523         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9524         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9525         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9526         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9527         : Remove function prototypes.
9529 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9531         Revert my previous commits (based on wrong assumption of how grub_errno
9532         works).
9534         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9535         * kern/file.c (grub_file_open): Likewise.
9537 2008-01-24  Pavel Roskin  <proski@gnu.org>
9539         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9540         that hang if GRUB tries to setup colors.
9541         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9542         colors for firmwares that don't support it.
9543         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9544         Recognize Open Hack'Ware, set flags to work around its
9545         limitations.
9547 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9549         * kern/file.c (grub_file_open): Do not account previous failures of
9550         unrelated functions when grub_errno is checked for.
9551         Reported by Oleg Strikov.
9553 2008-01-24  Bean  <bean123ch@gmail.com>
9555         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9556         (grub_ufs_sblock): New member volume name.
9557         (grub_ufs_find_file): Fix string copy bug.
9558         (grub_ufs_label): Implement this function properly.
9560         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9561         (grub_hfs_iterate_records): Use the correct file number for extents
9562         and catalog file. Fix problem in next index calculation.
9563         (grub_hfs_find_node): Replace recursive function call with loop.
9564         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9566 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9568         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9569         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9570         (grub_multiboot2_real_boot): New function prototype.
9572         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9573         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9575         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9576         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9578 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9580         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9581         #ifdef'ed out grub_printf().
9583 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9585         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9586         grub_dprintf calls, since they make "debug=all" mode unusable.
9587         (grub_console_checkkey): Likewise.
9589 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9591         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9592         `term/i386/pc/at_keyboard.c'.
9593         (pkglib_MODULES): Add `serial.mod'.
9594         (serial_mod_SOURCES): New variable.
9595         (serial_mod_CFLAGS): Likewise.
9596         (serial_mod_LDFLAGS): Likewise.
9598         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9599         `<grub/powerpc/ieee1275/console.h>'.
9600         (grub_keyboard_controller_init): New function prototype.
9601         (grub_console_checkkey): Likewise.
9602         (grub_console_getkey): Likewise.
9604         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9605         keyboard on i386.
9607         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9608         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9610 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9612         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9613         present, "(memdisk)/boot/grub" becomes the default prefix.
9615         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9616         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9617         allows users to overlay additional files into the image.
9619 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9621         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9622         and `machine/memory.h'.
9623         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9624         (_multiboot_mod_SOURCES): New variable.
9625         (_multiboot_mod_CFLAGS): Likewise.
9626         (_multiboot_mod_LDFLAGS): Likewise.
9627         (multiboot_mod_SOURCES): Likewise.
9628         (multiboot_mod_CFLAGS): Likewise.
9629         (multiboot_mod_LDFLAGS): Likewise.
9631         * include/grub/i386/ieee1275/loader.h: New file.
9633         * include/grub/i386/ieee1275/machine.h: Likewise.
9635         * include/grub/i386/ieee1275/memory.h: Likewise.
9637         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9638         variable declaration.
9639         (grub_os_area_size): Likewise.
9641         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9642         (grub_lower_mem, grub_upper_mem): New variables.
9643         (grub_stop_floppy): New function (just to make
9644         grub_multiboot2_real_boot() happy).
9646         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9647         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9648         (grub_stop): New function.
9649         Include `"../realmode.S"' and `"../loader.S"'.
9651         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9652         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9654         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9655         rely on grub_multiboot2_real_boot() for final boot.
9657 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9659         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9660         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9661         device that doesn't look like an SD card.
9662         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9663         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9664         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9665         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9666         found.
9668 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9670         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9671         avoid claiming over our own code.
9673 2008-01-22  Bean  <bean123ch@gmail.com>
9675         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9676         (jpeg_mod_SOURCES): New variable.
9677         (jpeg_mod_CFLAGS): Likewise.
9678         (jpeg_mod_LDFLAGS): Likewise.
9680         * video/readers/jpeg.c : New file.
9682 2008-01-22  Bean  <bean123ch@gmail.com>
9684         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9685         there are no more items.
9687 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9689         * kern/mm.c (grub_mm_init_region): Improve debug message.
9691 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9693         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9694         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9695         address.
9696         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9697         a C macro.
9698         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9699         Indicates start of upper memory.
9700         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9701         (generate_image): Abort when image size is big enough to corrupt
9702         upper memory.
9704         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9705         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9706         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9707         instead of hardcoding 0xA0000.
9708         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9709         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9710         instead of hardcoding 0xA0000.
9712 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9714         * disk/memdisk.c (memdisk_size): New variable.
9715         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9716         `memdisk_size'.
9717         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9718         image to dynamic memory.
9719         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9720         `memdisk_size'.  Free memdisk block.
9722 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9724         Fix detection of very small filesystems (like tar).
9726         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9727         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9728         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9729         a problem with this disk).
9731 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9733         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9734         on grub_biosdisk_rw_standard() error.
9736 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9738         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9739         recent changes.
9740         * kern/elf.c: Likewise.
9741         * kern/ieee1275/ieee1275.c: Likewise.
9742         * kern/powerpc/ieee1275/openfw.c: Likewise.
9743         * term/ieee1275/ofconsole.c: Likewise.
9745 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9747         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9749         * include/grub/kernel.h (grub_arch_memdisk_addr)
9750         (grub_arch_memdisk_size): Moved from here ...
9752         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9753         (grub_arch_memdisk_size): ... to here.
9755 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9757         Mostly based on bugfix from Bean.
9759         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9760         attribute with hook() parameter.
9761         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9762         declaration.
9763         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9764         attribute with hook() parameter.
9765         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9766         declaration.
9768 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9770         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9771         (pkglib_MODULES): Add `memdisk.mod'.
9772         (memdisk_mod_SOURCES): New variable.
9773         (memdisk_mod_CFLAGS): Likewise.
9774         (memdisk_mod_LDFLAGS): Likewise.
9776         * disk/memdisk.c: New file.
9778         * include/grub/disk.h (grub_disk_dev_id): Add
9779         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9781         * include/grub/i386/pc/kernel.h
9782         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9783         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9784         (grub_kernel_image_size): New variable declaration.
9785         (grub_total_module_size): Likewise.
9786         (grub_memdisk_image_size): Likewise.
9788         * include/grub/i386/pc/memory.h
9789         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9791         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9792         (grub_arch_memdisk_addr): New variable declaration.
9793         (grub_arch_memdisk_size): Likewise.
9795         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9796         (grub_arch_memdisk_size): Likewise.
9798         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9799         (codestart): Replace hardcoded `0x100000' with
9800         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9802         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9803         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9804         not NULL, append the contents of the file it refers to, at the end of
9805         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9806         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9807         (options): Add "memdisk"|'m' option.
9808         (main): Parse --memdisk|-m option, and pass user-provided path as
9809         parameter to generate_image().
9811 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9813         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9814         grub_dprintf() calls from here ...
9815         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9817 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9819         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9821         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9822         declaration.
9823         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9824         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9825         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9826         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9827         property).
9828         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9829         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9831 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9833         Get rid of confusing function (superseded by
9834         `grub_ieee1275_get_integer_property')
9835         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9836         prototype.
9837         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9838         function.
9839         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9840         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9841         in native endianness from grub_ieee1275_get_integer_property().
9843 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9845         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9846         command after "shut-down", since implementations differ on which
9847         the command for halt is.
9849 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9851         * include/grub/i386/linuxbios/console.h: Add header protection.
9852         (grub_keyboard_controller_init): New function prototype.
9853         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9854         (KEYBOARD_COMMAND_READ): Likewise.
9855         (KEYBOARD_COMMAND_WRITE): Likewise.
9856         (KEYBOARD_SCANCODE_SET1): Likewise.
9857         (grub_keyboard_controller_write): New function.
9858         (grub_keyboard_controller_read): Likewise.
9859         (grub_keyboard_controller_init): Likewise.
9861         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9862         (grub_console_init): On coreboot/LinuxBIOS, call
9863         grub_keyboard_controller_init().
9865 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9867         PowerPC changes provided by Pavel Roskin.
9869         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9870         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9871         don't rely on cmain() doing it.
9872         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9873         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9875 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9877         * include/grub/i386/linuxbios/memory.h
9878         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9879         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9880         receive `table_header' as argument.  Instead, probe for it in the
9881         known memory ranges where it can be present.
9882         (grub_available_iterate): Do not pass a fixed `table_header' address
9883         to grub_linuxbios_table_iterate().
9885 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9887         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9888         * conf/i386-ieee1275.rmk: New file.
9889         * include/grub/i386/ieee1275/console.h: Likewise.
9890         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9891         * include/grub/i386/ieee1275/kernel.h: Likewise.
9892         * include/grub/i386/ieee1275/time.h: Likewise.
9893         * kern/i386/ieee1275/init.c: Likewise.
9894         * kern/i386/ieee1275/startup.S: Likewise.
9896 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9898         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9899         when pointers are 32-bit (but still do set it to one when they are
9900         64-bit).
9902 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9904         * include/grub/ieee1275/ieee1275.h
9905         (grub_ieee1275_get_integer_property): New function prototype.
9907         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9908         (grub_ieee1275_get_integer_property): New function.  Wraps around
9909         grub_ieee1275_get_property() to handle endianness.
9911         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9912         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9913         where appropriate.
9914         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9915         (grub_map): Likewise.
9916         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9918 2008-01-15  Bean  <bean123ch@gmail.com>
9920         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9921         (grub_script_execute_cmdline): Reset grub_errno.
9923         * normal/main.c (read_config_file): Reset grub_errno.
9925         * normal/parse.y (script_init): New.
9926         (script): Move function and menuentry here.
9927         (delimiter): New.
9928         (command): Add delimiter at the end of command.
9929         (commands): Adjust to match the new command.
9930         (commandblock): Remove grub_script_lexer_record_start.
9931         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9932         (if): Use the new commands.
9934         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9936 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9938         * normal/menu.c (run_menu): Move timeout message from here ...
9939         (print_timeout): ... to here.
9940         (run_menu): Use print_timeout() once during initial draw to print
9941         the whole message, and again in every clock tick to update only
9942         the number of seconds.
9944 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9946         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9947         actual size of `available' from grub_ieee1275_get_property(), and
9948         restrict parsing to that bound.
9950 2008-01-15  Christian Franke  <franke@computer.org>
9952         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9953         (argp_program_version): Remove variable.
9954         (argp_program_bug_address): Likewise.
9955         (options): Convert from struct argp_option to struct option.
9956         (struct arguments): Remove.
9957         (parse_opt): Remove.
9958         (usage): New function.
9959         (main): Replace struct args members by simple variables.
9960         Replace argp_parse() by getopt_long().
9961         Add switch to evaluate options.
9962         Add missing "(...)" around root_dev in prefix string.
9964 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9966         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9967         for grub_ieee1275_exit(), in order to improve portability.
9969 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9971         * util/grub.d/10_linux.in (prefix): Define.
9972         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9974 2008-01-13  Pavel Roskin  <proski@gnu.org>
9976         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9977         grub_errno if no errors have been detected.
9979 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9981         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9982         (grub_util_get_dev_abstraction): New function prototype.
9984         * util/getroot.c: Include `<grub/util/getroot.h>'
9985         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9986         (grub_util_get_dev_abstraction): ... here (new function).
9988         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9989         `PRINT_ABSTRACTION'.
9990         (probe): Probe for abstraction type when requested.
9991         (main): Understand `--target=abstraction'.
9993         * util/i386/efi/grub-install.in: Add abstraction module to core
9994         image when it is found to be necessary.
9995         * util/i386/pc/grub-install.in: Likewise.
9996         * util/powerpc/ieee1275/grub-install.in: Likewise.
9998         * util/update-grub_lib.in (font_path): Return system path without
9999         converting to GRUB path.
10000         * util/update-grub.in: Convert system path returned by font_path()
10001         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
10002         abstraction module is needed for loading fonts (if any).  Export
10003         that as `GRUB_PRELOAD_MODULES'.
10004         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
10005         insmod commands).
10007 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
10009         Remove some unused code from reiserfs.
10011         * fs/reiserfs.c (struct grub_reiserfs_key)
10012         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
10013         (struct grub_reiserfs_node_body): Removed.
10014         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10015         Likewise.
10016         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10017         Likewise.
10018         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10019         Likewise.
10020         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10021         Likewise.
10022         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10023         Likewise.
10024         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
10025         Likewise.
10026         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10027         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10028         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10030 2008-01-10  Robert Millan  <rmh@aybabtu.com>
10032         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
10033         Determines if a file is garbage left by packaging systems, etc.
10034         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
10035         for processing /etc/grub.d scripts.
10036         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
10037         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
10038         as a condition for processing Linux images.
10040 2008-01-10  Pavel Roskin  <proski@gnu.org>
10042         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
10043         to compile reiserfs.c on PowerPC.
10045 2008-01-10  Robert Millan  <rmh@aybabtu.com>
10047         * kern/device.c (grub_device_iterate): Do not abort device iteration
10048         when one of the devices cannot be opened.
10049         * kern/disk.c (grub_disk_open): Do not account previous failures of
10050         unrelated functions when grub_errno is checked for.
10052 2008-01-08  Robert Millan  <rmh@aybabtu.com>
10054         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10055         `! grub_linux_is_bzimage', change order of address comparison to make
10056         it more intuitive, and improve "too big zImage" error message.
10058 2008-01-08  Robert Millan  <rmh@aybabtu.com>
10060         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10061         `$(update-grub_DATA)'.
10062         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10063         targets.
10065 2008-01-07  Robert Millan  <rmh@aybabtu.com>
10067         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10068         which instruction is modified by grub-setup during installation
10069         (since it wasn't obvious by only looking at this file).
10071 2008-01-07  Robert Millan  <rmh@aybabtu.com>
10073         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
10074         listing actual TODO items.
10076 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
10078         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10079         correctly.
10080         (grub_reiserfs_get_key_offset): Likewise.
10081         (grub_reiserfs_set_key_offset): Likewise.
10082         (grub_reiserfs_set_key_type): Likewise.
10083         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
10085         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10086         better to remove the bitfield version completely.
10088 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
10090         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10091         allocated from the heap, due to the fshelp implementation.
10092         (grub_reiserfs_dir): Free NODE, due to the same reason.
10094 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
10096         Mostly from Vincent Pelletier:
10098         * fs/reiserfs.c: New file.
10100         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10101         (reiserfs_mod_SOURCES): New variable.
10102         (reiserfs_mod_CFLAGS): Likewise.
10103         (reiserfs_mod_LDFLAGS): Likewise.
10105         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10106         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10107         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10108         normal/color.c.
10110 2008-01-06  Robert Millan  <rmh@aybabtu.com>
10112         * normal/color.c: Remove `<grub/env.h>'.
10114 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
10116         * include/grub/normal.h: Include <grub/env.h>.
10118 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10120         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10121         usage example with `(hd0,1)'.
10122         Reported by Samuel Thibault.
10124 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10126         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10127         (grub_linux_boot_zimage): Rename to ...
10128         (grub_linux_boot): ... this.
10129         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10130         (grub_linux_boot_zimage): Conditionalize zImage copy.
10132         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10133         (grub_linux_boot_bzimage): Remove prototype.
10134         (grub_linux_boot_zimage): Rename to ...
10135         (grub_linux_boot): ... this.
10137         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10138         (grub_linux_boot): Remove function.
10140 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10142         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10143         (grub_env_write_color_highlight): Likewise.
10144         (grub_wait_after_message): Likewise.
10146         * normal/color.c: New file.
10148         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10149         (normal_mod_DEPENDENCIES): Likewise.
10151         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10152         (normal_mod_DEPENDENCIES): Likewise.
10154         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10155         (normal_mod_DEPENDENCIES): Likewise.
10157         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10158         (normal_mod_DEPENDENCIES): Likewise.
10160         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10161         for waiting after a message is printed.
10162         * normal/main.c (read_config_file): Likewise.
10163         (grub_normal_init): Register grub_env_write_color_normal() and
10164         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
10165         `color_highlight' variables as global.
10167         * normal/menu.c (grub_wait_after_message): New function.
10168         (grub_color_menu_normal): New variable.  Replaces ...
10169         (GRUB_COLOR_MENU_NORMAL): ... this macro.
10170         (grub_color_menu_highlight): New variable.  Replaces ...
10171         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10172         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10173         `GRUB_TERM_COLOR_STANDARD'.
10174         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
10175         `normal_code' and `highlight_code' to `old_color_normal' and
10176         `old_color_highlight', respectively.
10177         (grub_menu_init_page): Update colors when drawing the menu, based on
10178         `menu_color_normal' and `menu_color_highlight' variables.
10179         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10180         a message is printed.
10182 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10184         * kern/env.c (grub_env_context_open): Propagate hooks for global
10185         variables to new context.
10187         * kern/main.c (grub_set_root_dev): Export `root' variable.
10189 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10191         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10192         discs unconditionally, since udev and others have options to provide
10193         them.
10195 2008-01-05  Robert Millan  <rmh@aybabtu.com>
10197         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10199 2008-01-04  Christian Franke  <franke@computer.org>
10201         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10202         of eisa_mmap.
10204 2008-01-03  Pavel Roskin  <proski@gnu.org>
10206         * kern/i386/linuxbios/init.c: Put "void" to all function
10207         declarations with no arguments.
10208         * kern/powerpc/ieee1275/init.c: Likewise.
10209         * term/i386/pc/at_keyboard.c: Likewise.
10210         * term/i386/pc/vga_text.c: Likewise.
10211         * util/grub-mkdevicemap.c: Likewise.
10213 2008-01-02  Robert Millan  <rmh@aybabtu.com>
10215         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10216         message when loaded image is out of bounds.
10217         (grub_multiboot_load_elf64): Likewise.
10219 2008-01-02  Pavel Roskin  <proski@gnu.org>
10221         * util/grub.d/10_linux.in: Try version without ".old" when
10222         looking for initrd.  It's better to use initrd from the newer
10223         kernel of the same version than no initrd at all.
10225 2008-01-01  Robert Millan  <rmh@aybabtu.com>
10227         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10229 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
10231         * include/grub/video.h: Added grub_video_unmap_color and
10232         grub_video_get_active_render_target.
10233         (grub_video_adapter): Added unmap_color and get_active_render_target.
10235         * video/video.c: Added grub_video_unmap_color and
10236         grub_video_get_active_render_target.
10237         (grub_video_get_info): Changed method to accept NULL pointer as an
10238         argument to allow detection of active video adapter.
10240         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10241         grub_video_vbe_unmap_color_int.
10242         Added grub_video_vbe_unmap_color and
10243         grub_video_vbe_get_active_render_target.
10244         (grub_video_vbe_adapter): Added unmap_color and
10245         get_active_render_target.
10247         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10248         with grub_video_vbe_unmap_color_int.
10250         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10251         (DEFAULT_NORMAL_COLOR): Likewise.
10252         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10253         (DEFAULT_FG_COLOR): Removed.
10254         (DEFAULT_BG_COLOR): Likewise.
10255         (DEFAULT_CURSOR_COLOR): Changed value.
10256         (grub_virtual_screen): Added standard_color_setting,
10257         normal_color_setting, highlight_color_setting and term_color.
10258         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10259         (bitmap_width): Added.
10260         (bitmap_height): Likewise.
10261         (bitmap): Likewise.
10262         (set_term_color): Likewise.
10263         (grub_virtual_screen_setup): Changed to use new terminal coloring
10264         settings.
10265         (grub_gfxterm_init): Added init for bitmap.
10266         (grub_gfxterm_fini): Added destroy for bitmap.
10267         (redraw_screen_rect): Updated to use background bitmap and new
10268         terminal coloring.
10269         (scroll_up): Added optimization for case when there is no bitmap.
10270         (grub_gfxterm_cls): Fixed to use correct background color.
10271         (grub_virtual_screen_setcolorstate): Changed to use new terminal
10272         coloring.
10273         (grub_virtual_screen_setcolor): Likewise.
10274         (grub_virtual_screen_getcolor): Added.
10275         (grub_gfxterm_background_image_cmd): Likewise.
10276         (grub_video_term): Added setcolor and getcolor.
10277         (MOD_INIT): Added registration of background_image command.
10278         (MOD_TERM): Added unregistration for background_image command.
10280 2007-12-30  Pavel Roskin  <proski@gnu.org>
10282         * loader/multiboot_loader.c: Fix multiboot command
10283         unregistration.  Fix all typos in the word "multiboot".
10285 2007-12-29  Pavel Roskin  <proski@gnu.org>
10287         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
10288         support for initrd names used in Fedora.
10290 2007-12-26  Bean  <bean123ch@gmail.com>
10292         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10293         (cpio_mod_SOURCES): New variable.
10294         (cpio_mod_CFLAGS): Likewise.
10295         (cpio_mod_LDFLAGS): Likewise.
10297         * fs/cpio.c: New file.
10299         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10301         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10303         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10305         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10307 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10309         * include/grub/term.h (struct grub_term): Add `getcolor' function.
10310         (grub_getcolor): New function.
10312         * kern/term.c (grub_getcolor): New function.
10313         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10314         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10315         (print_entry): Set normal and highlight colors to
10316         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10317         respectively, before printing and restore them to old
10318         values afterwards.
10319         (grub_menu_init_page): Likewise.  Fill an additional colored space
10320         that would otherwise be left blank.
10322         * term/efi/console.c (grub_console_getcolor): New function.
10323         (struct grub_console_term.getcolor): New variable.
10324         * term/i386/pc/console.c (grub_console_getcolor): New function.
10325         (struct grub_console_term.getcolor): New variable.
10326         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10327         (struct grub_console_term.getcolor): New variable.
10329         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10330         (struct grub_console_term.setcolor): Remove variable.
10331         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10332         (struct grub_console_term.setcolor): Remove variable.
10333         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10334         (struct grub_console_term.setcolor): Remove variable.
10335         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10336         (struct grub_console_term.setcolor): Remove variable.
10338 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10340         * configure.ac: Search for possible unifont.hex locations, and
10341         define UNIFONT_HEX if found.
10343         * Makefile.in (UNIFONT_HEX): Define variable.
10344         (DATA): Rename to ...
10345         (PKGLIB): ... this.  Update all users.
10346         (PKGDATA): New variable.
10347         (pkgdata_IMAGES): Rename to ...
10348         (pkglib_IMAGES): ... this. Update all users.
10349         (pkgdata_MODULES): Rename to ...
10350         (pkglib_MODULES): ... this. Update all users.
10351         (pkgdata_PROGRAMS): Rename to ...
10352         (pkglib_PROGRAMS): ... this. Update all users.
10353         (pkgdata_DATA): Rename to ...
10354         (pkglib_DATA): ... this. Update all users.
10355         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10356         (unicode.pff, ascii.pff): New rules.
10357         (all-local): Add `$(PKGDATA)' dependency.
10358         (install-local): Process `$(PKGDATA)'.
10360         * util/update-grub_lib.in (font_path): Search for *.pff files in
10361         a few more locations, including `${pkgdata}'.
10363 2007-12-23  Robert Millan  <rmh@aybabtu.com>
10365         Patch from Bean  <bean123ch@gmail.com>:
10366         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10367         `size'.
10369 2007-12-21  Bean  <bean123ch@gmail.com>
10371         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10372         (ntfscomp_mod_SOURCES): New variable.
10373         (ntfscomp_mod_CFLAGS): Likewise.
10374         (ntfscomp_mod_LDFLAGS): Likewise.
10376         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10377         (grub_probe_SOURCES): Likewise.
10378         (grub_emu_SOURCES): Likewise.
10380         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10381         (grub_emu_SOURCES): Likewise.
10383         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10384         (grub_emu_SOURCES): Likewise.
10386         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10387         (grub_emu_SOURCES): Likewise.
10389         * fs/ntfs.c (grub_ntfscomp_func): New variable.
10390         (read_run_list): Renamed to grub_ntfs_read_run_list.
10391         (decomp_nextvcn): Moved to ntfscomp.c.
10392         (decomp_getch): Likewise.
10393         (decomp_get16): Likewise.
10394         (decomp_block): Likewise.
10395         (read_block): Likewise.
10396         (read_data): Partially moved to ntfscomp.c.
10397         (fixup): Change unsigned to grub_uint16_t.
10398         (read_mft): Change unsigned long to grub_uint32_t.
10399         (read_attr): Likewise.
10400         (read_data): Likewise.
10401         (read_run_data): Likewise.
10402         (read_run_list): Likewise.
10403         (read_mft): Likewise.
10405         * fs/ntfscomp.c: New file.
10407         * include/grub/ntfs.h: New file.
10409 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10411         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10412         IDE disk check, since Linux is known to support 20 IDE disks.
10413         Reported by Colin Watson.
10415 2007-12-15  Bean  <bean123ch@gmail.com>
10417         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10418         (lnxboot_img_SOURCES): New variable.
10419         (lnxboot_img_ASFLAGS): Likewise.
10420         (lnxboot_img_LDFLAGS): Likewise.
10422         * boot/i386/pc/lnxboot.S: New file.
10424 2007-11-24  Pavel Roskin  <proski@gnu.org>
10426         * configure.ac: Test if '--build-id=none' is supported by the
10427         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10428         objcopy to generate incorrect binary files (binutils
10429         2.17.50.0.18-1 as shipped by Fedora 8).
10430         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10431         linking, so that build ID doesn't break the test.
10433 2007-11-24  Pavel Roskin  <proski@gnu.org>
10435         * include/grub/i386/time.h: use "void" in the argument list
10436         of grub_cpu_idle().
10437         * include/grub/powerpc/time.h: Likewise.
10438         * include/grub/sparc64/time.h: Likewise.
10440 2007-11-18  Christian Franke  <franke@computer.org>
10442         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10443         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10444         This fixes the problem that function keys did not work in grub-emu.
10446 2007-11-18  Christian Franke  <franke@computer.org>
10448         * disk/host.c (grub_host_open): Remove attribute unused from
10449         name parameter. Add check for "host". This fixes the problem
10450         that grub-emu does not find partitions.
10452 2007-11-18  Christian Franke  <franke@computer.org>
10454         * util/hostfs.c (is_dir): New function.
10455         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10456         (grub_hostfs_read): Add missing fseek().
10457         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10458         of grub-emu on "ls (host)".
10460 2007-11-18  Christian Franke  <franke@computer.org>
10462         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10463         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10464         to 64 bit boundary by default.
10466 2007-11-18  Bean  <bean123ch@gmail.com>
10468         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10469         (hexdump_mod_SOURCES): New variable.
10470         (hexdump_mod_CFLAGS): Likewise.
10471         (hexdump_mod_LDFLAGS): Likewise.
10473         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10475         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10477         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10479         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10481         * include/grub/hexdump.h: New file.
10483         * commands/hexdump.c: New file.
10485 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10487         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10488         in grub_outb() calls.
10489         (beep_on): Likewise.
10491 2007-11-10  Christian Franke  <franke@computer.org>
10493         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10494         (grub_menu_run): Likewise.
10496 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10498         * include/grub/i386/efi/machine.h: New file.
10499         * include/grub/i386/linuxbios/machine.h: Likewise.
10500         * include/grub/i386/pc/machine.h: Likewise.
10501         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10502         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10504         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10505         (serial_hw_io_addr): New variable.
10506         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10507         instead of `(unsigned short *) 0x400'.
10509 2007-11-10  Bean  <bean123ch@gmail.com>
10511         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10513 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10515         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10516         (vga_mod_SOURCES): Added.
10517         (vga_mod_CFLAGS): Likewise.
10518         (vga_mod_LDFLAGS): Likewise.
10520         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10521         grub_outb() calls.
10522         (set_map_mask): Likewise.
10523         (set_read_map): Likewise.
10524         (set_read_address): Likewise.
10525         (vga_font): Removed variable.
10526         (get_vga_glyph): Removed function.
10527         (invalidate_char): Likewise.
10528         (write_char): Changed to use grub_font_get_glyph() for font
10529         information.
10530         (grub_vga_putchar): Likewise.
10531         (grub_vga_getcharwidth): Likewise.
10533 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10535         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10536         flags.
10537         (pxeboot_img_LDFLAGS): Likewise.
10538         (diskboot_img_LDFLAGS): Likewise.
10539         (kernel_img_LDFLAGS): Likewise.
10541 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10543         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10544         in grub_outb() calls.
10545         (serial_hw_init): Likewise.
10547 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10549         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10550         spaces.  Skip non-regular files.
10552 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10554         * kern/disk.c (grub_disk_firmware_fini)
10555         (grub_disk_firmware_is_tainted): New variables.
10557         * include/grub/disk.h (grub_disk_firmware_fini)
10558         (grub_disk_firmware_is_tainted): Likewise.
10560         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10561         (grub_disk_biosdisk_fini): ... to here.
10562         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10563         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10564         is set.  Register grub_disk_biosdisk_fini() in
10565         `grub_disk_firmware_fini'.
10567         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10568         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10569         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10570         to finish existing firmware disk interface.
10572         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10573         (ata_mod_SOURCES): New variable.
10574         (ata_mod_CFLAGS): Likewise.
10575         (ata_mod_LDFLAGS): Likewise.
10577 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10579         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10580         (grub_ata_wait): Reimplement using grub_millisleep().
10582         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10583         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10585 2007-11-03  Marco Gerards  <marco@gnu.org>
10587         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10588         (CRTC_ADDR_PORT): New macro.
10589         (CRTC_DATA_PORT): Likewise.
10590         (CRTC_CURSOR): Likewise.
10591         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10592         (CRTC_CURSOR_ADDR_LOW): Likewise.
10593         (update_cursor): New function.
10594         (grub_console_real_putchar): Call `update_cursor'.
10595         (grub_console_gotoxy): Likewise.
10596         (grub_console_cls): Set the default color when clearing the
10597         screen.
10598         (grub_console_setcursor): Implemented.
10600 2007-11-03  Marco Gerards  <marco@gnu.org>
10602         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10603         become activate.
10604         (grub_ata_pio_write): Likewise.
10606         (grub_atapi_identify): Wait after issuing an ATA command.
10607         (grub_atapi_packet): Likewise.
10608         (grub_ata_identify): Likewise.
10609         (grub_ata_readwrite): Likewise.
10611 2007-11-03  Marco Gerards  <marco@gnu.org>
10613         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10614         (grub_ata_pio_write): Likewise.
10615         (grub_ata_readwrite): Use `grub_error', instead of
10616         returning `grub_errno'.
10618 2007-11-03  Marco Gerards  <marco@gnu.org>
10620         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10621         grub_ata_pio_write once for every single sector, instead of for
10622         multiple sectors.
10624 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10626         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10628         * conf/i386-linuxbios.rmk: New file.
10630         * kern/i386/pc/hardware.c: Likewise.
10631         * term/i386/pc/at_keyboard.c: Likewise.
10632         * term/i386/pc/vga_text.c: Likewise.
10634         * include/grub/i386/linuxbios/boot.h: Likewise.
10635         * include/grub/i386/linuxbios/console.h: Likewise.
10636         * include/grub/i386/linuxbios/init.h: Likewise.
10637         * include/grub/i386/linuxbios/kernel.h: Likewise.
10638         * include/grub/i386/linuxbios/loader.h: Likewise.
10639         * include/grub/i386/linuxbios/memory.h: Likewise.
10640         * include/grub/i386/linuxbios/serial.h: Likewise.
10641         * include/grub/i386/linuxbios/time.h: Likewise.
10643         * kern/i386/linuxbios/init.c: Likewise.
10644         * kern/i386/linuxbios/startup.S: Likewise.
10645         * kern/i386/linuxbios/table.c: Likewise.
10647 2007-10-31  Marco Gerards  <marco@gnu.org>
10649         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10650         (ata_mod_SOURCES): New variable.
10651         (ata_mod_CFLAGS): Likewise.
10652         (ata_mod_LDFLAGS): Likewise.
10654         * disk/ata.c: New file.
10656         * include/grub/disk.h (grub_disk_dev_id): Add
10657         `GRUB_DISK_DEV_ATA_ID'.
10659 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10661         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10662         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10664         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10665         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10667         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10668         `<grub/types.h>'.
10670         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10672 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10674         * include/grub/types.h (ULONG_MAX): Define macro.
10676 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10678         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10679         `"../realmode.S"'.
10680         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10682 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10684         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10685         (pkgdata_MODULES): Add `biosdisk.mod'.
10686         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10687         variables.
10689         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10690         (grub_biosdisk_init): Replace with ...
10691         (GRUB_MOD_INIT(biosdisk)): ... this.
10692         (grub_biosdisk_fini): Replace with ...
10693         (GRUB_MOD_FINI(biosdisk)): ... this.
10695         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10696         (grub_machine_init): Remove call to grub_biosdisk_init().
10697         (grub_machine_fini): Remove call to grub_machine_fini().
10699         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10701 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10703         * include/grub/time.h: New file.
10704         * include/grub/i386/time.h: Likewise.
10705         * include/grub/powerpc/time.h: Likewise.
10706         * include/grub/sparc64/time.h: Likewise.
10708         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10709         instances to ...
10710         (KERNEL_MACHINE_TIME_HEADER): ... this.
10711         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10712         instances to ...
10713         (KERNEL_MACHINE_TIME_HEADER): ... this.
10714         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10715         instances to ...
10716         (KERNEL_MACHINE_TIME_HEADER): ... this.
10718         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10719         (grub_millisleep): New function.
10720         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10721         (grub_millisleep): New function.
10722         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10723         Remove `grub/machine/time.h' include.
10724         (grub_millisleep): New function.
10725         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10726         Remove `grub/machine/time.h' include.
10727         (grub_millisleep): New function.
10729         * include/grub/misc.h (grub_div_roundup): New function.
10731         * kern/misc.c: Include `<grub/time.h>'.
10732         (grub_millisleep_generic): New function.
10734         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10735         Add `time.h'.
10736         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10737         Add `time.h'.
10738         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10739         `machine/time.h'.  Add `time.h'.
10740         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10742 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10744         * include/grub/misc.h (grub_max): New function.
10746 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10748         * util/misc.c (grub_util_info): Call fflush() before returning.
10750 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10752         * genmk.rb (Image): Copy `extra_flags' from here ...
10753         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10755         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10756         to `argc' and `args' arguments.
10758 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10760         * kern/i386/loader.S: New file.
10762         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10763         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10764         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10765         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10766         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10767         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10768         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10769         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10770         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10771         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10772         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10773         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10774         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10775         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10777         * kern/i386/realmode.S: New file.
10779         * kern/i386/pc/startup.S (protstack): Moved from here ...
10780         * kern/i386/realmode.S (protstack)... to here.
10781         * kern/i386/pc/startup.S (gdt): Moved from here ...
10782         * kern/i386/realmode.S (gdt)... to here.
10783         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10784         * kern/i386/realmode.S (prot_to_real)... to here.
10786         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10787         `kern/i386/realmode.S'.
10789 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10791         * include/grub/i386/loader.h: New file.
10793         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10794         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10795         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10796         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10797         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10798         * include/grub/i386/loader.h (grub_linux_prot_size)
10799         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10800         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10801         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10802         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10804         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10806 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10808         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10809         filesystem when dev->disk is unset.
10810         Do probe for filesystem even when dev->disk->has_partitions is set.
10811         In case a filesystem is found, always report it.
10812         In case it isn't, if dev->disk->has_partitions is set, report that
10813         a partition table was found instead of reporting that no filesystem
10814         could be identified.
10816 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10818         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10819         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10821         * include/grub/types.h (grub_host_to_target16): New macro.
10822         (grub_host_to_target32): Likewise.
10823         (grub_host_to_target64): Likewise.
10824         (grub_target_to_host16): Likewise.
10825         (grub_target_to_host32): Likewise.
10826         (grub_target_to_host64): Likewise.
10828         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10829         Renamed from to ...
10830         (GRUB_MOD_ALIGN): ...this.  Update all users.
10832         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10833         grub_host_to_target32.
10834         Replace grub_be_to_cpu32 with grub_target_to_host32.
10835         (load_modules): Likewise.
10836         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10837         Replace grub_be_to_cpu32 with grub_target_to_host32.
10838         Replace grub_cpu_to_be16 with grub_host_to_target16.
10839         Replace grub_cpu_to_be32 grub_host_to_target32.
10841 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10843         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10844         * util/elf/grub-mkimage.c: ... here.
10846         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10847         `util/powerpc/ieee1275/grub-mkimage.c'.
10849 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10851         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10852         and make it easier to figure out.
10853         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10854         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10855         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10856         leave us with less than HEAP_MIN_SIZE total heap.
10857         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10859 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10861         * include/grub/i386/io.h: New file.
10862         * commands/i386/pc/play.c (inb): Removed.
10863         (outb): Removed.
10864         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10865         with grub_outb().
10866         * term/i386/pc/serial.c  (inb): Removed.
10867         (outb): Removed.
10868         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10869         with grub_outb().
10870         * term/i386/pc/vga.c  (inb): Removed.
10871         (outb): Removed.
10872         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10873         with grub_outb().
10875 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10877         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10878         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10879         Reported by Marcin Kurek.
10881 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10883         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10884         SmartFirmware version updates (as released by Sven Luther), and avoid
10885         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10886         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10887         known broken.
10889 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10891         From Hitoshi Ozeki:
10892         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10893         when merging two regions.
10895 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10897         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10898         * normal/completion.c (grub_normal_do_completion): Likewise.
10899         Reported by Hitoshi Ozeki.
10901 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10903         Do not use devices at boot in chainloading.
10905         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10906         (boot_part_addr): Likewise.
10907         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10908         with BOOT_DRIVE and BOOT_PART_ADDR.
10909         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10910         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10912 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10914         Patch from Simon Peter <dn.tlp@gmx.net>:
10915         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10916         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10917         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10918         util/i386/pc/grub-setup.c_DEPENDENCIES.
10919         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10920         util/grub-probe.c_DEPENDENCIES.
10921         * conf/powerpc-ieee1275.rmk: Likewise.
10923 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10925         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10926         to tell grub-mkdevicemap how to name devices.
10927         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10928         feature).
10930         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10931         util/i386/get_disk_name.c.
10932         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10933         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10934         util/ieee1275/get_disk_name.c.
10936         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10938         * DISTLIST: Add util/i386/get_disk_name.c and
10939         util/ieee1275/get_disk_name.c.
10941         * util/grub-mkdevicemap.c: Replace device naming logic with
10942         grub_util_get_disk_name() calls.
10944 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10946         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10947         (so that it works for both plural and singular quantities).
10949 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10951         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10952         so that [xz] isn't taken into account when determining order.
10954 2007-08-02  Marco Gerards  <marco@gnu.org>
10956         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10957         `include/multiboot2.h', `include/grub/elfload.h',
10958         `include/multiboot.h', `include/grub/multiboot.h',
10959         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10960         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10961         `kern/elf.c', `loader/multiboot_loader.c',
10962         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10963         `loader/i386/pc/multiboot2.c',
10964         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10965         `util/i386/pc/grub-mkrescue.in'.  Remove
10966         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10967         `include/grub/i386/pc/util/biosdisk.h' and
10968         `include/grub/powerpc/ieee1275/multiboot.h'.
10970 2007-08-02  Bean  <bean123ch@gmail.com>
10972         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10973         (ntfs_mod_SOURCES): New variable.
10974         (ntfs_mod_CFLAGS): Likewise.
10975         (ntfs_mod_LDFLAGS): Likewise.
10977         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10978         (grub_probe_SOURCES): Likewise.
10979         (grub_emu_SOURCES): Likewise.
10981         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10982         (grub_emu_SOURCES): Likewise.
10984         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10985         (grub_emu_SOURCES): Likewise.
10987         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10989         * fs/ntfs.c: New file.
10991 2007-08-02  Bean  <bean123ch@gmail.com>
10993         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10995         * file.h (grub_file): Likewise.
10997         * fshelp.h (grub_fshelp_read_file): Likewise.
10999         * util/i386/pc/grub-setup.c (setup): Likewise.
11000         (save_first_sector): Likewise.
11001         (save_blocklists): Likewise.
11003         * fs/affs.c (grub_affs_read_file): Likewise.
11005         * fs/ext2.c (grub_ext2_read_file): Likewise.
11007         * fs/fat.c (grub_fat_read_data): Likewise.
11009         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
11011         * fs/hfs.c (grub_hfs_read_file): Likewise.
11013         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11015         * fs/jfs.c (grub_jfs_read_file): Likewise.
11017         * fs/minix.c (grub_minix_read_file): Likewise.
11019         * fs/sfs.c (grub_sfs_read_file): Likewise.
11021         * fs/ufs.c (grub_ufs_read_file): Likewise.
11023         * fs/xfs.c (grub_xfs_read_file): Likewise.
11025         * command/blocklist.c (read_blocklist): Likewise.
11026         (print_blocklist): Likewise.
11028 2007-08-02  Marco Gerards  <marco@gnu.org>
11030         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
11031         `util/hostfs.c'.
11033         * disk/host.c: New file.
11035         * util/hostfs.c: Likewise.
11037         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
11038         return `GRUB_ERR_BAD_FS'.
11039         * fs/sfs.c (grub_sfs_mount): Likewise.
11040         * fs/xfs.c (grub_xfs_mount): Likewise.
11042         * include/grub/disk.h (enum grub_disk_dev_id): Add
11043         `GRUB_DISK_DEVICE_HOST_ID'.
11045         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11047 2007-07-24  Jerone Young  <jerone@gmail.com>
11049         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
11050         modules for compilation.
11051         * conf/powerpc-ieee1275.rmk: Likewise.
11053         * include/multiboot.h: Move multiboot definitions to one file. Rename
11054         many definitions to not get grub specific.
11055         * include/multiboot2.h: Create header with multiboot 2 definitions.
11056         * include/grub/multiboot.h: Header for grub specific function
11057         prototypes and definitions.
11058         * include/grub/multiboot2.h: Likewise.
11059         * include/grub/multiboot_loader.h: Likewise.
11060         * include/grub/i386/pc/multiboot.h: Removed.
11061         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11063         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11064         and 2 to allow for one multiboot and module commands.
11065         * loader/multiboot2.c: Add multiboot2 functionality.
11066         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11067         and definition names.
11068         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11069         2 functions.
11070         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11071         ieee1275 specific multiboot2 code.
11073         * kern/i386/pc/startup.S: Change headers and definition names for
11074         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11076 2007-07-22  Robert Millan  <rmh@aybabtu.com>
11078         * geninitheader.sh: Process file specified in first parameter rather
11079         than hardcoding grub_modules_init.lst.
11080         * geninit.sh: Likewise.  Also, construct header name dynamically rather
11081         than hardcoding grub_modules_init.h.
11083         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11084         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
11085         grub_probe_init.[ch] and grub_setup_init.[ch].
11087         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11088         grub_modules_init.h with grub_emu_init.h.
11089         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11090         grub_probe_init.[ch] files.
11091         * conf/i386-efi.rmk: Likewise.
11092         * conf/i386-pc.rmk: Likewise.
11093         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11094         grub_setup_init.[ch] files.
11096         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11097         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
11098         to initialize modules rather than a list of hardcoded functions.
11099         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
11100         grub_init_all() to initialize modules rather than a list of hardcoded
11101         functions.
11103 2007-07-22  Robert Millan  <rmh@aybabtu.com>
11105         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11106         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11108 2007-07-22  Robert Millan  <rmh@aybabtu.com>
11110         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11111         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11112         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11113         flag when running on SmartFirmware.
11114         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11115         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11116         was set.
11118         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11119         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11120         rather than decreasing it.
11122         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11123         there's not enough space to do it, fail in the same way as when it
11124         can't be done because there are no partitions.
11126         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11127         when nvsetenv failed.
11129 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
11131         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11132         because this rule is automatically generated.
11133         (grub-mkrescue): Removed for the same reason as above.
11135 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
11137         Migrate to GNU General Public License Version 3.
11139         * COPYING: Replaced with the plain text version of GPLv3.
11141         * config.guess: Updated from gnulib.
11142         * config.sub: Likewise.
11144         * geninit.sh: Output a GPLv3 copyright notice.
11145         * geninitheader.sh: Likewise.
11146         * genmodsrc.sh: Likewise.
11147         * gensymlist.sh.in: Likewise.
11149         * boot/i386/pc/boot.S: Upgraded to GPLv3.
11150         * boot/i386/pc/diskboot.S: Likewise.
11151         * boot/i386/pc/pxeboot.S: Likewise.
11152         * commands/blocklist.c: Likewise.
11153         * commands/boot.c: Likewise.
11154         * commands/cat.c: Likewise.
11155         * commands/cmp.c: Likewise.
11156         * commands/configfile.c: Likewise.
11157         * commands/echo.c: Likewise.
11158         * commands/help.c: Likewise.
11159         * commands/ls.c: Likewise.
11160         * commands/search.c: Likewise.
11161         * commands/terminal.c: Likewise.
11162         * commands/test.c: Likewise.
11163         * commands/videotest.c: Likewise.
11164         * commands/i386/cpuid.c: Likewise.
11165         * commands/i386/pc/halt.c: Likewise.
11166         * commands/i386/pc/play.c: Likewise.
11167         * commands/i386/pc/reboot.c: Likewise.
11168         * commands/i386/pc/vbeinfo.c: Likewise.
11169         * commands/i386/pc/vbetest.c: Likewise.
11170         * commands/ieee1275/halt.c: Likewise.
11171         * commands/ieee1275/reboot.c: Likewise.
11172         * commands/ieee1275/suspend.c: Likewise.
11173         * disk/loopback.c: Likewise.
11174         * disk/lvm.c: Likewise.
11175         * disk/raid.c: Likewise.
11176         * disk/efi/efidisk.c: Likewise.
11177         * disk/i386/pc/biosdisk.c: Likewise.
11178         * disk/ieee1275/ofdisk.c: Likewise.
11179         * font/manager.c: Likewise.
11180         * fs/affs.c: Likewise.
11181         * fs/ext2.c: Likewise.
11182         * fs/fat.c: Likewise.
11183         * fs/fshelp.c: Likewise.
11184         * fs/hfs.c: Likewise.
11185         * fs/hfsplus.c: Likewise.
11186         * fs/iso9660.c: Likewise.
11187         * fs/jfs.c: Likewise.
11188         * fs/minix.c: Likewise.
11189         * fs/sfs.c: Likewise.
11190         * fs/ufs.c: Likewise.
11191         * fs/xfs.c: Likewise.
11192         * hello/hello.c: Likewise.
11193         * include/grub/acorn_filecore.h: Likewise.
11194         * include/grub/arg.h: Likewise.
11195         * include/grub/bitmap.h: Likewise.
11196         * include/grub/boot.h: Likewise.
11197         * include/grub/cache.h: Likewise.
11198         * include/grub/device.h: Likewise.
11199         * include/grub/disk.h: Likewise.
11200         * include/grub/dl.h: Likewise.
11201         * include/grub/elfload.h: Likewise.
11202         * include/grub/env.h: Likewise.
11203         * include/grub/err.h: Likewise.
11204         * include/grub/file.h: Likewise.
11205         * include/grub/font.h: Likewise.
11206         * include/grub/fs.h: Likewise.
11207         * include/grub/fshelp.h: Likewise.
11208         * include/grub/gzio.h: Likewise.
11209         * include/grub/hfs.h: Likewise.
11210         * include/grub/kernel.h: Likewise.
11211         * include/grub/loader.h: Likewise.
11212         * include/grub/lvm.h: Likewise.
11213         * include/grub/misc.h: Likewise.
11214         * include/grub/mm.h: Likewise.
11215         * include/grub/net.h: Likewise.
11216         * include/grub/normal.h: Likewise.
11217         * include/grub/parser.h: Likewise.
11218         * include/grub/partition.h: Likewise.
11219         * include/grub/pc_partition.h: Likewise.
11220         * include/grub/raid.h: Likewise.
11221         * include/grub/rescue.h: Likewise.
11222         * include/grub/script.h: Likewise.
11223         * include/grub/setjmp.h: Likewise.
11224         * include/grub/symbol.h: Likewise.
11225         * include/grub/term.h: Likewise.
11226         * include/grub/terminfo.h: Likewise.
11227         * include/grub/tparm.h: Likewise.
11228         * include/grub/types.h: Likewise.
11229         * include/grub/video.h: Likewise.
11230         * include/grub/efi/api.h: Likewise.
11231         * include/grub/efi/chainloader.h: Likewise.
11232         * include/grub/efi/console.h: Likewise.
11233         * include/grub/efi/console_control.h: Likewise.
11234         * include/grub/efi/disk.h: Likewise.
11235         * include/grub/efi/efi.h: Likewise.
11236         * include/grub/efi/pe32.h: Likewise.
11237         * include/grub/efi/time.h: Likewise.
11238         * include/grub/i386/linux.h: Likewise.
11239         * include/grub/i386/setjmp.h: Likewise.
11240         * include/grub/i386/types.h: Likewise.
11241         * include/grub/i386/efi/kernel.h: Likewise.
11242         * include/grub/i386/efi/loader.h: Likewise.
11243         * include/grub/i386/efi/time.h: Likewise.
11244         * include/grub/i386/pc/biosdisk.h: Likewise.
11245         * include/grub/i386/pc/boot.h: Likewise.
11246         * include/grub/i386/pc/chainloader.h: Likewise.
11247         * include/grub/i386/pc/console.h: Likewise.
11248         * include/grub/i386/pc/init.h: Likewise.
11249         * include/grub/i386/pc/kernel.h: Likewise.
11250         * include/grub/i386/pc/loader.h: Likewise.
11251         * include/grub/i386/pc/memory.h: Likewise.
11252         * include/grub/i386/pc/multiboot.h: Likewise.
11253         * include/grub/i386/pc/serial.h: Likewise.
11254         * include/grub/i386/pc/time.h: Likewise.
11255         * include/grub/i386/pc/vbe.h: Likewise.
11256         * include/grub/i386/pc/vbeblit.h: Likewise.
11257         * include/grub/i386/pc/vbefill.h: Likewise.
11258         * include/grub/i386/pc/vbeutil.h: Likewise.
11259         * include/grub/i386/pc/vga.h: Likewise.
11260         * include/grub/ieee1275/ieee1275.h: Likewise.
11261         * include/grub/ieee1275/ofdisk.h: Likewise.
11262         * include/grub/powerpc/libgcc.h: Likewise.
11263         * include/grub/powerpc/setjmp.h: Likewise.
11264         * include/grub/powerpc/types.h: Likewise.
11265         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11266         * include/grub/powerpc/ieee1275/console.h: Likewise.
11267         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11268         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11269         * include/grub/powerpc/ieee1275/loader.h: Likewise.
11270         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11271         * include/grub/powerpc/ieee1275/time.h: Likewise.
11272         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11273         * include/grub/sparc64/libgcc.h: Likewise.
11274         * include/grub/sparc64/setjmp.h: Likewise.
11275         * include/grub/sparc64/types.h: Likewise.
11276         * include/grub/sparc64/ieee1275/console.h: Likewise.
11277         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11278         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11279         * include/grub/sparc64/ieee1275/time.h: Likewise.
11280         * include/grub/util/biosdisk.h: Likewise.
11281         * include/grub/util/getroot.h: Likewise.
11282         * include/grub/util/lvm.h: Likewise.
11283         * include/grub/util/misc.h: Likewise.
11284         * include/grub/util/raid.h: Likewise.
11285         * include/grub/util/resolve.h: Likewise.
11286         * io/gzio.c: Likewise.
11287         * kern/device.c: Likewise.
11288         * kern/disk.c: Likewise.
11289         * kern/dl.c: Likewise.
11290         * kern/elf.c: Likewise.
11291         * kern/env.c: Likewise.
11292         * kern/err.c: Likewise.
11293         * kern/file.c: Likewise.
11294         * kern/fs.c: Likewise.
11295         * kern/loader.c: Likewise.
11296         * kern/main.c: Likewise.
11297         * kern/misc.c: Likewise.
11298         * kern/mm.c: Likewise.
11299         * kern/parser.c: Likewise.
11300         * kern/partition.c: Likewise.
11301         * kern/rescue.c: Likewise.
11302         * kern/term.c: Likewise.
11303         * kern/efi/efi.c: Likewise.
11304         * kern/efi/init.c: Likewise.
11305         * kern/efi/mm.c: Likewise.
11306         * kern/i386/dl.c: Likewise.
11307         * kern/i386/efi/init.c: Likewise.
11308         * kern/i386/efi/startup.S: Likewise.
11309         * kern/i386/pc/init.c: Likewise.
11310         * kern/i386/pc/lzo1x.S: Likewise.
11311         * kern/i386/pc/startup.S: Likewise.
11312         * kern/ieee1275/ieee1275.c: Likewise.
11313         * kern/powerpc/cache.S: Likewise.
11314         * kern/powerpc/dl.c: Likewise.
11315         * kern/powerpc/ieee1275/cmain.c: Likewise.
11316         * kern/powerpc/ieee1275/crt0.S: Likewise.
11317         * kern/powerpc/ieee1275/init.c: Likewise.
11318         * kern/powerpc/ieee1275/openfw.c: Likewise.
11319         * kern/sparc64/cache.S: Likewise.
11320         * kern/sparc64/dl.c: Likewise.
11321         * kern/sparc64/ieee1275/init.c: Likewise.
11322         * kern/sparc64/ieee1275/openfw.c: Likewise.
11323         * loader/efi/chainloader.c: Likewise.
11324         * loader/efi/chainloader_normal.c: Likewise.
11325         * loader/i386/efi/linux.c: Likewise.
11326         * loader/i386/efi/linux_normal.c: Likewise.
11327         * loader/i386/pc/chainloader.c: Likewise.
11328         * loader/i386/pc/chainloader_normal.c: Likewise.
11329         * loader/i386/pc/linux.c: Likewise.
11330         * loader/i386/pc/linux_normal.c: Likewise.
11331         * loader/i386/pc/multiboot.c: Likewise.
11332         * loader/i386/pc/multiboot_normal.c: Likewise.
11333         * loader/powerpc/ieee1275/linux.c: Likewise.
11334         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11335         * normal/arg.c: Likewise.
11336         * normal/cmdline.c: Likewise.
11337         * normal/command.c: Likewise.
11338         * normal/completion.c: Likewise.
11339         * normal/execute.c: Likewise.
11340         * normal/function.c: Likewise.
11341         * normal/lexer.c: Likewise.
11342         * normal/main.c: Likewise.
11343         * normal/menu.c: Likewise.
11344         * normal/menu_entry.c: Likewise.
11345         * normal/misc.c: Likewise.
11346         * normal/parser.y: Likewise.
11347         * normal/script.c: Likewise.
11348         * normal/i386/setjmp.S: Likewise.
11349         * normal/powerpc/setjmp.S: Likewise.
11350         * normal/sparc64/setjmp.S: Likewise.
11351         * partmap/acorn.c: Likewise.
11352         * partmap/amiga.c: Likewise.
11353         * partmap/apple.c: Likewise.
11354         * partmap/gpt.c: Likewise.
11355         * partmap/pc.c: Likewise.
11356         * partmap/sun.c: Likewise.
11357         * term/gfxterm.c: Likewise.
11358         * term/terminfo.c: Likewise.
11359         * term/efi/console.c: Likewise.
11360         * term/i386/pc/console.c: Likewise.
11361         * term/i386/pc/serial.c: Likewise.
11362         * term/i386/pc/vesafb.c: Likewise.
11363         * term/i386/pc/vga.c: Likewise.
11364         * term/ieee1275/ofconsole.c: Likewise.
11365         * util/biosdisk.c: Likewise.
11366         * util/console.c: Likewise.
11367         * util/genmoddep.c: Likewise.
11368         * util/getroot.c: Likewise.
11369         * util/grub-emu.c: Likewise.
11370         * util/grub-mkdevicemap.c: Likewise.
11371         * util/grub-probe.c: Likewise.
11372         * util/lvm.c: Likewise.
11373         * util/misc.c: Likewise.
11374         * util/raid.c: Likewise.
11375         * util/resolve.c: Likewise.
11376         * util/update-grub.in: Likewise.
11377         * util/update-grub_lib.in: Likewise.
11378         * util/grub.d/00_header.in: Likewise.
11379         * util/grub.d/10_hurd.in: Likewise.
11380         * util/grub.d/10_linux.in: Likewise.
11381         * util/i386/efi/grub-install.in: Likewise.
11382         * util/i386/efi/grub-mkimage.c: Likewise.
11383         * util/i386/pc/grub-install.in: Likewise.
11384         * util/i386/pc/grub-mkimage.c: Likewise.
11385         * util/i386/pc/grub-mkrescue.in: Likewise.
11386         * util/i386/pc/grub-setup.c: Likewise.
11387         * util/i386/pc/misc.c: Likewise.
11388         * util/powerpc/ieee1275/grub-install.in: Likewise.
11389         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11390         * util/powerpc/ieee1275/misc.c: Likewise.
11391         * video/bitmap.c: Likewise.
11392         * video/video.c: Likewise.
11393         * video/i386/pc/vbe.c: Likewise.
11394         * video/i386/pc/vbeblit.c: Likewise.
11395         * video/i386/pc/vbefill.c: Likewise.
11396         * video/i386/pc/vbeutil.c: Likewise.
11397         * video/readers/tga.c: Likewise.
11399 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11401         * conf/i386-efi.rmk: Replace obsolete reference to
11402         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11403         with util/getroot.c.
11404         * conf/powerpc-ieee1275.rmk: Likewise.
11405         * conf/sparc64-ieee1275.rmk: Likewise.
11407         * util/grub-emu.c (main): Fix unchecked pointer handling.
11409 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11411         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11412         invocation to fail, in order to support partition-less media.
11414         * util/i386/pc/grub-install.in: Likewise.
11416         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11417         which fs or partmap modules are needed (akin to its sister scripts).
11419         Also use grub-probe to get rid of unportable /proc/mounts check.
11421         Print the same informational message that the other scripts do, before
11422         exiting.
11424 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11426         * util/update-grub_lib.in (font_path): New function.  Determine whether
11427         a font file can be found and, if so, echo the GRUB path to it.
11429         * util/update-grub.in: Handle multiple terminals depending on user
11430         input, platform availability and font file presence.  Propagate
11431         variables of our findings to /etc/grub.d/ children.
11433         * util/grub.d/00_header.in: Handle multiple terminals, based on
11434         environment setup by update-grub.
11436 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11438         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11440 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11442         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11443         indicate end of data section in kernel image.
11444         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11445         GRUB_KERNEL_MACHINE_DATA_END.
11447         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11448         space for it.
11449         * kern/i386/efi/startup.S: Likewise.
11451         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11452         during image generation.  Implement --prefix option to override this
11453         patch.
11454         * util/i386/efi/grub-mkimage.c: Likewise.
11456         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11457         code to make path relative to its root into a separate function.
11459         * util/i386/pc/grub-install.in: Use newly provided
11460         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11461         pass the result to grub-install --prefix.
11463 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11465         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11466         DEFAULT_DEVICE_MAP.
11467         * util/grub-emu.c: Use above definitions from misc.h instead of
11468         defining them.
11469         * util/grub-mkdevicemap.c: Likewise.
11470         * util/i386/pc/grub-setup.c: Likewise.
11471         * util/grub-probe.c: Likewise.
11472         (probe): Abort with grub_util_error() when either
11473         grub_guess_root_device or grub_util_get_grub_dev fails.
11475 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11477         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11478         "pager" assignment.
11479         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11480         "pcdata".
11481         * util/grub-probe.c (probe): Likewise for "drive_name".
11483 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11485         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11486         not just the cdrom one.
11488 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11490         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11491         Add --pkglibdir=DIR option to override pkglibdir.
11492         Mention --image-type=TYPE in help output.
11493         Fix --grub-mkimage (it was a no-op).
11494         Abort gracefully when no parameter is given.
11496 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11498         * util/i386/pc/grub-mkrescue.in: New file.
11499         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11500         * Makefile.in: Handle bin_SCRIPTS.
11502 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11504         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11505         list of video modes.
11507 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11509         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11510         file doesn't exist, or if it is in a filesystem grub can't read.
11512         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11513         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11514         header comment to fit in 80 columns when the variables are resolved.
11516         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11517         could be identified by update-grub.  Remove redundant check for
11518         unifont.pff existence (since convert_system_path_to_grub_path now
11519         handles that).
11521 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11523         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11525         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11527         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11529 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11531         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11533         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11534         grub_apple_partition_map_fini.
11536         * util/biosdisk.c
11537         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11538         to access >2 TiB disks).
11540         Print disk->total_sectors with %llu instead of %lu, since this
11541         variable is always 64-bit (prevents wrong disk size from being displayed
11542         on either >2 TiB disk or big-endian CPU).
11544         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11545         into a generic case that supports all (sane) partition maps.
11547         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11548         breaks big-endian.
11550         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11551         and grub_apple_partition_map_fini() after that.
11553 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11555         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11557         * util/grub.d/00_header.in: Only enable gfxterm when
11558         convert_system_path_to_grub_path() succeeds.
11560 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11562         * util/update-grub_lib.in: New file.
11563         * DISTLIST: Add update-grub_lib.in.
11564         * conf/common.rmk: Generate update-grub_lib and install it in
11565         $(lib_DATA).
11566         * Makefile.in: Add install routine for $(lib_DATA).
11568         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11569         function provided by update-grub_lib to support arbitrary paths of
11570         unifont.pff.
11571         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11572         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11574 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11576         * commands/i386/cpuid.c: New module.
11577         * DISTLIST: Add it.
11578         * conf/i386-efi.rmk: Enable cpuid.mod.
11579         * conf/i386-pc.rmk: Likewise.
11581 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11583         * kern/disk.c (grub_disk_read): Check return value of
11584         grub_realloc().
11586 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11588         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11589         arrays.
11590         * disk/raid.c (grub_raid_open): Likewise.
11592 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11594         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11595         stack instead of on the heap.
11597         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11598         before doing a read on it.
11600         * configure.ac: Only use -fno-stack-protector for the target
11601         environment.
11603 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11605         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11606         __attribute_ ((unused)) to mode_type argument.
11608         * util/getroot.c (grub_guess_root_device): Fix #endif.
11610         * kern/misc.c (memcmp): Fix prototype.
11612         * include/grub/partition.h [GRUB_UTIL]
11613         (grub_gpt_partition_map_init): Add prototype.
11614         (grub_gpt_partition_map_fini): Likewise.
11616         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11617         at the right place.
11619         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11620         (grub_fat_read_data): Likewise.
11621         (grub_fat_find_dir): Likewise.
11623         * font/manager.c (find_glyph): Make table a const.
11624         (grub_font_get_glyph): Remove bitmap from if statement.
11626 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11628         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11629         code, first search for device in /dev/mapper, then in /dev.
11630         (grub_util_get_grub_dev): New function.
11631         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11632         prototype.
11633         * util/grub-probe.c (probe): Remove check for RAID, call
11634         grub_util_get_grub_dev() instead of
11635         grub_util_biosdisk_get_grub_dev().
11636         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11637         grub_util_biosdisk_get_grub_dev().
11638         * util/i386/pc/grub-setup.c (main): Likewise.
11640 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11642         * DISTLIST: Update for the latest changes.
11643         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11644         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11645         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11646         grub/util/biosdisk.h.
11647         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11648         grub/util/biosdisk.h.
11650 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11652         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11654 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11656         * util/i386/efi/grub-install.in: New.
11657         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11658         newly added grub-install.
11659         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11660         include.
11661         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11662         grub/util/biosdisk.h.
11663         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11664         grub/util/biosdisk.h.
11666 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11668         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11669         * include/grub/util/biosdisk.h: ... here.
11670         * util/i386/pc/biosdisk.c: Moved to ...
11671         * util/biosdisk.c: ... here.
11672         * util/i386/pc/getroot.c: Moved to ...
11673         * util/getroot.c: ... here.
11674         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11675         * util/grub-mkdevicemap.c: ... here.
11676         * util/i386/pc/grub-probe.c: Moved to ...
11677         * util/grub-probe.c: ... here.
11679 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11681         * util/update-grub.in: Remove duplicated line in grub.cfg header
11682         message.
11684 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11686         * util/update-grub.in: Fix a few assumptions about the devices holding
11687         /, /boot and /boot/grub being the same.
11688         * util/grub.d/00_header.in: Likewise.
11689         * util/grub.d/10_hurd.in: Likewise.
11690         * util/grub.d/10_linux.in: Likewise.
11692         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11693         patterns.  Use that to define the `.old' suffix as older than `'.
11695         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11697         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11698         the grub.cfg header message.
11700 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11702         * util/update-grub.in: Create device.map if it doesn't already exist,
11703         before attempting to run grub-probe.
11704         Check for grub-probe and grub-mkdevicemap with the same code
11705         grub-install is using.
11706         Remove test mode.
11708 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11710         * Makefile.in: Add the datarootdir autoconf variable.
11712 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11714         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11715         fail gracefully if dev->disk->partition == NULL.
11717 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11719         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11720         determine partition map module.
11721         * util/i386/pc/grub-install.in: Use this feature to decide which
11722         partition module to load, instead of hardcoding pc and gpt.
11724 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11726         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11727         source directory differs from build directory.
11729 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11731         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11732         initialisation.
11734 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11736         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11738 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11740         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11741         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11743 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11745         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11746         (grub_probe_SOURCES): Likewise.
11747         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11748         GPT and initialize dos_part and bsd_part accordingly.
11749         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11750         install_bsd_part.
11751         (main): Activate gpt module for use during partition identification,
11752         and deactivate it afterwards.
11753         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11754         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11755         partition identification, and deactivate it afterwards.
11757 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11759         * term/i386/pc/console.c (grub_console_fini): Call
11760         grub_term_set_current() before grub_term_unregister().
11762 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11764         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11765         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11766         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11767         and update-grub_DATA.
11768         * conf/common.rmk: Build and install update-grub components.
11769         * conf/common.mk: Regenerate.
11770         * util/update-grub.in: New.  Core of update-grub.
11771         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11772         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11773         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11774         * util/grub.d/README: New.  Document grub.d directory layout.
11776 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11778         * util/grub-emu.c: Move initialization functions
11779         grub_util_biosdisk_init() and grub_init_all() before
11780         grub_util_biosdisk_get_grub_dev(), which relies on them.
11782 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11784         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11785         it is used later.
11787 2007-04-18  Jerone Young  <jerone@gmail.com>
11789         * kernel/elf.c: Add missing parenthesis for conditional statement
11790         stanza.
11792 2007-04-10  Jerone Young  <jerone@gmail.com>
11794         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11795         continue on and look for device node with real device name.
11797 2007-04-10  Jerone Young  <jerone@gmail.com>
11799         * configure.ac: Add argument for autoconf to use transformation
11800         ability.
11801         * Makefile.in: Add autoconf package transformation code.
11802         * util/i386/pc/grub-install.in: Likewise.
11803         * util/powerpc/ieee1275/grub-install.in: Likewise.
11805 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11807         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11808         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11809         (EXT2_REVISION): Likewise.
11810         (EXT2_INODE_SIZE): Likewise.
11811         (struct grub_ext2_block_group): Added a missing member
11812         "used_dirs".
11813         (grub_ext2_read_inode): Divide by the inode size in a superblock
11814         instead of 128 to obtain INODES_PER_BLOCK.
11815         Use the macro EXT2_INODE_SIZE instead of directly using
11816         SBLOCK->INODE_SIZE.
11818 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11820         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11821         superblock instead of the structure size to compute an
11822         offset. This fixes the problem that GRUB could not read a
11823         filesystem when inode size is different from 128-byte.
11825 2007-03-05  Marco Gerards  <marco@gnu.org>
11827         * normal/main.c (read_config_file): When "menu" is not set, create
11828         an initial context.
11830 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11832         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11833         (HEAP_LIMIT): New macro.
11834         (grub_claim_heap): Claim memory up to `heaplimit'.
11836 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11838         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11839         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11840         (_start): Likewise.
11841         (grub_arch_modules_addr): Return address after `_end'.
11842         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11843         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11844         (add_segments): Calculate `_end' from phdr size and location.
11845         (ALIGN_UP): Moved to ...
11846         * include/grub/misc.h: here.
11847         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11848         New macro.
11849         (GRUB_IEEE1275_MODULE_BASE): Removed.
11851 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11853         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11854         loop boundary.
11856 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11858         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11859         All users updated.
11860         (grub_elf64_load_hook_t): Likewise.
11861         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11862         debug output.
11864 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11866         * kern/mm.c: Update copyright.
11867         (grub_mm_debug): Correct syntax error.
11868         (grub_mm_dump_free): New function.
11869         (grub_debug_free): Call `grub_free'.
11870         * include/grub/mm.h: Update copyright.
11871         (grub_mm_dump_free): Add declaration.
11873 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11875         * include/grub/ieee1275/ieee1275.h: Update copyright.
11876         * kern/powerpc/ieee1275/init.c: Likewise.
11877         * kern/powerpc/ieee1275/openfw.c: Likewise.
11879         * loader/powerpc/ieee1275/linux.c: Likewise.
11880         * include/grub/elfload.h: Likewise.
11881         * kern/elf.c: Likewise.
11882         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11883         callers.
11884         (grub_elf64_load): Likewise.
11885         (grub_elf32_load_segment): Move to a nested function.
11886         (grub_elf64_load_segment): Likewise.
11888 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11890         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11891         prototype.
11892         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11893         (grub_heap_len): Likewise.
11894         (HEAP_SIZE): New macro.
11895         (grub_claim_heap): New function.
11896         (grub_machine_init): Don't claim heap directly.  Call
11897         `grub_claim_heap'.
11898         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11899         (grub_available_iterate): New function.
11901 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11903         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11904         * configure.ac: Use it for testing the HOST and TARGET compilers.
11906 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11908         * Makefile.in (enable_grub_emu): New variable.
11909         * configure.ac (--enable-grub-emu): New option.
11910         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11911         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11912         * conf/i386-pc.rmk: Likewise.
11913         * conf/powerpc-ieee1275.rmk: Likewise.
11914         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11916 2006-12-12  Marco Gerards  <marco@gnu.org>
11918         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11920         * kern/env.c (grub_env_unset): Don't free the member `value' when
11921         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11922         pointer.
11924         * normal/main.c (current_menu): Removed.
11925         (free_menu): Unset the `menu' environment variable.
11926         (grub_normal_menu_addentry): Make use of the environment variable
11927         `menu', instead of using the global `current_menu'.  Allocate
11928         memory for the sourcecode of this entry.
11929         (read_config_file): New argument `nested', changed all callers.
11930         Only in the case of a new context, initialize a new menu.  Set the
11931         `menu' environment variable.
11932         (grub_normal_execute): Don't set and unset the environment
11933         variable `menu' here anymore.  Only free the menu when leaving the
11934         context.
11936         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11937         leak.
11939 2006-12-11  Marco Gerards  <marco@gnu.org>
11941         * normal/menu_entry.c (run): Fix off by one bug so the last line
11942         is executed.  Move the loader check to outside the loop.
11944 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11946         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11948 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11950         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11951         the number of sectors.  Reported by Andrey Shuvikov
11952         <mr_hyro@yahoo.com>.
11954 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11956         * kern/disk.c (grub_disk_read): When there is a read error, always
11957         try to read only the necessary data.
11959         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11960         disk/raid.c.
11961         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11962         prototype.
11963         [GRUB_UTIL] (grub_raid_fini): Likewise.
11964         [GRUB_UTIL] (grub_lvm_init): Likewise.
11965         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11966         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11967         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11968         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11969         and grub_raid_fini().
11971 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11973         * include/grub/types.h (__unused): Rename to UNUSED.
11974         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11975         (grub_elf64_size): Likewise.
11977 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11979         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11980         grub_error_push and grub_error_pop in the error-handling path.
11981         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11982         length.
11984 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11986         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11987         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11988         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11989         (kernel_elf_SOURCES): Likewise.
11990         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11991         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11992         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11993         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11994         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11995         (elf_mod_SOURCES): New variable.
11996         (elf_mod_CFLAGS): Likewise.
11997         (elf_mod_LDFLAGS): Likewise.
11998         * include/grub/types.h (__unused): New macro.
11999         * include/grub/elfload.h: New file.
12000         * kern/elf.c: Likewise.
12001         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
12002         (ELF32_LOADMASK): New macro.
12003         (ELF64_LOADMASK): Likewise.
12004         (vmlinux): Removed.
12005         (grub_linux_load32): New function.
12006         (grub_linux_load64): Likewise.
12007         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
12008         Use grub_elf_t instead of grub_file_t.
12010 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
12012         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
12013         `catch_result' to struct set_color_args.
12015 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
12017         * normal/menu.c: Include grub/script.h.
12018         * normal/menu_entry.c: Likewise.
12019         * include/grub/normal.h: Do not include grub/script.h.
12021 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
12023         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
12025 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
12027         * kern/disk.c (grub_disk_open): Print debug messages when opening a
12028         disk.
12029         (grub_disk_close): Print debug messages when closing a disk.
12030         (grub_disk_read): Print debug messages when disk read fails.
12031         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
12032         filesystem type.
12033         * kern/partition.c: Include misc.h.
12034         (grub_partition_iterate): Print debug messages when detecting
12035         partition type.
12037 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
12039         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
12040         is negative.
12041         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12043 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
12045         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12046         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12048 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
12050         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12051         instead of sizeof(lv). Patch by Michael Guntsche.
12053 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12055         * disk/lvm.c: Rename VGS to VG_LIST.
12056         (grub_lvm_iterate): Change VGS->LV to VG-LV.
12057         (grub_lvm_open): Likewise.
12058         Thanks to Michael Guntsche for finding this bug.
12060 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
12062         * configure.ac (AC_INIT): Bumped to 1.95.
12064 2006-10-14  Robert Millan  <rmh@aybabtu.com>
12066         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12067         with "/dev/.static/dev/md".
12069 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
12071         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12072         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12073         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12074         DRIVE_NAME are always freed.
12076         * util/i386/pc/biosdisk.c (make_device_name): Add one into
12077         DOS_PART, as a DOS partition is counted from one instead of zero
12078         now. Reported by Robert Millan.
12080 2006-10-14  Robert Millan  <rmh@aybabtu.com>
12082         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12083         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12084         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12085         string returned by grub_guess_root_device.
12086         * util/i386/pc/grub-setup.c: Likewise.
12087         * util/i386/pc/grub-probefs.c: Likewise.
12089         * util/i386/pc/grub-probefs.c: Rename to ...
12090         * util/i386/pc/grub-probe.c: ... this.
12091         * DISTLIST: Remove grub-probefs, add grub-probe.
12092         * conf/i386-efi.rmk: Likewise.
12093         * conf/i386-pc.rmk: Likewise.
12094         * util/i386/pc/grub-install.in: Likewise.
12096         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12097         choose which information we want to print.
12099 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
12101         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12102         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12103         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12104         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12105         video/readers/tga.c and video/i386/pc/vbeutil.c.
12107 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
12109         Added support for RAID and LVM.
12111         * disk/lvm.c: New file.
12112         * disk/raid.c: Likewise.
12113         * include/grub/lvm.h: Likewise.
12114         * include/grub/raid.h: Likewise.
12115         * include/grub/util/lvm.h: Likewise.
12116         * include/grub/util/raid.h: Likewise.
12117         * util/lvm.c: Likewise.
12118         * util/raid.c: Likewise.
12120         * include/grub/disk.h (grub_disk_dev_id): Add
12121         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12122         (grub_disk_get_size): New prototype.
12123         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12124         returns a partition.
12125         (grub_disk_get_size): New function.
12127         * kern/i386/pc/init.c (make_install_device): Copy the prefix
12128         verbatim if grub_install_dos_part is -2.
12130         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12131         and LVM devices.
12133         * util/i386/pc/grub-setup.c (setup): New argument
12134         MUST_EMBED. Force embedding of GRUB when the argument is
12135         true. Close FILE before returning.
12136         (main): Add support for RAID and LVM.
12138         * conf/common.rmk: Add RAID and LVM modules.
12139         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12140         util/lvm.c.
12141         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12143         * kern/misc.c (grub_strstr): New function.
12144         * include/grub/misc.h (grub_strstr): New prototype.
12146 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
12148         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12150 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
12152         * kern/misc.c (grub_strtoull): Guess the base only if not
12153         specified.
12155 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
12157         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12158         PowerMac support.
12160 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
12162         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12164         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12165         Remove `flags' argument.  All callers changed.
12166         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12167         (IEEE1275_IHANDLE_INVALID): New variable.
12168         (IEEE1275_CELL_INVALID): New variable.
12169         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12170         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12171         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12172         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12173         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12174         codes from Open Firmware.  All callers updated.
12175         (grub_ieee1275_next_property): Directly return Open Firmware return
12176         code.
12177         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12178         Standardize error checking from `grub_ieee1275_get_property'.
12179         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12180         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
12182 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
12184         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12185         `instance_to_package_args' to `instance_to_path_args'.
12187         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12188         `grub_ieee1275_chosen'.
12190         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12191         `grub_ieee1275_interpret'.
12193 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
12195         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12197 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
12199         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12200         (__cmpdi): Likewise.
12202         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12203         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
12204         `grub_ssize_t'.
12206         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12208         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12209         to type `grub_ssize_t'.
12210         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12212 2006-09-22  Marco Gerards  <marco@gnu.org>
12214         * normal/script.c (grub_script_create_cmdmenu): Skip leading
12215         newlines.
12217 2006-09-22  Marco Gerards  <marco@gnu.org>
12219         * commands/echo.c: New file.
12221         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12223         * conf/common.rmk (echo_mod_SOURCES): New variable.
12224         (echo_mod_CFLAGS): Likewise.
12225         (echo_mod_LDFLAGS): Likewise.
12227 2006-09-22  Marco Gerards  <marco@gnu.org>
12229         * normal/main.c (get_line): Malloc memory instead of using
12230         preallocated memory.  Removed the arguments `cmdline' and
12231         `max_len'.  Updated all callers.
12233 2006-09-22  Marco Gerards  <marco@gnu.org>
12235         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12236         (normal_mod_DEPENDENCIES): Likewise.
12238         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12239         (normal_mod_DEPENDENCIES): Likewise.
12241         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12243 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
12245         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12246         programs.
12247         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12248         (normal_mod_DEPENDENCIES): Likewise.
12249         * conf/i386-pc.mk: Regenerate.
12250         * conf/i386-efi.mk: Likewise
12251         * conf/common.mk: Likewise.
12252         * conf/powerpc-ieee1275.mk: Likewise.
12253         * conf/sparc64-ieee1275.mk: Likewise.
12255 2006-09-22  Robert Millan  <rmh@aybabtu.com>
12257         Sync with i386 version.
12258         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12259         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12261 2006-09-21  Robert Millan  <rmh@aybabtu.com>
12263         Import from GRUB Legacy (lib/device.c):
12264         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12265         (init_device_map) [__linux__]: Add support for I2O devices.
12267 2006-09-14  Marco Gerards  <marco@gnu.org>
12269         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12270         `-melf_i386'.
12272 2006-09-14  Robert Millan  <rmh@aybabtu.com>
12274         * util/i386/pc/grub-install.in: Skip menu.lst when removing
12275         /boot/grub/*.lst.
12277         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12279         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12280         before adding it to device.map.
12282 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
12284         * genmk.rb: Let GCC generate dependencies the first time it
12285         compiles a file; using the -MD option.
12286         * conf/common.mk: Regenerate.
12287         * conf/i386-pc.mk: Likewise.
12288         * conf/i386-efi.mk: Likewise.
12289         * conf/powerpc-ieee1275.mk: Likewise.
12290         * conf/sparc64-ieee1275.mk: Likewise.
12292 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
12294         Move the prototypes of grub_setjmp and grub_longjmp to
12295         cpu/setjmp.h, so that each architecture may specify different
12296         attributes.
12298         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12299         (grub_longjmp): Likewise.
12300         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12301         (grub_longjmp): Likewise.
12302         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12303         (grub_longjmp): Likewise.
12305         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12306         [!GRUB_UTIL] (grub_longjmp): Removed.
12308 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
12310         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12311         "color!" method does not return any value.
12313 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12315         * include/grub/bitmap.h: New file.
12317         * include/grub/i386/pc/vbeutil.h: Likewise.
12319         * video/bitmap.c: Likewise.
12321         * video/readers/tga.c: Likewise.
12323         * video/i386/pc/vbeutil.c: Likewise.
12325         * commands/videotest.c: Code cleanup and updated to reflect to new
12326         video API.
12328         * term/gfxterm.c: Likewise.
12330         * video/video.c: Likewise.
12332         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12333         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12334         (bitmap_mod_SOURCES): New entry.
12335         (bitmap_mod_CFLAGS): Likewise.
12336         (bitmap_mod_LDFLAGS): Likewise.
12337         (tga_mod_SOURCES): Likewise.
12338         (tga_mod_CFLAGS): Likewise.
12339         (tga_mod_LDFLAGS): Likewise.
12341         * include/grub/video.h (grub_video_blit_operators): New enum type.
12342         (grub_video_render_target): Changed as forward declaration and moved
12343         actual definition to be video driver specific.
12344         (grub_video_adapter.blit_bitmap): Added blitting operator.
12345         (grub_video_adapter.blit_render_target): Likewise.
12346         (grub_video_blit_bitmap): Likewise.
12347         (grub_video_blit_render_target): Likewise.
12349         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12350         driver specific render target definition.
12351         (grub_video_vbe_map_rgba): Added driver internal helper.
12352         (grub_video_vbe_unmap_color): Updated to use
12353         grub_video_i386_vbeblit_info.
12354         (grub_video_vbe_get_video_ptr): Likewise.
12356         * include/grub/i386/pc/vbeblit.h
12357         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12358         grub_video_i386_vbeblit_info.
12359         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12360         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12361         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12362         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12363         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12364         (grub_video_i386_vbeblit_index_index): Likewise.
12365         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12366         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12367         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12368         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12369         operator.
12370         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12371         operator.
12373         * video/i386/pc/vbeblit.c: Updated to reflect changes on
12374         include/grub/i386/pc/vbeblit.h.
12376         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12377         Updated to use grub_video_i386_vbeblit_info.
12378         (grub_video_i386_vbefill_R8G8B8): Likewise.
12379         (grub_video_i386_vbefill_index): Likewise.
12380         (grub_video_i386_vbefill): Added generic filler.
12382         * video/i386/pc/vbefill.c: Updated to reflect changes on
12383         include/grub/i386/pc/vbefill.h.
12385         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12386         grub_video_i386_vbeblit_info.
12387         (grub_video_vbe_unmap_color): Likewise.
12388         (grub_video_vbe_blit_glyph): Likewise.
12389         (grub_video_vbe_scroll): Likewise.
12390         (grub_video_vbe_draw_pixel): Removed function.
12391         (grub_video_vbe_get_pixel): Likewise.
12392         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12393         updated code to use it.
12394         (common_blitter): Added common blitter for render target and bitmap.
12395         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12396         (grub_video_vbe_blit_render_target): Likewise.
12398 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12400         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12401         is in text mode if there is no console control protocol instance
12402         available.
12404 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12406         * include/grub/video.h: Code cleanup.
12408         * include/grub/i386/pc/vbe.h: Likewise.
12410         * video/i386/pc/vbe.c: Likewise.
12412         * video/i386/pc/vbeblit.c: Likewise.
12414         * video/i386/pc/vbefill.c: Likewise.
12416         * video/video.c: Likewise.  Also added more comments.
12418 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12420         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12421         (struct grub_biosdisk_dap): Likewise.
12423         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12424         linkage settings for all functions.
12426 2006-07-12  Marco Gerards  <marco@gnu.org>
12428         * configure.ac (--enable-mm-debug): Fix typo.
12430         * genkernsyms.sh.in: Use proper quoting for `CC'.
12432 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12434         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12435         (normal_mod_ASFLAGS): Remove "-m32".
12437 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12439         * util/misc.c: Include config.h.
12440         [!HAVE_MEMALIGN]: Do not include malloc.h.
12441         (grub_memalign): Use posix_memalign, if present. Then, use
12442         memalign, if present. Otherwise, emit an error.
12444         * util/grub-emu.c: Do not include malloc.h.
12446         * include/grub/util/misc.h: Include unistd.h. This is required for
12447         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12448         D. Eades III <hde@foobar-qux.org>.
12450         * configure.ac (AC_GNU_SOURCE): Added.
12451         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12452         type.
12454 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12456         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12457         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12459 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12461         * include/grub/types.h (grub_host_addr_t): Rename to
12462         grub_target_addr_t.
12463         (grub_host_off_t): Rename to grub_target_off_t.
12464         (grub_host_size_t): Rename to grub_target_size_t.
12465         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12466         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12468         * include/grub/kernel.h (struct grub_module_header): Change type
12469         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12470         (grub_module_info): Likewise.
12472 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12474         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12475         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12476         Velazquez <jesus.velazquez@gmail.com>.
12478 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12480         Count partitions from 1 instead of 0 in the string representation
12481         of partitions. Still use 0-based internally.
12483         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12484         (sun_partition_map_iterate): Use grub_partition_t instead of
12485         struct grub_partition *. Cast DESC->START_CYLINDER to
12486         grub_uint64_t after converting the endian.
12487         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12488         (sun_partition_map_get_name): Add 1 to P->INDEX.
12490         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12491         PCDATA->DOS_PART.
12492         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12494         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12495         zero instead of one.
12496         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12497         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12499         * partmap/apple.c (apple_partition_map_iterate): Change the type
12500         of POS to unsigned.
12501         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12502         (apple_partition_map_get_name): Add 1 into P->INDEX.
12504         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12505         of POS to unsigned.
12506         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12507         calculate the offset of a partition.
12508         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12509         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12511         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12512         SECTOR to grub_disk_addr_t.
12513         (acorn_partition_map_iterate): Likewise.
12514         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12515         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12516         top.
12517         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12519         * kern/i386/pc/init.c (make_install_device): Add 1 into
12520         GRUB_INSTALL_DOS_PART.
12522         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12523         conditional.
12525 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12527         Clean up the code to support 64-bit addressing in disks and
12528         files. This change is not enough for filesystems yet.
12530         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12531         type of "start" to grub_uint64_t.
12532         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12533         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12534         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12535         convert addresses.
12537         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12538         to grub_disk_addr_t.
12540         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12541         string.
12543         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12545         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12546         to char *.
12548         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12550         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12552         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12554         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12555         to grub_off_t, to detect an error from grub_file_seek.
12556         (grub_multiboot_load_elf32): Likewise.
12558         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12559         maximum unsigned long value when an overflow is detected.
12560         (grub_strtoull): New function.
12561         (grub_divmod64): Likewise.
12562         (grub_lltoa): use grub_divmod64.
12564         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12565         grub_disk_addr_t.
12566         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12567         the pointer to next character. Use grub_strtoull instead of
12568         grub_strtoul.
12569         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12570         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12571         respectively.
12573         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12574         return value is signed.
12575         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12576         test if OFFSET is less than zero, as OFFSET is unsigned now.
12578         * kern/disk.c (struct grub_disk_cache): Change the type of
12579         "sector" to grub_disk_addr_t.
12580         (grub_disk_cache_get_index): Change the type of SECTOR to
12581         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12582         unsigned after shifting.
12583         (grub_disk_cache_invalidate): Change the type of SECTOR to
12584         grub_disk_addr_t.
12585         (grub_disk_cache_unlock): Likewise.
12586         (grub_disk_cache_store): Likewise.
12587         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12588         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12589         grub_disk_addr_t and grub_uint64_t, respectively.
12590         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12591         body, as the value of OFFSET is tweaked by
12592         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12593         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12594         respectively.
12595         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12596         body, as the value of OFFSET is tweaked by
12597         grub_disk_check_range. Change the types of LEN and N to
12598         grub_size_t.
12600         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12601         and "saved_offset" to grub_off_t.
12602         (test_header): Cast BUF to char *.
12603         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12604         to char *.
12605         (grub_gzio_read): Change the types of OFFSET and SIZE to
12606         grub_off_t and grub_size_t, respectively.
12608         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12609         Removed.
12610         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12611         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12612         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12613         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12614         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12616         * include/grub/types.h (grub_off_t): Unconditionally set to
12617         grub_uint64_t.
12618         (grub_disk_addr_t): Changed to grub_uint64_t.
12620         * include/grub/partition.h (struct grub_partition): Change the
12621         types of "start", "len" and "offset" to grub_disk_addr_t,
12622         grub_uint64_t and grub_disk_addr_t, respectively.
12623         (grub_partition_get_start): Return grub_disk_addr_t.
12624         (grub_partition_get_len): Return grub_uint64_t.
12626         * include/grub/misc.h (grub_strtoull): New prototype.
12627         (grub_divmod64): Likewise.
12629         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12630         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12631         grub_off_t, respectively.
12632         All callers and references changed.
12634         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12635         grub_size_t in "read".
12636         All callers and references changed.
12638         * include/grub/file.h (struct grub_file): Change the types of
12639         "offset" and "size" to grub_off_t and grub_off_t,
12640         respectively. Change the type of SECTOR to grub_disk_addr_t in
12641         "read_hook".
12642         (grub_file_read): Change the type of LEN to grub_size_t.
12643         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12644         grub_off_t.
12645         (grub_file_size): Return grub_off_t.
12646         (grub_file_tell): Likewise.
12647         All callers and references changed.
12649         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12650         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12651         "write".
12652         (struct grub_disk): Change the type of "total_sectors" to
12653         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12654         "read_hook".
12655         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12656         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12657         (grub_disk_write): Likewise.
12658         All callers and references changed.
12660         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12661         char * for grub_strncmp to silence gcc.
12662         (grub_iso9660_mount): Likewise.
12663         (grub_iso9660_mount): Likewise.
12664         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12665         return statement.
12666         (grub_iso9660_iterate_dir): Likewise.
12667         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12669         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12670         LEN to grub_disk_addr_t and grub_size_t, respectively.
12672         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12674         * fs/jfs.c (grub_jfs_read_file): Likewise.
12676         * fs/minix.c (grub_jfs_read_file): Likewise.
12678         * fs/sfs.c (grub_jfs_read_file): Likewise.
12680         * fs/ufs.c (grub_jfs_read_file): Likewise.
12682         * fs/xfs.c (grub_jfs_read_file): Likewise.
12684         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12685         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12686         respectively.
12688         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12689         BLKNR to -1 instead of returning GRUB_ERRNO.
12690         (grub_ext2_read_file): Change the types of SECTOR and
12691         LEN to grub_disk_addr_t and grub_size_t, respectively.
12693         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12694         LEN to grub_disk_addr_t and grub_size_t, respectively.
12696         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12697         grub_file_read.
12699         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12700         string. Do not cast SECTOR explicitly.
12702         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12703         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12704         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12705         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12706         over 2TB and LBA mode is not supported, raise an error.
12707         (get_safe_sectors): New function.
12708         (grub_biosdisk_read): Use get_safe_sectors.
12709         (grub_biosdisk_write): Likewise.
12711         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12712         (grub_efidisk_write): Likewise.
12714         * disk/loopback.c (delete_loopback): Cosmetic changes.
12715         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12716         correctly.
12717         (grub_loopback_open): Likewise.
12718         (grub_loopback_read): Likewise. Also, change the type of POS to
12719         grub_off_t, and fix the usage of grub_memset.
12721         * commands/i386/pc/play.c: Include grub/machine/time.h.
12723         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12724         print FILE->SIZE.
12726         * commands/configfile.c: Include grub/env.h.
12728         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12729         GRUB_ERRNO directly instead. Change the type of POS to
12730         grub_off_t. Follow the coding standard.
12732         * commands/blocklist.c: Include grub/partition.h.
12733         (grub_cmd_blocklist): Return an error if the underlying device is
12734         not a disk. Take the starting sector of a partition into account,
12735         if a partition is used.
12737         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12738         a length field.
12739         (lba_mode): Support 64-bit addresses.
12740         (chs_mode): Likewise.
12741         (copy_buffer): Adapted to the new offsets of a length field and a
12742         segment field.
12743         (blocklist_default_start): Allocate 64-bit space.
12745         * boot/i386/pc/boot.S (force_lba): Removed.
12746         (boot_drive): Moved to under KERNEL_SECTOR.
12747         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12748         space.
12749         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12750         is useless.
12751         (lba_mode): Refactored to support a 64-bit address. More size
12752         optimization.
12753         (setup_sectors): Likewise.
12755 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12757         * DISTLIST: Added include/grub/i386/linux.h. Removed
12758         include/grub/i386/pc/linux.h
12760         * configure.ac (AC_INIT): Bumped to 1.94.
12762         * config.guess: Updated from gnulib.
12763         * config.sub: Likewise.
12764         * install-sh: Likewise.
12765         * mkinstalldirs: Likewise.
12767 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12769         * conf/common.rmk (grub_modules_init.lst): Depended on
12770         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12771         MODSRCFILES.
12773         * genmk.rb (PModule::rule): Reverted the previous change.
12775 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12777         * conf/common.rmk (grub_modules_init.lst): Depends on
12778         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12779         that the target does not exist before producing.
12780         (grub_modules_init.h): Remove the target before generating.
12781         (grub_emu_init.c): Likewise.
12783         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12785 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12787         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12788         for the target-specific tests. Make sure that we also have the
12789         up-to-date target variables for those tests.
12791 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12793         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12794         (PModule::rule): Likewise.
12796 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12798         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12799         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12800         target-specific flags should be prefixed.
12801         (PModule::rule): Likewise.
12803 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12805         * configure.ac (CMP): Check if cmp is available explicitly.
12807 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12809         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12810         (target_cpu): New variable.
12811         (pkglibdir): Use target_cpu instead of host_cpu.
12813         * util/i386/pc/grub-install.in (host_cpu): Removed.
12814         (target_cpu): New variable.
12815         (pkglibdir): Use target_cpu instead of host_cpu.
12817         * util/genmoddep.c: Removed.
12819         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12820         instead of GRUB_HOST_SIZEOF_VOID_P.
12821         * kern/dl.c: Likewise.
12823         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12824         ...
12825         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12826         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12827         (GRUB_TARGET_SIZEOF_LONG): ... this.
12828         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12829         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12830         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12831         to ...
12832         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12833         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12834         (GRUB_TARGET_SIZEOF_LONG): ... this.
12835         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12836         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12837         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12838         to ...
12839         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12840         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12841         (GRUB_TARGET_SIZEOF_LONG): ... this.
12842         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12843         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12845         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12846         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12847         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12848         instead of GRUB_HOST_SIZEOF_LONG.
12849         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12850         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12851         GRUB_CPU_WORDS_BIGENDIAN.
12852         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12853         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12854         grub_host_ssize_t.
12856         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12857         (genmoddep_SOURCES): Likewise.
12858         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12859         (genmoddep_SOURCES): Likewise.
12860         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12861         (genmoddep_SOURCES): Likewise.
12862         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12863         Likewise.
12864         (genmoddep_SOURCES): Likewise.
12866         * genmoddep.awk: New file.
12868         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12869         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12870         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12871         (PModule::rule): Likewise.
12872         (Program::rule): Likewise.
12873         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12874         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12875         respectively.
12877         * configure.ac: Rewritten intensively to use host and target
12878         instead of build and host, respectively.
12880         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12881         (host_cpu): Removed.
12882         (target_cpu): New variable.
12883         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12884         (BUILD_CC): Removed.
12885         (BUILD_CFLAGS): Likewise.
12886         (BUILD_CPPFLAGS): Likewise.
12887         (TARGET_CC): New variable.
12888         (TARGET_CFLAGS): Likewise.
12889         (TARGET_CPPFLAGS): Likewise.
12890         (TARGET_LDFLAGS): Likewise.
12891         (AWK): Likewise.
12892         (include): Use target_cpu instead of host_cpu.
12893         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12895         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12897 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12899         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12900         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12901         field 'false' to 'exec_on_false'.
12902         (grub_script_create_cmdif): Renamed argument names to reflect above
12903         changes.
12905         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12907         * normal/script.c (grub_script_create_cmdif): Likewise.
12909 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12911         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12912         top.
12913         (grub_hfsplus_btree_recptr): Likewise.
12914         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12915         FILEBLOCK both to pass a block number and store next block
12916         number.
12917         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12918         overflow file correctly. Specify errors appropriately, because
12919         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12920         grub_hfsplus_btree_recptr to get the pointer to a found key.
12921         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12922         is found.
12924         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12925         linux.mod.
12926         (_linux_mod_SOURCES): New variable.
12927         (_linux_mod_CFLAGS): Likewise.
12928         (_linux_mod_LDFLAGS): Likewise.
12929         (linux_mod_SOURCES): Likewise.
12930         (linux_mod_CFLAGS): Likewise.
12931         (linux_mod_LDFLAGS): Likewise.
12933         * DISTLIST: Added loader/i386/efi/linux.c,
12934         loader/i386/efi/linux_normal.c and
12935         include/grub/i386/efi/loader.h.
12937         * loader/i386/efi/linux.c: New file.
12938         * loader/i386/efi/linux_normal.c: Likewise.
12939         * include/grub/i386/efi/loader.h: Likewise.
12941 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12943         * commands/blocklist.c: New file.
12945         * DISTLIST: Added commands/blocklist.c.
12947         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12948         color for the background, and a darker color for the foreground.
12949         (grub_console_checkkey): Return READ_KEY.
12950         (grub_console_cls): Set the background to
12951         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12953         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12955         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12956         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12958         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12959         prototype.
12961         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12962         BG. The spec is wrong again.
12964         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12965         prototype.
12966         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12968         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12969         commands/blocklist.c.
12970         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12972         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12973         (blocklist_mod_SOURCES): New variable.
12974         (blocklist_mod_CFLAGS): Likewise.
12975         (blocklist_mod_LDFLAGS): Likewise.
12977 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12979         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12980         duplication.
12981         (lba_mode): Use %eax more intensively to reduce the code size.
12983 2006-05-20  Marco Gerards  <marco@gnu.org>
12985         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12987         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12988         for `menuentry'.
12989         (script): Accept leading newlines.
12990         (newlines): New rule to describe 0 or more newlines.
12991         (commands): Accept `command' with trailing newline.  Fixed the
12992         order in which arguments were passed to `grub_script_add_cmd'.
12993         Accept commands separated by newlines.
12994         (function): Changed to accept newlines.
12995         (menuentry) Rewritten.
12997         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12998         front of the list, instead of to the end.
13000 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
13002         * util/i386/pc/grub-install.in (bindir): New variable.
13003         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
13004         Shaver <lbgwjl@gmail.com>.
13006 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
13008         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
13009         grub/machine/linux.h
13010         * loader/i386/pc/linux.c: Likewise.
13012         * include/grub/i386/pc/linux.h: Moved to ...
13013         * include/grub/i386/linux.h: ... here.
13015         * include/grub/i386/linux.h (struct linux_kernel_params): New
13016         struct.
13018 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
13020         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
13021         checking.
13022         (grub_video_vbe_blit_glyph): Likewise.
13023         (grub_video_vbe_blit_bitmap): Likewise.
13024         (grub_video_vbe_blit_render_target): Likewise.
13026 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
13028         * configure.ac (--with-platform): Properly quote the square
13029         brackets.
13031 2006-05-08  Marco Gerards  <marco@gnu.org>
13033         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
13034         this...
13035         (kernel_elf_HEADERS): ...to this.  Updated all users.
13036         (grubof_symlist.c): Renamed from this...
13037         (kernel_elf_symlist.c): ...to this.  Updated all users.
13038         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13039         (grubof_SOURCES): Renamed from this...
13040         (kernel_elf_SOURCES): ...to this.
13041         (grubof_HEADERS): Renamed from this...
13042         (kernel_elf_HEADERS): ...to this.
13043         (grubof_CFLAGS): Renamed from this...
13044         (kernel_elf_CFLAGS): ...to this.
13045         (grubof_ASFLAGS): Renamed from this...
13046         (kernel_elf_ASFLAGS): ...to this.
13047         (grubof_LDFLAGS): Renamed from this...
13048         (kernel_elf_LDFLAGS): ...to this.
13050         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13051         this...
13052         (kernel_elf_HEADERS): ...to this.  Updated all users.
13053         (grubof_symlist.c): Renamed from this...
13054         (kernel_elf_symlist.c): ...to this.  Updated all users.
13055         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13056         (grubof_SOURCES): Renamed from this...
13057         (kernel_elf_SOURCES): ...to this.
13058         (grubof_HEADERS): Renamed from this...
13059         (kernel_elf_HEADERS): ...to this.
13060         (grubof_CFLAGS): Renamed from this...
13061         (kernel_elf_CFLAGS): ...to this.
13062         (grubof_ASFLAGS): Renamed from this...
13063         (kernel_elf_ASFLAGS): ...to this.
13064         (grubof_LDFLAGS): Renamed from this...
13065         (kernel_elf_LDFLAGS): ...to this.
13067         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13068         `kernel.elf' instead of `grubof'.
13070 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
13072         Add --with-platform to configure. Use pkglibdir instead of
13073         pkgdatadir. This is reported by Roger Leigh.
13075         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13076         (host_vendor): Likewise.
13077         (host_os): Likewise.
13078         (pkgdatadir): Likewise.
13079         (platform): New variable.
13080         (pkglibdir): Likewise.
13081         Use PKGLIBDIR instead of PKGDATADIR.
13083         * util/i386/pc/grub-install.in (datadir): Removed.
13084         (host_vendor): Likewise.
13085         (host_os): Likewise.
13086         (pkgdatadir): Likewise.
13087         (platform): New variable.
13088         (pkglibdir): Likewise.
13089         Use PKGLIBDIR instead of PKGDATADIR.
13091         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13092         instead of GRUB_DATADIR.
13093         (main): Likewise.
13094         * util/i386/pc/grub-mkimage.c (usage): Likewise.
13095         (main): Likewise.
13096         * util/i386/efi/grub-mkimage.c (usage): Likewise.
13097         (main): Likewise.
13099         * configure.ac (--with-platform): New option.
13100         Use PLATFORM instead of HOST_VENDOR to specify a platform.
13102         * Makefile.in: Include a makefile based on PLATFORM instead of
13103         HOST_VENDOR.
13104         (pkgdatadir): Not appended by the machine type.
13105         (pkglibdir): Appended by the machine type.
13106         (host_vendor): Removed.
13107         (platform): New variable.
13108         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13109         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13110         (uninstall): Likewise.
13112 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
13114         Use the environment context in the menu. Remove the commands
13115         "default" and "timeout", and use variables instead.
13117         * normal/menu.c: Include grub/env.h.
13118         (print_entry): Cast TITLE to silence gcc.
13119         (get_timeout): New function.
13120         (set_timeout): Likewise.
13121         (get_entry_number): Likewise.
13122         (run_menu): Use a default entry, a fallback entry and a timeout
13123         in the environment variables "default", "fallback" and
13124         "timeout". Also, tweak the default entry if it is not within the
13125         current menu entries.
13126         (grub_menu_run): Use a fallback entry in the environment variable
13127         "fallback".
13129         * normal/main.c (read_config_file): Do not initialize
13130         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13131         NEWMENU->TIMEOUT.
13132         (grub_normal_execute): Use a data slot to store the menu.
13134         * include/grub/normal.h (struct grub_menu): Removed default_entry,
13135         fallback_entry and timeout.
13136         (struct grub_menu_list): Removed.
13137         (grub_menu_list_t): Likewise.
13138         (struct grub_context): Likewise.
13139         (grub_context_t): Likewise.
13140         (grub_context_get): Likewise.
13141         (grub_context_get_current_menu): Likewise.
13142         (grub_context_push_menu): Likewise.
13143         (grub_context_pop_menu): Likewise.
13144         (grub_default_init): Likewise.
13145         (grub_default_fini): Likewise.
13146         (grub_timeout_init): Likewise.
13147         (grub_timeout_fini): Likewise.
13149         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13150         and timeout.mod.
13151         (normal_mod_SOURCES): Removed normal/context.c.
13153         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13154         commands/default.c, commands/timeout.c and normal/context.c.
13155         (normal_mod_SOURCES): Removed normal/context.c.
13157         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13158         commands/timeout.c and normal/context.c.
13159         (normal_mod_SOURCES): Removed normal/context.c.
13161         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13162         commands/default.c, commands/timeout.c and normal/context.c.
13163         (normal_mod_SOURCES): Removed normal/context.c.
13165         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13166         timeout.mod.
13167         (default_mod_SOURCES): Removed.
13168         (default_mod_CFLAGS): Likewise.
13169         (default_mod_LDFLAGS): Likewise.
13170         (timeout_mod_SOURCES): Removed.
13171         (timeout_mod_CFLAGS): Likewise.
13172         (timeout_mod_LDFLAGS): Likewise.
13174         * DISTLIST: Removed commands/default.c, commands/timeout.c and
13175         normal/context.c.
13177         * commands/default.c: Removed.
13178         * commands/timeout.c: Likewise.
13179         * normal/context.c: Likewise.
13181 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
13183         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13185 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
13187         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13188         "next" to "prev" for readability.
13189         (struct grub_env_sorted_var): New struct.
13190         (grub_env_context): Renamed to ...
13191         (initial_context): ... this.
13192         (grub_env_var_context): Renamed to ...
13193         (current_context): ... this.
13194         (grub_env_find): Look only at CURRENT_CONTEXT.
13195         (grub_env_context_open): Rewritten to copy exported variables from
13196         previous context.
13197         (grub_env_context_close): Rewritten according to the new
13198         scheme. Also, add an assertion to prevent the initial context from
13199         removed.
13200         (grub_env_insert): Removed the code for the sorted list.
13201         (grub_env_remove): Likewise.
13202         (grub_env_export): Simply mark the variable with
13203         GRUB_ENV_VAR_GLOBAL.
13204         (grub_env_set): A cosmetic change for naming consistency.
13205         (grub_env_get): Likewise.
13206         (grub_env_unset): Likewise.
13207         (grub_env_iterate): Rewritten to sort variables within this
13208         function.
13209         (grub_register_variable_hook): Fixed for naming consistency. Call
13210         grub_env_find again, only if NAME is not found at the first time.
13211         (mangle_data_slot_name): New function.
13212         (grub_env_set_data_slot): Likewise.
13213         (grub_env_get_data_slot): Likewise.
13214         (grub_env_unset_data_slot): Likewise.
13216         * include/grub/env.h (grub_env_var_type): New enum.
13217         (GRUB_ENV_VAR_LOCAL): New constant.
13218         (GRUB_ENV_VAR_GLOBAL): Likewise.
13219         (GRUB_ENV_VAR_DATA): Likewise.
13220         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13221         "type".
13222         (grub_env_set): Replace VAR with NAME for consistency.
13223         (grub_register_variable_hook): Likewise.
13224         (grub_env_export): Specify the name of the argument.
13225         (grub_env_set_data_slot): New prototype.
13226         (grub_env_get_data_slot): Likewise.
13227         (grub_env_unset_data_slot): Likewise.
13229 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13231         Extend the loader so that GRUB can accept a loader which comes
13232         back to GRUB when a loaded image exits. Also, this change adds
13233         support for a chainloader on EFI.
13235         * term/efi/console.c: Include grub/misc.h.
13236         (grub_console_checkkey): Display a scan code on the top for
13237         debugging. This will be removed once the EFI port gets stable.
13238         Correct the scan code mapping.
13240         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13241         allocate memory from larger regions, in order to reduce the number
13242         of allocated regions. Otherwise, the MacOSX loader panics.
13243         (filter_memory_map): Avoid less than 1MB for compatibility with
13244         other loaders.
13245         (add_memory_regions): Allocate from the tail of a region, if
13246         possible, to avoid allocating a region near to 1MB, for the MacOSX
13247         loader.
13249         * kern/efi/init.c (grub_efi_set_prefix): Specify
13250         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13252         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13253         argument IMAGE_HANDLE and specify it to get a loaded image.
13254         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13255         grub_efi_get_loaded_image.
13256         (grub_efi_get_filename): Divide the length by the size of
13257         grub_efi_char16_t.
13258         (grub_efi_get_device_path): New function.
13259         (grub_efi_print_device_path): Print End Device Path nodes. Divide
13260         the length by the size of grub_efi_char16_t for a file path device
13261         path node.
13263         * kern/loader.c (grub_loader_noreturn): New variable.
13264         (grub_loader_set): Accept a new argument NORETURN. Set
13265         GRUB_LOADER_NORETURN to NORETURN.
13266         All callers changed.
13267         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13268         grub_machine_fini.
13270         * include/grub/efi/efi.h (grub_efi_get_device_path): New
13271         prototype.
13272         (grub_efi_get_loaded_image): Take an argument to specify an image
13273         handle.
13275         * include/grub/loader.h (grub_loader_set): Added one more argument
13276         NORETURN.
13278         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13279         instead of grub_efi_open_protocol.
13280         (grub_efidisk_get_device_name): Likewise.
13281         (grub_efidisk_close): Print a newline.
13282         (grub_efidisk_get_device_handle): Fixed to use
13283         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13284         GRUB_EFI_DEVICE_PATH_TYPE.
13286         * disk/efi/efidisk.c (device_path_guid): Moved to ...
13287         * kern/efi/efi.c (device_path_guid): ... here.
13289         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13290         chain.mod.
13291         (kernel_mod_HEADERS): Added efi/disk.h.
13292         (_chain_mod_SOURCES): New variable.
13293         (_chain_mod_CFLAGS): Likewise.
13294         (_chain_mod_LDFLAGS): Likewise.
13295         (chain_mod_SOURCES): Likewise.
13296         (chain_mod_CFLAGS): Likewise.
13297         (chain_mod_LDFLAGS): Likewise.
13299         * DISTLIST: Added include/grub/efi/chainloader.h,
13300         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13302         * include/grub/efi/chainloader.h: New file.
13303         * loader/efi/chainloader.c: Likewise.
13304         * loader/efi/chainloader_normal.c: Likewise.
13306 2006-04-30  Marco Gerards  <marco@gnu.org>
13308         * commands/configfile.c (grub_cmd_source): New function.
13309         (GRUB_MOD_INIT): Register the commands `source' and `.'.
13310         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13312 2006-04-30  Marco Gerards  <marco@gnu.org>
13314         * normal/execute.c (grub_script_execute_cmd): Change the return
13315         type to `grub_err_t'.  Correctly return the error.
13316         (grub_script_execute_cmdline): In case a command line is not a
13317         command or a function, try to interpret it as an assignment.
13319 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13321         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13322         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13323         skip a node whose name is obviously invalid as UTF-16,
13324         i.e. contains a NUL character. Stop the iteration when the last
13325         directory entry is found. Instead of using the return value of
13326         grub_hfsplus_btree_iterate_node, store the value in RET and use
13327         it, because the iterator can be stopped by the last directory
13328         entry.
13330 2006-04-30  Marco Gerards  <marco@gnu.org>
13332         * include/grub/env.h (grub_env_export): New prototype.  Reported
13333         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13335 2006-04-30  Marco Gerards  <marco@gnu.org>
13337         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13338         size of the extents in a catalog file record.
13340 2006-04-29  Marco Gerards  <marco@gnu.org>
13342         * commands/configfile.c (grub_cmd_configfile): Execute the
13343         configfile within its own context.
13345         * include/grub/env.h (grub_env_context_open): New prototype.
13346         (grub_env_context_close): Likewise.
13348         * kern/env.c (grub_env): Removed.
13349         (grub_env_sorted): Likewise.
13350         (grub_env_context): New variable.
13351         (grub_env_var_context): Likewise.
13352         (grub_env_find): Search both the active context and the global
13353         context.
13354         (grub_env_context_open): New function.
13355         (grub_env_context_close): Likewise.
13356         (grub_env_insert): Likewise.
13357         (grub_env_remove): Likewise.
13358         (grub_env_export): Likewise.
13359         (grub_env_set): Changed to use helper functions to avoid code
13360         duplication.
13361         (grub_env_iterate): Rewritten so both the current context and the
13362         global context are being used.
13364         * normal/command.c (export_command): New function.
13365         (grub_command_init): Register the `export' function.
13367 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
13369         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13370         explicitly to suppress gcc's warnings.
13371         * fs/fat.c (grub_fat_find_dir): Likewise.
13372         (grub_fat_label): Likewise.
13373         * fs/xfs.c (grub_xfs_read_inode): Likewise.
13374         (grub_xfs_mount): Likewise.
13375         (grub_xfs_label): Likewise.
13376         * fs/affs.c (grub_affs_mount): Likewise.
13377         (grub_affs_label): Likewise.
13378         (grub_affs_iterate_dir): Likewise.
13379         * fs/sfs.c (grub_sfs_mount): Likewise.
13380         (grub_sfs_iterate_dir): Likewise.
13381         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13382         * fs/hfs.c (grub_hfs_mount): Likewise.
13383         (grub_hfs_cmp_catkeys): Likewise.
13384         (grub_hfs_find_dir): Likewise.
13385         (grub_hfs_dir): Likewise.
13386         (grub_hfs_label): Likewise.
13387         * fs/jfs.c (grub_jfs_mount): Likewise.
13388         (grub_jfs_opendir): Likewise.
13389         (grub_jfs_getent): Likewise.
13390         (grub_jfs_lookup_symlink): Likewise.
13391         (grub_jfs_label): Likewise.
13392         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13393         (grub_hfsplus_iterate_dir): Likewise.
13394         (grub_hfsplus_btree_iterate_node): Made static.
13396         * util/grub-emu.c (prefix): New variable.
13397         (grub_machine_set_prefix): New function.
13398         (main): Do not set the environment variable "prefix" here. Only
13399         set PREFIX, which is used later by grub_machine_set_prefix.
13401         * include/grub/video.h: Do not include grub/symbol.h.
13402         (grub_video_register): Not exported. This symbol is not defined in
13403         the kernel.
13404         (grub_video_unregister): Likewise.
13405         (grub_video_iterate): Likewise.
13406         (grub_video_setup): Likewise.
13407         (grub_video_restore): Likewise.
13408         (grub_video_get_info): Likewise.
13409         (grub_video_get_blit_format): Likewise.
13410         (grub_video_set_palette): Likewise.
13411         (grub_video_get_palette): Likewise.
13412         (grub_video_set_viewport): Likewise.
13413         (grub_video_get_viewport): Likewise.
13414         (grub_video_map_color): Likewise.
13415         (grub_video_map_rgb): Likewise.
13416         (grub_video_map_rgba): Likewise.
13417         (grub_video_fill_rect): Likewise.
13418         (grub_video_blit_glyph): Likewise.
13419         (grub_video_blit_bitmap): Likewise.
13420         (grub_video_blit_render_target): Likewise.
13421         (grub_video_scroll): Likewise.
13422         (grub_video_swap_buffers): Likewise.
13423         (grub_video_create_render_target): Likewise.
13424         (grub_video_delete_render_target): Likewise.
13425         (grub_video_set_active_render_target): Likewise.
13427         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13428         Undefined.
13429         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13431         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13432         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13433         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13434         instead of $(srcdir)/genkernsyms.sh.
13436         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13437         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13438         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13439         instead of $(srcdir)/genkernsyms.sh.
13441         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13442         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13443         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13444         instead of $(srcdir)/genkernsyms.sh.
13446         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13447         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13448         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13449         instead of $(srcdir)/genkernsyms.sh.
13451         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13452         genkernsyms.sh.
13454         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13455         genkernsyms.sh.
13456         (gensymlist.sh): New target.
13457         (genkernsyms.sh): Likewise.
13459         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13460         genkernsyms.sh.in and gensymlist.sh.in.
13462         * genkernsyms.sh: Removed.
13463         * gensymlist.sh: Likewise.
13465         * genkernsyms.sh.in: New file.
13466         * gensymlist.sh.in: Likewise.
13468 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13470         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13471         clobber "prefix", since we may have already set it manually.
13473 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13475         * kern/misc.c (abort): New alias for grub_abort.
13477 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13479         A new machine-specific function "grub_machine_set_prefix" is
13480         defined. This is called after loading modules, so that a prefix
13481         initialization can use modules. Also, this change adds an
13482         intensive debugging feature for the memory manager via the
13483         configure option "--enable-mm-debug".
13485         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13486         PART.LEN.
13488         * kern/sparc64/ieee1275/init.c (abort): Removed.
13489         (grub_stop): Likewise.
13490         (grub_exit): New function.
13491         (grub_set_prefix): Renamed to ...
13492         (grub_machine_set_prefix): ... this.
13493         (grub_machine_init): Do not call grub_set_prefix.
13495         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13496         (grub_machine_set_prefix): ... this.
13497         (grub_machine_init): Do not call grub_set_prefix.
13499         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13500         (grub_machine_init): Do not set the prefix here.
13502         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13504         * kern/efi/init.c: Include grub/mm.h.
13505         (grub_efi_set_prefix): New function.
13507         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13508         (grub_efi_get_filename): New function.
13509         (grub_print_device_path): Renamed to ...
13510         (grub_efi_print_device_path): ... this.
13512         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13513         [MM_DEBUG] (grub_realloc): Likewise.
13514         [MM_DEBUG] (grub_free): Likewise.
13515         [MM_DEBUG] (grub_memalign): Likewise.
13516         [MM_DEBUG] (grub_mm_debug): New variable.
13517         [MM_DEBUG] (grub_debug_malloc): New function.
13518         [MM_DEBUG] (grub_debug_free): New function.
13519         [MM_DEBUG] (grub_debug_realloc): New function.
13520         [MM_DEBUG] (grub_debug_memalign): New function.
13522         * kern/misc.c (grub_abort): Print a newline to distinguish
13523         the message.
13525         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13526         grub_set_root_dev after loading modules. This is necessary when
13527         setting a prefix depends on modules.
13529         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13530         (grub_efi_print_device_path): ... this.
13531         (grub_efi_get_filename): New prototype.
13532         (grub_efi_set_prefix): Likewise.
13534         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13535         and grub/disk.h.
13536         (grub_efidisk_get_device_handle): New prototype.
13537         (grub_efidisk_get_device_name): Likewise.
13539         * include/grub/mm.h: Include config.h.
13540         (MM_DEBUG): Removed.
13541         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13542         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13543         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13544         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13545         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13546         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13547         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13548         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13549         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13551         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13553         * disk/efi/efidisk.c: Include grub/partition.h.
13554         (iterate_child_devices): New function.
13555         (add_device): First, compare only last device path nodes, so that
13556         devices are sorted by the types.
13557         (grub_efidisk_get_device_handle): New function.
13558         (grub_efidisk_get_device_name): Likewise.
13560         * configure.ac (--enable-mm-debug): New option to enable the
13561         memory manager debugging feature. This makes the binary much
13562         bigger, so is disabled by default.
13564 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13566         Use grub_abort instead of grub_stop, and grub_exit must be
13567         define in each architecture now. Also, this change adds support
13568         for EFI disks.
13570         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13571         (grub_getkey): New function.
13572         (grub_term_get_current): Likewise.
13574         * util/i386/pc/grub-setup.c: Include grub/term.h.
13575         (grub_getkey): New function.
13576         (grub_term_get_current): Likewise.
13578         * util/misc.c (grub_stop): Renamed to ...
13579         (grub_exit): ... this.
13581         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13582         (grub_exit): ... this.
13583         (grub_machine_init): Use grub_abort instead of abort.
13584         (grub_stop): Removed.
13586         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13587         abort.
13589         * kern/i386/pc/startup.S (grub_exit): New function.
13590         (cold_reboot): New label.
13592         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13593         (grub_efi_init): Call grub_efidisk_init.
13594         (grub_efi_fini): Call grub_efidisk_fini.
13596         * kern/efi/efi.c: Include grub/mm.h.
13597         (grub_efi_console_control_guid): Renamed to ...
13598         (console_control_guid): ... this.
13599         (grub_efi_loaded_image_guid): Renamed to ...
13600         (loaded_image_guid): ... this.
13601         (grub_efi_locate_handle): New function.
13602         (grub_efi_open_protocol): Likewise.
13603         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13604         GRUB_EFI_CONSOLE_CONTROL_GUID.
13605         (grub_efi_exit): Removed.
13606         (grub_stop): Likewise.
13607         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13608         (grub_exit): New function.
13609         (grub_print_device_path): Likewise.
13611         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13612         (grub_enter_rescue_mode): Register "exit".
13614         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13615         (grub_abort): New function.
13617         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13619         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13621         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13623         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13624         (grub_print_device_path): New prototype.
13625         (grub_efi_locate_handle): Likewise.
13626         (grub_efi_open_protocol): Likewise.
13628         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13629         * disk/efi/efidisk.c: Likewise.
13631         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13633         * include/grub/efi/console_control.h
13634         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13636         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13637         last 8 bytes as an array.
13638         (GRUB_EFI_DISK_IO_GUID): New macro.
13639         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13640         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13641         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13642         grub_uint8_t.
13643         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13644         (struct grub_efi_device_path): Rename the member "sub_type" to
13645         "subtype".
13646         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13647         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13648         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13649         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13650         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13651         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13652         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13653         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13654         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13655         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13656         (struct grub_efi_pci_device_path): New structure.
13657         (grub_efi_pci_device_path_t): New type.
13658         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13659         (struct grub_efi_pccard_device_path): New structure.
13660         (grub_efi_pccard_device_path_t): New type.
13661         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13662         (struct grub_efi_memory_mapped_device_path): New structure.
13663         (grub_efi_memory_mapped_device_path_t): New type.
13664         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13665         (struct grub_efi_vendor_device_path): New structure.
13666         (grub_efi_vendor_device_path_t): New type.
13667         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13668         (struct grub_efi_controller_device_path): New structure.
13669         (grub_efi_controller_device_path_t): New type.
13670         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13671         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13672         (struct grub_efi_acpi_device_path): New structure.
13673         (grub_efi_acpi_device_path_t): New type.
13674         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13675         (struct grub_efi_expanded_acpi_device_path): New structure.
13676         (grub_efi_expanded_acpi_device_path_t): New type.
13677         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13678         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13679         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13680         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13681         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13682         (struct grub_efi_atapi_device_path): New structure.
13683         (grub_efi_atapi_device_path_t): New type.
13684         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13685         (struct grub_efi_fibre_channel_device_path): New structure.
13686         (grub_efi_fibre_channel_device_path_t): New type.
13687         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13688         (struct grub_efi_1394_device_path): New structure.
13689         (grub_efi_1394_device_path_t): New type.
13690         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13691         (struct grub_efi_usb_device_path): New structure.
13692         (grub_efi_usb_device_path_t): New type.
13693         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13694         (struct grub_efi_usb_class_device_path): New structure.
13695         (grub_efi_usb_class_device_path_t): New type.
13696         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13697         (struct grub_efi_i2o_device_path): New structure.
13698         (grub_efi_i2o_device_path_t): New type.
13699         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13700         (struct grub_efi_mac_address_device_path): New structure.
13701         (grub_efi_mac_address_device_path_t): New type.
13702         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13703         (struct grub_efi_ipv4_device_path): New structure.
13704         (grub_efi_ipv4_device_path_t): New type.
13705         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13706         (struct grub_efi_ipv6_device_path): New structure.
13707         (grub_efi_ipv6_device_path_t): New type.
13708         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13709         (struct grub_efi_infiniband_device_path): New structure.
13710         (grub_efi_infiniband_device_path_t): New type.
13711         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13712         (struct grub_efi_uart_device_path): New structure.
13713         (grub_efi_uart_device_path_t): New type.
13714         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13715         (struct grub_efi_vendor_messaging_device_path): New structure.
13716         (grub_efi_vendor_messaging_device_path_t): New type.
13717         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13718         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13719         (struct grub_efi_hard_drive_device_path): New structure.
13720         (grub_efi_hard_drive_device_path_t): New type.
13721         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13722         (struct grub_efi_cdrom_device_path): New structure.
13723         (grub_efi_cdrom_device_path_t): New type.
13724         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13725         (struct grub_efi_vendor_media_device_path): New structure.
13726         (grub_efi_vendor_media_device_path_t): New type.
13727         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13728         (struct grub_efi_file_path_device_path): New structure.
13729         (grub_efi_file_path_device_path_t): New type.
13730         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13731         (struct grub_efi_protocol_device_path): New structure.
13732         (grub_efi_protocol_device_path_t): New type.
13733         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13734         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13735         (struct grub_efi_bios_device_path): New structure.
13736         (grub_efi_bios_device_path_t): New type.
13737         (struct grub_efi_disk_io): New structure.
13738         (grub_efi_disk_io_t): New type.
13739         (struct grub_efi_block_io_media): New structure.
13740         (grub_efi_block_io_media_t): New type.
13741         (struct grub_efi_block_io): New structure.
13742         (grub_efi_block_io_t): New type.
13744         * include/grub/misc.h (grub_stop): Removed.
13745         (grub_exit): New prototype.
13746         (grub_abort): Likewise.
13748         * include/grub/disk.h (enum grub_disk_dev_id): Added
13749         GRUB_DISK_DEVICE_EFIDISK_ID.
13751         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13752         disk/efi/efidisk.c.
13753         (kernel_syms.lst): Remove the target if an error occurs.
13755 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13757         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13758         as it was simply too buggy.
13760 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13762         * kern/misc.c (grub_lltoa): New function.
13763         (grub_vsprintf): Added support for the long long suffix,
13764         i.e. "ll".
13766 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13768         * Makefile.in (LDFLAGS): Add variable.
13769         (LD): Remove variable.
13770         * configure.ac: Add -m32 to LDFLAGS.
13771         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13772         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13773         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13774         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13775         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13776         variables.
13777         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13778         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13779         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13781 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13783         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13784         length for unknown glyph.
13786 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13788         Add support for pre-loaded modules into the EFI port.
13790         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13791         completely. Accept one more argument DIR. The caller has changed.
13793         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13795         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13796         (grub_efi_loaded_image_guid): New variable.
13797         (grub_efi_get_loaded_image): New function.
13798         (grub_arch_modules_addr): Likewise.
13800         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13801         prototype.
13803         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13804         (struct grub_efi_loaded_image): New structure.
13805         (grub_efi_loaded_image_t): New type.
13807 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13809         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13810         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13811         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13813 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13815         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13817 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13819         * DISTLIST: Added include/grub/efi/console.h,
13820         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13821         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13823         * include/grub/efi/console.h: New file.
13824         * include/grub/efi/time.h: Likewise.
13825         * include/grub/i386/efi/kernel.h: Likewise.
13826         * kern/efi/init.c: Likewise.
13827         * kern/efi/mm.c: Likewise.
13828         * term/efi/console.c: Likewise.
13830         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13831         (grub_stop): Removed.
13832         (grub_get_rtc): Likewise.
13833         (grub_machine_init): Simply call grub_efi_init.
13834         (grub_machine_fini): Call grub_efi_fini.
13836         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13837         (grub_efi_output_string): Removed.
13838         (grub_efi_stall): New function.
13839         (grub_stop): Likewise.
13840         (grub_get_rtc): Likewise.
13842         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13843         (grub_efi_stall): New prototype.
13844         (grub_efi_allocate_pages): Likewise.
13845         (grub_efi_free_pages): Likewise.
13846         (grub_efi_get_memory_map): Likewise.
13847         (grub_efi_mm_init): Likewise.
13848         (grub_efi_mm_fini): Likewise.
13849         (grub_efi_init): Likewise.
13850         (grub_efi_fini): Likewise.
13852         * include/grub/i386/efi/time.h: Do not include
13853         grub/symbol.h. Include grub/efi/time.h.
13854         (GRUB_TICKS_PER_SECOND): Removed.
13855         (grub_get_rtc): Likewise.
13857         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13858         Added padding. The EFI spec is buggy.
13859         (GRUB_EFI_BLACK): New macro.
13860         (GRUB_EFI_BLUE): Likewise.
13861         (GRUB_EFI_GREEN): Likewise.
13862         (GRUB_EFI_CYAN): Likewise.
13863         (GRUB_EFI_RED): Likewise.
13864         (GRUB_EFI_MAGENTA): Likewise.
13865         (GRUB_EFI_BROWN): Likewise.
13866         (GRUB_EFI_LIGHTGRAY): Likewise.
13867         (GRUB_EFI_BRIGHT): Likewise.
13868         (GRUB_EFI_DARKGRAY): Likewise.
13869         (GRUB_EFI_LIGHTBLUE): Likewise.
13870         (GRUB_EFI_LIGHTGREEN): Likewise.
13871         (GRUB_EFI_LIGHTCYAN): Likewise.
13872         (GRUB_EFI_LIGHTRED): Likewise.
13873         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13874         (GRUB_EFI_YELLOW): Likewise.
13875         (GRUB_EFI_WHITE): Likewise.
13876         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13877         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13878         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13879         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13880         (GRUB_EFI_BACKGROUND_RED): Likewise.
13881         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13882         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13883         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13884         (GRUB_EFI_TEXT_ATTR): Likewise.
13886         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13887         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13888         (kernel_mod_HEADERS): Added efi/time.h.
13890 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13892         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13893         include/grub/efi/api.h, include/grub/efi/console_control.h,
13894         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13895         include/grub/i386/efi/time.h, kern/efi/efi.c,
13896         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13897         and util/i386/efi/grub-mkimage.c.
13899         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13901         * genmk.rb (PModule#rule): Do not export symbols if
13902         #{prefix}_EXPORTS is set to "no".
13904         * conf/i386-efi.mk: New file.
13905         * conf/i386-efi.rmk: Likewise.
13906         * include/grub/efi/api.h: Likewise.
13907         * include/grub/efi/console_control.h: Likewise.
13908         * include/grub/efi/efi.h: Likewise.
13909         * include/grub/efi/pe32.h: Likewise.
13910         * include/grub/i386/efi/time.h: Likewise.
13911         * kern/efi/efi.c: Likewise.
13912         * kern/i386/efi/init.c: Likewise.
13913         * kern/i386/efi/startup.S: Likewise.
13914         * util/i386/efi/grub-mkimage.c: Likewise.
13916 2006-04-17  Marco Gerards  <marco@gnu.org>
13918         * include/grub/script.h: Include <grub/parser.h> and
13919         "grub_script.tab.h".
13920         (struct grub_lexer_param): New struct.
13921         (struct grub_parser_param): Likewise.
13922         (grub_script_create_arglist): Pass the state in an argument.
13923         (grub_script_add_arglist): Likewise.
13924         (grub_script_create_cmdline): Likewise.
13925         (grub_script_create_cmdblock): Likewise.
13926         (grub_script_create_cmdif): Likewise.
13927         (grub_script_create_cmdmenu): Likewise.
13928         (grub_script_add_cmd): Likewise.
13929         (grub_script_arg_add): Likewise.
13930         (grub_script_lexer_ref): Likewise.
13931         (grub_script_lexer_deref): Likewise.
13932         (grub_script_lexer_record_start): Likewise.
13933         (grub_script_lexer_record_stop): Likewise.
13934         (grub_script_mem_record): Likewise.
13935         (grub_script_mem_record_stop): Likewise.
13936         (grub_script_malloc): Likewise.
13937         (grub_script_yylex): Likewise.
13938         (grub_script_yyparse): Likewise.
13939         (grub_script_yyerror): Likewise.
13940         (grub_script_yylex): Likewise.
13941         (grub_script_lexer_init): Return the state.
13943         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13944         (grub_script_lexer_done): Likewise.
13945         (grub_script_lexer_getline): Likewise.
13946         (grub_script_lexer_refs): Likewise.
13947         (script): Likewise.
13948         (newscript): Likewise.
13949         (record): Likewise.
13950         (recording): Likewise.
13951         (recordpos): Likewise.
13952         (recordlen): Likewise.
13953         (grub_script_lexer_init): Return the state instead of setting
13954         global variables.
13955         (grub_script_lexer_ref): Use the newly added argument for state
13956         instead of globals.
13957         (grub_script_lexer_deref): Likewise.
13958         (grub_script_lexer_record_start): Likewise.
13959         (grub_script_lexer_record_stop): Likewise.
13960         (recordchar): Likewise.
13961         (nextchar): Likewise.
13962         (grub_script_yylex2): Likewise.
13963         (grub_script_yylex): Likewise.
13964         (grub_script_yyerror): Likewise.
13966         * normal/parser.y (func_mem): Removed variable.
13967         (menu_entry): Likewise.
13968         (err): Likewise.
13969         (%lex-param): New parser option.
13970         (%parse-param): Likewise.
13971         (script): Always return the AST.
13972         (argument): Pass the state around.
13973         (arguments): Likewise.
13974         (grubcmd): Likewise.
13975         (commands): Likewise.
13976         (function): Likewise.
13977         (menuentry): Likewise.
13978         (if_statement): Likewise.
13979         (if): Likewise.
13981         * normal/script.c (grub_script_memused): Removed variable.
13982         (grub_script_parsed): Likewise.
13983         (grub_script_malloc): Added a state argument.  Use that instead of
13984         global variables.
13985         (grub_script_mem_record): Likewise.
13986         (grub_script_mem_record_stop): Likewise.
13987         (grub_script_arg_add): Likewise.
13988         (grub_script_add_arglist): Likewise.
13989         (grub_script_create_cmdline): Likewise.
13990         (grub_script_create_cmdif): Likewise.
13991         (grub_script_create_cmdmenu): Likewise.
13992         (grub_script_add_cmd): Likewise.
13993         (grub_script_parse): Setup the state before calling the parser.
13995 2006-04-16  Marco Gerards  <marco@gnu.org>
13997         * normal/command.c (grub_command_init): Remove the title command.
13999         * normal/lexer.c (grub_script_yylex): Renamed from this...
14000         (grub_script_yylex2): ... to this.
14001         (grub_script_yylex): New function.  Temporary
14002         introduced to filter some tokens.
14003         (grub_script_yyerror): Print a newline.
14005         * normal/main.c (read_config_file): Output information about the
14006         lines that contain errors.  Wait for a key after all lines have
14007         been processed.  Don't return an empty menu.
14009         * normal/parser.y (func_mem): Don't initialize.
14010         (menu_entry): Likewise.
14011         (err): New variable.
14012         (script): Don't return anything when an error was encountered.
14013         (ws, returns): Removed rules.
14014         (argument): Disabled concatenated variable support.
14015         (arguments): Remove explicit separators.
14016         (grubcmd): Likewise.
14017         (function): Likewise.
14018         (menuentry): Likewise.
14019         (if): Likewise.
14020         (commands): Likewise.  Add error handling.
14022         * normal/script.c (grub_script_create_cmdline): If
14023         `grub_script_parsed' is 0, assume the parser encountered an error.
14025 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
14027         * configure.ac: Add support for EFI. Fix the typo
14028         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
14030 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
14032         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
14033         foreign multibyte characters should be shown correctly.
14035 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
14037         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
14038         calculation.
14039         (read_config_file): Made it to close file before returning.
14041 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
14043         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14044         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14045         video/i386/pc/vbefill.c.
14047         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14048         video/i386/pc/vbefill.c.
14050         * include/grub/video.h (grub_video_blit_format): New enum.
14051         (grub_video_mode_info): Added new member blit_format.
14052         (grub_video_get_blit_format): New function prototype.
14054         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14055         function prototype.
14056         (grub_video_vbe_map_rgb): Likewise.
14057         (grub_video_vbe_unmap_color): Likewise.
14059         * include/grub/i386/pc/vbeblit.h: New file.
14061         * include/grub/i386/pc/vbefill.h: New file.
14063         * video/video.c (grub_video_get_blit_format): New function.
14064         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14065         (grub_video_vbe_map_rgb): Likewise.
14066         (grub_video_vbe_unmap_color): Likewise.
14068         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14069         optimized fills.
14070         (grub_video_vbe_blit_render_target): Changed to use more optimized
14071         blits.
14072         (grub_video_vbe_setup): Added detection for optimized settings.
14073         (grub_video_vbe_create_render_target): Likewise.
14075         * video/i386/pc/vbeblit.c: New file.
14077         * video/i386/pc/vbefill.c: New file.
14079 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
14081         * font/manager.c (grub_font_get_glyph): Removed font fixup from
14082         here...
14084         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
14085         parsing to support both hex and dec ranges.  If filename was missing
14086         show usage information.
14088 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
14090         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14091         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
14093         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14094         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
14095         (video_mod_SOURCES): Added.
14096         (video_mod_CFLAGS): Likewise.
14097         (video_mod_LDFLAGS): Likewise.
14098         (gfxterm_mod_SOURCES): Likewise.
14099         (gfxterm_mod_CFLAGS): Likewise.
14100         (gfxterm_mod_LDFLAGS): Likewise.
14101         (videotest_mod_SOURCES): Likewise.
14102         (videotest_mod_CFLAGS): Likewise.
14103         (videotest_mod_LDFLAGS): Likewise.
14104         (vesafb_mod_SOURCES): Removed.
14105         (vesafb_mod_CFLAGS): Likewise.
14106         (vesafb_mod_LDFLAGS): Likewise.
14107         (vga_mod_SOURCES): Likewise.
14108         (vga_mod_CFLAGS): Likewise.
14109         (vga_mod_LDFLAGS): Likewise.
14111         * commands/videotest.c: New file.
14113         * font/manager.c (fill_with_default_glyph): Modified to use
14114         grub_font_glyph.
14115         (grub_font_get_glyph): Likewise.
14116         (fontmanager): Renamed from this...
14117         (font_manager): ... to this.
14119         * include/grub/font.h (grub_font_glyph): Added new structure.
14120         (grub_font_get_glyph): Modified to use grub_font_glyph.
14122         * include/grub/misc.h (grub_abs): Added as inline function.
14124         * include/grub/video.h: New file.
14126         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14127         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14128         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14129         (grub_vbe_get_controller_info): Renamed from this...
14130         (grub_vbe_bios_get_controller_info): ... to this.
14131         (grub_vbe_get_mode_info): Renamed from this...
14132         (grub_vbe_bios_get_mode_info): ... to this.
14133         (grub_vbe_set_mode): Renamed from this...
14134         (grub_vbe_bios_set_mode): ... to this.
14135         (grub_vbe_get_mode): Renamed from this...
14136         (grub_vbe_bios_get_mode): ... to this.
14137         (grub_vbe_set_memory_window): Renamed from this...
14138         (grub_vbe_bios_set_memory_window): ... to this.
14139         (grub_vbe_get_memory_window): Renamed from this...
14140         (grub_vbe_bios_get_memory_window): ... to this.
14141         (grub_vbe_set_scanline_length): Renamed from this...
14142         (grub_vbe_set_scanline_length): ... to this.
14143         (grub_vbe_get_scanline_length): Renamed from this...
14144         (grub_vbe_bios_get_scanline_length): ... to this.
14145         (grub_vbe_set_display_start): Renamed from this...
14146         (grub_vbe_bios_set_display_start): ... to this.
14147         (grub_vbe_get_display_start): Renamed from this...
14148         (grub_vbe_bios_get_display_start): ... to this.
14149         (grub_vbe_set_palette_data): Renamed from this...
14150         (grub_vbe_bios_set_palette_data): ... to this.
14151         (grub_vbe_set_pixel_rgb): Removed.
14152         (grub_vbe_set_pixel_index): Likewise.
14154         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14155         from this...
14156         (grub_vbe_bios_get_controller_info): ... to this.
14157         (grub_vbe_get_mode_info): Renamed from this...
14158         (grub_vbe_bios_get_mode_info): ... to this.
14159         (grub_vbe_set_mode): Renamed from this...
14160         (grub_vbe_bios_set_mode): ... to this.
14161         (grub_vbe_get_mode): Renamed from this...
14162         (grub_vbe_bios_get_mode): ... to this.
14163         (grub_vbe_set_memory_window): Renamed from this...
14164         (grub_vbe_bios_set_memory_window): ... to this.
14165         (grub_vbe_get_memory_window): Renamed from this...
14166         (grub_vbe_bios_get_memory_window): ... to this.
14167         (grub_vbe_set_scanline_length): Renamed from this...
14168         (grub_vbe_set_scanline_length): ... to this.
14169         (grub_vbe_get_scanline_length): Renamed from this...
14170         (grub_vbe_bios_get_scanline_length): ... to this.
14171         (grub_vbe_set_display_start): Renamed from this...
14172         (grub_vbe_bios_set_display_start): ... to this.
14173         (grub_vbe_get_display_start): Renamed from this...
14174         (grub_vbe_bios_get_display_start): ... to this.
14175         (grub_vbe_set_palette_data): Renamed from this...
14176         (grub_vbe_bios_set_palette_data): ... to this.
14177         (grub_vbe_bios_get_controller_info): Fixed problem with registers
14178         getting corrupted after calling it.  Added more pushes and pops.
14179         (grub_vbe_bios_set_mode): Likewise.
14180         (grub_vbe_bios_get_mode): Likewise.
14181         (grub_vbe_bios_get_memory_window): Likewise.
14182         (grub_vbe_bios_set_scanline_length): Likewise.
14183         (grub_vbe_bios_get_scanline_length): Likewise.
14184         (grub_vbe_bios_get_display_start): Likewise.
14185         (grub_vbe_bios_set_palette_data): Likewise.
14187         * normal/cmdline.c (cl_set_pos): Refresh the screen.
14188         (cl_insert): Likewise.
14189         (cl_delete): Likewise.
14191         * term/gfxterm.c: New file.
14193         * term/i386/pc/vesafb.c: Removed file.
14195         * video/video.c: New file.
14197         * video/i386/pc/vbe.c (real2pm): Added new function.
14198         (grub_video_vbe_draw_pixel): Likewise.
14199         (grub_video_vbe_get_video_ptr): Likewise.
14200         (grub_video_vbe_get_pixel): Likewise
14201         (grub_video_vbe_init): Likewise.
14202         (grub_video_vbe_fini): Likewise.
14203         (grub_video_vbe_setup): Likewise.
14204         (grub_video_vbe_get_info): Likewise.
14205         (grub_video_vbe_set_palette): Likewise.
14206         (grub_video_vbe_get_palette): Likewise.
14207         (grub_video_vbe_set_viewport): Likewise.
14208         (grub_video_vbe_get_viewport): Likewise.
14209         (grub_video_vbe_map_color): Likewise.
14210         (grub_video_vbe_map_rgb): Likewise.
14211         (grub_video_vbe_map_rgba): Likewise.
14212         (grub_video_vbe_unmap_color): Likewise.
14213         (grub_video_vbe_fill_rect): Likewise.
14214         (grub_video_vbe_blit_glyph): Likewise.
14215         (grub_video_vbe_blit_bitmap): Likewise.
14216         (grub_video_vbe_blit_render_target): Likewise.
14217         (grub_video_vbe_scroll): Likewise.
14218         (grub_video_vbe_swap_buffers): Likewise.
14219         (grub_video_vbe_create_render_target): Likewise.
14220         (grub_video_vbe_delete_render_target): Likewise.
14221         (grub_video_vbe_set_active_render_target): Likewise.
14222         (grub_vbe_set_pixel_rgb): Remove function.
14223         (grub_vbe_set_pixel_index): Likewise.
14224         (index_color_mode): Remove static variable.
14225         (active_mode): Likewise.
14226         (framebuffer): Likewise.
14227         (bytes_per_scan_line): Likewise.
14228         (grub_video_vbe_adapter): Added new static variable.
14229         (framebuffer): Likewise.
14230         (render_target): Likewise.
14231         (initial_mode): Likewise.
14232         (mode_in_use): Likewise.
14233         (mode_list): Likewise.
14235 2006-03-10  Marco Gerards  <marco@gnu.org>
14237         * configure.ac (AC_INIT): Bumped to 1.93.
14239         * DISTLIST: Added `include/grub/hfs.h'.
14241 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
14243         * boot/i386/pc/boot.S (general_error): Before looping, try INT
14244         18H, which might help the BIOS falling back to next boot media.
14246 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
14248         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14249         Poe Chen <poe.poechen@gmail.com>.
14251 2006-01-17  Marco Gerards  <marco@gnu.org>
14253         * include/grub/normal.h: Include <grub/script.h>.
14254         (grub_command_list): Removed struct.
14255         (grub_command_list_t): Removed type.
14256         (grub_menu_entry): Remove members `num' and `command_list'.  Add
14257         members `commands' and `sourcecode'.
14258         * include/grub/script.h: Add inclusion guards.
14259         (grub_script_cmd_menuentry): New struct.
14260         (grub_script_execute_menuentry): New prototype.
14261         (grub_script_lexer_record_start): Likewise.
14262         (grub_script_lexer_record_stop): Likewise.
14263         * normal/execute.c (grub_script_execute_menuentry): New function.
14264         * normal/lexer.c (record, recording, recordpos, recordlen): New
14265         variables.
14266         (grub_script_lexer_record_start): New function.
14267         (grub_script_lexer_record_stop): Likewise.
14268         (recordchar): Likewise.
14269         (nextchar): Likewise.
14270         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
14271         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
14272         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14273         (current_menu): New variable.
14274         (free_menu): Mainly rewritten.
14275         (grub_normal_menu_addentry): New function.
14276         (read_config_file): Rewritten.
14277         * normal/menu.c (run_menu_entry): Mainly rewritten.
14278         * normal/menu_entry.c (make_screen): Rewritten the code to insert
14279         the menu entry.
14280         (run): Mainly rewritten.
14281         * normal/parser.y (menu_entry): New variable.
14282         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14283         (menuentry): New rule.
14284         (command): Add `menuentry'.
14285         (if_statement): Allow additional returns before `fi'.
14286         * normal/script.c (grub_script_create_cmdmenu): New function.
14288 2006-01-03  Marco Gerards  <marco@gnu.org>
14290         * INSTALL: GNU Bison is required.
14291         * configure.ac: Rewritten the test to detect Bison.
14292         * Makefile.in (YACC): New variable.  Reported by Xun Sun
14293         <xun.sun.cn@gmail.com>.
14295 2006-01-03  Marco Gerards  <marco@gnu.org>
14297         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14298         the HFS+ filesystem to filesystem blocks.
14299         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14300         GCC warning is silenced.
14302 2006-01-03  Marco Gerards  <marco@gnu.org>
14304         * partmap/apple.c (apple_partition_map_iterate): Convert the data
14305         read from disk from big endian to host byte order.
14307 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14309         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
14310         documentation.
14311         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14312         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14313         embedded HFS+ filesystem.
14314         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14315         (grub_hfs_sblock): Move from here...
14316         * include/grub/hfs.h: To here...  New file.
14317         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
14318         documentation.
14319         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14320         New macros.
14321         (grub_hfsplus_volheader): Change type of member `magic' to
14322         `grub_uint16_t'.
14323         (grub_hfsplus_data): Add new member `embedded_offset'.
14324         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14325         returned block.
14326         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14327         Calculate the offset.
14329 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14331         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14332         Removed.
14333         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14335 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14337         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14338         ENV->NAME is NULL after allocating ENV->VALUE.
14340 2005-12-25  Marco Gerards  <marco@gnu.org>
14342         * kern/env.c (grub_env_set): Rewritten the error handling code.
14344 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14346         * geninit.sh: Made more robust, and more portable.
14348 2005-12-25  Marco Gerards  <marco@gnu.org>
14350         Add support for Apple HFS+ filesystems.
14352         * fs/hfsplus.c: New file.
14354         * DISTLIST: Added `fs/hfsplus.c'.
14356         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14357         (hfsplus_mod_SOURCES): New variable.
14358         (hfsplus_mod_CFLAGS): Likewise.
14359         (hfsplus_mod_LDFLAGS): Likewise.
14360         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14361         (grub_setup_SOURCES): Likewise.
14362         (grub_mkdevicemap_SOURCES): Likewise.
14363         (grub_emu_SOURCES): Likewise.
14364         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14366         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14368         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14370 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14372         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14373         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14374         include/grub/parser.h, include/grub/script.h, kern/parser.c,
14375         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14376         normal/lexer.c, normal/parser.y, normal/script.c, and
14377         partmap/gpt.c.
14378         Removed kern/sparc64/cache.c.
14380         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14381         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14382         grub_emu_init.c.
14384         * configure.ac (AC_INIT): Bumped to 1.92.
14386 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
14388         * kern/err.c (grub_error_push): Added new function to support error
14389         stacks.
14390         (grub_error_pop): Likewise.
14391         (grub_error_stack_items): New local variable to support error stacks.
14392         (grub_error_stack_pos): Likewise.
14393         (grub_error_stack_assert): Likewise.
14394         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14395         stack depth.
14396         (grub_print_error): Added support to print errors from error stack.
14398         * include/grub/err.h (grub_error_push): Added function prototype.
14399         (grub_error_pop): Likewise.
14401 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14403         * configure.ac: Accept `powerpc64' as host_cpu.
14404         (amd64): Rename to `biarch32'.
14406         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14407         non-cacheline-aligned addresses.
14409         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14410         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14411         if `size' is non-zero.
14413 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14415         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14416         and `cd' to make sure the filename is not prefixed with a
14417         directory name.
14418         (pkgdata_MODULES): Add `gpt.mod'.
14419         (gpt_mod_SOURCES): New variable.
14420         (gpt_mod_CFLAGS): Likewise.
14421         (gpt_mod_LDFLAGS): Likewise.
14423         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14425         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14426         New macro.
14428         * partmap/gpt.c: New file.
14430         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14431         GPT partition map is detected.
14433 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14435         * commands/i386/pc/play.c: New file.
14436         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14437         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14438         macros.
14440 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14442         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14443         ((unused))' to silence gcc warning.
14445 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14447         * configure.ac: Correct `AC_PROG_YACC' test.
14449 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14451         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14452         check before installing files.
14454 2005-11-22  Mike Small  <smallm@panix.com>
14456         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14457         number regex so multidigit numbers are recognized correctly.
14459 2005-11-22  Mike Small  <smallm@panix.com>
14461         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14462         debugging message before attempting to claim memory.
14463         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14464         multiple addresses in case of failure.
14466 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14468         * term/tparm.c (get_space): Remove empty `if' statement.
14470         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14472         * kern/parser.c (check_varstate): Rename `state' to 's'.
14474 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14476         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14477         variable definitions to the beginning of each function.  Sort stack
14478         variables by size.
14479         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14480         `buf' argument to `char *'.
14482 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14484         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14485         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14486         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14487         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14488         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14489         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14490         configfile.mod, search.mod, gzio.mod and test.mod.
14491         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14492         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14493         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14494         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14495         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14496         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14497         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14498         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14499         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14500         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14501         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14502         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14503         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14504         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14505         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14506         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14507         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14508         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14509         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14510         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14511         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14512         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14513         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14515         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14516         `grep --include'.
14517         (pkgdata_MODULES): Add test.mod.
14519 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14521         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14522         appending to variables with "+=".
14523         (PModule): Use full pathname to generate *.lst filenames.
14525         * Makefile.in: Fixed list rules moved from genmk.rb.
14526         (.DELETE_ON_ERROR): New special target.
14527         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14529         * conf/i386-pc.rmk: Include conf/common.mk.
14530         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14531         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14532         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14533         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14534         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14535         configfile.mod, search.mod, gzio.mod and test.mod.
14536         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14537         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14538         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14539         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14540         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14541         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14542         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14543         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14544         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14545         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14546         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14547         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14548         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14549         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14550         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14551         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14552         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14553         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14554         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14555         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14556         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14557         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14558         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14559         here...
14560         * conf/common.rmk: ... to here.  New file.
14562         * conf/common.mk: New file.
14564 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14566         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14567         (grub_script.tab.c): ... here.
14569         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14570         (grub_script.tab.c): ... here.
14572         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14573         (grub_script.tab.c): ... here.
14575         * normal/command.c (grub_command_find): Fixed a memory leak of
14576         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14578 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14580         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14581         "@" which marks the start of a comment on ARM.
14582         (VARIABLE): Likewise.
14584 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14586         Add support for Linux/ADFS partition tables.
14588         * partmap/acorn.c: New file.
14590         * include/grub/acorn_filecore.h: Likewise.
14592         * DISTLIST: Added `partmap/acorn.c' and
14593         `include/grub/acorn_filecore.h'.
14595         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14596         `partmap/acorn.c'.
14597         (pkgdata_MODULES): Add `acorn.mod'.
14598         (acorn_mod_SOURCES): New variable.
14599         (acorn_mod_CFLAGS): Likewise.
14601         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14602         `partmap/acorn.c'.
14603         (pkgdata_MODULES): Add `acorn.mod'.
14604         (acorn_mod_SOURCES): New variable.
14605         (acorn_mod_CFLAGS): Likewise.
14607         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14608         (pkgdata_MODULES): Add `acorn.mod'.
14609         (acorn_mod_SOURCES): New variable.
14610         (acorn_mod_CFLAGS): Likewise.
14611         (acorn_mod_LDFLAGS): Likewise.
14613         * include/types.h (grub_disk_addr_t): New typedef.
14615 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14617         * geninit.sh: New file.
14619         * geninitheader.sh: Likewise.
14621         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14622         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14623         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14624         * commands/configfile.c (grub_configfile_init)
14625         (grub_configfile_fini): Likewise.
14626         * commands/default.c (grub_default_init, grub_default_fini):
14627         Likewise.
14628         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14629         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14630         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14631         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14632         Likewise.
14633         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14634         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14635         Likewise.
14636         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14637         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14638         Likewise.
14639         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14640         Likewise.
14641         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14642         Likewise.
14643         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14644         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14645         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14646         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14647         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14648         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14649         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14650         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14651         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14652         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14653         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14654         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14655         * partmap/amiga.c (grub_amiga_partition_map_init)
14656         (grub_amiga_partition_map_fini): Likewise.
14657         * partmap/apple.c (grub_apple_partition_map_init)
14658         (grub_apple_partition_map_fini): Likewise.
14659         * partmap/pc.c (grub_pc_partition_map_init)
14660         (grub_pc_partition_map_fini): Likewise.
14661         * partmap/sun.c (grub_sun_partition_map_init,
14662         grub_sun_partition_map_fini): Likewise.
14663         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14664         Likewise.
14666         * util/grub-emu.c: Include <grub_modules_init.h>.
14667         (main): Don't initialize and de-initialize any modules directly,
14668         use `grub_init_all' and `grub_fini_all' instead.
14670         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14671         `grub_vesafb_mod_init'.
14672         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14673         all users.
14674         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14675         `grub_vga_mod_init'.  Updated all users.
14676         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14678         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14679         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14680         rules.
14682         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14683         Generate a function to initialize the module in utilities.
14684         Updated all callers.
14685         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14686         initialize the module in utilities.  Updated all callers.
14688 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14690         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14691         escape sequence and a literal ^L to clear the screen.
14693         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14694         when returning from Open Firmware.
14696 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14698         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14699         (grub_ofconsole_height): Likewise.
14700         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14701         manually insert a '\n'.
14702         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14703         `grub_ofconsole_height'.  Return early if these are already set.
14705 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14707         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14708         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14709         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14710         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14711         and `normal/script.c'.
14712         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14713         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14714         (test_mod_SOURCES): New variable.
14715         (test_mod_CFLAGS): Likewise.
14716         (test_mod_LDFLAGS): Likewise.
14717         (pkgdata_MODULES): Add `test.mod'.
14718         (grub_script.tab.c): New rule.
14719         (grub_script.tab.h): Likewise.
14721 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14723         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14724         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14725         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14726         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14727         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14728         (test_mod_SOURCES): New variable.
14729         (test_mod_CFLAGS): Likewise.
14730         (pkgdata_MODULES): Add `test.mod'.
14731         (grub_script.tab.c): New rule.
14732         (grub_script.tab.h): Likewise.
14734 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14736         Add initial scripting support.
14738         * commands/test.c: New file.
14739         * include/grub/script.h: Likewise.
14740         * normal/execute.c: Likewise.
14741         * normal/function.c: Likewise.
14742         * normal/lexer.c: Likewise.
14743         * normal/parser.y: Likewise.
14744         * normal/script.c: Likewise.
14746         * configure.ac: Add `AC_PROG_YACC' test.
14748         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14749         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14750         `normal/function.c' and `normal/script.c'.
14751         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14752         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14753         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14754         variables.
14755         (pkgdata_MODULES): Add `test.mod'.
14756         (grub_script.tab.c): New rule.
14757         (grub_script.tab.h): Likewise.
14759         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14761         * include/grub/normal.h (grub_test_init): New prototype.
14762         (grub_test_fini): Likewise.
14764         * normal/command.c: Include <grub/script.h>.
14765         (grub_command_execute): Rewritten.
14767         * util/grub-emu.c (main): Call `grub_test_init' and
14768         `grub_test_fini'.
14770 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14772         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14773         to 0.
14774         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14775         there are no pending characters.
14777 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14779         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14780         `grub_strndup' to drop device arguments. Replace unnecessary
14781         `grub_strndup' with `grub_strdup'.
14783 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14785         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14786         `debug' environment variable has been set.
14788 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14790         * Makefile.in (install-local): Use $(DATA).
14791         (uninstall): Likewise.
14792         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14793         (sbin_UTILITIES): ... to here.
14794         (sbin_SCRIPTS): New variable.
14795         (grub_install_SOURCES): New variable.
14796         * util/powerpc/ieee1275/grub-install.in: New file.
14797         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14798         variable.
14799         (add_segments): Call `grub_util_get_path'.
14801 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14803         From Timothy Baldwin:
14804         * commands/ls.c (grub_ls_list_files): Close FILE with
14805         grub_file_close.
14806         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14808 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14810         * include/grub/parser.h: New file.
14812         * kern/parser.c: Likewise.
14814         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14815         (grub_setup_SOURCES): Likewise.
14816         (grub_probefs_SOURCES): Likewise.
14817         (grub_emu_SOURCES): Likewise.
14818         (kernel_img_HEADERS): Add `parser.h'.
14820         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14821         (grub_emu_SOURCES): Add `kern/parser.c'.
14822         (grubof_SOURCES): Likewise.
14824         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14825         (grubof_SOURCES): Add `kern/parser.c'.
14827         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14829         * kern/misc.c (grub_split_cmdline): Removed function.
14831         * kern/rescue.c: Include <grub/parser.h>.
14832         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14833         of `grub_split_cmdline'.
14835         * normal/command.c: Include <grub/parser.h>.
14836         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14837         of `grub_split_cmdline'.
14839         * normal/completion.c: Include <grub/parser.h>.
14840         (cmdline_state): New variable.
14841         (iterate_dir): End the filename with a quote depending on the
14842         command line state.
14843         (get_state): new function.
14844         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14845         split the arguments and determine the current argument.  When the
14846         argument string is not quoted, escape all spaces.
14848 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14850         * normal/sparc64/setjmp.S: New file.
14852 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14854         * include/grub/sparc64/libgcc.h: New file.
14855         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14856         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14857         normal/sparc64/setjmp.c.
14859 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14861         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14862         * kern/sparc64/cache.S: New file.
14863         * kern/sparc64/cache.c: Removed.
14864         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14865         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14866         -mtune=ultrasparc.
14867         (COMMON_LDFLAGS): Add -melf64_sparc.
14868         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14869         (grubof_SOURCES): Use cache.S instead of cache.c.
14870         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14871         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14872         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14873         commented though.
14874         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14875         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14876         (linux_mod_CFLAGS): Commented out.
14877         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14878         out because module isn't built.
14879         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14880         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14881         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14882         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14883         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14884         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14885         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14886         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14887         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14888         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14889         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14890         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14891         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14892         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14894 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14896         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14897         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14898         longer, because HFS should not be used on PC.
14900 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14902         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14903         consistently within the loop.
14905 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14907         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14908         directory can not be read.
14910 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14912         * configure.ac (AC_INIT): Increase the version number to 1.91.
14914         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14915         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14916         term/i386/pc/serial.c.
14918 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14920         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14921         file size must be permitted.
14923         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14924         between %ah and %al.
14926 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14928         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14929         grub_uint64_t.
14930         Call the hook with a NUL-terminated filename.
14931         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14932         grub_cpu_to_be32.
14934         * kern/term.c (cursor_state): New variable.
14935         (grub_term_set_current): Reset the cursor state on a new
14936         terminal.
14937         (grub_setcursor): Rewritten to use CURSOR_STATE.
14938         (grub_getcursor): New function.
14940         * include/grub/term.h (grub_getcursor): New prototype.
14942         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14943         integers on ARM. Reported by Timothy Baldwin
14944         <T.E.Baldwin99@members.leeds.ac.uk>.
14946 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14948         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14949         allocated.
14950         (grub_sfs_dir): Likewise.
14952 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14954         Add support for the SFS filesystem.
14956         * fs/sfs.c: New file.
14958         * DISTLIST: Added `fs/sfs.c'.
14960         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14961         (grub_probefs_SOURCES): Likewise.
14962         (grub_emu_SOURCES): Likewise.
14963         (pkgdata_MODULES): Add `sfs.mod'.
14964         (sfs_mod_SOURCES): New variable.
14965         (sfs_mod_CFLAGS): Likewise.
14966         (sfs_mod_LDFLAGS): Likewise.
14968         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14969         (pkgdata_MODULES): Add `sfs.mod'.
14970         (sfs_mod_SOURCES): New variable.
14971         (sfs_mod_CFLAGS): Likewise.
14973         * util/grub-emu.c (main): Call `grub_sfs_init' and
14974         `grub_sfs_fini'.
14976         * include/grub/fs.h (grub_sfs_init): New prototype.
14977         (grub_sfs_fini): Likewise.
14979 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14981         Add support for the AFFS filesystem.
14983         * fs/affs.c: New file.
14985         * DISTLIST: Added `fs/affs.c'.
14987         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14988         (grub_probefs_SOURCES): Likewise.
14989         (grub_emu_SOURCES): Likewise.
14990         (pkgdata_MODULES): Add `affs.mod'.
14991         (affs_mod_SOURCES): New variable.
14992         (affs_mod_CFLAGS): Likewise.
14993         (affs_mod_LDFLAGS): Likewise.
14995         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14996         (pkgdata_MODULES): Add `affs.mod'.
14997         (affs_mod_SOURCES): New variable.
14998         (affs_mod_CFLAGS): Likewise.
15000         * util/grub-emu.c (main): Call `grub_affs_init' and
15001         `grub_affs_fini'.
15003         * include/grub/fs.h (grub_affs_init): New prototype.
15004         (grub_affs_fini): Likewise.
15006 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
15008         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
15010 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
15012         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
15013         `-m32' to CFLAGS.
15015         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
15016         linking.
15018         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
15019         (COMMON_LDFLAGS): New variable.
15020         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
15021         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
15022         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
15023         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15024         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
15025         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
15026         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
15027         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
15028         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
15029         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
15030         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15031         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15032         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
15033         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
15034         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
15035         variables.
15036         (normal_mod_ASFLAGS): Add `-m32'.
15038         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
15039         (grub_host_size_t, grub_host_ssize_t): New types.
15040         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
15041         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
15042         `GRUB_HOST_SIZEOF_VOID_P'.
15044         * include/grub/kernel.h (struct grub_module_header): Type of
15045         member offset changed to `grub_host_off_t'.  Type of member size
15046         changed to `grub_host_size_t'.
15047         (struct grub_module_info): Type of member offset changed to
15048         `grub_host_off_t'.  Type of member size changed to
15049         `grub_host_size_t'.
15051 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
15053         Make GRUB's kernel compliant to Multiboot Specification.
15055         * kern/i386/pc/startup.S (multiboot_header): New label.
15056         (multiboot_entry): Likewise.
15057         (multiboot_trampoline): Likewise.
15059         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15060         Increased to 0x4A0.
15062         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15063         put parentheses after a question mark.
15064         [!GRUB_UTIL] (my_mod): New variable.
15066         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15068 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
15070         Adds support for the XFS filesystem.  Btrees are not supported
15071         yet.
15073         * fs/xfs.c: New file.
15075         * DISTLIST: Added `fs/xfs.c'.
15077         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15078         (grub_probefs_SOURCES): Likewise.
15079         (grub_emu_SOURCES): Likewise.
15080         (pkgdata_MODULES): Add `xfs.mod'.
15081         (xfs_mod_SOURCES): New variable.
15082         (xfs_mod_CFLAGS): Likewise.
15084         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15085         (pkgdata_MODULES): Add `xfs.mod'.
15086         (xfs_mod_SOURCES): New variable.
15087         (xfs_mod_CFLAGS): Likewise.
15089         * util/grub-emu.c (main): Call `grub_xfs_init' and
15090         `grub_xfs_fini'.
15092         * include/grub/fs.h (grub_xfs_init): New prototype.
15093         (grub_xfs_fini): Likewise.
15096 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
15098         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15099         color modes, allow greater than 16 colors to be configured as
15100         a default palette.
15102 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
15104         * normal/completion.c (complete_arguments): Add the qualifier
15105         const into OPTIONS.
15107         From Omniflux <omniflux+lists@omniflux.com>:
15108         * include/grub/terminfo.h: New file.
15109         * include/grub/tparm.h: Likewise.
15110         * include/grub/i386/pc/serial.h: Likewise.
15111         * term/terminfo.c: Likewise.
15112         * term/tparm.c: Likewise.
15113         * term/i386/pc/serial.c: Likewise.
15114         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15115         serial.mod.
15116         (terminfo_mod_SOURCES): New variable.
15117         (terminfo_mod_CFLAGS): Likewise.
15118         (serial_mod_SOURCES): Likewise.
15119         (serial_mod_CFLAGS): Likewise.
15121 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
15123         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15124         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15125         and kern/powerpc/ieee1275/cmain.c, respectively.
15127         * boot/powerpc/ieee1275/crt0.S: Moved to ...
15128         * kern/powerpc/ieee1275/crt0.S: ... here.
15130         * boot/powerpc/ieee1275/cmain.c: Moved to ...
15131         * kern/powerpc/ieee1275/cmain.c: ... here.
15133         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15134         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15135         instead of boot/powerpc/ieee1275/crt0.S and
15136         boot/powerpc/ieee1275/cmain.c, respectively.
15138         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15139         sectors. It was not used anyway.
15141 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
15143         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15144         `unused parameter' warning.
15146 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
15148         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15149         function.
15150         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15151         getcharwidth.
15153 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
15155         * include/grub/normal.h (enum grub_completion_type): Added
15156         `GRUB_COMPLETION_TYPE_ARGUMENT'.
15158         * normal/cmdline.c (print_completion): Handle
15159         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15160         * normal/menu_entry.c (store_completion): Likewise.
15162         * normal/completion.c (complete_arguments): New function.
15163         (grub_normal_do_completion): Call `complete_arguments' when the
15164         current words start with a dash.
15166 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
15168         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15169         `gzio.mod' instead of `io.mod').
15171 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
15173         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15174         (DISTDIRS): Added io and video.
15175         Rewrite the search routine to make an output consistently.
15177         * DISTLIST: Added conf/sparc64-ieee1275.mk,
15178         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15179         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15180         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15181         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15182         util/powerpc/ieee1275/misc.c.
15184         * include/grub/gzio.h: New file.
15185         * io/gzio.c: Likewise.
15187         * kern/file.c (grub_file_close): Call grub_device_close only if
15188         FILE->DEVICE is not NULL.
15190         * include/grub/mm.h [!NULL] (NULL): New macro.
15192         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15194         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15195         (pkgdata_MODULES): Added gzio.mod.
15196         (gzio_mod_SOURCES): New variable.
15197         (gzio_mod_CFLAGS): Likewise.
15199         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15200         (pkgdata_MODULES): Added gzio.mod.
15201         (gzio_mod_SOURCES): New variable.
15202         (gzio_mod_CFLAGS): Likewise.
15204         * commands/cat.c: Include grub/gzio.h.
15205         (grub_cmd_cat): Use grub_gzfile_open instead of
15206         grub_file_open.
15208         * commands/cmp.c: Include grub/gzio.h.
15209         (grub_cmd_cmp): Use grub_gzfile_open instead of
15210         grub_file_open.
15212         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15213         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15214         grub_file_open.
15215         (grub_rescue_cmd_module): Likewise.
15217 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15219         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15220         kern/sparc64/ieee1275/init.c because it contains _start.
15221         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15223 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15225         * configure.ac: Add support for sparc64 host with ieee1275
15226         firmware.
15227         * configure: Generated from configure.ac.
15228         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15229         instead of int.
15230         (grub_ofdisk_read): Likewise.
15231         (grub_ofdisk_open): Use %p to print pointer values, and cast the
15232         pointers as (void *) to remove a warning.
15233         (grub_ofdisk_close): Likewise.
15234         (grub_ofdisk_read): Likewise.
15235         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15236         returns, so make it return void to remove a warning.
15237         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15238         Corresponding prototype change.
15239         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15240         values, and cast the pointers as (void *) to remove a warning.
15241         (grub_mm_dump): Likewise.
15242         * conf/sparc64-ieee1275.mk: New file.
15243         * conf/sparc64-ieee1275.rmk: Likewise.
15244         * include/grub/sparc64/setjmp.h: Likewise.
15245         * include/grub/sparc64/types.h: Likewise.
15246         * include/grub/sparc64/ieee1275/console.h: Likewise.
15247         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15248         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15249         * include/grub/sparc64/ieee1275/time.h: Likewise.
15250         * kern/sparc64/cache.c: Likewise.
15251         * kern/sparc64/dl.c: Likewise.
15252         * kern/sparc64/ieee1275/init.c: Likewise.
15253         * kern/sparc64/ieee1275/openfw.c: Likewise.
15255 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15257         * util/console.c (grub_ncurses_putchar): If C is greater than
15258         0x7f, set C to a question mark.
15259         (grub_ncurses_getcharwidth): New function.
15260         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15261         getcharwidth.
15263         * normal/menu.c (print_entry): Made aware of Unicode. First,
15264         convert TITLE to UCS-4, and predict the cursor position by
15265         grub_getcharwidth.
15267         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15268         const to SRC.
15269         * kern/misc.c (grub_utf16_to_utf8): Likewise.
15271 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15273         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15274         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15275         grub_strcat.
15277         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15278         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15279         grub_strcpy and grub_strlen. Take it into account that a space
15280         character is inserted as a delimiter.
15282 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15284         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15285         invalid magic in the error.
15287         * commands/search.c: New file.
15289         * util/grub-emu.c (main): Call grub_search_init and
15290         grub_search_fini.
15292         * kern/rescue.c (grub_rescue_print_disks): Removed.
15293         (grub_rescue_print_devices): New function.
15294         (grub_rescue_cmd_ls): Use grub_device_iterate with
15295         grub_rescue_print_devices instead of grub_disk_dev_iterate with
15296         grub_rescue_print_disks.
15298         * kern/partition.c (grub_partition_iterate): Return the result of
15299         PARTMAP->ITERATE instead of GRUB_ERRNO.
15301         * kern/device.c: Include grub/partition.h.
15302         (grub_device_iterate): New function.
15304         * include/grub/partition.h (grub_partition_iterate): Return int
15305         instead of grub_err_t.
15307         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15308         prototype.
15309         [GRUB_UTIL] (grub_search_fini): Likewise.
15311         * include/grub/device.h (grub_device_iterate): New prototype.
15313         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15314         commands/search.c.
15315         (pkgdata_MODULES): Added search.mod.
15316         (search_mod_SOURCES): New variable.
15317         (search_mod_CFLAGS): Likewise.
15319         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15320         (pkgdata_MODULES): Added search.mod.
15321         (search_mod_SOURCES): New variable.
15322         (search_mod_CFLAGS): Likewise.
15324         * commands/ls.c (grub_ls_list_disks): Renamed to ...
15325         (grub_ls_list_devices): ... this, and use grub_device_iterate.
15326         All callers changed.
15328         * DISTLIST: Added commands/search.c.
15330 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15332         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15333         conversion.
15334         (grub_getcharwidth): New function.
15336         * kern/misc.c (grub_utf8_to_ucs4): New function.
15338         * include/grub/term.h (struct grub_term): Added a new member
15339         "getcharwidth".
15340         (grub_getcharwidth): New prototype.
15342         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15344         * term/i386/pc/console.c (map_char): New function. Segregated from
15345         grub_console_putchar.
15346         (grub_console_putchar): Use map_char.
15347         (grub_console_getcharwidth): New function.
15348         (grub_console_term): Specified grub_console_getcharwidth as
15349         getcharwidth.
15351         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15352         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15354         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15355         GRUB_ERRNO.
15356         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15357         on grub_strtoul completely.
15358         (write_char): Declare local variables in the beginning of the
15359         function.
15360         (grub_vesafb_getcharwidth): New function.
15361         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15362         getcharwidth.
15364 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
15366         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15367         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15368         commands/i386/pc/vbetest.c.
15370         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15371         call grub_vbe_get_controller_info again, because the returned
15372         information is volatile.
15373         (grub_vbe_set_video_mode): Mostly rewritten.
15374         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15375         grub_vbe_status_t correctly.
15376         (grub_vbe_get_video_mode_info): Likewise.
15377         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15378         several if statements.
15380         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15381         * commands/i386/pc/vbeinfo.c: ... this.
15383         * commands/i386/pc/vbe_test.c: Renamed to ...
15384         * commands/i386/pc/vbetest.c: ... this.
15386         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15387         ...
15388         (grub_cmd_vbeinfo): ... this. Save video modes before
15389         iterating. Skip a video mode, if it is not available, not enough
15390         information is given or it is monochrome. Show the memory
15391         model. Leave the interpretation of MODEVAR to grub_strtoul
15392         completely.
15393         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15394         (GRUB_MOD_FINI): Likewise.
15396         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15397         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15398         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15399         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15400         grub_strtoul completely.
15401         (real2pm): Removed.
15402         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15403         (GRUB_MOD_FINI): Likewise.
15405         * normal/misc.c: Include grub/mm.h.
15407         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15408         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15409         (vbe_list_modes_mod_SOURCES): Removed.
15410         (vbe_list_modes_mod_CFLAGS): Likewise.
15411         (vbe_test_mod_SOURCES): Likewise.
15412         (vbe_test_mod_CFLAGS): Likewise.
15413         (vbeinfo_mod_SOURCES): New variable.
15414         (vbeinfo_mod_CFLAGS): Likewise.
15415         (vbetest_mod_SOURCES): Likewise.
15416         (vbetest_mod_CFLAGS): Likewise.
15418 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15420         * normal/misc.c: New file.
15422         * DISTLIST: Added normal/misc.c.
15424         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15425         DISK to HOOK. Call HOOK with DISK.
15426         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15427         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15428         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15430         * normal/menu_entry.c (struct screen): Added a new member
15431         "completion_shown".
15432         (completion_buffer): New global variable.
15433         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15434         (store_completion): New function.
15435         (complete): Likewise.
15436         (clear_completions): Likewise.
15437         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15438         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15439         a tab, call complete.
15441         * normal/completion.c (disk_dev): Removed.
15442         (print_simple_completion): Likewise.
15443         (print_partition_completion): Likewise.
15444         (print_func): New global variable.
15445         (add_completion): Do not take the arguments WHAT or PRINT any
15446         longer. Added a new argument TYPE. Instead of printing directly,
15447         call PRINT_FUNC if not NULL.
15448         All callers changed.
15449         (complete_device): Use a local variable DEV instead of
15450         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15451         (grub_normal_do_completion): Take a new argument HOOK. Do not
15452         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15453         empty string, return NULL instead.
15454         All callers changed.
15456         * normal/cmdline.c (print_completion): New function.
15458         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15459         to HOOK.
15460         All callers changed.
15462         * kern/disk.c (grub_print_partinfo): Removed.
15464         * include/grub/partition.h (struct grub_partition_map): Add a new
15465         argument DISK into HOOK of ITERATE.
15466         (grub_partition_iterate): Add a new argument DISK to HOOK.
15468         * include/grub/normal.h (enum grub_completion_type): New enum.
15469         (grub_completion_type_t): New type.
15470         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15471         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15472         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15473         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15474         (grub_normal_do_completion): Added a new argument HOOK.
15475         (grub_normal_print_device_info): New prototype.
15477         * include/grub/disk.h (grub_print_partinfo): Removed.
15479         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15480         (normal_mod_SOURCES): Likewise.
15481         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15482         (normal_mod_SOURCES): Likewise.
15484         * commands/ls.c (grub_ls_list_disks): Use
15485         grub_normal_print_device_info instead of grub_print_partinfo. Free
15486         PNAME.
15487         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15488         duplicating the code.
15490 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15492         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15493         follow GCS more precisely.
15494         * commands/i386/pc/vbe_test.c: Likewise.
15495         * include/grub/i386/pc/vbe.h: Likewise.
15496         * term/i386/pc/vesafb.c: Likewise.
15497         * video/i386/pc/vbe.c: Likewise.
15499 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15501         * DISTLIST: Added term/i386/pc/vesafb.c
15502         DISTLIST: Added video/i386/pc/vbe.c
15503         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15504         DISTLIST: Added commands/i386/pc/vbe_test.c.
15505         * commands/i386/pc/vbe_list_modes.c: New file.
15506         * commands/i386/pc/vbe_test.c: Likewise.
15507         * term/i386/pc/vesafb.c: Likewise.
15508         * video/i386/pc/vbe.c: Likewise.
15509         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15510         (grub_vbe_probe) Added prototype.
15511         (grub_vbe_set_video_mode) Likewise.
15512         (grub_vbe_get_video_mode) Likewise.
15513         (grub_vbe_get_video_mode_info) Likewise.
15514         (grub_vbe_set_pixel_rgb) Likewise.
15515         (grub_vbe_set_pixel_index) Likewise.
15516         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15517         (pkgdata_MODULES): Added vesafb.mod.
15518         (pkgdata_MODULES): Added vbe_list_modes.mod.
15519         (pkgdata_MODULES): Added vbe_test.mod.
15520         (vbe_mod_SOURCES): Added.
15521         (vbe_mod_CFLAGS): Likewise.
15522         (vesafb_mod_SOURCES): Likewise.
15523         (vesafb_mod_CFLAGS): Likewise.
15524         (vbe_list_modes_mod_SOURCES): Likewise.
15525         (vbe_list_modes_mod_CFLAGS): Likewise.
15526         (vbe_test_mod_SOURCES): Likewise.
15527         (vbe_test_mod_CFLAGS): Likewise.
15529 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15531         * normal/command.c (grub_command_execute): If INTERACTIVE is
15532         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15533         CMDLINE. Disable the pager if INTERACTIVE is true.
15534         All callers are changed.
15536         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15537         before reading a config file.
15538         * normal/main.c (read_config_file): Even if a command is not
15539         found, register it if it is within an entry.
15541         * util/grub-emu.c: Include sys/types.h and unistd.h.
15542         (options): Added --hold.
15543         (struct arguments): Added a new member "hold".
15544         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15545         missing.
15546         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15547         cleared by a debugger, if it is not zero.
15549         * include/grub/normal.h (grub_command_execute): Add an argument
15550         INTERACTIVE.
15552 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15554         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15556 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15558         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15559         program with another one, because the old one didn't detect a bug
15560         in gcc-3.4. Always use regparm 2, because the new test is still
15561         not enough for gcc-4.0. Someone must investigate a simple test
15562         case which detects a bug in gcc-4.0.
15564 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15566         * DISTLIST: Added normal/completion.c.
15568         * normal/completion.c: New file.
15570         * term/i386/pc/console.c (grub_console_getwh): New function.
15571         (grub_console_term): Assign grub_console_getwh to getwh.
15573         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15574         function is defined in normal/completion.c as
15575         grub_normal_do_completion.
15576         (grub_cmdline_get): Use grub_normal_do_completion instead of
15577         grub_tab_complete.
15579         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15580         returns non-zero, otherwise return 0.
15581         (grub_partition_iterate): First, probe the partition map. Then,
15582         call ITERATE only for this partition map.
15584         * kern/misc.c (grub_strncmp): Rewritten.
15586         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15587         returns non-zero. Otherwise return 0.
15589         * include/grub/partition.h (grub_partition_map_iterate): Return
15590         int instead of void.
15592         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15594         * include/grub/misc.h (grub_strncmp): Change the type of N to
15595         grub_size_t.
15597         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15598         of void.
15600         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15601         unsigned explicitly before comparing it with I.
15603         * kern/main.c (grub_env_write_root): Add the attribute unused into
15604         VAR.
15606         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15607         normal/completion.c.
15608         (normal_mod_SOURCES): Likewise.
15609         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15610         (normal_mod_SOURCES): Likewise.
15612         * normal/command.c (grub_iterate_commands): If ITERATE returns
15613         non-zero, return one immediately.
15615 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15617         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15618         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15619         descriptions.
15620         (grub_vbe_get_controller_info): New function.
15621         (grub_vbe_get_mode_info): Likewise.
15622         (grub_vbe_set_mode): Likewise.
15623         (grub_vbe_get_mode): Likewise.
15624         (grub_vbe_set_memory_window): Likewise.
15625         (grub_vbe_get_memory_window): Likewise.
15626         (grub_vbe_set_scanline_length): Likewise.
15627         (grub_vbe_get_scanline_length): Likewise.
15628         (grub_vbe_set_display_start): Likewise.
15629         (grub_vbe_get_display_start): Likewise.
15630         (grub_vbe_set_palette_data): Likewise.
15631         * include/grub/i386/pc/vbe.h: New file.
15633 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15635         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15636         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15637         * DISTLIST: Likewise.
15638         * kern/ieee1275/of.c: Moved to ...
15639         * kern/ieee1275/ieee1275.c: ... here.
15641 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15643         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15644         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15645         Pass 0 as `end' parameter to grub_strtoul().
15647 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15649         * include/grub/powerpc/ieee1275/console.h: Do not include
15650         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15651         ifdef.
15652         (grub_console_cur_color): Remove i386-specific prototype.
15653         (grub_console_real_putchar): Likewise.
15654         (grub_console_checkkey): Likewise.
15655         (grub_console_getkey): Likewise.
15656         (grub_console_getxy): Likewise.
15657         (grub_console_gotoxy): Likewise.
15658         (grub_console_cls): Likewise.
15659         (grub_console_setcursor): Likewise.
15660         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15661         Include <grub/machine/console.h>.
15662         * term/ieee1275/ofconsole.c: Likewise.
15664 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15666         * Makefile.in (LIBLZO): New variable.
15668         * configure.ac: Check for LZO version 2.
15670         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15671         lzo/lzo1x.h instead of lzo1x.h.
15673         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15674         of -llzo.
15676         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15677         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15679         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15680         copying the data from PARTITION to P.
15682 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15684         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15685         negative, unload the module.
15687         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15688         map is "pc_partition_map" but not "pc".
15689         (usage): Fix the description. The options are --boot-image and
15690         --core-image but not --boot-file or --core-file.
15691         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15692         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15693         DEFAULT_DIRECTORY.
15695         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15696         --core-file. Specify INSTALL_DEVICE as an argument.
15698         * util/console.c: Include config.h.
15699         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15700         [HAVE_NCURSES_H]: Include ncurses.h.
15701         [HAVE_CURSES_H]: Include curses.h.
15702         [!A_NORMAL] (A_NORMAL): Defined as zero.
15703         [!A_STANDOUT] (A_STANDOUT): Likewise.
15705         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15706         -lncurses.
15707         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15709         * configure.ac: Check for curses libraries and headers.
15711         * Makefile.in (LIBCURSES): New variable.
15713         * genmk.rb (Script::rule): Set the executable bits.
15715         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15716         name of the PC partition map is "pc_partition_map" but not "pc".
15718 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15720         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15721         (modules): Likewise.
15722         (usage): Added descriptions for --modules and --grub-probefs.
15723         Handle --modules and --grub-probefs. Save the arguments in MODULES
15724         and GRUB_PROBEFS, respectively.
15725         Auto-detect a filesystem module against GRUBDIR. If the result is
15726         empty and modules are not specified explicitly, abort the
15727         installation. Add the result to MODULES.
15729         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15730         disk/powerpc/ieee1275/ofdisk.c,
15731         include/grub/powerpc/ieee1275/init.h and
15732         term/powerpc/ieee1275/ofconsole.c.
15733         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15734         term/ieee1275/ofconsole.c.
15736         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15738         * COPYING: Upgraded to the latest version. Only the address of the
15739         FSF office has changed.
15741 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15743         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15744         kern/ieee1275.c with kern/ieee1275/of.c.
15746         * kern/ieee1275.c: Moved to ...
15747         * kern/ieee1275/of.c: ... here.
15749 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15751         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15752         readability.
15754         * config.guess: Updated to the latest version from gnulib.
15755         * config.sub: Likewise.
15756         * install.sh: Likewise.
15757         * mkinstalldirs: Likewise.
15759         * include/grub/console.h: Removed. This file is arch-specific. Do
15760         not put this in include/grub.
15762         * include/grub/i386/pc/console.h: Resurrected.
15764         * util/console.c: Include grub/machine/console.h instead of
15765         grub/console.h.
15766         * util/grub-emu.c: Likewise.
15768 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15770         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15771         hardcoded value.
15773         From Vincent Pelletier  <subdino2004@yahoo.fr>
15774         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15775         Redefined to use grub_getwh.
15776         (grub_term): New member named getwh.
15777         (grub_getwh): New prototype.
15778         * kern/term.c (grub_getwh): New function.
15779         * term/i386/pc/console.c (grub_console_getwh): New function.
15780         (grub_console_term): New member `getwh'.
15781         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15782         (grub_vga_term): New member `getwh'.
15783         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15784         grub_ssize_t.
15785         (grub_ofconsole_getw): New function.
15786         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15787         (grub_ofconsole_term): New field named getwh and new initial
15788         value.
15790 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15792         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15793         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15794         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15795         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15796         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15797         of <grub/machine/ieee1275.h>.
15798         * commands/ieee1275/reboot.c: Likewise.
15799         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15800         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15801         parameter structs to use new type `grub_ieee1275_cell_t'.
15802         * term/powerpc/ieee1275/ofconsole.c: Move ...
15803         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15804         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15805         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15806         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15807         to return int.
15808         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15809         Remove unused prototypes.  All users updated.
15810         * include/grub/powerpc/ieee1275/console.h: Removed.
15811         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15812         `grub_ieee1275_cell_t'.
15813         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15814         Cast comparisons with -1 to the correct type.
15815         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15816         type to match `grub_ieee1275_entry_fn'.
15818 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15820         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15822         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15823         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15824         partmap/sun.c.
15825         (grub_probefs_SOURCES): New variable.
15827         * util/i386/pc/grub-probefs.c: New file.
15829         * util/i386/pc/grub-setup.c (main): Call
15830         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15831         grub_hfs_init and grub_jfs_init to initialize the system. Call
15832         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15833         grub_pc_partition_map_fini to finish the system.
15835 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15837         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15838         function.
15839         (grub_multiboot_load_elf32): Likewise.
15840         (grub_multiboot_is_elf64): Likewise.
15841         (grub_multiboot_load_elf64): Likewise.
15842         (grub_multiboot_load_elf): Likewise.
15843         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15844         an ELF32 or ELF64 file.
15845         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15847         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15848         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15849         NULL before calling FS->LABEL.
15850         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15851         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15852         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15853         before calling FS->LABEL.
15855 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15857         * util/i386/pc/grub-install.in (datadir): New variable.
15858         (libdir): Removed.
15859         (pkgdatadir): New variable.
15860         (pkglibdir): Removed.
15862 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15864         * DISTLIST: Added util/i386/pc/grub-install.in.
15866         * util/i386/pc/grub-install.in: New file.
15868         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15869         (grub_install_SOURCES): Likewise.
15871         * genmk.rb: Added support for scripts.
15872         (Script): New class.
15873         (scripts): New variable.
15875         * Makefile.in (install-local): Install sbin_SCRIPTS by
15876         INSTALL_SCRIPT.
15877         (uninstall): Remove sbin_SCRIPTS.
15879         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15880         device, try to get a GRUB device by
15881         grub_util_biosdisk_get_grub_dev.
15882         Free DEST_DEV.
15884         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15885         description for --device-map.
15887 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15889         Change the semantics of variable hooks. They now return strings
15890         instead of error values.
15892         * util/i386/pc/grub-setup.c: Include grub/env.h.
15893         (setup): Use grub_device_set_root instead of grub_env_set.
15895         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15896         grub_env_get instead of grub_device_set_root and
15897         grub_device_get_root, respectively.
15899         * kern/main.c (grub_env_write_root): New function.
15900         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15901         grub_env_set instead of grub_device_set_root.
15903         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15904         many variables.
15905         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15906         rather than calling ENV->WRITE_HOOK afterwards.
15907         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15908         passing a pointer of a pointer.
15909         (grub_register_variable_hook): Change the types of "read_hook" and
15910         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15911         respectively.
15912         Allocate the default empty string on the heap, because this string
15913         may be freed later.
15915         * kern/device.c: Include grub/env.h.
15916         (grub_device_set_root): Removed.
15917         (grub_device_get_root): Likewise.
15918         (grub_device_open): Use grub_env_get instead of
15919         grub_device_get_root.
15921         * include/grub/env.h (grub_env_read_hook_t): New type.
15922         (grub_env_write_hook_t): Likewise.
15923         (grub_env_var): Change the types of "read_hook" and "write_hook"
15924         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15925         (grub_register_variable_hook): Likewise.
15927         * include/grub/device.h (grub_device_set_root): Removed.
15928         (grub_device_set_root): Likewise.
15930         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15931         make sure that DIRNAME terminates with '/', so that
15932         grub_fat_find_dir will fail if PATH is not a directory.
15934         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15935         from DIRNAME.
15936         Use the qualifier auto for print_files and print_files_long.
15937         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15938         as a regular file.
15939         Put a newline only if there is no error.
15940         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15941         used.
15943 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15945         * kern/partition.c (grub_partition_probe): Initialize PART to
15946         NULL. Otherwise, when no partition map is registered, this returns
15947         a garbage.
15949 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15951         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15952         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15953         valid.
15955 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15957         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15958         information on each device, if it does not have partitions. Print
15959         "Device" instead of "Disk", because this function is not specific
15960         to disk devices.
15962         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15963         static to ensure that it is put on the memory rather than a
15964         register.
15966 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15968         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15969         (grub_cat_init): Likewise.
15970         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15971         (options): Likewise.
15972         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15973         (grub_configfile_init): Likewise.
15974         * font/manager.c (GRUB_MOD_INIT): Likewise.
15975         * commands/help.c (GRUB_MOD_INIT): Likewise.
15976         (grub_help_init): Likewise.
15977         * normal/command.c (grub_command_init): Likewise.
15978         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15979         * disk/loopback.c (grub_loop_init): Likewise.
15980         (GRUB_MOD_INIT): Likewise.
15981         * commands/ls.c (grub_ls_init): Likewise.
15982         (GRUB_MOD_INIT): Likewise.
15983         (options): Likewise.
15984         * commands/boot.c (grub_boot_init): Likewise.
15985         (GRUB_MOD_INIT): Likewise.
15986         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15987         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15988         (GRUB_MOD_INIT): Likewise.
15989         * commands/cmp.c (grub_cmp_init): Likewise.
15990         (GRUB_MOD_INIT): Likewise.
15992         * normal/arg.c: Use <> instead of "" to include header files.
15993         (SHORT_ARG_HELP): New macro.
15994         (SHORT_ARG_USAGE): Likewise.
15995         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15996         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15997         descriptions.
15998         (find_short): Check if C is 'h' or 'u' explicitly.
15999         (grub_arg_show_help): Use space characters instead of tabs. Treat
16000         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
16001         are shown with --help and --usage only if they are not used for
16002         the command itself.
16003         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
16004         'h' and 'u'.
16006         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
16007         const into "longarg". Change the type of "shortarg" to int.
16009 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
16011         * boot/i386/pc/boot.S (boot_drive_check): New label.
16013         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
16014         macro.
16016         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
16017         which do not pass a boot drive correctly. Copied from GRUB Legacy.
16019 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
16021         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
16022         When turning off Gate A20, skip the check and return immediately,
16023         because this is not fatal usually.
16025 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
16027         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
16028         be 0x7C00 instead of 0x8000.
16030         * boot/i386/pc/pxeboot.S: Rewritten.
16032         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
16033         EXT_C.
16034         (gate_a20_check_state): Read a byte from 0x108000. Invert the
16035         result.
16037 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
16039         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
16040         robustness. This routine now supports a BIOS call and System
16041         Control Port A to modify the gate A20.
16043         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16044         Increased to 0x440.
16046 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
16048         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16049         device path and resulting ihandle.
16050         (grub_ofdisk_close): dprintf the ihandle being closed.
16051         (grub_ofdisk_read): dprintf function parameters.
16052         * kern/mm.c (grub_mm_init_region): Likewise.
16053         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16054         (grub_linux_boot): dprintf the Linux entry point, initrd address and
16055         size, and boot arguments.
16056         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16057         before loading into memory.
16058         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16059         before loading into memory.
16061 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
16063         * kern/mm.c: Added much documentation.
16064         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16065         8, set to 5 instead of 8.
16067 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
16069         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16071         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16072         (grub_mkdevicemap_SOURCES): New variable.
16074         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16075         lib/device.c of GRUB Legacy.
16077 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
16079         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16080         instead of PATH is NULL.
16082 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
16084         * commands/cmp.c (BUFFER_SIZE): New macro.
16085         (grub_cmd_cmp): Close the right file at the right time.  Compare
16086         only data just read.  Don't report files of different  size as
16087         identical.  Dynamically allocate buffers.  Move variable
16088         declarations at the beginning of function.
16090 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
16092         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16093         reverse.
16095 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
16097         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16098         when backspace is pressed at beginning of line.
16100 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
16102         * DISTLIST: Added genfslist.sh.
16104         * normal/main.c (fs_module_list): New variable.
16105         (autoload_fs_module): New function.
16106         (read_fs_list): Likewise.
16107         (grub_normal_execute): Call read_fs_list.
16109         * kern/fs.c (grub_fs_autoload_hook): New variable.
16110         (grub_fs_probe): Added support for auto-loading.
16112         * include/grub/normal.h (struct grub_fs_module_list): New struct.
16113         (grub_fs_module_list_t): New type.
16115         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16116         (grub_fs_autoload_hook): New prototype.
16118         * genfslist.sh: New file.
16120         * genmk.rb: Added a rule to generate a filesystem list.
16122 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
16124         * configure.ac: Fix the test for cross-compiling.
16126         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
16127         define GRUB_UTIL anymore.
16129         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16130         so this function works on other systems than just big endian.
16131         (load_modules): Likewise.
16132         (add_segments): Likewise.
16134 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
16136         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
16137         contains `l' modifier, get a long from va_arg().
16139 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
16141         * kern/mm.c (grub_free): If the next free block which is being
16142         merged is the first free block, set the first block to the block
16143         being freed.
16144         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16146 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
16148         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16149         `grub_ieee1275_chosen'.
16151 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
16153         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16154         (grub_ieee1275_chosen): New variable.
16155         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16156         `chosen'.
16157         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16158         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16159         Rename first argument to `phandle' for consistency.
16160         (grub_ieee1275_get_property_length): Likewise.
16161         (grub_ieee1275_next_property): Likewise.  Change type of first argument
16162         to grub_ieee1275_phandle_t.
16163         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16164         Move export next to declaration.
16165         (grub_ieee1275_chosen): New variable.
16166         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16167         Correct cosmetic typo.
16168         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16169         `grub_ieee1275_chosen'.
16170         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16171         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16172         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16173         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16174         `grub_ieee1275_chosen'.
16176 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
16178         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16179         /chosen/bootargs.
16180         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16181         /chosen/bootargs as "variable=value" pairs.
16183 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
16185         * include/grub/misc.h (grub_dprintf): New macro.
16186         (grub_real_dprintf): New prototype.
16187         (grub_strword): Likewise.
16188         (grub_iswordseparator): Likewise.
16189         * kern/misc.c (grub_real_dprintf): New function.
16190         (grub_strword): Likewise.
16191         (grub_iswordseparator): Likewise.
16193 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
16195         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16196         (roundup): Remove macro.
16197         (grub_ieee1275_flags): Make static.
16198         (grub_ieee1275_realmode): Remove.
16199         (grub_ieee1275_test_flag): New function.
16200         (grub_ieee1275_set_flag): Likewise.
16201         (find_options): Rename to `grub_ieee1275_find_options'; update
16202         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16203         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16204         (cmain): New prototype.
16205         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16206         `grub_ieee1275_flags' directly.
16207         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16208         machine/biosdisk.h.
16209         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16210         Don't include grub/machine/init.h.
16211         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16212         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16213         Remove prototype.
16214         (grub_ieee1275_realmode): Likewise.
16215         (grub_ieee1275_flag): New enum.
16216         (grub_ieee1275_test_flag): New prototype.
16217         (grub_ieee1275_set_flag): New prototype.
16218         * include/grub/powerpc/ieee1275/init.h: Remove file.
16219         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16220         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16221         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
16222         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
16223         comment.
16224         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16225         `grub_ieee1275_test_flag'.
16226         (grub_ieee1275_encode_devname): Likewise.
16228 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
16230         * include/grub/powerpc/ieee1275/ieee1275.h
16231         (grub_ieee1275_encode_devname): New prototype.
16232         (grub_ieee1275_get_filename): Likewise.
16233         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16234         function.
16235         (grub_set_prefix): Likewise.
16236         (grub_machine_init): Call grub_set_prefix.
16237         * kern/powerpc/ieee1275/openfw.c: Fix typos.
16238         (grub_parse_type): New enum.
16239         (grub_ieee1275_get_devargs): New function.
16240         (grub_ieee1275_get_devname): Likewise.
16241         (grub_ieee1275_parse_args): Likewise.
16242         (grub_ieee1275_get_filename): Likewise.
16243         (grub_ieee1275_encode_devname): Likewise.
16245 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
16247         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16248         `grub_loader_unset'.
16250 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
16252         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16253         instead of grub_ieee1275_interpret.
16254         (grub_halt_init): New function.
16255         (grub_halt_fini): Likewise.
16256         (GRUB_MOD_INIT): Correct message grammar.
16257         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16258         instead of grub_ieee1275_interpret.
16259         (grub_reboot_init): New function.
16260         (grub_reboot_fini): Likewise.
16261         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16262         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16263         util/i386/pc/misc.c with commands/ieee1275/halt.c,
16264         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16265         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16266         function.
16267         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16268         Add prototype.
16269         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16270         prototype.
16271         (grub_halt): Likewise.
16272         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16273         (cmain): Remove __attribute__((unused)).
16274         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16275         (grub_heap_len): Likewise.
16276         (grub_machine_fini): New function.
16277         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16278         (grub_halt): Likewise.
16279         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16280         function.
16281         * util/powerpc/ieee1275/misc.c: New file.
16283 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
16285         * DISTLIST: New file.
16286         * gendistlist.sh: Likewise.
16288         * Makefile.in (COMMON_DISTFILES): Removed.
16289         (BOOT_DISTFILES): Likewise.
16290         (CONF_DISTFILES): Likewise.
16291         (DISK_DISTFILES): Likewise.
16292         (FS_DISTFILES): Likewise.
16293         (INCLUDE_DISTFILES): Likewise.
16294         (KERN_DISTFILES): Likewise.
16295         (LOADER_DISTFILES): Likewise.
16296         (TERM_DISTFILES): Likewise.
16297         (UTIL_DISTFILES): Likewise.
16298         (DISTFILES): Likewise.
16299         (uninstall): Uninstall files in $(pkgdata_DATA).
16300         (DISTLIST): New target.
16301         (distdir): Use the contents of the file DISTLIST to get a list of
16302         distributed files.
16304 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
16306         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16307         descriptor. This is ported from GRUB Legacy.
16309         * gencmdlist.sh: Added an extra semicolon to make it work with
16310         old sed versions. Reported by Robert Bihlmeyer
16311         <robbe@orcus.priv.at>.
16313 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
16315         Automatic loading of commands is supported.
16317         * normal/main.c (read_command_list): New function.
16318         (grub_normal_execute): Call read_command_list.
16320         * normal/command.c (grub_register_command): Return zero or CMD.
16321         Allocate CMD->NAME from the heap.
16322         Initialize CMD->MODULE_NAME to zero.
16323         Find the same name as well. If the same command is found and it is
16324         a dummy command, overwrite members. If it is not a dummy command,
16325         return zero.
16326         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16327         (grub_command_find): If a dummy command is found, load a module
16328         and retry to find a command only once.
16330         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16331         make sure that each command is loaded.
16333         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16334         macro.
16335         (struct grub_command): Remove const from the member `name'.
16336         Add a new member `module_name'.
16337         (grub_register_command): Return grub_command_t.
16339         * commands/help.c (grub_cmd_help): Call grub_command_find to make
16340         sure that each command is loaded.
16342         * genmk.rb (PModule::rule): Specify a module name without the
16343         suffix ".mod" to gencmdlist.sh.
16345 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16347         * gencmdlist.sh: New file.
16349         * genmk.rb (PModule::rule): Generate a rule for a command list.
16350         Clean command.lst.
16351         Generate command.lst from $(COMMANDFILES).
16353         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16354         (DATA): Added $(pkgdata_DATA).
16355         (install-local): Install files in $(pkgdata_DATA).
16357 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16359         * term/i386/pc/vga.c (debug_command): Removed.
16360         (GRUB_MOD_INIT): Do not register the command "debug".
16362         From Hollis Blanchard:
16363         * commands/configfile.c: New file.
16364         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16365         commands/configfile.c.
16366         (pkgdata_MODULES): Added configfile.mod.
16367         (configfile_mod_SOURCES): New variable.
16368         (configfile_mod_CFLAGS): Likewise.
16369         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16370         commands/configfile.c.
16371         (pkgdata_MODULES): Added configfile.mod.
16372         (configfile_mod_SOURCES): New variable.
16373         (configfile_mod_CFLAGS): Likewise.
16374         * util/grub-emu.c (main): Call grub_configfile_init and
16375         grub_configfile_fini.
16376         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16377         prototype.
16378         [GRUB_UTIL] (grub_configfile_fini): Likewise.
16380 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16382         * normal/arg.c (grub_arg_show_help): Do not show the bug report
16383         address.
16385         * commands/help.c (grub_cmd_help): Do not print newlines after
16386         the last command in print_command_help.
16388 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16390         * commands/default.h: New file.
16391         * commands/timeout.h: Likewise.
16392         * normal/context.c: Likewise.
16394         * util/misc.c: Do not include sys/times.h.
16395         Include sys/time.h and grub/machine/time.h.
16396         (grub_get_rtc): Rewritten with gettimeofday.
16398         * util/grub-emu.c (main): Call grub_default_init and
16399         grub_timeout_init before grub_normal_init, and call
16400         grub_timeout_fini and grub_default_fini after grub_main.
16402         * util/console.c (grub_ncurses_checkkey): Return the read
16403         character or -1.
16405         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16406         timeouts.
16408         * normal/main.c (read_config_file): Push MENU. If this fails,
16409         print an error and wait for a user input.
16410         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16411         If a menu is empty or an error occurs, pop MENU.
16412         (grub_normal_execute): Pop and free MENU after grub_menu_run
16413         returns.
16415         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16417         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16418         include time.h.
16419         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16420         without GRUB_UTIL.
16421         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16422         time.h.
16423         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16424         without GRUB_UTIL.
16426         * include/grub/normal.h (struct grub_menu_list): New struct.
16427         (grub_menu_list_t): New type.
16428         (struct grub_context): New struct.
16429         (grub_context_t): New type.
16430         (grub_register_command): Got rid of EXPORT_FUNC.
16431         (grub_unregister_command): Likewise.
16432         (grub_context_get): New prototype.
16433         (grub_context_get_current_menu): Likewise.
16434         (grub_context_push_menu): Likewise.
16435         (grub_context_pop_menu): Likewise.
16436         [GRUB_UTIL] (grub_default_init): Likewise.
16437         [GRUB_UTIL] (grub_default_fini): Likewise.
16438         [GRUB_UTIL] (grub_timeout_init): Likewise.
16439         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16441         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16442         commands/timeout.c and normal/context.c.
16443         (pkgdata_MODULES): Added default.mod and timeout.mod.
16444         (normal_mod_SOURCES): Added normal/context.c.
16445         (default_mod_SOURCES): New variable.
16446         (default_mod_CFLAGS): Likewise.
16447         (timeout_mod_SOURCES): Likewise.
16448         (timeout_mod_CFLAGS): Likewise.
16449         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16450         conf/i386-pc.rmk.
16451         (pkgdata_MODULES): Added default.mod and timeout.mod.
16452         (normal_mod_SOURCES): Added normal/context.c.
16453         (default_mod_SOURCES): New variable.
16454         (default_mod_CFLAGS): Likewise.
16455         (timeout_mod_SOURCES): Likewise.
16456         (timeout_mod_CFLAGS): Likewise.
16458         * Makefile.in (all-local): Added $(MKFILES).
16460 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16462         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16463         (grub_emu_SOURCES): Likewise.
16464         (pkgdata_MODULES): Add `sun.mod'.
16465         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16466         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16467         `partmap/sun.c'.
16468         (pkgdata_MODULES): Add `sun.mod'.
16469         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16470         * include/grub/partition.h (grub_sun_partition_map_init): New
16471         prototype.
16472         (grub_sun_partition_map_fini): Likewise.
16473         * partmap/sun.c: New file.
16474         * util/grub-emu.c (main): Initialize and de-initialize the sun
16475         partitionmap support.
16477 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16479         This implements an Emacs-like menu entry editor.
16481         * normal/menu_entry.c: New file.
16483         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16484         characters to ASCII.
16485         (saved_char): New variable.
16486         (grub_ncurses_checkkey): Rewritten completely.
16487         (grub_ncurses_getkey): Likewise.
16488         (grub_ncurses_init): Call raw instead of cbreak.
16490         * normal/menu.c (print_entry): Do not put a space.
16491         (init_page): Renamed to ...
16492         (grub_menu_init_page): ... this. All callers changed.
16493         (edit_menu_entry): Removed.
16494         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16496         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16498         * kern/misc.c (grub_vprintf): Call grub_refresh.
16500         * normal/menu.c (DISP_LEFT): Renamed to ...
16501         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16502         * normal/menu.c (DISP_UP): Renamed to ...
16503         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16504         * normal/menu.c (DISP_RIGHT): Renamed to ...
16505         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16506         * normal/menu.c (DISP_DOWN): Renamed to ...
16507         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16508         * normal/menu.c (DISP_HLINE): Renamed to ...
16509         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16510         * normal/menu.c (DISP_VLINE): Renamed to ...
16511         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16512         * normal/menu.c (DISP_UL): Renamed to ...
16513         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16514         * normal/menu.c (DISP_UR): Renamed to ...
16515         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16516         * normal/menu.c (DISP_LL): Renamed to ...
16517         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16518         * normal/menu.c (DISP_LR): Renamed to ...
16519         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16520         * normal/menu.c (TERM_WIDTH): Renamed to ...
16521         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16522         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16523         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16524         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16525         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16526         * normal/menu.c (TERM_MARGIN): Renamed to ...
16527         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16528         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16529         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16530         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16531         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16532         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16533         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16534         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16535         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16536         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16537         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16538         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16539         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16540         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16541         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16542         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16543         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16544         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16545         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16546         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16547         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16548         All callers changed.
16550         * include/grub/normal.h: New prototype.
16552         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16553         normal/menu_entry.c.
16554         (normal_mod_SOURCES): Likewise.
16555         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16556         (normal_mod_SOURCES): Likewise.
16558 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16560         * include/grub/normal.h (grub_halt_init): New prototype.
16561         (grub_halt_fini): Likewise.
16562         (grub_reboot_init): Likewise.
16563         (grub_reboot_fini): Likewise.
16565         * util/grub-emu.c: Include signal.h.
16566         (main_env): New global variable.
16567         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16568         catch C-c.
16569         (grub_machine_fini): New function.
16570         (main): Call grub_halt_init and grub_reboot_init before
16571         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16572         Call setjmp with MAIN_ENV to go back afterwards.
16573         Call grub_machine_fini right before return.
16575         * include/grub/util/misc.h: Include setjmp.h.
16576         (main_env): New prototype.
16578         * include/grub/kernel.h (grub_machine_fini): New prototype.
16579         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16580         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16582         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16583         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16584         * term/i386/pc/console.c (grub_console_fini): Likewise.
16586         * util/i386/pc/misc.c: New file.
16588         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16589         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16590         commands/i386/pc/reboot.c.
16592 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16594         * include/grub/dl.h (grub_dl_check_header): New prototype.
16595         (grub_arch_dl_check_header): Change return type to grub_err_t,
16596         remove size parameter and export function.  Update all callers.
16597         * kern/dl.c (grub_dl_check_header): New function.
16598         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16599         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16600         are inside the core.
16601         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16602         independent ELF header checks.
16603         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16604         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16605         `grub_dl_check_header' instead of explicit checks.  Check for the
16606         ELF type.
16607         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16608         `grub_dl_check_header' instead of explicit checks.  Remove arch
16609         specific ELF header checks.
16611         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16612         argument SIZE.
16614 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16616         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16617         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16619 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16621         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16622         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16623         (part_map_iterate): Clear `grub_errno' and return 0 if
16624         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16625         * partmap/amiga.c (amiga_partition_map_iterate): Return
16626         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16627         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16629 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16631         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16632         help info.
16634 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16636         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16637         Removed prototype.
16638         (grub_rescue_cmd_linux): New prototype.
16639         (grub_rescue_cmd_initrd): Likewise.
16640         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16641         `bi_rec'.
16642         (grub_linux_release_mem): Release the memory for the initrd.
16643         (grub_load_linux): Renamed from this...
16644         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16645         Changed `entry' not to be static.  Loop over memory regions to
16646         find another one when the default fails.
16647         (grub_rescue_cmd_initrd): New function.
16648         (grub_linux_init): Remove function.
16649         (grub_linux_fini): Likewise.
16650         (GRUB_MOD_INIT): Register `initrd'.
16651         (GRUB_MOD_FINI): Unregister `initrd'.
16652         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16653         Function removed.
16654         (grub_linux_normal_fini): Likewise.
16655         (GRUB_MOD_INIT): Register `initrd'.
16656         (GRUB_MOD_FINI): Unregister `initrd'.
16658 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16660         * commands/help.c: New file.
16661         * normal/arg.c (show_help): Renamed to...
16662         (grub_arg_show_help): ... this.
16663         * commands/i386/pc/halt.c: New file.
16664         * commands/i386/pc/reboot.c: Likewise.
16665         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16666         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16667         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16668         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16669         variables.
16670         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16671         `commands/help.c'.
16672         (pkgdata_MODULES): Add `help.mod'.
16673         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16674         * grub/i386/pc/init.h (grub_reboot): New prototype.
16675         (grub_halt): Likewise.
16676         * include/grub/normal.h (grub_arg_show_help): New prototype.
16677         (grub_help_init): Likewise.
16678         (grub_help_fini): Likewise.
16679         * util/grub-emu.c (main): Initialize and deinitialize the help
16680         command.
16682         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16684         * normal/command.c (grub_command_init): Fixed the description of
16685         the `set' and `unset' commands.
16687 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16689         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16690         function.
16691         * commands/ieee1275/halt.c: New file.
16692         * commands/ieee1275/reboot.c: Likewise.
16693         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16694         `__attribute__ ((unused))'.  Some GCS related fixed.
16695         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16696         (grub_suspend_fini): Likewise.
16697         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16698         and `halt.mod'.
16699         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16700         (halt_mod_CFLAGS): New variables.
16701         * include/grub/powerpc/ieee1275/ieee1275.h
16702         (grub_ieee1275_interpret): New prototype.
16704 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16706         * include/grub/misc.h (memmove): New prototype.
16707         (memcpy): Likewise.
16709 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16711         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16712         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16714 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16716         * kern/misc.c (grub_strndup): Function rewritten.
16718 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16720         * normal/menu.c (TERM_WIDTH): Macro redefined.
16721         (TERM_TOP_BORDER_Y): Likewise.
16722         (draw_border): Replaced while-loop by a for-loop.  Make the number
16723         of lines consistent with the number of lines displayed in
16724         print_entries.  Added a margin below the rectangle.
16725         (print_entry): Make the entry fit in the rectangle.
16726         (print_entries): Display the scroll arrows next to the right
16727         border.
16729 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16731         * fs/minix.c (grub_minix_find_file): Reserve more space for
16732         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16733         `grub_strncpy' to copy `path' into it.
16735 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16737         Add the loopback device, a device via which files can be accessed
16738         as devices.
16740         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16741         (pkgdata_MODULES): Add loopback.mod.
16742         (loopback_mod_SOURCES): New variable.
16743         (loopback_mod_CFLAGS): Likewise.
16744         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16745         `disk/loopback.c'.
16746         (pkgdata_MODULES): Add loopback.mod.
16747         (loopback_mod_SOURCES): New variable.
16748         (loopback_mod_CFLAGS): Likewise.
16749         * disk/loopback.c: new file.
16750         * include/grub/normal.h (grub_loop_init): New prototype.
16751         (grub_loop_fini): New prototype.
16752         * util/grub-emu.c (main): Initialize and de-initialize loopback
16753         support.
16754         * include/grub/disk.h (grub_disk_dev_id): Add
16755         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16757 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16759         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16760         function.
16761         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16762         (suspend_mod_SOURCES): New variable.
16763         (suspend_mod_CFLAGS): Likewise.
16764         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16765         New prototype.
16766         * commands/ieee1275/suspend.c: New file.
16768 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16770         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16771         ((unused))' to `__attribute__ ((used))'.
16772         (GRUB_MOD_FINI): Likewise.
16773         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16774         * genmk.rb (PModule): Assign space to common symbols when linking
16775         modules.
16777 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16779         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16780         `unsigned' arguments to `grub_size_t'.
16781         (grub_malloc): Likewise.
16782         (grub_realloc): Likewise.
16783         (grub_memalign): Likewise.
16784         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16785         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16786         * util/misc.c (grub_malloc): Likewise.
16787         (grub_realloc): Likewise.
16788         * kern/mm.c (get_header_from_pointer): Change the casts to
16789         `unsigned' into a cast to `grub_size_t'.
16791         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16792         point to `currnode' when `currnode' is changed.
16794         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16795         Schottelius <nico-linux@schottelius.org>.
16797 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16799         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16800         (note_path): Remove variable.
16801         (GRUB_IEEE1275_NOTE_NAME): New macro.
16802         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16803         (grub_ieee1275_note_hdr): New structure.
16804         (grub_ieee1275_note_desc): Likewise.
16805         (grub_ieee1275_note): Likewise.
16806         (load_note): Remove `dir' argument.  All callers updated.  Remove
16807         `note_img' and `path'.  Do not load a file from `note_path'.
16808         Initialize a struct grub_ieee1275_note and write that to `out'.
16809         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16811 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16813         * util/misc.c (grub_util_read_image): Revert last change.  It
16814         called `grub_util_read_at', which seeks from the beginning of the
16815         file.
16817 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16819         * TODO: Add note about endianness in grub-mkimage.
16820         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16821         section.
16822         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16823         (grub_mkimage_SOURCES): New target.
16824         * include/grub/kernel.h (grub_start_addr): Remove variable.
16825         (grub_end_addr): Likewise.
16826         (grub_total_module_size): Likewise.
16827         (grub_kernel_image_size): Likewise.
16828         (GRUB_MODULE_MAGIC): New constant.
16829         (grub_module_info): New structure.
16830         (grub_arch_modules_addr): New prototype.
16831         (grub_get_end_addr): Remove prototype.
16832         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16833         * include/grub/powerpc/ieee1275/kernel.h: New file.
16834         * include/grub/util/misc.h (grub_util_get_fp_size): New
16835         prototype.
16836         (grub_util_read_at): Likewise.
16837         (grub_util_write_image_at): Likewise.
16838         * kern/main.c (grub_get_end_addr): Remove function.
16839         (grub_load_modules): Call grub_arch_modules_addr instead of using
16840         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16841         the grub_module_info fields instead of calling grub_get_end_addr
16842         as loop conditions.  Move grub_add_unused_region code here.
16843         (grub_add_unused_region): Remove function.
16844         * kern/i386/pc/init.c: Include grub/cache.h.
16845         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16846         one call to add_mem_region.
16847         (grub_arch_modules_addr): New function.
16848         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16849         (grub_total_module_size): Likewise.
16850         Include grub/machine/kernel.h.
16851         (grub_arch_modules_addr): New function.
16852         * util/grub-emu.c (grub_end_addr): Remove variable.
16853         (grub_total_module_size): Likewise.
16854         (grub_arch_modules_addr): New function.
16855         * util/misc.c: Include unistd.h.
16856         (grub_util_get_fp_size): New function.
16857         (grub_util_read_at): Likewise.
16858         (grub_util_write_image_at): Likewise.
16859         (grub_util_read_image): Call grub_util_read_at.
16860         (grub_util_write_image): Call grub_util_write_image_at.
16861         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16862         additional memory in kernel_img for a struct grub_module_info.
16863         Fill in that grub_module_info.
16864         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16866 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16868         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16869         New function.
16870         * include/grub/powerpc/ieee1275/ieee1275.h
16871         (grub_ieee1275_milliseconds): New prototype.
16872         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16873         Change to 1000.
16874         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16875         grub_ieee1275_milliseconds.
16877 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16879         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16880         variable.
16881         (find_options): New function.
16882         (cmain): Call find_options.
16883         * include/grub/powerpc/ieee1275/ieee1275.h
16884         (grub_ieee1275_realmode): New extern variable.
16885         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16886         grub_map if grub_ieee1275_realmode is false.
16888 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16890         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16891         lines are inserted and make it work like readline.  Reported by
16892         Vincent Pelletier <subdino2004@yahoo.fr>.
16894 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16896         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16898         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16899         `kern/powerpc/cache.S'.
16901 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16903         * genmk.rb: Handle the `Program' class in the main loop.  Written
16904         by Johan Rydberg <jrydberg@gnu.org>.
16905         (Program): New class.
16906         (programs): New variable.
16907         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16908         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16909         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16910         (help_arch): Function removed.
16911         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16912         `powerpc/libgcc.h' and `loader.h'.
16913         (pkgdata_PROGRAMS): New variable.
16914         (sbin_UTILITIES): Variable removed.
16915         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16916         (grubof_SOURCES): Variable re-defined so it only includes the
16917         core functionality.
16918         (grubof_CFLAGS): Remove `-DGRUBOF'.
16919         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16920         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16921         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16922         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16923         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16924         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16925         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16926         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16927         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16928         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16929         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16930         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16931         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16932         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16933         (pc_mod_CFLAGS): New variables.
16934         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16935         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16936         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16937         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16938         Moved from here...
16939         * include/grub/i386/pc/init.h (grub_os_area_addr)
16940         (rub_os_area_size): ... to here.
16941         * include/grub/powerpc/ieee1275/ieee1275.h
16942         (grub_ieee1275_entry_fn): Export symbol.
16943         * include/grub/powerpc/ieee1275/init.h: New file.
16944         * include/grub/powerpc/libgcc.h: Likewise.
16945         * include/grub/cache.h: Likewise.
16946         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16947         <hollis@penguinppc.org>.
16948         * kern/dl.c: Include <grub/cache.h>.
16949         (grub_dl_flush_cache): New function.
16950         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16951         for this module.
16952         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16953         (grub_console_init): Removed prototypes.
16954         (grub_machine_init): Don't initialize the modules anymore.
16955         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16956         static.
16957         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16958         Macro undef removed.
16959         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16960         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16961         relocation `R_PPC_REL32'.  Return an error when the relocation is
16962         unknown.
16963         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16964         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16965         * util/misc.c (grub_arch_sync_caches): Likewise.
16967 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16969         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16970         `symlist.c', add `grubof_symlist.c'.
16971         (symlist.c): Variable removed.
16972         (grubof_HEADERS): Variable added.
16973         (grubof_symlist.c): New target.
16974         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16975         `kernel_img_HEADERS'.
16976         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16977         * kern/powerpc/dl.c: New file.
16978         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16979         Function removed.
16980         (grub_arch_dl_relocate_symbols): Likewise.
16981         (grub_register_exported_symbols): Likewise.
16983 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16985         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16986         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16987         to fail instead.  Reported by Vincent Pelletier
16988         <subdino2004@yahoo.fr>.
16990         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16991         it is not allocated.  Reported by Vincent Pelletier
16992         <subdino2004@yahoo.fr>.
16994         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16995         output so the output looks better.
16997 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16999         Modulize the partition map support and add support for the amiga
17000         partition map.
17002         * commands/ls.c: Include <grub/partition.h> instead of
17003         <grub/machine/partition.h>.
17004         * kern/disk.c: Likewise.
17005         * kern/rescue.c: Likewise.
17006         * loader/i386/pc/chainloader.c: Likewise.
17007         * normal/cmdline.c: Likewise.
17008         * kern/powerpc/ieee1275/init.c: Likewise.
17009         (grub_machine_init): Call `grub_pc_partition_map_init',
17010         `grub_amiga_partition_map_init' and
17011         `grub_apple_partition_map_init'.
17012         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
17013         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
17014         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
17015         `partition.h' and `pc_partition.h'.
17016         (grub_setup_SOURCES): Remove
17017         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
17018         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17019         (grub_emu_SOURCES): Likewise.
17020         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
17021         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
17022         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
17023         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17024         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
17025         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17026         (grubof_SOURCES): Likewise.
17027         * disk/i386/pc/partition.c: File removed.
17028         * disk/powerpc/ieee1275/partition.c: Likewise.
17029         * include/grub/powerpc/ieee1275/partition.h: Likewise.
17030         * include/grub/i386/pc/partition.h: Likewise.
17031         * kern/partition.c: New file.
17032         * partmap/amiga.c: Likewise.
17033         * partmap/apple.c: Likewise.
17034         * partmap/pc.c: Likewise.
17035         * include/grub/partition.h: Likewise..
17036         * include/grub/pc_partition.h: Likewise.
17037         * util/grub-emu.c: Include <grub/partition.h> instead of
17038         <grub/machine/partition.h>.
17039         (main): Call `grub_pc_partition_map_init',
17040         `grub_amiga_partition_map_init' and
17041         `grub_apple_partition_map_init' and deinitialize afterwards.
17042         * util/i386/pc/biosdisk.c: Include `#include
17043         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17044         `<grub/machine/partition.h>'.
17045         * util/i386/pc/grub-setup.c: Likewise.
17046         * util/i386/pc/biosdisk.c: Likewise.
17047         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17048         partition information in case of a PC partition.
17049         * util/i386/pc/grub-setup.c: Include `#include
17050         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17051         `<grub/machine/partition.h>'.
17052         (setup): Only access the PC specific partition information in case
17053         of a PC partition.
17055 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
17057         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17058         (grub_longjmp): Likewise.
17059         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17060         20.
17061         * normal/powerpc/setjmp.S: New file.
17062         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17063         `normal/powerpc/setjmp.S'.
17064         (grubof_CFLAGS): Add `-DGRUBOF'.
17065         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17066         [GRUB_UTIL && !GRUBOF].
17068 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
17070         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17071         property named `name'.  Correctly handle the error returned by
17072         `grub_ieee1275_finddevice' if a device can not be opened.
17074 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
17076         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17077         `actual' for negativity.
17078         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17079         kern/fshelp.c.
17081 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
17083         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17084         (PAGE_OFFSET): New macro.
17085         (CRTC_ADDR_PORT): Likewise.
17086         (CRTC_DATA_PORT): Likewise.
17087         (START_ADDR_HIGH_REGISTER): Likewise.
17088         (START_ADDR_LOW_REGISTER): Likewise.
17089         (GRAPHICS_ADDR_PORT): Likewise.
17090         (GRAPHICS_DATA_PORT): Likewise.
17091         (READ_MAP_REGISTER): Likewise.
17092         (INPUT_STATUS1_REGISTER): Likewise.
17093         (INPUT_STATUS1_VERTR_BIT): Likewise.
17094         (page): New variable.
17095         (wait_vretrace): New function.
17096         (set_read_map): Likewise.
17097         (set_start_address): Likewise.
17098         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
17099         the right page.
17100         (check_vga_mem): Take the page into account.
17101         (write_char): Likewise.
17102         (write_cursor): Likewise.
17103         (scroll_up): Likewise.  Copy the page to the page that is not
17104         shown and switch between both pages.
17105         (grub_vga_putchar): Fix off by one error.
17106         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
17107         account.
17109 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
17111         Add support for iso9660 (including rockridge).
17113         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17114         (iso9660_mod_SOURCES): New variable.
17115         (iso9660_mod_CFLAGS): Likewise.
17116         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17117         * include/grub/fs.h (grub_iso9660_init): New prototype.
17118         * util/grub-emu.c (main): Call `grub_iso9660_init'.
17119         * fs/iso9660.c: New file.
17121         * include/grub/misc.h (grub_strncat): New prototype.
17122         * kern/misc.c (grub_strncat): New function.
17124         * fs/hfs.c (grub_hfs_mount): Translate the error
17125         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17126         * fs/jfs.c (grub_jfs_mount): Likewise.
17127         * fs/ufs.c (grub_ufs_mount): Likewise.
17129 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
17131         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17132         which initialized BAT registers.
17133         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17134         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17135         Move from here...
17136         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17137         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17138         ... to here.
17139         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17140         (grub_mapclaim): Likewise.
17141         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17142         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
17143         hand.
17145 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
17147         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17148         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17149         -ffreestanding and -msoft-float.
17151 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
17153         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17154         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17155         set in grub_ieee1275_flags.
17157 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
17159         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17160         prototype.
17161         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17162         grub_console_init first.
17163         Change the memory range used for grub_ieee1275_claim and
17164         grub_mm_init_region.
17165         Print an error message if the claim fails.
17166         Include <grub/misc.h>.
17168 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
17170         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17171         Call grub_children_iterate for device nodes of type `scsi',
17172         `ide', or `ata'.
17173         (grub_ofdisk_open): Remove manual device alias resolution.
17174         Fix memory leak when device cannot be opened.
17175         * include/grub/powerpc/ieee1275/ieee1275.h
17176         (grub_children_iterate): New prototype.
17177         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17178         New function.
17179         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17180         Return -1 if args.size was -1.
17182 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
17184         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17185         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17186         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17187         Open Firmware's memory for it; claim memory from _start to _end.
17188         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17189         (_end): New extern.
17190         (_start): Zero BSS from __bss_start to _end.
17191         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17192         New extern.
17193         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17195 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
17197         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17198         -1 if args.base was -1.
17200 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
17202         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17203         escape sequence instead of a literal ^L. Also call
17204         grub_ofconsole_gotoxy.
17206 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
17208         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17209         void *  arguments to grub_addr_t.  All callers updated.  Also make
17210         the `result' argument optional.
17211         (grub_ieee1275_release): change void * arguments to grub_addr_t.
17212         All callers updated.
17214 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
17216         * commands/ls.c (grub_ls_list_files): Use the string following the
17217         initial ')', if present, as the filesystem path.
17218         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17220         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17222 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
17224         Make the source code of the menu interface more readable.
17226         * normal/menu.c: Include grub/mm.h.
17227         (TERM_WIDTH): New macro.
17228         (TERM_HEIGHT): Likewise.
17229         (TERM_INFO_HEIGHT): Likewise.
17230         (TERM_MARGIN): Likewise.
17231         (TERM_SCROLL_WIDTH): Likewise.
17232         (TERM_TOP_BORDER_Y): Likewise.
17233         (TERM_LEFT_BORDER_X): Likewise.
17234         (TERM_BORDER_WIDTH): Likewise.
17235         (TERM_MESSAGE_HEIGHT): Likewise.
17236         (TERM_BORDER_HEIGHT): Likewise.
17237         (TERM_NUM_ENTRIES): Likewise.
17238         (TERM_FIRST_ENTRY_Y): Likewise.
17239         (TERM_ENTRY_WIDTH): Likewise.
17240         (TERM_CURSOR_X): Likewise.
17241         (draw_border): Use macros instead of magic numbers.
17242         (print_entry): Likewise.
17243         (print_entries): Likewise.
17244         (run_menu): Likewise. Also, handle the key 'e'.
17245         (run_menu_entry): Ignore empty command lines.
17246         (print_message): Added a new argument EDIT. If EDIT is true,
17247         print a different message.
17248         (init_page): Likewise.
17249         (edit_menu_entry): New function. Not implemented yet.
17251 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
17253         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17254         can be loaded from normal mode.
17256         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17257         `multiboot.mod'.
17258         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17259         (multiboot_mod_CFLAGS): New variables.
17260         * loader/i386/pc/linux_normal.c: New file.
17261         * loader/i386/pc/multiboot_normal.c: Likewise.
17263         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17264         attribute `unused'.
17266         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
17267         `fdiro' to read the mode information from instead of `diro'.
17269         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17270         looking up a symlink.
17272         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17273         macro.
17274         * normal/command.c (grub_command_execute): Don't parse the
17275         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17276         flags of the command.
17278         * normal/menu.c (grub_menu_run): Fix typo.
17280 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
17282         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17284         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17285         `y + 1' instead of `y - 1'.
17287         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17289 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
17291         From Hollis Blanchard <hollis@penguinppc.org>:
17292         * kern/misc.c (memmove): New alias for grub_memmove.
17293         (memcmp): New alias for grub_memcmp.
17294         (memset): New alias for grub_memset.
17295         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17296         Change "int handle" to "grub_ieee1275_phandle_t handle".
17297         * include/grub/powerpc/ieee1275/ieee1275.h
17298         (grub_ieee1275_get_property): Likewise.
17300 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
17302         Added normal mode command `chainloader' as module chain.mod, which
17303         depends on normal.mod and _chain.mod.
17305         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17306         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17307         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17308         Deleted prototype.
17309         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17310         but arguments parsing moved to ...
17311         (grub_chainloader_cmd): ... here.  New function.
17312         * include/grub/i386/pc/chainloader.h: New file.
17313         * loader/i386/pc/chainloader_normal.c: Likewise.
17315 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
17317         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17318         (grub_mkimage_LDFLAGS): Likewise.
17319         (grub_emu_SOURCES): Likewise.
17320         (kernel_img_HEADERS): Added fshelp.h.
17321         * fs/ext2.c: Include <grub/fshelp.h>.
17322         (FILETYPE_REG): New macro.
17323         (FILETYPE_INO_REG): Likewise.
17324         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17325         Changed all users.
17326         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
17327         all users.
17328         (grub_fshelp_node): New struct.
17329         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
17330         to a pointer.
17331         (grub_ext2_get_file_block): Removed function.
17332         (grub_ext2_read_block): New function.
17333         (grub_ext2_read_file): Replaced parameter `data' by `node'.
17334         This function was written.
17335         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
17336         (grub_ext2_find_file): Removed function.
17337         (grub_ext2_read_symlink): New function.
17338         (grub_ext2_iterate_dir): Likewise.
17339         (grub_ext2_open): Rewritten.
17340         (grub_ext2_dir): Rewritten.
17341         * include/grub/fshelp.h: New file.
17342         * fs/fshelp.c: Likewise.
17344 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
17346         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17347         (print_message): Add a missing newline.
17348         (run_menu): Added timeout support.
17349         (run_menu_entry): New local function.
17350         (grub_menu_run): Added support for booting.
17352         * kern/loader.c (grub_loader_is_loaded): New function.
17354         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17355         (grub_get_rtc): Exported.
17357         * include/grub/i386/pc/time.h: Include grub/symbol.h.
17358         (grub_get_rtc): Exported.
17360         * include/grub/normal.h (struct grub_command_list): Remove
17361         constant from the member `command'.
17363         * include/grub/loader.h (grub_loader_is_loaded): Declared.
17365         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17367         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17369 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
17371         Add support for the JFS filesystem.
17373         * fs/jfs.c: New file.
17374         * include/grub/fs.h (grub_jfs_init): New prototype.
17375         (grub_jfs_fini): New prototype.
17376         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17377         (grub_emu_SOURCES): Likewise.
17378         (pkgdata_MODULES): Add jfs.mod.
17379         (jfs_mod_SOURCES): New variable.
17380         (jfs_mod_CFLAGS): Likewise.
17381         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17382         (grubof_SOURCES): Likewise.
17383         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17385         * fs/fat.c (grub_fat_find_dir): Convert the filename little
17386         endian to the host endian.
17387         (grub_fat_utf16_to_utf8): Move function from there...
17388         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
17389         the endianness of the source string anymore.
17390         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17392 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
17394         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17395         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17396         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17397         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17399         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17400         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17401         for `node_found' and `it_dir'.
17402         (grub_hfs_dir): Add prototype for `dir_hook'.
17404         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17405         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17406         and `indir32' to silence a gcc warning.
17408         * include/grub/fs.h (grub_hfs_init): New prototype.
17409         (grub_hfs_fini): Likewise.
17412 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17414         Each disk device has its own id now. This is useful to make use
17415         of multiple disk devices.
17417         * include/grub/disk.h (grub_disk_dev_id): New enum.
17418         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17419         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17421         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17422         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17424         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17425         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17427         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17428         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17430         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17431         "id" which is used by the cache manager.
17433         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17434         of just "GRUB".
17436 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17438         * fs/hfs.c: New file.
17439         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17440         (grub_emu_SOURCES): Likewise.
17441         (pkgdata_MODULES): Add hfs.mod.
17442         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17443         (grubof_SOURCES): Likewise.
17444         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17446         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17447         * kern/misc.c (grub_strncasecmp): Add function.
17449 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17451         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17452         with parentheses.
17454         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17455         (grub_ext2_dir): In case the directory entry type is unknown, read
17456         it from the inode.
17458 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17460         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17461         grub_load_linux instead of grub_rescue_cmd_linux as second
17462         argument of grub_rescue_register_command.
17464         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17466 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17468         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17469         function.
17470         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17471         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17472         `loader/powerpc/ieee1275/linux.c',
17473         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17474         * include/grub/powerpc/ieee1275/ieee1275.h
17475         (grub_ieee1275_release): New prototype.
17476         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17477         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17478         normal, boot, linux and linux_normal.
17479         * loader/powerpc/ieee1275/linux.c: New file.
17480         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17482 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17484         * normal/arg.c (grub_arg_parse): Correct error handling after
17485         reallocating the argumentlist (check if `argl' is not null instead
17486         of checking if `args' is not null).
17487         * kern/mm.c (grub_realloc): Return the same pointer when using the
17488         same region, instead of returning the header address.
17490 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17492         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17493         one block instead of two when looking for the initial partition.
17494         (grub_partition_probe): Initialize the local variable `p' with 0.
17495         Use base 10 for the grub_strtoul call.
17496         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17497         need for one local variable.
17498         (grub_strtoul): Don't add the new value to `num', instead of that
17499         just assign it.
17501 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17503         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17504         (pxeboot_img_SOURCES): New variable.
17505         (pxeboot_img_ASFLAGS): Likewise.
17506         (pxeboot_img_LDFLAGS): Likewise.
17507         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17508         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17509         <lode_leroy@hotmail.com>.
17511 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17513         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17514         there was no input.
17516 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17518         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17519         the history buffer logic.
17521 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17523         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17524         (FILETYPE_INO_SYMLINK): New macros.
17525         (grub_ext2_find_file): Check if the node is a directory using the
17526         inode stat information instead of using the filetype in the
17527         dirent.  Exclude the first character of an absolute symlink.
17528         (grub_ext2_dir): Mask out the filetype part of the mode member of
17529         the inode.
17531 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17533         Add support for UFS version 1 and 2.  Add support for the minix
17534         filesystem version 1 and 2, both the variants with 14 and 30 long
17535         filenames.
17537         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17538         fs/minix.c.
17539         (grub_emu_SOURCES): Likewise.
17540         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17541         (ufs_mod_SOURCES): New variable.
17542         (ufs_mod_CFLAGS): Likewise.
17543         (minix_mod_SOURCES): Likewise.
17544         (minix_mod_CFLAGS): Likewise.
17545         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17546         fs/minix.c.
17547         (grubof_SOURCES): Likewise.
17548         * fs/ufs.c: New file.
17549         * fs/minix.c: New file.
17550         * include/grub/fs.h (grub_ufs_init): New prototype.
17551         (grub_ufs_fini): Likewise.
17552         (grub_minix_init): Likewise.
17553         (grub_minix_fini): Likewise.
17554         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17555         minix fs.
17557 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17559         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17560         commands/ls.c, commands/terminal.c, commands/boot.c,
17561         commands/cmp.c and commands/cat.c.
17562         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17564         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17565         "env.h"
17567 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17569         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17570         and grub_, respectively. Because the conversion is trivial and
17571         mechanical, I omit the details here. Please refer to the CVS
17572         if you need more information.
17574 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17576         * include/pupa: Renamed to ...
17577         * include/grub: ... this.
17578         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17579         * util/i386/pc/grub-mkimage.c: ... this.
17580         * util/i386/pc/pupa-setup.c: Renamed to ...
17581         * util/i386/pc/grub-setup.c: ... this.
17582         * util/pupa-emu.c: Renamed to ...
17583         * util/grub-emu.c: ... this.
17585 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17587         Add support for the newworld apple macintosh (PPC).  This has been
17588         tested on the powerbook 2000 only.  It only adds support for
17589         generic ieee1275 functions, console and disk support.  This should
17590         be easy to port to other architectures with support for Open
17591         Firmware.
17593         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17594         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17595         specific tests are only executed while building for the i386.
17596         Inverse test for crosscompile.
17597         * genmk.rb (Utility): Allow assembler files.
17598         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17599         * conf/powerpc-ieee1275.rmk: New file.
17600         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17601         * disk/powerpc/ieee1275/partition.c: Likewise.
17602         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17603         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17604         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17605         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17606         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17607         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17608         * include/pupa/powerpc/ieee1275/loader.h
17609         * include/pupa/powerpc/setjmp.h: Likewise.
17610         * include/pupa/powerpc/types.h: Likewise.
17611         * kern/powerpc/ieee1275/init.c: Likewise.
17612         * kern/powerpc/ieee1275/openfw.c: Likewise.
17613         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17615         These files were written by Johan Rydberg
17616         (jrydberg@night.trouble.net) and I only modified them slightly.
17618         * boot/powerpc/ieee1275/cmain.c: New file.
17619         * boot/powerpc/ieee1275/crt0.S: Likewise.
17620         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17621         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17623 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17625         * Makefile.in: Update copyright.
17626         * genmodsrc.sh: Likewise.
17627         * gensymlist.sh: Likewise.
17628         * term/i386/pc/vga.c: Indent correctly.
17630         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17631         bugreporting address.
17632         * util/i386/pc/pupa-setup.c (usage): Likewise,
17633         (main): Call pupa_ext2_init and pupa_ext2_fini.
17635         * fs/fat.c (log2): Renamed to ...
17636         (fat_log2): ... this.
17637         All callers changed.
17638         * kern/misc.c (memcpy): Alias to pupa_memmove.
17639         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17640         lvalue cast.
17641         * util/console.c (pupa_ncurses_fini): Return 0.
17643         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17644         Move fail label here.
17645         [__GNU__]: Don't warn when using stat.
17646         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17647         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17648         long int. Use strtol instead of strtoul.
17650 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17652         * commands/boot.c: New file.
17653         * commands/cat.c: Likewise.
17654         * commands/cmp.c: Likewise.
17655         * commands/ls.c: Likewise.
17656         * commands/terminal.c: Likewise.
17657         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17658         (pupa_register_command): Changed interface to match the new
17659         argument parser.
17660         (pupa_command_execute): Changed (almost rewritten) so it uses
17661         pupa_split_command.  Added support for setting variables using the
17662         syntax `foo=bar'.
17663         (rescue_command): Changed to work with the new argument parser.
17664         (terminal_command): Moved from here to commands/terminal.c.
17665         (set_command): New function.
17666         (unset_command): New function.
17667         (insmod_command): New function.
17668         (rmmod_command): New function.
17669         (lsmod_command): New function.
17670         (pupa_command_init): Don't initialize the command terminal
17671         anymore.  Initialize the commands set, unset, insmod, rmmod and
17672         lsmod.
17673         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17674         (kernel_img_HEADERS): Add arg.h and env.h.
17675         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17676         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17677         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17678         normal/arg.c.
17679         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17680         terminal.mod.
17681         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17682         (boot_mod_SOURCES): New variable.
17683         (terminal_mod_SOURCES): Likewise.
17684         (ls_mod_SOURCES): Likewise.
17685         (cmp_mod_SOURCES): Likewise.
17686         (cat_mod_SOURCES): Likewise.
17688         * normal/arg.c: New file.
17689         * kern/env.c: Likewise.
17690         * include/pupa/arg.h: Likewise.
17691         * include/pupa/env.h: Likewise.
17692         * font/manager.c (font_command): Changed to match argument parsing
17693         interface changes.
17694         (PUPA_MOD_INIT): Likewise.
17695         * hello/hello.c (pupa_cmd_hello): Likewise.
17696         (PUPA_MOD_INIT): Likewise.
17697         * include/pupa/disk.h: Include <pupa/device.h>.
17698         (pupa_print_partinfo): New prototype.
17699         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17700         (pupa_dl_get_prefix): Likewise.
17701         * include/pupa/misc.h: Include <pupa/err.h>.
17702         (pupa_isgraph): New prototype.
17703         (pupa_isdigit): Likewise.
17704         (pupa_split_cmdline): Likewise.
17705         * include/pupa/normal.h: Include <pupa/arg.h>.
17706         (pupa_command): Changed the prototype of the member `func' to
17707         match the argument parsing interface.  Added member `options'.
17708         (pupa_register_command): Updated to match function.
17709         (pupa_arg_parse): New prototype.
17710         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17711         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17712         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17713         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17714         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17715         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17716         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17717         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17718         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17719         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17720         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17721         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17722         * kern/disk.c: Include <pupa/file.h>.
17723         (pupa_print_partinfo): New function.
17724         * kern/dl.c: Include <pupa/env.h>.
17725         (pupa_dl_dir): Variable removed.
17726         (pupa_dl_load): Use the environment variable `prefix' instead of
17727         the variable pupa_dl_dir.
17728         (pupa_dl_set_prefix): Function removed.
17729         (pupa_dl_get_prefix): Likewise.
17730         * kern/i386/pc/init.c: Include <pupa/env.h>.
17731         (pupa_machine_init): Use the environment variable `prefix' instead of
17732         using pupa_dl_set_prefix to set the prefix.
17733         * kern/main.c: Include <pupa/env.h>.
17734         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17735         using pupa_dl_get_prefix to get the prefix.
17736         * kern/misc.c: Include <pupa/env.h>.
17737         (pupa_isdigit): New function.
17738         (pupa_isgraph): Likewise.
17739         (pupa_ftoa): Likewise.
17740         (pupa_vsprintf): Added support for printing values of the type
17741         `double'.  Make it possible to format variable output when using
17742         formatting like `%1.2%f'.
17743         (pupa_split_cmdline): New function.
17744         * kern/rescue.c: Include <pupa/env.h>.
17745         (next_word): Removed function.
17746         (pupa_rescue_cmd_prefix): Likewise.
17747         (pupa_rescue_cmd_set): New function.
17748         (pupa_rescue_cmd_unset): New function.
17749         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17750         split the command line instead of splitting it here.  Added
17751         support for setting variables using the syntax `foo=bar'.  Don't
17752         initialize the prefix command anymore.  Initialized the set and
17753         unset commands.
17754         * normal/cmdline.c: Include <pupa/env.h>.
17755         (pupa_tab_complete): Added prototypes for print_simple_completion,
17756         print_partition_completion, add_completion, iterate_commands,
17757         iterate_dev, iterate_part and iterate_dir. Moved code to print
17758         partition information from here to kern/disk.c.
17759         (pupa_cmdline_run): Don't check if the function exists anymore.
17760         * normal/main.c: Include <pupa/env.h>.
17761         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17762         instead of using pupa_dl_get_prefix to get the prefix.
17763         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17764         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17765         warning.
17766         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17767         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17768         ((unused))' to silence a gcc warning.
17769         (pupa_vga_setcolor): Likewise.
17770         (debug_command): Changed to match argument parsing
17771         interface changes.
17772         * util/pupa-emu.c: Include <pupa/env.h>.
17773         (options): Added 0's for unused fields to silence a gcc warning.
17774         (argp): Likewise.
17775         (main): Use the environment variable `prefix' instead of using
17776         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17777         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17778         and terminal.
17780         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17781         * util/misc.c: Include <malloc.h>.
17782         (pupa_malloc): Rewritten so errors are correctly reported.
17783         (pupa_realloc): Likewise.
17784         (pupa_memalign): Likewise.
17785         (pupa_mm_init_region): Declare unused variables with
17786         `__attribute__ ((unused))' to silence a gcc warning.
17787         * normal/i386/setjmp.S: Remove tab at the end of the file to
17788         silence a gcc warning.
17789         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17790         variables with `__attribute__ ((unused))' to silence a gcc
17791         warning.
17792         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17793         local variable i unsigned to silence a gcc warning.
17795         * kern/term.c: Include <pupa/misc.h>.
17796         (pupa_more_lines): New variable.
17797         (pupa_more): Likewise.
17798         (pupa_putcode): When the pager is active pause at the end of every
17799         screen.
17800         (pupa_set_more): New function.
17801         * include/pupa/term.h (pupa_set_more): New prototype.
17804 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17806         Now this project is GRUB 2 rather than PUPA. The location of
17807         the CVS repository was moved to GRUB's.
17809         * configure.ac: Use bug-grub as the reporting address.
17810         Use GRUB instead of PUPA.
17811         Change the version number to 1.90.
17813 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17815         * genkernsyms.sh: Updated copyright information.
17816         * genmk.rb: Likewise.
17817         * genmodsrc.sh: Likewise.
17818         * gensymlist.sh: Likewise.
17819         * boot/i386/pc/boot.S: Likewise.
17820         * boot/i386/pc/diskboot.S: Likewise.
17821         * disk/i386/pc/biosdisk.c: Likewise.
17822         * disk/i386/pc/partition.c: Likewise.
17823         * font/manager.c: Likewise.
17824         * fs/ext2.c: Likewise.
17825         * fs/fat.c: Likewise.
17826         * include/pupa/boot.h: Likewise.
17827         * include/pupa/device.h: Likewise.
17828         * include/pupa/disk.h: Likewise.
17829         * include/pupa/dl.h: Likewise.
17830         * include/pupa/elf.h: Likewise.
17831         * include/pupa/err.h: Likewise.
17832         * include/pupa/file.h: Likewise.
17833         * include/pupa/font.h: Likewise.
17834         * include/pupa/fs.h: Likewise.
17835         * include/pupa/kernel.h: Likewise.
17836         * include/pupa/loader.h: Likewise.
17837         * include/pupa/misc.h: Likewise.
17838         * include/pupa/mm.h: Likewise.
17839         * include/pupa/net.h: Likewise.
17840         * include/pupa/normal.h: Likewise.
17841         * include/pupa/rescue.h: Likewise.
17842         * include/pupa/setjmp.h: Likewise.
17843         * include/pupa/symbol.h: Likewise.
17844         * include/pupa/term.h: Likewise.
17845         * include/pupa/types.h: Likewise.
17846         * include/pupa/i386/setjmp.h: Likewise.
17847         * include/pupa/i386/types.h: Likewise.
17848         * include/pupa/i386/pc/biosdisk.h: Likewise.
17849         * include/pupa/i386/pc/boot.h: Likewise.
17850         * include/pupa/i386/pc/console.h: Likewise.
17851         * include/pupa/i386/pc/init.h: Likewise.
17852         * include/pupa/i386/pc/kernel.h: Likewise.
17853         * include/pupa/i386/pc/linux.h: Likewise.
17854         * include/pupa/i386/pc/loader.h: Likewise.
17855         * include/pupa/i386/pc/memory.h: Likewise.
17856         * include/pupa/i386/pc/multiboot.h: Likewise.
17857         * include/pupa/i386/pc/partition.h: Likewise.
17858         * include/pupa/i386/pc/time.h: Likewise.
17859         * include/pupa/i386/pc/vga.h: Likewise.
17860         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17861         * include/pupa/util/getroot.h: Likewise.
17862         * include/pupa/util/misc.h: Likewise.
17863         * include/pupa/util/resolve.h: Likewise.
17864         * kern/device.c: Likewise.
17865         * kern/disk.c: Likewise.
17866         * kern/dl.c: Likewise.
17867         * kern/err.c: Likewise.
17868         * kern/file.c: Likewise.
17869         * kern/fs.c: Likewise.
17870         * kern/loader.c: Likewise.
17871         * kern/main.c: Likewise.
17872         * kern/misc.c: Likewise.
17873         * kern/mm.c: Likewise.
17874         * kern/rescue.c: Likewise.
17875         * kern/term.c: Likewise.
17876         * kern/i386/dl.c: Likewise.
17877         * kern/i386/pc/init.c: Likewise.
17878         * kern/i386/pc/lzo1x.S: Likewise.
17879         * kern/i386/pc/startup.S: Likewise.
17880         * loader/i386/pc/chainloader.c: Likewise.
17881         * loader/i386/pc/linux.c: Likewise.
17882         * loader/i386/pc/multiboot.c: Likewise.
17883         * normal/cmdline.c: Likewise.
17884         * normal/command.c: Likewise.
17885         * normal/main.c: Likewise.
17886         * normal/menu.c: Likewise.
17887         * normal/i386/setjmp.S: Likewise.
17888         * term/i386/pc/console.c: Likewise.
17889         * term/i386/pc/vga.c: Likewise.
17890         * util/console.c: Likewise.
17891         * util/genmoddep.c: Likewise.
17892         * util/misc.c: Likewise.
17893         * util/pupa-emu.c: Likewise.
17894         * util/resolve.c: Likewise.
17895         * util/unifont2pff.rb: Likewise.
17896         * util/i386/pc/biosdisk.c: Likewise.
17897         * util/i386/pc/getroot.c: Likewise.
17898         * util/i386/pc/pupa-mkimage.c: Likewise.
17899         * util/i386/pc/pupa-setup.c: Likewise.
17901 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17903         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17904         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17905         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17906         reading and reset it after reading.
17907         (pupa_ext2_close): Return PUPA_ERR_NONE.
17909         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17910         Correct value.
17911         (struct linux_kernel_header): Add kernel_version and
17912         initrd_addr_max.
17913         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17914         pupa_file_read succeeds.
17915         (pupa_rescue_cmd_initrd): Implement.
17917 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17919         * fs/ext2.c (pupa_ext2_label): New function.
17920         (pupa_ext2_fs): Added label.
17921         * fs/fat.c (pupa_fat_label): New function.
17922         (pupa_fat_fs): Added label.
17923         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17925         * kern/misc.c (pupa_strndup): New function.
17926         * include/pupa/misc.h (pupa_strndup): New prototype.
17928         * include/pupa/normal.h: Include <pupa/err.h>.
17929         (pupa_set_history): New prototype.
17930         (pupa_iterate_commands): New prototype.
17931         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17932         <pupa/disk.h>, <pupa/file.h>.
17933         (hist_size): New variable.
17934         (hist_lines): Likewise.
17935         (hist_end): Likewise.
17936         (hist_used): Likewise.
17937         (pupa_set_history): New function.
17938         (pupa_history_get): Likewise.
17939         (pupa_history_add): Likewise.
17940         (pupa_history_replace): Likewise.
17941         (pupa_tab_complete): Likewise.
17942         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17943         completion shows partitionnames while completing partitions, this
17944         feature was suggested by Jeff Bailey.
17945         * normal/command.c (pupa_iterate_commands): New function.
17946         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17947         (pupa_normal_init): Initialize history buffer.
17948         (PUPA_MOD_INIT): Likewise.
17949         (pupa_normal_fini): Free the history buffer.
17950         (PUPA_MOD_FINI): Likewise.
17952         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17953         key.
17955         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17956         * configure.ac [i386]: Check for regparam bug.
17957         (NESTED_FUNC_ATTR) [! i386]: Defined.
17959 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17961         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17962         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17963         (pupa_emu_SOURCES): New variable.
17964         (pupa_emu_LDFLAGS): Likewise.
17965         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17966         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17967         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17968         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17969         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17970         (pupa_jmp_buf): New typedef.
17971         (pupa_setjmp) [PUPA_UTIL]: New macro.
17972         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17973         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17974         (pupa_refresh): New prototype.
17975         * include/pupa/util/getroot.h: New file.
17976         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17977         it.
17978         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17979         (pupa_rescue_cmd_cat): Likewise.
17980         (pupa_rescue_cmd_ls): Likewise.
17981         (pupa_rescue_cmd_testload): Likewise.
17982         (pupa_rescue_cmd_lsmod): Likewise.
17983         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17984         * normal/menu.c (run_menu): Likewise.
17985         * kern/term.c (pupa_cls): Likewise.
17986         (pupa_refresh): New function.
17987         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17988         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17989         * util/console.c: New file.
17991         * util/i386/pc/getroot.c: New file.
17992         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17993         (pupa_putchar): New function.
17994         (pupa_refresh): Likewise.
17995         (xgetcwd): Function moved to ...
17996         (strip_extra_slashes): Likewise.
17997         (get_prefix): Likewise.
17998         * util/i386/pc/getroot.c: ... here.
17999         (find_root_device): Function moved and renamed to...
18000         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
18001         Changed all callers.
18002         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
18003         and renamed to...
18004         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
18005         Changed all callers.
18006         * util/misc.c (pupa_memalign): New function.
18007         (pupa_mm_init_region): Likewise.
18008         (pupa_register_exported_symbols): Likewise.
18009         (pupa_putchar): Function removed.
18010         * util/pupa-emu.c: New file.
18012 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
18014         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
18015         (_multiboot_mod_SOURCES): New variable.
18016         (_multiboot_mod_CFLAGS): Likewise.
18017         * loader/i386/pc/multiboot.c: New file.
18018         * include/pupa/i386/pc/multiboot.h: Likewise.
18019         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
18020         (pupa_multiboot_real_boot): New function.
18021         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
18022         (pupa_multiboot_real_boot): New prototype.
18023         (pupa_rescue_cmd_multiboot): Likewise
18024         (pupa_rescue_cmd_module): Likewise.
18026         * kern/loader.c (pupa_loader_set): Continue when
18027         pupa_loader_unload_func() fails.
18028         (pupa_loader_unset): New function.
18029         * include/pupa/loader.h (pupa_loader_unset): New prototype.
18031         * kern/misc.c (pupa_stpcpy): New function.
18032         * include/pupa/misc.h (pupa_stpcpy): New prototype.
18034 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
18036         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
18037         for available extensions.
18039         * include/pupa/i386/pc/time.h: New file.
18040         * kern/disk.c: Include <pupa/machine/time.h>.
18041         (PUPA_CACHE_TIMEOUT): New macro.
18042         (pupa_last_time): New variable.
18043         (pupa_disk_open): Flush the cache when there was a timeout.
18044         (pupa_disk_close): Reset the timer.
18045         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18046         pupa_currticks.
18047         * util/misc.c: Include <sys/times.h>
18048         (pupa_get_rtc): New function.
18050 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
18052         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18053         as blocks.
18054         (pupa_ext2_get_file_block): Use blocks member.
18056         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18057         first block. Return -1 instead of pupa_errno on error.
18059 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
18061         * README: In the pupa-mkimage example use _chain instead of chain
18062         and ext2 instead of fat.
18063         * TODO: Replace ext2fs with jfs as an example.  Add an item for
18064         adding journal playback for ext2fs.
18065         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18066         (pkgdata_MODULES): Added ext2.mod.
18067         (ext2_mod_SOURCES): New variable.
18068         (ext2_mod_CFLAGS): Likewise.
18069         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18070         * include/pupa/misc.h (pupa_strncpy): New prototype.
18071         (pupa_strcat): Likewise.
18072         (pupa_strncmp): Likewise.
18073         * kern/misc.c (pupa_strcat): Enable function.
18074         (pupa_strncpy): New function.
18075         (pupa_strncmp): Likewise.
18076         * fs/ext2.c: New file.
18078         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18079         when the read failed before retrying.
18080         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18081         (_FILE_OFFSET_BITS): Likewise.
18082         * configure.ac: Added AC_SYS_LARGEFILE.
18084 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
18086         * genmk.rb (PModule#rule): Make sure to get only symbol names
18087         from the output of nm.
18088         Reported by Robert Millan <zeratul2@wanadoo.es>.
18090 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
18092         I forgot to check in these changes for a long time. This adds
18093         incomplete support for VGA console, and this is still very
18094         buggy. Also, a lot of consideration is required for I18N,
18095         UNICODE, and VGA font issues. Therefore, assume that this is
18096         such that "better than nothing".
18098         * font/manager.c: New file.
18099         * include/pupa/font.h: Likewise.
18100         * include/pupa/i386/pc/vga.h: Likewise.
18101         * term/i386/pc/vga.c: Likewise.
18102         * util/unifont2pff.rb: Likewise.
18104         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18105         (pkgdata_MODULES): Added vga.mod and font.mod.
18106         (vga_mod_SOURCES): New variables.
18107         (vga_mod_CFLAGS): Likewise.
18108         (font_mod_SOURCES): Likewise.
18109         (font_mod_CFLAGS): Likewise.
18111         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18113         * include/pupa/term.h: Include pupa/err.h.
18114         (struct pupa_term): Added init and fini.
18115         Changed the argument of putchar to pupa_uint32_t.
18117         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18118         (pupa_console_real_putchar): New prototype.
18119         (pupa_console_putchar): Removed.
18120         (pupa_console_checkkey): Exported.
18121         (pupa_console_getkey): Likewise.
18123         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18124         characters.
18126         * kern/term.c (pupa_term_set_current): Rewritten.
18127         (pupa_putchar): Likewise.
18128         (pupa_putcode): New function.
18130         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18131         (pupa_console_real_putchar): ... this.
18132         (pupa_vga_set_mode): New function.
18133         (pupa_vga_get_font): Likewise.
18135         * normal/command.c: Include pupa/term.h.
18136         (terminal_command): New function.
18137         (pupa_command_init): Register the command "terminal".
18139         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18140         (DISP_UP): Likewise.
18141         (DISP_RIGHT): Likewise.
18142         (DISP_DOWN): Likewise.
18143         (DISP_HLINE): Likewise.
18144         (DISP_VLINE): Likewise.
18145         (DISP_UL): Likewise.
18146         (DISP_UR): Likewise.
18147         (DISP_LL): Likewise.
18148         (DISP_LR): Likewise.
18150         * term/i386/pc/console.c (pupa_console_putchar): New function.
18152 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
18154         * util/resolve.c (pupa_util_resolve_dependencies): BUG
18155         FIX. Reverse the path_list.
18157         * include/pupa/normal.h: Export pupa_register_command and
18158         pupa_unregister_command.
18160         * hello/hello.c (pupa_cmd_hello): New module.
18161         * conf/i386-pc.rmk: Added hello.mod.
18163 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
18165         * kern/i386/pc/lzo1x.S: New file.
18167         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18168         (compress_kernel): New variable.
18169         (generate_image): Heavily modified to support compressing a
18170         large part of the core image.
18172         * util/misc.c (pupa_util_read_image): Fix a file descriptor
18173         leak.
18174         (pupa_util_load_image): New function.
18176         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18177         (pupa_compressed_size): New variable.
18178         (codestart): Enable Gate A20 here.
18179         Decompress the compressed part of the core image.
18180         Rearrange the code to put functions and variables which are
18181         required for initialization in the non-compressed part.
18182         Include lzo1x.S.
18184         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18185         here.
18187         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18189         * include/pupa/i386/pc/kernel.h
18190         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18191         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18192         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18193         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18194         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18196         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18198         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18199         (Utility#rule): Likewise.
18201         * configure.ac: Check if LZO is available.
18203 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
18205         * include/pupa/normal.h: New file.
18206         * include/pupa/setjmp.h: Likewise.
18207         * include/pupa/i386/setjmp.h: Likewise.
18208         * normal/cmdline.c: Likewise.
18209         * normal/command.c: Likewise.
18210         * normal/main.c: Likewise.
18211         * normal/menu.c: Likewise.
18212         * normal/i386/setjmp.S: Likewise.
18214         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18215         (pupa_rescue_cmd_initrd): Likewise.
18217         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18218         Likewise.
18220         * kern/i386/pc/startup.S (translation_table): New variable.
18221         (translate_keycode): New function.
18222         (pupa_console_getkey): Call translate_keycode.
18224         * kern/rescue.c (attempt_normal_mode): New function.
18225         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18226         it failed, print a message.
18228         * kern/mm.c (pupa_real_malloc): Print more information when a
18229         free magic is broken.
18230         (pupa_free): If the first free header is not free actually, set
18231         it to P.
18233         * kern/main.c (pupa_load_normal_mode): Just load the module
18234         "normal".
18235         (pupa_main): Don't print the message
18236         "Entering into rescue mode..." here.
18238         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18239         Declared.
18240         (pupa_rescue_cmd_initrd): Likewise.
18241         (pupa_rescue_cmd_initrd): Likewise.
18243         * include/pupa/symbol.h (FUNCTION): Specify the type.
18244         (VARIABLE): Likewise.
18246         * include/pupa/err.h (pupa_err_t): Added
18247         PUPA_ERR_UNKNOWN_COMMAND.
18249         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18250         (pupa_dl_get_prefix): Likewise.
18252         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18253         Added _chain.mod and _linux.mod instead of chain.mod and
18254         linux.mod.
18255         (chain_mod_SOURCES): Renamed to ...
18256         (_chain_mod_SOURCES): ... this.
18257         (chain_mod_CFLAGS): Renamed to ...
18258         (_chain_mod_CFLAGS): ... this.
18259         (linux_mod_SOURCES): Renamed to ...
18260         (_linux_mod_SOURCES): ... this.
18261         (linux_mod_CFLAGS): Renamed to ...
18262         (_linux_mod_CFLAGS): ... this.
18263         (normal_mod_SOURCES): New variable.
18264         (normal_mod_CFLAGS): Likewise.
18265         (normal_mod_ASFLAGS): Likewise.
18267 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
18269         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18270         possible.
18272         * kern/dl.c (pupa_dl_ref): Refer depending modules
18273         recursively.
18274         (pupa_dl_unref): Unrefer depending modules recursively.
18275         Don't call pupa_dl_unload implicitly, because PUPA can crash if
18276         a module is unloaded before one depending on that module is
18277         unloaded.
18278         (pupa_dl_unload): Unload depending modules explicitly,
18279         if possible.
18281 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
18283         * include/pupa/i386/pc/linux.h: New file.
18284         * loader/i386/pc/linux.c: Likewise.
18286         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18287         Removed.
18288         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18289         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18290         of PUPA_CHAINLOADER_BOOT_SECTOR.
18292         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18293         (pupa_linux_prot_size): New variable.
18294         (pupa_linux_tmp_addr): Likewise.
18295         (pupa_linux_real_addr): Likewise.
18296         (pupa_linux_boot_zimage): New function.
18297         (pupa_linux_boot_bzimage): Likewise.
18299         * kern/i386/pc/init.c (struct mem_region): New structure.
18300         (MAX_REGIONS): New macro.
18301         (mem_regions): New variable.
18302         (num_regions): Likewise.
18303         (pupa_os_area_addr): Likewise.
18304         (pupa_os_area_size): Likewise.
18305         (pupa_lower_mem): Likewise.
18306         (pupa_upper_mem): Likewise.
18307         (add_mem_region): New function.
18308         (compact_mem_regions): Likewise.
18309         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18310         the size of the conventional memory and that of so-called upper
18311         memory (before the first memory hole).
18312         Instead of adding each found region to free memory, use
18313         add_mem_region and add them after removing overlaps.
18314         Also, add only 1/4 of the upper memory to free memory. The rest
18315         is used for loading OS images. Maybe this is ad hoc, but this
18316         makes it much easier to relocate OS images when booting.
18318         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18319         (pupa_enter_rescue_mode): Don't register initrd and module.
18321         * kern/mm.c: Include pupa/dl.h.
18323         * kern/main.c: Include pupa/file.h and pupa/device.h.
18325         * kern/loader.c (pupa_loader_load_module_func): Removed.
18326         (pupa_loader_load_module): Likewise.
18328         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18329         ``.o''.
18331         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18332         (pupa_linux_tmp_addr): Likewise.
18333         (pupa_linux_real_addr): Likewise.
18334         (pupa_linux_boot_zimage): Likewise.
18335         (pupa_linux_boot_bzimage): Likewise.
18337         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18338         (pupa_upper_mem): Likewise.
18339         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18340         module is too dangerous.
18342         * include/pupa/loader.h (pupa_os_area_addr): Declared.
18343         (pupa_os_area_size): Likewise.
18344         (pupa_loader_set): Remove the first argument. Loader doesn't
18345         manage modules or initrd any longer.
18346         (pupa_loader_load_module): Removed.
18348         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18349         (linux_mod_SOURCES): New variable.
18350         (linux_mod_CFLAGS): Likewise.
18352 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
18354         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18355         the length of a blocklist correctly.
18357         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18358         Use ioctl only if the OS file is a block device.
18359         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18360         not very useful for normal files.
18362         * kern/main.c (pupa_set_root_dev): New function.
18363         (pupa_load_normal_mode): Likewise.
18364         (pupa_main): Call those above.
18366         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18367         pupa_uint16_t.
18369         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18371 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
18373         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18374         (setup): Configure the installed partition information and the
18375         dl prefix.
18377         * loader/i386/pc/chainloader.c (my_mod): New variable.
18378         (pupa_chainloader_unload): New function.
18379         (pupa_rescue_cmd_chainloader): Refer itself.
18380         (PUPA_MOD_INIT): Save its own module in MY_MOD.
18382         * kern/i386/pc/startup.S (install_partition): Removed.
18383         (version_string): Likewise.
18384         (config_file): Likewise.
18385         (pupa_install_dos_part): New variable.
18386         (pupa_install_bsd_part): Likewise.
18387         (pupa_prefix): Likewise.
18388         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18390         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18391         and pupa/misc.h.
18392         (make_install_device): New function.
18393         (pupa_machine_init): Set the dl prefix.
18395         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18396         (buf): Renamed to ...
18397         (linebuf): ... this.
18398         (pupa_rescue_cmd_prefix): New function.
18399         (pupa_rescue_cmd_insmod): Likewise.
18400         (pupa_rescue_cmd_rmmod): Likewise.
18401         (pupa_rescue_cmd_lsmod): Likewise.
18402         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18403         rmmod and lsmod.
18405         * kern/mm.c (pupa_memalign): If failed even after invalidating
18406         disk caches, unload unneeded modules and retry.
18408         * kern/misc.c (pupa_memmove): New function.
18409         (pupa_memcpy): Removed.
18410         (pupa_strcpy): New function.
18411         (pupa_itoa): Made static.
18413         * kern/dl.c (pupa_dl_iterate): New function.
18414         (pupa_dl_ref): Likewise.
18415         (pupa_dl_unref): Likewise.
18416         (pupa_dl_unload): Return if succeeded or not.
18417         (pupa_dl_unload_unneeded): New function.
18418         (pupa_dl_unload_all): Likewise.
18419         (pupa_dl_init): Renamed to ...
18420         (pupa_dl_set_prefix): ... this.
18421         (pupa_dl_get_prefix): New function.
18423         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18424         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18425         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18426         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18427         (pupa_install_dos_part): Declared.
18428         (pupa_install_bsd_part): Likewise.
18429         (pupa_prefix): Likewise.
18430         (pupa_boot_drive): Likewise.
18432         * include/pupa/types.h: Fix a typo.
18434         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18435         pupa_memmove.
18436         (pupa_memmove): Declared.
18437         (pupa_strcpy): Likewise.
18439         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18440         pupa_mod_init takes one argument, its own module.
18441         (pupa_dl_unload_unneeded): Declared.
18442         (pupa_dl_unload_all): Likewise.
18443         (pupa_dl_ref): Likewise.
18444         (pupa_dl_unref): Likewise.
18445         (pupa_dl_iterate): Likewise.
18446         (pupa_dl_init): Renamed to ...
18447         (pupa_dl_set_prefix): ... this.
18448         (pupa_dl_get_prefix): Declared.
18450         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18451         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18452         unloaded.
18453         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18454         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18456         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18457         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18459 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18461         * util/i386/pc/pupa-setup.c (setup): Define the internal
18462         function find_first_partition_start at the top level, because GCC
18463         3.0.x cannot compile internal functions in deeper scopes
18464         correctly.
18465         (find_root_device): Use lstat instead of stat.
18466         Don't follow symbolic links.
18467         Fix the path-constructing code.
18469         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18470         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18471         by a BLKGETSIZE ioctl first, because block devices don't fill
18472         the member st_mode of the structure stat on Linux.
18473         [__linux__] (linux_find_partition): Use a temporary buffer
18474         REAL_DEV for the working space. Copy it to DEV before returning.
18475         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18476         buffer cache consistent.
18477         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18478         strncmp. The previous value was merely wrong.
18479         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18481         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18482         FAT size is 12. The previous value was merely wrong.
18484         * kern/main.c (pupa_main): Don't split the starting message from
18485         newlines.
18487         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18488         LF, because BIOS goes crazy about character attributes in this
18489         case.
18491 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18493         * include/i386/pc/util/biosdisk.h: New file.
18494         * util/i386/pc/biosdisk.c: Likewise.
18495         * util/i386/pc/pupa-setup.c: Likewise.
18497         * Makefile.in (INCLUDE_DISTFILES): Added
18498         include/pupa/i386/pc/util/biosdisk.h.
18499         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18500         directory util/i386/pc.
18501         (install-local): Added a rule for sbin_UTILITIES.
18502         (uninstall): Likewise.
18504         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18506         * util/misc.c (xrealloc): New function.
18507         (pupa_malloc): Likewise.
18508         (pupa_free): Likewise.
18509         (pupa_realloc): Likewise.
18510         (pupa_stop): Likewise.
18511         (pupa_putchar): Likewise.
18513         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18515         * include/pupa/util/misc.h (xrealloc): Declared.
18517         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18518         macro.
18519         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18520         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18522         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18523         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18525         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18526         way should be implemented.
18527         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18529         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18530         the size of NAME for safety.
18531         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18532         0x88.
18534         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18535         (pupa_setup_SOURCES): Likewise.
18537         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18539 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18541         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18542         bunch of pushl's from pusha, because this destroys the return
18543         value.
18545 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18547         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18548         This means that any missing prototypes could be fatal. Also, you
18549         must take care when writing assembly code. See the comments at
18550         the beginning of startup.S, for more details.
18552         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18553         compilation mechanism.
18554         (pupa_chainloader_real_boot): Likewise.
18555         (pupa_biosdisk_rw_int13_extensions): Likewise.
18556         (pupa_biosdisk_rw_standard): Likewise.
18557         (pupa_biosdisk_check_int13_extensions): Likewise.
18558         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18559         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18560         (pupa_get_memsize): Likewise.
18561         (pupa_get_mmap_entry): Likewise.
18562         (pupa_console_putchar): Likewise.
18563         (pupa_console_setcursor): Likewise.
18564         (pupa_getrtsecs): Use pushl instead of push.
18566         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18567         memory instead of the stack for a mmap entry, because some
18568         BIOSes may ignore the maximum size and overflow.
18570         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18572         * genmk.rb (PModule#rule): Compile automatically generated
18573         sources with module-specific CFLAGS as well as other sources.
18575 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18577         * configure.ac: Check ld.
18578         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18579         respectively, before checking endianness and sizes.
18581         * Makefile.in (LD): New variable.
18583 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18585         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18587 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18589         * Changelog: New file.