]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-07-31 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
f45d6cfc 12009-07-31 Bean <bean123ch@gmail.com>
2
3 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
4 Don't change pv->disk if it's already set.
5
6 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
7 (grub_raid_register): ... here.
8 (grub_raid_rescan): Removed.
9
10 * include/grub/raid.h (grub_raid_rescan): Removed.
11
12 * util/grub-fstest.c: Remove include file <grub/raid.h>.
13 (fstest): Replace grub_raid_rescan with module fini function followed
14 by init function.
15
16 * util/grub-probe.c: Add include file <grub/raid.h>.
17 (probe_raid_level): New function.
18 (probe): Detect abstraction by walking the disk device, support two
19 level of abstraction (LVM on RAID) when detecting partition map.
20
24443b5a 212009-07-31 Pavel Roskin <proski@gnu.org>
22
23 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
24 to grub_zalloc(), it was erroneous.
25 Reported by Bean <bean123ch@gmail.com>
26
a275d9e7 272009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
28
29 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
30 embeding zone, not only the first one.
31
56c5a47f 322009-07-29 Joe Auricchio <jauricchio@gmail.com>
33
34 * term/gfxterm.c (clear_char): New function.
35 (grub_virtual_screen_setup): Use clear_char.
36 (scroll_up): Likewise.
37 (grub_virtual_screen_cls): Likewise.
38
67bb323a 392009-07-29 Felix Zielcke <fzielcke@z-51.de>
40
41 * util/deviceiter.c (get_acceleraid_disk_name): New static
42 function.
43 (grub_util_iterate_devices): Handle Accelraid devices.
44 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
45
388a7c75 462009-07-28 Robert Millan <rmh.grub@aybabtu.com>
47
48 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
49 separator for the suggested gfxpayload string (';' collides with the
50 parser and needs escaping).
51
3bb7abcf 522009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
53
54 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
55 Clear direction flag before jumping to OS.
56 (grub_multiboot2_real_boot): Likewise.
57
2ddd36d7 582009-07-28 Felix Zielcke <fzielcke@z-51.de>
59
60 * util/i386/pc/grub-install: Fix parsing of --disk-module
61 option.
62
c521b62b 632009-07-28 Felix Zielcke <fzielcke@z-51.de>
64
65 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
66 when embedding.
67
880e0a0c 682009-07-26 Felix Zielcke <fzielcke@z-51.de>
69
70 * util/grub-mkconfig.in (package_version): New variable.
71 Use it do display the version.
72
2366e356 732009-07-25 Felix Zielcke <fzielcke@z-51.de>
74
75 * kern/file.c (grub_file_open): Revert to previous check with
76 grub_errno.
77
7ad8c80e 782009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
79
80 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
81 from help line. It's out of sync with code.
82
72b9658b 832009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
84
85 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
86 entries on failed boot.
87
77435277 882009-07-25 Felix Zielcke <fzielcke@z-51.de>
89
90 * kern/file.c (grub_file_open): Fix an error check.
91
fcaa8b21 922009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
93
35d16c74 94 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
95 partition map couldn't be identified.
fcaa8b21 96
48904cd1 972009-07-23 Pavel Roskin <proski@gnu.org>
98
ef3c317f 99 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
100 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
101 case of little endian words becomes just an optimization.
102 Respect const modifier.
103 (md5_final): Use code that doesn't depend on endianess.
104
48904cd1 105 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
106 to avoid loss of upper bits if align is unsigned and shorter
107 than addr.
108
260c9a89 1092009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
110
111 UUID support for UFS
112
113 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
114 (grub_ufs_uuid): New function.
115 (grub_ufs_fs): add .uuid
116
f76ce889 1172009-07-21 Pavel Roskin <proski@gnu.org>
118
119 * kern/dl.c (grub_dl_check_header): Make static.
120
6a6cbcaf 1212009-07-21 Felix Zielcke <fzielcke@z-51.de>
122
123 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
124 add drivemap for Vista. It breaks Windows 7.
125
cffcddb2 1262009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
127
128 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
129 128 bytes
130
1ef44b80 1312009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
132
133 Add BFS support
134
135 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
136 (grub_fstest_SOURCES): Likewise.
137 (pkglib_MODULES): Add befs.mod.
138 (befs_mod_SOURCES): New variable.
139 (befs_mod_CFLAGS): Likewise.
140 (befs_mod_LDFLAGS): Likewise.
141 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
142 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
143 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
144 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
145 (grub_setup_SOURCES): Likewise.
146 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
147 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
148 (grub_setup_SOURCES): Likewise.
149 * fs/befs.c: New file.
150 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
151 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
152 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
153 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
154 (B_KEY_INDEX_ALIGN): New declaration.
155 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
156 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
157 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
158 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
159 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
160 (grub_afs_mount) [MODE_BFS]: Likewise.
161 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
162 (grub_afs_fs): Use GRUB_AFS_FSNAME
163 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
164 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
165 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
166 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
167
4f253044 1682009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
169
170 * util/getroot.c (find_root_device): Add support for MacOSX.
171 * util/hostdisk.c: Likewise.
172
57a55913 1732009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
174
175 * font/font.c (find_glyph): Check whether a font is present to avoid
176 segmentation fault.
75421ca9 177
1782009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 179
180 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
181
e98cd0c2 1822009-07-20 Pavel Roskin <proski@gnu.org>
183
184 * configure.ac: Trim excessively wordy excuses.
185
1d2d169a 1862009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
187
188 Add symlink, mtime and label support to AtheFS.
189
190 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
191 (grub_afs_iterate_dir): Handle symlinks.
192 (grub_afs_open): Use grub_afs_read_symlink.
193 (grub_afs_dir): Likewise.
194 Pass mtime.
195 (grub_afs_label): New function.
196 (grub_afs_fs): Add grub_afs_label.
197 (grub_afs_read_symlink): New function.
198
186f3189 1992009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
200
201 Fix AtheFS support.
202
203 * fs/afs.c: Fix comments style.
204 (grub_afs_blockrun): Declare as packed.
205 (grub_afs_datastream): Likewise.
206 (grub_afs_bnode): Likewise.
207 (grub_afs_btree): Likewise.
208 (grub_afs_sblock): Likewise.
209 Declare `name' as char.
210 (grub_afs_inode): Declare as packed.
211 Change void *vnode to grub_uint32_t unused.
212 (grub_afs_iterate_dir): Check that key_size is positive.
213 (grub_afs_mount): Don't read superblock twice.
75421ca9 214 (grub_afs_dir): Don't free node in case of error,
186f3189 215 grub_fshelp_find_file already handles this.
216 (grub_afs_open): Likewise.
217
5680109e 2182009-07-19 Pavel Roskin <proski@gnu.org>
219
220 * Makefile.in: Remove LIBLZO and enable_lzo.
221 * conf/i386-pc.rmk: Remove lzo support.
222 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
223 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
224 support.
225 * kern/i386/pc/lzo1x.S: Remove.
226 * kern/i386/pc/startup.S: Remove lzo support.
227 * util/i386/pc/grub-mkimage.c: Likewise.
228
ac70fa32 2292009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
230
231 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
232 * fs/xfs.c (grub_xfs_dir): Likewise.
233 * fs/afs.c (grub_afs_dir): Likewise.
234 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
235 (grub_iso9660_open): Likewise.
236 * fs/jfs.c (grub_jfs_open): Likewise.
237 * fs/ext2.c (grub_ext2_dir): Likewise.
238 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
239 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 240
eab58da2 2412009-07-16 Pavel Roskin <proski@gnu.org>
242
d2838156 243 * configure.ac: Never add "-c" to CFLAGS.
244
55c70904 245 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
246
43e6200c 247 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
248 grub_cv_cc_efiemu should be used.
249
ce7a733d 250 * configure.ac: Typo fixes.
251
eab58da2 252 * kern/mm.c (grub_zalloc): New function.
253 (grub_debug_zalloc): Likewise.
254 * include/grub/mm.h: Declare grub_zalloc() and
255 grub_debug_zalloc().
256 * util/misc.c (grub_zalloc): New function.
257 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
258 instead of grub_malloc(), remove unneeded initializations.
259 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
260 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
261 * commands/parttool.c (grub_cmd_parttool): Likewise.
262 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
263 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
264 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
265 * disk/usbms.c (grub_usbms_finddevs): Likewise.
266 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
267 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
268 (grub_cmd_efiemu_pnvram): Likewise.
269 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
270 * fs/iso9660.c (grub_iso9660_mount): Likewise.
271 (grub_iso9660_iterate_dir): Likewise.
272 * fs/jfs.c (grub_jfs_opendir): Likewise.
273 * fs/ntfs.c (list_file): Likewise.
274 (grub_ntfs_mount): Likewise.
275 * kern/disk.c (grub_disk_open): Likewise.
276 * kern/dl.c (grub_dl_load_core): Likewise.
277 * kern/elf.c (grub_elf_file): Likewise.
278 * kern/env.c (grub_env_context_open): Likewise.
279 (grub_env_set): Likewise.
280 (grub_env_set_data_slot): Likewise.
281 * kern/file.c (grub_file_open): Likewise.
282 * kern/fs.c (grub_fs_blocklist_open): Likewise.
283 * loader/i386/multiboot.c (grub_module): Likewise.
284 * loader/xnu.c (grub_xnu_create_key): Likewise.
285 (grub_xnu_create_value): Likewise.
286 * normal/main.c (grub_normal_add_menu_entry): Likewise.
287 (read_config_file): Likewise.
288 * normal/menu_entry.c (make_screen): Likewise.
289 * partmap/sun.c (sun_partition_map_iterate): Likewise.
290 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
291 * script/sh/script.c (grub_script_parse): Likewise.
292 * video/bitmap.c (grub_video_bitmap_create): Likewise.
293 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
294 * video/readers/png.c (grub_png_output_byte): Likewise.
295 (grub_video_reader_png): Likewise.
296
830afef7 2972009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 298
299 Enable all targets that can be built by default
300
830afef7 301 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 302 grub-mkfont and grub-fstest if they can be built
303
ee293aee 3042009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
305
306 Fix hang and segmentation fault in grub-emu-usb
307
308 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
309 * util/usb.c (grub_libusb_devices): likewise
310 (grub_libusb_init): rename to ...
311 (GRUB_MOD_INIT (libusb)):...this
312 (grub_libusb_fini): rename to ..
313 (GRUB_MOD_FINI (libusb)):...this
314 * disk/usbms.c (grub_usbms_transfer): fix retry logic
315 * include/grub/disk.h (grub_raid_init): removed, it's useless
316 (grub_raid_fini): likewise
317 (grub_lvm_init): likewise
318 (grub_lvm_fini): likewise
319 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
320 by grub_init_all
321
94414221 3222009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
323
324 Fix libusb
325
326 * Makefile.in (LIBUSB): new macro
327 * genmk.rb (Utility/print_tail): new method
328 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
329 (top level): call util.print_tail at the end.
330
59ade63d 3312009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
332
333 Make FreeBSD accept zpool.cache
334
335 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
336 type is /boot/zfs/zpool.cache
337
a58da8c7 3382009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
339
340 Fix 64-bit efiemu
341
342 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
343 correct wrong typedef
344 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
345
20591577 3462009-07-15 Pavel Roskin <proski@gnu.org>
347
560ca572 348 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
349 * kern/disk.c (struct grub_disk_cache): Likewise.
350
e8e8e4fd 351 * commands/probe.c (options): Typo fix.
352
fde24e10 353 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
354 Increase to 0x5a to accommodate FAT32. Adjust other offsets
355 accordingly.
356 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
357
379c54c1 358 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
359 the end of "Error" to make the message more readable.
360
7bd8f5bf 361 * boot/i386/pc/boot.S (kernel_segment): Remove.
362 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
363 for destination.
364
40b132c5 365 * boot/i386/pc/boot.S (boot_version): Remove.
366 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
367 Remove.
368
20591577 369 * include/grub/i386/pc/boot.h: Sort all offsets.
370 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
371 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
372 * boot/i386/pc/boot.S: Assert location of every offset listed in
373 include/grub/i386/pc/boot.h.
374
2df32b2c 3752009-07-13 Pavel Roskin <proski@gnu.org>
376
44b5d879 377 * include/grub/i386/coreboot/machine.h: Rename
378 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
379 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
380 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
381
17dc3751 382 * kern/dl.c: Force native word size to suppress warnings when
383 compiling grub-emu.
384
2df32b2c 385 * kern/device.c (grub_device_iterate): Change struct part_ent to
386 hold the name, not a pointer to it. Use one grub_malloc() per
387 partition, not two. Free partition_name if grub_malloc() fails.
388 Set ents to NULL only before grub_partition_iterate() is called.
389
75c59f59 3902009-07-11 Bean <bean123ch@gmail.com>
391
392 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
393 childname.
394
0ae1bf88 3952009-07-10 Bean <bean123ch@gmail.com>
3962009-07-10 Robert Millan <rmh.grub@aybabtu.com>
397
398 * kern/ieee1275/openfw.c (grub_children_iterate)
399 (grub_devalias_iterate): Fix size evaluation for property or path
400 strings, which was broken since r2132.
401
8279cade 4022009-07-07 Pavel Roskin <proski@gnu.org>
403
7d8a52d3 404 * commands/search.c (search_file): Merge into ...
405 (search_fs): ... this. Accept search type as argument.
406 (grub_cmd_search): Pass search type to search_fs().
407
25f9a05a 408 * include/grub/util/console.h: New file.
409 * util/console.c: Use it instead of grub/machine/console.h.
410 * util/grub-emu.c: Likewise.
411
8279cade 412 * lib/arg.c (find_long_option): Remove.
413 (find_long): Add `len' argument, make `s' const char *.
414 (grub_arg_parse): Parse long options in place, not in a
415 temporary buffer.
416
4a11b60f 4172009-07-06 Pavel Roskin <proski@gnu.org>
418
99f68041 419 * commands/search.c (search_fs): Fix potential NULL pointer
420 dereference.
421
4a11b60f 422 * commands/search.c (search_fs): Replace QUID macro with quid_fn
423 function pointer.
424
e110f4de 4252009-07-06 Daniel Mierswa <impulze@impulze.org>
426
427 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
428 comparison.
429
46eeb6a2 4302009-07-05 Pavel Roskin <proski@gnu.org>
431
bab74958 432 * include/grub/i386/linux.h (struct linux_kernel_params):
433 Restore padding3, it's still needed.
434
46eeb6a2 435 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
436 FreeBSD.
437 * util/osdetect.lua: Likewise.
438
b4a1dc79 4392009-07-05 Bean <bean123ch@gmail.com>
440
441 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
442
443 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
444 (grub_lua_getenv): Likewise.
445 (grub_lua_setenv): Likewise.
446 (save_errno): New function.
447 (push_result): Likewise.
448 (grub_lua_enum_device): Likewise.
449 (grub_lua_enum_file): Likewise.
450 (grub_lua_file_open): Likewise.
451 (grub_lua_file_close): Likewise.
452 (grub_lua_file_seek): Likewise.
453 (grub_lua_file_read): Likewise.
454 (grub_lua_file_getline): Likewise.
455 (grub_lua_file_getsize): Likewise.
456 (grub_lua_file_getpos): Likewise.
457 (grub_lua_file_eof): Likewise.
458 (grub_lua_file_exist): Likewise.
459 (grub_lua_add_menu): Likewise.
460
461 * script/lua/grub_lua.h (isupper): New inline function.
462 (islower): Likewise.
463 (ispunct): Likewise.
464 (isxdigit): Likewise.
465 (strcspn): Change to normal function.
466 (strpbkr): New function declaration.
467 (memchr): Likewise.
468
469 * script/lua/grub_main.c (scan_str): New function.
470 (strcspn): Likewise.
471 (strpbrk): Likewise.
472 (memchr): Likewise.
473
474 * script/lua/linit.c (lualibs): Enable the string library.
475
476 * util/osdetect.lua: New file.
477
2da92295 4782009-07-04 Robert Millan <rmh.grub@aybabtu.com>
479
480 * include/grub/i386/linux.h (struct linux_kernel_params): Add
481 `capabilities' member.
482
b2582ec9 4832009-07-02 Pavel Roskin <proski@gnu.org>
484
485 * genparttoollist.sh: Add missing newline at the end.
486
32622956 4872009-07-01 Pavel Roskin <proski@gnu.org>
488
87a7339e 489 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
490
d23af54e 491 * util/hostdisk.c (open_device): Remove `const' from
492 `sysctl_size', as sysctlbyname() can change it (in this case it
493 doesn't actually happen).
494
c94b18a9 495 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
496 using signed long int constants.
497
c6cd3ef0 498 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
499 constant to avoid a warning on FreeBSD.
500
0df63420 501 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
502 where it's needed.
503
999577f1 504 * Makefile.in: Install include/grub/machine symlink.
505
6f41557f 506 * Makefile.in: When installing symlinks, use "cp -fR", which
507 works on FreeBSD and MacOSX.
508 From Yves Blusseau <cl7m42e02@sneakemail.com>
509
c8d22988 510 * kern/dl.c (grub_dl_resolve_symbol): Make static.
511 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
512
1b96e952 513 * util/misc.c: Move grub_reboot() and grub_halt() ...
514 * util/grub-emu.c: ... here. Make main_env static.
515 * include/grub/util/misc.h: Remove main_env.
516
2ef0084d 517 * kern/mm.c: Use correct format to print size_t.
518
32622956 519 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
520 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
521 * kern/powerpc/dl.c: Likewise.
522 * kern/sparc64/dl.c: Likewise.
523 * kern/x86_64/dl.c: Likewise.
524
3f7f0cd0 5252009-07-01 Robert Millan <rmh.grub@aybabtu.com>
526
527 Fix grub-emu build on sparc64-ieee1275.
528
75421ca9 529 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 530 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
531
211d06b5 5322009-07-01 Robert Millan <rmh.grub@aybabtu.com>
533
534 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
535 (grub_reboot, grub_halt): New functions.
536
537 * util/i386/pc/misc.c: Delete. Update all users.
538 * util/sparc64/ieee1275/misc.c: Likewise.
539 * util/powerpc/ieee1275/misc.c: Likewise.
540
aaf53e3c 5412009-07-01 Robert Millan <rmh.grub@aybabtu.com>
542
543 * conf/i386.rmk (setjmp_mod_SOURCES)
544 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
545 * conf/common.rmk (setjmp_mod_SOURCES)
546 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
547 to use $(target_cpu).
548 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
549 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
550 * conf/powerpc-ieee1275.rmk: Likewise.
551 * conf/sparc64-ieee1275.rmk: Likewise.
552
553 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
554 $(target_cpu) for kern/$(target_cpu)/dl.c.
555 * conf/i386-efi.rmk: Likewise.
556 * conf/i386-ieee1275.rmk: Likewise.
557 * conf/x86_64-efi.rmk: Likewise.
558 * conf/i386-coreboot.rmk: Likewise.
559 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
560 $(target_cpu) for kern/$(target_cpu)/dl.c and for
561 kern/$(target_cpu)/cache.S.
562 * conf/sparc64-ieee1275.rmk: Likewise.
563
a337130b 5642009-07-01 Robert Millan <rmh.grub@aybabtu.com>
565
566 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
567 type to `grub_uint8_t', and adjust `padding9' accordingly.
568
c6fe4d53 5692009-06-29 Robert Millan <rmh.grub@aybabtu.com>
570
b09db61d 571 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
572
c6fe4d53 573 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
574 assembly in final jump, using register constraints.
575
b09db61d 576 (grub_linux_boot): For text mode, initialize `have_vga' using
577 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
578
579 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
580 right before the final jump.
581
582 Set `video_mode' to 0x3.
583
584 Document initialization of `video_page', `video_mode' and
585 `video_ega_bx'.
586
28333ad0 5872009-06-29 Robert Millan <rmh.grub@aybabtu.com>
588
589 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
590 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 591 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 592
02164e1b 5932009-06-29 Robert Millan <rmh.grub@aybabtu.com>
594
595 Fix build on Debian / sparc.
596
597 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
598
18b6c557 5992009-06-28 Pavel Roskin <proski@gnu.org>
600
85f2aab6 601 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
602 fix a warning.
603
18b6c557 604 * util/grub.d/10_linux.in: Match SUSE style initrd names.
605
ad760f81 6062009-06-27 Robert Millan <rmh.grub@aybabtu.com>
607
608 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
609 `err'.
610
87a4623b 6112009-06-27 Robert Millan <rmh.grub@aybabtu.com>
612
613 Revert r2338.
614
615 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
616 file can't be opened. grub_file_open() is already supposed to set
75421ca9 617 grub_errno / grub_errmsg appropriately.
87a4623b 618 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
619
8231fb77 6202009-06-27 Pavel Roskin <proski@gnu.org>
6212009-06-27 Robert Millan <rmh.grub@aybabtu.com>
622
623 * include/grub/dl.h: Include grub/elf.h.
624 (struct grub_dl): Add symtab field.
625 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
626 GRUB_MODULES_MACHINE_READONLY.
627 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
628 of the header for read-only modules.
629 (grub_dl_unload): Free mod->symtab for read-only modules.
630 * kern/i386/dl.c: Use mod->symtab.
631 * kern/powerpc/dl.c: Likewise.
632 * kern/sparc64/dl.c: Likewise.
633 * kern/x86_64/dl.c: Likewise.
634
635 * conf/i386-qemu.rmk: New file.
636 * kern/i386/qemu/startup.S: Likewise.
637 * kern/i386/qemu/mmap.c: Likewise.
638 * boot/i386/qemu/boot.S: Likewise.
639 * include/grub/i386/qemu/time.h: Likewise.
640 * include/grub/i386/qemu/serial.h: Likewise.
641 * include/grub/i386/qemu/kernel.h: Likewise.
642 * include/grub/i386/qemu/console.h: Likewise.
643 * include/grub/i386/qemu/boot.h: Likewise.
644 * include/grub/i386/qemu/init.h: Likewise.
645 * include/grub/i386/qemu/machine.h: Likewise.
646 * include/grub/i386/qemu/loader.h: Likewise.
647 * include/grub/i386/qemu/memory.h: Likewise.
648
649 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
650 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
651 [qemu] (pkglib_IMAGES): Add `boot.img'.
652 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
653 [qemu] (boot_img_FORMAT): New variables.
654 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
655 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
656 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
657 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
658 [qemu] (kernel_img_FORMAT): New variables.
659
660 * configure.ac: Recognise `i386-qemu'.
661
662 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
663 (for no compression).
664 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
665 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
666 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
667 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
668 ifdefs).
669
97fe384e 6702009-06-27 Pavel Roskin <proski@gnu.org>
671
672 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
673 read.
674 * efiemu/prepare32.c: Likewise.
675 * efiemu/prepare64.c: Likewise.
676
c402ab17 6772009-06-26 Pavel Roskin <proski@gnu.org>
678
679 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
680 * include/grub/elf.h: Define symbols without "32" or "64" based
681 on GRUB_TARGET_WORDSIZE.
682 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
683 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
684 ELF definitions.
685 * efiemu/loadcore64.c: Likewise.
686 * loader/i386/bsd32.c: Likewise.
687 * loader/i386/bsd64.c: Likewise.
688 * kern/dl.c: Remove own ELF definitions.
689 * util/i386/efi/grub-mkimage.c: Likewise.
690
9bbdfd4d 6912009-06-23 Robert Millan <rmh.grub@aybabtu.com>
692
693 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
694 segment 0x0 unconditionally, because the reference generated by
695 GAS is an absolute address.
696
a42ce6e9 6972009-06-22 Robert Millan <rmh.grub@aybabtu.com>
698
699 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
700 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
701
c952cf92 7022009-06-22 Robert Millan <rmh.grub@aybabtu.com>
703
704 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
705 indexes. Check for -f explicitly.
cc3752ad 706 (search_file): Improve error message.
707 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 708
132a0a59 7092009-06-22 Robert Millan <rmh.grub@aybabtu.com>
710
711 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
712 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
713
387a140c 7142009-06-22 Robert Millan <rmh.grub@aybabtu.com>
715
716 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
717 * conf/i386-ieee1275.rmk: Likewise.
718 * conf/i386-coreboot.rmk: Likewise.
719
720 * kern/i386/pc/startup.S (grub_stop): Remove function.
721 * kern/i386/ieee1275/startup.S: Likewise.
722 * kern/i386/coreboot/startup.S: Likewise.
723 * kern/i386/misc.S (grub_stop): New function.
724
41da9665 7252009-06-22 Robert Millan <rmh.grub@aybabtu.com>
726
727 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
728 * kern/i386/realmode.S (real_to_prot): ... to here.
729
bf337234 7302009-06-22 Robert Millan <rmh.grub@aybabtu.com>
731
732 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
733 with `kernel.img'.
734 (kernel_elf_SOURCES): Rename to ...
735 (kernel_img_SOURCES): ... this.
736 (kernel_elf_HEADERS): Rename to ...
737 (kernel_img_HEADERS): ... this. Update all users.
738 (kernel_elf_ASFLAGS): Rename to ...
739 (kernel_img_ASFLAGS): ... this.
740 (kernel_elf_CFLAGS): Rename to ...
741 (kernel_img_CFLAGS): ... this.
742 (kernel_elf_LDFLAGS): Rename to ...
743 (kernel_img_LDFLAGS): ... this.
744 * conf/i386-coreboot.rmk: Likewise.
745 * conf/powerpc-ieee1275.rmk: Likewise.
746
747 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
748 with "kernel.img".
749
f52196ff 7502009-06-21 Pavel Roskin <proski@gnu.org>
751
c3cee413 752 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
753 to match nested functions.
754 * loader/sparc64/ieee1275/linux.c: Likewise.
755
f52196ff 756 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
757
58750afc 7582009-06-21 Robert Millan <rmh.grub@aybabtu.com>
759
760 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
761 all i386 platforms.
762
15355c7d 7632009-06-21 Robert Millan <rmh.grub@aybabtu.com>
764
765 Fix asm file handling on ELF, and remove workarounds.
766
767 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 768 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 769 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
770 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
771
3f3ec72b 7722009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
773
774 Load BSD ELF modules
775
776 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
777 and loader/i386/bsd64.c
778 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
779 (FREEBSD_MODTYPE_ELF_MODULE): New definition
780 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
781 (grub_freebsd_load_elfmodule32): New declaration
782 (grub_freebsd_load_elfmoduleobj64): Likewise
783 (grub_freebsd_load_elf_meta32): Likewise
784 (grub_freebsd_load_elf_meta64): Likewise
785 (grub_freebsd_add_meta): Likewise
786 (grub_freebsd_add_meta_module): Likewise
787 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
788 (grub_freebsd_add_meta_module): Likewise and move module-specific
789 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
790 (grub_cmd_freebsd): Add elf-kernel specific parts
791 based on grub_freebsd_add_meta_module
792 (grub_cmd_freebsd_module): Add type parsing moved from
793 grub_freebsd_add_meta_module
794 (grub_cmd_freebsd_module_elf): New function
795 (cmd_freebsd_module_elf): New variable
796 (GRUB_MOD_INIT): Register freebsd_module_elf
797 * loader/i386/bsd32.c: New file
798 * loader/i386/bsd64.c: Likewise
799 * loader/i386/bsdXX.c: Likewise
800 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
801 (grub_elf64_load): Likewise
802 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
803 All users updated
804 (grub_elf64_load_hook_t): Likewise
805
0db15301 8062009-06-21 Colin Watson <cjwatson@ubuntu.com>
807
808 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
809 variable.
810 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
811 don't write a menu entry for recovery mode.
812
546796c1 8132009-06-20 Robert Millan <rmh.grub@aybabtu.com>
814
815 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
816 after it's no longer needed.
817
cd7310d5 8182009-06-20 Robert Millan <rmh.grub@aybabtu.com>
819
820 * include/grub/i386/loader.h (grub_linux_prot_size)
821 (grub_linux_tmp_addr, grub_linux_real_addr)
822 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
823 GRUB_MACHINE_PCBIOS.
824 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
825 common grub_util_info() call to ...
826 (generate_image): ... here.
827 Fix use of uninitialized memory, comparison of signed with
828 unsigned integers and memory leak.
829 Remove bogus module address message.
830
ab32d3b5 8312009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
832
833 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
834 grub_raid_register
835 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
836
024ef597 8372009-06-19 Pavel Roskin <proski@gnu.org>
838
839 * configure.ac: Remove stray AC_MSG_CHECKING.
840
3ac72b51 8412009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
842
843 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 844
e14cd814 8452009-06-18 Pavel Roskin <proski@gnu.org>
846
847 * conf/common.rmk: Add fs_file.mod.
848 * disk/fs_file.c: New file.
849 * include/grub/disk.h (enum grub_disk_dev_id): Add
850 GRUB_DISK_DEVICE_FILE_ID.
851
26586d98 8522009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
853
854 Fix build with Apple's toolchain. Part 2
855
856 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
857 a fake start
858
26de2bcd 8592009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
860
861 Fix build with Apple's toolchain. Part 1
862
863 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
864 for long calls
865 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 866 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 867 Apple's toolchain
868
09b3490b 8692009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
870
871 Fix warnings
872
873 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
874 (decomp_block): initialize ch
875 use grub_memcpy instead of memcpy
876
c22a006a 8772009-06-17 Pavel Roskin <proski@gnu.org>
878
d3638678 879 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
880 version, use declarations needed to use vga_text as the startup
881 console.
882
c22a006a 883 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
884 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
885 the kernel.
886 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
887 and grub_at_keyboard_fini(), it's done on module load and
888 unload.
889
05b129e0 8902009-06-17 Felix Zielcke <fzielcke@z-51.de>
891
892 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
893 file can't be found.
894 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
895
cf24ed9e 8962009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
897
898 Fix newline handling
899
900 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 901 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 902 (grub_script_yylex): don't segfault on unterminated script
903 newline terminates command and variable
904
74aa8e4b 9052009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
906
907 avoid double grub_adjust_range call. Bug reported by David Simner
908
909 * kern/disk.c (grub_disk_write): change to raw disk access before
910 calling disk_read
911
1bd265f3 9122009-06-17 Colin Watson <cjwatson@ubuntu.com>
913
914 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
915 spaces, for the benefit of help2man.
916 * util/i386/efi/grub-mkimage.c (usage): Likewise.
917
a2d08c06 9182009-06-16 Pavel Roskin <proski@gnu.org>
919
920 * kern/i386/halt.c: Include grub/machine/init.h.
921 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
922
b97bcb19 9232009-06-16 Felix Zielcke <fzielcke@z-51.de>
924
925 * util/grub.d/30_os-prober.in: Use ${root} in the generated
926 drivemap menuentry.
927
0644f96c 9282009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
929
930 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
931 `echo' command.
932
3ef17a2e 9332009-06-16 Pavel Roskin <proski@gnu.org>
934
935 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
936 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
937 save %dx, we only need %dl and we never change it.
938 * boot/i386/pc/cdboot.S: Don't set the root drive.
939 * boot/i386/pc/pxeboot.S: Likewise.
940 * include/grub/i386/pc/boot.h: Remove
941 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
942 GRUB_BOOT_MACHINE_DRIVE_CHECK.
943 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
944 * kern/i386/pc/init.c (make_install_device): Remove references
945 to grub_root_drive.
946 * kern/i386/pc/startup.S: Likewise.
947 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
948
693fe637 9492009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
950
951 xnu_uuid command
952
953 * commands/xnu_uuid.c: new file
954 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
955 (xnu_uuid_mod_SOURCES): new variable
956 (xnu_uuid_mod_CFLAGS): likewise
957 (xnu_uuid_mod_LDFLAGS): likewise
958 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
959 * conf/i386-ieee1275.rmk: likewise
960 * conf/i386-pc.rmk: likewise
961 * conf/powerpc-ieee1275.rmk: likewise
962 * conf/sparc64-ieee1275.rmk: likewise
963 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
964
c9da87d0 9652009-06-16 Pavel Roskin <proski@gnu.org>
966
967 * configure.ac: Avoid '==' in test command, it's not portable.
968
9c6f4596 9692009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
970
971 Probe command
972
973 * commands/probe.c: new file
974 * conf/common.rmk (pkglib_MODULES): add probe.mod
975 (probe_mod_SOURCES): new variable
976 (probe_mod_CFLAGS): likewise
977 (probe_mod_LDFLAGS): likewise
978 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
979 * conf/i386-ieee1275.rmk: likewise
980 * conf/i386-pc.rmk: likewise
981 * conf/powerpc-ieee1275.rmk: likewise
982 * conf/sparc64-ieee1275.rmk: likewise
983
70b7f9fd 9842009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
985
986 Fix handling of string like \"hello\" and "a
987 b"
988
989 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
990 (grub_script_yylex): fix parsing of quoting, escaping and newline
991
71c79a6b 9922009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
993
dd74360c 994 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 995 handling
dd74360c 996
0644f96c 9972009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 998
999 * util/grub-mkconfig.in: Fix parsing of --output option.
1000
e40893c3 10012009-06-12 Pavel Roskin <proski@gnu.org>
1002
1003 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
1004 genmk.rb don't need to be generated or installed.
1005
3a1acfe2 10062009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
1007
1008 * commands/i386/pc/drivemap_int13h.S: add more comments
1009
3a4575d4 10102009-06-11 Pavel Roskin <proski@gnu.org>
1011
0658e928 1012 * Makefile.in (uninstall): Uninstall manuals.
1013
ca0388f0 1014 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1015 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
1016 and update-grub_lib in two places.
1017 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1018
e3b27c39 1019 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1020 a compiler warning.
1021
3a4575d4 1022 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1023 `entry_lo' to fix variable shadowing.
1024
af1f4f55 10252009-06-11 Christian Franke <franke@computer.org>
1026
1027 * kern/misc.c (__enable_execute_stack): Add missing return type
1028 to prevent gcc warning.
1029
5225e649 10302009-06-11 Felix Zielcke <fzielcke@z-51.de>
1031
1032 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1033
7d83bd47 10342009-06-11 Pavel Roskin <proski@gnu.org>
1035
c1cb63ba 1036 * Makefile.in: Don't rely on any scripts being executable.
1037 Always use $(SHELL) to run shell scripts.
1038
7d83bd47 1039 * configure.ac: Always define ___main if using -nostdlib. This
1040 fixes tests on Cygwin.
1041
948f48e7 10422009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1043
1044 UDF fix
1045
7d83bd47 1046 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 1047 is in bytes and not in blocks
7d83bd47 1048
8ada9bc1 10492009-06-11 Pavel Roskin <proski@gnu.org>
1050
1051 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1052 warning.
1053
25ad2323 10542009-06-11 Felix Zielcke <fzielcke@z-51.de>
1055
1056 * util/grub.d/30_os-prober.in: Fix a comment. Source
1057 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1058 to set the root device. Place drivemap command in the generated
1059 chain entry.
1060
e65acb0c 10612009-06-11 Pavel Roskin <proski@gnu.org>
1062
1063 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1064 have long been resolved.
1065
f285fe2d 10662009-06-11 Colin Watson <cjwatson@ubuntu.com>
1067
bd47b0b5 1068 * util/grub.d/10_linux.in: Capitalise "Linux".
1069
f285fe2d 1070 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1071
a0c62e4e 10722009-06-11 Pavel Roskin <proski@gnu.org>
1073
b6783cb2 1074 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1075 fix a gcc warning and ensure that the function won't ever exit.
1076
dde032e8 1077 * kern/i386/ieee1275/init.c: Add missing prototype for
1078 grub_stop_floppy().
1079
22cd079d 1080 * loader/ieee1275/multiboot2.c [__i386__]: Include
1081 grub/cpu/multiboot.h.
1082
a0c62e4e 1083 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1084 casts to short - they are not portable and cause warnings. Fix
1085 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1086
63963d17 10872009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1088
1089 Drivemap fixes
1090
1091 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1092 new function
1093 (grub_get_root_biosnumber_saved): new variable
1094 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1095 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 1096 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 1097 %dx after the call if necessary
1098 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1099 (boot_mod_SOURCES): remove
1100 (boot_mod_CFLAGS): remove
1101 (boot_mod_LDFLAGS): remove
1102 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1103 (boot_mod_SOURCES): new variable
1104 (boot_mod_CFLAGS): likewise
1105 (boot_mod_LDFLAGS): likewise
1106 * conf/i386-efi.rmk: likewise
1107 * conf/i386-ieee1275.rmk: likewise
1108 * conf/i386-pc.rmk: likewise
1109 * conf/powerpc-ieee1275.rmk: likewise
1110 * conf/sparc64-ieee1275.rmk: likewise
1111 * conf/x86_64-efi.rmk: likewise
1112 * include/grub/i386/pc/biosnum.h: new file
1113 * lib/i386/pc/biosnum.c: likewise
1114 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1115 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1116 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 1117
33abf7ae 11182009-06-10 Pavel Roskin <proski@gnu.org>
1119
5ac35b35 1120 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1121 Use separate variables. Read only the file size at the end, but
1122 not the checksum that we don't use.
1123
5c5215d5 1124 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1125 Adjust all callers.
1126
27d5fef7 1127 * kern/ieee1275/openfw.c: Remove libc includes.
1128 * kern/ieee1275/cmain.c: Likewise.
1129 * include/grub/ieee1275/ieee1275.h: Likewise.
1130
33abf7ae 1131 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1132 compiler warnings.
1133
d2d49665 11342009-06-10 Felix Zielcke <fzielcke@z-51.de>
1135
1136 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1137 `genparttoollist.sh'.
1138 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1139 Add `*.sh' to the list find searches for and change `mdate.sh'
1140 to `mdate-sh'.
1141
fe052e37 11422009-06-10 Pavel Roskin <proski@gnu.org>
1143
2763ac18 1144 * include/grub/multiboot2.h: Provide compatibility defines for
1145 multiboot2.h.
1146 * include/multiboot2.h: Include stdint.h only if needed, using
1147 angle brackets.
1148 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1149 grub/multiboot2.h.
1150 * loader/ieee1275/multiboot2.c: Likewise.
1151 * loader/multiboot2.c: Likewise.
1152 * loader/multiboot_loader.c: Likewise.
1153
437e6adc 1154 * configure.ac: Use -nostdlib when probing for the target. It
1155 should not be required to have libc for the target.
1156
06a6836c 1157 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1158 they fail without libc headers for the target.
1159 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1160 exports.
1161 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1162 preprocessor conditionals.
1163
fe052e37 1164 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1165 build system doesn't need to be aware of the tar.c internals.
1166
afd22553 11672009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 1168
afd22553 1169 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 1170
6b787c4f 11712009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1172
1173 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1174 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1175
11762009-06-09 Felix Zielcke <fzielcke@z-51.de>
1177
1178 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 1179 aren't available if ata.mod gets used.
6b787c4f 1180
473d1e45 11812009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 1182
473d1e45 1183 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 1184 initialising controller.
473d1e45 1185 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 1186
255a27d4 11872009-06-08 Felix Zielcke <fzielcke@z-51.de>
1188
1189 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1190 to choose between ata and biosdisk module on i386-pc.
1191
473d1e45 11922009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 1193
d55842d8 1194 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1195 Subclass and Programming Interface fields in terms of the 3 byte
1196 Class Code register.
1197 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1198
fa5db0b1 1199 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1200 interface is OHCI. Add grub_dprintf for symmetry with
1201 bus/usb/uhci.c.
1202 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1203 interface is UHCI. Add interf variable for programming
1204 interface. Print interface with class/subclass.
1205
c0947beb 1206 * bus/usb/ohci.c: Set interf with correct field.
1207
69da8877 1208 * bus/usb/uhci.c: Remove unneeded doubled lines.
1209 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1210 Remove whitespace inside comment.
1211
9e172e30 12122009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1213
1214 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1215 as fallback an equivalent option without depth.
1216
de65ee2b 12172009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1218
1219 Not fail if unable to retrieve C/H/S on LBA disks
1220
473d1e45 1221 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 1222 if unable to retrieve C/H/S on LBA disks
1223
b57ea2c9 12242009-06-08 Pavel Roskin <proski@gnu.org>
1225
1226 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1227 about aliasing.
1228
af361263 12292009-06-08 Felix Zielcke <fzielcke@z-51.de>
1230
1231 * Makefile.in (uninstall): Remove all $lib_DATA files.
1232
4c9ec6b3 12332009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1234
1235 Bugfix: install on partitionless device
1236
1237 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1238 is a whole disk
1239
e76fc924 12402009-06-08 Felix Zielcke <fzielcke@z-51.de>
1241
1242 * Makefile.in (uninstall): Remove all $include_DATA files.
1243
ba5a0d05 12442009-06-08 Felix Zielcke <fzielcke@z-51.de>
1245
1246 * commands/true.c: New file. Implement the true and false commands.
1247 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1248 (true_mod_SOURCES): New variable.
1249 (true_mod_CFLAGS): Likewise.
1250 (true_mod_LDFLAGS): Likewise.
1251
c8048e32 12522009-06-05 Colin D Bennett <colin@gibibit.com>
1253
1254 Optimized font character lookup using binary search instead of linear
1255 search. Fonts now are required to have the character index ordered by
1256 code point.
1257
1258 * font/font.c (load_font_index): Verify that fonts have ordered
1259 character indices.
1260 (find_glyph): Use binary search instead of linear search to find a
1261 character in a font.
1262
408305be 12632009-06-05 Michael Scherer <misc@mandriva.org>
1264
1265 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1266 uses case sensitive btree.
1267 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1268 only for case insensitive filesystems.
1269
8ee1e0d9 12702009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1271
1272 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1273 * conf/common.rmk (search_mod_CFLAGS): likewise
1274
a9966eb1 12752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1276
473d1e45 1277 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 1278 compensate a compiler bug
1279
9e7100fb 12802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1281
473d1e45 1282 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 1283 instead of '\b'
473d1e45 1284
ede21d71 12852009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1286
1287 Definitions for creating asm symbols with Apple's CC
1288
1289 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1290 [APPLE_CC] (VARIABLE): likewise
1291
9dbf7653 12922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1293
1294 Disable lnxboot.img when compiled
1295 with Apple's CC
1296
1297 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1298 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1299 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1300 [! APPLE_CC] (CODE_LENG): skip
1301 [! APPLE_CC] (setup_sects): likewise
1302 [! APPLE_CC]: skip filling
473d1e45 1303
e93cdc3d 13042009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1305
1306 Address in trampolines based on 32-bit registers when compiled
1307 with Apple's CC
1308
473d1e45 1309 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 1310 for addresses
1311 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1312
6c688477 13132009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1314
1315 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1316
1317 * kern/misc.c [APPLE_CC] (memcpy): new function
1318 [APPLE_CC] (memmove): likewise
1319 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 1320 (memcpy): define alias conditionally on !APPLE_CC
6c688477 1321 (memset): likewise
1322 (abort): likewise
1323 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1324 APPLE_CC are defined
1325 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1326 (grub_assert_fail): make prototype conditional
1327
e37ffc5c 13282009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1329
1330 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1331
473d1e45 1332 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1333 grub-macho2img
e37ffc5c 1334 (CLEANFILES): add grub-macho2img
1335 (grub_macho2img_SOURCES): new variable
1336 * kern/i386/pc/startup.S (bss_start): new variable
1337 (bss_end): likewise
1338 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1339 * util/grub-macho2img.c: new file
1340
cf00df31 13412009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1342
1343 Use objconv when compiling with Apple's CC
1344
1345 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1346 (efiemu64.o): likewise
1347 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1348 when compiling with Apple's CC
1349 (efiemu64_s.o): likewise
1350 * configure.ac: check for objconv when compiling with Apple's CC
1351 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 1352
d119a20c 13532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1354
1355 Define segment as well as section when compiling with
1356 Apple's CC
1357
1358 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1359 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1360 (efiemu_convert_pointer): likewise
1361 (efiemu_set_virtual_address_map): likewise
1362 (efiemu_convert_pointer): likewise
1363 (efiemu_getcrc32): likewise
1364 (init_crc32_table): likewise
1365 (reflect): likewise
1366 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1367 (GRUB_MOD_DEP): likewise
473d1e45 1368
c8600122 13692009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1370
1371 Allow a compilation without -mcmodel=large
1372
1373 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1374 when compiled without -mcmodel=large
473d1e45 1375 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 1376 without -mcmodel=large
473d1e45 1377 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 1378 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 1379
e8df1d4e 13802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1381
1382 Remove nested functions in efiemu core
1383
1384 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 1385
cc6c3ac1 13862009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1387
1388 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1389
1390 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1391 temporary storage
473d1e45 1392 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1393 using Apple's CC
cc6c3ac1 1394 (grub_cpu_is_tsc_supported): likewise
1395 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 1396
3e325901 13972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1398
1399 Absolute addressing through constant with Apple's cc
1400
1401 * kern/i386/pc/startup.S: Define necessary constants
1402 and address through it when using ABS with Apple's CC
1403 * boot/i386/pc/diskboot.S: likewise
1404 * boot/i386/pc/boot.S: likewise
1405 * boot/i386/pc/lnxboot.S: likewise
1406 * boot/i386/pc/cdboot.S: likewise
1407 * mmap/i386/pc/mmap_helper.S: likewise
1408 * commands/i386/pc/drivemap_int13h.S: likewise
1409
2b167a72 14102009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1411
1412 Check if compiler is apple cc
1413
1414 * Makefile.in (ASFLAGS): new variable
1415 (TARGET_ASFLAGS): likewise
1416 (TARGET_MODULE_FORMAT): likewise
1417 (TARGET_APPLE_CC): likewise
1418 (OBJCONV): likewise
1419 (TARGET_IMG_CFLAGS): likewise
1420 (TARGET_CPPFLAGS): add includedir
1421 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1422 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1423 Check for linker script only if compiler isn't Apple's CC
1424 (TARGET_MODULE_FORMAT): set
1425 (TARGET_APPLE_CC): likewise
1426 (TARGET_ASFLAGS): likewise
1427 (ASFLAGS): likewise
1428 Check for objcopy only if compiler isn't Apple's CC
1429 Check for BSS symbol only if compiler isn't Apple's CC
1430 * genmk.rb: adapt nm options if we use Apple's utils
1431 * aclocal.m4 (grub_apple_cc): new test
1432 (grub_apple_target_cc): likewise
473d1e45 1433
fb14123e 14342009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1435
1436 Simplify sed expressions and improve awk
1437
1438 * Makefile.in (install-local): simplify sed expression
1439 * gencmdlist.sh: likewise
1440 * genmoddep.awk: avoid adding module as a dependency of itself
1441
5b889789 14422009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1443
1444 Add missing start symbols
1445
1446 * boot/i386/pc/boot.S: add start
fb14123e 1447 * boot/i386/pc/pxeboot.S: likewise
473d1e45 1448
fd2bf2e3 14492009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1450
1451 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 1452
1453 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 1454 (relocate_addresses): consider both r_addend and value at offset
1455 (make_mods_section): zerofill modinfo and header
1456 (convert_elf): write prefix here
473d1e45 1457
5389763d 14582009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1459
1460 Use .asciz instead of .string
1461
1462 * i386/pc/diskboot.S: use .asciz instead of .string
1463 * i386/pc/boot.S: likewise
1464 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1465 (GRUB_MOD_NAME): likewise
473d1e45 1466
3eb5ed4e 14672009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1468
1469 gfxpayload support
1470
1471 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1472 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1473 (grub_video_setup): remove
1474 (grub_video_set_mode): new prototype
1475 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1476 (vid_mode): remove
1477 (linux_vesafb_res): compile only on PCBIOS
1478 (grub_linux_boot): support gfxpayload
1479 * loader/i386/pc/xnu.c (video_hook): new function
1480 (grub_xnu_set_video): support gfxpayload
1481 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1482 (DEFAULT_VIDEO_HEIGHT): likewise
1483 (DEFAULT_VIDEO_FLAGS): likewise
1484 (DEFAULT_VIDEO_MODE): new definition
1485 (video_hook): new function
1486 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 1487 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 1488 loading xnu
1489 * video/video.c (grub_video_setup): removed
473d1e45 1490 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 1491 grub_video_setup
1492
4b0e1143 14932009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1494
1495 Avoid calling biosdisk in drivemap
1496
1497 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1498 (revparse_biosdisk): likewise
1499 (list_mappings): derive name from id directly
1500 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 1501
fda6cb98 15022009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1503
1504 Script fixes
1505
1506 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1507 (grub_lexer_param): add tokenonhold
1508 (grub_script_create_cmdline): remove cmdline. All callers updated
1509 (grub_script_function_create): make functionname
1510 grub_script_arg. All callers updated
1511 (grub_script_execute_argument_to_string): new prototype
1512 * kern/parser.c (state_transitions): reorder
1513 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 1514 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 1515 make global
1516 (grub_script_execute_cmdline): use new format
1517 * script/sh/function.c (grub_script_function_create): make functionname
1518 grub_script_arg. All callers updated
473d1e45 1519 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 1520 (grub_script_yylex): remove
1521 (grub_script_yylex2): renamed to ...
1522 (grub_script_yylex): ...renamed
1523 parse the expressions like a${b}c
1524 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1525 (GRUB_PARSER_TOKEN_VAR): remove
1526 (GRUB_PARSER_TOKEN_NAME): likewise
1527 ("if"): declare as typeless
1528 ("while"): likewise
1529 ("function"): likewise
1530 ("else"): likewise
1531 ("then"): likewise
1532 ("fi"): likewise
1533 (text): remove
1534 (argument): likewise
1535 (script): accept empty scripts and make exit on error
1536 (arguments): use GRUB_PARSER_TOKEN_ARG
1537 (function): likewise
1538 (command): move error handling to script
1539 (menuentry): move grub_script_lexer_ref before
473d1e45 1540 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 1541 argument. All callers updated
1542
f4448a07 15432009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1544
1545 Prevent GRUB from probing floppies during boot.
1546
1547 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1548 * commands/search.c (options): Add --no-floppy.
1549 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1550 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1551 --no-floppy when searching for UUIDs.
1552
2bf5885a 15532009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1554
1555 Simplify the code duplication in commands/search.c.
1556
1557 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1558 (search_fs): ... this. Update all users.
1559
f6fd460a 15602009-06-03 Felix Zielcke <fzielcke@z-51.de>
1561
1562 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1563
cbb3c83e 15642009-05-28 Pavel Roskin <proski@gnu.org>
1565
57788cfd 1566 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1567 Remove the original symlink explicitly.
1568
cbb3c83e 1569 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1570 just one slash. That's how grub_fshelp_find_file() does it.
1571
cd0d5e30 15722009-05-26 Pavel Roskin <proski@gnu.org>
1573
f0f8bbe2 1574 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1575 to `str'.
1576
cd0d5e30 1577 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1578 possibly unused.
1579
8c2cab51 15802009-05-25 Christian Franke <franke@computer.org>
1581
1582 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1583 register.
1584 (grub_atapi_identify): Add wait after drive select.
1585 (grub_ata_identify): Do more strict status register check before
1586 calling grub_atapi_identify (). Suppress error message if status
1587 register is 0x00 after command failure. Add status register
1588 check after PIO read to avoid bogus identify due to stuck DRQ.
1589 Thanks to Pavel Roskin for testing.
1590 (grub_device_initialize): Remove unsafe status register check.
1591 Thanks to 'phcoder' for problem report and patch.
1592 Prevent sign extension in debug message.
1593
230c0ad6 15942009-05-23 Colin D Bennett <colin@gibibit.com>
1595
1596 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1597 definition file, and functions defined in `normal/menu.c' have had
1598 their prototypes moved to `include/grub/menu.h' for consistency.
1599
1600 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1601 from normal.h.
1602 (grub_menu_get_entry): Likewise.
1603 (grub_menu_get_timeout): Likewise.
1604 (grub_menu_set_timeout): Likewise.
1605 (grub_menu_execute_entry): Likewise.
1606 (grub_menu_execute_with_fallback): Likewise.
1607 (grub_menu_entry_run): Likewise.
1608
1609 * include/grub/normal.h: Re-ordered and grouped function
1610 prototypes by file that the function is defined in.
1611 (grub_menu_execute_callback): Removed; moved to menu.h.
1612 (grub_menu_get_entry): Likewise.
1613 (grub_menu_get_timeout): Likewise.
1614 (grub_menu_set_timeout): Likewise.
1615 (grub_menu_execute_entry): Likewise.
1616 (grub_menu_execute_with_fallback): Likewise.
1617 (grub_menu_entry_run): Likewise.
1618 (grub_menu_addentry): Renamed from this ...
1619 (grub_normal_add_menu_entry): ... to this.
1620
1621 * normal/main.c (grub_menu_addentry): Renamed from this ...
1622 (grub_normal_add_menu_entry): ... to this.
1623
1624 * script/sh/execute.c (grub_script_execute_menuentry): Update
1625 reference to renamed grub_menu_addentry function.
1626
861f03a5 16272009-05-23 Felix Zielcke <fzielcke@z-51.de>
1628
1629 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1630
96b1619a 16312009-05-22 Pavel Roskin <proski@gnu.org>
1632
bf6a5fb2 1633 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1634 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1635 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1636 compiling for the i386 targets, but not for the utilities.
1637
96b1619a 1638 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1639 to grub_uint8_t.
1640 (grub_root_drive): Likewise.
1641 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1642 remove alignment.
1643 (grub_root_drive): Change size to byte.
1644 (grub_start_addr): Remove.
1645 (grub_end_addr): Likewise.
1646 (grub_apm_bios_info): Likewise.
1647
b729776b 16482009-05-21 Felix Zielcke <fzielcke@z-51.de>
1649
1650 * normal/i386: Remove.
1651 * normal/powerpc: Likewise.
1652 * normal/sparc64: Likewise.
1653 * normal/x86_64: Likewise.
1654
0a15ce80 16552009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1656
1657 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 1658 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 1659 * loader/i386/xnu_helper.S: Likewise
d6da58e6 1660
33db9015 16612009-05-18 Colin D Bennett <colin@gibibit.com>
1662
d6da58e6 1663 Display error messages when parsing a Lua statement fails.
1664 Previously, executing a syntactically invalid statement like
1665 ")foo" or "bar;" would silently fail.
33db9015 1666
1667 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 1668 (grub_lua_parse_line): Improved reporting of Lua parser and
1669 execution errors.
33db9015 1670
46422c89 16712009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1672
1673 Remove -Werror which causes build to fail on some systems
1674
1675 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1676 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1677 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 1678
22f53a96 16792009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1680
1681 trampoline for linux on 64-bit platform
1682
18f547ad 1683 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1684 loader/i386/efi/linux_trampoline.S
1685 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 1686 declaration
d6da58e6 1687 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1688 here
22f53a96 1689 * loader/i386/linux_trampoline.S: moved here
d6da58e6 1690 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1691 trampoline
22f53a96 1692 (jumpvector): removed
1693 (grub_linux_trampoline_start): new declaration
1694 (grub_linux_trampoline_end): likewise
1695 (grub_linux_boot): use trampoline when on 64-bit platform
1696 * loader/i386/linux.c: likewise
1697
cb5a0f40 16982009-05-16 Pavel Roskin <proski@gnu.org>
1699
1700 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1701 const to avoid a warning.
1702 (grub_lua_setenv): Likewise.
1703 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1704 lmsg to fix a warning.
1705
334f2c28 17062009-05-16 Felix Zielcke <fzielcke@z-51.de>
1707
1708 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 1709 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1710 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1711 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1712 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1713 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1714 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1715 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 1716
59e5d3ec 17172009-05-16 Felix Zielcke <fzielcke@z-51.de>
1718
1719 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1720
9d87a1ba 17212009-05-16 Bean <bean123ch@gmail.com>
1722
1723 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1724 (lua_mod_SOURCES): New variable.
1725 (lua_mod_CFLAGS): Likewise.
1726 (lua_mod_LDFLAGS): Likewise.
1727
1728 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1729 (setjmp_mod_SOURCES): New variable.
1730 (setjmp_mod_CFLAGS): Likewise.
1731 (setjmp_LDFLAGS): Likewise.
1732
1733 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1734 (setjmp_mod_SOURCES): New variable.
1735 (setjmp_mod_CFLAGS): Likewise.
1736 (setjmp_LDFLAGS): Likewise.
1737
1738 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1739 (setjmp_mod_SOURCES): New variable.
1740 (setjmp_mod_CFLAGS): Likewise.
1741 (setjmp_LDFLAGS): Likewise.
1742
1743 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1744 (setjmp_mod_SOURCES): New variable.
1745 (setjmp_mod_CFLAGS): Likewise.
1746 (setjmp_LDFLAGS): Likewise.
1747
1748 * normal/i386/setjmp.S: Moved from here ...
1749 * lib/i386/setjmp.S: ... Moved here
1750 * normal/x86_64/setjmp.S: Moved from here ...
1751 * lib/x86_64/setjmp.S: ... Moved here
1752 * normal/powerpc/setjmp.S: Moved from here ...
1753 * lib/powerpc/setjmp.S: ... Moved here
1754 * normal/sparc64/setjmp.S: Moved from here ...
1755 * lib/sparc64/setjmp.S: ... Moved here
1756
1757 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1758 returns_twice in mingw.
1759
1760 * script/lua/grub_lib.c: New file.
1761 * script/lua/grub_lib.h: Likewise.
1762 * script/lua/grub_lua.h: Likewise.
1763 * script/lua/grub_main.c: Likewise.
1764 * script/lua/lapi.c: Likewise.
1765 * script/lua/lapi.h: Likewise.
1766 * script/lua/lauxlib.c: Likewise.
1767 * script/lua/lauxlib.h: Likewise.
1768 * script/lua/lbaselib.c: Likewise.
1769 * script/lua/lcode.c: Likewise.
1770 * script/lua/lcode.h: Likewise.
1771 * script/lua/ldblib.c: Likewise.
1772 * script/lua/ldebug.c: Likewise.
1773 * script/lua/ldebug.h: Likewise.
1774 * script/lua/ldo.c: Likewise.
1775 * script/lua/ldo.h: Likewise.
1776 * script/lua/ldump.c: Likewise.
1777 * script/lua/lfunc.c: Likewise.
1778 * script/lua/lfunc.h: Likewise.
1779 * script/lua/lgc.c: Likewise.
1780 * script/lua/lgc.h: Likewise.
1781 * script/lua/linit.c: Likewise.
1782 * script/lua/liolib.c: Likewise.
1783 * script/lua/llex.c: Likewise.
1784 * script/lua/llex.h: Likewise.
1785 * script/lua/llimits.h: Likewise.
1786 * script/lua/lmathlib.c: Likewise.
1787 * script/lua/lmem.c: Likewise.
1788 * script/lua/lmem.h: Likewise.
1789 * script/lua/loadlib.c: Likewise.
1790 * script/lua/lobject.c: Likewise.
1791 * script/lua/lobject.h: Likewise.
1792 * script/lua/lopcodes.c: Likewise.
1793 * script/lua/lopcodes.h: Likewise.
1794 * script/lua/loslib.c: Likewise.
1795 * script/lua/lparser.c: Likewise.
1796 * script/lua/lparser.h: Likewise.
1797 * script/lua/lstate.c: Likewise.
1798 * script/lua/lstate.h: Likewise.
1799 * script/lua/lstring.c: Likewise.
1800 * script/lua/lstring.h: Likewise.
1801 * script/lua/lstrlib.c: Likewise.
1802 * script/lua/ltable.c: Likewise.
1803 * script/lua/ltable.h: Likewise.
1804 * script/lua/ltablib.c: Likewise.
1805 * script/lua/ltm.c: Likewise.
1806 * script/lua/ltm.h: Likewise.
1807 * script/lua/lua.h: Likewise.
1808 * script/lua/luaconf.h: Likewise.
1809 * script/lua/lualib.h: Likewise.
1810 * script/lua/lundump.c: Likewise.
1811 * script/lua/lundump.h: Likewise.
1812 * script/lua/lvm.c: Likewise.
1813 * script/lua/lvm.h: Likewise.
1814 * script/lua/lzio.c: Likewise.
1815 * script/lua/lzio.h: Likewise.
1816
5e898c9d 18172009-05-16 Bean <bean123ch@gmail.com>
1818
1819 * include/grub/kernel.h (grub_module_header_types): Add type
1820 OBJ_TYPE_CONFIG.
1821
1822 * kern/main.c (grub_load_config): New function.
1823 (grub_main): Call grub_load_config to read boot config.
1824
1825 * grub-mkimage (generate_image): New parameter config_path.
1826 (options): New option --config.
1827 (main): Parse --config option, and pass it to generate_image.
1828
cf353a47 18292009-05-14 Christian Franke <franke@computer.org>
1830
1831 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1832 This fixes build on Cygwin.
1833
3834887f 18342009-05-14 Pavel Roskin <proski@gnu.org>
1835
1836 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1837 jump. This saves two bytes, so the typical case of 2 swapped
1838 drives would fit 32 bytes.
1839
8090fc01 18402009-05-13 Pavel Roskin <proski@gnu.org>
1841
ac963883 1842 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1843 grub_uint32_t to avoid a warning.
1844
8090fc01 1845 * loader/i386/linux.c (allocate_pages): When assigning
1846 real_mode_mem, cast through grub_size_t to fix a warning. The
1847 code already makes sure that the value would fit a pointer.
1848 (grub_linux_setup_video): Cast render_target->data to
1849 grub_size_t to fix a warning.
1850
18f547ad 18512009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 1852
1853 * commands/i386/pc/drivemap.c: New file - implement drivemap
1854 command.
1855 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1856 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1857
6f6a8b28 18582009-05-13 Pavel Roskin <proski@gnu.org>
1859
1860 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1861 embedding_area_exists.
1862
15fbf4c4 18632009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1864
1865 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1866 it easier to understand / work with.
59978c8a 1867 Improve warning messages for cases where there's no embedding area,
1868 or when it is too small (or core.img too large).
15fbf4c4 1869
238e871f 18702009-05-13 Pavel Roskin <proski@gnu.org>
1871
0ab3a9a4 1872 * loader/i386/pc/multiboot2.c: Add necessary includes for
1873 grub_multiboot2_real_boot().
1874
a2c8c5f8 1875 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1876 PX record is always little-endian. We only need the lower 2
1877 bytes of the mode.
1878
faec96af 1879 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1880 facilitate code reuse.
1881 (grub_cpio_mount): Use "struct head", not a char buffer. This
1882 fixes a warning reported by gcc 4.4.
1883
238e871f 1884 * kernel/disk.c (grub_disk_read): Use void pointer for the
1885 buffer.
1886 (grub_disk_write): Use const void pointer for the buffer.
1887 Adjust all callers. Remove unnecessary casts.
1888
901d2f0c 18892009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1890
1891 * util/i386/pc/grub-install.in: Update copyright year.
1892
18f547ad 18932009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 1894
1895 gptsync
1896
1897 * commands/gptsync.c: new file
1898 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1899 (gptsync_mod_SOURCES): new variable
1900 (gptsync_mod_CFLAGS): likewise
1901 (gptsync_mod_LDFLAGS): likewise
18f547ad 1902 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 1903 new definition
1904 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1905 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1906 * conf/i386-ieee1275.rmk: likewise
1907 * conf/i386-pc.rmk: likewise
1908 * conf/powerpc-ieee1275.rmk: likewise
1909
b4ba690a 19102009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1911
1912 Fixed grub-emu
1913
1914 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1915 (grub_dl_ref): likewise
1916
317e1a44 19172009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1918
1919 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1920 split in two functions (one for msdos and one for gpt).
1921
041b8094 19222009-05-08 Pavel Roskin <proski@gnu.org>
1923
752473c2 1924 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1925 not modified.
1926
041b8094 1927 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1928 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1929 Initialize them with -1. Add sanity check for bad1. Eliminate
1930 nerr variable.
1931
172800ce 19322009-05-08 David S. Miller <davem@davemloft.net>
1933
1934 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1935
29aa5e81 19362009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1937
1938 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 1939 existence.
29aa5e81 1940
96613b62 19412009-05-05 Felix Zielcke <fzielcke@z-51.de>
1942
1943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 1944 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 1945
eef73c8a 19462009-05-05 David S. Miller <davem@davemloft.net>
1947
1948 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1949
119494b5 19502009-05-05 Pavel Roskin <proski@gnu.org>
1951
1952 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1953 of grub_dl_ref() and grub_dl_unref().
1954 * commands/parttool.c: Remove preprocessor conditionals around
1955 grub_dl_ref() and grub_dl_unref().
1956 * fs/affs.c: Likewise.
1957 * fs/afs.c: Likewise.
1958 * fs/cpio.c: Likewise.
1959 * fs/ext2.c: Likewise.
1960 * fs/fat.c: Likewise.
1961 * fs/hfs.c: Likewise.
1962 * fs/hfsplus.c: Likewise.
1963 * fs/iso9660.c: Likewise.
1964 * fs/jfs.c: Likewise.
1965 * fs/minix.c: Likewise.
1966 * fs/ntfs.c: Likewise.
1967 * fs/reiserfs.c: Likewise.
1968 * fs/sfs.c: Likewise.
1969 * fs/udf.c: Likewise.
1970 * fs/ufs.c: Likewise.
1971 * fs/xfs.c: Likewise.
1972 * include/grub/dl.h: Likewise.
1973 * loader/xnu.c: Likewise.
1974
de5fd76e 19752009-05-04 Pavel Roskin <proski@gnu.org>
1976
1977 * commands/acpi.c: Remove unused variable my_mod.
1978 * partmap/amiga.c: Likewise.
1979 * partmap/apple.c: Likewise.
1980 * partmap/gpt.c: Likewise.
1981 * partmap/pc.c: Likewise.
1982 * partmap/sun.c: Likewise.
1983 * term/gfxterm.c: Likewise.
1984 * term/i386/pc/vesafb.c: Likewise.
1985 * term/i386/pc/vga.c: Likewise.
1986
983598ad 19872009-05-04 David S. Miller <davem@davemloft.net>
1988
1989 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1990 pointer args to grub_ieee1275_get_property().
1991
8aadec43 1992 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1993
9554b15e 1994 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1995 devices, and do not traverse down under controller nodes.
1996
67e23c90 1997 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1998 (grub_ofdisk_open): Use it to un-escape "," characters.
1999 * kern/disk.c (find_part_sep): New.
2000 (grub_disk_open): Use it to find the first non-escaped ','
2001 character in the disk name.
2002 * util/ieee1275/devicemap.c (escape_of_path): New.
2003 (grub_util_emit_devicemap_entry): Use it.
2004 * util/sparc64/ieee1275/grub-install.in: Update script to
2005 strip partition specifiers properly by not triggering on
2006 '\' escaped ',' characters.
2007
74bfdd2f 20082009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2009
2010 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2011 to 0x300.
2012 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2013 resolutions.
2014 (linux_vesafb_modes): Add a lot of additional modes to the list (based
2015 on documentation from Wikipedia).
2016
4241d2b1 20172009-05-04 Pavel Roskin <proski@gnu.org>
2018
2019 * disk/ata.c: Spelling fixes.
2020 * disk/raid.c: Likewise.
2021 * disk/usbms.c: Likewise.
2022 * disk/dmraid_nvidia.c: Likewise.
2023 * kern/ieee1275/openfw.c: Likewise.
2024 * kern/ieee1275/init.c: Likewise.
2025 * kern/ieee1275/cmain.c: Likewise.
2026 * boot/i386/pc/cdboot.S: Likewise.
2027 * video/readers/png.c: Likewise.
2028 * video/i386/pc/vbe.c: Likewise.
2029 * fs/udf.c: Likewise.
2030 * fs/hfs.c: Likewise.
2031 * fs/reiserfs.c: Likewise.
2032 * efiemu/runtime/efiemu.c: Likewise.
2033 * efiemu/main.c: Likewise.
2034 * efiemu/mm.c: Likewise.
2035 * include/grub/elf.h: Likewise.
2036 * include/grub/xnu.h: Likewise.
2037 * include/grub/usbdesc.h: Likewise.
2038 * include/grub/usb.h: Likewise.
2039 * include/grub/script_sh.h: Likewise.
2040 * include/grub/lib/LzmaEnc.h: Likewise.
2041 * include/grub/efiemu/efiemu.h: Likewise.
2042 * include/grub/command.h: Likewise.
2043 * normal/menu.c: Likewise.
2044 * normal/main.c: Likewise.
2045 * normal/datetime.c: Likewise.
2046 * bus/usb/uhci.c: Likewise.
2047 * mmap/i386/uppermem.c: Likewise.
2048 * mmap/mmap.c: Likewise.
2049 * commands/acpi.c: Likewise.
2050 * commands/test.c: Likewise.
2051 * partmap/apple.c: Likewise.
2052 * font/font.c: Likewise.
2053 * loader/sparc64/ieee1275/linux.c: Likewise.
2054 * loader/macho.c: Likewise.
2055 * loader/i386/bsd_trampoline.S: Likewise.
2056 * loader/i386/bsd.c: Likewise.
2057 * loader/xnu.c: Likewise.
2058 * term/i386/pc/vesafb.c: Likewise.
2059 * term/usb_keyboard.c: Likewise.
2060 * util/resolve.c: Likewise.
2061 * util/getroot.c: Likewise.
2062
0cfc0083 20632009-05-04 Felix Zielcke <fzielcke@z-51.de>
2064
2065 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2066
7c1d00cd 20672009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2068
2069 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2070 build error.
2071
b01f0548 20722009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2073
2074 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2075 parameter only available on BIOS.
2076
ecc3eb22 20772009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2078
2079 Removed wrong semicolon in declaration
2080
2081 * grub/misc.h (grub_dprintf): remove semicolon
2082
112972a9 20832009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2084
2085 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2086 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2087 is done by grub_cmd_linux() now).
2088 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2089 restore video to text mode.
2090 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2091 indicates lack of "vga=" parameter. "vga=0" is mapped to
2092 `GRUB_LINUX_VID_MODE_NORMAL'.
2093
afd5c115 20942009-05-04 Felix Zielcke <fzielcke@z-51.de>
2095
2096 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2097 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2098 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 2099 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 2100 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2101 `grub_script.tab.c'.
2102
2103 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2104 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2106 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2107 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2108
faa517ce 2109 * Makefile.in: Remove duplicated 2008 in Copyright line.
2110
ae0c0bdc 21112009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2112
473d1e45 2113 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 2114 unconditionally.
2115 * include/grub/util/misc.h (grub_util_warn): New declaration.
2116
2117 * util/i386/pc/grub-install.in: Understand --force and pass it down
2118 to grub-setup.
2119
2120 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2121 down to setup().
2122 (setup): Improve error messages and add warnings when requested to
2123 install in odd layouts. Refuse to install using blocklists unless
2124 --force was set.
2125
18f547ad 21262009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 2127
2128 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2129
6d260daa 21302009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2131
2132 Updated copyright year
2133
2134 * fs/hfsplus.c: updated copyright year
18f547ad 2135
69f853f8 21362009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2137
2138 HFS+ UUID
2139
18f547ad 2140 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 2141 in the space previously used by unused3
2142 (grub_hfsplus_uuid): new function
2143 (grub_hfsplus_fs): added uuid field
2144
4c402e73 21452009-05-03 Pavel Roskin <proski@gnu.org>
2146
2147 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2148 suppress warnings. It's no longer needed.
2149 * disk/host.c: Likewise.
2150 * disk/ata_pthru.c: Likewise.
2151 * disk/loopback.c: Likewise.
2152 * hook/datehook.c: Likewise.
2153 * parttool/pcpart.c: Likewise.
2154 * fs/i386/pc/pxe.c: Likewise.
2155 * fs/ntfscomp.c: Likewise.
2156 * efiemu/main.c: Likewise.
2157 * mmap/mmap.c: Likewise.
2158 * commands/crc.c: Likewise.
2159 * commands/hexdump.c: Likewise.
2160 * commands/hdparm.c: Likewise.
2161 * commands/acpi.c: Likewise.
2162 * commands/echo.c: Likewise.
2163 * commands/minicmd.c: Likewise.
2164 * commands/blocklist.c: Likewise.
2165 * commands/memrw.c: Likewise.
2166 * commands/loadenv.c: Likewise.
2167 * commands/usbtest.c: Likewise.
2168 * commands/lsmmap.c: Likewise.
2169 * commands/boot.c: Likewise.
2170 * commands/parttool.c: Likewise.
2171 * commands/configfile.c: Likewise.
2172 * commands/search.c: Likewise.
2173 * commands/ieee1275/suspend.c: Likewise.
2174 * commands/cat.c: Likewise.
2175 * commands/i386/pc/pxecmd.c: Likewise.
2176 * commands/i386/pc/play.c: Likewise.
2177 * commands/i386/pc/halt.c: Likewise.
2178 * commands/i386/pc/vbeinfo.c: Likewise.
2179 * commands/i386/pc/vbetest.c: Likewise.
2180 * commands/lspci.c: Likewise.
2181 * commands/date.c: Likewise.
2182 * commands/handler.c: Likewise.
2183 * commands/ls.c: Likewise.
2184 * commands/test.c: Likewise.
2185 * commands/cmp.c: Likewise.
2186 * commands/efi/loadbios.c: Likewise.
2187 * commands/efi/fixvideo.c: Likewise.
2188 * commands/halt.c: Likewise.
2189 * commands/help.c: Likewise.
2190 * commands/reboot.c: Likewise.
2191 * hello/hello.c: Likewise.
2192 * script/sh/main.c: Likewise.
2193 * loader/xnu.c: Likewise.
2194 * term/terminfo.c: Likewise.
2195 * term/i386/pc/serial.c: Likewise.
2196 * term/usb_keyboard.c: Likewise.
2197
515b5079 21982009-05-03 David S. Miller <davem@davemloft.net>
2199
2200 * normal/menu.c: Include grub/parser.h
2201
dfc31a22 22022009-05-03 Pavel Roskin <proski@gnu.org>
2203
2fee74f1 2204 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2205 not char*.
2206 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2207 Suggested by Javier Martín <lordhabbit@gmail.com>
2208
dfc31a22 2209 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2210 efiemu??.o doesn't exist.
2211 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2212 copying.
2213
18f547ad 22142009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 2215
2216 FreeBSD 64-bit support
2217
18f547ad 2218 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 2219 and loader/i386/bsd_trampoline.S
2220 (bsd_mod_ASFLAGS): new variable
2221 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2222 (FREEBSD_MODTYPE_KERNEL64): likewise
2223 (grub_bsd64_trampoline_start): likewise
2224 (grub_bsd64_trampoline_end): likewise
2225 (grub_bsd64_trampoline_selfjump): likewise
2226 (grub_bsd64_trampoline_gdt): likewise
2227 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2228 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2229 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2230 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 2231 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 2232 of "attrib" member
2233 * loader/i386/bsd_pagetable.c: new file
2234 * loader/i386/bsd_trampoline.S: likewise
2235 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2236 (ALIGN_VAR): likewise
2237 (entry_hi): new variable
2238 (kern_end_mdofs): likewise
2239 (is_64bit): likewise
2240 (grub_freebsd_add_meta): use ALIGN_VAR
2241 (grub_e820_mmap): new declaration
2242 (grub_freebsd_add_mmap): new function
2243 (grub_freebsd_add_meta_module): support 64 bit kernels
2244 (grub_freebsd_list_modules): use ALIGN_VAR
2245 (gdt_descriptor): new declaration
2246 (grub_freebsd_boot): support 64 bit kernels
2247 (grub_bsd_elf64_hook): new function
2248 (grub_bsd_load_elf): support elf64
2249
038c5720 22502009-05-03 Bean <bean123ch@gmail.com>
2251
2252 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2253 after we get the result of if statement.
2254
fc45fb58 22552009-05-03 Bean <bean123ch@gmail.com>
2256
2257 * Makefile.in (enable_efiemu): New variable.
2258
2259 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2260 set.
2261 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2262 path.
2263 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2264 path, add -mno-red-zone option.
2265 (efiemu64_s.o): Likewise.
2266 (efiemu64.o): Use macro $^ for source file.
2267
2268 * configure.ac (--enable-efiemu): New option.
2269
bbee0f2b 22702009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2271
2272 xnu support
2273
2274 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2275 (pkglib_MODULES): add xnu.mod
2276 (xnu_mod_SOURCES): new variable
2277 (xnu_mod_CFLAGS): likewise
2278 (xnu_mod_LDFLAGS): likewise
2279 (xnu_mod_ASFLAGS): likewise
2280 * conf/i386-pc.rmk: likewise
2281 * conf/x86_64-efi.rmk: likewise
7dd4a573 2282 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 2283 new declaration
2284 * include/grub/i386/macho.h: new file
2285 * include/grub/i386/xnu.h: likewise
2286 * include/grub/macho.h: likewise
2287 * include/grub/machoload.h: likewise
2288 * include/grub/x86_64/macho.h: likewise
2289 * include/grub/x86_64/xnu.h: likewise
2290 * include/grub/xnu.h: likewise
2291 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2292 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2293 * loader/i386/efi/xnu.c: new file
2294 * loader/i386/pc/xnu.c: likewise
2295 * loader/i386/xnu.c: likewise
2296 * loader/i386/xnu_helper.S: likewise
2297 * loader/macho.c: likewise
2298 * loader/xnu.c: likewise
2299 * loader/xnu_resume.c: likewise
2300 * util/grub-dumpdevtree: likewise
2301 * include/grub/i386/pit.h: include grub/err.h
2302 (grub_pit_wait): export
2303 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 2304
5caf964d 23052009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2306
2307 Efiemu
7dd4a573 2308
5caf964d 2309 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 2310 _linux_efi, linux_efi.
2311 new files in grub-emu
5caf964d 2312 new targets efiemu32.o and efiemu64.o
2313 * loader/linux_normal_efiemu.c: likewise
2314 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 2315 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 2316 files to copy
2317 * include/grub/autoefi.h: new file
7dd4a573 2318 * include/grub/i386/efiemu.h: likewise
5caf964d 2319 * include/grub/i386/pc/efiemu.h: likewise
2320 * include/grub/efi/api.h: add LL suffix when necessary
2321 new definitions relating to tables
2322 * include/grub/efiemu/efiemu.h: new file
2323 * include/grub/efiemu/runtime.h: likewise
2324 * efiemu/prepare.c: likewise
2325 * efiemu/loadcore_common.c: likewise
2326 * efiemu/loadcore64.c: likewise
2327 * efiemu/runtime/efiemu.sh: likewise
2328 * efiemu/runtime/efiemu.S: likewise
2329 * efiemu/runtime/efiemu.c: likewise
2330 * efiemu/runtime/config.h: likewise
2331 * efiemu/prepare32.c: likewise
2332 * efiemu/main.c: likewise
2333 * efiemu/modules/pnvram.c: likewise
2334 * efiemu/modules/i386: likewise
2335 * efiemu/modules/i386/pc: likewise
2336 * efiemu/modules/acpi.c: likewise
2337 * efiemu/i386/pc/cfgtables.c: likewise
2338 * efiemu/i386/loadcore64.c: likewise
2339 * efiemu/i386/loadcore32.c: likewise
2340 * efiemu/prepare64.c: likewise
2341 * efiemu/loadcore.c: likewise
2342 * efiemu/symbols.c: likewise
2343 * efiemu/mm.c: likewise
2344 * efiemu/loadcore32.c: likewise
7dd4a573 2345
23462009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 2347
2348 ACPI spoofing
2349
2350 * commands/acpi.c: new file
2351 * commands/i386/pc/acpi.c: likewise
2352 * commands/efi/acpi.c: likewise
2353 * include/grub/acpi.h: likewise
2354 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2355 (acpi_mod_SOURCES): new variable
2356 (acpi_mod_CFLAGS): likewise
2357 (acpi_mod_LDFLAGS): likewise
2358 * conf/i386-efi.rmk: likewise
2359 * conf/x86_64-efi.rmk: likewise
2360
7dd4a573 23612009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 2362
2363 Missing part from mmap patch
2364
2365 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2366 (grub_mmap_unregister)
2367 (grub_mmap_free_and_unregister): use grub_mmap_register
2368
7dd4a573 23692009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 2370
2371 Mmap services
2372
2373 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2374 * loader/i386/linux.c (find_mmap_size): likewise
2375 (allocate_pages): likewise
2376 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2377 (grub_fill_multiboot_mmap): likewise
2378 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2379 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2380 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2381 (OPENBSD_MMAP_RESERVED): likewise
2382 * include/grub/i386/pc/memory.h: include grub/memory.h
2383 (grub_lower_mem): removed
2384 (grub_upper_mem): likewise
2385 (GRUB_MACHINE_MEMORY_ACPI): new definition
2386 (GRUB_MACHINE_MEMORY_NVS): likewise
2387 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2388 (GRUB_MACHINE_MEMORY_HOLE): likewise
2389 (grub_machine_mmap_register): likewise
2390 (grub_machine_mmap_unregister): likewise
2391 (grub_machine_get_upper): likewise
2392 (grub_machine_get_lower): likewise
2393 (grub_machine_get_post64): likewise
2394 * include/grub/i386/efi/memory.h: new file
2395 * include/grub/x86_64/efi/memory.h: likewise
2396 * include/grub/efi/memory.h: likewise
2397 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2398 (mmap_mod_SOURCES): new variable
2399 (mmap_mod_LDFLAGS): likewise
2400 (mmap_mod_ASFLAGS): likewise
2401 * conf/i386-coreboot.rmk: likewise
2402 * conf/i386-ieee1275.rmk: likewise
2403 * conf/i386-efi.rmk: likewise
2404 * conf/x86_64-efi.rmk: likewise
2405 * include/grub/types.h (UINT_TO_PTR): new macro
2406 (PTR_TO_UINT32): likewise
2407 (PTR_TO_UINT64): likewise
2408 * include/grub/memory.h: new file
2409 * mmap/i386/pc/mmap.c: likewise
2410 * mmap/i386/pc/mmap_helper.S: likewise
2411 * mmap/i386/uppermem.c: likewise
2412 * mmap/mmap.c: likewise
2413 * mmap/efi/mmap.c: likewise
7dd4a573 2414 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 2415 grub_upper_mem
2416 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2417 (grub_upper_mem): likewise
2418 (grub_machine_init): don't use grub_upper_mem,
2419 make grub_lower_mem local
2420 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2421 grub_mmap_iterate and grub_mmap_get_upper
2422 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2423
d558e6b5 24242009-05-02 Bean <bean123ch@gmail.com>
2425
2426 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2427 script/sh/parser.y.
2428 (pkglib_MODULES): Add normal.mod and sh.mod.
2429 (normal_SOURCES): New variable.
2430 (normal_mod_CFLAGS): Likewise.
2431 (normal_mod_LDFLAGS): Likewise.
2432 (sh_mod_SOURCES): Likewise.
2433 (sh_mod_CFLAGS): Likewise.
2434 (sh_mod_LDFLAGS): Likewise.
2435
2436 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2437 script/sh/lexer.c_DEPENDENCIES.
2438 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2439 kern/rescue_reader.c and kern/rescue_parser.c.
2440 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2441 (grub_emu_SOURCES): Change source files.
2442 (pkglib_MODULES): Remove normal.mod.
2443 (normal_SOURCES): Removed.
2444 (normal_mod_CFLAGS): Likewise.
2445 (normal_mod_LDFLAGS): Likewise.
2446 * conf/i386-coreboot.rmk: Likewise.
2447 * conf/i386-efi.rmk: Likewise.
2448 * conf/i386-ieee1276.rmk: Likewise.
2449 * conf/powerpc-ieee1275.rmk: Likewise.
2450 * conf/sparc64-ieee1275.rmk: Likewise.
2451 * conf/x86_64-efi.rmk: Likewise.
2452
2453 * include/grub/command.h (grub_command_execute): New inline function.
2454
2455 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2456
2457 * include/grub/normal.h: Remove <grub/setjmp.h>.
2458 (grub_fs_module_list): Moved to normal/autofs.c.
2459 (grub_exit_env): Removed.
2460 (grub_command_execute): Likewise.
2461 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2462 parameter script.
2463 (read_command_list): New function declaration.
2464 (read_fs_list): Likewise.
2465
2466 * include/parser.h: Include <grub/reader.h>.
2467 (grub_parser_split_cmdline): Change type of getline parameter.
2468 (grub_parser): New structure.
2469 (grub_parser_class): New variable.
2470 (grub_parser_execute): New function declaration.
2471 (grub_register_rescue_parser): Likewise.
2472 (grub_parser_register): New inline function.
2473 (grub_parser_unregister): Likewise.
2474 (grub_parser_get_current): Likewise.
2475 (grub_parser_set_current): Likewise.
2476
2477 * include/grub/reader.h: New file.
2478 * kern/reader.c: Likewise.
2479 * kern/rescue_parser.c: Likewise.
2480 * kern/rescue_reader.c: Likewise.
2481 * normal/autofs.c: Likewise.
2482 * normal/dyncmd.c: Likewise.
2483
2484 * include/grub/rescue.h: Removed.
2485 * normal/command.h: Likewise.
2486
2487 * include/grub/script.h: Moved to ...
2488 * include/grub/script_sh.h: ... Moved here.
2489 * normal/execute.c: Moved to ...
2490 * script/sh/execute.c: ... Moved here.
2491 * normal/function.c: Moved to ...
2492 * script/sh/function.c: ... Moved here.
2493 * normal/lexer.c: Moved to ...
2494 * script/sh/lexer.c: ... Moved here.
2495 * normal/parser.y: Moved to ...
2496 * script/sh/parser.y: ... Moved here.
2497 * normal/script.c: Moved to ...
2498 * script/sh/script.c: ... Moved here.
2499
2500 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2501 <grub/reader.h>.
2502 (grub_exit_env): Removed.
2503 (fs_module_list): Moved to normal/autofs.c.
2504 (grub_file_getline): Don't handle comment here.
2505 (free_menu): Skip removed field entry->commands.
2506 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2507 script parameter.
2508 (read_config_file): Removed nested parameter, change getline function.
2509 (grub_enter_normal_mode): Removed.
2510 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2511 (read_command_list): Likewise.
2512 (autoload_fs_module): Moved to normal/autofs.c.
2513 (read_fs_list): Likewise.
2514 (reader_nested): New variable.
2515 (grub_normal_execute): Run parser.sh to switch to sh parser.
2516 (grub_cmd_rescue): Removed.
2517 (cmd_normal): Removed.
2518 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2519 rescue command.
2520 (grub_cmdline_run): New function.
2521 (grub_normal_reader_init): Likewise.
2522 (grub_normal_read_line): Likewise.
2523 (grub_env_write_pager): Likewise.
2524 (cmdline): New variable.
2525 (grub_normal_reader): Likewise.
2526 (GRUB_MOD_INIT): Register normal reader and set as current, register
2527 pager hook, register normal command with grub_register_command_prio,
2528 so that it won't show up in command.lst.
2529 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2530 grub_fs_autoload_hook.
2531
2532 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2533 (grub_menu_execute_entry): Replace grub_script_execute with
2534 grub_parser_execute, change parameter to grub_command_execute.
2535
2536 * normal/menu_text.c: Remove <grub/script.h>.
2537
2538 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2539 and <grub/parser.h>.
2540 (run): Change editor_getline to use new parser interface. Change
2541 parameter to grub_command_execute.
2542
2543 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2544 <grub/reader.h> and <grub/parser.h>.
2545 (grub_load_normal_mode): Execute normal command.
2546 (grub_main): Call grub_register_core_commands,
2547 grub_register_rescue_parser and grub_register_rescue_reader, use
2548 grub_reader_loop to enter input loop.
2549
7dd4a573 2550 * kern/parser.c (grub_parser_split_cmdline): Change type of
2551 getline parameter.
d558e6b5 2552 (grub_parser_class): New variable.
2553 (grub_parser_execute): New function.
2554
2555 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2556 * loader/multiboot2.c: Likewise.
2557 * loader/sparc64/ieee1275/linux.c: Likewise.
2558
2559 * util/grub-emu.c (read_command_list): New dummy function.
2560
18db813d 25612009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2562
2563 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2564 count to 16 for CCISS and IDA.
2565
6c67de15 25662009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2567
2568 * normal/menu_text.c (grub_wait_after_message): Print a newline
2569 after waiting for user input.
2570
2571 * loader/i386/linux.c: Include `<grub/normal.h>'.
2572 (grub_cmd_linux): Improve the error message about `ask' mode, by
2573 waiting for user input so it's not missed (we can do this, since
2574 user requested interaction).
2575
d9dc87b0 25762009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2577
2578 Added missing lst to grub-mkrescue
2579
2580 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2581 and ${input_dir}/parttool.lst
2582
ac8a2baa 25832009-04-30 David S. Miller <davem@davemloft.net>
2584
ad22a610 2585 * util/hostdisk.c (device_is_wholedisk): New function.
2586 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2587 zero only if device_is_wholedisk() returns true.
2588
6966215d 2589 * util/hostdisk.c (convert_system_partition_to_system_disk):
2590 Handle virtual disk devices named /dev/vdiskX as found on sparc
2591 and powerpc.
2592
ac8a2baa 2593 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2594 lettered partition specifier is found, convert to numbered.
2595
979b4fb4 25962009-04-29 David S. Miller <davem@davemloft.net>
2597
e2bf39b2 2598 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2599 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2600
3c64e104 2601 * normal/command.c: Add missing newline at end of file.
2602
979b4fb4 2603 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2604 warnings.
2605 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2606 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2607 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2608 ihandles have a 32-bit type but need to be stored in a "void *".
2609
136d9f82 26102009-04-28 Pavel Roskin <proski@gnu.org>
2611
9459c306 2612 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2613 not disk. Adjust all dependencies.
2e08a26a 2614 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 2615 grub_disk_close().
2616
136d9f82 2617 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2618 parent's partition, don't copy it by reference, as it gets freed
2619 on close.
2620
7dd4a573 26212009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 2622
2623 Preboot hooks support
2624
2625 * commands/boot.c (struct grub_preboot_t): new declaration
2626 (preboots_head): new variable
2627 (preboots_tail): likewise
2628 (grub_loader_register_preboot_hook): new function
2629 (grub_loader_unregister_preboot_hook): likewise
2630 (grub_loader_set): launch preboot hooks
2631 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2632 (grub_loader_register_preboot_hook): new declaration
2633 (grub_loader_unregister_preboot_hook): likewise
2634
5af922b5 26352009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2636
2637 Warning fix
2638
7dd4a573 2639 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 2640 calling grub_dprintf
2641
a5562c30 26422009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2643
2644 Bug and warning fixes
2645
7dd4a573 2646 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 2647 declaration
2648 * commands/test.c (test_parse): fixed bug with file tests and corrected
2649 declaration of find_file
2650
4006f85c 26512009-04-26 Pavel Roskin <proski@gnu.org>
2652
2653 * Makefile.in: Don't install empty manual pages if help2man is
2654 missing. Use help2man option for output, not shell redirection.
2655
5c77c3de 26562009-04-26 David S. Miller <davem@davemloft.net>
2657
2658 * util/grub-mkdevicemap.c (make_device_map): Add missing
2659 NESTED_FUNC_ATTR to process_device().
2660
033b10a8 26612009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2662
2663 Test command
2664
2665 * commands/test.c: rewritten to use bash-like test
2666
e4343593 26672009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2668
2669 Parttool autoloading and improvements
2670
7dd4a573 2671 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 2672 (parttool.lst): new target
2673 * genmk.rb: generate parttool-*
2674 (CLEANFILES): add #{parttool}
2675 (PARTTOOLFILES): new variable
2676 * genparttoollist.sh: new file
7dd4a573 2677 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 2678 (grub_pcpart_type): likewise
2679 * commands/parttool.c (helpmsg): new variable
2680 (grub_cmd_parttool): output help if not enough arguments are supplied
2681 autoload modules
2682 (GRUB_MOD_INIT(parttool)): use helpmsg
2683
0d312500 26842009-04-24 David S. Miller <davem@davemloft.net>
2685
7dd4a573 2686 Avoiding opening same device multiple times in device iterator.
0d312500 2687
2688 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 2689 and use it to build a list of partitions in iterate_disk() and
0d312500 2690 iterate_partition().
2691
ac20caff 2692 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2693 on disk->data.
2694
0dcf7495 2695 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2696 grub_devalias_iterate() result instead of unconditional 0.
2697 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2698 Also, capture hook return value, either directly or via
2699 grub_children_iterate(), and propagate to caller.
2700 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2701 grub_children_iterate): Return value is now 'int' instead of
2702 'grub_err_t'.
2703 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2704 like a proper iterator, stopping when hooks return non-zero.
2705 (grub_devalias_iterate): Likewise.
2706
c8c08833 27072009-04-23 David S. Miller <davem@davemloft.net>
2708
2709 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2710
f01005a8 27112009-04-22 David S. Miller <davem@davemloft.net>
2712
2713 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2714 is larger than address_cells, use that value for address_cells too.
2715
4e8269da 2716 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2717 IEEE1275_MAX_PATH_LEN): Define.
2718 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2719 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2720 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2721 'devtype'. Explicitly NULL terminate devalias expansion.
2722
a1447506 2723 * util/sparc64/ieee1275/misc.c: New file.
2724 * util/sparc64/ieee1275/grub-setup.c: New file.
2725 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2726 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2727 * util/sparc64/ieee1275/grub-install.in: New file.
2728 * util/ieee1275/ofpath.c: New file.
2729 * util/ieee1275/devicemap.c: New file.
2730 * util/devicemap.c: New file.
2731 * util/deviceiter.c: New file.
2732 * kern/sparc64/ieee1275/init.c: New file.
2733 * include/grub/util/ofpath.h: New file.
2734 * include/grub/util/deviceiter.h: New file.
2735 * util/grub-mkdevicemap.c: Include deviceiter.h.
2736 Implement using grub_util_emit_devicemap_entry and
2737 grub_util_iterate_devices.
2738 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2739 util/devicemap.c into grub-mkdevicemap
2740 * conf/i386-efi.rmk: Likewise.
2741 * conf/i386-ieee1275.rmk: Likewise.
2742 * conf/i386-pc.rmk: Likewise.
2743 * conf/powerpc-ieee1275.rmk: Likewise.
2744 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2745 images and installation utilities. Build kernel as image
2746 instead of as elf binary. Use common rules as much as possible.
2747
7dd4a573 27482009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 2749
2750 Correct GPT definition
2751
7dd4a573 2752 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 2753 of "attrib" member
2754
c6c5219f 27552009-04-19 Felix Zielcke <fzielcke@z-51.de>
2756
2757 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2758
0552ff9f 27592009-04-19 David S. Miller <davem@davemloft.net>
2760
2761 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2762 (grub_rescue_cmd_linux): Rename to...
2763 (grub_cmd_linux): and fix prototype.
2764 (grub_rescue_cmd_initrd): Rename to...
2765 (grub_cmd_initrd): and fix prototype.
2766 (cmd_linux, cmd_initrd): New.
2767 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2768 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2769
d1a282fc 27702009-04-17 Pavel Roskin <proski@gnu.org>
2771
07c5039f 2772 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2773 format.
2774 (grub_ohci_transfer): Likewise.
2775
b012002d 2776 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2777
1bc09c35 2778 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2779 return without a value. Fix inconsistent indentation.
2780
e0ff9126 2781 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2782 match struct grub_fs.
2783
d1a282fc 2784 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2785 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2786 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2787 * commands/lspci.c (grub_lspci_iter): Likewise.
2788
a96df3f2 27892009-04-16 Bean <bean123ch@gmail.com>
2790
2791 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2792 value.
2793
41bb0fe9 27942009-04-15 Pavel Roskin <proski@gnu.org>
2795
2796 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2797 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2798 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2799 definitions.
2800
596c6970 28012009-04-15 Felix Zielcke <fzielcke@z-51.de>
2802
2803 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 2804 that no multiple data or metadata areas are supported and `Unknown
596c6970 2805 metadata header'.
2806
7dd4a573 28072009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 2808
2809 Move loader out of the kernel
2810
2811 * kern/loader.c: moved to ...
2812 * commands/boot.c: ... moved here
2813 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2814 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2815 * include/grub/kernel.h (grub_machine_fini): export
2816 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2817 (grub_loader_set): likewise
2818 (grub_loader_unset): likewise
2819 (grub_loader_boot): likewise
2820 * conf/common.rmk: new module boot.mod
2821 (pkglib_MODULES): add boot.mod
2822 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2823 (grub_emu_SOURCES): likewise
2824 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2825 (grub_emu_SOURCES): likewise
2826 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2827 (grub_emu_SOURCES): likewise
2828 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2829 (grub_emu_SOURCES): likewise
2830 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2831 (grub_emu_SOURCES): likewise
7dd4a573 2832 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2833 (grub_emu_SOURCES): likewise
0d5d5653 2834 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 2835 (grub_emu_SOURCES): likewise
0d5d5653 2836
7dd4a573 28372009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 2838
2839 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 2840
5999d619 2841 * kern/misc.c (grub_itoa): Removed function
2842 (grub_ltoa): likewise
2843 (grub_vsprintf): use grub_lltoa
2844
7dd4a573 28452009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 2846
2847 Restore grub-emu
2848
2849 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2850 * conf/i386-coreboot.rmk: likewise
2851 * conf/i386-ieee1275.rmk: likewise
2852 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2853
20318222 28542009-04-15 Felix Zielcke <fzielcke@z-51.de>
2855
2856 * INSTALL: Add that `./autogen.sh' needs to be run before
2857 `./configure.'.
2858
d05f0df3 28592009-04-14 Bean <bean123ch@gmail.com>
2860
2861 * Makefile.in (pkglib_DATA): Add handler.lst.
2862 (handler.lst): New rule.
2863
2864 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2865 * conf/i386-coreboot.rmk: Likewise.
2866 * conf/i386-ieee1275.rmk: Likewise.
2867 * conf/i386-efi.rmk: Likewise.
2868 * conf/x86_64-efi.rmk: Likewise.
2869 * conf/powerpc-ieee1275.rmk: Likewise.
2870 * conf/sparc64-ieee1275.rmk: Likewise.
2871
2872 * genhandlerlist.sh: New file.
2873
2874 * genmk.rb: Add rules to generate handler.lst.
2875
2876 * include/grub/normal.h (grub_file_getline): New function definition.
2877 (read_handler_list): Likewise.
2878 (free_handler_list): Likewise.
2879
2880 * include/grub/term.h (grub_term_register_input): Add name parameter
2881 for auto generation of handler.lst.
2882 (grub_term_register_output): Likewise.
2883
2884 * normal/handler.c: New file.
2885
2886 * normal/main.c (get_line): Renamed to grub_file_getline.
2887 (read_config_file): Use the newly renamed grub_file_getline.
2888 (read_command_list): Likewise.
2889 (read_fs_list): Likewise.
2890 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2891 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2892
2893 * term/efi/console.c (grub_console_init): Add name parameter for auto
2894 generation of handler.lst.
2895 * term/gfxterm.c: Likewise.
2896 * term/i386/pc/at_keyboard.c: Likewise.
2897 * term/i386/pc/console.c: Likewise.
2898 * term/i386/pc/serial.c: Likewise.
2899 * term/i386/pc/vesafb.c: Likewise.
2900 * term/i386/pc/vga.c: Likewise.
2901 * term/i386/pc/vga_text.c: Likewise.
2902 * term/ieee1275/ofconsole.c: Likewise.
2903 * term/usb_keyboard.c: Likewise.
2904
33c846be 29052009-04-14 Bean <bean123ch@gmail.com>
2906
2907 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2908 properly with null character.
2909
4484e01e 29102009-04-14 Felix Zielcke <fzielcke@z-51.de>
2911
2912 * configure: Remove.
2913 * config.h.in: Likewise.
f93d668e 2914 * stamp-h.in: Likewise.
4484e01e 2915 * DISTLIST: Likewise.
2916 * conf/common.mk: Likewise.
2917 * conf/i386-coreboot.mk: Likewise.
2918 * conf/i386-efi.mk: Likewise.
2919 * conf/i386-ieee1275.mk: Likewise.
2920 * conf/i386.mk: Likewise.
2921 * conf/i386-pc.mk: Likewise.
2922 * conf/powerpc-ieee1275.mk: Likewise.
2923 * conf/sparc64-ieee1275.mk: Likewise.
2924 * conf/x86_64-efi.mk: Likewise.
2925
2926 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2927 develop on GRUB.
2928
7dd4a573 29292009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 2930 David S. Miller <davem@davemloft.net>
2931
2932 * util/hostdisk.c (make_device_name): Fix buffer length
2933 calculations.
2934
e25b5a8c 29352009-04-14 Felix Zielcke <fzielcke@z-51.de>
2936
2937 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2938 <sys/param.h> and <sys/sysctl.h>.
2939 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2940 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2941 opening the device and reset them afterwards.
2942
1f1f580c 29432009-04-13 Pavel Roskin <proski@gnu.org>
2944
2945 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2946 Reported by John Stanley <jpsinthemix@verizon.net>
2947
7ebc2d6b 29482009-04-13 Robert Millan <rmh@aybabtu.com>
2949
2950 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 2951 that name for menuentries when appropriate.
7ebc2d6b 2952
d8ba3667 29532009-04-13 Felix Zielcke <fzielcke@z-51.de>
2954
2955 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2956
cba416eb 29572009-04-13 Robert Millan <rmh@aybabtu.com>
2958
2959 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2960 to Linux, simply abort telling the user it's no longer supported.
2961
a547a745 29622009-04-13 Felix Zielcke <fzielcke@z-51.de>
2963
2964 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 2965 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 2966 `freebsd_loadenv' only when devices.hints exist.
2967
232a769c 29682009-04-13 Pavel Roskin <proski@gnu.org>
2969
2970 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2971
c3012039 29722009-04-13 Felix Zielcke <fzielcke@z-51.de>
2973
2974 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2975 partition number.
2976 (grub_drive): Likewise.
2977
234022fe 29782009-04-13 David S. Miller <davem@davemloft.net>
2979
2980 * kern/sparc64/ieee1275/ieee1275.c: New file.
2981 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2982 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2983 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2984 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2985 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2986 grub_ieee1275_alloc_physmem): Declare new exported functions.
2987
d8e1836c 2988 * include/grub/sparc64/ieee1275/loader.h: New file.
2989 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2990 * include/grub/sparc64/kernel.h: Likewise.
2991 * loader/sparc64/ieee1275/linux.c: Likewise.
2992
96bd81ec 2993 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2994 (grub_fstest_SOURCES): Likewise.
2995
6a4737e5 2996 * util/hostdisk.c (make_device_name): Do not make any assumptions
2997 about the length of drive names.
2998
1d7a72fd 2999 * kern/dl.c (grub_dl_load_file): Close file immediately when
3000 we are done using it.
3001
56bc2471 30022009-04-12 David S. Miller <davem@davemloft.net>
3003
3004 * kern/misc.c (grub_ltoa): Fix cast when handling negative
3005 values. Noticed by Pavel Roskin.
3006
df38d0bb 3007 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3008 target compiler.
7dd4a573 3009
e382e93a 3010 * genmk.rb: Add more flexible image type specification, also
3011 pass --strip-unneeded to objcopy.
3012 * conf/i386-pc.rmk: Use *_FORMAT.
3013 * conf/i386-pc.mk: Rebuilt.
3014
f5dbbca9 3015 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3016 (OFDISK_HASH_SZ): Define.
3017 (ofdisk_hash): New hash table.
3018 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3019 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3020 instead of device phandle which is not unique.
3021
91c88b12 3022 * kern/sparc64/ieee1275/init.c: Delete, replace with...
3023 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3024 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3025 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3026 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3027 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3028 GRUB_KERNEL_MACHINE_DATA_END): Define.
3029 (grub_kernel_image_size, grub_total_module_size): Declare.
3030
5b5d4aa5 30312009-04-12 Pavel Roskin <proski@gnu.org>
3032
7dd4a573 3033 * configure.ac: Change the logic when we check for target tools.
3034 Do it when the target is specified and it's different from the
3035 specified value of the host.
5b5d4aa5 3036
c91e1793 30372009-04-11 Felix Zielcke <fzielcke@z-51.de>
3038
3039 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3040 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3041 GNU/kFreeBSD. Check if a device is a character device. Use
3042 DIOCGMEDIASIZE to get the size.
3043 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3044 support for GNU/kFreeBSD.
3045 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3046 is a character device instead of a block device. Add support for
3047 FreeBSD device names.
3048
3049 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3050 is a character device instead of a block device.
3051
3052 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3053 is a character device instead of a block device.
3054
b1ac8644 30552009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3056
3057 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3058 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3059 FreeBSD. Check if a device is a character device. Use
3060 DIOCGMEDIASIZE to get the size.
3061 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3062 support for FreeBSD.
3063 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3064 is a character device instead of a block device. Add support for
3065 FreeBSD device names.
3066
3067 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3068 a character device instead of a block device.
3069 (grub_util_check_char_device): New function.
3070
3071 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3072 a character device instead of a block device.
3073
3074 * include/grub/util/getroot.h (grub_util_check_char_device): New
3075 prototype.
3076
a3f7515a 30772009-04-11 David S. Miller <davem@davemloft.net>
3078
3079 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3080 static libgcc.
3081 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3082 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3083 function, if present.
3084 (__bswapdi2): Likewise.
3085
0d44993d 3086 * include/grub/sparc64/ieee1275/boot.h: New file.
3087 * boot/sparc64/ieee1275/boot.S: Likewise.
3088 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3089
ed3d2bc2 3090 * kern/misc.c (grub_ltoa): New function.
3091 (grub_vsprintf): Use it to format 'long' integers.
3092
d3bfb59c 30932009-04-10 David S. Miller <davem@davemloft.net>
3094
3095 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3096 slots are of type grub_ieee1275_cell_t.
3097 (grub_nand_read): Likewise.
3098 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3099 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3100 macros are used to compare values in arg/ret block of the call.
3101 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3102 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3103 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3104 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3105 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3106 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3107 grub_ieee1275_close, grub_ieee1275_set_property,
3108 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3109 grub_ieee1275_cell_t.
3110 * kern/ieee1275/openfw.c (grub_map): Likewise.
3111 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3112 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3113
450e2238 3114 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3115 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3116 (grub_devalias_iterate): Likewise.
3117
7dd4a573 31182009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 3119
3120 UFS improvements
3121
3122 * fs/ufs.c (INODE_NBLOCKS): new definition
3123 (struct grub_ufs_dirent): added fields for non-BSD dirents
3124 (grub_ufs_get_file_block): fixed double indirect handling
3125 (grub_ufs_lookup_symlink): use more robust way to determine whether
3126 symlink is inline
3127 (grub_ufs_find_file): support for non-BSD dirents
3128 (grub_ufs_dir): support for non-BSD dirents
3129
e7e6862a 31302009-04-10 Bean <bean123ch@gnail.com>
3131
3132 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3133 attribute, otherwise the size would be wrong for i386 platform.
3134
3135 * include/grub/pci.h (grub_pci_read_word): New inline function.
3136 (grub_pci_read_byte): Likewise.
3137 (grub_pci_write): Likewise.
3138 (grub_pci_write_word): Likewise.
3139 (grub_pci_write_byte): Likewise.
3140
3141 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3142
3143 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3144 (find_framebuf): Scan pci to locate the frame buffer address.
3145
3146 * commands/efi/fixvideo.c: New file.
3147
3148 * commands/efi/loadbios.c: Likewise.
3149
3150 * commands/memrw.c: Likewise.
3151
3152 * util/grub-dumpbios.in: Likewise.
3153
3154 * conf/common.rmk (grub-dumpbios): New utility.
3155 (pkglib_MODULES): New module memrw.mod.
3156 (memrw_mod_SOURCE): New macro.
3157 (memrw_mod_CFLAGS): Likewise.
3158 (memrw_mod_LDFLAGS): Likewise.
3159
7dd4a573 3160 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 3161 fixvideo.mod.
3162 (loadbios_mod_SOURCE): New macro.
3163 (loadbios_mod_CFLAGS): Likewise.
3164 (loadbios_mod_LDFLAGS): Likewise.
3165 (fixvideo_mod_SOURCE): Likewise.
3166 (fixvideo_mod_CFLAGS): Likewise.
3167 (fixvideo_mod_LDFLAGS): Likewise.
3168
7dd4a573 3169 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 3170 fixvideo.mod.
3171 (loadbios_mod_SOURCE): New macro.
3172 (loadbios_mod_CFLAGS): Likewise.
3173 (loadbios_mod_LDFLAGS): Likewise.
3174 (fixvideo_mod_SOURCE): Likewise.
3175 (fixvideo_mod_CFLAGS): Likewise.
3176 (fixvideo_mod_LDFLAGS): Likewise.
3177
af63ada2 31782009-04-08 Felix Zielcke <fzielcke@z-51.de>
3179
3180 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3181
c2cdde70 31822009-04-07 David S. Miller <davem@davemloft.net>
3183
3184 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3185 support for R_SPARC_OLO10 relocations. Fix compile warning for
3186 R_SPARC_WDISP30 case.
ea3f72cf 3187 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 3188
761319cf 31892009-04-06 Pavel Roskin <proski@gnu.org>
3190
1007d1f5 3191 * include/grub/misc.h (ARRAY_SIZE): New macro.
3192 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3193 New macro.
3194 * loader/i386/linux.c (allocate_pages): Use free_pages().
3195 (grub_linux_unload): Don't use free_pages().
3196 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3197 wrong index. Treat all other modes as text modes.
3198 (grub_cmd_linux): Initialize vid_mode unconditionally to
3199 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3200
761319cf 3201 * commands/help.c (print_command_help): Use cmd->prio, not
3202 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3203
ea761d40 32042009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 3205
ea761d40 3206 Parttool
3207
3208 * parttool/pcpart.c: new file
3209 * commands/parttool.c: likewise
3210 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3211 (parttool_mod_SOURCES): new variable
3212 (parttool_mod_CFLAGS): likewise
3213 (parttool_mod_LDFLAGS): likewise
3214 (pcpart_mod_SOURCES): likewise
3215 (pcpart_mod_CFLAGS): likewise
3216 (pcpart_mod_LDFLAGS): likewise
7dd4a573 3217 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 3218 and parttool/pcpart.c
3219 * conf/i386-efi.rmk: likewise
3220 * conf/i386-ieee1275.rmk: likewise
3221 * conf/i386-pc.rmk: likewise
3222 * conf/powerpc-ieee1275.rmk: likewise
3223 * conf/sparc64-ieee1275.rmk: likewise
3224 * conf/x86_64-ieee1275.rmk: likewise
3225
05aaebfb 32262009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3227
3228 Support for mtime and further expandability of dir command
3229
3230 * include/grub/lib/datetime.h: moved to ...
7dd4a573 3231 * include/grub/datetime.h: ... moved here and added
05aaebfb 3232 declaration of grub_unixtime2datetime. All users updated
7dd4a573 3233 * include/grub/fs.h: new syntax for dir and mtime functions in
3234 struct grub_fs
05aaebfb 3235 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3236 and GRUB_FSHELP_FLAGS_MASK
3237 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3238 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3239 (grub_ext2_mtime): new function
3240 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3241 (grub_hfsplus_mtime): new function
3242 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3243 (GRUB_UFS_ATTR_FILE): likewise
3244 (GRUB_UFS_ATTR_LNK): likewise
3245 (struct grub_ufs_sblock): new fields mtime
3246 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3247 all users updated
3248 (grub_ufs_dir): mtime support
3249 (grub_ufs_mtime): new function
3250 * fs/affs.c (grub_affs_dir): use new dir syntax
3251 * fs/afs.c (grub_afs_dir): likewise
3252 * fs/cpio.c (grub_cpio_dir): likewise
3253 * fs/fat.c (grub_fat_find_dir): likewise
3254 * fs/hfs.c (grub_hfs_dir): likewise
3255 * fs/iso9660.c (grub_iso9660_dir): likewise
3256 * fs/jfs.c (grub_jfs_dir): likewise
3257 * fs/minix.c (grub_minix_dir): likewise
3258 * fs/ntfs.c (grub_ntfs_dir): likewise
3259 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3260 * fs/sfs.c (grub_sfs_dir): likewise
3261 * fs/xfs.c (grub_xfs_dir): likewise
3262 * util/hostfs.c (grub_hostfs_dir): likewise
3263 * lib/datetime.c: moved to ...
3264 * normal/datetime.c: ... moved here
3265 (grub_unixtime2datetime): new function
3266 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 3267 * normal/completion.c (iterate_dir): use new dir syntax
3268 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 3269 last modification time of a volume
7dd4a573 3270 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 3271 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 3272 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 3273 (normal_mod_SOURCES): likewise
3274 (datetime_mod_SOURCES): Removed lib/datetime.c
3275 * conf/i386-efi.rmk: likewise
7dd4a573 3276 * conf/i386-ieee1275.rmk: likewise
05aaebfb 3277 * conf/i386-pc.rmk: likewise
3278 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 3279 * conf/sparc64-ieee1275.rmk: likewise
3280 * conf/x86_64-efi.rmk: likewise
05aaebfb 3281
8a7e1a14 32822009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3283
3284 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 3285
3286 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 3287 on grub_fat_find_dir
3288 (grub_fat_find_dir): use grub_fat_iterate_dir
3289 (grub_fat_label): likewise
3290
04186a9c 32912009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3292
7dd4a573 3293 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 3294 and command.h
3295 remove extraneous kernel_elf_HEADERS
3296
da4c0bb6 32972009-04-04 Bean <bean123ch@gnail.com>
3298
3299 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3300
3301 * util/misc.c: Likewise.
3302
54ad9555 33032009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3304
3305 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3306 instead of grub_printf.
3307
7a6bf9f2 33082009-04-03 Robert Millan <rmh@aybabtu.com>
3309
3310 * loader/i386/linux.c (grub_linux_setup_video): Fill
3311 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3312 values from `mode info' structure instead of hardcoded
3313 values.
3314
3fcc2083 33152009-04-01 Pavel Roskin <proski@gnu.org>
3316
3317 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3318 unused now.
3319 * genmk.rb: Likewise.
3320 * configure.ac: Likewise.
3321
5ec9740b 33222009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3323
3324 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3325 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3326
5270cec8 33272009-04-01 David S. Miller <davem@davemloft.net>
3328
3329 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 3330 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 3331 (grub_setjmp): Mark with 'returns_twice' attribute.
3332 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3333 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3334 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3335
9c3dd854 33362009-04-01 Robert Millan <rmh@aybabtu.com>
3337
3338 Reapply fix from 2008-07-28 which was accidentally reverted; also
3339 perform the same fix to a similar check in same function.
3340
3341 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3342 with the same number are found, just use issue a warning with
3343 grub_dprintf(), as this error has been reported to be non-fatal.
3344
0d818b7e 33452009-03-31 Pavel Roskin <proski@gnu.org>
3346
3347 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3348 for cross-compilation.
3349
95646d92 33502009-03-30 Robert Millan <rmh@aybabtu.com>
3351
3352 Fix i386-ieee1275 build.
3353
3354 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3355 Remove declaration.
3356
6a003ed1 33572009-03-30 Pavel Roskin <proski@gnu.org>
3358
3359 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3360 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3361 zero-terminated, rely only on the strlen value. Fix comparison
3362 of strings differing in length.
3363
92f33540 33642009-03-30 Robert Millan <rmh@aybabtu.com>
3365
3366 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3367 checking for abi version. Improve error messages on BIOS to notify
3368 user about `linux16' command.
3369
a8c48fd5 33702009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3371
f968172e 3372 Leak fixes
a8c48fd5 3373
f968172e 3374 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3375 in case of collision
3376 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 3377
9c323f09 33782009-03-29 Robert Millan <rmh@aybabtu.com>
3379
3380 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3381 set `vid_mode' accordingly.
3382 (grub_linux_boot): Process `vid_mode' and set video mode.
3383
ae68f423 33842009-03-29 Robert Millan <rmh@aybabtu.com>
3385
3386 * util/grub.d/10_linux.in (linux_entry): New function.
3387 Factorize generation of Linux boot entries.
3388
5709cfc4 33892009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3390
3391 Make the format of Environment Block plain text. The boot loader
3392 part is not tested well yet.
7dd4a573 3393
5709cfc4 3394 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3395 (buffer): Removed.
3396 (envblk): Likewise.
3397 (usage): Remove "info" and "clear". Add "unset". Update the
3398 description of "set", as this does not delete variables any
3399 longer.
3400 (create_envblk_file): Complete rewrite.
3401 (open_envblk_file): Likewise.
3402 (cmd_info): Removed.
3403 (cmd_list): Likewise.
3404 (cmd_set): Likewise.
3405 (cmd_clear): Likewise.
3406 (list_variables): New function.
3407 (write_envblk): Likewise.
3408 (set_variables): Likewise.
3409 (unset_variables): Likewise.
3410 (main): Complete rewrite.
3411
3412 * commands/loadenv.c (buffer): Removed.
3413 (envblk): Likewise.
3414 (open_envblk_file): New function.
3415 (read_envblk_file): Complete rewrite.
3416 (grub_cmd_load_env): Likewise.
3417 (grub_cmd_list_env): Likewise.
3418 (struct blocklist): New struct.
3419 (free_blocklists): New function.
3420 (check_blocklists): Likewise.
3421 (write_blocklists): Likewise.
3422 (grub_cmd_save_env): Complete rewrite.
3423
3424 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3425 a plain text signature.
3426 (GRUB_ENVBLK_MAXLEN): Removed.
3427 (struct grub_envblk): Complete rewrite.
3428 (grub_envblk_find): Removed.
3429 (grub_envblk_insert): Likewise.
3430 (grub_envblk_open): New prototype.
3431 (grub_envblk_set): Likewise.
3432 (grub_envblk_delete): Put const to VALUE.
3433 (grub_envblk_iterate): Put const to NAME and VALUE.
3434 (grub_envblk_close): New prototype.
3435 (grub_envblk_buffer): New inline function.
3436 (grub_envblk_size): Likewise.
3437
3438 * lib/envblk.c: Include grub/mm.h.
3439 (grub_env_find): Removed.
3440 (grub_envblk_open): New function.
3441 (grub_envblk_close): Likewise.
3442 (escaped_value_len): Likewise.
3443 (find_next_line): Likewise.
3444 (grub_envblk_insert): Removed.
3445 (grub_envblk_set): New function.
3446 (grub_envblk_delete): Complete rewrite.
3447 (grub_envblk_iterate): Likewise.
3448
a9368fd3 34492009-03-28 Robert Millan <rmh@aybabtu.com>
3450
3451 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3452 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3453 variables. Use 16-bit loader.
3454 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3455 loader.
3456 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3457 (grub_linux16_boot): ... this. Update all users.
3458 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3459 (grub_linux_boot): ... this. Update all users.
3460
3461 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3462 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3463 commands to `linux16' and `initrd16'.
3464 (GRUB_MOD_FINI(linux)): Rename to ...
3465 (GRUB_MOD_FINI(linux16)): ... this.
3466
e4dd5a7e 34672009-03-24 Pavel Roskin <proski@gnu.org>
3468
3469 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3470 not just for compilation.
3471
c04d6e05 34722009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3473
3474 Move multiboot helper out of kernel
3475
3476 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3477 `loader/i386/multiboot_helper.S'.
3478 * conf/i386-coreboot.rmk: Likewise
3479 * conf/i386-ieee1275.rmk: Likewise
3480
3481 * kern/i386/loader.S: Move multiboot helpers from here...
3482 * loader/i386/multiboot_helper.S: ...moved here
3483 * include/grub/i386/loader.h: Move declarations of multiboot
3484 helpers from here...
3485 * include/grub/i386/multiboot.h: ...moved here
3486 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3487
42a5b3fc 34882009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3489
3490 * kern/env.c (grub_env_context_open): Added an argument to specify
3491 whether a new context inherits exported variables from current
3492 one. This is useful when making a sandbox to interpret a config
3493 file.
3494 All callers updated.
3495
3496 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3497
b28bbc4e 34982009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3499
3500 * kern/env.c (grub_env_context_close): Fix memory leaks.
3501
f04f02e4 35022009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3503
3504 * normal/main.c (grub_normal_execute): Added an argument
3505 BATCH to specify if an interactive interface should be provided
3506 after reading a config file.
3507 All callers updated.
3508 (read_command_list): Prevent being executed twice.
3509 (read_fs_list): Likewise.
3510
42a5b3fc 3511 * include/grub/normal.h (grub_normal_execute): Updated the
3512 prototype.
f04f02e4 3513
41473ac2 35142009-03-22 Pavel Roskin <proski@gno.org>
3515
fbc00b0c 3516 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3517 _start.
3518 * kern/i386/pc/startup.S: Likewise.
3519 * kern/i386/efi/startup.S: Likewise.
3520 * kern/i386/ieee1275/startup.S: Likewise.
3521 * kern/i386/coreboot/startup.S: Likewise.
3522 * kern/x86_64/efi/startup.S: Likewise.
3523
41473ac2 3524 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3525 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3526 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3527
2274cc8f 35282009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3529
3530 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3531
3532 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3533 limit detection.
3534 Use vaddr of correct segment for entry_point.
3535
b1b797cb 35362009-03-21 Bean <bean123ch@gmail.com>
3537
3538 * commands/blocklist.c: Add include file <grub/command.h>, remove
3539 <grub/normal.h> and <grub/arg.h>.
3540 (grub_cmd_blocklist): Use the new command interface.
3541 (GRUB_MOD_INIT): Likewise.
3542 (GRUB_MOD_FINI): Likewise.
3543 * commands/boot.c: Likewise.
3544 * commands/cat.c: Likewise.
3545 * commands/cmp.c: Likewise.
3546 * commands/configfile.c: Likewise.
3547 * commands/crc.c: Likewise.
3548 * commands/echo.c: Likewise.
3549 * commands/halt.c: Likewise.
3550 * commands/handler.c: Likewise.
3551 * commands/hdparm.c: Likewise.
3552 * commands/help.c: Likewise.
3553 * commands/hexdump.c: Likewise.
3554 * commands/loadenv.c: Likewise.
3555 * commands/ls.c: Likewise.
3556 * commands/lsmmap.c: Likewise.
3557 * commands/lspci.c: Likewise.
3558 * commands/loadenv.c: Likewise.
3559 * commands/read.c: Likewise.
3560 * commands/reboot.c: Likewise.
3561 * commands/search.c: Likewise.
3562 * commands/sleep.c: Likewise.
3563 * commands/test.c: Likewise.
3564 * commands/usbtest.c: Likewise.
3565 * commands/videotest.c: Likewise.
3566 * commands/i386/cpuid.c: Likewise.
3567 * commands/i386/pc/halt.c: Likewise.
3568 * commands/i386/pc/play.c: Likewise.
3569 * commands/i386/pc/pxecmd.c: Likewise.
3570 * commands/i386/pc/vbeinfo.c: Likewise.
3571 * commands/i386/pc/vbetest.c: Likewise.
3572 * commands/ieee1275/suspend.c: Likewise.
3573 * disk/loopback.c: Likewise.
3574 * font/font_cmd.c: Likewise.
3575 * hello/hello.c: Likewise.
3576 * loader/efi/appleloader.c: Likewise.
3577 * loader/efi/chainloader.c: Likewise.
3578 * loader/i386/bsd.c: Likewise.
3579 * loader/i386/efi/linux.c: Likewise.
3580 * loader/i386/ieee1275/linux.c: Likewise.
3581 * loader/i386/linux.c: Likewise.
3582 * loader/i386/pc/chainloader.c: Likewise.
3583 * loader/i386/pc/linux.c: Likewise.
3584 * loader/powerpc/ieee1275/linux.c: Likewise.
3585 * loader/multiboot_loader.c: Likewise.
3586 * term/gfxterm.c: Likewise.
3587 * term/i386/pc/serial.c: Likewise.
3588 * term/terminfo.c: Likewise.
3589
3590 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3591 * term/i386/pc/vga.c: Likewise.
3592 * video/readers/jpeg.c: Likewise.
3593 * video/readers/png.c: Likewise.
3594 * video/readers/tga.c: Likewise.
3595
3596 * util/grub-fstest (cmd_loopback): Removed.
3597 (cmd_blocklist): Likewise.
3598 (cmd_ls): Likewise.
3599 (grub_register_command): Likewise.
3600 (grub_unregister_command): Likewise.
3601 (execute_command): Use grub_command_find to locate command and execute
3602 it.
3603
3604 * include/grub/efi/chainloader.h: Removed.
3605 * loader/efi/chainloader_normal.c: Likewise.
3606 * loader/i386/bsd_normal.c: Likewise.
3607 * loader/i386/pc/chainloader_normal.c: Likewise.
3608 * loader/i386/pc/multiboot_normal.c: Likewise.
3609 * loader/linux_normal.c: Likewise.
3610 * loader/multiboot_loader_normal.c: Likewise.
3611 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3612
3613 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3614 and grub_register_command_p1.
3615
3616 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3617 kern/command.c, lib/arg.c and commands/extcmd.c.
3618 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3619 (minicmd_mod_SOURCES): New variable.
3620 (minicmd_mod_CFLAGS): Likewise.
3621 (minicmd_mod_LDFLAGS): Likewise.
3622 (extcmd_mod_SOURCES): Likewise.
3623 (extcmd_mod_CFLAGS): Likewise.
3624 (extcmd_mod_LDFLAGS): Likewise.
3625 (boot_mod_SOURCES): Removed.
3626 (boot_mod_CFLAGS): Likewise.
3627 (boot_mod_LDFLAGS): Likewise.
3628
3629 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3630 kern/corecmd.c.
3631 (kernel_img_HEADERS): Add command.h.
3632 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3633 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3634 and lib/arg.c.
3635 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3636 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3637 remove the corresponding normal mode command.
3638 (normal_mod_SOURCES): Remove normal/arg.c.
3639 * conf/i386-coreboot.rmk: Likewise.
3640 * conf/i386-efi.rmk: Likewise.
3641 * conf/i386-ieee1275.rmk: Likewise.
3642 * conf/powerpc-ieee1275.rmk: Likewise.
3643 * conf/x86_64-efi.rmk: Likewise.
3644
3645 * include/grub/arg.h: Move from here ...
3646 * include/grub/lib/arg.h: ... to here.
3647
3648 * normal/arg.c: Move from here ...
3649 * lib/arg.c: ... to here.
3650
3651 * commands/extcmd.c: New file.
3652 * commands/minicmd.c: Likewise.
3653 * include/grub/command.h: Likewise.
3654 * include/grub/extcmd.h: Likewise.
3655 * kern/command.c: Likewise.
3656 * kern/corecmd.c: Likewise.
3657
3658 * kern/list.c (grub_list_iterate): Return int instead of void.
3659 (grub_list_insert): New function.
3660 (grub_prio_list_insert): Likewise.
3661
3662 * kern/rescue.c (grub_rescue_command): Removed.
3663 (grub_rescue_command_list): Likewise.
3664 (grub_rescue_register_command): Likewise.
3665 (grub_rescue_unregister_command): Likewise.
3666 (grub_rescue_cmd_boot): Move to minicmd.c
3667 (grub_rescue_cmd_help): Likewise.
3668 (grub_rescue_cmd_info): Likewise.
3669 (grub_rescue_cmd_boot): Likewise.
3670 (grub_rescue_cmd_testload): Likewise.
3671 (grub_rescue_cmd_dump): Likewise.
3672 (grub_rescue_cmd_rmmod): Likewise.
3673 (grub_rescue_cmd_lsmod): Likewise.
3674 (grub_rescue_cmd_exit): Likewise.
3675 (grub_rescue_print_devices): Moved to corecmd.c.
3676 (grub_rescue_print_files): Likewise.
3677 (grub_rescue_cmd_ls): Likewise.
3678 (grub_rescue_cmd_insmod): Likewise.
3679 (grub_rescue_cmd_set): Likewise.
3680 (grub_rescue_cmd_unset): Likewise.
7d074e3c 3681 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 3682 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 3683 commands, remove grub_rescue_register_command calls.
b1b797cb 3684
7d074e3c 3685 * normal/command.c (grub_register_command): Removed.
b1b797cb 3686 (grub_unregister_command): Likewise.
3687 (grub_command_find): Likewise.
3688 (grub_iterate_commands): Likewise.
3689 (rescue_command): Likewise.
3690 (export_command): Moved to corecmd.c.
3691 (set_command): Removed.
3692 (unset_command): Likewise.
3693 (insmod_command): Likewise.
3694 (rmmod_command): Likewise.
3695 (lsmod_command): Likewise.
3696 (grub_command_init): Likewise.
3697
3698 * normal/completion.c (iterate_command): Use cmd->prio to check for
3699 active command.
3700 (complete_arguments): Use grub_extcmd_t structure to find options.
3701 (grub_normal_do_completion): Change function grub_iterate_commands to
3702 grub_command_iterate.
3703
3704 * normal/execute.c (grub_script_execute_cmd): No need to parse
3705 argument here.
3706
3707 * normal/main.c (grub_dyncmd_dispatcher): New function.
3708 (read_command_list): Register unload commands as dyncmd.
3709 (grub_cmd_normal): Use new command interface, register rescue,
3710 unregister normal at entry, register normal, unregister rescue at exit.
3711
3712 * include/grub/list.h (grub_list_test_t): New type.
3713 (grub_list_iterate): Return int instead of void.
3714 (grub_list_insert): New function.
3715 (GRUB_AS_NAMED_LIST_P): New macro.
3716 (GRUB_AS_PRIO_LIST): Likewise.
3717 (GRUB_AS_PRIO_LIST_P): Likewise.
3718 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3719 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3720 (grub_prio_list): New structure.
3721 (grub_prio_list_insert): New function.
3722 (grub_prio_list_remove): New inline function.
3723
3724 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3725 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3726 (GRUB_COMMAND_FLAG_MENU): Likewise.
3727 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3728 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3729 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3730 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3731 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3732 (grub_command): Likewise.
3733 (grub_register_command): Likewise.
3734 (grub_command_find): Likewise.
3735 (grub_iterate_commands): Likewise.
3736 (grub_command_init): Likewise.
3737 (grub_arg_parse): Likewise.
3738 (grub_arg_show_help): Likewise.
3739
3740 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3741 (grub_rescue_unregister_command): Likewise.
3742
3743 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3744 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3745 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3746
3747 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3748 grub_rescue_cmd_initrd.
3749 * include/grub/i386/loader.h: Likewise.
3750 * include/grub/x86_64/loader.h: Likewise.
3751
3752 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3753
1f4147aa 37542009-03-21 Bean <bean123ch@gmail.com>
3755
3756 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3757 instead of stat in mingw environment.
3758
3759 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3760
3761 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3762
3763 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3764 AC_CONFIG_LINKS.
3765
2156d5ba 37662009-03-21 Bean <bean123ch@gmail.com>
3767
3768 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3769 out of range error.
3770
177b82ca 37712009-03-18 Michel Dänzer <michel@daenzer.net>
3772
3773 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3774 checking inode flags for EXT4_EXTENTS_FLAG.
3775
14aad807 37762009-03-18 Robert Millan <rmh@aybabtu.com>
3777
3778 * loader/i386/linux.c: Include `<grub/video.h>' and
3779 `<grub/i386/pc/vbe.h>'..
3780 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3781 (grub_linux32_boot): Attempt to configure video settings with
3782 grub_linux_setup_video().
3783 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3784 to avoid grub_console_fini() which would step out of graphical mode
3785 unconditionally.
3786
8cf83a27 37872009-03-14 Robert Millan <rmh@aybabtu.com>
3788
3789 Fix build on powerpc.
3790 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3791
40164e75 37922009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3793
3794 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3795 background image command.
3796
c58bc32a 37972009-03-12 Colin D Bennett <colin@gibibit.com>
3798
3799 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3800 (grub_gfxterm_putchar): Extract pairs of identical calls to
3801 draw_cursor out of conditional blocks.
3802
5415144a 38032009-03-11 Pavel Roskin <proski@gnu.org>
3804
3805 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3806 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3807
6394042e 38082009-03-11 Robert Millan <rmh@aybabtu.com>
3809
3810 * loader/i386/multiboot_elfxx.c
3811 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3812
b7b50e5f 38132009-03-11 Felix Zielcke <fzielcke@z-51.de>
3814
3815 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3816 `kern/handler.c'.
3817
1ca7fc96 38182009-03-11 Robert Millan <rmh@aybabtu.com>
3819
3820 * loader/i386/multiboot.c (code_size): New variable.
3821 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 3822 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 3823 4-byte alignment to MBI and others by increasing
7d074e3c 3824 `boot_loader_name_length' appropriately.
1ca7fc96 3825
3826 * loader/i386/multiboot_elfxx.c
3827 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3828
a83ea1d2 38292009-03-09 Felix Zielcke <fzielcke@z-51.de>
3830
3831 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3832 `fs/ext2.c'.
3833
aa9f3bff 38342009-03-08 Robert Millan <rmh@aybabtu.com>
3835
3836 Make loader/i386/linux.c usable on i386-pc again.
3837
3838 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3839 memory to heap.
3840 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3841 `#error' stanza.
3842
d8b3b60e 38432009-03-07 Bean <bean123ch@gmail.com>
3844
3845 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3846 allocation.
3847
b362c9e9 38482009-03-06 Robert Millan <rmh@aybabtu.com>
3849
3850 Fix display issue on terminals with screen size other than 80x25
3851 (e.g. gfxterm with resolution higher than 640x480).
3852
3853 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 3854 position relative to the center of the terminal instead of relying
b362c9e9 3855 on a hardcoded offset.
3856
9304eef1 38572009-03-04 Robert Millan <rmh@aybabtu.com>
3858
3859 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3860 installed.
3861
3862 * Makefile.in (host_kernel): New variable.
3863 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3864 scripts instead of just the windows one.
3865 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3866
eabc95fb 38672009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 3868
3869 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3870 `kern/handler.c'.
3871 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3872 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3873 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3874 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3875 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3876 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3877
ceb1223c 38782009-03-04 Felix Zielcke <fzielcke@z-51.de>
3879
3880 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3881 or if there's no space for the disk label and print the partition number on a
3882 invalid magic.
3883
4910684a 38842009-03-04 Felix Zielcke <fzielcke@z-51.de>
3885
3886 * util/misc.c: Include <time.h>.
3887 (grub_millisleep): New function.
3888
7e9ca17a 38892009-03-04 Bean <bean123ch@gmail.com>
3890
3891 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3892 another option -mno-red-zone.
3893
3894 * commands/handler.c: Change module description.
3895
3896 * kern/handler.c: Add missing space at the end of description line.
3897
3898 * kern/list.c: Likewise.
3899
f501677c 39002009-03-03 Robert Millan <rmh@aybabtu.com>
3901
3902 Move more components to the relocation area, and fix mbi pointer
3903 handling to use the destination rather than the origin (thanks to
3904 Vladimir Serbinenko for spotting).
3905
3906 * loader/i386/multiboot.c (mbi_dest): New variable.
3907 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3908 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3909 relocation area.
3910
9902d047 39112009-03-01 Bean <bean123ch@gmail.com>
3912
50fb7002 3913 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 3914 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3915 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3916 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3917
3918 * loader/i386/efi/linux.c (acpi_guid): New variable.
3919 (acpi_guid): Likewise.
3920 (EBDA_SEG_ADDR): New constant.
3921 (LOW_MEM_ADDR): Likewise.
3922 (FAKE_EBDA_SEG): Likewise.
3923 (fake_bios_data): New function.
3924 (grub_linux_boot): Call fake_bios_data.
3925
71b9f361 39262009-03-01 Bean <bean123ch@gmail.com>
3927
3928 * commands/terminal.c: Removed.
3929
3930 * commands/handler.c: New file.
3931
3932 * include/grub/list.h: Likewise.
3933
3934 * include/grub/handler.h: Likewise.
3935
3936 * kern/list.c: Likewise.
3937
3938 * kern/handler.c: Likewise.
3939
3940 * kern/term.h: Include header file <grub/handler.h>.
3941 (grub_term_input): Move next field to the beginning.
3942 (grub_term_output): Likewise.
3943 (grub_term_input_class): New variable.
3944 (grub_term_output_class): Likewise.
3945 (grub_term_register_input): Changed to inline function.
3946 (grub_term_register_output): Likewise.
3947 (grub_term_unregister_input): Likewise.
3948 (grub_term_unregister_output): Likewise.
3949 (grub_term_set_current_input): Likewise.
3950 (grub_term_set_current_output): Likewise.
3951 (grub_term_get_current_input): Likewise.
3952 (grub_term_get_current_output): Likewise.
3953 (grub_term_iterate_input): Removed.
3954 (grub_term_iterate_output): Likewise.
3955
3956 * kern/term.c (grub_term_list_input): Removed.
3957 (grub_term_list_output): Likewise.
3958 (grub_term_input_class): New variable.
3959 (grub_term_output_class): Likewise.
50fb7002 3960 (grub_cur_term_input): Change variable as macro.
71b9f361 3961 (grub_cur_term_output): Likewise.
3962 (grub_term_register_input): Removed.
3963 (grub_term_register_output): Likewise.
3964 (grub_term_unregister_input): Likewise.
3965 (grub_term_unregister_output): Likewise.
3966 (grub_term_set_current_input): Likewise.
3967 (grub_term_set_current_output): Likewise.
3968 (grub_term_iterate_input): Likewise.
3969 (grub_term_iterate_output): Likewise.
3970 (grub_term_get_current_input): Likewise.
3971 (grub_term_get_current_output): Likewise.
3972
3973 * util/grub-editenv.c: Include header file <grub/handler.h>.
3974 (grub_term_get_current_input): Removed.
3975 (grub_term_get_current_output): Likewise.
3976 (grub_term_input_class): New variable.
50fb7002 3977 (grub_term_output_class): Likewise.
71b9f361 3978
3979 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3980 (grub_term_get_current_output): Likewise.
3981 (grub_term_input_class): New variable.
50fb7002 3982 (grub_term_output_class): Likewise.
71b9f361 3983
3984 * util/grub-probe.c (grub_term_get_current_input): Removed.
3985 (grub_term_get_current_output): Likewise.
3986 (grub_term_input_class): New variable.
50fb7002 3987 (grub_term_output_class): Likewise.
71b9f361 3988
3989 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3990 (grub_term_get_current_output): Likewise.
3991 (grub_term_input_class): New variable.
50fb7002 3992 (grub_term_output_class): Likewise.
71b9f361 3993
3994 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3995 (terminal_mod_SOURCES): Likewise.
3996 (terminal_mod_CFLAGS): Likewise.
3997 (terminal_mod_LDFLAGS): Likewise.
3998
3999 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4000 handler.c.
4001 (kernel_img_SOURCES): Add list.c and handler.c.
4002 (kernel_img_HEADERS): Add list.h and handler.h.
4003
4004 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4005 handler.c.
4006 (kernel_mod_SOURCES): Add list.c and handler.c.
4007 (kernel_mod_HEADERS): Add list.h and handler.h.
4008
4009 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4010 handler.c.
4011 (kernel_elf_SOURCES): Add list.c and handler.c.
4012 (kernel_elf_HEADERS): Add list.h and handler.h.
4013
4014 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4015 handler.c.
4016 (kernel_elf_SOURCES): Add list.c and handler.c.
4017 (kernel_elf_HEADERS): Add list.h and handler.h.
4018
4019 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4020 handler.c.
4021 (kernel_mod_SOURCES): Add list.c and handler.c.
4022 (kernel_mod_HEADERS): Add list.h and handler.h.
4023
4024 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4025 handler.c.
4026 (kernel_elf_SOURCES): Add list.c and handler.c.
4027 (kernel_elf_HEADERS): Add list.h and handler.h.
4028
8a31787f 40292009-02-27 Robert Millan <rmh@aybabtu.com>
4030
4031 Factorize elf32 / elf64 code in Multiboot loader. This will
4032 prevent it from getting out of sync again.
4033
4034 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4035 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4036 grub_multiboot_load_elf64): Move from here ...
4037 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4038 grub_multiboot_load_elf): ... to here (new file).
4039
51cd3dfc 40402009-02-27 Robert Millan <rmh@aybabtu.com>
4041
4042 * util/grub.d/10_linux.in: Rename "single-user mode" to
4043 "recovery mode".
4044
6e8c9c3a 40452009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4046
4047 Don't leak in SCSI code.
4048 * disk/scsi.c (grub_scsi_close): free `scsi'.
4049
4b6bf4f9 40502009-02-27 Robert Millan <rmh@aybabtu.com>
4051
4052 * loader/i386/pc/multiboot.c: Move from here ...
4053 * loader/i386/multiboot.c: ... to here. Update all users.
4054
b9413424 40552009-02-27 Robert Millan <rmh@aybabtu.com>
4056
4057 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4058 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4059
50fb7002 40602009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 4061
4062 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4063 b-tree.
4064
8cc50345 40652009-02-27 Robert Millan <rmh@aybabtu.com>
4066
4067 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4068 `0x' qualifier as 0 when base is specified as parameter).
4069
6e09b8b7 40702009-02-24 Bean <bean123ch@gmail.com>
4071
4072 * configure.ac: Check for -mcmodel=large in x86_64 target.
4073
4074 * include/grub/efi/api.h (efi_call_10): New macro.
4075 (efi_wrap_10): New function.
4076
4077 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4078 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4079 (GRUB_PE32_REL_BASED_LOW): Likewise.
4080 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4081 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4082 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4083 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4084 (GRUB_PE32_REL_BASED_REL): Likewise.
4085 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4086 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4087 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4088
4089 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4090 issue.
4091
4092 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4093 (efi_wrap_10): New function.
4094
4095 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4096
4097 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4098 MB/MBP model (NV chipset).
4099 (devdata_devs): Add devpath_5 to the list.
4100
4101 * load/i386/efi/linux.c (video_base): Remove variable.
4102 (RGB_MASK): New macro.
4103 (RGB_MAGIC): Likewise.
4104 (LINE_MIN): Likewise.
4105 (LINE_MAX): Likewise.
4106 (FBTEST_STEP): Likewise.
4107 (FBTEST_COUNT): Likewise.
4108 (fb_list): New variable.
4109 (grub_find_video_card): Remove function.
4110 (find_framebuf): New function.
4111 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4112 line length.
4113
4114 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4115 problem for x86_64.
4116
74b21bee 41172009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4118
4119 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4120
4121 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4122 coding tool name.
4123
a455f472 41242009-02-22 Robert Millan <rmh@aybabtu.com>
4125
4126 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4127 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4128 in our relocation, instead of using it directly from heap. Also
4129 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4130
6374daf3 41312009-02-21 Robert Millan <rmh@aybabtu.com>
4132
4133 Implement USB keyboard support (based on patch by Marco Gerards)
4134
4135 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4136 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4137 (usb_keyboard_mod_LDFLAGS): New variables.
4138
4139 * term/usb_keyboard.c: New file.
4140
8fa4ea70 41412009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4142
4143 Corrected wrong declaration
4144
4145 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4146
353976ac 41472009-02-14 Christian Franke <franke@computer.org>
4148
4149 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4150 (grub_lspci_iter): Print class code and programming interface byte.
4151
6aa1169b 41522009-02-14 Christian Franke <franke@computer.org>
4153
4154 * gendistlist.sh: Ignore `.svn' directories.
4155
265372ca 41562009-02-14 Felix Zielcke <fzielcke@z-51.de>
4157
4158 * fs/fat.c: Add 2009 to Copyright line.
4159
9ff516f3 41602009-02-14 Christian Franke <franke@computer.org>
4161
4162 * commands/hdparm.c: New file. Provides `hdparm' command
4163 which sends ATA commands via grub_disk_ata_pass_through ().
4164
4165 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4166
4167 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4168 and <grub/cpu/io.h> to include/grub/ata.h.
4169 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4170 (GRUB_CDROM_SECTOR_SIZE): Remove.
4171 (GRUB_ATA_*): Move to include/grub/ata.h.
4172 (GRUB_ATAPI_*): Likewise.
4173 (enum grub_ata_commands): Likewise.
4174 (enum grub_ata_timeout_milliseconds): Likewise.
4175 (struct grub_ata_device): Likewise.
4176 (grub_ata_regset): Likewise.
4177 (grub_ata_regget): Likewise.
4178 (grub_ata_regset2): Likewise.
4179 (grub_ata_regget2): Likewise.
4180 (grub_ata_check_ready): Likewise.
4181 (grub_ata_wait_not_busy): Remove static, exported in
4182 include/grub/ata.h.
4183 (grub_ata_wait_drq): Likewise.
4184 (grub_ata_pio_read): Likewise.
4185
4186 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4187 function for hdparm.mod.
4188
4189 * include/grub/ata.h: New file, contains declarations from
4190 disk/ata.c.
4191 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4192
4193 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4194 (grub_disk_ata_pass_through): New exported variable.
4195
4196 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4197
772e23da 41982009-02-13 Colin D Bennett <colin@gibibit.com>
4199
4200 Support multiple fallback entries, and provide an API to support
4201 executing default+fallback menu entries. Renamed the `terminal' menu
4202 viewer to `text'.
4203
4204 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4205 variable declaration.
4206 (grub_menu_execute_callback): New structure declaration.
4207 (grub_menu_execute_callback_t): New typedef.
4208 (grub_menu_execute_with_fallback): New function declaration.
4209 (grub_menu_get_entry): Likewise.
4210 (grub_menu_get_timeout): Likewise.
4211 (grub_menu_set_timeout): Likewise.
4212
4213 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4214
4215 * normal/menu.c (grub_wait_after_message): Moved to
4216 `normal/menu_text.c'.
4217 (draw_border): Likewise.
4218 (print_message): Likewise.
4219 (print_entry): Likewise.
4220 (print_entries): Likewise.
4221 (grub_menu_init_page): Likewise.
4222 (get_entry_number): Likewise.
4223 (print_timeout): Likewise.
4224 (run_menu): Likewise.
4225 (grub_menu_execute_entry): Likewise.
4226 (show_text_menu): Likewise.
4227 (get_and_remove_first_entry_number): New function.
4228 (grub_menu_execute_with_fallback): Likewise.
4229 (get_entry): Renamed to ...
4230 (grub_menu_get_entry): .. this and made it global.
4231 (get_timeout): Renamed to ...
4232 (grub_menu_get_timeout): ... this and made it global.
4233 (set_timeout): Renamed to ...
4234 (grub_menu_set_timeout): ... this and made it global.
4235 (grub_normal_terminal_menu_viewer): Renamed to ...
4236 (grub_normal_text_menu_viewer): ... this.
4237
4238 * normal/menu_text.c: New file. Extracted text-menu-specific code
4239 from normal/menu.c.
4240
4241 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4242 (normal_mod_SOURCES): Likewise.
4243
4244 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4245 (normal_mod_SOURCES): Likewise.
4246
4247 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4248 (normal_mod_SOURCES): Likewise.
4249
4250 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4251 (normal_mod_SOURCES): Likewise.
4252
4253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4254 (normal_mod_SOURCES): Likewise.
4255
4256 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4257 (normal_mod_SOURCES): Likewise.
4258
4259 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4260 (normal_mod_SOURCES): Likewise.
4261
16ac430e 42622009-02-11 Robert Millan <rmh@aybabtu.com>
4263
4264 * util/grub.d/00_header.in: Update old reference to `font' command.
4265
06ff20fc 42662009-02-10 Felix Zielcke <fzielcke@z-51.de>
4267
4268 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4269
4270 Based on patch from Javier Martín.
4271
96da9407 42722009-02-09 Felix Zielcke <fzielcke@z-51.de>
4273
4274 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 4275 to avoid false positives with FAT.
96da9407 4276 (grub_fstest_SOURCES): Likewise.
4277 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4278 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4279 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4280 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4281 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4282 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4283
6dca6fe4 42842009-02-09 Felix Zielcke <fzielcke@z-51.de>
4285
06ff20fc 4286 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 4287 bpb.version_specific.fat12_or_fat16.fstype and
4288 bpb.version_specific.fat32.fstype.
4289
2550c62f 42902009-02-08 Robert Millan <rmh@aybabtu.com>
4291
be110b30 4292 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 4293
56978920 42942009-02-08 Robert Millan <rmh@aybabtu.com>
4295
4296 * Makefile.in (host_os, host_cpu): New variables.
4297 (target_os): Remove. Update all users.
4298
d64399b5 42992009-02-08 Marco Gerards <marco@gnu.org>
4300
4301 * Makefile.in (enable_grub_emu_usb): New variable.
4302 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4303 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4304 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4305 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4306 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4307 `usbtest.mod' and `usbms.mod'.
4308 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4309 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4310 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4311 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4312 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4313 variables.
4314
4315 * disk/usbms.c: New file.
4316
4317 * include/grub/usb.h: Likewise.
4318
4319 * include/grub/usbtrans.h: Likewise.
4320
4321 * include/grub/usbdesc.h: Likewise.
4322
4323 * bus/usb/usbtrans.c: Likewise.
4324
4325 * bus/usb/ohci.c: Likewise.
4326
4327 * bus/usb/uhci.c: Likewise.
4328
4329 * bus/usb/usbhub.c: Likewise.
4330
4331 * bus/usb/usb.c: Likewise.
4332
4333 * commands/usbtest.c: Likewise.
4334
4335 * util/usb.c: Likewise.
50fb7002 4336
d64399b5 4337 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4338
4339 * configure.ac: Test for libusb presence.
50fb7002 4340
d64399b5 4341 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4342
2b40d6bb 43432009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4344
4345 * kern/mm.c: Add more comments.
4346
73a4ce81 43472009-02-08 Robert Millan <rmh@aybabtu.com>
4348
4349 Patch from Javier Martín.
4350 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4351 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4352
f821ce59 43532009-02-08 Robert Millan <rmh@aybabtu.com>
4354
4355 * fs/cpio.c: Split tar functionality to ...
4356 * fs/tar.c: ... here (new file). Update all users.
4357
aebfc4b0 43582009-02-07 Robert Millan <rmh@aybabtu.com>
4359
4360 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4361 backward-incompatible features.
4362
4363 Based on patch from Javier Martín, with some adjustments.
4364
50fb7002 43652009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 4366
4367 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4368
0bb5115e 43692009-02-07 Robert Millan <rmh@aybabtu.com>
4370
4371 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4372 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4373 after the RAID stuff.
4374
38a0f8e7 43752009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4376
50fb7002 4377 Fixes problem when running vbetest command as reported by
38a0f8e7 4378 Vladimir Serbinenko <phcoder@gmail.com>.
4379
4380 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4381
3143cc1c 43822009-02-04 Felix Zielcke <fzielcke@z-51.de>
4383
4384 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4385 /dev/md/NpN style mdraid devices.
4386
9cba6fce 43872009-02-03 Felix Zielcke <fzielcke@z-51.de>
4388
4389 * util/unifont2pff.rb: Remove.
4390
e507a2c1 43912009-02-03 Felix Zielcke <fzielcke@z-51.de>
4392
4393 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4394 `#'.
4395
d2c2b4cd 43962009-02-03 Felix Zielcke <fzielcke@z-51.de>
4397
4398 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4399 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4400 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4401 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4402 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4403 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4404 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4405
b4315fb0 44062009-02-02 Christian Franke <franke@computer.org>
4407
4408 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4409
de3aa260 44102009-02-01 Felix Zielcke <fzielcke@z-51.de>
4411
7c3ff286 4412 * INSTALL: Note that we now require at least autoconf 2.59 and
4413 that LZO is optional.
de3aa260 4414
825a182b 44152009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4416
4417 Base on patch on bug #24154 created by Tomas Tintera
4418 <trosos@seznam.cz>.
4419
4420 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4421
a69ef770 44222009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4423
7c3ff286 4424 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 4425 <bero@arklinux.org>.
4426
4427 * normal/parser.y (script_init): Add missing semicolon.
4428
6fa42fa6 44292009-01-31 Colin D Bennett <colin@gibibit.com>
4430
7c3ff286 4431 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 4432 (free_menu_entry_classes): Added.
4433 (grub_normal_menu_addentry): Added class property handling.
4434 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4435 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4436
4437 * normal/menu_viewer.c: New file.
4438
4439 * normal/menu.c (run_menu_entry): Renamed to ...
4440 (grub_menu_execute_entry): ... this and made it as global.
4441 (grub_menu_run): Renamed to ...
4442 (show_text_menu): ... this and made it local.
4443 (show_text_menu): Adapt to new function names.
4444 (grub_normal_terminal_menu_viewer): New global variable.
4445
4446 * include/grub/menu.h: New file.
4447
4448 * include/grub/menu_viewer.h: New file.
4449
4450 * include/grub/normal.h: Added include to grub/menu.h.
4451 (grub_menu_entry): Moved to include/grub/menu.h.
4452 (grub_menu_entry_t): Likewise.
4453 (grub_menu): Likewise.
4454 (grub_menu_t): Likewise.
4455 (grub_normal_terminal_menu_viewer): Added.
4456 (grub_menu_execute_entry): Likewise.
4457 (grub_menu_run): Removed.
4458
4459 * DISTLIST: Added include/grub/menu.h.
4460 Added include/grub/menu_viewer.h.
4461 Added normal/menu_viewer.c.
4462
44632009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4464
4465 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4466 arglist for menutitle arguments.
4467
4468 * normal/main.c (grub_normal_menu_addentry): Likewise.
4469
4470 * normal/parser.y (menuentry): Likewise.
4471
4472 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4473
4474 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4475 (grub_script_create_cmdmenu): Likewise.
4476
4477 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4478
4479 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4480 changes.
4481
4482 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4483
4484 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4485
4486 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4487
4488 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4489
4490 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4491
4492 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4493
56192c23 44942009-01-30 Christian Franke <franke@computer.org>
4495
4496 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4497 in option help text.
4498
d72521b3 44992009-01-27 Pavel Roskin <proski@gnu.org>
4500
4501 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4502
994b5e84 45032009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4504
4505 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4506
4507 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4508
4509 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4510 unregister function.
4511
6a7eab2c 45122009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4513
4514 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4515
4516 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4517
4518 * util/grub-mkfont.c (usage): Fix typo.
4519
4520 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4521
1806b56e 45222009-01-26 Daniel Mierswa <impulze@impulze.org>
4523
3fb18f09 4524 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4525
336e1fb9 4526 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4527
1806b56e 4528 * kern/misc.c (grub_strcasecmp): New function.
4529 (grub_strcasecmp): Use grub_size_t instead of int for length.
4530 Fix return value.
4531 * include/grub/misc.h: Update function prototypes.
4532
580b2a0f 45332009-01-26 Robert Millan <rmh@aybabtu.com>
4534
4535 * configure.ac: Fix cross-compilation check.
ef257b36 4536
d31c24f1 45372009-01-22 Christian Franke <franke@computer.org>
4538
4539 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4540 (precision) digit string. Allow `.format2' without `format1' (width).
4541 Limit input chars for `%s' output to `format2' if specified. This is
4542 compatible with standard printf ().
4543
3138b44c 45442009-01-22 Christian Franke <franke@computer.org>
4545
4546 * disk/ata.c (grub_ata_wait_status): Replace by ...
4547 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4548 other status bits may be invalid while BSY is asserted.
4549 (grub_ata_check_ready): New function.
4550 (grub_ata_cmd): Removed.
4551 (grub_ata_wait_drq): New function.
4552 (grub_ata_strncpy): Remove inline.
4553 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4554 and error check now done by grub_ata_wait_drq ().
4555 (grub_ata_pio_write): Likewise.
4556 (grub_atapi_identify): Set DEV before check for !BSY. Use
4557 grub_ata_wait_drq () to wait for data.
4558 (grub_ata_device_initialize): Add status register check to
4559 detect missing SATA slave devices. Add debug messages.
4560 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4561 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4562 transfer loop by grub_ata_pio_write ().
4563 (grub_ata_identify): Set DEV before check for !BSY. Use
4564 grub_ata_wait_drq () to wait for data.
ef257b36 4565 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 4566 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4567 read/write in one loop. Fix invalid command on write. Fix incomplete
4568 command on (size % batch) == 0. Add missing error check after write of
4569 last block. Add debug messages.
4570 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4571
59a64ef6 45722009-01-19 Christian Franke <franke@computer.org>
4573
4574 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4575 (GRUB_ATAPI_IREASON_*): Likewise.
4576 (grub_ata_pio_write): Fix timeout error return.
4577 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4578 (grub_atapi_wait_drq): New function.
4579 (grub_atapi_packet): New parameter `size'.
4580 Use grub_atapi_wait_drq () and direct write instead of
4581 grub_ata_pio_write ().
4582 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4583 reads the number of bytes requested by the device for each DRQ
4584 assertion.
4585 (grub_atapi_write): Remove old implementation, return not
4586 implemented instead.
4587
1cfe20b3 45882009-01-19 Christian Franke <franke@computer.org>
4589
4590 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4591 of 512 to calculate data size.
4592 (grub_scsi_read12): Likewise.
4593 (grub_scsi_write10): Likewise.
4594 (grub_scsi_write12): Likewise.
4595 (grub_scsi_read): Adjust size according to blocksize.
4596 Add checks for invalid blocksize and unaligned transfer.
4597
bee5fe5d 45982009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4599
4600 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4601
ef257b36 4602 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 4603 width glyphs.
4604
3e643f8c 46052009-01-19 Robert Millan <rmh@aybabtu.com>
4606
4607 * config.guess: Update to latest version from config git.
4608 * config.sub: Likewise.
4609
4fa80998 46102009-01-17 Felix Zielcke <fzielcke@z-51.de>
4611
4612 * Makefile.in: Change font compilation to use new grub-mkfont instead
4613 of java version.
4614
4615 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4616 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4617 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4618 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4619 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4620 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4621 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4622 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4623 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4624
7086085b 46252009-01-16 Christian Franke <franke@computer.org>
4626
4627 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4628 (enum grub_ata_timeout_milliseconds): New enum.
4629 (grub_ata_wait_status): Add parameter milliseconds.
4630 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4631 recovery from timed-out commands.
4632 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4633 return grub_errno instead of REG_ERROR.
4634 (grub_ata_pio_write): Add parameter milliseconds.
4635 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4636 Pass milliseconds to grub_ata_wait_status () and
4637 grub_ata_pio_read ().
4638 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4639 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4640 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4641 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4642 It is not suitable for device detection, because DEV bit is ignored,
4643 the command may run too long, and not all devices set the signature
4644 properly.
4645 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4646 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4647 Fix device selection, DEV bit must be set first to address the registers
4648 of the correct device.
4649 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4650 grub_ata_pio_read/write ().
4651 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4652 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4653
4a412913 46542009-01-13 Carles Pina i Estany <carles@pina.cat>
4655
4656 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4657
7795c55e 46582009-01-13 Bean <bean123ch@gmail.com>
d913988c 4659
4660 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4661
7795c55e 46622009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 4663
4664 * Makefile.in: (enable_grub_mkfont): New variable.
4665 (freetype_cflags): Likewise.
4666 (freetype_libs): Likewise.
4667
4668 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4669 (grub_mkfont_SOURCES): New variable.
4670 (grub_mkfont_CFLAGS): Likewise.
4671 (grub_mkfont_LDFLAGS): Likewise.
4672
4673 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4674 library if `--enable-grub-mkfont' is requested.
4675 (enable_grub_mkfont): New variable.
4676 (freetype_cflags): Likewise.
4677 (freetype_libs): Likewise.
4678
4679 * util/grub-mkfont.c: New file.
4680
093af1fe 46812009-01-12 Christian Franke <franke@computer.org>
4682
4683 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4684 mode check. Fix setting of compat_use[].
4685
f36cc108 46862009-01-10 Robert Millan <rmh@aybabtu.com>
4687
4688 Update a few copyright years which we forgot to do in 2008 (only for
4689 files whose changes made in 2008 were copyright-significant)
4690
4691 * Makefile.in: Add 2008 to Copyright line.
4692 * disk/ieee1275/ofdisk.c: Likewise.
4693 * disk/efi/efidisk.c: Likewise.
4694 * kern/dl.c: Likewise.
4695 * kern/sparc64/ieee1275/init.c: Likewise.
4696 * kern/mm.c: Likewise.
4697 * kern/efi/mm.c: Likewise.
4698 * boot/i386/pc/boot.S: Likewise.
4699 * genfslist.sh: Likewise.
4700 * fs/iso9660.c: Likewise.
4701 * fs/hfs.c: Likewise.
4702 * fs/jfs.c: Likewise.
4703 * fs/minix.c: Likewise.
4704 * fs/ufs.c: Likewise.
4705 * gensymlist.sh.in: Likewise.
4706 * genkernsyms.sh.in: Likewise.
4707 * include/grub/misc.h: Likewise.
4708 * include/grub/types.h: Likewise.
4709 * include/grub/symbol.h: Likewise.
4710 * include/grub/elf.h: Likewise.
4711 * include/grub/kernel.h: Likewise.
4712 * include/grub/disk.h: Likewise.
4713 * include/grub/dl.h: Likewise.
4714 * include/grub/i386/linux.h: Likewise.
4715 * include/grub/i386/pc/biosdisk.h: Likewise.
4716 * include/grub/efi/api.h: Likewise.
4717 * include/grub/efi/pe32.h: Likewise.
4718 * include/grub/util/misc.h: Likewise.
4719 * normal/execute.c: Likewise.
4720 * normal/arg.c: Likewise.
4721 * normal/completion.c: Likewise.
4722 * normal/lexer.c: Likewise.
4723 * normal/parser.y: Likewise.
4724 * normal/misc.c: Likewise.
4725 * commands/i386/pc/vbeinfo.c: Likewise.
4726 * commands/hexdump.c: Likewise.
4727 * commands/terminal.c: Likewise.
4728 * commands/ls.c: Likewise.
4729 * commands/help.c: Likewise.
4730 * partmap/pc.c: Likewise.
4731 * loader/efi/chainloader.c: Likewise.
4732 * loader/multiboot_loader.c: Likewise.
4733 * loader/i386/pc/multiboot2.c: Likewise.
4734 * term/efi/console.c: Likewise.
4735 * term/i386/pc/serial.c: Likewise.
4736 * util/lvm.c: Likewise.
4737 * util/console.c: Likewise.
4738 * util/i386/efi/grub-mkimage.c: Likewise.
4739 * util/raid.c: Likewise.
4740
7f02114b 47412009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4742
4743 * commands/videotest.c: Removed include to grub/machine/memory.h.
4744
4745 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4746 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4747 (video_mod_SOURCES): Removed.
4748 (video_mod_CFLAGS): Likewise.
4749 (video_mod_LDFLAGS): Likewise.
4750 (gfxterm_mod_SOURCES): Likewise.
4751 (gfxterm_mod_CFLAGS): Likewise.
4752 (gfxterm_mod_LDFLAGS): Likewise.
4753 (videotest_mod_SOURCES): Likewise.
4754 (videotest_mod_CFLAGS): Likewise.
4755 (videotest_mod_LDFLAGS): Likewise.
4756 (bitmap_mod_SOURCES): Likewise.
4757 (bitmap_mod_CFLAGS): Likewise.
4758 (bitmap_mod_LDFLAGS): Likewise.
4759 (tga_mod_SOURCES): Likewise.
4760 (tga_mod_CFLAGS): Likewise.
4761 (tga_mod_LDFLAGS): Likewise.
4762 (jpeg_mod_SOURCES): Likewise.
4763 (jpeg_mod_CFLAGS): Likewise.
4764 (jpeg_mod_LDFLAGS): Likewise.
4765 (png_mod_SOURCES): Likewise.
4766 (png_mod_CFLAGS): Likewise.
4767 (png_mod_LDFLAGS): Likewise.
4768
4769 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4770 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4771 (video_mod_SOURCES): Added.
4772 (video_mod_CFLAGS): Likewise.
4773 (video_mod_LDFLAGS): Likewise.
4774 (videotest_mod_SOURCES): Likewise.
4775 (videotest_mod_CFLAGS): Likewise.
4776 (videotest_mod_LDFLAGS): Likewise.
4777 (bitmap_mod_SOURCES): Likewise.
4778 (bitmap_mod_CFLAGS): Likewise.
4779 (bitmap_mod_LDFLAGS): Likewise.
4780 (tga_mod_SOURCES): Likewise.
4781 (tga_mod_CFLAGS): Likewise.
4782 (tga_mod_LDFLAGS): Likewise.
4783 (jpeg_mod_SOURCES): Likewise.
4784 (jpeg_mod_CFLAGS): Likewise.
4785 (jpeg_mod_LDFLAGS): Likewise.
4786 (png_mod_SOURCES): Likewise.
4787 (png_mod_CFLAGS): Likewise.
4788 (png_mod_LDFLAGS): Likewise.
4789 (gfxterm_mod_SOURCES): Likewise.
4790 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 4791 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 4792
4793 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4794 grub/machine/console.h.
4795
644fff97 47962009-01-04 Jerone Young <jerone@gmail.com>
4797
4798 Make on screen instructions clearer
4799
4800 Based on patch created by Jidanni <jidanni@jidanni.org>
4801
4802 * normal/menu.c: print clearer instructions on the screen
4803
1e901a75 48042009-01-02 Colin D Bennett <colin@gibibit.com>
4805
4806 New font engine.
34c44600 4807
1e901a75 4808 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4809 build system and fixed gfxterm.c to work with different sized fonts.
4810
4811 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 4812
1e901a75 4813 * configure: Re-generated.
34c44600 4814
1e901a75 4815 * DISTLIST: Removed font/manager.c.
4816 Added font/font.c.
4817 Added font/font_cmd.c.
34c44600 4818
1e901a75 4819 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4820 compilation.
34c44600 4821
1e901a75 4822 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 4823
4824 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 4825
4826 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 4827
1e901a75 4828 * normal/menu.c: Likewise.
34c44600 4829
1e901a75 4830 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4831 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 4832
1e901a75 4833 * include/grub/font.h: Replaced with new file.
34c44600 4834
1e901a75 4835 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4836 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4837 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4838 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4839 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 4840 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 4841 fg_red, fg_green, fg_blue, fg_alpha.
4842 (grub_video_adapter): Removed blit_glyph.
34c44600 4843 (grub_video_blit_glyph): Removed.
4844
1e901a75 4845 * font/manager.c: Removed file.
34c44600 4846
4847 * font/font.c: New file.
4848
1e901a75 4849 * font/font_cmd.c: Likewise.
34c44600 4850
1e901a75 4851 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 4852
1e901a75 4853 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4854 (grub_video_vbe_map_rgba): Likewise.
4855 (grub_video_vbe_unmap_color_int): Likewise.
4856 (grub_video_vbe_blit_glyph): Removed.
4857 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 4858
1e901a75 4859 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4860 (get_pixel): Likewise.
34c44600 4861 (set_pixel): Likewise.
4862
1e901a75 4863 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 4864
1e901a75 4865 * term/gfxterm.c: Adapted to new font engine.
34c44600 4866
1e901a75 4867 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 4868
1e901a75 4869 * term/i386/pc/vga.c: Likewise.
34c44600 4870
1e901a75 4871 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 4872
1e901a75 4873 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 4874
1e901a75 4875 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4876
1e901a75 4877 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4878
1e901a75 4879 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 4880
1e901a75 4881 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 4882
1e901a75 4883 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 4884
1e901a75 4885 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 4886
1e901a75 4887 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4888
4889 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 4890
1e901a75 4891 * util/grub-mkconfig_lib.in: Changed font extension.
4892
278922e8 48932008-12-28 Felix Zielcke <fzielcke@z-51.de>
4894
4895 * util/getroot.c (grub_util_get_grub_dev): Add support for
4896 /dev/md/dNNpNN style partitionable mdraid devices.
4897
3ced05cf 48982008-12-12 Alex Smith <alex@alex-smith.me.uk>
4899
4900 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4901 at a time limit of the PXE TFTP API correctly.
4902 (grub_pxefs_close): Likewise.
4903
7fd0ee30 49042008-11-29 Robert Millan <rmh@aybabtu.com>
4905
34c44600 4906 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 4907 grub_ata_device_initialize() calls.
4908
34c44600 49092008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 4910
4911 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4912 iteration failed.
4913 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4914
89313780 49152008-11-28 Robert Millan <rmh@aybabtu.com>
4916
4917 Fix build on powerpc-ieee1275. Based on patch created by
4918 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4919 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4920 `kern/ieee1275/mmap.c'.
4921 * include/grub/powerpc/ieee1275/memory.h: New file.
4922
15257703 4923 Provide grub-install on coreboot.
4924 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4925 (grub_install_SOURCES): New variable.
4926 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4927 usable on coreboot.
4928
9fc5388a 49292008-11-25 Felix Zielcke <fzielcke@z-51.de>
4930
4931 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4932 to `grub_term_input_t'.
4933 (grub_term_get_current_output): Change return type to
4934 `grub_term_output_t'.
4935
bc3a2f31 49362008-11-22 Robert Millan <rmh@aybabtu.com>
4937
34c44600 4938 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 4939 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4940 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4941 grub_vga_text_cls().
4942
80fc88f2 4943 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 4944 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 4945
cbf36fd3 4946 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4947 to 0x200000 (avoids trouble with some OFW implementations, and matches
4948 with the one in Yaboot).
4949 Reported by Manoel Abranches
4950
73e8e268 49512008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 4952
4953 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4954 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4955
73e8e268 4956 * util/grub-mkconfig_lib.in (grub_warn): New function.
4957 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4958 warnings, to obtain consistent formatting.
4959 * util/grub.d/00_header.in: Likewise.
4960 * util/update-grub_lib.in: Likewise.
4961
e94045a1 4962 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 4963 Move comment text to `#error' stanza.
e94045a1 4964
79d29fd7 4965 Harmonize ieee1275's grub_available_iterate() with the generic
4966 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4967 build problem on i386-ieee1275):
4968 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4969 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4970 parameter `type'. Update all users of this function.
4971 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4972 `kern/ieee1275/mmap.c'.
4973 * kern/ieee1275/init.c
4974 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4975 with ...
4976 (grub_machine_mmap_iterate): ... this.
4977 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4978 return type to `grub_err_t'. Update all implementations of this
4979 function prototype.
4980 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4981 Likewise.
4982
60d6b16e 4983 Add `lsmmap' command (lists firmware-provided memory map):
4984 * commands/lsmmap.c: New file.
4985 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4986 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4987 variables.
4988 * conf/powerpc-ieee1275.rmk: Likewise.
4989 * conf/i386-coreboot.rmk: Likewise.
4990 * conf/i386-ieee1275.rmk: Likewise.
4991
ebaaf49b 49922008-11-19 Robert Millan <rmh@aybabtu.com>
4993
4994 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 4995 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4996 constraints to initrd allocation (based on code from
4997 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4998 for Linux to find it.
ebaaf49b 4999
dfab719f 50002008-11-14 Robert Millan <rmh@aybabtu.com>
5001
5002 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5003 order to cope with duplicate slashes.
5004
10fc3eb9 50052008-11-14 Robert Millan <rmh@aybabtu.com>
5006
5007 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5008 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
5009 don't want to mess with lower memory, because it is used in the Linux
5010 loader.
5011
5012 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 5013 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 5014 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
5015 is in our heap (probably as a result of it being corrupted during
2f2a3442 5016 decompression). Add #error instance with comment to explain why this
5017 loader isn't currently usable on PC/BIOS.
10fc3eb9 5018
e2e07847 50192008-11-14 Robert Millan <rmh@aybabtu.com>
5020
5021 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 5022 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 5023
fe8e8d69 50242008-11-12 Robert Millan <rmh@aybabtu.com>
5025
5026 Make loader/i386/linux.c buildable on i386-pc (although disabled).
5027
5028 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5029 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5030 from here ...
5031 * include/grub/i386/pc/memory.h: ... to here.
5032
976b07d0 50332008-11-12 Robert Millan <rmh@aybabtu.com>
5034
5035 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5036 split).
5037
5038 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5039 (grub_console_cur_color, grub_console_real_putchar)
5040 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5041 (grub_console_setcolorstate, grub_console_setcolor)
5042 (grub_console_getcolor): Move from here ...
5043 * include/grub/i386/vga_common.h: ... to here (new file).
5044
5045 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5046 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5047 `<grub/i386/io.h>'.
5048 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5049 `<grub/i386/vga_common.h>'.
5050
76679cd3 50512008-11-12 Robert Millan <rmh@aybabtu.com>
5052
5053 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5054 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5055 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5056 variables.
5057 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5058 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5059
5060 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5061 grub_console_init() with call to grub_vga_text_init().
5062 (grub_machine_fini): Replace call to
5063 grub_console_fini() with call to grub_vga_text_fini() and
5064 grub_at_keyboard_fini().
5065
5066 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5067 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5068 (grub_console_setcolorstate, grub_console_setcolor)
5069 (grub_console_getcolor): New function prototypes.
5070
5071 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5072 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5073 (grub_vga_text_setcursor): Static-ize.
5074 (grub_vga_text_term): New structure.
5075 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5076
5077 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5078 (grub_console_cur_color, grub_console_standard_color)
5079 (grub_console_normal_color, grub_console_highlight_color)
5080 (map_char, grub_console_putchar, grub_console_getcharwidth)
5081 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5082 (grub_console_getcolor): Move from here ...
5083 * term/i386/vga_common.c: ... to here (same function names).
5084
95b841d3 50852008-11-12 Robert Millan <rmh@aybabtu.com>
5086
5087 Use newly-added Multiboot support in coreboot.
5088
5089 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5090 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5091
5092 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5093 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5094 (codestart): Store the MBI in `startup_multiboot_info' when we're
5095 being loaded using Multiboot.
5096
5097 * kern/i386/coreboot/init.c (grub_machine_init): Move
5098 grub_at_keyboard_init() call to beginning of function (useful for
5099 debugging). Call grub_machine_mmap_init() before attempting to use
5100 grub_machine_mmap_iterate().
5101 (grub_lower_mem, grub_upper_mem): Move from here ...
5102 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5103 here (new file).
5104
5105 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5106 function prototype.
5107
761ca975 51082008-11-12 Robert Millan <rmh@aybabtu.com>
5109
5110 Fix a regression introduced by the at_keyboard.mod split. Because
5111 some terminals are default on some platforms and non-default on
5112 others, the first terminal being registered determines which is
5113 going to be default.
5114
5115 * kern/term.c (grub_term_register_input): If this is the first
5116 terminal being registered, set it as the current one.
5117 (grub_term_register_output): Likewise.
5118
5119 * term/efi/console.c (grub_console_init): Do not call
5120 grub_term_set_current_output() or grub_term_set_current_input().
5121 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5122 * term/i386/pc/console.c (grub_console_init): Likewise.
5123 (grub_console_fini): Do not call grub_term_set_current_input()
5124 (but leave grub_term_set_current_output() to restore text mode).
5125
6c529df7 51262008-11-10 Robert Millan <rmh@aybabtu.com>
5127
5128 * util/grub.d/00_header.in: Add backward compatibility check for
5129 versions of terminal.mod that don't understand `terminal_input' or
5130 `terminal_output'.
5131
132e4113 51322008-11-09 Robert Millan <rmh@aybabtu.com>
5133
5134 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5135 `terminal_input' / `terminal_output', not `terminal'.
5136
ac293d50 51372008-11-08 Robert Millan <rmh@aybabtu.com>
5138
5139 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 5140 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 5141
0025933a 51422008-11-08 Robert Millan <rmh@aybabtu.com>
5143
5144 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 5145 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 5146 members. Update all users.
5147 * util/console.c (grub_ncurses_term): Split in ...
5148 (grub_ncurses_term_input): ... this, and ...
5149 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 5150 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 5151
37c86336 51522008-11-08 Robert Millan <rmh@aybabtu.com>
5153
5154 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5155 (PKGDATA): Add $(pkgdata_SRCDIR).
5156 (pkglib_BUILDDIR): New variable.
5157 (pkgdata_SRCDIR): New variable.
5158 (build_env.mk): New target.
5159 (include_DATA): New variable.
5160 (install-local): Install $(include_DATA) files in $(includedir).
5161
b6c15a2d 51622008-11-07 Pavel Roskin <proski@gnu.org>
5163
d99d46f1 5164 * gendistlist.sh: Use C locale for sorting to ensure consistent
5165 output on all systems.
5166
b6c15a2d 5167 * util/grub.d/00_header.in: Remove incorrect space before
5168 "serial".
5169
c32ee8c9 51702008-11-07 Robert Millan <rmh@aybabtu.com>
5171
5172 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5173 per specification.
5174 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5175 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5176 (based on find_multi_boot1_header).
5177 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5178 using find_multi_boot2_header(), and abort if neither Multiboot or
5179 Multiboot headers were found.
5180
651c29b7 51812008-11-07 Robert Millan <rmh@aybabtu.com>
5182
5183 Modularize at_keyboard.mod:
5184
5185 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5186 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5187 (at_keyboard_mod_LDFLAGS): New variables.
5188
5189 Actual terminal split:
5190
5191 * include/grub/term.h (struct grub_term): Split in ...
5192 (struct grub_term_input): ... this, and ...
5193 (struct grub_term_output): ... this. Update all users.
5194 (grub_term_set_current): Split in ...
5195 (grub_term_set_current_input): ... this, and ...
5196 (grub_term_set_current_output): ... this.
5197 (grub_term_get_current): Split in ...
5198 (grub_term_get_current_input): ... this, and ...
5199 (grub_term_get_current_output): ... this.
5200 (grub_term_register): Split in ...
5201 (grub_term_register_input): ... this, and ...
5202 (grub_term_register_output): ... this.
5203 (grub_term_unregister): Split in ...
5204 (grub_term_unregister_input): ... this, and ...
5205 (grub_term_unregister_output): ... this.
5206 (grub_term_iterate): Split in ...
5207 (grub_term_iterate_input): ... this, and ...
5208 (grub_term_iterate_output): ... this.
5209
5210 * kern/term.c (grub_term_list): Split in ...
5211 (grub_term_list_input): ... this, and ...
5212 (grub_term_list_output): ... this. Update all users.
5213 (grub_cur_term): Split in ...
5214 (grub_cur_term_input): ... this, and ...
5215 (grub_cur_term_output): ... this. Update all users.
5216 (grub_term_set_current): Split in ...
5217 (grub_term_set_current_input): ... this, and ...
5218 (grub_term_set_current_output): ... this.
5219 (grub_term_get_current): Split in ...
5220 (grub_term_get_current_input): ... this, and ...
5221 (grub_term_get_current_output): ... this.
5222 (grub_term_register): Split in ...
5223 (grub_term_register_input): ... this, and ...
5224 (grub_term_register_output): ... this.
5225 (grub_term_unregister): Split in ...
5226 (grub_term_unregister_input): ... this, and ...
5227 (grub_term_unregister_output): ... this.
5228 (grub_term_iterate): Split in ...
5229 (grub_term_iterate_input): ... this, and ...
5230 (grub_term_iterate_output): ... this.
5231
5232 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5233 a check for input and one for output (and only attempt to get keys
5234 from user when input works).
5235
5236 * util/grub-probe.c (grub_term_get_current): Split in ...
5237 (grub_term_get_current_input): ... this, and ...
5238 (grub_term_get_current_output): ... this.
5239 * util/grub-fstest.c: Likewise.
5240 * util/i386/pc/grub-setup.c: Likewise.
5241 * util/grub-editenv.c: Likewise.
5242
5243 Portability adjustments:
5244
5245 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5246 `term/i386/pc/at_keyboard.c'.
5247 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5248 grub_keyboard_controller_init() (now handled by terminal .init).
5249 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5250 grub_at_keyboard_init().
5251 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5252 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5253 at_keyboard.mod via input terminal interface).
5254 * include/grub/i386/coreboot/console.h: Convert into a stub for
5255 `<grub/i386/pc/console.h>'.
5256
5257 Migrate full terminals to new API:
5258
5259 * term/efi/console.c (grub_console_term): Split into ...
5260 (grub_console_term_input): ... this, and ...
5261 (grub_console_term_output): ... this. Update all users.
5262 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5263 (grub_ofconsole_init): Split into ...
5264 (grub_ofconsole_init_input): ... this, and ...
5265 (grub_ofconsole_init_output): ... this.
5266 (grub_ofconsole_term): Split into ...
5267 (grub_ofconsole_term_input): ... this, and ...
5268 (grub_ofconsole_term_output): ... this. Update all users.
5269 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5270 (grub_serial_term_input): ... this, and ...
5271 (grub_serial_term_output): ... this. Update all users.
5272 * term/i386/pc/console.c (grub_console_term): Split into ...
5273 (grub_console_term_input): ... this, and ...
5274 (grub_console_term_output): ... this. Update all users.
5275 (grub_console_term_input): Only enable it on PC/BIOS platform.
5276 (grub_console_init): Remove grub_keyboard_controller_init() call.
5277
5278 Migrate input terminals to new API:
5279
5280 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5281 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5282 i386-specific anyway).
5283 (grub_console_checkkey): Rename to ...
5284 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5285 users.
5286 (grub_keyboard_controller_orig): New variable.
5287 (grub_console_getkey): Rename to ...
5288 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5289 users.
5290 (grub_keyboard_controller_init): Static-ize. Save original
5291 controller value so that it can be restored ...
5292 (grub_keyboard_controller_fini): ... here (new function).
5293 (grub_at_keyboard_term): New structure.
5294 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5295 functions.
5296
5297 Migrate output terminals to new API:
5298
5299 * term/i386/pc/vga.c (grub_vga_term): Change type to
5300 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5301 members. Update all users.
5302 * term/gfxterm.c (grub_video_term): Change type to
5303 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5304 members. Update all users.
5305 * include/grub/i386/pc/console.h (grub_console_checkkey)
5306 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5307 etc).
5308
5309 Migrate `terminal' command and userland tools to new API:
5310
5311 * commands/terminal.c (grub_cmd_terminal): Split into ...
5312 (grub_cmd_terminal_input): ... this, and ...
5313 (grub_cmd_terminal_output): ... this.
5314 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5315 `terminal_input' and `terminal_output'.
5316 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5317 `terminal_input' / `terminal_output' API.
5318 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5319 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5320 provided ${GRUB_TERMINAL}, convert it).
5321
96e5d876 53222008-11-04 Robert Millan <rmh@aybabtu.com>
5323
5324 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5325 for FreeBSD.
5326 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5327
556f3775 53282008-11-03 Bean <bean123ch@gmail.com>
5329
5330 * kern/elf.c (grub_elf32_load): Revert to previous code.
5331 (grub_elf64_load): Likewise.
5332
5333 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5334
926b9823 53352008-11-01 Robert Millan <rmh@aybabtu.com>
5336
5337 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5338 (TARGET_CPPFLAGS): Likewise.
5339 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5340
1432e958 53412008-11-01 Carles Pina i Estany <carles@pina.cat>
5342
5343 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5344
dba3f844 53452008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 5346
5347 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5348 addition of objects until the code is not going to be able to fail.
5349
dba3f844 53502008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 5351
5352 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5353 (add a missing NULL check, and correct them by moving the pointer
5354 operations after the actual check).
5355
7ab28c21 53562008-10-29 Robert Millan <rmh@aybabtu.com>
5357
5358 * util/i386/pc/grub-install.in: Handle empty string as output from
5359 make_system_path_relative_to_its_root().
5360
1b7748eb 53612008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5362
5363 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5364 circular metadata worst case scenario. If the metadata is circular
5365 then copy the wrap in place.
5366 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5367 project lib/format_text/layout.h
5368 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5369
c9618ab2 53702008-10-03 Felix Zielcke <fzielcke@z-51.de>
5371
7a36edca 5372 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 5373
bf981c62 53742008-10-03 Felix Zielcke <fzielcke@z-51.de>
5375
5376 * util/update-grub_lib.in: Mention filename in warning message.
5377
6d994591 53782008-09-29 Felix Zielcke <fzielcke@z-51.de>
5379
5380 * NEWS: Update for rename of update-grub to grub-mkconfig.
5381
18ade780 53822008-09-29 Felix Zielcke <fzielcke@z-51.de>
5383
5384 * util/update-grub_lib.in: Copy to ...
5385 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 5386 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 5387 * util/update-grub.in: Rename to ...
5388 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5389 option. Add `--output' option to allow users to specify the generated
5390 configuration file. Default to stdout.
5391 (update_grub_dir): Rename to ...
5392 (grub_mkconfig_dir): ... this.
5393 (grub_cfg): Default to an empty string.
5394 * conf/common.rmk (update-grub): Rename to ...
5395 (grub-mkconfig): ... this.
5396 (update-grub_lib): Copy to ...
5397 (grub-mkconfig_lib): ... this.
5398 (update-grub_SCRIPTS): Copy to ...
5399 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5400 (update-grub_DATA): Rename to ...
5401 (grub-mkconfig_DATA): ... this.
5402
556ce6ac 54032008-09-28 Robert Millan <rmh@aybabtu.com>
5404
5405 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5406 to `modified'. Add the real `created' field.
5407 (grub_iso9660_uuid): Use `modified' rather than `created' for
5408 constructing the UUID.
5409
54102008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 5411
5412 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5413 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5414
92274e85 54152008-09-28 Bean <bean123ch@gmail.com>
5416
5417 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5418 Thanks to Christian Franke for finding this bug.
5419
add6f17a 54202008-09-25 Robert Millan <rmh@aybabtu.com>
5421
5422 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5423 instances of grub_util_get_disk_name() (see previous commit).
5424
d2a367b8 54252008-09-25 Robert Millan <rmh@aybabtu.com>
5426
5427 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5428 `util/i386/get_disk_name.c'.
5429 * conf/i386-efi.rmk: Likewise.
5430 * conf/x86_64-efi.rmk: Likewise.
5431 * conf/i386-coreboot.rmk: Likewise.
5432 * conf/i386-ieee1275.rmk: Likewise.
5433 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5434 `util/ieee1275/get_disk_name.c'.
5435 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5436 * util/ieee1275/get_disk_name.c: Remove file.
5437 * util/i386/get_disk_name.c: Remove file.
5438 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5439 "hd%d" for device.map entries, rather than using
5440 grub_util_get_disk_name().
5441
81a06771 54422008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 5443
5444 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5445 warning.
5446 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5447
5a004279 54482008-09-24 Carles Pina i Estany <carles@pina.cat>
5449
5450 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5451 Changed to 0x5100.
5452 (GRUB_TERM_PPAGE): Changed to 0x4900.
5453
397093d3 54542008-09-24 Robert Millan <rmh@aybabtu.com>
5455
5456 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5457 macros (they were i386-pc specific).
5458 * include/grub/sparc64/ieee1275/console.h: Likewise.
5459 * include/grub/efi/console.h: Likewise.
5460
a91b6c7c 54612008-09-22 Bean <bean123ch@gmail.com>
5462
5463 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5464 resident and in attribute list.
5465
5466 * include/grub/ntfs.h (BMP_LEN): Removed.
5467
c40fd116 54682008-09-22 Bean <bean123ch@gmail.com>
5469
81a06771 5470 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 5471 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5472
5473 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5474 error occurs, as grub_disk_open will call grub_disk_close, which will
5475 call p->close (scsi).
5476
81a06771 54772008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 5478
5479 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5480 (AC_PREREQ): Bumped to 2.59.
5481 (AC_TRY_COMPILE): Replace obsolete macro with ...
5482 (AC_COMPILE_IFELSE): ... this.
5483 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5484 (AC_LINK_IFELSE): ... this.
5485
5dc43410 54862008-09-21 Felix Zielcke <fzielcke@z-51.de>
5487
5488 * autogen.sh: Add a call to `gendistlist.sh'.
5489
9035dce4 54902008-09-19 Christian Franke <franke@computer.org>
5491
5492 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5493 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5494 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5495 Export __enable_execute_stack() to modules.
5496 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5497 New function.
5498
7fd75377 54992008-09-09 Felix Zielcke <fzielcke@z-51.de>
5500
040030b3 5501 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5502 Sort the list.
5503
55042008-09-09 Felix Zielcke <fzielcke@z-51.de>
5505
5506 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 5507 #include <grub/util/hostdisk.h>.
5508
89d5ffcf 55092008-09-08 Robert Millan <rmh@aybabtu.com>
5510
5511 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5512 segments when their filesz is zero (grub_file_read() interprets
81a06771 5513 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 5514 Use `lowest_segment' rather than 0 for calculating the current
5515 segment load address.
5516
40da438f 55172008-09-08 Robert Millan <rmh@aybabtu.com>
5518
5519 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5520 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5521 clobbered useful information.
5522
ddbf5556 55232008-09-08 Robert Millan <rmh@aybabtu.com>
5524
5525 * include/grub/util/biosdisk.h: Move to ...
5526 * include/grub/util/hostdisk.h: ... here. Update all users.
5527 * util/biosdisk.c: Move to ...
5528 * util/hostdisk.c: ... here. Update all users.
5529
783d0f48 55302008-09-07 Robert Millan <rmh@aybabtu.com>
5531
5532 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5533 variables.
5534 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5535 and length can be stored directly in the `mbi->mmap_addr' and
5536 `mbi->mmap_length' struct fields.
5537
548e2ea5 55382008-09-07 Robert Millan <rmh@aybabtu.com>
5539
5540 * conf/i386.rmk: New file. Provides declaration for building
5541 `cpuid.mod'.
5542 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5543 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5544 variables.
5545 Include `conf/i386.mk'.
5546 * conf/i386-efi.rmk: Likewise.
5547 * conf/x86_64-efi.rmk: Likewise.
5548 * conf/i386-coreboot.rmk: Likewise.
5549 * conf/i386-ieee1275.rmk: Likewise.
5550
0ea85a37 55512008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5552
5553 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5554 Adds optimization support for BGR based modes.
5555
5556 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5557 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5558 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5559 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5560 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5561 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5562 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5563 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5564 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5565 (grub_video_i386_vbeblit_index_index): Likewise.
5566 (grub_video_i386_vbeblit_replace_directN): Added.
5567 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5568 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5569 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5570 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5571 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5572 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 5573 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 5574 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5575 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5576 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5577 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5578 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5579 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5580
5581 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5582 (grub_video_i386_vbefill_R8G8B8): Likewise.
5583 (grub_video_i386_vbefill_index): Likewise.
5584 (grub_video_i386_vbefill_direct32): Added.
5585 (grub_video_i386_vbefill_direct24): Likewise.
5586 (grub_video_i386_vbefill_direct16): Likewise.
5587 (grub_video_i386_vbefill_direct8): Likewise.
5588
81a06771 5589 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 5590 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5591 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5592 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5593 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5594 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 5595
0ea85a37 5596 * video/video.c (grub_video_get_blit_format): Updated to use new
5597 blit formats. Added handling for 16 bit color modes.
81a06771 5598
5599 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 5600 fillers.
5601 (common_blitter): Updated to use new blitters.
5602
5603 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5604 Removed.
5605 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5606 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5607 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5608 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5609 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5610 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5611 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5612 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5613 (grub_video_i386_vbeblit_index_index): Likewise.
5614 (grub_video_i386_vbeblit_replace_directN): Added.
5615 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5616 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5617 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5618 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5619 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5620 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5621 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5622 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5623 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5624 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5625 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5626 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5627 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 5628
0ea85a37 5629 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5630 (grub_video_i386_vbefill_R8G8B8): Likewise.
5631 (grub_video_i386_vbefill_index): Likewise.
5632 (grub_video_i386_vbefill_direct32): Added.
5633 (grub_video_i386_vbefill_direct24): Likewise.
5634 (grub_video_i386_vbefill_direct16): Likewise.
5635 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 5636
0ea85a37 5637 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5638 types.
81a06771 5639
0ea85a37 5640 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5641 types.
81a06771 5642
0ea85a37 5643 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5644 blitter types.
81a06771 5645
0ea85a37 5646 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5647 types.
5648
e8a83df6 56492008-09-06 Felix Zielcke <fzielcke@z-51.de>
5650
5651 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5652 RAID level 1.
5653
6bcd8ee5 56542008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 5655
6bcd8ee5 5656 * fs/iso9660.c (grub_iso9660_date): New structure.
5657 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5658 (grub_iso9660_uuid): New function.
c375ae58 5659
59261157 56602008-09-05 Bean <bean123ch@gmail.com>
5661
5662 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5663
5664 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5665 insensitive bit for names in Win32 and Win32 & DOS namespace.
5666
5667 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5668
5669 * include/grub/types.h (LONG_MAX): Likewise.
5670
58b6645a 56712008-09-04 Felix Zielcke <fzielcke@z-51.de>
5672
4ee55921 5673 * util/getroot.c: Include <config.h>.
5674 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5675 add support for /dev/md/N devices and handle LVM double dash escaping.
5676
56772008-09-04 Felix Zielcke <fzielcke@z-51.de>
5678
5679 * config.guess: Update to latest version from config git.
5680 * config.sub: Likewise.
58b6645a 5681
9124f65d 56822008-09-03 Robert Millan <rmh@aybabtu.com>
5683
5684 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5685 `disk->total_sectors'.
5686
81a06771 56872008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 5688
5689 * include/grub/normal.h: Fixed incorrect comment for
5690 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5691
81a06771 56922008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 5693
5694 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5695 values with defines.
5696
5697 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5698 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5699 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5700 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5701 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5702 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5703 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5704 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5705 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5706 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5707 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5708 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5709 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5710 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5711 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5712 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5713 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5714 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5715 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5716
93d5cbf8 57172008-08-31 Robert Millan <rmh@aybabtu.com>
5718
5719 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5720 declaration.
5721 (grub_multiboot): Fix a few warnings.
5722
21751d50 57232008-08-31 Robert Millan <rmh@aybabtu.com>
5724
5725 * loader/i386/pc/multiboot.c: Update comment not to say that
5726 boot_device support is unimplemented.
5727
e27a75c5 57282008-08-31 Robert Millan <rmh@aybabtu.com>
5729
5730 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5731 or memory map support are unimplemented.
5732
81a06771 57332008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 5734
5735 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5736
81a06771 57372008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 5738
5739 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5740 total video memory in 'vbeinfo' output; show color format details for
5741 each video mode.
5742
7c5d8d95 57432008-08-30 Pavel Roskin <proski@gnu.org>
5744
5745 * util/genmoddep.c: Remove for real this time.
5746 * DISTLIST: Remove util/genmoddep.c.
5747
4cebd25a 57482008-08-30 Robert Millan <rmh@aybabtu.com>
5749
5750 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5751 as required by Multiboot spec (it was already 4-byte aligned, but
5752 only by chance).
5753
b497a269 57542008-08-29 Pavel Roskin <proski@gnu.org>
5755
e3925185 5756 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5757 * kern/powerpc/ieee1275/startup.S: ... this.
5758 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5759 * DISTLIST: Likewise.
5760
b497a269 5761 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5762 grub/cpu/kernel.h. Add start label for consistency with other
5763 platforms. Add grub_prefix immediately after start. Add jump
5764 to the code after grub_prefix.
5765 * include/grub/powerpc/kernel.h: Provide valid values for
5766 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5767
6e5a42fe 57682008-08-29 Bean <bean123ch@gmail.com>
5769
5770 * configure.ac: Change host_os to cygwin for mingw.
5771 (asprintf): New check for function.
5772
5773 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5774 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5775
5776 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 5777 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 5778 sync, sleep and grub_util_get_disk_size for mingw.
5779
5780 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5781 to get size in mingw.
5782 (open_device): Use flag O_BINARY if it's defined.
5783 (find_root_device): Add dummy code for mingw.
5784
5785 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5786 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5787 (get_scsi_disk_name): Return 0 for mingw.
5788
5789 * util/hostfs.c: #include <grub/util/misc.h>.
5790 (grub_hostfs_open): Use "rb" flag to open file, use
5791 grub_util_get_disk_size to get disk size for mingw.
5792
5793 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5794 (asprintf): New function if HAVE_ASPRINTF is not set.
5795 (sync): New function for mingw.
5796 (sleep): Likewise.
5797 (grub_util_get_disk_size): Likewise.
5798
ab3f2673 57992008-08-28 Pavel Roskin <proski@gnu.org>
5800
5801 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5802 kern/time.c.
5803
1c282483 58042008-08-28 Robert Millan <rmh@aybabtu.com>
5805
5806 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5807
678e849c 58082008-08-28 Robert Millan <rmh@aybabtu.com>
5809
5810 Change find_grub_drive() syntax so it doesn't prevent it from
5811 detecting NULL names as errors.
5812
5813 * util/biosdisk.c (find_grub_drive): Move free slot search code
5814 from here ...
5815 (find_free_slot): ... to here.
5816 (read_device_map): Use find_free_slot() to search for free slots.
5817
965c75ca 58182008-08-27 Marco Gerards <marco@gnu.org>
5819
5820 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5821 (scsi_mod_SOURCES): New variable.
5822 (scsi_mod_CFLAGS): Likewise
5823 (scsi_mod_LDFLAGS): Likewise.
5824
5825 * disk/scsi.c: New file.
5826
5827 * include/grub/scsi.h: Likewise.
5828
5829 * include/grub/scsicmd.h: Likewise.
5830
5831 * disk/ata.c: Include <grub/scsi.h>.
5832 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5833 instead.
5834 (grub_ata_iterate): Skip ATAPI devices.
5835 (grub_ata_open): Only handle ATAPI devices.
5836 (struct grub_atapi_read): Removed.
5837 (grub_atapi_readsector): Likewise.
5838 (grub_ata_read): No longer handle ATAPI devices.
5839 (grub_ata_write): Likewise.
5840 (grub_atapi_iterate): New function.
5841 (grub_atapi_read): Likewise.
5842 (grub_atapi_write): Likewise.
5843 (grub_atapi_open): Likewise.
5844 (grub_atapi_close): Likewise.
5845 (grub_atapi_dev): New variable.
5846 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5847 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5848
5849 * include/grub/disk.h (enum grub_disk_dev_id): Add
5850 `GRUB_DISK_DEVICE_SCSI_ID'.
5851
c07ae501 58522008-08-26 Robert Millan <rmh@aybabtu.com>
5853
5854 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5855 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5856 descriptive.
5857
5ed20adc 58582008-08-23 Bean <bean123ch@gmail.com>
5859
5860 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5861 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5862 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5863 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5864 dm_nv.mod.
5865 (raid5rec_mod_SOURCES): New macro.
5866 (raid5rec_mod_CFLAGS): Likewise.
5867 (raid5rec_mod_LDFLAGS): Likewise.
5868 (raid6rec_mod_SOURCES): Likewise.
5869 (raid6rec_mod_CFLAGS): Likewise.
5870 (raid6rec_mod_LDFLAGS): Likewise.
5871 (mdraid_mod_SOURCES): Likewise.
5872 (mdraid_mod_CFLAGS): Likewise.
5873 (mdraid_mod_LDFLAGS): Likewise.
5874 (dm_nv_mod_SOURCES): Likewise.
5875 (dm_nv_mod_CFLAGS): Likewise.
5876 (dm_nv_mod_LDFLAGS): Likewise.
5877
5878 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5879 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5880 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5881
5882 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5883 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5884
5885 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5886
5887 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5888
5889 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5890
5891 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5892
5893 * disk/raid5_recover.c: New file.
5894
5895 * disk/raid6_recover.c: Likewise.
5896
5897 * disk/mdraid_linux.c: Likewise.
5898
5899 * disk/dmraid_nvidia.c: Likewise.
5900
5901 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5902 ULONG_MAX.
5903
5904 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5905 calculate the size of raid device.
5906 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5907 different layout of raid5.
5908 (grub_raid_scan_device): Remove code specific to mdraid.
5909 (grub_raid_list): New variable.
5910 (free_array): New function.
5911 (grub_raid_register): Likewise.
5912 (grub_raid_unregister): Likewise.
5913 (grub_raid_rescan): Likewise.
5914 (GRUB_MOD_INIT): Don't iterate device here.
5915 (GRUB_MOD_FINI): Use free_array to release resource.
5916
5917 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5918 (grub_raid5_recover_func_t): New function variable type.
5919 (grub_raid6_recover_func_t): Likewise.
5920 (grub_raid5_recover_func): New variable.
5921 (grub_raid6_recover_func): Likewise.
5922 (grub_raid_register): New function.
5923 (grub_raid_unregister): Likewise.
5924 (grub_raid_rescan): Likewise.
5925 (grub_raid_block_xor): Likewise.
5926
5927 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5928 (CMD_CRC): New macro.
5929 (part): Removed.
5930 (read_file): Handle device as well as file.
5931 (cmd_crc): New function.
5932 (fstest): Handle multiple disks.
5933 (options): Remove part, raw and long, add root and diskcount.
5934 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 5935 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 5936 add handling for the new options, support multiple disks.
5937
5938 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5939
29c18915 59402008-08-23 Bean <bean123ch@gmail.com>
5941
5942 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5943
5944 * genfslist.sh: Ignore kernel.mod.
5945
5946 * genpartmaplist.sh: Likewise.
5947
8415f261 59482008-08-23 Robert Millan <rmh@aybabtu.com>
5949
5950 * util/getroot.c (find_root_device): Skip anything that starts with
5951 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5952
d5a7dc5b 59532008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 5954
d5a7dc5b 5955 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5956 * util/grub.d/00_header.in: Allow the administrator to change default
5957 gfxmode via ${GRUB_GFXMODE}.
5958
380cfbb4 59592008-08-21 Felix Zielcke <fzielcke@z-51.de>
5960
5961 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5962
c9baafe7 59632008-08-21 Robert Millan <rmh@aybabtu.com>
5964
5965 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5966 loader.
5967 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5968 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5969
e290bef2 59702008-08-20 Carles Pina i Estany <carles@pina.cat>
5971
5972 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5973 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5974
f9dbfc96 59752008-08-19 Robert Millan <rmh@aybabtu.com>
5976
5977 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5978 (struct grub_virtual_screen): Remove `cursor_color'.
5979 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5980 initialization.
5981 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5982
dd6bd6ab 59832008-08-18 Robert Millan <rmh@aybabtu.com>
5984
5985 Unify (identical) linux_normal.c files.
5986 * loader/i386/efi/linux_normal.c: Move from here ...
5987 * loader/linux_normal.c: ... to here. Update all users.
5988 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5989 * loader/i386/ieee1275/linux_normal.c: Likewise.
5990
7f42f83e 59912008-08-18 Robert Millan <rmh@aybabtu.com>
5992
5993 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5994 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5995 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5996 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5997 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5998 New macros.
5999 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6000 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6001 (GRUB_LINUX_CL_END_OFFSET): ... to here.
6002 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6003 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
6004 (GRUB_EFI_CL_END_OFFSET): Rename to ...
6005 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
6006 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6007 Initialize `params->video_cursor_x' and `params->video_cursor_y'
6008 portably using grub_getxy().
6009 Replace `-EFI' with `-bzImage' in boot message.
6010
38487ddb 60112008-08-17 Robert Millan <rmh@aybabtu.com>
6012
6013 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6014
deceb3ec 60152008-08-17 Robert Millan <rmh@aybabtu.com>
6016
6017 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6018
6019 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6020 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6021 (grub_machine_mmap_iterate): New function declaration.
6022 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6023 structure.
6024 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6025 macros.
6026
6027 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6028 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6029 Move e820 parsing from here ...
6030 * kern/i386/pc/mmap.c: New file.
6031 (grub_machine_mmap_iterate): ... to here.
6032
6033 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6034 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6035 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
6036 (grub_available_iterate): Redeclare to return `void', and redeclare
6037 its hook to use grub_uint64_t as addr and size parameters, and rename
6038 to ...
6039 (grub_machine_mmap_iterate): ... this. Update all users.
6040
6041 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6042 to make it more readable. Rename to ...
6043 (grub_machine_mmap_iterate): ... this.
6044
6045 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6046 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6047 (grub_multiboot): Allocate an extra region after the payload, and fill
6048 it with a Multiboot memory map. Adjust a.out loader to calculate size
6049 with the extra space.
6050 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6051 with the extra space.
6052
f8aa0f43 60532008-08-17 Carles Pina i Estany <carles@pina.cat>
6054
9807deb9 6055 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 6056
605f5bb6 60572008-08-17 Felix Zielcke <fzielcke@z-51.de>
6058
6059 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6060 mdate-sh to the list `find' searches for.
6061 * DISTLIST: Regenerated.
6062
210db6c6 60632008-08-16 Felix Zielcke <fzielcke@z-51.de>
6064
6065 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6066 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 6067 genmoddep.awk, gensymlist.sh.in.
6068 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 6069 * DISTLIST: Regenerated.
48cdbfd4 6070 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 6071
1082b929 60722008-08-16 Robert Millan <rmh@aybabtu.com>
6073
6074 * disk/raid.c (grub_raid_init): Handle/report errors set by
6075 grub_device_iterate().
6076 * disk/lvm.c (grub_lvm_init): Likewise.
6077
42ce5170 60782008-08-15 Bean <bean123ch@gmail.com>
6079
6080 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6081 and datehook.mod.
6082 (datetime_mod_SOURCES): New macro.
6083 (datetime_mod_CFLAGS): Likewise.
6084 (datetime_mod_LDFLAGS): Likewise.
6085 (date_mod_SOURCES): Likewise.
6086 (date_mod_CFLAGS): Likewise.
6087 (date_mod_LDFLAGS): Likewise.
6088 (datehook_mod_SOURCES): Likewise.
6089 (datehook_mod_CFLAGS): Likewise.
6090 (datehook_mod_LDFLAGS): Likewise.
6091
6092 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6093 and datehook.mod.
6094 (datetime_mod_SOURCES): New macro.
6095 (datetime_mod_CFLAGS): Likewise.
6096 (datetime_mod_LDFLAGS): Likewise.
6097 (date_mod_SOURCES): Likewise.
6098 (date_mod_CFLAGS): Likewise.
6099 (date_mod_LDFLAGS): Likewise.
6100 (datehook_mod_SOURCES): Likewise.
6101 (datehook_mod_CFLAGS): Likewise.
6102 (datehook_mod_LDFLAGS): Likewise.
6103
6104 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6105 and datehook.mod.
6106 (datetime_mod_SOURCES): New macro.
6107 (datetime_mod_CFLAGS): Likewise.
6108 (datetime_mod_LDFLAGS): Likewise.
6109 (date_mod_SOURCES): Likewise.
6110 (date_mod_CFLAGS): Likewise.
6111 (date_mod_LDFLAGS): Likewise.
6112 (datehook_mod_SOURCES): Likewise.
6113 (datehook_mod_CFLAGS): Likewise.
6114 (datehook_mod_LDFLAGS): Likewise.
6115
6116 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6117 and datehook.mod.
6118 (datetime_mod_SOURCES): New macro.
6119 (datetime_mod_CFLAGS): Likewise.
6120 (datetime_mod_LDFLAGS): Likewise.
6121 (date_mod_SOURCES): Likewise.
6122 (date_mod_CFLAGS): Likewise.
6123 (date_mod_LDFLAGS): Likewise.
6124 (datehook_mod_SOURCES): Likewise.
6125 (datehook_mod_CFLAGS): Likewise.
6126 (datehook_mod_LDFLAGS): Likewise.
6127
6128 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6129 and datehook.mod.
6130 (datetime_mod_SOURCES): New macro.
6131 (datetime_mod_CFLAGS): Likewise.
6132 (datetime_mod_LDFLAGS): Likewise.
6133 (date_mod_SOURCES): Likewise.
6134 (date_mod_CFLAGS): Likewise.
6135 (date_mod_LDFLAGS): Likewise.
6136 (datehook_mod_SOURCES): Likewise.
6137 (datehook_mod_CFLAGS): Likewise.
6138 (datehook_mod_LDFLAGS): Likewise.
6139
6140 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6141
6142 * commands/date.c: New file.
6143
6144 * hook/datehook.c: Likewise.
6145
6146 * include/grub/lib/datetime.h: Likewise.
6147
6148 * include/grub/i386/cmos.h: Likewise.
6149
6150 * lib/datetime.c: Likewise.
6151
6152 * lib/i386/datetime.c: Likewise.
6153
6154 * lib/efi/datetime.c: Likewise.
6155
0e9242da 61562008-08-14 Robert Millan <rmh@aybabtu.com>
6157
6158 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6159 (grub_mkelfimage_SOURCES): New variable.
6160 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6161
6162 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6163 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6164 * conf/powerpc-ieee1275.rmk: Likewise.
6165 * conf/i386-ieee1275.rmk: Likewise.
6166
6167 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6168 * kern/i386/coreboot/init.c: Likewise.
6169
6170 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6171 with `<grub/cpu/kernel.h>'.
6172 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6173 to ...
6174 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6175 * kern/i386/coreboot/startup.S: Likewise.
6176
6177 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6178 (GRUB_MOD_GAP): Remove.
6179 * include/grub/powerpc/kernel.h: New file.
6180 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6181 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6182 * include/grub/i386/kernel.h: New file.
6183 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6184 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6185 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6186
6187 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6188 `grub-mkelfimage'.
6189 Use --directory when invoking grub_mkimage.
6190
6191 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6192 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6193 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6194 and GRUB_KERNEL_CPU_PREFIX.
6195
b86408f8 61962008-08-14 Felix Zielcke <fzielcke@z-51.de>
6197
d5e619ca 6198 * include/grub/err.h (grub_err_printf): New function prototype.
6199 * util/misc.c (grub_err_printf): New function.
6200 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6201 grub_printf.
6202 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 6203
7161f0e0 62042008-08-13 Robert Millan <rmh@aybabtu.com>
6205
6206 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6207
a1967522 62082008-08-13 Robert Millan <rmh@aybabtu.com>
6209
6210 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6211 boot entry.
6212
371458b5 62132008-08-12 Robert Millan <rmh@aybabtu.com>
6214
6215 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6216 of the relocation code from here ...
6217 (grub_multiboot): ... to here.
6218 (forward_relocator, backward_relocator): Move from here ...
6219 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6220 (grub_multiboot_backward_relocator): ... to here.
6221 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6222 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6223 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6224 (grub_multiboot_forward_relocator_end)
6225 (grub_multiboot_backward_relocator)
6226 (grub_multiboot_backward_relocator_end): New variables.
6227
05f9452b 62282008-08-12 Bean <bean123ch@gmail.com>
6229
6230 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6231
20024ab0 62322008-08-11 Robert Millan <rmh@aybabtu.com>
6233
6234 * kern/i386/linuxbios/startup.S: Move from here ...
6235 * kern/i386/coreboot/startup.S: ... to here.
6236
6237 * kern/i386/linuxbios/init.c: Move from here ...
6238 * kern/i386/coreboot/init.c: ... to here.
6239
6240 * kern/i386/linuxbios/table.c: Move from here ...
6241 * kern/i386/coreboot/mmap.c: ... to here.
6242
6243 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6244
e352e9cd 62452008-08-11 Robert Millan <rmh@aybabtu.com>
6246
6247 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6248 errors. Leave it to the upper layer to handle them.
6249
2d05bc6a 62502008-08-09 Christian Franke <franke@computer.org>
6251
6252 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6253 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6254 Install `grub.d/10_windows' only on Cygwin.
6255 * configure.ac: Add subst of `target_os'.
6256 Check `target_os' also before setting TARGET_OBJ2ELF.
6257 Add `--enable-grub-pe2elf'.
6258
042bd419 62592008-08-08 Robert Millan <rmh@aybabtu.com>
6260
6261 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6262 (grub_last_time): Change type to grub_uint64_t.
6263 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6264 (grub_disk_close): Likewise.
6265
6266 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6267 (run_menu): Migrate code from to using grub_get_time_ms().
6268
6269 * util/misc.c (grub_get_time_ms): New function.
6270
7f280db5 62712008-08-08 Marco Gerards <marco@gnu.org>
6272
6273 * disk/ata.c (grub_ata_regget): Change return type to
6274 `grub_uint8_t'.
6275 (grub_ata_regget2): Likewise.
6276 (grub_ata_wait_status): New function.
6277 (grub_ata_wait_busy): Removed function, updated all users to use
6278 `grub_ata_wait_status'.
6279 (grub_ata_wait_drq): Likewise.
6280 (grub_ata_cmd): New function.
6281 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6282 error handling.
6283 (grub_ata_pio_write): Add error handling.
6284 (grub_atapi_identify): Likewise.
6285 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6286 handling.
6287 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6288 handling. Actually use the detected registers. Reorder the
6289 detection logic such that it is easier to read.
6290 (grub_ata_pciinit): Do not assign the same ID to each controller.
6291 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6292 handling.
6293 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6294
6295 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6296
1fbc5e66 62972008-08-08 Marco Gerards <marco@gnu.org>
6298
6299 * NEWS: Update.
6300
819ce6c0 63012008-08-07 Bean <bean123ch@gmail.com>
6302
6303 * include/grub/x86_64/pci.h: New file.
6304
5c41d44d 63052008-08-07 Christian Franke <franke@computer.org>
6306
6307 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6308 (TIMER2_GATE): Likewise.
6309 (grub_pit_wait): Add enable/disable of the timer2 gate
6310 bit of port 0x61. This fixes a possible infinite loop.
6311
5ebc275d 63122008-08-07 Bean <bean123ch@gmail.com>
6313
6314 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6315 kern/i386/tsc.c and kern/i386/pit.c.
6316
6317 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6318 x86_64 platform.
6319
6320 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6321 <grub/i386/tsc.h>.
6322
6323 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6324
e383b3d0 63252008-08-07 Bean <bean123ch@gmail.com>
6326
6327 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6328
6329 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6330
6331 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6332 multiple inclusion. Add #include <grub/types.h>.
6333
1cbb58ac 63342008-08-06 Christian Franke <franke@computer.org>
6335
6336 * conf/common.rmk: Build and install `10_windows'.
6337 * util/grub.d/10_windows.in: New script.
6338
337f5a1e 63392008-08-06 Pavel Roskin <proski@gnu.org>
6340
6341 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6342
057bc4ac 63432008-08-06 Robert Millan <rmh@aybabtu.com>
6344
6345 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6346 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6347
2b99f123 63482008-08-06 Bean <bean123ch@gmail.com>
6349
6350 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6351 (grub_pxefs_fs_int): Remove dummy definition.
6352 (grub_pxefs_open): Use data->block_size to store the current block
6353 size setting.
6354 (grub_pxefs_read): Use block size stored in data->block_size. As the
6355 value of grub_pxe_blksize can be changed after the file is opened.
6356
9f0234cb 63572008-08-06 Bean <bean123ch@gmail.com>
6358
6359 * fs/i386/pc/pxe.c (curr_file): new variable.
6360 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6361 require the dummy internal file system anymore.
6362 (grub_pxefs_read): Removed.
6363 (grub_pxefs_close): Likewise.
6364 (grub_pxefs_fs_int): Likewise.
6365 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6366 connection when we switch file.
6367 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6368
a55d42e0 63692008-08-06 Robert Millan <rmh@aybabtu.com>
6370
6371 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6372 `halt.mod'.
6373 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6374 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6375
6376 * kern/i386/halt.c: New file.
6377 * kern/i386/reboot.c: Likewise.
6378 * include/grub/i386/reboot.h: Likewise.
6379 * include/grub/i386/halt.h: Likewise.
6380
6381 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6382 Include `<grub/cpu/halt.h>'.
6383 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6384 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6385
6386 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6387 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6388 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6389 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6390 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6391 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6392 from here ...
6393 * include/grub/i386/at_keyboard.h: ... to here.
6394
24371d26 63952008-08-05 Robert Millan <rmh@aybabtu.com>
6396
6397 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6398 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6399 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6400 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6401 `kern/generic/millisleep.c'.
6402
6403 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6404 instead of grub_get_rtc().
6405 (grub_tsc_init): Initialize `tsc_boot_time'.
6406
6407 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6408 (grub_machine_init): Use grub_tsc_init() rather than
6409 installing an RTC-based handler via grub_install_get_time_ms().
6410
6411 * kern/i386/pit.c: New file.
6412 * include/grub/i386/pit.h: Likewise.
6413
9e7007b3 64142008-08-05 Bean <bean123ch@gmail.com>
6415
6416 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6417
6418 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6419 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6420 (pxe_mod_SOURCES): New macro.
6421 (pxe_mod_CFLAGS): Likewise.
6422 (pxe_mod_LDFLAGS): Likewise.
6423 (pxecmd_mod_SOURCES): Likewise.
6424 (pxecmd_mod_CFLAGS): Likewise.
6425 (pxecmd_mod_LDFLAGS): Likewise.
6426
6427 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6428 (grub_pxe_call): Likewise.
6429
6430 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6431
6432 * commands/i386/pc/pxecmd.c: New file.
6433
9f0234cb 6434 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 6435
6436 * include/grub/i386/pc/pxe.h: Likewise.
6437
6977d49f 64382008-08-05 Bean <bean123ch@gmail.com>
6439
6440 * util/console.c (grub_console_cur_color): New variable.
6441 (grub_console_standard_color): Likewise.
6442 (grub_console_normal_color): Likewise.
6443 (grub_console_highlight_color): Likewise.
6444 (color_map): Likewise.
6445 (use_color): Likewise.
6446 (NUM_COLORS): New macro.
6447 (grub_ncurses_setcolorstate): Handle color properly.
6448 (grub_ncurses_setcolor): Don't change color here, just remember the
6449 settings, color will be set in grub_ncurses_setcolorstate.
6450 (grub_ncurses_getcolor): New function.
6451 (grub_ncurses_init): Initialize color pairs.
6452 (grub_ncurses_term): New member grub_ncurses_getcolor.
6453
9c2ff3ee 64542008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 6455
9c2ff3ee 6456 High resolution timer support. Implemented for x86 CPUs using TSC.
6457 Extracted generic grub_millisleep() so it's linked in only as needed.
6458 This requires a Pentium compatible CPU; if the RDTSC instruction is
6459 not supported, then it falls back on the generic grub_get_time_ms()
6460 implementation that uses the machine's RTC.
6461
6462 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6463 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6464 `kern/generic/millisleep.c'.
6465
6466 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6467 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6468
6469 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6470 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6471
6472 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6473
6474 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6475 `kern/generic/millisleep.c'.
6476
6477 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6478
6479 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6480
6481 * kern/generic/rtc_get_time_ms.c: New file.
6482
6483 * kern/generic/millisleep.c: New file.
337f5a1e 6484
9c2ff3ee 6485 * kern/misc.c: Don't include
6486 <kern/time.h> anymore.
6487 (grub_millisleep_generic): Removed.
6488
6489 * commands/sleep.c (grub_interruptible_millisleep): Uses
6490 grub_get_time_ms() instead of grub_get_rtc().
6491
6492 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6493 function.
6494 (grub_cpu_is_cpuid_supported): New inline function.
6495 (grub_cpu_is_tsc_supported): New inline function.
6496 (grub_tsc_init): New function prototype.
6497 (grub_tsc_get_time_ms): New function prototype.
6498
6499 * kern/i386/tsc.c (grub_get_time_ms): New file.
6500
6501 * include/grub/time.h: Include <grub/types.h.
6502 (grub_millisleep_generic): Removed.
6503 (grub_get_time_ms): New prototype.
6504 (grub_install_get_time_ms): New prototype.
6505 (grub_rtc_get_time_ms): New prototype.
6506
6507 * kern/time.c (grub_get_time_ms): New function.
6508 (grub_install_get_time_ms): New function.
6509
6510 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6511 <grub/time.h> anymore.
6512 (grub_millisleep): Removed.
6513 (grub_machine_init): Call grub_tsc_init.
6514
6515 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6516 get_time_ms() implementation.
6517
6518 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6519 (ieee1275_get_time_ms): New function.
6520 (grub_machine_init): Install get_time_ms() implementation.
6521
6522 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6523 (grub_machine_init): Call grub_tsc_init().
6524 (grub_millisleep): Removed.
bf06a93f 6525
9c2ff3ee 6526 * kern/ieee1275/init.c (grub_millisleep): Removed.
6527 (grub_machine_init): Install ieee1275_get_time_ms()
6528 implementation.
6529 (ieee1275_get_time_ms): New function.
6530 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6531 real work.
6532
9ec92aaf 65332008-08-05 Marco Gerards <marco@gnu.org>
6534
6535 * disk/ata.c: Include <grub/pci.h>.
6536 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6537 (grub_ata_initialize): Rewritten.
6538 (grub_ata_device_initialize): New function.
6539
8d23f507 65402008-08-04 Pavel Roskin <proski@gnu.org>
6541
6542 * kern/main.c: Include grub/mm.h.
6543
5e15ee3d 65442008-08-04 Robert Millan <rmh@aybabtu.com>
6545
6546 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6547 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6548 corruption problem).
6549
a9053f8f 65502008-08-04 Robert Millan <rmh@aybabtu.com>
6551
6552 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6553 warnings introduced in my last commit.
6554
dd19c7d7 65552008-08-03 Robert Millan <rmh@aybabtu.com>
6556
6557 Make PCI available on all i386 architectures.
6558
6559 * include/grub/i386/pc/pci.h: Move from here ...
6560 * include/grub/i386/pci.h: ... to here.
6561
6562 * include/grub/i386/pc/pci.h: Remove.
6563 * include/grub/i386/efi/pci.h: Remove.
6564 * include/grub/x86_64/efi/pci.h: Remove.
6565
6566 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6567 `<grub/cpu/pci.h>'.
6568
6569 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6570 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6571 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6572
6573 * conf/i386-ieee1275.rmk: Likewise.
6574
e14a6184 65752008-08-03 Robert Millan <rmh@aybabtu.com>
6576
6577 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6578 (grub_console_setcursor): Make it possible to set cursor off.
6579
52768e37 65802008-08-03 Robert Millan <rmh@aybabtu.com>
6581
6582 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6583 of modules instead of assuming which platform provides what.
6584 * util/update-grub.in: Likewise.
6585
2d52f57f 65862008-08-03 Robert Millan <rmh@aybabtu.com>
6587
6588 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6589 instead of `grub_install_dos_part' to determine whether a drive needs
6590 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 6591 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 6592
2a5cd121 65932008-08-02 Robert Millan <rmh@aybabtu.com>
6594
6595 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6596
93808428 65972008-08-02 Robert Millan <rmh@aybabtu.com>
6598
6599 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6600 of informational grub_dprintf() calls.
6601
3bd0a12a 66022008-08-02 Robert Millan <rmh@aybabtu.com>
6603
6604 * disk/memdisk.c (memdisk_size): Don't initialize.
6605 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6606
6607 * include/grub/i386/pc/kernel.h
6608 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6609 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6610 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6611 (grub_arch_memdisk_size): Remove.
6612
6613 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6614 field (was only used to transfer a constant). Add `type' field to
6615 support multiple module types.
6616 (grub_module_iterate): New function.
6617
6618 * kern/device.c (grub_device_open): Do not hide error messages
6619 when grub_disk_open() fails. Use grub_print_error() instead.
6620
6621 * kern/i386/pc/init.c (grub_arch_modules_addr)
6622 (grub_arch_memdisk_size): Remove functions.
6623 (grub_arch_modules_addr): Return the module address in high memory
6624 (now that it isn't copied anymore).
6625
6626 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6627 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6628 decompression routine (grub_total_module_size already includes that
6629 now). Don't copy modules back to low memory.
6630
6631 * kern/main.c: Include `<grub/mm.h>'.
6632 (grub_load_modules): Split out (and use) ...
6633 (grub_module_iterate): ... this function, which iterates through
6634 module objects and runs a hook.
6635 Comment out grub_mm_init_region() call, as it would cause non-ELF
6636 modules to be overwritten.
6637
6638 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6639 the memdisk image in its own region, make it part of the module list.
6640 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6641 (main): Parse --memdisk|-m option, and pass user-provided path as
6642 parameter to generate_image().
6643 (add_segments): Pass `memdisk_path' down to load_modules().
6644 (load_modules): Embed memdisk image in module section when requested.
6645 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6646 `header.type' instead of `header.offset'.
6647
6648 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6649 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6650 (memdisk_mod_LDFLAGS): New variables.
6651 * conf/i386-coreboot.rmk: Likewise.
6652 * conf/i386-ieee1275.rmk: Likewise.
6653
a927cc73 66542008-08-02 Robert Millan <rmh@aybabtu.com>
6655
6656 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6657 (backward_relocator): New variables. Used to allocate and relocate
6658 the payload, respectively.
6659 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 6660 address, install the appropriate relocator code in each bound of
a927cc73 6661 the payload, and set the entry point such that
6662 grub_multiboot_real_boot() will jump to one of them.
6663
6664 * kern/i386/loader.S (grub_multiboot_payload_size)
6665 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6666 (grub_multiboot_payload_entry_offset): New variables.
6667 (grub_multiboot_real_boot): Set cpu context to what the relocator
6668 expects, and jump to the relocator instead of the payload.
6669
6670 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6671 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6672 (grub_multiboot_payload_entry_offset): Export.
6673
b15d8a0c 66742008-08-01 Bean <bean123ch@gmail.com>
6675
6676 * normal/menu_entry.c (editor_getline): Don't return the original
6677 string as result, as it will be released by lexer once it has done
6678 using it.
6679
cdfb3d22 66802008-08-01 Robert Millan <rmh@aybabtu.com>
6681
6682 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6683 within menuentries, not before them.
6684 util/grub.d/10_hurd.in: Likewise.
6685
9175e93d 66862008-08-01 Bean <bean123ch@gmail.com>
6687
6688 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6689 (bufio_mod_SOURCES): New macro.
6690 (bufio_mod_CFLAGS): Likewise.
6691 (bufio_mod_LDFLAGS): Likewise.
6692
6693 * include/grub/bufio.h: New file.
6694
6695 * io/bufio.c: Likewise.
6696
6697 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6698 (grub_video_reader_png): Use grub_buffile_open to open file.
6699
6700 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6701 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6702
6703 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6704 (grub_video_reader_tga): Use grub_buffile_open to open file.
6705
6706 * font/manager.c: Include <grub/bufio.h>.
6707 (add_font): Use grub_buffile_open to open file.
6708
3d8383e7 67092008-07-31 Robert Millan <rmh@aybabtu.com>
6710
6711 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6712 ELF segments, use a macro for arbitrarily accessing any of them instead
6713 of preparing a pointer that allows access to one at a time.
6714 (grub_multiboot_load_elf64): Likewise.
6715
16e641b6 67162008-07-31 Bean <bean123ch@gmail.com>
6717
6718 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6719 GRUB_KERNEL_MACHINE_DATA_END.
6720
59198b72 67212008-07-30 Robert Millan <rmh@aybabtu.com>
6722
6723 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6724 Increase from 0x50 to 0x60.
6725 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6726 use UUIDs to identify the root drive for them. If that's not
6727 possible, abort.
6728 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6729 check, for cross-disk installs.
6730
ae88bca3 67312008-07-30 Robert Millan <rmh@aybabtu.com>
6732
6733 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6734 is non-empty, use it to set the `prefix' environment variable instead
6735 of the usual approach.
6736 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6737 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6738 environment variable instead of dummy make_install_device().
6739
6740 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6741 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 6742 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 6743
6744 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6745 New variable reference.
6746 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6747 New macro. Defines offset of `grub_prefix' within startup.S (relative
6748 to `start').
6749 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6750 section within startup.S (relative to `start').
6751 * include/grub/i386/coreboot/kernel.h: Likewise.
6752
6753 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6754 Overwrite grub_prefix with its contents, at the beginning of the
6755 first segment.
6756 (main): Understand -p|--prefix.
6757
14f41dd1 67582008-07-30 Robert Millan <rmh@aybabtu.com>
6759
6760 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6761
4ca049a3 67622008-07-30 Robert Millan <rmh@aybabtu.com>
6763
6764 * term/i386/pc/vga_text.c (grub_console_cls): Use
6765 grub_console_gotoxy() to go back to beginning of the screen.
6766 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6767
2921d337 67682008-07-29 Christian Franke <franke@computer.org>
6769
6770 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6771 Add conversion of emulated mount points on Cygwin.
6772
b609876d 67732008-07-29 Christian Franke <franke@computer.org>
6774
6775 * util/update-grub.in: Add a check for admin
6776 group on Cygwin.
6777 Remove old `grub.cfg.new' before creation.
6778 Add `-f' to `mv' to handle the different filesystem
6779 semantics of Windows.
6780
e93e4679 67812008-07-29 Bean <bean123ch@gmail.com>
6782
6783 * normal/main.c (get_line): Fix buffer overflow bug.
6784
41694fd0 67852008-07-28 Robert Millan <rmh@aybabtu.com>
6786
6787 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6788 (struct grub_apple_header): New struct. Describes the layout of
6789 the partmap header.
6790 (apple_partition_map_iterate): Check the header magic as well as the
6791 partition magic (which was already being checked).
6792
cfd0b4e6 67932008-07-28 Pavel Roskin <proski@gnu.org>
6794
6795 * genmk.rb: Add a warning to the beginning of the output that
6796 it's a generated file and should not be edited.
6797
93cce016 67982008-07-28 Robert Millan <rmh@aybabtu.com>
6799
6800 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6801 with the same number are found, just use issue a warning with
6802 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 6803
cd1df915 68042008-07-27 Robert Millan <rmh@aybabtu.com>
6805
6806 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6807 information.
6808
b70a8427 68092008-07-27 Bean <bean123ch@gmail.com>
6810
6811 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6812 (grub_fat_find_dir): Ignore case when comparing filename.
6813
8f5e379f 68142008-07-27 Bean <bean123ch@gmail.com>
6815
6816 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6817 smallino, as it's more descriptive, and i8count can be confused with
6818 the other field count.
6819 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6820 inode type.
6821
a85cd5a0 68222008-07-27 Bean <bean123ch@gmail.com>
6823
6824 * commands/crc.c: New file.
6825
6826 * lib/crc.c: Likewise.
6827
6828 * include/grub/lib/crc.h: Likewise.
6829
6830 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6831
6832 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6833 (hexdump): Move this function to ...
6834
6835 * lib/hexdump.c: ... here.
6836
6837 * include/grub/hexdump.h: Renamed to ...
6838
6839 * include/grub/lib/hexdump.h: ... this.
6840
6841 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6842
6843 * util/grub-editenv.c: Likewise.
6844
6845 * include/envblk.h: Renamed to ...
6846
6847 * include/lib/envblk.h: ... this.
6848
6849 * util/envblk.c: Renamed to ...
6850
6851 * lib/envblk.c: ... this.
6852
6853 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6854 lib/hexdump.c.
6855 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6856 (pkglib_MODULES): Add crc.mod.
6857 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6858 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6859 (crc_mod_SOURCES): New macro.
6860 (crc_mod_CFLAGS): Likewise.
6861 (crc_mod_LDFLAGS): Likewise.
6862
6863 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6864
6865 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6866
6867 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6868
6869 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6870
6871 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6872
c298def0 68732008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 6874
6875 * commands/help.c: Include <grub/term.h>.
6876 (TERM_WIDTH): Removed. Updated all users.
6877
cc349fb3 68782008-07-27 Pavel Roskin <proski@gnu.org>
6879
6880 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6881 spurious warnings about a comment within a comment.
6882
9051607e 68832008-07-25 Robert Millan <rmh@aybabtu.com>
6884
6885 * util/getroot.c (find_root_device): Skip devices that match
6886 /dev/dm-[0-9]. This lets the real device be found for any type of
6887 abstraction (LVM, EVMS, RAID..).
6888 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6889 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6890 device is found first, find_root_device() will now skip it.
6891
01453bfc 68922008-07-24 Pavel Roskin <proski@gnu.org>
6893
6894 * include/grub/types.h: Use __builtin_bswap32() and
6895 __builtin_bswap64() with gcc 4.3 and newer.
6896
6af9849f 68972008-07-24 Christian Franke <franke@computer.org>
6898
3a0fa256 6899 * util/i386/pc/grub-install.in: If `--debug' is specified,
6900 pass `--verbose' to grub-setup.
6901 Abort script if make_system_path_relative_to_its_root() fails.
6902
7810e747 69032008-07-24 Bean <bean123ch@gmail.com>
6904
6905 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6906 variable `target_platform' should be `platform'.
6907
42290e17 69082008-07-24 Bean <bean123ch@gmail.com>
6909
51cc5193 6910 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 6911 (grub_png_init_fixed_block): New function.
6912 (grub_png_decode_image_data): Handle fixed huffman code compression.
6913
2a8a80e4 69142008-07-24 Bean <bean123ch@gmail.com>
6915
6916 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6917 (grub_pe2elf_SOURCES): New macro.
6918 (CLEANFILES): Add grub-pe2elf.
6919
6920 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6921 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6922 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6923 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6924 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6925 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6926 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6927 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6928 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6929 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6930 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6931 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6932 (GRUB_PE32_DT_FUNCTION): Likewise.
6933 (GRUB_PE32_REL_I386_DIR32): Likewise.
6934 (GRUB_PE32_REL_I386_REL32): Likewise.
6935 (grub_pe32_symbol): New structure.
6936 (grub_pe32_reloc): Likewise.
6937
6938 * util/grub-pe2elf.c: New file.
6939
6940 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6941 start symbol in non pc platform.
6942
6943 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6944
6945 The following patches are from Christian Franke.
6946
6947 * include/grub/dl.h: Remove .previous, gas supports this only
6948 for ELF format.
6949
6950 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6951 Remove .type, gas supports this only for ELF format.
6952
6953 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6954 nullbytes in symbol table. This fixes an infinite loop if table is
6955 zero filled.
6956
6957 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6958 TARGET_IMG_LDFLAGS and EXEEXT.
6959
6960 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6961 TARGET_IMG_LDFLAGS_AC.
6962 (grub_CHECK_STACK_ARG_PROBE): New function.
6963
6964 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6965
6966 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6967
6968 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6969 to set TARGET_IMG_LD* accordingly.
6970 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6971 Add call to grub_CHECK_STACK_ARG_PROBE.
6972 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6973
6974 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6975
6976 * genmk.rb: Add EXEEXT to CLEANFILES.
6977
12ccdb75 69782008-07-23 Robert Millan <rmh@aybabtu.com>
6979
6980 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6981 define the codes for arrows and lines used for the menu).
6982 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6983 as well.
6984
6985 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6986 fonts, because the latter are too slow.
6987
18eeaf04 69882008-07-21 Bean <bean123ch@gmail.com>
6989
6990 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6991 a20. Run keyboard test last, as it will cause macbook to halt.
6992
b095e2ad 69932008-07-18 Pavel Roskin <proski@gnu.org>
6994
6995 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6996 load foreign architecture modules correctly anyway. Keep
6997 support for loading host architecture modules, whether we
6998 compile them or not.
6999
737feb35 70002008-07-17 Pavel Roskin <proski@gnu.org>
7001
3f4ce737 7002 * configure.ac: Use -m32 or -m64 regardless of whether we had to
7003 change target_cpu. The compiler default can mismatch target_cpu
7004 in any case.
7005
4ad2d049 7006 * disk/efi/efidisk.c: Fix format warnings on x86_64.
7007 * kern/efi/efi.c: Likewise.
7008
f6130a12 7009 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
7010 target compiler is functional.
7011 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7012 are set up.
7013
58393a2d 7014 * configure.ac: Default to efi platform for x86_64-apple. Allow
7015 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
7016 adjustments from the rest, only do them if target is not
7017 explicitly given. Merge other adjustments with the final sanity
7018 check. Remove an extraneous check for supported CPU. Be
7019 specific which CPU and which platform is not supported.
7020
737feb35 7021 * configure.ac: Default to pc platform for x86_64.
7022
546f966a 70232008-07-17 Robert Millan <rmh@aybabtu.com>
7024
7025 Partial LinuxBIOS -> Coreboot rename.
7026
7027 * conf/i386-linuxbios.rmk: Renamed to ...
7028 * conf/i386-coreboot.rmk: ... this.
7029 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7030 * configure.ac: Accept "coreboot" as input platform (but maintain
7031 compatibility with "linuxbios").
7032 * include/grub/i386/linuxbios: Renamed to ...
7033 * include/grub/i386/coreboot: ... this.
7034
20011694 70352008-07-17 Bean <bean123ch@gmail.com>
7036
7037 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 7038 (appleldr_mod_SOURCE): New variable.
20011694 7039 (appleldr_mod_CFLAGS): Likewise.
7040 (appleldr_mod_LDFLAGS): Likewise.
7041 (pci_mod_SOURCES): Likewise.
7042 (pci_mod_CFLAGS): Likewise.
7043 (pci_mod_LDFLAGS): Likewise.
7044 (lspci_mod_SOURCES): Likewise.
7045 (lspci_mod_CFLAGS): Likewise.
7046 (lspci_mod_LDFLAGS): Likewise.
7047
7048 * conf/x86_64-efi.rmk: New file.
7049
7050 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7051 macro.
7052 (grub_efidisk_write): Likewise.
7053
7054 * include/efi/api.h (efi_call_0): New macro.
7055 (efi_call_1): Likewise.
7056 (efi_call_2): Likewise.
7057 (efi_call_3): Likewise.
7058 (efi_call_4): Likewise.
7059 (efi_call_5): Likewise.
7060 (efi_call_6): Likewise.
7061
7062 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7063 grub_rescue_cmd_chainloader.
7064
7065 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7066 (grub_pe32_optional_header): Change some fields based on i386 or
7067 x86_64 platform.
7068 (GRUB_PE32_PE32_MAGIC): Likewise.
7069
7070 * include/grub/efi/uga_draw.h: New file.
7071
7072 * include/grub/elf.h (STN_ABS): New constant.
7073 (R_X86_64_NONE): Relocation constant for x86_64.
7074 (R_X86_64_64): Likewise.
7075 (R_X86_64_PC32): Likewise.
7076 (R_X86_64_GOT32): Likewise.
7077 (R_X86_64_PLT32): Likewise.
7078 (R_X86_64_COPY): Likewise.
7079 (R_X86_64_GLOB_DAT): Likewise.
7080 (R_X86_64_JUMP_SLOT): Likewise.
7081 (R_X86_64_RELATIVE): Likewise.
7082 (R_X86_64_GOTPCREL): Likewise.
7083 (R_X86_64_32): Likewise.
7084 (R_X86_64_32S): Likewise.
7085 (R_X86_64_16): Likewise.
7086 (R_X86_64_PC16): Likewise.
7087 (R_X86_64_8): Likewise.
7088 (R_X86_64_PC8): Likewise.
7089
7090 * include/grub/i386/efi/pci.h: New file.
7091
7092 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7093 Change it value based on platform.
7094 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7095 (GRUB_E820_RAM): Likewise.
7096 (GRUB_E820_RESERVED): Likewise.
7097 (GRUB_E820_ACPI): Likewise.
7098 (GRUB_E820_NVS): Likewise.
7099 (GRUB_E820_EXEC_CODE): Likewise.
7100 (GRUB_E820_MAX_ENTRY): Likewise.
7101 (grub_e820_mmap): New structure.
7102 (linux_kernel_header): Change the efi field according to different
7103 kernel version, also field from linux_kernel_header.
7104
7105 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7106
7107 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7108 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7109 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7110 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7111 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7112 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7113 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7114 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7115 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7116 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7117
7118 * include/grub/x86_64/efi/kernel.h: New file.
7119
7120 * include/grub/x86_64/efi/loader.h: Likewise.
7121
7122 * include/grub/x86_64/efi/machine.h: Likewise.
7123
7124 * include/grub/x86_64/efi/pci.h: Likewise.
7125
7126 * include/grub/x86_64/efi/time.h: Likewise.
7127
7128 * include/grub/x86_64/linux.h: Likewise.
7129
7130 * include/grub/x86_64/setjmp.h: Likewise.
7131
7132 * include/grub/x86_64/time.h: Likewise.
7133
7134 * include/grub/x86_64/types.h: Likewise.
7135
7136 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7137 GRUB_TARGET_SIZEOF_VOID_P.
7138
7139 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7140 (grub_efi_locate_handle): Likewise.
7141 (grub_efi_open_protocol): Likewise.
7142 (grub_efi_set_text_mode): Likewise.
7143 (grub_efi_stall): Likewise.
7144 (grub_exit): Likewise.
7145 (grub_reboot): Likewise.
7146 (grub_halt): Likewise.
7147 (grub_efi_exit_boot_services): Likewise.
7148 (grub_get_rtc): Likewise.
7149
7150 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7151 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7152 (grub_efi_allocate_pages): Wrap efi calls.
7153 (grub_efi_free_pages): Wrap efi calls.
7154 (grub_efi_get_memory_map): Wrap efi calls.
7155
7156 * kern/x86_64/dl.c: New file.
7157
7158 * kern/x86_64/efi/callwrap.S: Likewise.
7159
7160 * kern/x86_64/efi/startup.S: Likewise.
7161
7162 * loader/efi/appleloader.c: Likewise.
7163
7164 * loader/efi/chainloader.c (cmdline): New variable.
7165 (grub_chainloader_unload): Wrap efi calls.
7166 (grub_chainloader_boot): Likewise.
7167 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7168 command line.
7169
7170 * loader/efi/chainloader_normal.c (chainloader_command):
7171 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7172 command line.
7173
7174 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7175 method.
7176 (grub_e820_add_region): New function.
7177 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7178 booting.
7179 (grub_find_video_card): New function.
7180 (grub_linux_setup_video): New function.
7181 (grub_rescue_cmd_linux): Probe for video information.
7182
7183 * normal/x86_64/setjmp.S: New file.
7184
7185 * term/efi/console.c (map_char): New function.
7186 (grub_console_putchar): Map unicode char.
7187 (grub_console_checkkey): Wrap efi calls.
7188 (grub_console_getkey): Likewise.
7189 (grub_console_getwh): Likewise.
7190 (grub_console_gotoxy): Likewise.
7191 (grub_console_cls): Likewise.
7192 (grub_console_setcolorstate): Likewise.
7193 (grub_console_setcursor): Likewise.
7194
7195 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7196
59652a20 71972008-07-16 Pavel Roskin <proski@gnu.org>
7198
ef294055 7199 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7200 format strings.
7201
59652a20 7202 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7203 pointer, not an integer. This fixes a warning and prevents
7204 precision loss on 64-bit systems.
7205 (relocate_addresses): Remove unneeded cast.
7206
afc3b5d7 72072008-07-15 Pavel Roskin <proski@gnu.org>
7208
506b2b3e 7209 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7210
62ead89c 7211 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7212
c4cd51d7 7213 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7214 Fix comparison between signed and unsigned.
7215
0d3d8f28 7216 * include/grub/i386/ieee1275/console.h: Declare
7217 grub_console_init() and grub_console_fini().
7218
8804b286 7219 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7220 It's empty and unused.
7221
ee01cf35 7222 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7223 beginning to avoid warnings with some compilers.
7224
afc3b5d7 7225 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7226 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7227
e4e8eaa5 72282008-07-14 Pavel Roskin <proski@gnu.org>
7229
407aceb4 7230 * kern/env.c (grub_register_variable_hook): Don't copy empty
7231 string, it leaks memory. Pass "" to grub_env_set(), it should
7232 handle constant strings.
7233
e4e8eaa5 7234 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7235 * commands/cmp.c (grub_cmd_cmp): Likewise.
7236 * kern/dl.c (grub_dl_flush_cache): Likewise.
7237 (grub_dl_load_core): Likewise.
7238 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7239 (grub_elf64_load_phdrs): Likewise.
7240
d4e2dad3 72412008-07-13 Pavel Roskin <proski@gnu.org>
7242
7243 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7244 between signed and unsigned.
7245 (LzmaEnc_Finish): Fix warning about an unused parameter.
7246
aa24b516 72472008-07-13 Bean <bean123ch@gmail.com>
7248
7249 * Makefile.in (enable_lzo): New rule.
7250
7251 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7252
7253 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7254
7255 * boot/i386/pc/lnxboot.S: #include <config.h>.
7256
7257 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 7258 its value according to the compression algorithm used, lzo or lzma.
aa24b516 7259
7260 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7261 compression algorithm according to configure macro.
7262
7263 * kern/i386/pc/startup.S (codestart): Likewise.
7264
7265 * kern/i386/pc/lzma_decode.S: New file.
7266
7267 * include/grub/lib/LzFind.h: Likewise.
7268
7269 * include/grub/lib/LzHash.h: Likewise.
7270
7271 * include/grub/lib/LzmaDec.h: Likewise.
7272
7273 * include/grub/lib/LzmaEnc.h: Likewise.
7274
7275 * include/grub/lib/LzmaTypes.h: Likewise.
7276
7277 * lib/LzFind.c: Likewise.
7278
7279 * lib/LzmaDec.c: Likewise.
7280
7281 * lib/LzmaEnc.c: Likewise.
7282
4ae821ac 72832008-07-13 Bean <bean123ch@gmail.com>
7284
7285 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7286 (grub_ext4_extent_header): New structure.
7287 (grub_ext4_extent): Likewise.
7288 (grub_ext4_extent_idx): Likewise.
7289 (grub_ext4_find_leaf): New function.
7290 (grub_ext2_read_block): Handle extents.
7291
9a745147 72922008-07-12 Robert Millan <rmh@aybabtu.com>
7293
7294 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7295
d49a4cf6 72962008-07-11 Robert Millan <rmh@aybabtu.com>
7297
7298 * util/grub.d/40_custom.in: New file. Example on how to add custom
7299 entries to /etc/grub.d.
7300 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7301 40_custom (implicitly, by merging all the grub.d rules).
7302
947414b4 73032008-07-11 Pavel Roskin <proski@gnu.org>
7304
0059cf6f 7305 * commands/read.c (grub_getline): Fix invalid memory access.
7306 Don't add newline to the variable value.
7307
947414b4 7308 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7309 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7310 (serial_hw_get_port): Check validity of the port number.
7311 (grub_cmd_serial): Check return value of serial_hw_get_port().
7312
62a02d00 73132008-07-07 Pavel Roskin <proski@gnu.org>
7314
7315 * boot/i386/pc/diskboot.S (notification_string): Replace
7316 "Loading kernel" with just "loading". This is shorter, less
7317 confusing and saves a few bytes for possible future changes.
7318
3e5581b0 73192008-07-05 Pavel Roskin <proski@gnu.org>
7320
ea387a48 7321 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7322 size for ATAPI devices, they are undefined. Output sector
7323 number in decimal form.
7324
3e5581b0 7325 * disk/ata.c: Use named constants for status bits.
7326
fdecb8fd 73272008-07-04 Pavel Roskin <proski@gnu.org>
7328
bcd35b90 7329 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7330 grub_addr_t before casting it to the void pointer to fix a
7331 warning. Non-addressable regions are discarded earlier.
7332 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7333 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7334 (check_signature): Don't shadow table_header.
7335 (grub_linuxbios_table_iterate): Cast numeric constants to
7336 grub_linuxbios_table_header_t.
7337 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7338 grub_stop().
7339
af58ab3d 7340 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7341 prevent warnings.
7342
1759aa57 7343 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7344 pointer, which can cause warnings. Support 64-bit addresses.
7345
fdecb8fd 7346 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7347 of sizeof(long). This fixes PowerPC image generation on x86_64.
7348
8516d2a8 73492008-07-04 Robert Millan <rmh@aybabtu.com>
7350
7351 This fixes a performance issue when pc & gpt partmap iterators
7352 didn't abort iteration even after our hook found what it was
fe987087 7353 looking for (often causing expensive probes of non-existent drives).
8516d2a8 7354
7355 Some callers relied on previous buggy behaviour, since they would
34c44600 7356 raise an error when their own hooks caused early abortion of its
8516d2a8 7357 iteration.
7358
7359 * kern/device.c (grub_device_open): Improve error message.
7360 * disk/lvm.c (grub_lvm_open): Likewise.
7361 * disk/raid.c (grub_raid_open): Likewise.
7362
7363 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7364 when hook requests it, independently of grub_errno.
7365 (pc_partition_map_probe): Do not fail when find_func() caused
7366 early abortion of pc_partition_map_iterate().
7367
7368 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7369 when hook requests it, independently of grub_errno.
7370 (gpt_partition_map_probe): Do not fail when find_func() caused
7371 early abortion of gpt_partition_map_iterate().
7372
7373 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7374 when hook requests it, independently of grub_errno. Do not fail when
7375 part_map_iterate_hook() caused early abortion of p->iterate().
7376
7377 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7378 when grub_partition_iterate() returned with non-zero.
7379
277d0de9 73802008-07-03 Pavel Roskin <proski@gnu.org>
7381
7382 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7383 like we do in grub_ata_pio_read().
7384 (grub_ata_readwrite): Always write individual sectors. Fix the
7385 sector count for the remainder.
7386 (grub_ata_write): Enable writing to ATA devices. Correctly
7387 report error for ATAPI devices.
7388
d4c9b428 73892008-07-02 Pavel Roskin <proski@gnu.org>
7390
e43fc690 7391 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7392 warning.
7393
f707af42 7394 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7395 for every read sector, we already increment it for the whole
7396 batch. This fixes reading more than 256 sectors at once.
7397
11e16b15 7398 * util/grub-editenv.c (cmd_info): Cast argument to long
7399 explicitly. ptrdiff_t reduces to int on i386.
7400
cbabfdd4 7401 * util/grub-editenv.c (main): Be specific which parameter is
7402 missing.
7403
b8fbce0a 7404 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7405 (memdisk): Make memdisk_orig_addr a pointer.
7406
c9c8e606 7407 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7408 for file offsets, use grub_off_t instead. Fix printf format
7409 warnings.
7410
ca62e598 7411 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7412 there. Real unexpected warnings should not drown in the noise
7413 about known problems.
7414
ce8d1766 7415 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7416 grub_disk_addr_t for memory addresses.
7417
00c7a56a 7418 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7419 explicitly to fix a warning.
7420
08d3ef09 7421 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7422
cb71ba20 7423 * Makefile.in (MODULE_LDFLAGS): New variable.
7424 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7425 the linker accepts --build-id=none.
7426 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7427 MODULE_LDFLAGS.
7428 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7429
d4c9b428 7430 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7431 those in Linux XFS code. Provide a way to access 64-bit parent
7432 inode.
7433 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7434 the end of struct grub_xfs_dir_header.
7435
d4156eee 74362008-07-02 Bean <bean123ch@gmail.com>
7437
7438 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7439 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7440 and GRUB_IEEE1275_FLAG_NO_ANSI.
7441
7442 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7443 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7444 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7445
7446 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7447 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7448
7449 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7450 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7451
7452 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7453 esc sequence on non ANSI terminal.
7454 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7455
7456 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7457 beginning of file.
7458
2270f77b 74592008-07-02 Bean <bean123ch@gmail.com>
7460
7461 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7462 (grub_editenv_SOURCES): New variable.
7463 (pkglib_MODULES): Add loadenv.mod.
7464 (loadenv_mod_SOURCES): New variable.
7465 (loadenv_mod_CFLAGS): Likewise.
7466 (loadenv_mod_LDFLAGS): Likewise.
7467
7468 * include/grub/envblk.h: New file.
7469
7470 * util/envblk.c: New file.
7471
7472 * util/grub-editenv.c: New file.
7473
7474 * commands/loadenv.c: New file.
7475
0e9e51ec 74762008-07-01 Pavel Roskin <proski@gnu.org>
7477
d89b7634 7478 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7479 not unsigned char. This fixes warnings and is consistent with
7480 other tags.
7481
bf1835b1 7482 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7483
8222a04b 7484 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7485
6a42d99d 7486 * term/tparm.c (analyze): Always set *popcount.
7487
10b159d1 7488 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7489 cast to fix a warning.
7490
b8789f6c 7491 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7492 cast to suppress a warning.
7493
29d7e38a 7494 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7495 grub_fshelp_read_file() expects.
7496
f341f669 7497 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7498 write uuid as a 32-bit value in CPU byte order, so declare and
7499 use it as such.
7500
0e9e51ec 7501 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7502 long if the format specifier expects it.
7503 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7504 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7505 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7506 long to fix a warning.
7507 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7508 grub_dprintf() arguments to fix warnings.
7509
3aefa857 75102008-06-30 Pavel Roskin <proski@gnu.org>
7511
56c7668b 7512 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7513 install_bsd_part immediately before core.img is embedded or
7514 modified on disk. This fixes core.img verification if core.img
7515 cannot be embedded.
7516
3aefa857 7517 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7518 core_path to calculate the blocklist.
7519 Patch from Javier Martín <lordhabbit@gmail.com>
7520
5444088d 75212008-06-29 Robert Millan <rmh@aybabtu.com>
7522
7523 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7524 block to disk block.
7525 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7526 Patch from Niels Böhm <bitbucket@arcor.de>
7527
674835c8 75282008-06-29 Robert Millan <rmh@aybabtu.com>
7529
7530 * util/update-grub_lib.in (font_path): Search for fonts in
7531 /boot/grub first, which is more likely to be readable (we aren't
7532 deciding where fonts live, just looking for them).
7533
f527dbc8 75342008-06-26 Pavel Roskin <proski@gnu.org>
7535
6c2d8df6 7536 * util/biosdisk.c (read_device_map): Don't leave dead map
7537 entries for devices failing stat() check.
7538
f527dbc8 7539 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7540 core_path_dev for the core.img path on the target device.
7541
aebe3d13 75422008-06-26 Robert Millan <rmh@aybabtu.com>
7543
7544 * disk/fs_uuid.c: New file.
7545 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7546 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7547 (fs_uuid_mod_LDFLAGS): New variables.
7548 * include/grub/disk.h (grub_disk_dev_id): Add
7549 `GRUB_DISK_DEVICE_UUID_ID'.
7550 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7551 implement iterate().
7552
37aaf354 75532008-06-26 Robert Millan <rmh@aybabtu.com>
7554
7555 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7556 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7557 Linux image includes no initrd.
7558
25ff262a 75592008-06-21 Javier Martín <lordhabbit@gmail.com>
7560
7561 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7562 call to resolve the core image location that effectively appended the
7563 name twice.
7564
76a2bd44 75652008-06-21 Robert Millan <rmh@aybabtu.com>
7566
7567 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7568 call from here ...
7569
7570 * util/grub.d/10_hurd.in: ... to here ...
7571 * util/grub.d/10_linux.in: ... and here.
7572
650e1c79 75732008-06-19 Robert Millan <rmh@aybabtu.com>
7574
fe987087 7575 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 7576 after it has been set by grub_machine_set_prefix().
7577
6ce63911 75782008-06-19 Robert Millan <rmh@aybabtu.com>
7579
7580 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7581 search result when not saving to variable, not the other way around.
7582 When saving to variable, abort iteration as soon as a match is found.
7583
73940cec 75842008-06-19 Robert Millan <rmh@aybabtu.com>
7585
7586 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7587 check for partition that provides /boot/grub. Its logic is flawed,
7588 as it prevents prepare_grub_to_access_device() from being called
7589 multiple times.
7590
3c62a39d 75912008-06-19 Robert Millan <rmh@aybabtu.com>
7592
7593 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7594 "insmod" command directly when abstraction modules are needed,
fe987087 7595 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 7596 since it had already been processed).
7597
47395a42 75982008-06-19 Pavel Roskin <proski@gnu.org>
7599
7600 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7601 changed. This is needed in case GRUB_LIBDIR changes.
7602 * conf/i386-ieee1275.rmk: Likewise.
7603 * conf/i386-linuxbios.rmk: Likewise.
7604 * conf/i386-pc.rmk: Likewise.
7605 * conf/powerpc-ieee1275.rmk: Likewise.
7606
a145ac2d 76072008-06-18 Pavel Roskin <proski@gnu.org>
7608
7609 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7610 kernel_elf_symlist.c to symlist.c for consistency with other
7611 architectures. Update all users.
7612 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7613
7847c51e 76142008-06-18 Robert Millan <rmh@aybabtu.com>
7615
7616 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7617 it in prefix.
7618
7619 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7620 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7621 a RAID device, run setup() for all members independently on whether
7622 LVM abstraction is being used.
7623 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7624 If grub-mkimage has set `*install_dos_part == -2', don't override this
7625 value.
7626 Perform *install_dos_part adjustments independently on whether
7627 we're embedding or not.
7628 Clarify error message when image is too big for embedding.
7629 Remove duplicate *install_dos_part stanza.
7630
b23e5644 76312008-06-17 Robert Millan <rmh@aybabtu.com>
7632
7633 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7634 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7635 variables.
7636 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7637 values in grub_ofconsole_normal_color and
7638 grub_ofconsole_highlight_color (they're not directly related to
7639 background and foreground).
7640 (grub_ofconsole_setcolorstate): Extract background and foreground
7641 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7642
0aac2f79 76432008-06-17 Robert Millan <rmh@aybabtu.com>
7644
7645 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7646 /boot/grub for the check in last commit, not /boot (they could be
7647 different partitions).
7648
3cca7ef3 76492008-06-16 Robert Millan <rmh@aybabtu.com>
7650
7651 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7652 asked to setup access for the same partition that provides /boot,
7653 don't bother using UUIDs since our root already has the value we
7654 want.
7655
347396d8 76562008-06-16 Robert Millan <rmh@aybabtu.com>
7657
7658 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7659 I2O devices.
7660 Patch from Sven Mueller <sven@debian.org>.
7661
991477f8 76622008-06-16 Robert Millan <rmh@aybabtu.com>
7663
7664 * util/update-grub.in: Check for $EUID instead of $UID.
7665 Reported by Vincent Zweije.
7666
d31a32a1 76672008-06-16 Bean <bean123ch@gmail.com>
7668
fe987087 7669 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 7670 (grub_ext2_read_block): Likewise.
7671 (grub_ext2_read_inode): Likewise.
7672 (grub_ext2_mount): Likewise.
7673 (grub_ext2_close): Likewise.
7674 (grub_ext3_get_journal): Removed.
7675
fe987087 7676 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 7677 (grub_reiserfs_read_symlink): Likewise.
7678 (grub_reiserfs_mount): Likewise.
7679 (grub_reiserfs_open): Likewise.
7680 (grub_reiserfs_read): Likewise.
7681 (grub_reiserfs_close): Likewise.
7682 (grub_reiserfs_get_journal): Removed.
7683
7684 * fs/fshelp.c (grub_fshelp_read): Removed.
7685 (grub_fshelp_map_block): Likewise.
7686
7687 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7688 (grub_fshelp_journal): Likewise.
7689 (grub_fshelp_read): Likewise.
7690 (grub_fshelp_map_block): Likewise.
7691
3540a760 76922008-06-16 Pavel Roskin <proski@gnu.org>
7693
7694 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7695 floating point anymore.
7696 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7697
95614c84 76982008-06-15 Pavel Roskin <proski@gnu.org>
7699
7700 * commands/ls.c (grub_ls_list_files): Use integer calculations
7701 for human readable format, avoid floating point use.
7702 * kern/misc.c (grub_ftoa): Remove.
7703 (grub_vsprintf): Remove floating point support.
7704
50465dd6 77052008-06-15 Robert Millan <rmh@aybabtu.com>
7706
fe6b695a 7707 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 7708 devices.
7709 Reported by Max Vozeler.
7710
a9207284 77112008-06-15 Robert Millan <rmh@aybabtu.com>
7712
7713 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7714 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7715 skipped later.
7716 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7717 the beginning of the prefix.
7718
7719 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7720 It is assumed that if we have a memdisk, grub-mkimage has set
7721 grub_prefix to include the "(memdisk)" drive in it.
7722
a7cbd45a 77232008-06-15 Robert Millan <rmh@aybabtu.com>
7724
7725 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7726 Initialize keyboard controller after registering the terminal, so that
7727 grub_printf() can be called from grub_keyboard_controller_init().
7728
21cf716a 77292008-06-15 Robert Millan <rmh@aybabtu.com>
7730
7731 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7732 extent-btree which is written as big endian on disk.
7733 Reported by Alain Greppin <al@chilibi.org>.
7734
23a64d8e 77352008-06-14 Robert Millan <rmh@aybabtu.com>
7736
7737 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7738 * util/i386/pc/grub-install.in (modules): Likewise.
7739
d687651c 77402008-06-13 Pavel Roskin <proski@gnu.org>
7741
7742 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7743
dfe9ddd4 77442008-06-13 Bean <bean123ch@gmail.com>
7745
7746 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7747
7748 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7749
7750 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7751 to indicate sparse block.
7752
16ae7781 77532008-06-12 Pavel Roskin <proski@gnu.org>
7754
e6d1a308 7755 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7756 number, grub_fshelp_read() does it for us.
7757
16ae7781 7758 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7759 linear disk read with journal translation.
7760 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7761 * include/grub/fshelp.h: Declare grub_fshelp_read().
7762
40fd3a2b 77632008-06-09 Pavel Roskin <proski@gnu.org>
7764
7765 * fs/minix.c (grub_minix_mount): Handle error reading
7766 superblock.
7767
f5679726 77682008-06-08 Robert Millan <rmh@aybabtu.com>
7769
7770 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7771 don't append the RAID prefix afterwards.
7772 Reported by Clint Adams.
7773
ce525529 77742008-06-08 Robert Millan <rmh@aybabtu.com>
7775
7776 Based on description from Pavel:
7777 * kern/disk.c (grub_disk_check_range): Rename to ...
7778 (grub_disk_adjust_range): ... this. Add a comment explaining the
7779 tasks performed by this function.
7780
ad4936a0 77812008-06-08 Robert Millan <rmh@aybabtu.com>
7782
7783 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7784 `num_serial' (for consistency with other variables).
7785 (struct grub_ntfs_data): Add `uuid' member.
7786 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7787 (grub_ntfs_uuid): New function.
7788 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7789
dc20b0f9 77902008-06-07 Pavel Roskin <proski@gnu.org>
7791
7792 * util/biosdisk.c (open_device): Revert last change to the
7793 function, it broke installation. The sector needs to be
7794 different dependent on which device is opened.
7795
c5e3cfba 77962008-06-06 Robert Millan <rmh@aybabtu.com>
7797
7798 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7799 rest of GRUB, and breakage doesn't happen if its value were modified.
7800
7801 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7802 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7803 a constant (same value).
7804 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7805 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7806
26a1f8c4 78072008-06-06 Robert Millan <rmh@aybabtu.com>
7808
7809 * util/biosdisk.c (open_device): Do not modify sector offset when
7810 accessing a partition. kern/disk.c already handles this for us.
7811
25d6b327 78122008-06-06 Robert Millan <rmh@aybabtu.com>
7813
7814 * util/grub-emu.c (grub_machine_init): Move code in this function from
7815 here ...
7816 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7817 segfault in case grub_printf() is called).
7818
7819 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7820 grub_probe. Update all users not to explicitly add it again.
7821 (grub_device): New variable; contains corresponding device for grubdir.
7822 (fs_module, partmap_module, devabstraction_module): Pass
7823 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7824 every time.
7825
9ece62fb 78262008-06-05 Robert Millan <rmh@aybabtu.com>
7827
7828 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7829 is found, print it (same layout as with labels).
7830
1ad36d37 78312008-06-04 Robert Millan <rmh@aybabtu.com>
7832
7833 * util/biosdisk.c (get_drive): Rename to ...
7834 (find_grub_drive): ... this. Update all users.
7835
7836 (get_os_disk): Rename to ...
7837 (convert_system_partition_to_system_disk): ... this. Update all users.
7838
7839 (find_drive): Rename to ...
7840 (find_system_device): ... this. Update all users.
7841
e6a30859 78422008-06-04 Robert Millan <rmh@aybabtu.com>
7843
7844 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7845 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7846 (make_device_map): Likewise.
7847
00c108a4 78482008-06-01 Robert Millan <rmh@aybabtu.com>
7849
7850 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7851 before dereferencing it.
7852
7853 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7854 union with fat12/fat16-specific ones. Add some new fields, including
7855 `num_serial' for both versions.
7856 (struct grub_fat_data): Add `uuid' member.
7857 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7858 names. Initialize `data->uuid' using `num_serial'.
7859 (grub_fat_uuid): New function.
7860 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7861
7862 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7863 (grub_reiserfs_uuid): New function.
7864 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7865 member.
7866
7867 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7868 (grub_xfs_uuid): New function.
7869 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7870
1385c5bb 78712008-06-01 Robert Millan <rmh@aybabtu.com>
7872
7873 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7874 code that is backward compatible with pre-uuid search command.
7875
c682dfd7 78762008-05-31 Robert Millan <rmh@aybabtu.com>
7877
7878 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7879 floppies after everything else, to ensure floppy drive isn't accessed
7880 unnecessarily (patch from Bean).
7881
b7db5d47 78822008-05-31 Robert Millan <rmh@aybabtu.com>
7883
7884 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7885 not print device names when we were asked to set a variable.
7886
6e037aa9 78872008-05-31 Robert Millan <rmh@aybabtu.com>
7888
7889 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7890 using "cursor-on" and "cursor-off" commands (understood at least by
7891 the Open Firmware flavour on OLPC).
7892
41305bc8 78932008-05-31 Michael Gorven <michael@gorven.za.net>
7894
7895 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7896 on and off sequences.
7897
69ba137e 78982008-05-31 Robert Millan <rmh@aybabtu.com>
7899
7900 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7901 * util/update-grub.in: Likewise.
7902
520ae21b 79032008-05-30 Pavel Roskin <proski@gnu.org>
7904
7905 * util/biosdisk.c (linux_find_partition): Simplify logic and
7906 make the code more universal. Keep special processing for
7907 devfs, but use a simple rule for all other devices. If the
7908 device ends with a number, append 'p' and the partition number.
7909 Otherwise, append only the partition number.
7910
5786569b 79112008-05-30 Robert Millan <rmh@aybabtu.com>
7912
7913 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7914 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7915 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7916 the `root' parameter to Linux.
7917
51500452 79182008-05-30 Robert Millan <rmh@aybabtu.com>
7919
7920 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7921 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7922 --fs_uuid with --fs-uuid.
7923 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7924 all filesystems support them).
7925
811d3878 79262008-05-30 Robert Millan <rmh@aybabtu.com>
7927
7928 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 7929 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 7930
cab63c95 79312008-05-30 Robert Millan <rmh@aybabtu.com>
7932
7933 * util/grub.d/00_header.in: Remove obsolete comment referencing
7934 convert_system_path_to_grub_path().
7935 * util/update-grub.in: Likewise.
7936 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7937 (convert_system_path_to_grub_path): Add a warning message explaining
7938 that this function is deprecated. Rely on is_path_readable_by_grub()
7939 for the readability checks.
7940 (font_path): Use is_path_readable_by_grub() for the readability
7941 check rather than convert_system_path_to_grub_path().
7942
972e2f7a 79432008-05-30 Robert Millan <rmh@aybabtu.com>
7944
7945 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7946 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7947 converting it first.
7948 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7949 grub.cfg for access to font file, and afterwards call it again to set
7950 the root device.
7951
62191274 79522008-05-30 Robert Millan <rmh@aybabtu.com>
7953
7954 * commands/search.c (options): Add --fs_uuid option.
7955 (search_fs_uuid): New function.
7956 (grub_cmd_search): Fix --set argument passing.
7957 Use search_fs_uuid() when requested via --fs_uuid.
7958 (grub_search_init): Update help message.
7959 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7960 and redeclare it as an array of 16-bit words.
7961 (grub_ext2_uuid): New function.
7962 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7963 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7964 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7965 (GRUB_DEVICE_BOOT_UUID): New variables.
7966 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7967 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7968 whenever possible.
7969 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7970 just assume `root' variable has the right value.
7971 * util/grub.d/10_linux.in: Likewise.
7972 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7973 via PRINT_FS_UUID.
7974 (main): Recognise `-t fs_uuid' argument.
7975
01b73ec8 79762008-05-30 Robert Millan <rmh@aybabtu.com>
7977
7978 * util/biosdisk.c (map): Redefine structure to hold information
7979 about GRUB drive name.
fe6b695a 7980 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 7981 drive names.
7982 (call_hook): Remove.
7983 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7984 member. Assume drive has partitions.
7985 (grub_util_biosdisk_open): Access device names via `.device' struct
7986 member.
7987 (open_device): Likewise.
7988 (find_drive): Likewise.
7989 (read_device_map): Adjust map[] usage to match the new struct
7990 definition. Don't check for duplicates (still possible, but not cheap
7991 anymore).
7992 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7993 (make_device_name): Remove assumption of BIOS-like drive names.
7994
22f16596 79952008-05-30 Pavel Roskin <proski@gnu.org>
7996
7997 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7998 compiling execute.c doesn't need grub_script.tab.h anymore.
7999 (normal/command.c_DEPENDENCIES): Likewise.
8000 (normal/function.c_DEPENDENCIES): Likewise.
8001 * conf/i386-ieee1275.rmk: Likewise.
8002 * conf/i386-linuxbios.rmk: Likewise.
8003 * conf/i386-pc.rmk: Likewise.
8004 * conf/powerpc-ieee1275.rmk: Likewise.
8005 * conf/sparc64-ieee1275.rmk: Likewise.
8006
528ad8f2 80072008-05-29 Pavel Roskin <proski@gnu.org>
8008
d1dff95d 8009 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8010 when scanning metadata for volume group name.
8011
528ad8f2 8012 * include/grub/script.h: Don't include grub_script.tab.h. It's
8013 a generated file, which may only be included from the files with
8014 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
8015 use union YYSTYPE, as the later allows forward declaration.
8016 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8017
47248e08 80182008-05-29 Robert Millan <rmh@aybabtu.com>
8019
8020 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8021 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8022 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8023 (grub_console_checkkey): Add grub_dprintf() call to report unknown
8024 scan codes.
8025
ee632529 80262008-05-29 Robert Millan <rmh@aybabtu.com>
8027
8028 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8029 control key combinations.
8030
eee96e08 80312008-05-29 Robert Millan <rmh@aybabtu.com>
8032
8033 * util/powerpc/ieee1275/grub-install.in: Move from here ...
8034 * util/ieee1275/grub-install.in: ... to here.
8035 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8036 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8037 (grub_install_SOURCES): Likewise.
8038
da9a6a94 80392008-05-29 Robert Millan <rmh@aybabtu.com>
8040
8041 * fs/affs.c: Update copyright year.
8042 * fs/ext2.c: Likewise.
8043 * fs/fshelp.c: Likewise.
8044 * fs/hfsplus.c: Likewise.
8045 * fs/ntfs.c: Likewise.
8046 * fs/xfs.c: Likewise.
8047 * include/grub/fshelp.h: Likewise.
8048 * util/grub-mkdevicemap.c: Likewise.
8049
12e65f3a 80502008-05-28 Robert Millan <rmh@aybabtu.com>
8051
8052 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8053 might need to be fatfs to support some firmware implementations
8054 (e.g. OFW or EFI).
8055
23023641 80562008-05-28 Robert Millan <rmh@aybabtu.com>
8057
8058 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8059 devices.
8060 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8061 (make_device_map): Likewise.
8062
887d2619 80632008-05-20 Bean <bean123ch@gmail.com>
8064
8065 * fs/fshelp.c (grub_fshelp_map_block): New function.
8066 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8067 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8068
8069 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8070 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8071 (grub_fshelp_journal): New structure.
8072 (grub_fshelp_map_block): New function prototype.
8073 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8074 (grub_fshelp_map_block): Likewise.
8075
8076 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8077 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8078 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8079 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8080 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8081 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8082 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8083 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8084 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8085 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8086 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8087 (grub_ext2_sblock): New members for journal support.
8088 (grub_ext3_journal_header): New structure.
8089 (grub_ext3_journal_revoke_header): Likewise.
8090 (grub_ext3_journal_block_tag): Likewise.
8091 (grub_ext3_journal_sblock): Likewise.
8092 (grub_fshelp_node): New members logfile and journal.
8093 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8094 grub_fshelp_map_block to get real block number.
8095 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8096 number.
8097 (grub_ext2_read_inode): Likewise.
8098 (grub_ext3_get_journal): New function.
8099 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8100 (grub_ext2_close): Release memory used by journal.
8101
8102 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8103 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8104 (grub_reiserfs_transaction_header): Renamed to
8105 grub_reiserfs_description_block, replace field data with real_blocks.
8106 (grub_reiserfs_commit_block): New structure.
8107 (grub_reiserfs_data): New member journal.
8108 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8109 number.
8110 (grub_reiserfs_read_symlink): Likewise.
8111 (grub_reiserfs_iterate_dir): Likewise.
8112 (grub_reiserfs_open): Likewise.
8113 (grub_reiserfs_read): Likewise.
8114 (grub_reiserfs_get_journal): New function.
8115 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8116 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8117 using grub_reiserfs_get_journal.
8118 (grub_reiserfs_close): Release memory used by journal.
8119
8120 * fs/affs.c (grub_affs_read_block): Change block type to
8121 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8122
8123 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8124
8125 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8126
8127 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8128
8129 * fs/udf.c (grub_udf_read_block): Change block type to
8130 grub_disk_addr_t. Use type cast to avoid warning.
8131
8132 * fs/xfs.c (grub_xfs_read_block): Likewise.
8133
b7c6bed5 81342008-05-16 Christian Franke <franke@computer.org>
8135
8136 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8137 to ensure that break with ESC will always work.
8138 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8139 Remove ESC from keyboard queue.
8140
eedf167f 81412008-05-16 Christian Franke <franke@computer.org>
8142
8143 * util/biosdisk.c: [__CYGWIN__] Add includes.
8144 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8145 (get_os_disk): Move variable declarations to OS specific
8146 parts to avoid warning.
8147 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8148 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8149 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8150 Cygwin.
8151 * util/getroot.c: [__CYGWIN__] Add includes.
8152 (strip_extra_slashes): Fix "/" case.
8153 [__CYGWIN__] (get_win32_path): New function.
8154 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8155 [__CYGWIN__] (find_root_device): Disable.
8156 [__CYGWIN__] (get_bootsec_serial): New function.
8157 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8158 [__linux__] (grub_guess_root_device): Add early returns to simplify
8159 structure.
8160 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8161 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8162 check for Linux only.
8163
a079699e 81642008-05-15 Bean <bean123ch@gmail.com>
8165
8166 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8167 keyboard hang problem in apple's intel mac.
8168
1cf4059a 81692008-05-09 Robert Millan <rmh@aybabtu.com>
8170
8171 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8172 devices.
8173 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8174 (make_device_map): Likewise.
8175 Reported by Aurelien Jarno <aurel32@debian.org>
8176
ed759390 81772008-05-07 Ian Campbell <ijc@hellion.org.uk>
8178
8179 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8180 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8181 (make_device_map): Output entries for xvd type disks.
8182
b56c4eaa 81832008-05-07 Robert Millan <rmh@aybabtu.com>
8184
8185 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8186 devices.
8187 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8188 (make_device_map): Likewise.
8189 Reported by Roland Dreier <rdreier@cisco.com>
8190
7f8866ed 81912008-05-07 Robert Millan <rmh@aybabtu.com>
8192
8193 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8194 grub_strstr() call. Correct a few mistakes in failure path handling.
8195
b0346e0f 81962008-05-06 Robert Millan <rmh@aybabtu.com>
8197
8198 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8199 Do not print a trailing slash (therefore, the root directory is an
8200 empty string).
8201 (convert_system_path_to_grub_path): Do not remove trailing slash
8202 from make_system_path_relative_to_its_root() output.
8203
8204 * util/i386/pc/grub-install.in: Add trailing slash to output from
8205 make_system_path_relative_to_its_root().
8206
6cf12cbd 82072008-05-06 Robert Millan <rmh@aybabtu.com>
8208
8209 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8210 ensures that output lines aren't intermangled with those sent to
8211 stderr (via grub_util_info()).
8212 * util/grub-probe.c (grub_refresh): Likewise.
8213 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8214
0fbb3117 82152008-05-05 Christian Franke <franke@computer.org>
8216
8217 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8218 Add Cygwin device names.
8219 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8220 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8221 (check_device): Return error instead of success on empty name.
8222 (make_device_map): Move label inside linux specific code to
8223 prevent compiler warning.
8224
8124cdb7 82252008-04-30 Robert Millan <rmh@aybabtu.com>
8226
8227 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8228 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8229 first boot option.
8230 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8231
094c01d0 82322008-04-29 Robert Millan <rmh@aybabtu.com>
8233
8234 * docs/grub.cfg: New file (example GRUB configuration).
8235
f4b1fc02 82362008-04-26 Robert Millan <rmh@aybabtu.com>
8237
329ce2a5 8238 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8239 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8240 and `disk/ieee1275/nand.c'.
f4b1fc02 8241
25f16ec1 82422008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 8243
25f16ec1 8244 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8245 i386-linuxbios.
8246
8247 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8248 change the buffer size to 4096 for cdrom device.
8249
8250 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8251 and nand.mod.
8252 (_linux_mod_SOURCES): New variable.
8253 (_linux_mod_CFLAGS): Likewise.
8254 (_linux_mod_LDFLAGS): Likewise.
8255 (linux_mod_SOURCES): Likewise.
8256 (linux_mod_CFLAGS): Likewise.
8257 (linux_mod_LDFLAGS): Likewise.
8258 (nand_mod_SOURCES): Likewise.
8259 (nand_mod_CFLAGS): Likewise.
8260 (nand_mod_LDFLAGS): Likewise.
8261
8262 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8263 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8264 type property. (nand device in olpc don't have this property)
8265
8266 * include/grub/disk.h (grub_disk_dev_id): New macro
8267 GRUB_DISK_DEVICE_NAND_ID.
8268
8269 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8270 function prototype.
8271 (grub_rescue_cmd_initrd): Likewise.
8272
8273 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8274 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8275 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 8276
25f16ec1 8277 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8278 GRUB_MACHINE_IEEE1275 is defined.
8279
8280 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8281 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8282
8283 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8284 on nested function heap_init.
8285 (grub_upper_mem): New variable for i386-ieee1275.
8286 (grub_get_extended_memory): New function for i386-ieee1275.
8287 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8288
8289 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8290 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8291 property.
f19dbdb7 8292
25f16ec1 8293 * loader/i386/ieee1275/linux.c: New file.
8294
8295 * loader/i386/ieee1275/linux_normal.c: New file.
8296
8297 * disk/ieee1275/nand.c: New file.
8298
e89d61e9 82992008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8300
8301 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8302 value.
8303 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8304
602566f6 83052008-04-18 Robert Millan <rmh@aybabtu.com>
8306
8307 Restructures early code path on ieee1275 to unify grub_main() as
8308 the first C function that is executed in every platform.
8309
8310 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8311 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8312 cmain().
8313 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8314 * kern/ieee1275/cmain.c (cmain): Rename to ...
8315 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8316 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8317 at the beginning.
8318
57490c2b 83192008-04-18 Robert Millan <rmh@aybabtu.com>
8320
8321 * util/update-grub.in: Fix syntax error when setting
8322 `GRUB_PRELOAD_MODULES'.
8323 Reported by Stephane Chazelas <stephane@artesyncp.com>
8324
1977517d 83252008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8326
8327 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8328 section into account, newer toolchains generate unique build ids
8329 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 8330 we want build ids to be preserved
1977517d 8331 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8332 far from other sections don't cause the raw binary images grow
8333 size
8334
bfb1f1a2 83352008-04-15 Robert Millan <rmh@aybabtu.com>
8336
8337 * disk/lvm.c: Update copyright year.
8338 * kern/misc.c: Likewise.
8339
01979850 83402008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8341
8342 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 8343 there is no memory left for physical volume name.
01979850 8344
0a1150e2 83452008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8346
8347 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8348 volume name mapping to support bigger than 9 character names properly.
8349
82ead3fe 83502008-04-13 Robert Millan <rmh@aybabtu.com>
8351
8352 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8353 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8354
e54a72f5 83552008-04-13 Christian Franke <franke@computer.org>
8356
8357 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8358 to create a floppy emulation boot CD when non emulation mode
8359 does not work.
8360 Enable Joliet CD filesystem extension.
8361
9fe86034 83622008-04-13 Robert Millan <rmh@aybabtu.com>
8363
8364 * kern/misc.c (grub_strncat): Fix off-by-one error.
8365 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8366
8367 * kern/env.c (grub_env_context_close): Clear current context, not
8368 previous one.
8369 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8370
8371 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8372
7ceeee39 83732008-04-13 Robert Millan <rmh@aybabtu.com>
8374
8375 Improve robustness when handling LVM.
8376
8377 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 8378 (and leave `*p' unmodified).
7ceeee39 8379 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8380 through it.
8381 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8382 iterating through it.
8383 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8384 through it.
fe6b695a 8385 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 8386 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8387 Don't assume `vg->pvs != NULL' when iterating through it.
8388
58cd3d85 83892008-04-13 Robert Millan <rmh@aybabtu.com>
8390
8391 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8392 * genmk.rb (partmap): New variable.
8393 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8394 (#{partmap}): New target rule.
8395 * genpartmaplist.sh: New file.
8396 * Makefile.in (pkglib_DATA): Add partmap.lst.
8397 (partmap.lst): New target rule.
8398 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8399 modules (including all partition maps), instead of preloading them.
8400
78b51059 84012007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8402
8403 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8404 `linux-boot-prober' (if installed) to detect other operating
8405 systems which are installed on the computer and add them to
8406 the boot menu.
8407 * conf/common.rmk: Build and install 30_os-prober.
8408
a91627b4 84092008-04-12 Robert Millan <rmh@aybabtu.com>
8410
8411 * kern/powerpc/ieee1275/init.c: Move from here ...
8412 * kern/ieee1275/init.c: ... to here. Update all users.
8413
8414 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8415 * kern/ieee1275/cmain.c: ... to here. Update all users.
8416
8417 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8418 * kern/ieee1275/openfw.c: ... to here. Update all users.
8419
8420 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8421 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8422
322562ea 84232008-04-10 Pavel Roskin <proski@gnu.org>
8424
8425 * configure.ac: Always use "_cv_" in cache variables for
8426 compatibility with Autoconf 2.62.
8427
a02a73c5 84282008-04-07 Robert Millan <rmh@aybabtu.com>
8429
8430 Revert grub/machine/init.h addition by Pavel (since it breaks on
8431 i386-ieee1275 and others):
8432 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8433 * util/powerpc/ieee1275/misc.c: Likewise.
8434
25c024b1 84352008-04-07 Robert Millan <rmh@aybabtu.com>
8436
8437 * util/grub-probe.c (probe): Improve error message.
8438
3cbd2f98 84392008-04-07 Robert Millan <rmh@aybabtu.com>
8440
8441 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8442 (this prevents the presence of a bogus entry from ruining the whole
8443 thing).
8444
87a297bf 84452008-04-06 Pavel Roskin <proski@gnu.org>
8446
36747a62 8447 * util/biosdisk.c: Include grub/util/biosdisk.h.
8448 * util/grub-fstest.c (execute_command): Make static.
8449 * util/grub-mkdevicemap.c (check_device): Likewise.
8450 * util/i386/pc/misc.c: Include grub/machine/init.h.
8451 * util/powerpc/ieee1275/misc.c: Likewise.
8452 * util/lvm.c: Include grub/util/lvm.h.
8453 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8454 grub/cache.h.
8455 * util/raid.c: Include grub/util/raid.h.
8456 (grub_util_getdiskname): Make static.
8457
87a297bf 8458 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8459 grub_hostfs_fini(), as they are called from grub_init_all() and
8460 grub_fini_all() respectively. This fixes an infinite loop in
8461 grub-fstest due to double registration of hostfs.
8462 Reported by Christian Franke <Christian.Franke@t-online.de>
8463
f6ce7629 84642008-04-05 Pavel Roskin <proski@gnu.org>
8465
8466 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8467 all 8 functions. Otherwise, probe function 0 only.
8468
070e49e4 84692008-04-04 Pavel Roskin <proski@gnu.org>
8470
8b088a4c 8471 * commands/lspci.c (grub_lspci_iter): Print the bus number
8472 correctly.
8473
4f657021 8474 * commands/lspci.c (grub_pci_classes): Fix typos.
8475 (grub_lspci_iter): Don't print func twice. Print vendor ID
8476 before device ID, as it's normally done.
8477
070e49e4 8478 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8479 Fix signedness warnings.
8480 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8481 Likewise.
8482 * util/ieee1275/get_disk_name.c: Include config.h so that
8483 _GNU_SOURCE is defined and getline() is declared. Mark an
8484 unused argument as such. Fix a signedness warning.
8485
ba7328dc 84862008-04-02 Pavel Roskin <proski@gnu.org>
8487
26887f22 8488 * genkernsyms.sh.in: Use more robust assignments for CC and
8489 srcdir. Quote srcdir.
8490 * gensymlist.sh.in: Likewise. Assert at the compile time that
8491 the symbol table is not empty.
8492
ba7328dc 8493 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8494 * fs/cpio.c (grub_cpio_read): Likewise.
8495
0f582c6b 84962008-04-01 Pavel Roskin <proski@gnu.org>
8497
4b6e1995 8498 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8499 * disk/host.c (grub_host_open): Likewise.
8500 * disk/loopback.c (grub_loopback_open): Likewise.
8501 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8502 disk->id as in disk/host.c, not a multi-character constant.
8503
828a2768 8504 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8505 later is obsolete, potentially dangerous and sets a bad example.
8506 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8507 * util/misc.c (grub_util_get_image_size): Likewise.
8508
2bb4fb47 8509 * disk/loopback.c (options): Improve help for "--partitions".
8510
0f582c6b 8511 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8512 options to align them with the short options, e.g. "echo -e".
8513
a33224e0 85142008-03-31 Bean <bean123ch@gmail.com>
8515
8516 * video/reader/png.c (grub_png_data): New member is_16bit and
8517 image_data.
8518 (grub_png_decode_image_header): Detect 16 bit png image.
8519 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8520 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8521 (grub_video_reader_png): Release memory occupied by image_data.
8522
8523 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8524 4096 bytes.
8525 (grub_nfs_mount): Skip the test for sector per cluster.
8526
8527 * include/grub/ntfs.h (MAX_SPC): Removed.
8528
86cb4f54 85292008-03-31 Bean <bean123ch@gmail.com>
8530
8531 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8532 (grub_probe_SOURCES): Add fs/afs.c.
8533 (grub_fstest_SOURCES): Likewise.
8534 (afs_mod_SOURCES): New variable.
8535 (afs_mod_CFLAGS): Likewise.
8536 (afs_mod_LDFLAGS): Likewise.
8537
8538 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8539 (grub_emu_SOURCES): Likewise.
8540
8541 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8542
8543 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8544
8545 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8546
8547 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8548
8549 * fs/afs.c: New file.
8550
17c74c21 85512008-03-30 Pavel Roskin <proski@gnu.org>
8552
4cb68e89 8553 * disk/host.c: Include grub/misc.h to fix a warning.
8554 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8555 warnings about implicit declarations.
8556
8790bb04 8557 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8558 variable.
8559 * include/grub/i386/loader.h: Change declaration of
8560 grub_linux_boot() to match what grub_loader_set() expects.
8561 * util/getroot.c (grub_guess_root_device): Return const char* to
8562 fix a warning.
8563 * util/grub-probe.c (probe): Fix a warning about uninitialized
8564 abstraction_name variable.
8565 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8566 second argument as unused to fix a warning.
8567
9a3f3296 8568 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8569 missing grub_error() call.
8570
0ecef90d 8571 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8572 2.60 and newer uses it to define datadir.
8573
0bf6d401 8574 * commands/sleep.c: Fix warning about implicit declaration.
8575 * disk/memdisk.c: Likewise.
8576 * loader/aout.c: Likewise.
8577 * loader/i386/bsd_normal.c: Likewise.
8578 * util/grub-probe.c: Likewise.
8579
7cdacf97 8580 * commands/i386/cpuid.c (has_longmode): Make static.
8581 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8582 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8583
17c74c21 8584 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8585 GDT. This is more robust, as %ds can change.
8586 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8587 calling real_to_prot().
8588 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8589
80a3e68b 85902008-03-28 Pavel Roskin <proski@gnu.org>
8591
8592 * kern/i386/pc/startup.S: Assert that uncompressed functions
8593 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8594 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8595 code, as they push parts of the code (error handlers) beyond
8596 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8597 code as correctness and size.
8598
77bcd272 85992008-03-28 Pavel Roskin <proski@gnu.org>
8600
8601 * kern/i386/pc/startup.S
8602 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8603 data block address to the real mode, keep offset minimal. This
8604 works around a bug in AWARD BIOS on old Athlon systems, which
8605 makes CD detection hang.
8606
c5dfd43b 86072008-03-26 Pavel Roskin <proski@gnu.org>
8608
8609 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8610 const.
8611 * include/grub/normal.h: Add grub_parse_color_name_pair()
8612 declaration.
8613
bf962df2 86142008-03-24 Bean <bean123ch@gmail.com>
8615
8616 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8617 (cd_count): Removed.
8618 (cd_drive): New variable.
8619 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8620 (grub_biosdisk_call_hook): Likewise.
8621 (grub_biosdisk_iterate): Change cdrom detection method.
8622 (grub_biosdisk_open): Replace cd_start with cd_drive.
8623 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8624 detect cdrom device.
8625
8626 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8627 Removed.
8628 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8629 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8630 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8631 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8632 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8633 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8634 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8635 (grub_biosdisk_cdrp): New structure.
8636 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8637
8638 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8639
8640 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8641 device.
8642
8643 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8644 New function.
8645
68e7fc7a 86462008-03-20 Robert Millan <rmh@aybabtu.com>
8647
8648 Remove 2 TiB limit in ata.mod.
8649 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8650 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8651 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8652 grub_uint64_t instead of grub_uint32_t.
8653
38ad2cf5 86542008-03-05 Bean <bean123ch@gmail.com>
8655
8656 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8657 (grub_multiboot): Set boot device.
8658
8659 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8660
2b89344e 86612008-03-02 Bean <bean123ch@gmail.com>
8662
8663 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8664 symlink_buffer.
8665
87a95d1f 86662008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8667
8668 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8669 texinfo.tex.
8670
8671 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8672 modified.
8673
8674 * docs/fdl.texi: New file.
f19dbdb7 8675
87a95d1f 8676 * docs/mdate-sh: New file. Copied from gnulib.
8677 * docs/texinfo.tex: Likewise.
8678
8679 * config.guess: Updated from gnulib.
8680 * install-sh: Likewise.
8681
7dc15d8e 86822008-02-28 Robert Millan <rmh@aybabtu.com>
8683
8684 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8685 (aout_mod_SOURCES): New variable.
8686 (aout_mod_CFLAGS): Likewise.
8687 (aout_mod_LDFLAGS): Likewise.
8688
8689 * conf/i386-ieee1275.rmk: Likewise.
8690
b00ab696 86912008-02-28 Robert Millan <rmh@aybabtu.com>
8692
8693 * util/update-grub.in: Reorganise terminal validity check. Accept
8694 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8695 Based on suggestion by Franklin PIAT.
8696
79ca2d78 86972008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8698
8699 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8700 function.
8701 * util/getroot.c (grub_util_check_block_device): New function that
8702 returns the given argument if it is a block device and returns NULL else.
8703 * util/grub-probe.c (argument_is_device): New variable.
8704 (probe): Promote device_name from a variable to an argument. Receive
8705 device_name from grub_util_check_block_device() if path is NULL and from
8706 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 8707 (options): Introduce new parameter '-d, --device'.
79ca2d78 8708 (main): Add description of the new parameter to the help screen.
8709 Rename path variable to argument. Set argument_is_device if the '-d'
8710 option is given. Pass argument to probe() depending on
8711 argument_is_device.
8712
0d16e571 87132008-02-24 Bean <bean123ch@gmail.com>
8714
8715 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8716 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8717 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8718 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8719 (GRUB_ISO9660_VOLDESC_END): Likewise.
8720 (grub_iso9660_primary_voldesc): New member escape.
8721 (grub_iso9660_data): New member joliet.
8722 (grub_iso9660_convert_string): New function.
8723 (grub_iso9660_mount): Detect joliet extension.
8724 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8725 (grub_iso9660_iso9660_label): Likewise.
8726
8727 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8728 (grub_setup_SOURCES): Add fs/udf.c.
8729 (grub_fstest_SOURCES): Likewise.
8730 (udf_mod_SOURCES): New variable.
8731 (udf_mod_CFLAGS): Likewise.
8732 (udf_mod_LDFLAGS): Likewise.
8733
8734 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8735 (grub_emu_SOURCES): Likewise.
8736
8737 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8738
8739 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8740
8741 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8742
8743 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8744
8745 * fs/udf.c: New file.
8746
8a594a17 87472008-02-24 Robert Millan <rmh@aybabtu.com>
8748
8749 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8750 (normal/lexer.c_DEPENDENCIES): New variables.
8751 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8752 (normal/lexer.c_DEPENDENCIES): Likewise.
8753 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8754 (normal/lexer.c_DEPENDENCIES): Likewise.
8755 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8756 (normal/lexer.c_DEPENDENCIES): Likewise.
8757 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8758 (normal/lexer.c_DEPENDENCIES): Likewise.
8759 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8760 (normal/lexer.c_DEPENDENCIES): Likewise.
8761
2dc33c03 87622008-02-23 Robert Millan <rmh@aybabtu.com>
8763
8764 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8765 since they were intended to be in hex. This didn't break previously
8766 because of a bug in gpt_partition_map_iterate() (see below).
8767
8768 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8769 when checking the validity of GPT header.
8770 Remove `partno', since it always provides the same information as `i'.
8771
f6f4cfb0 87722008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8773
8774 * include/grub/efi/time.h: Fix a wrong comment.
8775
79ff665f 87762008-02-19 Pavel Roskin <proski@gnu.org>
8777
8778 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8779 message.
8780
d38e24c2 87812008-02-19 Bean <bean123ch@gmail.com>
8782
8783 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8784 (aout_mod_SOURCES): New variable.
8785 (aout_mod_CFLAGS): Likewise.
8786 (aout_mod_LDFLAGS): Likewise.
8787 (_bsd_mod_SOURCES): New variable.
8788 (_bsd_mod_CFLAGS): Likewise.
8789 (_bsd_mod_LDFLAGS): Likewise.
8790 (bsd_mod_SOURCES): New variable.
8791 (bsd_mod_CFLAGS): Likewise.
8792 (bsd_mod_LDFLAGS): Likewise.
8793
8794 * include/grub/aout.h: New file.
8795
8796 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8797
8798 * include/grub/i386/bsd.h: New file.
8799
8800 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8801 to make it public.
8802
8803 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8804 function is called, so that it's possible to change it inside the hook.
8805 (grub_elf64_load): Likewise.
8806 (grub_elf_file): Don't close the file if elf header is not found.
8807 (grub_elf_close): Close the file if grub_elf_file fails (The new
8808 grub_elf_file won't close it).
8809 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8810 (grub_elf64_size): Likewise.
8811
8812 * kern/i386/loader.S (grub_unix_real_boot): New function.
8813
8814 * loader/aout.c: New file.
8815
8816 * loader/i386/bsd.c: New file.
8817
8818 * loader/i386/bsd_normal.c: New file.
8819
8820 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8821
8822 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 8823 can test other formats.
d38e24c2 8824
b93bdb0f 88252008-02-19 Robert Millan <rmh@aybabtu.com>
8826
8827 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8828 (grub_gpt_partition_type_empty): Redefine with macro from
8829 `<grub/gpt_partition.h>'.
8830 (gpt_partition_map_iterate): Adjust partition type comparison.
8831
8832 Export `entry' as partmap-specific `part.data' struct.
8833 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8834
8835 * include/grub/gpt_partition.h (grub_gpt_header)
8836 (grub_gpt_partentry): ... to here (new file).
8837
8838 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8839
8840 (grub_gpt_partition_type_bios_boot): New const variable, defined
8841 with macro from `<grub/gpt_partition.h>'.
8842
8843 (setup): Replace `first_start' with `embed_region', which keeps
8844 track of the embed region (and is partmap-agnostic).
8845
8846 Replace find_first_partition_start() with find_usable_region(),
8847 which finds a usable region for embedding using partmap-specific
8848 knowledge (supports PC/MSDOS and GPT).
8849
8850 Fix all assumptions that the embed region start at sector 1, using
8851 `embed_region.start' from now on. Similarly, use `embed_region.end'
8852 rather than `first_start' to calculate available size.
8853
8854 In grub_util_info() message, replace "into after the MBR" with an
8855 indication of the specific sector our embed region starts at.
8856
66cb40f6 88572008-02-19 Robert Millan <rmh@aybabtu.com>
8858
8859 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8860 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8861 `commands/reboot.c'.
8862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8863 (halt_mod_SOURCES): Likewise.
8864 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8865 (halt_mod_SOURCES): Likewise.
8866
b7202015 88672008-02-17 Christian Franke <franke@computer.org>
8868
8869 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8870
32b0fc49 88712008-02-17 Robert Millan <rmh@aybabtu.com>
8872
8873 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8874 set `first_start' to 0 for non-PC/MSDOS partition maps.
8875
aca63502 88762008-02-16 Robert Millan <rmh@aybabtu.com>
8877
8878 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8879 do not assume partition map is PC/MSDOS before performing checks that
8880 are specific to that layout.
8881
0de8be86 88822008-02-13 Robert Millan <rmh@aybabtu.com>
8883
8884 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8885 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8886 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8887
c3db8364 88882008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8889
8890 * configure.ac: Only a cosmetic change on the handling of
8891 -fno-stack-protector.
8892
f714229e 88932008-02-12 Alexandre Boeglin <alex@boeglin.org>
8894
c3db8364 8895 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8896 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8897 reboot.c.
f714229e 8898 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8899 (halt_mod_SOURCES): New variable.
8900 (halt_mod_CFLAGS): Likewise.
8901 (halt_mod_LDFLAGS): Likewise.
8902 (reboot_mod_SOURCES): Likewise.
8903 (reboot_mod_CFLAGS): Likewise.
8904 (reboot_mod_LDFLAGS): Likewise.
8905
c3db8364 8906 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8907 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8908 reboot.c.
f714229e 8909 (halt_mod_SOURCES): Likewise.
8910 (reboot_mod_SOURCES): Likewise.
8911
c3db8364 8912 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8913 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 8914 (reboot_mod_SOURCES): Likewise.
8915
8916 * commands/i386/pc/reboot.c: merge this file ...
8917
8918 * commands/ieee1275/reboot.c: ... and this file ...
8919
8920 * commands/reboot.c: ... to this file.
c3db8364 8921 Add some precompiler directive to include the correct header for
8922 each machine.
f714229e 8923
8924 * commands/ieee1275/halt.c: move this file ...
8925
8926 * commands/halt.c: ... to here.
c3db8364 8927 Add some precompiler directive to include the correct header for
8928 each machine.
f714229e 8929
8930 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8931 (grub_halt): Likewise.
8932
8933 * kern/efi/efi.c (grub_reboot): New function.
8934 (grub_halt): Likewise.
8935
c74493e0 89362008-02-12 Robert Millan <rmh@aybabtu.com>
8937
8938 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8939 /dev (like it is done for /dev/mapper). This doesn't provide support
8940 for EVMS, but at least it is now easy to identify the problem when it
8941 arises.
8942
d0db4b04 89432008-02-11 Robert Millan <rmh@aybabtu.com>
8944
8945 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8946 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8947 comparing it with -1, not 0.
8948
bf748642 89492008-02-10 Robert Millan <rmh@aybabtu.com>
8950
8951 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8952 `disk/lvm.c'.
8953 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8954 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8955
8956 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8957 `disk/lvm.c' to the end of the list.
8958 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8959 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8960
b5db202a 89612008-02-10 Robert Millan <rmh@aybabtu.com>
8962
8963 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8964 grub_print_error() instead. This will let user know why we're entering
8965 rescue mode.
8966 Based on suggestions from Sam Morris.
8967
83abee31 89682008-02-10 Alexandre Boeglin <alex@boeglin.org>
8969
8970 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8971 on remaining N args, instead of "--" arg N times.
8972
78d5a08b 89732008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8974
8975 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8976 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8977 pattern for unknown glyphs.
8978
68807e5f 89792008-02-09 Robert Millan <rmh@aybabtu.com>
8980
8981 * configure.ac: Probe for `help2man'.
8982 * Makefile.in (builddir): New variable.
8983 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8984 or otherwise add a few flags/options to it.
8985 (install-local): For every executable utility or script that is
8986 installed, invoke $(HELP2MAN) to install a manpage based on --help
8987 output.
8988
8989 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8990 that it doesn't prevent --help from working in build tree.
8991
8992 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8993 with `bug-grub@gnu.org'.
8994 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8995 * util/update-grub.in (usage): New function.
8996 Implement proper argument check, with support for --help and --version
8997 (as well as existing -y).
8998
89992008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 9000
9001 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9002 avoid overwriting previous output.
9003 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9004
c1962162 90052008-02-09 Robert Millan <rmh@aybabtu.com>
9006
9007 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9008 drawing the menu.
9009
3dac2e3f 90102008-02-09 Robert Millan <rmh@aybabtu.com>
9011
9012 * commands/sleep.c: New file.
9013 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9014 (sleep_mod_SOURCES): New variable.
9015 (sleep_mod_CFLAGS): Likewise.
9016 (sleep_mod_LDFLAGS): Likewise.
9017
7a634e08 90182008-02-09 Robert Millan <rmh@aybabtu.com>
9019
9020 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9021 situations in which we can deduce the RAID size and the superblock
9022 doesn't match it.
9023
b92f0c18 90242008-02-09 Robert Millan <rmh@aybabtu.com>
9025
9026 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
9027 and return a grub_diskmemberlist_t composed of LVM physical volumes.
9028 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9029
9030 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
9031 and return a grub_diskmemberlist_t composed of physical array members.
9032 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9033
9034 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9035 prototype.
9036 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9037 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9038 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9039
9040 * util/grub-probe.c (probe): Move partmap probing code from here ...
9041 (probe_partmap): ... to here.
9042 (probe): Use probe_partmap() once for the disk we're probing, and
9043 additionally, when such disk contains a memberlist() struct member,
9044 once for each disk that is contained in the structure returned by
9045 memberlist().
9046
91a4bf68 90472008-02-09 Robert Millan <rmh@aybabtu.com>
9048
9049 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9050 environment variable to 'all' in order to obtain debug output from
9051 non-util/ code.
9052 * util/i386/pc/grub-setup.c (main): Likewise.
9053
a96f9caa 90542008-02-08 Robert Millan <rmh@aybabtu.com>
9055
9056 * disk/raid.c (grub_raid_scan_device): Check for
9057 `array->device[sb.this_disk.number]' rather than for
9058 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 9059 guaranteed to be accessible.
a96f9caa 9060
b37a9222 90612008-02-08 Robert Millan <rmh@aybabtu.com>
9062
9063 * disk/raid.c: Update copyright.
9064 * fs/cpio.c: Likewise.
9065 * include/grub/raid.h: Likewise.
9066 * loader/i386/pc/multiboot.c: Likewise.
9067 * util/hostfs.c: Likewise.
9068
5626aee1 90692008-02-08 Robert Millan <rmh@aybabtu.com>
9070
9071 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9072 to a grub_disk_t array.
9073 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9074 `device[x]'.
9075 (grub_raid_scan_device): Replace `device[x].name' accesses with
9076 `device[x]->name'. Simplify initialization of `array->device[x]'.
9077
554f0187 90782008-02-08 Robert Millan <rmh@aybabtu.com>
9079
9080 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9081 grub_dprintf() calls.
9082 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9083 error message.
9084
1ec8425d 90852008-02-07 Christian Franke <franke@computer.org>
9086
9087 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9088 instead of fseek and ftell to support large files.
9089 (grub_hostfs_read): Likewise.
9090
f2156fda 90912008-02-07 Robert Millan <rmh@aybabtu.com>
9092
9093 Patch from Jeroen Dekkers.
9094 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 9095 failure, since successfully reading all array members might not be
f2156fda 9096 required.
9097
9216e0e7 90982008-02-06 Robert Millan <rmh@aybabtu.com>
9099
9100 * util/grub-probe.c (probe): Simplify partmap probing (with the
9101 assumption that the first word up to the underscore equals to
9102 the module name).
9103
b0dfd29a 91042008-02-06 Christian Franke <franke@computer.org>
9105
9106 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9107 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9108 last block of a cpio or tar stream.
9109 Check for "TRAILER!!!" instead of any empty data
9110 block to detect last block of a cpio stream.
9111 (grub_cpio_dir): Fix constness of variable np.
9112 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9113 cpio or tar trailer is detected. This fixes a crash
9114 on open of a non existing file.
9115
c32865bf 91162008-02-05 Bean <bean123ch@gmail.com>
9117
9118 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9119 address of entry.
9120 (grub_multiboot_load_elf64): Likewise.
9121 (grub_multiboot): Initialize mbi structure.
9122
9123 * util/grub-fstest.c: Don't include unused header file script.h.
9124
fe6b695a 9125 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 9126 of file.
9127 (grub_fstest_SOURCES): Likewise.
9128
409480b7 91292008-02-05 Robert Millan <rmh@aybabtu.com>
9130
9131 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9132 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9133 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9134 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9135
9136 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9137 (translation_table): Replace hardcoded values with macros
9138 provided by `<grub/term.h>'.
9139
9140 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9141 (keyboard_map): Correct/add a few values, with macros provided
9142 by `<grub/term.h>'.
9143 (keyboard_map_shift): Zero values that don't differ from their
9144 `keyboard_map' equivalents.
9145 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9146 Discard the second scan code that is always sent by Caps lock.
9147 Only use `keyboard_map_shift' when it provides a non-zero value,
9148 otherwise fallback to `keyboard_map'.
9149
99fadbaa 91502008-02-04 Bean <bean123ch@gmail.com>
9151
9152 * Makefile.in (enable_grub_fstest): New variable.
9153
9154 * conf/common.rmk (grub_fstest_init.lst): New rule.
9155 (grub_fstest_init.h): Likewise.
9156 (grub_fstest_init.c): Likewise.
9157 (util/grub-fstest.c_DEPENDENCIES): New variable.
9158 (grub_fstest_SOURCES): Likewise.
9159
9160 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9161
9162 * util/grub-fstest.c: New file.
9163
bf567c50 91642008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9165
9166 Make grub-setup handle a separate root device.
f19dbdb7 9167
bf567c50 9168 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9169 so that the root device can be compared with the destination
9170 device.
9171 When embedding the core image, if the root and destination devices
9172 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9173 0xFF.
9174 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 9175
9be6b98b 91762008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9177
9178 Add support for having a grub directory in a different drive. This
9179 is still only the data handling part.
f19dbdb7 9180
9be6b98b 9181 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9182 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9183 (grub_root_drive): New variable.
9184
9185 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9186 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9187 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9188 as it was.
9189
9190 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9191
9192 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9193 macro.
9194 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9195
9196 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9197 is bogus, because PXE booting does not specify any drive
9198 correctly.
9199
9200 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9201 am not sure if this is really correct.
9202
9203 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9204 is always identical to the boot drive when booting from a CD.
9205
9206 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9207 longer.
9208 (root_drive): New variable.
9209 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9210 (setup_sectors): Push %dx right after popping it, because %dh will
9211 be modified later.
9212 (copy_buffer): Restore %dx.
9213
e0ca0677 92142008-02-03 Robert Millan <rmh@aybabtu.com>
9215
9216 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9217 use `cdboot.img' for cdrom images.
9218
3b3f6629 92192008-02-03 Robert Millan <rmh@aybabtu.com>
9220
9221 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9222 only setup gfxterm when `font' command has succeeded.
9223
d42b3672 92242008-02-03 Robert Millan <rmh@aybabtu.com>
9225
9226 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9227 (grub_rescue_cmd_multiboot_loader)
9228 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9229
fa370ea6 92302008-02-03 Pavel Roskin <proski@gnu.org>
9231
e0c5dacb 9232 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 9233 %edx and %esi from stack only after grub_gate_a20() is called.
9234 grub_gate_a20() clobbers %edx.
9235
f2a76e1d 92362008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9237
9238 * configure.ac (AC_INIT): Bumped to 1.96.
9239
9240 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9241 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9242 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9243 video/readers/png.c.
9244
90fd32d1 92452008-02-03 Bean <bean123ch@gmail.com>
9be665dd 9246
9247 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9248 (cdboot_img_SOURCES): New variable.
9249 (cdboot_img_ASFLAGS): New variable.
9250 (cdboot_img_LDFLAGS): New variable.
9251
9252 * boot/i386/pc/cdboot.S: New file.
9253
9254 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9255 (cd_count): Likewise.
9256 (grub_biosdisk_get_drive): Add support for cd device.
9257 (grub_biosdisk_call_hook): Likewise.
9258 (grub_biosdisk_iterate): Likewise.
9259 (grub_biosdisk_open): Likewise.
9260 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9261 (grub_biosdisk_rw): Support reading from cd device.
9262 (GRUB_MOD_INIT): Iterate cd devices.
9263
9264 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9265 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9266 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9267
9268 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9269
4020aa53 92702008-02-02 Robert Millan <rmh@aybabtu.com>
9271
9272 * commands/read.c: New file.
9273 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9274 (read_mod_SOURCES): New variable.
9275 (read_mod_CFLAGS): Likewise.
9276 (read_mod_LDFLAGS): Likewise.
9277
e03a1132 92782008-02-02 Robert Millan <rmh@aybabtu.com>
9279
9280 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9281 determining whether menu has to be displayed.
9282
58c69220 92832008-02-02 Marco Gerards <marco@gnu.org>
9284
9285 * bus/pci.c: New file.
9286
9287 * include/grub/pci.h: Likewise.
9288
9289 * include/grub/i386/pc/pci.h: Likewise.
9290
9291 * commands/lspci.c: Likewise.
9292
9293 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9294 `lspci.mod'.
9295 (pci_mod_SOURCES): New variable.
9296 (pci_mod_CFLAGS): Likewise.
9297 (pci_mod_LDFLAGS): Likewise.
9298 (lspci_mod_SOURCES): Likewise.
9299 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 9300 (lspci_mod_LDFLAGS): Likewise.
58c69220 9301
c004e1b4 93022008-02-02 Bean <bean123ch@gmail.com>
9303
9304 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9305 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9306
9307 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9308 (grub_xfs_btree_node): New structure.
9309 (grub_xfs_btree_root): New structure.
9310 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9311 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9312 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9313 (GRUB_XFS_EXTENT_SIZE): Likewise.
9314 (grub_xfs_read_block): Support btree format type.
9315 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9316 Use directory block as basic unit.
9317
9318 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9319
9320 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9321 __attribute__ ((__regparm__ (1))).
9322
f95562bf 93232008-02-01 Robert Millan <rmh@aybabtu.com>
9324
9325 Correct a mistake in previous commit.
9326
9327 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9328 top.
9329 (normal/command.c_DEPENDENCIES): New variable.
9330
7d31f41f 93312008-02-01 Robert Millan <rmh@aybabtu.com>
9332
9333 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9334 top.
9335 (normal/command.c_DEPENDENCIES): New variable.
9336 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9337 * conf/i386-ieee1275.rmk: Likewise.
9338 * conf/i386-linuxbios.rmk: Likewise.
9339 * conf/i386-pc.rmk: Likewise.
9340 * conf/sparc64-ieee1275.rmk: Likewise.
9341 * conf/powerpc-ieee1275.rmk: Likewise.
9342 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9343
9344 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9345
60b6be74 93462008-02-01 Robert Millan <rmh@aybabtu.com>
9347
9348 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9349 call at beginning of function.
9350
078522ab 93512008-01-31 Pavel Roskin <proski@gnu.org>
9352
9353 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 9354 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9355 (grub_mkrescue_SOURCES): Likewise.
078522ab 9356 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9357
ccaa8a5f 93582008-01-30 Robert Millan <rmh@aybabtu.com>
9359
9360 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9361 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9362 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9363 (grub_probe_SOURCES): ... to here.
9364
9365 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9366 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9367 * conf/i386-ieee1275.rmk: Likewise.
9368 * conf/i386-linuxbios.rmk: Likewise.
9369 * conf/powerpc-ieee1275.rmk: Likewise.
9370
ae5a9cd7 93712008-01-30 Tristan Gingold <gingold@free.fr>
9372
9373 * kern/rescue.c: Silently accept empty lines.
9374
70bc2ef2 93752008-01-29 Bean <bean123ch@gmail.com>
9376
9377 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9378 (real_code_2): Code cleanup and change comment style.
9379 (move_memory): Avoid using 32-bit address mode.
9380
6a4d50ea 93812008-01-29 Bean <bean123ch@gmail.com>
9382
9383 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9384 (png_mod_SOURCES): New variable.
9385 (png_mod_CFLAGS): Likewise.
9386 (png_mod_LDFLAGS): Likewise.
9387
9388 * video/readers/png.c: New file.
9389
11cc30ac 93902008-01-28 Robert Millan <rmh@aybabtu.com>
9391
9392 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9393 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9394 `ifndef GRUB_MOD_GAP' hack.
9395 * util/elf/grub-mkimage.c (add_segments): Likewise.
9396
3abc589f 93972008-01-27 Robert Millan <rmh@aybabtu.com>
9398
9399 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9400 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 9401 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 9402
e1907778 94032008-01-27 Robert Millan <rmh@aybabtu.com>
9404
9405 Get grub-emu to build again (including parallel builds).
9406
9407 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9408 Split into ...
9409 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9410 (normal/execute.c_DEPENDENCIES): ... this, ...
9411 (grub-emu_DEPENDENCIES): ... and this.
9412
9413 * conf/i386-efi.rmk: Likewise.
9414 * conf/i386-linuxbios.rmk: Likewise.
9415 * conf/i386-ieee1275.rmk: Likewise.
9416 * conf/powerpc-ieee1275.rmk: Likewise.
9417 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9418
2216b101 94192008-01-27 Robert Millan <rmh@aybabtu.com>
9420
9421 * NEWS: Add a few items.
9422
f75172d9 94232008-01-27 Robert Millan <rmh@aybabtu.com>
9424
9425 Fix parallel builds with grub-emu. Based on earlier commit for
9426 grub-probe and grub-setup.
9427
9428 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9429 (util/grub-emu.c_DEPENDENCIES): ... this.
9430 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9431 (util/grub-emu.c_DEPENDENCIES): ... this.
9432 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9433 (util/grub-emu.c_DEPENDENCIES): ... this.
9434 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9435 (util/grub-emu.c_DEPENDENCIES): ... this.
9436 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9437 (util/grub-emu.c_DEPENDENCIES): ... this.
9438
3f51de77 94392008-01-27 Pavel Roskin <proski@gnu.org>
9440
9441 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9442 to create a gap between _end and the modules added to the image
9443 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9444 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9445 * util/elf/grub-mkimage.c (add_segments): Likewise.
9446
2033f53e 94472008-01-26 Pavel Roskin <proski@gnu.org>
9448
9449 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9450 just return an error.
9451
22da1f6f 94522008-01-26 Bean <bean123ch@gmail.com>
9453
9454 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9455 (grub_reiserfs_get_item): Save offset of the next item.
9456 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9457
2a9525e6 94582008-01-25 Robert Millan <rmh@aybabtu.com>
9459
9460 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9461 make all filesystem sources appear together (possibly fixing omissions
9462 while at it).
9463 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9464 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9465 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9466 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9467
9468 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9469 add `kern/file.c'.
9470 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9471 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9472 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9473 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9474
9475 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9476 (probe): Add a sanity check to make sure of our ability to read
9477 requested files when probing for filesystem type.
9478
9479 * genmk.rb: Update copyright year (2007).
9480
9481 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9482 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9483 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9484 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9485 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9486 : Remove function prototypes.
9487
b95f71b5 94882008-01-25 Robert Millan <rmh@aybabtu.com>
9489
9490 Revert my previous commits (based on wrong assumption of how grub_errno
9491 works).
9492
fe6b695a 9493 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 9494 * kern/file.c (grub_file_open): Likewise.
9495
d08bbb49 94962008-01-24 Pavel Roskin <proski@gnu.org>
9497
9498 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9499 that hang if GRUB tries to setup colors.
9500 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9501 colors for firmwares that don't support it.
9502 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9503 Recognize Open Hack'Ware, set flags to work around its
9504 limitations.
9505
605e36ed 95062008-01-24 Robert Millan <rmh@aybabtu.com>
9507
9508 * kern/file.c (grub_file_open): Do not account previous failures of
9509 unrelated functions when grub_errno is checked for.
9510 Reported by Oleg Strikov.
9511
bac332a1 95122008-01-24 Bean <bean123ch@gmail.com>
9513
9514 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9515 (grub_ufs_sblock): New member volume name.
9516 (grub_ufs_find_file): Fix string copy bug.
9517 (grub_ufs_label): Implement this function properly.
9518
9519 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9520 (grub_hfs_iterate_records): Use the correct file number for extents
9521 and catalog file. Fix problem in next index calculation.
9522 (grub_hfs_find_node): Replace recursive function call with loop.
9523 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9524
15c80c09 95252008-01-23 Robert Millan <rmh@aybabtu.com>
9526
9527 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9528 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9529 (grub_multiboot2_real_boot): New function prototype.
9530
9531 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9532 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9533
9534 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9535 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9536
305338fd 95372008-01-23 Robert Millan <rmh@aybabtu.com>
9538
9539 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9540 #ifdef'ed out grub_printf().
9541
3ea52685 95422008-01-23 Robert Millan <rmh@aybabtu.com>
9543
9544 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9545 grub_dprintf calls, since they make "debug=all" mode unusable.
9546 (grub_console_checkkey): Likewise.
9547
5882ae4b 95482008-01-23 Robert Millan <rmh@aybabtu.com>
9549
9550 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9551 `term/i386/pc/at_keyboard.c'.
9552 (pkglib_MODULES): Add `serial.mod'.
9553 (serial_mod_SOURCES): New variable.
9554 (serial_mod_CFLAGS): Likewise.
9555 (serial_mod_LDFLAGS): Likewise.
9556
9557 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9558 `<grub/powerpc/ieee1275/console.h>'.
9559 (grub_keyboard_controller_init): New function prototype.
9560 (grub_console_checkkey): Likewise.
9561 (grub_console_getkey): Likewise.
9562
9563 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9564 keyboard on i386.
9565
9566 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9567 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9568
06ab5303 95692008-01-23 Robert Millan <rmh@aybabtu.com>
9570
9571 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9572 present, "(memdisk)/boot/grub" becomes the default prefix.
9573
9574 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9575 a memdisk tarball with all the modules. Add --overlay=DIR option that
9576 allows users to overlay additional files into the image.
9577
dbb475a4 95782008-01-23 Robert Millan <rmh@aybabtu.com>
9579
9580 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9581 and `machine/memory.h'.
9582 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9583 (_multiboot_mod_SOURCES): New variable.
9584 (_multiboot_mod_CFLAGS): Likewise.
9585 (_multiboot_mod_LDFLAGS): Likewise.
9586 (multiboot_mod_SOURCES): Likewise.
9587 (multiboot_mod_CFLAGS): Likewise.
9588 (multiboot_mod_LDFLAGS): Likewise.
9589
9590 * include/grub/i386/ieee1275/loader.h: New file.
9591
9592 * include/grub/i386/ieee1275/machine.h: Likewise.
9593
9594 * include/grub/i386/ieee1275/memory.h: Likewise.
9595
9596 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9597 variable declaration.
9598 (grub_os_area_size): Likewise.
9599
9600 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9601 (grub_lower_mem, grub_upper_mem): New variables.
9602 (grub_stop_floppy): New function (just to make
9603 grub_multiboot2_real_boot() happy).
9604
9605 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9606 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9607 (grub_stop): New function.
9608 Include `"../realmode.S"' and `"../loader.S"'.
9609
9610 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9611 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9612
9613 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9614 rely on grub_multiboot2_real_boot() for final boot.
9615
25638629 96162008-01-22 Robert Millan <rmh@aybabtu.com>
9617
9618 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9619 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9620 device that doesn't look like an SD card.
9621 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9622 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9623 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9624 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9625 found.
9626
9dad816d 96272008-01-22 Robert Millan <rmh@aybabtu.com>
9628
9629 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9630 avoid claiming over our own code.
9631
34842f2d 96322008-01-22 Bean <bean123ch@gmail.com>
9633
9634 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9635 (jpeg_mod_SOURCES): New variable.
9636 (jpeg_mod_CFLAGS): Likewise.
9637 (jpeg_mod_LDFLAGS): Likewise.
9638
9639 * video/readers/jpeg.c : New file.
9640
44023a28 96412008-01-22 Bean <bean123ch@gmail.com>
9642
9643 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9644 there are no more items.
9645
bc2d8ac6 96462008-01-21 Robert Millan <rmh@aybabtu.com>
9647
9648 * kern/mm.c (grub_mm_init_region): Improve debug message.
9649
261bd4bc 96502008-01-21 Robert Millan <rmh@aybabtu.com>
9651
9652 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9653 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9654 address.
9655 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9656 a C macro.
9657 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9658 Indicates start of upper memory.
9659 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9660 (generate_image): Abort when image size is big enough to corrupt
9661 upper memory.
9662
9663 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9664 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9665 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9666 instead of hardcoding 0xA0000.
9667 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9668 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9669 instead of hardcoding 0xA0000.
9670
f970b55e 96712008-01-21 Robert Millan <rmh@aybabtu.com>
9672
9673 * disk/memdisk.c (memdisk_size): New variable.
9674 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9675 `memdisk_size'.
9676 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9677 image to dynamic memory.
9678 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9679 `memdisk_size'. Free memdisk block.
9680
1a8b0526 96812008-01-21 Robert Millan <rmh@aybabtu.com>
9682
9683 Fix detection of very small filesystems (like tar).
9684
9685 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9686 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9687 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9688 a problem with this disk).
9689
6e9b4aab 96902008-01-21 Robert Millan <rmh@aybabtu.com>
9691
9692 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9693 on grub_biosdisk_rw_standard() error.
9694
0d8837b2 96952008-01-21 Robert Millan <rmh@aybabtu.com>
9696
9697 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9698 recent changes.
9699 * kern/elf.c: Likewise.
9700 * kern/ieee1275/ieee1275.c: Likewise.
9701 * kern/powerpc/ieee1275/openfw.c: Likewise.
9702 * term/ieee1275/ofconsole.c: Likewise.
9703
ffd36e34 97042008-01-21 Robert Millan <rmh@aybabtu.com>
9705
9706 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9707
3f0093d0 9708 * include/grub/kernel.h (grub_arch_memdisk_addr)
9709 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 9710
3f0093d0 9711 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9712 (grub_arch_memdisk_size): ... to here.
ffd36e34 9713
6c391b21 97142008-01-21 Robert Millan <rmh@aybabtu.com>
9715
9716 Mostly based on bugfix from Bean.
9717
9718 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9719 attribute with hook() parameter.
9720 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9721 declaration.
9722 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9723 attribute with hook() parameter.
9724 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9725 declaration.
9726
55a581dc 97272008-01-21 Robert Millan <rmh@aybabtu.com>
9728
9729 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9730 (pkglib_MODULES): Add `memdisk.mod'.
9731 (memdisk_mod_SOURCES): New variable.
9732 (memdisk_mod_CFLAGS): Likewise.
9733 (memdisk_mod_LDFLAGS): Likewise.
9734
9735 * disk/memdisk.c: New file.
9736
9737 * include/grub/disk.h (grub_disk_dev_id): Add
9738 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9739
9740 * include/grub/i386/pc/kernel.h
9741 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9742 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9743 (grub_kernel_image_size): New variable declaration.
9744 (grub_total_module_size): Likewise.
9745 (grub_memdisk_image_size): Likewise.
9746
9747 * include/grub/i386/pc/memory.h
9748 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9749
9750 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9751 (grub_arch_memdisk_addr): New variable declaration.
9752 (grub_arch_memdisk_size): Likewise.
9753
9754 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9755 (grub_arch_memdisk_size): Likewise.
9756
9757 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9758 (codestart): Replace hardcoded `0x100000' with
9759 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9760
9761 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9762 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9763 not NULL, append the contents of the file it refers to, at the end of
9764 the compressed kernel image. Initialize `grub_memdisk_image_size'
9765 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9766 (options): Add "memdisk"|'m' option.
9767 (main): Parse --memdisk|-m option, and pass user-provided path as
9768 parameter to generate_image().
9769
3d7f54c9 97702008-01-20 Robert Millan <rmh@aybabtu.com>
9771
9772 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9773 grub_dprintf() calls from here ...
9774 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9775
0bf74728 97762008-01-20 Robert Millan <rmh@aybabtu.com>
9777
9778 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9779
9780 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9781 declaration.
9782 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9783 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9784 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 9785 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 9786 property).
9787 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9788 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9789
33bf70a7 97902008-01-19 Robert Millan <rmh@aybabtu.com>
9791
fe6b695a 9792 Get rid of confusing function (superseded by
33bf70a7 9793 `grub_ieee1275_get_integer_property')
9794 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9795 prototype.
9796 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9797 function.
9798 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9799 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 9800 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 9801
e2da7d26 98022008-01-19 Robert Millan <rmh@aybabtu.com>
9803
9804 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9805 command after "shut-down", since implementations differ on which
9806 the command for halt is.
9807
59f1fd8d 98082008-01-19 Robert Millan <rmh@aybabtu.com>
9809
9810 * include/grub/i386/linuxbios/console.h: Add header protection.
9811 (grub_keyboard_controller_init): New function prototype.
9812 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9813 (KEYBOARD_COMMAND_READ): Likewise.
9814 (KEYBOARD_COMMAND_WRITE): Likewise.
9815 (KEYBOARD_SCANCODE_SET1): Likewise.
9816 (grub_keyboard_controller_write): New function.
9817 (grub_keyboard_controller_read): Likewise.
9818 (grub_keyboard_controller_init): Likewise.
9819
9820 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9821 (grub_console_init): On coreboot/LinuxBIOS, call
9822 grub_keyboard_controller_init().
9823
5f5a7c15 98242008-01-19 Robert Millan <rmh@aybabtu.com>
9825
9826 PowerPC changes provided by Pavel Roskin.
9827
9828 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9829 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9830 don't rely on cmain() doing it.
9831 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9832 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9833
1210e168 98342008-01-16 Robert Millan <rmh@aybabtu.com>
9835
9836 * include/grub/i386/linuxbios/memory.h
9837 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9838 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9839 receive `table_header' as argument. Instead, probe for it in the
9840 known memory ranges where it can be present.
9841 (grub_available_iterate): Do not pass a fixed `table_header' address
9842 to grub_linuxbios_table_iterate().
9843
3d04eab8 98442008-01-15 Robert Millan <rmh@aybabtu.com>
9845
9846 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9847 * conf/i386-ieee1275.rmk: New file.
9848 * include/grub/i386/ieee1275/console.h: Likewise.
9849 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9850 * include/grub/i386/ieee1275/kernel.h: Likewise.
9851 * include/grub/i386/ieee1275/time.h: Likewise.
9852 * kern/i386/ieee1275/init.c: Likewise.
9853 * kern/i386/ieee1275/startup.S: Likewise.
9854
d1bc1b73 98552008-01-15 Robert Millan <rmh@aybabtu.com>
9856
9857 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9858 when pointers are 32-bit (but still do set it to one when they are
9859 64-bit).
9860
66a65807 98612008-01-15 Robert Millan <rmh@aybabtu.com>
9862
9863 * include/grub/ieee1275/ieee1275.h
9864 (grub_ieee1275_get_integer_property): New function prototype.
9865
9866 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9867 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 9868 grub_ieee1275_get_property() to handle endianness.
66a65807 9869
9870 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9871 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 9872 where appropriate.
66a65807 9873 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9874 (grub_map): Likewise.
9875 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9876
a83ccafd 98772008-01-15 Bean <bean123ch@gmail.com>
9878
9879 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9880 (grub_script_execute_cmdline): Reset grub_errno.
9881
9882 * normal/main.c (read_config_file): Reset grub_errno.
9883
9884 * normal/parse.y (script_init): New.
9885 (script): Move function and menuentry here.
9886 (delimiter): New.
9887 (command): Add delimiter at the end of command.
9888 (commands): Adjust to match the new command.
9889 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 9890 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 9891 (if): Use the new commands.
9892
9893 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9894
df6ecfc6 98952008-01-15 Robert Millan <rmh@aybabtu.com>
9896
9897 * normal/menu.c (run_menu): Move timeout message from here ...
9898 (print_timeout): ... to here.
9899 (run_menu): Use print_timeout() once during initial draw to print
9900 the whole message, and again in every clock tick to update only
9901 the number of seconds.
9902
87ae25eb 99032008-01-15 Robert Millan <rmh@aybabtu.com>
9904
9905 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9906 actual size of `available' from grub_ieee1275_get_property(), and
9907 restrict parsing to that bound.
9908
47bf09a4 99092008-01-15 Christian Franke <franke@computer.org>
9910
9911 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9912 (argp_program_version): Remove variable.
9913 (argp_program_bug_address): Likewise.
9914 (options): Convert from struct argp_option to struct option.
9915 (struct arguments): Remove.
9916 (parse_opt): Remove.
9917 (usage): New function.
9918 (main): Replace struct args members by simple variables.
9919 Replace argp_parse() by getopt_long().
9920 Add switch to evaluate options.
9921 Add missing "(...)" around root_dev in prefix string.
9922
c86f1469 99232008-01-14 Robert Millan <rmh@aybabtu.com>
9924
9925 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9926 for grub_ieee1275_exit(), in order to improve portability.
9927
e622c559 99282008-01-14 Robert Millan <rmh@aybabtu.com>
9929
9930 * util/grub.d/10_linux.in (prefix): Define.
9931 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9932
44cb1ec8 99332008-01-13 Pavel Roskin <proski@gnu.org>
9934
9935 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9936 grub_errno if no errors have been detected.
9937
1eb8c802 99382008-01-12 Robert Millan <rmh@aybabtu.com>
9939
9940 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9941 (grub_util_get_dev_abstraction): New function prototype.
9942
9943 * util/getroot.c: Include `<grub/util/getroot.h>'
9944 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9945 (grub_util_get_dev_abstraction): ... here (new function).
9946
9947 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9948 `PRINT_ABSTRACTION'.
9949 (probe): Probe for abstraction type when requested.
9950 (main): Understand `--target=abstraction'.
9951
9952 * util/i386/efi/grub-install.in: Add abstraction module to core
9953 image when it is found to be necessary.
9954 * util/i386/pc/grub-install.in: Likewise.
9955 * util/powerpc/ieee1275/grub-install.in: Likewise.
9956
9957 * util/update-grub_lib.in (font_path): Return system path without
9958 converting to GRUB path.
9959 * util/update-grub.in: Convert system path returned by font_path()
9960 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9961 abstraction module is needed for loading fonts (if any). Export
9962 that as `GRUB_PRELOAD_MODULES'.
9963 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9964 insmod commands).
9965
52bd3de9 99662008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9967
9968 Remove some unused code from reiserfs.
f19dbdb7 9969
52bd3de9 9970 * fs/reiserfs.c (struct grub_reiserfs_key)
9971 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9972 (struct grub_reiserfs_node_body): Removed.
9973 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9974 Likewise.
9975 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9976 Likewise.
9977 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9978 Likewise.
9979 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9980 Likewise.
9981 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9982 Likewise.
9983 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9984 Likewise.
9985 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9986 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9987 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9988
2f80039d 99892008-01-10 Robert Millan <rmh@aybabtu.com>
9990
9991 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9992 Determines if a file is garbage left by packaging systems, etc.
9993 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9994 for processing /etc/grub.d scripts.
9995 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9996 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9997 as a condition for processing Linux images.
9998
87888032 99992008-01-10 Pavel Roskin <proski@gnu.org>
10000
10001 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
10002 to compile reiserfs.c on PowerPC.
10003
7e54fced 100042008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 10005
10006 * kern/device.c (grub_device_iterate): Do not abort device iteration
10007 when one of the devices cannot be opened.
10008 * kern/disk.c (grub_disk_open): Do not account previous failures of
10009 unrelated functions when grub_errno is checked for.
10010
5aa541e6 100112008-01-08 Robert Millan <rmh@aybabtu.com>
10012
10013 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10014 `! grub_linux_is_bzimage', change order of address comparison to make
10015 it more intuitive, and improve "too big zImage" error message.
10016
7076340d 100172008-01-08 Robert Millan <rmh@aybabtu.com>
10018
10019 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10020 `$(update-grub_DATA)'.
10021 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10022 targets.
10023
9ca70333 100242008-01-07 Robert Millan <rmh@aybabtu.com>
10025
10026 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10027 which instruction is modified by grub-setup during installation
10028 (since it wasn't obvious by only looking at this file).
10029
38ccf575 100302008-01-07 Robert Millan <rmh@aybabtu.com>
10031
10032 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
10033 listing actual TODO items.
10034
f5db4291 100352008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10036
868967cf 10037 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10038 correctly.
10039 (grub_reiserfs_get_key_offset): Likewise.
10040 (grub_reiserfs_set_key_offset): Likewise.
10041 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 10042 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 10043
10044 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10045 better to remove the bitfield version completely.
f19dbdb7 10046
868967cf 100472008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10048
f5db4291 10049 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10050 allocated from the heap, due to the fshelp implementation.
10051 (grub_reiserfs_dir): Free NODE, due to the same reason.
10052
492e6d9d 100532008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10054
10055 Mostly from Vincent Pelletier:
f19dbdb7 10056
492e6d9d 10057 * fs/reiserfs.c: New file.
f19dbdb7 10058
492e6d9d 10059 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10060 (reiserfs_mod_SOURCES): New variable.
10061 (reiserfs_mod_CFLAGS): Likewise.
10062 (reiserfs_mod_LDFLAGS): Likewise.
10063
10064 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10065 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10066 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10067 normal/color.c.
10068
9ce3e7c1 100692008-01-06 Robert Millan <rmh@aybabtu.com>
10070
10071 * normal/color.c: Remove `<grub/env.h>'.
10072
f3b58148 100732008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10074
10075 * include/grub/normal.h: Include <grub/env.h>.
10076
7ac3bcfa 100772008-01-05 Robert Millan <rmh@aybabtu.com>
10078
10079 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10080 usage example with `(hd0,1)'.
fb358190 10081 Reported by Samuel Thibault.
7ac3bcfa 10082
c8ee99d7 100832008-01-05 Robert Millan <rmh@aybabtu.com>
10084
10085 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10086 (grub_linux_boot_zimage): Rename to ...
10087 (grub_linux_boot): ... this.
10088 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10089 (grub_linux_boot_zimage): Conditionalize zImage copy.
10090
10091 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10092 (grub_linux_boot_bzimage): Remove prototype.
10093 (grub_linux_boot_zimage): Rename to ...
10094 (grub_linux_boot): ... this.
10095
10096 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10097 (grub_linux_boot): Remove function.
10098
0ece25b1 100992008-01-05 Robert Millan <rmh@aybabtu.com>
10100
10101 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10102 (grub_env_write_color_highlight): Likewise.
10103 (grub_wait_after_message): Likewise.
10104
10105 * normal/color.c: New file.
10106
10107 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10108 (normal_mod_DEPENDENCIES): Likewise.
10109
10110 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10111 (normal_mod_DEPENDENCIES): Likewise.
10112
10113 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10114 (normal_mod_DEPENDENCIES): Likewise.
10115
10116 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10117 (normal_mod_DEPENDENCIES): Likewise.
10118
10119 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10120 for waiting after a message is printed.
10121 * normal/main.c (read_config_file): Likewise.
10122 (grub_normal_init): Register grub_env_write_color_normal() and
10123 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10124 `color_highlight' variables as global.
10125
10126 * normal/menu.c (grub_wait_after_message): New function.
10127 (grub_color_menu_normal): New variable. Replaces ...
10128 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10129 (grub_color_menu_highlight): New variable. Replaces ...
10130 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10131 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10132 `GRUB_TERM_COLOR_STANDARD'.
10133 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10134 `normal_code' and `highlight_code' to `old_color_normal' and
10135 `old_color_highlight', respectively.
10136 (grub_menu_init_page): Update colors when drawing the menu, based on
10137 `menu_color_normal' and `menu_color_highlight' variables.
10138 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10139 a message is printed.
10140
182dd4e5 101412008-01-05 Robert Millan <rmh@aybabtu.com>
10142
10143 * kern/env.c (grub_env_context_open): Propagate hooks for global
10144 variables to new context.
10145
10146 * kern/main.c (grub_set_root_dev): Export `root' variable.
10147
ddf8f6ad 101482008-01-05 Robert Millan <rmh@aybabtu.com>
10149
10150 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 10151 discs unconditionally, since udev and others have options to provide
ddf8f6ad 10152 them.
10153
d8b43d9b 101542008-01-05 Robert Millan <rmh@aybabtu.com>
10155
10156 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10157
2bff2de3 101582008-01-04 Christian Franke <franke@computer.org>
10159
10160 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10161 of eisa_mmap.
10162
97eab917 101632008-01-03 Pavel Roskin <proski@gnu.org>
10164
10165 * kern/i386/linuxbios/init.c: Put "void" to all function
10166 declarations with no arguments.
10167 * kern/powerpc/ieee1275/init.c: Likewise.
10168 * term/i386/pc/at_keyboard.c: Likewise.
10169 * term/i386/pc/vga_text.c: Likewise.
10170 * util/grub-mkdevicemap.c: Likewise.
10171
b9416d00 101722008-01-02 Robert Millan <rmh@aybabtu.com>
10173
10174 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10175 message when loaded image is out of bounds.
10176 (grub_multiboot_load_elf64): Likewise.
10177
92695df9 101782008-01-02 Pavel Roskin <proski@gnu.org>
10179
10180 * util/grub.d/10_linux.in: Try version without ".old" when
10181 looking for initrd. It's better to use initrd from the newer
10182 kernel of the same version than no initrd at all.
10183
d98d9cad 101842008-01-01 Robert Millan <rmh@aybabtu.com>
10185
10186 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10187
dbfdce36 101882008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10189
f19dbdb7 10190 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 10191 grub_video_get_active_render_target.
10192 (grub_video_adapter): Added unmap_color and get_active_render_target.
10193
f19dbdb7 10194 * video/video.c: Added grub_video_unmap_color and
dbfdce36 10195 grub_video_get_active_render_target.
10196 (grub_video_get_info): Changed method to accept NULL pointer as an
10197 argument to allow detection of active video adapter.
10198
10199 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10200 grub_video_vbe_unmap_color_int.
10201 Added grub_video_vbe_unmap_color and
10202 grub_video_vbe_get_active_render_target.
10203 (grub_video_vbe_adapter): Added unmap_color and
10204 get_active_render_target.
10205
f19dbdb7 10206 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 10207 with grub_video_vbe_unmap_color_int.
10208
10209 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10210 (DEFAULT_NORMAL_COLOR): Likewise.
10211 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10212 (DEFAULT_FG_COLOR): Removed.
10213 (DEFAULT_BG_COLOR): Likewise.
10214 (DEFAULT_CURSOR_COLOR): Changed value.
10215 (grub_virtual_screen): Added standard_color_setting,
10216 normal_color_setting, highlight_color_setting and term_color.
10217 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10218 (bitmap_width): Added.
10219 (bitmap_height): Likewise.
10220 (bitmap): Likewise.
10221 (set_term_color): Likewise.
10222 (grub_virtual_screen_setup): Changed to use new terminal coloring
10223 settings.
10224 (grub_gfxterm_init): Added init for bitmap.
10225 (grub_gfxterm_fini): Added destroy for bitmap.
10226 (redraw_screen_rect): Updated to use background bitmap and new
10227 terminal coloring.
10228 (scroll_up): Added optimization for case when there is no bitmap.
10229 (grub_gfxterm_cls): Fixed to use correct background color.
10230 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10231 coloring.
10232 (grub_virtual_screen_setcolor): Likewise.
10233 (grub_virtual_screen_getcolor): Added.
10234 (grub_gfxterm_background_image_cmd): Likewise.
10235 (grub_video_term): Added setcolor and getcolor.
10236 (MOD_INIT): Added registration of background_image command.
10237 (MOD_TERM): Added unregistration for background_image command.
10238
c3c20931 102392007-12-30 Pavel Roskin <proski@gnu.org>
10240
10241 * loader/multiboot_loader.c: Fix multiboot command
10242 unregistration. Fix all typos in the word "multiboot".
10243
df266716 102442007-12-29 Pavel Roskin <proski@gnu.org>
94239199 10245
10246 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10247 support for initrd names used in Fedora.
10248
fc6e896c 102492007-12-26 Bean <bean123ch@gmail.com>
10250
10251 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10252 (cpio_mod_SOURCES): New variable.
10253 (cpio_mod_CFLAGS): Likewise.
10254 (cpio_mod_LDFLAGS): Likewise.
10255
10256 * fs/cpio.c: New file.
10257
10258 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10259
10260 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10261
10262 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10263
10264 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10265
533110ad 102662007-12-25 Robert Millan <rmh@aybabtu.com>
10267
10268 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10269 (grub_getcolor): New function.
10270
10271 * kern/term.c (grub_getcolor): New function.
10272 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10273 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10274 (print_entry): Set normal and highlight colors to
10275 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10276 respectively, before printing and restore them to old
10277 values afterwards.
10278 (grub_menu_init_page): Likewise. Fill an additional colored space
10279 that would otherwise be left blank.
10280
10281 * term/efi/console.c (grub_console_getcolor): New function.
10282 (struct grub_console_term.getcolor): New variable.
10283 * term/i386/pc/console.c (grub_console_getcolor): New function.
10284 (struct grub_console_term.getcolor): New variable.
10285 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10286 (struct grub_console_term.getcolor): New variable.
10287
10288 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10289 (struct grub_console_term.setcolor): Remove variable.
10290 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10291 (struct grub_console_term.setcolor): Remove variable.
10292 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10293 (struct grub_console_term.setcolor): Remove variable.
10294 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10295 (struct grub_console_term.setcolor): Remove variable.
10296
4931827f 102972007-12-25 Robert Millan <rmh@aybabtu.com>
10298
10299 * configure.ac: Search for possible unifont.hex locations, and
10300 define UNIFONT_HEX if found.
10301
10302 * Makefile.in (UNIFONT_HEX): Define variable.
10303 (DATA): Rename to ...
10304 (PKGLIB): ... this. Update all users.
10305 (PKGDATA): New variable.
10306 (pkgdata_IMAGES): Rename to ...
10307 (pkglib_IMAGES): ... this. Update all users.
10308 (pkgdata_MODULES): Rename to ...
10309 (pkglib_MODULES): ... this. Update all users.
10310 (pkgdata_PROGRAMS): Rename to ...
10311 (pkglib_PROGRAMS): ... this. Update all users.
10312 (pkgdata_DATA): Rename to ...
10313 (pkglib_DATA): ... this. Update all users.
10314 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10315 (unicode.pff, ascii.pff): New rules.
10316 (all-local): Add `$(PKGDATA)' dependency.
10317 (install-local): Process `$(PKGDATA)'.
10318
10319 * util/update-grub_lib.in (font_path): Search for *.pff files in
10320 a few more locations, including `${pkgdata}'.
10321
57e57e31 103222007-12-23 Robert Millan <rmh@aybabtu.com>
10323
10324 Patch from Bean <bean123ch@gmail.com>:
10325 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10326 `size'.
10327
4bc72aa9 103282007-12-21 Bean <bean123ch@gmail.com>
10329
10330 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10331 (ntfscomp_mod_SOURCES): New variable.
10332 (ntfscomp_mod_CFLAGS): Likewise.
10333 (ntfscomp_mod_LDFLAGS): Likewise.
10334
10335 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10336 (grub_probe_SOURCES): Likewise.
10337 (grub_emu_SOURCES): Likewise.
10338
10339 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10340 (grub_emu_SOURCES): Likewise.
10341
10342 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10343 (grub_emu_SOURCES): Likewise.
10344
10345 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10346 (grub_emu_SOURCES): Likewise.
10347
10348 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10349 (read_run_list): Renamed to grub_ntfs_read_run_list.
10350 (decomp_nextvcn): Moved to ntfscomp.c.
10351 (decomp_getch): Likewise.
10352 (decomp_get16): Likewise.
10353 (decomp_block): Likewise.
10354 (read_block): Likewise.
10355 (read_data): Partially moved to ntfscomp.c.
10356 (fixup): Change unsigned to grub_uint16_t.
10357 (read_mft): Change unsigned long to grub_uint32_t.
10358 (read_attr): Likewise.
10359 (read_data): Likewise.
10360 (read_run_data): Likewise.
10361 (read_run_list): Likewise.
10362 (read_mft): Likewise.
10363
10364 * fs/ntfscomp.c: New file.
10365
10366 * include/grub/ntfs.h: New file.
10367
af680a87 103682007-12-16 Robert Millan <rmh@aybabtu.com>
10369
10370 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10371 IDE disk check, since Linux is known to support 20 IDE disks.
10372 Reported by Colin Watson.
10373
84be7599 103742007-12-15 Bean <bean123ch@gmail.com>
10375
10376 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10377 (lnxboot_img_SOURCES): New variable.
10378 (lnxboot_img_ASFLAGS): Likewise.
10379 (lnxboot_img_LDFLAGS): Likewise.
10380
10381 * boot/i386/pc/lnxboot.S: New file.
10382
6af9db01 103832007-11-24 Pavel Roskin <proski@gnu.org>
10384
10385 * configure.ac: Test if '--build-id=none' is supported by the
10386 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10387 objcopy to generate incorrect binary files (binutils
10388 2.17.50.0.18-1 as shipped by Fedora 8).
10389 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10390 linking, so that build ID doesn't break the test.
10391
7361cfe6 103922007-11-24 Pavel Roskin <proski@gnu.org>
10393
10394 * include/grub/i386/time.h: use "void" in the argument list
10395 of grub_cpu_idle().
10396 * include/grub/powerpc/time.h: Likewise.
10397 * include/grub/sparc64/time.h: Likewise.
10398
1593e10c 103992007-11-18 Christian Franke <franke@computer.org>
10400
10401 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10402 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10403 This fixes the problem that function keys did not work in grub-emu.
10404
3b8db1a8 104052007-11-18 Christian Franke <franke@computer.org>
10406
10407 * disk/host.c (grub_host_open): Remove attribute unused from
10408 name parameter. Add check for "host". This fixes the problem
10409 that grub-emu does not find partitions.
10410
2e29408d 104112007-11-18 Christian Franke <franke@computer.org>
10412
10413 * util/hostfs.c (is_dir): New function.
10414 (grub_hostfs_dir): Handle missing dirent.d_type case.
10415 (grub_hostfs_read): Add missing fseek().
10416 (grub_hostfs_label): Clear label pointer. This fixes a crash
10417 of grub-emu on "ls (host)".
10418
398cd047 104192007-11-18 Christian Franke <franke@computer.org>
10420
10421 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10422 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10423 to 64 bit boundary by default.
10424
c405c391 104252007-11-18 Bean <bean123ch@gmail.com>
10426
10427 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10428 (hexdump_mod_SOURCES): New variable.
10429 (hexdump_mod_CFLAGS): Likewise.
10430 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 10431
c405c391 10432 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10433
10434 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10435
10436 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10437
10438 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10439
10440 * include/grub/hexdump.h: New file.
10441
10442 * commands/hexdump.c: New file.
10443
5cced7fd 104442007-11-10 Robert Millan <rmh@aybabtu.com>
10445
10446 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10447 in grub_outb() calls.
10448 (beep_on): Likewise.
10449
8b714eb0 104502007-11-10 Christian Franke <franke@computer.org>
10451
10452 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10453 (grub_menu_run): Likewise.
10454
ce0f1839 104552007-11-10 Robert Millan <rmh@aybabtu.com>
10456
10457 * include/grub/i386/efi/machine.h: New file.
10458 * include/grub/i386/linuxbios/machine.h: Likewise.
10459 * include/grub/i386/pc/machine.h: Likewise.
10460 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10461 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10462
10463 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10464 (serial_hw_io_addr): New variable.
10465 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10466 instead of `(unsigned short *) 0x400'.
10467
270c237d 104682007-11-10 Bean <bean123ch@gmail.com>
10469
10470 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10471
a87783bf 104722007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10473
10474 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10475 (vga_mod_SOURCES): Added.
10476 (vga_mod_CFLAGS): Likewise.
10477 (vga_mod_LDFLAGS): Likewise.
10478
10479 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10480 grub_outb() calls.
10481 (set_map_mask): Likewise.
10482 (set_read_map): Likewise.
10483 (set_read_address): Likewise.
10484 (vga_font): Removed variable.
10485 (get_vga_glyph): Removed function.
10486 (invalidate_char): Likewise.
10487 (write_char): Changed to use grub_font_get_glyph() for font
10488 information.
10489 (grub_vga_putchar): Likewise.
10490 (grub_vga_getcharwidth): Likewise.
10491
6433b448 104922007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10493
10494 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10495 flags.
10496 (pxeboot_img_LDFLAGS): Likewise.
10497 (diskboot_img_LDFLAGS): Likewise.
10498 (kernel_img_LDFLAGS): Likewise.
10499
49178511 105002007-11-06 Robert Millan <rmh@aybabtu.com>
10501
10502 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10503 in grub_outb() calls.
10504 (serial_hw_init): Likewise.
10505
53b052de 105062007-11-05 Robert Millan <rmh@aybabtu.com>
10507
10508 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10509 spaces. Skip non-regular files.
10510
5ab33bba 105112007-11-05 Robert Millan <rmh@aybabtu.com>
10512
10513 * kern/disk.c (grub_disk_firmware_fini)
10514 (grub_disk_firmware_is_tainted): New variables.
10515
10516 * include/grub/disk.h (grub_disk_firmware_fini)
10517 (grub_disk_firmware_is_tainted): Likewise.
10518
10519 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10520 (grub_disk_biosdisk_fini): ... to here.
10521 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10522 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10523 is set. Register grub_disk_biosdisk_fini() in
10524 `grub_disk_firmware_fini'.
10525
10526 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10527 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10528 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10529 to finish existing firmware disk interface.
10530
10531 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10532 (ata_mod_SOURCES): New variable.
10533 (ata_mod_CFLAGS): Likewise.
10534 (ata_mod_LDFLAGS): Likewise.
10535
0149ab7c 105362007-11-05 Robert Millan <rmh@aybabtu.com>
10537
10538 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10539 (grub_ata_wait): Reimplement using grub_millisleep().
10540
10541 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10542 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10543
be7ac41e 105442007-11-03 Marco Gerards <marco@gnu.org>
10545
10546 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10547 (CRTC_ADDR_PORT): New macro.
10548 (CRTC_DATA_PORT): Likewise.
10549 (CRTC_CURSOR): Likewise.
10550 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10551 (CRTC_CURSOR_ADDR_LOW): Likewise.
10552 (update_cursor): New function.
10553 (grub_console_real_putchar): Call `update_cursor'.
10554 (grub_console_gotoxy): Likewise.
10555 (grub_console_cls): Set the default color when clearing the
10556 screen.
10557 (grub_console_setcursor): Implemented.
10558
bb06ab2e 105592007-11-03 Marco Gerards <marco@gnu.org>
10560
10561 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10562 become activate.
10563 (grub_ata_pio_write): Likewise.
10564
10565 (grub_atapi_identify): Wait after issuing an ATA command.
10566 (grub_atapi_packet): Likewise.
10567 (grub_ata_identify): Likewise.
10568 (grub_ata_readwrite): Likewise.
10569
cf8f780b 105702007-11-03 Marco Gerards <marco@gnu.org>
10571
10572 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10573 (grub_ata_pio_write): Likewise.
10574 (grub_ata_readwrite): Use `grub_error', instead of
10575 returning `grub_errno'.
10576
ed649e54 105772007-11-03 Marco Gerards <marco@gnu.org>
10578
10579 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10580 grub_ata_pio_write once for every single sector, instead of for
10581 multiple sectors.
10582
ca25d8f0 105832007-10-31 Robert Millan <rmh@aybabtu.com>
10584
10585 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10586
10587 * conf/i386-linuxbios.rmk: New file.
10588
10589 * kern/i386/pc/hardware.c: Likewise.
10590 * term/i386/pc/at_keyboard.c: Likewise.
10591 * term/i386/pc/vga_text.c: Likewise.
10592
10593 * include/grub/i386/linuxbios/boot.h: Likewise.
10594 * include/grub/i386/linuxbios/console.h: Likewise.
10595 * include/grub/i386/linuxbios/init.h: Likewise.
10596 * include/grub/i386/linuxbios/kernel.h: Likewise.
10597 * include/grub/i386/linuxbios/loader.h: Likewise.
10598 * include/grub/i386/linuxbios/memory.h: Likewise.
10599 * include/grub/i386/linuxbios/serial.h: Likewise.
10600 * include/grub/i386/linuxbios/time.h: Likewise.
10601
10602 * kern/i386/linuxbios/init.c: Likewise.
10603 * kern/i386/linuxbios/startup.S: Likewise.
10604 * kern/i386/linuxbios/table.c: Likewise.
10605
e911ecc1 106062007-10-31 Marco Gerards <marco@gnu.org>
10607
10608 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10609 (ata_mod_SOURCES): New variable.
10610 (ata_mod_CFLAGS): Likewise.
10611 (ata_mod_LDFLAGS): Likewise.
10612
10613 * disk/ata.c: New file.
10614
10615 * include/grub/disk.h (grub_disk_dev_id): Add
10616 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 10617
7f66d0e0 106182007-10-31 Robert Millan <rmh@aybabtu.com>
10619
10620 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10621 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10622
10623 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10624 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10625
10626 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10627 `<grub/types.h>'.
10628
10629 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10630
5cd7dd46 106312007-10-27 Robert Millan <rmh@aybabtu.com>
10632
3236ca65 10633 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 10634
2ebfc90f 106352007-10-22 Robert Millan <rmh@aybabtu.com>
10636
10637 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10638 `"../realmode.S"'.
10639 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10640
73fcb0f3 106412007-10-22 Robert Millan <rmh@aybabtu.com>
10642
10643 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10644 (pkgdata_MODULES): Add `biosdisk.mod'.
10645 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10646 variables.
10647
10648 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10649 (grub_biosdisk_init): Replace with ...
10650 (GRUB_MOD_INIT(biosdisk)): ... this.
10651 (grub_biosdisk_fini): Replace with ...
10652 (GRUB_MOD_FINI(biosdisk)): ... this.
10653
10654 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10655 (grub_machine_init): Remove call to grub_biosdisk_init().
10656 (grub_machine_fini): Remove call to grub_machine_fini().
10657
10658 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10659
3381d274 106602007-10-22 Robert Millan <rmh@aybabtu.com>
10661
10662 * include/grub/time.h: New file.
10663 * include/grub/i386/time.h: Likewise.
10664 * include/grub/powerpc/time.h: Likewise.
10665 * include/grub/sparc64/time.h: Likewise.
10666
10667 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10668 instances to ...
10669 (KERNEL_MACHINE_TIME_HEADER): ... this.
10670 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10671 instances to ...
10672 (KERNEL_MACHINE_TIME_HEADER): ... this.
10673 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10674 instances to ...
10675 (KERNEL_MACHINE_TIME_HEADER): ... this.
10676
10677 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10678 (grub_millisleep): New function.
10679 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10680 (grub_millisleep): New function.
10681 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10682 Remove `grub/machine/time.h' include.
10683 (grub_millisleep): New function.
10684 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10685 Remove `grub/machine/time.h' include.
10686 (grub_millisleep): New function.
10687
10688 * include/grub/misc.h (grub_div_roundup): New function.
10689
10690 * kern/misc.c: Include `<grub/time.h>'.
10691 (grub_millisleep_generic): New function.
10692
10693 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10694 Add `time.h'.
10695 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10696 Add `time.h'.
10697 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10698 `machine/time.h'. Add `time.h'.
10699 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10700
a39a0312 107012007-10-21 Robert Millan <rmh@aybabtu.com>
10702
10703 * include/grub/misc.h (grub_max): New function.
10704
2aad70e2 107052007-10-21 Robert Millan <rmh@aybabtu.com>
10706
10707 * util/misc.c (grub_util_info): Call fflush() before returning.
10708
54b71c4b 107092007-10-20 Robert Millan <rmh@aybabtu.com>
10710
10711 * genmk.rb (Image): Copy `extra_flags' from here ...
10712 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10713
10714 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10715 to `argc' and `args' arguments.
10716
a979f513 107172007-10-17 Robert Millan <rmh@aybabtu.com>
10718
10719 * kern/i386/loader.S: New file.
10720
10721 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10722 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10723 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10724 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10725 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10726 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10727 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10728 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10729 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10730 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10731 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10732 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10733 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10734 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10735
10736 * kern/i386/realmode.S: New file.
10737
10738 * kern/i386/pc/startup.S (protstack): Moved from here ...
10739 * kern/i386/realmode.S (protstack)... to here.
10740 * kern/i386/pc/startup.S (gdt): Moved from here ...
10741 * kern/i386/realmode.S (gdt)... to here.
10742 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10743 * kern/i386/realmode.S (prot_to_real)... to here.
10744
10745 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10746 `kern/i386/realmode.S'.
10747
825fc8fd 107482007-10-17 Robert Millan <rmh@aybabtu.com>
10749
10750 * include/grub/i386/loader.h: New file.
10751
10752 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10753 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10754 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10755 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10756 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10757 * include/grub/i386/loader.h (grub_linux_prot_size)
10758 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10759 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10760 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10761 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10762
10763 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10764
e179b2f4 107652007-10-15 Robert Millan <rmh@aybabtu.com>
10766
10767 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10768 filesystem when dev->disk is unset.
10769 Do probe for filesystem even when dev->disk->has_partitions is set.
10770 In case a filesystem is found, always report it.
10771 In case it isn't, if dev->disk->has_partitions is set, report that
10772 a partition table was found instead of reporting that no filesystem
10773 could be identified.
10774
5db82af6 107752007-10-12 Robert Millan <rmh@aybabtu.com>
10776
10777 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10778 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10779
68f6ac74 10780 * include/grub/types.h (grub_host_to_target16): New macro.
10781 (grub_host_to_target32): Likewise.
10782 (grub_host_to_target64): Likewise.
10783 (grub_target_to_host16): Likewise.
10784 (grub_target_to_host32): Likewise.
10785 (grub_target_to_host64): Likewise.
5db82af6 10786
10787 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10788 Renamed from to ...
10789 (GRUB_MOD_ALIGN): ...this. Update all users.
10790
68f6ac74 10791 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10792 grub_host_to_target32.
10793 Replace grub_be_to_cpu32 with grub_target_to_host32.
10794 (load_modules): Likewise.
10795 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10796 Replace grub_be_to_cpu32 with grub_target_to_host32.
10797 Replace grub_cpu_to_be16 with grub_host_to_target16.
10798 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 10799
3cf497cc 108002007-10-12 Robert Millan <rmh@aybabtu.com>
10801
10802 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10803 * util/elf/grub-mkimage.c: ... here.
10804
10805 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10806 `util/powerpc/ieee1275/grub-mkimage.c'.
10807
c8cc3692 108082007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 10809
c8cc3692 10810 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10811 and make it easier to figure out.
10812 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10813 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10814 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10815 leave us with less than HEAP_MIN_SIZE total heap.
10816 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 10817
5c58b791 108182007-10-03 Robert Millan <rmh@aybabtu.com>
10819
10820 * include/grub/i386/io.h: New file.
10821 * commands/i386/pc/play.c (inb): Removed.
10822 (outb): Removed.
10823 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10824 with grub_outb().
afcd2ef8 10825 * term/i386/pc/serial.c (inb): Removed.
10826 (outb): Removed.
10827 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10828 with grub_outb().
10829 * term/i386/pc/vga.c (inb): Removed.
10830 (outb): Removed.
10831 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10832 with grub_outb().
5c58b791 10833
1a477ed6 108342007-10-02 Robert Millan <rmh@aybabtu.com>
10835
10836 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10837 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10838 Reported by Marcin Kurek.
10839
6b5d80fa 108402007-09-07 Robert Millan <rmh@aybabtu.com>
10841
10842 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10843 SmartFirmware version updates (as released by Sven Luther), and avoid
10844 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10845 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10846 known broken.
10847
5618afbf 108482007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10849
10850 From Hitoshi Ozeki:
10851 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10852 when merging two regions.
10853
6139dcd9 108542007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10855
508e39ee 10856 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10857 * normal/completion.c (grub_normal_do_completion): Likewise.
10858 Reported by Hitoshi Ozeki.
10859
108602007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10861
6139dcd9 10862 Do not use devices at boot in chainloading.
f19dbdb7 10863
6139dcd9 10864 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10865 (boot_part_addr): Likewise.
10866 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10867 with BOOT_DRIVE and BOOT_PART_ADDR.
10868 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10869 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10870
38da6516 108712007-08-29 Robert Millan <rmh@aybabtu.com>
10872
10873 Patch from Simon Peter <dn.tlp@gmx.net>:
10874 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10875 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10876 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10877 util/i386/pc/grub-setup.c_DEPENDENCIES.
10878 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10879 util/grub-probe.c_DEPENDENCIES.
10880 * conf/powerpc-ieee1275.rmk: Likewise.
10881
29d0928c 108822007-08-28 Robert Millan <rmh@aybabtu.com>
10883
10884 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10885 to tell grub-mkdevicemap how to name devices.
10886 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10887 feature).
10888
10889 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10890 util/i386/get_disk_name.c.
10891 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10892 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10893 util/ieee1275/get_disk_name.c.
10894
10895 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10896
10897 * DISTLIST: Add util/i386/get_disk_name.c and
10898 util/ieee1275/get_disk_name.c.
10899
10900 * util/grub-mkdevicemap.c: Replace device naming logic with
10901 grub_util_get_disk_name() calls.
10902
5a0d3cca 109032007-08-20 Robert Millan <rmh@aybabtu.com>
10904
10905 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10906 (so that it works for both plural and singular quantities).
10907
8b72db2f 109082007-08-05 Robert Millan <rmh@aybabtu.com>
10909
10910 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10911 so that [xz] isn't taken into account when determining order.
10912
352466bf 109132007-08-02 Marco Gerards <marco@gnu.org>
10914
10915 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10916 `include/multiboot2.h', `include/grub/elfload.h',
10917 `include/multiboot.h', `include/grub/multiboot.h',
10918 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10919 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10920 `kern/elf.c', `loader/multiboot_loader.c',
10921 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10922 `loader/i386/pc/multiboot2.c',
10923 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10924 `util/i386/pc/grub-mkrescue.in'. Remove
10925 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10926 `include/grub/i386/pc/util/biosdisk.h' and
10927 `include/grub/powerpc/ieee1275/multiboot.h'.
10928
8f096014 109292007-08-02 Bean <bean123ch@gmail.com>
10930
10931 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10932 (ntfs_mod_SOURCES): New variable.
10933 (ntfs_mod_CFLAGS): Likewise.
10934 (ntfs_mod_LDFLAGS): Likewise.
10935
10936 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10937 (grub_probe_SOURCES): Likewise.
10938 (grub_emu_SOURCES): Likewise.
10939
10940 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10941 (grub_emu_SOURCES): Likewise.
10942
10943 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10944 (grub_emu_SOURCES): Likewise.
f19dbdb7 10945
8f096014 10946 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10947
10948 * fs/ntfs.c: New file.
10949
9959f7db 109502007-08-02 Bean <bean123ch@gmail.com>
10951
10952 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10953
10954 * file.h (grub_file): Likewise.
10955
10956 * fshelp.h (grub_fshelp_read_file): Likewise.
10957
10958 * util/i386/pc/grub-setup.c (setup): Likewise.
10959 (save_first_sector): Likewise.
10960 (save_blocklists): Likewise.
f19dbdb7 10961
9959f7db 10962 * fs/affs.c (grub_affs_read_file): Likewise.
10963
10964 * fs/ext2.c (grub_ext2_read_file): Likewise.
10965
10966 * fs/fat.c (grub_fat_read_data): Likewise.
10967
10968 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10969
10970 * fs/hfs.c (grub_hfs_read_file): Likewise.
10971
10972 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10973
10974 * fs/jfs.c (grub_jfs_read_file): Likewise.
10975
10976 * fs/minix.c (grub_minix_read_file): Likewise.
10977
10978 * fs/sfs.c (grub_sfs_read_file): Likewise.
10979
10980 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 10981
9959f7db 10982 * fs/xfs.c (grub_xfs_read_file): Likewise.
10983
10984 * command/blocklist.c (read_blocklist): Likewise.
10985 (print_blocklist): Likewise.
10986
0a203f83 109872007-08-02 Marco Gerards <marco@gnu.org>
10988
10989 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10990 `util/hostfs.c'.
10991
10992 * disk/host.c: New file.
10993
10994 * util/hostfs.c: Likewise.
10995
10996 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10997 return `GRUB_ERR_BAD_FS'.
10998 * fs/sfs.c (grub_sfs_mount): Likewise.
10999 * fs/xfs.c (grub_xfs_mount): Likewise.
11000
11001 * include/grub/disk.h (enum grub_disk_dev_id): Add
11002 `GRUB_DISK_DEVICE_HOST_ID'.
11003
11004 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11005
e5dfe777 110062007-07-24 Jerone Young <jerone@gmail.com>
11007
f19dbdb7 11008 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 11009 modules for compilation.
11010 * conf/powerpc-ieee1275.rmk: Likewise.
11011
11012 * include/multiboot.h: Move multiboot definitions to one file. Rename
11013 many definitions to not get grub specific.
11014 * include/multiboot2.h: Create header with multiboot 2 definitions.
11015 * include/grub/multiboot.h: Header for grub specific function
11016 prototypes and definitions.
11017 * include/grub/multiboot2.h: Likewise.
11018 * include/grub/multiboot_loader.h: Likewise.
11019 * include/grub/i386/pc/multiboot.h: Removed.
11020 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11021
11022 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11023 and 2 to allow for one multiboot and module commands.
11024 * loader/multiboot2.c: Add multiboot2 functionality.
11025 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11026 and definition names.
11027 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11028 2 functions.
11029 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11030 ieee1275 specific multiboot2 code.
11031
11032 * kern/i386/pc/startup.S: Change headers and definition names for
11033 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11034
daf0f0ba 110352007-07-22 Robert Millan <rmh@aybabtu.com>
11036
11037 * geninitheader.sh: Process file specified in first parameter rather
11038 than hardcoding grub_modules_init.lst.
fe6b695a 11039 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 11040 than hardcoding grub_modules_init.h.
11041
11042 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11043 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11044 grub_probe_init.[ch] and grub_setup_init.[ch].
11045
11046 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11047 grub_modules_init.h with grub_emu_init.h.
11048 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11049 grub_probe_init.[ch] files.
11050 * conf/i386-efi.rmk: Likewise.
11051 * conf/i386-pc.rmk: Likewise.
11052 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11053 grub_setup_init.[ch] files.
11054
11055 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11056 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11057 to initialize modules rather than a list of hardcoded functions.
11058 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11059 grub_init_all() to initialize modules rather than a list of hardcoded
11060 functions.
11061
54cdc1cc 110622007-07-22 Robert Millan <rmh@aybabtu.com>
11063
11064 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11065 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11066
ad0686cc 110672007-07-22 Robert Millan <rmh@aybabtu.com>
11068
11069 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11070 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11071 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11072 flag when running on SmartFirmware.
11073 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11074 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11075 was set.
11076
11077 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11078 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11079 rather than decreasing it.
11080
11081 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11082 there's not enough space to do it, fail in the same way as when it
11083 can't be done because there are no partitions.
11084
11085 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11086 when nvsetenv failed.
11087
969c02ec 110882007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11089
11090 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11091 because this rule is automatically generated.
11092 (grub-mkrescue): Removed for the same reason as above.
11093
5a79f472 110942007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11095
11096 Migrate to GNU General Public License Version 3.
f19dbdb7 11097
5a79f472 11098 * COPYING: Replaced with the plain text version of GPLv3.
11099
11100 * config.guess: Updated from gnulib.
11101 * config.sub: Likewise.
11102
11103 * geninit.sh: Output a GPLv3 copyright notice.
11104 * geninitheader.sh: Likewise.
11105 * genmodsrc.sh: Likewise.
11106 * gensymlist.sh.in: Likewise.
11107
11108 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11109 * boot/i386/pc/diskboot.S: Likewise.
11110 * boot/i386/pc/pxeboot.S: Likewise.
11111 * commands/blocklist.c: Likewise.
11112 * commands/boot.c: Likewise.
11113 * commands/cat.c: Likewise.
11114 * commands/cmp.c: Likewise.
11115 * commands/configfile.c: Likewise.
11116 * commands/echo.c: Likewise.
11117 * commands/help.c: Likewise.
11118 * commands/ls.c: Likewise.
11119 * commands/search.c: Likewise.
11120 * commands/terminal.c: Likewise.
11121 * commands/test.c: Likewise.
11122 * commands/videotest.c: Likewise.
11123 * commands/i386/cpuid.c: Likewise.
11124 * commands/i386/pc/halt.c: Likewise.
11125 * commands/i386/pc/play.c: Likewise.
11126 * commands/i386/pc/reboot.c: Likewise.
11127 * commands/i386/pc/vbeinfo.c: Likewise.
11128 * commands/i386/pc/vbetest.c: Likewise.
11129 * commands/ieee1275/halt.c: Likewise.
11130 * commands/ieee1275/reboot.c: Likewise.
11131 * commands/ieee1275/suspend.c: Likewise.
11132 * disk/loopback.c: Likewise.
11133 * disk/lvm.c: Likewise.
11134 * disk/raid.c: Likewise.
11135 * disk/efi/efidisk.c: Likewise.
11136 * disk/i386/pc/biosdisk.c: Likewise.
11137 * disk/ieee1275/ofdisk.c: Likewise.
11138 * font/manager.c: Likewise.
11139 * fs/affs.c: Likewise.
11140 * fs/ext2.c: Likewise.
11141 * fs/fat.c: Likewise.
11142 * fs/fshelp.c: Likewise.
11143 * fs/hfs.c: Likewise.
11144 * fs/hfsplus.c: Likewise.
11145 * fs/iso9660.c: Likewise.
11146 * fs/jfs.c: Likewise.
11147 * fs/minix.c: Likewise.
11148 * fs/sfs.c: Likewise.
11149 * fs/ufs.c: Likewise.
11150 * fs/xfs.c: Likewise.
11151 * hello/hello.c: Likewise.
11152 * include/grub/acorn_filecore.h: Likewise.
11153 * include/grub/arg.h: Likewise.
11154 * include/grub/bitmap.h: Likewise.
11155 * include/grub/boot.h: Likewise.
11156 * include/grub/cache.h: Likewise.
11157 * include/grub/device.h: Likewise.
11158 * include/grub/disk.h: Likewise.
11159 * include/grub/dl.h: Likewise.
11160 * include/grub/elfload.h: Likewise.
11161 * include/grub/env.h: Likewise.
11162 * include/grub/err.h: Likewise.
11163 * include/grub/file.h: Likewise.
11164 * include/grub/font.h: Likewise.
11165 * include/grub/fs.h: Likewise.
11166 * include/grub/fshelp.h: Likewise.
11167 * include/grub/gzio.h: Likewise.
11168 * include/grub/hfs.h: Likewise.
11169 * include/grub/kernel.h: Likewise.
11170 * include/grub/loader.h: Likewise.
11171 * include/grub/lvm.h: Likewise.
11172 * include/grub/misc.h: Likewise.
11173 * include/grub/mm.h: Likewise.
11174 * include/grub/net.h: Likewise.
11175 * include/grub/normal.h: Likewise.
11176 * include/grub/parser.h: Likewise.
11177 * include/grub/partition.h: Likewise.
11178 * include/grub/pc_partition.h: Likewise.
11179 * include/grub/raid.h: Likewise.
11180 * include/grub/rescue.h: Likewise.
11181 * include/grub/script.h: Likewise.
11182 * include/grub/setjmp.h: Likewise.
11183 * include/grub/symbol.h: Likewise.
11184 * include/grub/term.h: Likewise.
11185 * include/grub/terminfo.h: Likewise.
11186 * include/grub/tparm.h: Likewise.
11187 * include/grub/types.h: Likewise.
11188 * include/grub/video.h: Likewise.
11189 * include/grub/efi/api.h: Likewise.
11190 * include/grub/efi/chainloader.h: Likewise.
11191 * include/grub/efi/console.h: Likewise.
11192 * include/grub/efi/console_control.h: Likewise.
11193 * include/grub/efi/disk.h: Likewise.
11194 * include/grub/efi/efi.h: Likewise.
11195 * include/grub/efi/pe32.h: Likewise.
11196 * include/grub/efi/time.h: Likewise.
11197 * include/grub/i386/linux.h: Likewise.
11198 * include/grub/i386/setjmp.h: Likewise.
11199 * include/grub/i386/types.h: Likewise.
11200 * include/grub/i386/efi/kernel.h: Likewise.
11201 * include/grub/i386/efi/loader.h: Likewise.
11202 * include/grub/i386/efi/time.h: Likewise.
11203 * include/grub/i386/pc/biosdisk.h: Likewise.
11204 * include/grub/i386/pc/boot.h: Likewise.
11205 * include/grub/i386/pc/chainloader.h: Likewise.
11206 * include/grub/i386/pc/console.h: Likewise.
11207 * include/grub/i386/pc/init.h: Likewise.
11208 * include/grub/i386/pc/kernel.h: Likewise.
11209 * include/grub/i386/pc/loader.h: Likewise.
11210 * include/grub/i386/pc/memory.h: Likewise.
11211 * include/grub/i386/pc/multiboot.h: Likewise.
11212 * include/grub/i386/pc/serial.h: Likewise.
11213 * include/grub/i386/pc/time.h: Likewise.
11214 * include/grub/i386/pc/vbe.h: Likewise.
11215 * include/grub/i386/pc/vbeblit.h: Likewise.
11216 * include/grub/i386/pc/vbefill.h: Likewise.
11217 * include/grub/i386/pc/vbeutil.h: Likewise.
11218 * include/grub/i386/pc/vga.h: Likewise.
11219 * include/grub/ieee1275/ieee1275.h: Likewise.
11220 * include/grub/ieee1275/ofdisk.h: Likewise.
11221 * include/grub/powerpc/libgcc.h: Likewise.
11222 * include/grub/powerpc/setjmp.h: Likewise.
11223 * include/grub/powerpc/types.h: Likewise.
11224 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11225 * include/grub/powerpc/ieee1275/console.h: Likewise.
11226 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11227 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11228 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11229 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11230 * include/grub/powerpc/ieee1275/time.h: Likewise.
11231 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11232 * include/grub/sparc64/libgcc.h: Likewise.
11233 * include/grub/sparc64/setjmp.h: Likewise.
11234 * include/grub/sparc64/types.h: Likewise.
11235 * include/grub/sparc64/ieee1275/console.h: Likewise.
11236 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11237 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11238 * include/grub/sparc64/ieee1275/time.h: Likewise.
11239 * include/grub/util/biosdisk.h: Likewise.
11240 * include/grub/util/getroot.h: Likewise.
11241 * include/grub/util/lvm.h: Likewise.
11242 * include/grub/util/misc.h: Likewise.
11243 * include/grub/util/raid.h: Likewise.
11244 * include/grub/util/resolve.h: Likewise.
11245 * io/gzio.c: Likewise.
11246 * kern/device.c: Likewise.
11247 * kern/disk.c: Likewise.
11248 * kern/dl.c: Likewise.
11249 * kern/elf.c: Likewise.
11250 * kern/env.c: Likewise.
11251 * kern/err.c: Likewise.
11252 * kern/file.c: Likewise.
11253 * kern/fs.c: Likewise.
11254 * kern/loader.c: Likewise.
11255 * kern/main.c: Likewise.
11256 * kern/misc.c: Likewise.
11257 * kern/mm.c: Likewise.
11258 * kern/parser.c: Likewise.
11259 * kern/partition.c: Likewise.
11260 * kern/rescue.c: Likewise.
11261 * kern/term.c: Likewise.
11262 * kern/efi/efi.c: Likewise.
11263 * kern/efi/init.c: Likewise.
11264 * kern/efi/mm.c: Likewise.
11265 * kern/i386/dl.c: Likewise.
11266 * kern/i386/efi/init.c: Likewise.
11267 * kern/i386/efi/startup.S: Likewise.
11268 * kern/i386/pc/init.c: Likewise.
11269 * kern/i386/pc/lzo1x.S: Likewise.
11270 * kern/i386/pc/startup.S: Likewise.
11271 * kern/ieee1275/ieee1275.c: Likewise.
11272 * kern/powerpc/cache.S: Likewise.
11273 * kern/powerpc/dl.c: Likewise.
11274 * kern/powerpc/ieee1275/cmain.c: Likewise.
11275 * kern/powerpc/ieee1275/crt0.S: Likewise.
11276 * kern/powerpc/ieee1275/init.c: Likewise.
11277 * kern/powerpc/ieee1275/openfw.c: Likewise.
11278 * kern/sparc64/cache.S: Likewise.
11279 * kern/sparc64/dl.c: Likewise.
11280 * kern/sparc64/ieee1275/init.c: Likewise.
11281 * kern/sparc64/ieee1275/openfw.c: Likewise.
11282 * loader/efi/chainloader.c: Likewise.
11283 * loader/efi/chainloader_normal.c: Likewise.
11284 * loader/i386/efi/linux.c: Likewise.
11285 * loader/i386/efi/linux_normal.c: Likewise.
11286 * loader/i386/pc/chainloader.c: Likewise.
11287 * loader/i386/pc/chainloader_normal.c: Likewise.
11288 * loader/i386/pc/linux.c: Likewise.
11289 * loader/i386/pc/linux_normal.c: Likewise.
11290 * loader/i386/pc/multiboot.c: Likewise.
11291 * loader/i386/pc/multiboot_normal.c: Likewise.
11292 * loader/powerpc/ieee1275/linux.c: Likewise.
11293 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11294 * normal/arg.c: Likewise.
11295 * normal/cmdline.c: Likewise.
11296 * normal/command.c: Likewise.
11297 * normal/completion.c: Likewise.
11298 * normal/execute.c: Likewise.
11299 * normal/function.c: Likewise.
11300 * normal/lexer.c: Likewise.
11301 * normal/main.c: Likewise.
11302 * normal/menu.c: Likewise.
11303 * normal/menu_entry.c: Likewise.
11304 * normal/misc.c: Likewise.
11305 * normal/parser.y: Likewise.
11306 * normal/script.c: Likewise.
11307 * normal/i386/setjmp.S: Likewise.
11308 * normal/powerpc/setjmp.S: Likewise.
11309 * normal/sparc64/setjmp.S: Likewise.
11310 * partmap/acorn.c: Likewise.
11311 * partmap/amiga.c: Likewise.
11312 * partmap/apple.c: Likewise.
11313 * partmap/gpt.c: Likewise.
11314 * partmap/pc.c: Likewise.
11315 * partmap/sun.c: Likewise.
11316 * term/gfxterm.c: Likewise.
11317 * term/terminfo.c: Likewise.
11318 * term/efi/console.c: Likewise.
11319 * term/i386/pc/console.c: Likewise.
11320 * term/i386/pc/serial.c: Likewise.
11321 * term/i386/pc/vesafb.c: Likewise.
11322 * term/i386/pc/vga.c: Likewise.
11323 * term/ieee1275/ofconsole.c: Likewise.
11324 * util/biosdisk.c: Likewise.
11325 * util/console.c: Likewise.
11326 * util/genmoddep.c: Likewise.
11327 * util/getroot.c: Likewise.
11328 * util/grub-emu.c: Likewise.
11329 * util/grub-mkdevicemap.c: Likewise.
11330 * util/grub-probe.c: Likewise.
11331 * util/lvm.c: Likewise.
11332 * util/misc.c: Likewise.
11333 * util/raid.c: Likewise.
11334 * util/resolve.c: Likewise.
11335 * util/update-grub.in: Likewise.
11336 * util/update-grub_lib.in: Likewise.
11337 * util/grub.d/00_header.in: Likewise.
11338 * util/grub.d/10_hurd.in: Likewise.
11339 * util/grub.d/10_linux.in: Likewise.
11340 * util/i386/efi/grub-install.in: Likewise.
11341 * util/i386/efi/grub-mkimage.c: Likewise.
11342 * util/i386/pc/grub-install.in: Likewise.
11343 * util/i386/pc/grub-mkimage.c: Likewise.
11344 * util/i386/pc/grub-mkrescue.in: Likewise.
11345 * util/i386/pc/grub-setup.c: Likewise.
11346 * util/i386/pc/misc.c: Likewise.
11347 * util/powerpc/ieee1275/grub-install.in: Likewise.
11348 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11349 * util/powerpc/ieee1275/misc.c: Likewise.
11350 * video/bitmap.c: Likewise.
11351 * video/video.c: Likewise.
11352 * video/i386/pc/vbe.c: Likewise.
11353 * video/i386/pc/vbeblit.c: Likewise.
11354 * video/i386/pc/vbefill.c: Likewise.
11355 * video/i386/pc/vbeutil.c: Likewise.
11356 * video/readers/tga.c: Likewise.
11357
3572d015 113582007-07-02 Robert Millan <rmh@aybabtu.com>
11359
11360 * conf/i386-efi.rmk: Replace obsolete reference to
11361 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11362 with util/getroot.c.
11363 * conf/powerpc-ieee1275.rmk: Likewise.
11364 * conf/sparc64-ieee1275.rmk: Likewise.
11365
11366 * util/grub-emu.c (main): Fix unchecked pointer handling.
11367
2c2a681b 113682007-07-02 Robert Millan <rmh@aybabtu.com>
11369
11370 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11371 invocation to fail, in order to support partition-less media.
11372
11373 * util/i386/pc/grub-install.in: Likewise.
11374
11375 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11376 which fs or partmap modules are needed (akin to its sister scripts).
11377
11378 Also use grub-probe to get rid of unportable /proc/mounts check.
11379
11380 Print the same informational message that the other scripts do, before
fe6b695a 11381 exiting.
2c2a681b 11382
6193defe 113832007-06-23 Robert Millan <rmh@aybabtu.com>
11384
fe6b695a 11385 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 11386 a font file can be found and, if so, echo the GRUB path to it.
11387
11388 * util/update-grub.in: Handle multiple terminals depending on user
11389 input, platform availability and font file presence. Propagate
11390 variables of our findings to /etc/grub.d/ children.
11391
11392 * util/grub.d/00_header.in: Handle multiple terminals, based on
11393 environment setup by update-grub.
11394
eface1dc 113952007-06-23 Robert Millan <rmh@aybabtu.com>
11396
ba50d28f 11397 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 11398
bf697e28 113992007-06-21 Robert Millan <rmh@aybabtu.com>
11400
11401 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11402 indicate end of data section in kernel image.
11403 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11404 GRUB_KERNEL_MACHINE_DATA_END.
11405
11406 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11407 space for it.
11408 * kern/i386/efi/startup.S: Likewise.
11409
11410 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11411 during image generation. Implement --prefix option to override this
11412 patch.
11413 * util/i386/efi/grub-mkimage.c: Likewise.
11414
11415 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11416 code to make path relative to its root into a separate function.
11417
11418 * util/i386/pc/grub-install.in: Use newly provided
11419 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11420 pass the result to grub-install --prefix.
11421
baa574b4 114222007-06-13 Robert Millan <rmh@aybabtu.com>
11423
11424 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11425 DEFAULT_DEVICE_MAP.
11426 * util/grub-emu.c: Use above definitions from misc.h instead of
11427 defining them.
11428 * util/grub-mkdevicemap.c: Likewise.
11429 * util/i386/pc/grub-setup.c: Likewise.
11430 * util/grub-probe.c: Likewise.
11431 (probe): Abort with grub_util_error() when either
11432 grub_guess_root_device or grub_util_get_grub_dev fails.
11433
0215dcbf 114342007-06-12 Robert Millan <rmh@aybabtu.com>
11435
11436 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11437 "pager" assignment.
11438 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11439 "pcdata".
11440 * util/grub-probe.c (probe): Likewise for "drive_name".
11441
8af2ab7b 114422007-06-11 Robert Millan <rmh@aybabtu.com>
11443
11444 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11445 not just the cdrom one.
11446
59d31694 114472007-06-11 Robert Millan <rmh@aybabtu.com>
11448
11449 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11450 Add --pkglibdir=DIR option to override pkglibdir.
11451 Mention --image-type=TYPE in help output.
11452 Fix --grub-mkimage (it was a no-op).
fe6b695a 11453 Abort gracefully when no parameter is given.
59d31694 11454
7ee367e4 114552007-06-11 Robert Millan <rmh@aybabtu.com>
11456
11457 * util/i386/pc/grub-mkrescue.in: New file.
11458 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11459 * Makefile.in: Handle bin_SCRIPTS.
11460
29b0ed46 114612007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11462
11463 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11464 list of video modes.
11465
c0f90770 114662007-06-06 Robert Millan <rmh@aybabtu.com>
11467
11468 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11469 file doesn't exist, or if it is in a filesystem grub can't read.
11470
11471 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11472 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11473 header comment to fit in 80 columns when the variables are resolved.
11474
11475 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11476 could be identified by update-grub. Remove redundant check for
fe6b695a 11477 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 11478 handles that).
11479
fb36dc26 114802007-06-04 Robert Millan <rmh@aybabtu.com>
11481
11482 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11483
11484 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11485
11486 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11487
0c68c93e 114882007-06-04 Robert Millan <rmh@aybabtu.com>
11489
11490 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11491
11492 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11493 grub_apple_partition_map_fini.
11494
11495 * util/biosdisk.c
11496 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11497 to access >2 TiB disks).
11498
11499 Print disk->total_sectors with %llu instead of %lu, since this
11500 variable is always 64-bit (prevents wrong disk size from being displayed
11501 on either >2 TiB disk or big-endian CPU).
11502
11503 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11504 into a generic case that supports all (sane) partition maps.
11505
11506 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11507 breaks big-endian.
11508
11509 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11510 and grub_apple_partition_map_fini() after that.
11511
0f23eb74 115122007-06-01 Robert Millan <rmh@aybabtu.com>
11513
11514 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11515
11516 * util/grub.d/00_header.in: Only enable gfxterm when
11517 convert_system_path_to_grub_path() succeeds.
11518
42c71976 115192007-05-20 Robert Millan <rmh@aybabtu.com>
11520
11521 * util/update-grub_lib.in: New file.
11522 * DISTLIST: Add update-grub_lib.in.
11523 * conf/common.rmk: Generate update-grub_lib and install it in
11524 $(lib_DATA).
11525 * Makefile.in: Add install routine for $(lib_DATA).
11526
11527 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11528 function provided by update-grub_lib to support arbitrary paths of
11529 unifont.pff.
11530 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11531 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11532
5beb2291 115332007-05-19 Robert Millan <rmh@aybabtu.com>
11534
11535 * commands/i386/cpuid.c: New module.
11536 * DISTLIST: Add it.
11537 * conf/i386-efi.rmk: Enable cpuid.mod.
11538 * conf/i386-pc.rmk: Likewise.
11539
7262eca1 115402007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11541
11542 * kern/disk.c (grub_disk_read): Check return value of
11543 grub_realloc().
11544
260ba823 115452007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11546
11547 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11548 arrays.
11549 * disk/raid.c (grub_raid_open): Likewise.
11550
1ecb6cf2 115512007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11552
11553 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11554 stack instead of on the heap.
11555
11556 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11557 before doing a read on it.
11558
11559 * configure.ac: Only use -fno-stack-protector for the target
11560 environment.
f19dbdb7 11561
21c8cbb1 115622007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11563
11564 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11565 __attribute_ ((unused)) to mode_type argument.
11566
11567 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 11568
21c8cbb1 11569 * kern/misc.c (memcmp): Fix prototype.
11570
11571 * include/grub/partition.h [GRUB_UTIL]
11572 (grub_gpt_partition_map_init): Add prototype.
11573 (grub_gpt_partition_map_fini): Likewise.
11574
11575 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11576 at the right place.
11577
11578 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11579 (grub_fat_read_data): Likewise.
11580 (grub_fat_find_dir): Likewise.
11581
11582 * font/manager.c (find_glyph): Make table a const.
11583 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 11584
849d55d3 115852007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11586
11587 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11588 code, first search for device in /dev/mapper, then in /dev.
11589 (grub_util_get_grub_dev): New function.
11590 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11591 prototype.
11592 * util/grub-probe.c (probe): Remove check for RAID, call
11593 grub_util_get_grub_dev() instead of
11594 grub_util_biosdisk_get_grub_dev().
11595 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11596 grub_util_biosdisk_get_grub_dev().
11597 * util/i386/pc/grub-setup.c (main): Likewise.
11598
8fff7c2f 115992007-05-16 Robert Millan <rmh@aybabtu.com>
11600
11601 * DISTLIST: Update for the latest changes.
11602 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11603 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11604 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11605 grub/util/biosdisk.h.
11606 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11607 grub/util/biosdisk.h.
11608
48e12b52 116092007-05-16 Robert Millan <rmh@aybabtu.com>
11610
11611 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11612
46b9d128 116132007-05-16 Robert Millan <rmh@aybabtu.com>
11614
11615 * util/i386/efi/grub-install.in: New.
11616 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11617 newly added grub-install.
11618 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11619 include.
11620 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11621 grub/util/biosdisk.h.
11622 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11623 grub/util/biosdisk.h.
11624
2d1a40a9 116252007-05-16 Robert Millan <rmh@aybabtu.com>
11626
11627 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11628 * include/grub/util/biosdisk.h: ... here.
11629 * util/i386/pc/biosdisk.c: Moved to ...
11630 * util/biosdisk.c: ... here.
11631 * util/i386/pc/getroot.c: Moved to ...
11632 * util/getroot.c: ... here.
11633 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11634 * util/grub-mkdevicemap.c: ... here.
11635 * util/i386/pc/grub-probe.c: Moved to ...
11636 * util/grub-probe.c: ... here.
11637
9e26e3bc 116382007-05-15 Robert Millan <rmh@aybabtu.com>
11639
11640 * util/update-grub.in: Remove duplicated line in grub.cfg header
11641 message.
11642
57f96397 116432007-05-13 Robert Millan <rmh@aybabtu.com>
11644
11645 * util/update-grub.in: Fix a few assumptions about the devices holding
11646 /, /boot and /boot/grub being the same.
11647 * util/grub.d/00_header.in: Likewise.
11648 * util/grub.d/10_hurd.in: Likewise.
11649 * util/grub.d/10_linux.in: Likewise.
11650
11651 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11652 patterns. Use that to define the `.old' suffix as older than `'.
11653
11654 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11655
11656 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11657 the grub.cfg header message.
11658
2e610d62 116592007-05-11 Robert Millan <rmh@aybabtu.com>
11660
11661 * util/update-grub.in: Create device.map if it doesn't already exist,
11662 before attempting to run grub-probe.
11663 Check for grub-probe and grub-mkdevicemap with the same code
11664 grub-install is using.
11665 Remove test mode.
11666
3f6a10ef 116672007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11668
11669 * Makefile.in: Add the datarootdir autoconf variable.
11670
02e7b75e 116712007-05-09 Robert Millan <rmh@aybabtu.com>
11672
11673 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 11674 fail gracefully if dev->disk->partition == NULL.
02e7b75e 11675
75f396cc 116762007-05-07 Robert Millan <rmh@aybabtu.com>
11677
11678 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11679 determine partition map module.
11680 * util/i386/pc/grub-install.in: Use this feature to decide which
11681 partition module to load, instead of hardcoding pc and gpt.
11682
da65cb36 116832007-05-07 Robert Millan <rmh@aybabtu.com>
11684
11685 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11686 source directory differs from build directory.
11687
b57d6a91 116882007-05-05 Robert Millan <rmh@aybabtu.com>
11689
11690 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11691 initialisation.
11692
509d00f1 116932007-05-05 Robert Millan <rmh@aybabtu.com>
11694
11695 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11696
c48f23ef 116972007-05-05 Robert Millan <rmh@aybabtu.com>
11698
11699 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11700 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11701
20b97658 117022007-05-05 Robert Millan <rmh@aybabtu.com>
11703
11704 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11705 (grub_probe_SOURCES): Likewise.
11706 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11707 GPT and initialize dos_part and bsd_part accordingly.
11708 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11709 install_bsd_part.
11710 (main): Activate gpt module for use during partition identification,
11711 and deactivate it afterwards.
11712 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11713 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11714 partition identification, and deactivate it afterwards.
11715
99123174 117162007-05-05 Robert Millan <rmh@aybabtu.com>
11717
11718 * term/i386/pc/console.c (grub_console_fini): Call
11719 grub_term_set_current() before grub_term_unregister().
11720
ebd97f6e 117212007-05-04 Robert Millan <rmh@aybabtu.com>
11722
11723 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11724 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11725 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11726 and update-grub_DATA.
11727 * conf/common.rmk: Build and install update-grub components.
11728 * conf/common.mk: Regenerate.
11729 * util/update-grub.in: New. Core of update-grub.
11730 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11731 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11732 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11733 * util/grub.d/README: New. Document grub.d directory layout.
11734
b06a264d 117352007-05-01 Robert Millan <rmh@aybabtu.com>
11736
11737 * util/grub-emu.c: Move initialization functions
11738 grub_util_biosdisk_init() and grub_init_all() before
11739 grub_util_biosdisk_get_grub_dev(), which relies on them.
11740
41f0050e 117412007-04-19 Robert Millan <rmh@aybabtu.com>
11742
11743 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11744 it is used later.
11745
04582bb3 117462007-04-18 Jerone Young <jerone@gmail.com>
11747
f19dbdb7 11748 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 11749 stanza.
11750
08db4632 117512007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 11752
08db4632 11753 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11754 continue on and look for device node with real device name.
11755
801b76be 117562007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 11757
fe6b695a 11758 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 11759 ability.
11760 * Makefile.in: Add autoconf package transformation code.
11761 * util/i386/pc/grub-install.in: Likewise.
11762 * util/powerpc/ieee1275/grub-install.in: Likewise.
11763
6795c4e1 117642007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11765
11766 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11767 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11768 (EXT2_REVISION): Likewise.
11769 (EXT2_INODE_SIZE): Likewise.
11770 (struct grub_ext2_block_group): Added a missing member
11771 "used_dirs".
11772 (grub_ext2_read_inode): Divide by the inode size in a superblock
11773 instead of 128 to obtain INODES_PER_BLOCK.
11774 Use the macro EXT2_INODE_SIZE instead of directly using
11775 SBLOCK->INODE_SIZE.
11776
d70af616 117772007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11778
11779 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11780 superblock instead of the structure size to compute an
11781 offset. This fixes the problem that GRUB could not read a
11782 filesystem when inode size is different from 128-byte.
11783
3b801603 117842007-03-05 Marco Gerards <marco@gnu.org>
11785
11786 * normal/main.c (read_config_file): When "menu" is not set, create
11787 an initial context.
11788
4785bfe4 117892007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11790
11791 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11792 (HEAP_LIMIT): New macro.
11793 (grub_claim_heap): Claim memory up to `heaplimit'.
11794
a0cbb023 117952007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11796
11797 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11798 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11799 (_start): Likewise.
11800 (grub_arch_modules_addr): Return address after `_end'.
11801 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11802 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11803 (add_segments): Calculate `_end' from phdr size and location.
11804 (ALIGN_UP): Moved to ...
11805 * include/grub/misc.h: here.
11806 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11807 New macro.
11808 (GRUB_IEEE1275_MODULE_BASE): Removed.
11809
fd7d8eba 118102007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11811
11812 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11813 loop boundary.
11814
9b09e6fc 118152007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11816
11817 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11818 All users updated.
11819 (grub_elf64_load_hook_t): Likewise.
11820 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11821 debug output.
11822
3ce27299 118232007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11824
11825 * kern/mm.c: Update copyright.
11826 (grub_mm_debug): Correct syntax error.
11827 (grub_mm_dump_free): New function.
11828 (grub_debug_free): Call `grub_free'.
11829 * include/grub/mm.h: Update copyright.
11830 (grub_mm_dump_free): Add declaration.
11831
077d5fee 118322007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11833
11834 * include/grub/ieee1275/ieee1275.h: Update copyright.
11835 * kern/powerpc/ieee1275/init.c: Likewise.
11836 * kern/powerpc/ieee1275/openfw.c: Likewise.
11837
11838 * loader/powerpc/ieee1275/linux.c: Likewise.
11839 * include/grub/elfload.h: Likewise.
11840 * kern/elf.c: Likewise.
11841 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11842 callers.
11843 (grub_elf64_load): Likewise.
11844 (grub_elf32_load_segment): Move to a nested function.
11845 (grub_elf64_load_segment): Likewise.
11846
dc946850 118472007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11848
11849 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11850 prototype.
11851 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11852 (grub_heap_len): Likewise.
11853 (HEAP_SIZE): New macro.
11854 (grub_claim_heap): New function.
11855 (grub_machine_init): Don't claim heap directly. Call
11856 `grub_claim_heap'.
11857 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11858 (grub_available_iterate): New function.
11859
baa2a121 118602007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11861
11862 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11863 * configure.ac: Use it for testing the HOST and TARGET compilers.
11864
4fe9862e 118652006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11866
11867 * Makefile.in (enable_grub_emu): New variable.
11868 * configure.ac (--enable-grub-emu): New option.
11869 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11870 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11871 * conf/i386-pc.rmk: Likewise.
11872 * conf/powerpc-ieee1275.rmk: Likewise.
11873 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11874
a8aa5762 118752006-12-12 Marco Gerards <marco@gnu.org>
11876
11877 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11878
11879 * kern/env.c (grub_env_unset): Don't free the member `value' when
11880 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11881 pointer.
11882
11883 * normal/main.c (current_menu): Removed.
11884 (free_menu): Unset the `menu' environment variable.
11885 (grub_normal_menu_addentry): Make use of the environment variable
11886 `menu', instead of using the global `current_menu'. Allocate
11887 memory for the sourcecode of this entry.
11888 (read_config_file): New argument `nested', changed all callers.
11889 Only in the case of a new context, initialize a new menu. Set the
11890 `menu' environment variable.
11891 (grub_normal_execute): Don't set and unset the environment
11892 variable `menu' here anymore. Only free the menu when leaving the
11893 context.
11894
11895 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11896 leak.
11897
957b3a3e 118982006-12-11 Marco Gerards <marco@gnu.org>
11899
11900 * normal/menu_entry.c (run): Fix off by one bug so the last line
11901 is executed. Move the loader check to outside the loop.
11902
ef875714 119032006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11904
11905 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11906
4e739985 119072006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11908
11909 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11910 the number of sectors. Reported by Andrey Shuvikov
11911 <mr_hyro@yahoo.com>.
f19dbdb7 11912
790707f2 119132006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11914
11915 * kern/disk.c (grub_disk_read): When there is a read error, always
11916 try to read only the necessary data.
f19dbdb7 11917
790707f2 11918 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11919 disk/raid.c.
11920 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11921 prototype.
11922 [GRUB_UTIL] (grub_raid_fini): Likewise.
11923 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 11924 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 11925 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11926 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11927 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11928 and grub_raid_fini().
f19dbdb7 11929
03e58196 119302006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11931
11932 * include/grub/types.h (__unused): Rename to UNUSED.
11933 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11934 (grub_elf64_size): Likewise.
f19dbdb7 11935
ae4f23bf 119362006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11937
11938 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11939 grub_error_push and grub_error_pop in the error-handling path.
11940 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11941 length.
11942
2166cc83 119432006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11944
11945 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11946 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11947 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11948 (kernel_elf_SOURCES): Likewise.
11949 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11950 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11951 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11952 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11953 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11954 (elf_mod_SOURCES): New variable.
11955 (elf_mod_CFLAGS): Likewise.
11956 (elf_mod_LDFLAGS): Likewise.
11957 * include/grub/types.h (__unused): New macro.
11958 * include/grub/elfload.h: New file.
11959 * kern/elf.c: Likewise.
11960 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11961 (ELF32_LOADMASK): New macro.
11962 (ELF64_LOADMASK): Likewise.
11963 (vmlinux): Removed.
11964 (grub_linux_load32): New function.
11965 (grub_linux_load64): Likewise.
11966 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11967 Use grub_elf_t instead of grub_file_t.
11968
a09d5aa5 119692006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11970
11971 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11972 `catch_result' to struct set_color_args.
11973
d976fc51 119742006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11975
11976 * normal/menu.c: Include grub/script.h.
11977 * normal/menu_entry.c: Likewise.
11978 * include/grub/normal.h: Do not include grub/script.h.
11979
67507549 119802006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11981
11982 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11983
69203a99 119842006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11985
11986 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11987 disk.
11988 (grub_disk_close): Print debug messages when closing a disk.
11989 (grub_disk_read): Print debug messages when disk read fails.
11990 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11991 filesystem type.
11992 * kern/partition.c: Include misc.h.
11993 (grub_partition_iterate): Print debug messages when detecting
11994 partition type.
11995
e2b8278c 119962006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11997
11998 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11999 is negative.
12000 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12001
97b2f2ff 120022006-10-26 Hollis Blanchard <hollis@penguinppc.org>
12003
12004 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12005 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12006
6555d655 120072006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
12008
12009 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12010 instead of sizeof(lv). Patch by Michael Guntsche.
12011
4d42b77f 120122006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
12013
12014 * disk/lvm.c: Rename VGS to VG_LIST.
12015 (grub_lvm_iterate): Change VGS->LV to VG-LV.
12016 (grub_lvm_open): Likewise.
12017 Thanks to Michael Guntsche for finding this bug.
12018
5d74d927 120192006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12020
12021 * configure.ac (AC_INIT): Bumped to 1.95.
12022
a1bb27e4 120232006-10-14 Robert Millan <rmh@aybabtu.com>
12024
12025 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12026 with "/dev/.static/dev/md".
12027
e0994b8b 120282006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12029
12030 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12031 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12032 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12033 DRIVE_NAME are always freed.
12034
12035 * util/i386/pc/biosdisk.c (make_device_name): Add one into
12036 DOS_PART, as a DOS partition is counted from one instead of zero
12037 now. Reported by Robert Millan.
12038
ddd5cee9 120392006-10-14 Robert Millan <rmh@aybabtu.com>
12040
12041 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12042 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12043 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12044 string returned by grub_guess_root_device.
12045 * util/i386/pc/grub-setup.c: Likewise.
12046 * util/i386/pc/grub-probefs.c: Likewise.
12047
12048 * util/i386/pc/grub-probefs.c: Rename to ...
12049 * util/i386/pc/grub-probe.c: ... this.
12050 * DISTLIST: Remove grub-probefs, add grub-probe.
12051 * conf/i386-efi.rmk: Likewise.
12052 * conf/i386-pc.rmk: Likewise.
12053 * util/i386/pc/grub-install.in: Likewise.
12054
12055 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12056 choose which information we want to print.
12057
2b002173 120582006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12059
12060 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12061 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12062 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12063 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12064 video/readers/tga.c and video/i386/pc/vbeutil.c.
12065
120662006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12067
12068 Added support for RAID and LVM.
f19dbdb7 12069
2b002173 12070 * disk/lvm.c: New file.
12071 * disk/raid.c: Likewise.
12072 * include/grub/lvm.h: Likewise.
f19dbdb7 12073 * include/grub/raid.h: Likewise.
2b002173 12074 * include/grub/util/lvm.h: Likewise.
12075 * include/grub/util/raid.h: Likewise.
12076 * util/lvm.c: Likewise.
12077 * util/raid.c: Likewise.
12078
12079 * include/grub/disk.h (grub_disk_dev_id): Add
12080 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12081 (grub_disk_get_size): New prototype.
12082 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12083 returns a partition.
12084 (grub_disk_get_size): New function.
f19dbdb7 12085
2b002173 12086 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12087 verbatim if grub_install_dos_part is -2.
12088
12089 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12090 and LVM devices.
12091
12092 * util/i386/pc/grub-setup.c (setup): New argument
12093 MUST_EMBED. Force embedding of GRUB when the argument is
12094 true. Close FILE before returning.
12095 (main): Add support for RAID and LVM.
f19dbdb7 12096
2b002173 12097 * conf/common.rmk: Add RAID and LVM modules.
12098 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12099 util/lvm.c.
12100 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12101
12102 * kern/misc.c (grub_strstr): New function.
12103 * include/grub/misc.h (grub_strstr): New prototype.
12104
050548d0 121052006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12106
12107 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12108
da849d2d 121092006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12110
12111 * kern/misc.c (grub_strtoull): Guess the base only if not
12112 specified.
12113
97b2f2ff 121142006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 12115
12116 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12117 PowerMac support.
12118
97b2f2ff 121192006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 12120
12121 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12122
12123 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12124 Remove `flags' argument. All callers changed.
12125 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12126 (IEEE1275_IHANDLE_INVALID): New variable.
12127 (IEEE1275_CELL_INVALID): New variable.
12128 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12129 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12130 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12131 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12132 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12133 codes from Open Firmware. All callers updated.
12134 (grub_ieee1275_next_property): Directly return Open Firmware return
12135 code.
12136 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12137 Standardize error checking from `grub_ieee1275_get_property'.
12138 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12139 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12140
97b2f2ff 121412006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 12142
12143 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12144 `instance_to_package_args' to `instance_to_path_args'.
12145
12146 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12147 `grub_ieee1275_chosen'.
12148
12149 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12150 `grub_ieee1275_interpret'.
12151
97b2f2ff 121522006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 12153
12154 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12155
97b2f2ff 121562006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 12157
12158 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12159 (__cmpdi): Likewise.
12160
12161 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12162 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12163 `grub_ssize_t'.
12164
02bb8acc 12165 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 12166
12167 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12168 to type `grub_ssize_t'.
12169 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12170
7f9a8531 121712006-09-22 Marco Gerards <marco@gnu.org>
12172
12173 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12174 newlines.
12175
b5ef1102 121762006-09-22 Marco Gerards <marco@gnu.org>
12177
12178 * commands/echo.c: New file.
12179
12180 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12181
12182 * conf/common.rmk (echo_mod_SOURCES): New variable.
12183 (echo_mod_CFLAGS): Likewise.
12184 (echo_mod_LDFLAGS): Likewise.
12185
2cff3677 121862006-09-22 Marco Gerards <marco@gnu.org>
12187
12188 * normal/main.c (get_line): Malloc memory instead of using
12189 preallocated memory. Removed the arguments `cmdline' and
12190 `max_len'. Updated all callers.
12191
6ba4688b 121922006-09-22 Marco Gerards <marco@gnu.org>
12193
12194 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12195 (normal_mod_DEPENDENCIES): Likewise.
12196
12197 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12198 (normal_mod_DEPENDENCIES): Likewise.
12199
12200 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12201
e02ac02c 122022006-09-22 Johan Rydberg <jrydberg@gnu.org>
12203
12204 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12205 programs.
12206 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12207 (normal_mod_DEPENDENCIES): Likewise.
12208 * conf/i386-pc.mk: Regenerate.
12209 * conf/i386-efi.mk: Likewise
12210 * conf/common.mk: Likewise.
12211 * conf/powerpc-ieee1275.mk: Likewise.
12212 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 12213
8d252e44 122142006-09-22 Robert Millan <rmh@aybabtu.com>
12215
12216 Sync with i386 version.
12217 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12218 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12219
209bf7ac 122202006-09-21 Robert Millan <rmh@aybabtu.com>
12221
12222 Import from GRUB Legacy (lib/device.c):
12223 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12224 (init_device_map) [__linux__]: Add support for I2O devices.
12225
6b146090 122262006-09-14 Marco Gerards <marco@gnu.org>
12227
12228 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12229 `-melf_i386'.
12230
e38600a8 122312006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 12232
12233 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12234 /boot/grub/*.lst.
78fa1790 12235
2952da5d 12236 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 12237
2952da5d 12238 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12239 before adding it to device.map.
12240
01b82a64 122412006-08-15 Johan Rydberg <jrydberg@gnu.org>
12242
fe6b695a 12243 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 12244 compiles a file; using the -MD option.
12245 * conf/common.mk: Regenerate.
12246 * conf/i386-pc.mk: Likewise.
12247 * conf/i386-efi.mk: Likewise.
12248 * conf/powerpc-ieee1275.mk: Likewise.
12249 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 12250
1064790d 122512006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12252
12253 Move the prototypes of grub_setjmp and grub_longjmp to
12254 cpu/setjmp.h, so that each architecture may specify different
12255 attributes.
f19dbdb7 12256
1064790d 12257 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12258 (grub_longjmp): Likewise.
12259 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12260 (grub_longjmp): Likewise.
12261 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12262 (grub_longjmp): Likewise.
12263
12264 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12265 [!GRUB_UTIL] (grub_longjmp): Removed.
12266
29dda3ed 122672006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12268
12269 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12270 "color!" method does not return any value.
12271
ad2a06ed 122722006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12273
12274 * include/grub/bitmap.h: New file.
12275
12276 * include/grub/i386/pc/vbeutil.h: Likewise.
12277
12278 * video/bitmap.c: Likewise.
12279
12280 * video/readers/tga.c: Likewise.
12281
12282 * video/i386/pc/vbeutil.c: Likewise.
12283
12284 * commands/videotest.c: Code cleanup and updated to reflect to new
12285 video API.
12286
12287 * term/gfxterm.c: Likewise.
12288
12289 * video/video.c: Likewise.
12290
12291 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12292 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12293 (bitmap_mod_SOURCES): New entry.
12294 (bitmap_mod_CFLAGS): Likewise.
12295 (bitmap_mod_LDFLAGS): Likewise.
12296 (tga_mod_SOURCES): Likewise.
12297 (tga_mod_CFLAGS): Likewise.
12298 (tga_mod_LDFLAGS): Likewise.
12299
12300 * include/grub/video.h (grub_video_blit_operators): New enum type.
12301 (grub_video_render_target): Changed as forward declaration and moved
12302 actual definition to be video driver specific.
12303 (grub_video_adapter.blit_bitmap): Added blitting operator.
12304 (grub_video_adapter.blit_render_target): Likewise.
12305 (grub_video_blit_bitmap): Likewise.
12306 (grub_video_blit_render_target): Likewise.
12307
12308 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12309 driver specific render target definition.
12310 (grub_video_vbe_map_rgba): Added driver internal helper.
12311 (grub_video_vbe_unmap_color): Updated to use
12312 grub_video_i386_vbeblit_info.
12313 (grub_video_vbe_get_video_ptr): Likewise.
12314
12315 * include/grub/i386/pc/vbeblit.h
12316 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12317 grub_video_i386_vbeblit_info.
12318 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12319 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12320 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12321 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12322 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12323 (grub_video_i386_vbeblit_index_index): Likewise.
12324 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12325 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12326 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12327 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12328 operator.
12329 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12330 operator.
12331
12332 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12333 include/grub/i386/pc/vbeblit.h.
12334
12335 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12336 Updated to use grub_video_i386_vbeblit_info.
12337 (grub_video_i386_vbefill_R8G8B8): Likewise.
12338 (grub_video_i386_vbefill_index): Likewise.
12339 (grub_video_i386_vbefill): Added generic filler.
12340
12341 * video/i386/pc/vbefill.c: Updated to reflect changes on
12342 include/grub/i386/pc/vbefill.h.
12343
12344 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12345 grub_video_i386_vbeblit_info.
12346 (grub_video_vbe_unmap_color): Likewise.
12347 (grub_video_vbe_blit_glyph): Likewise.
12348 (grub_video_vbe_scroll): Likewise.
12349 (grub_video_vbe_draw_pixel): Removed function.
12350 (grub_video_vbe_get_pixel): Likewise.
12351 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12352 updated code to use it.
12353 (common_blitter): Added common blitter for render target and bitmap.
12354 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12355 (grub_video_vbe_blit_render_target): Likewise.
12356
bc8c036d 123572006-07-30 Johan Rydberg <jrydberg@gnu.org>
12358
12359 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12360 is in text mode if there is no console control protocol instance
12361 available.
12362
684a8eff 123632006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12364
12365 * include/grub/video.h: Code cleanup.
12366
12367 * include/grub/i386/pc/vbe.h: Likewise.
12368
12369 * video/i386/pc/vbe.c: Likewise.
12370
12371 * video/i386/pc/vbeblit.c: Likewise.
12372
12373 * video/i386/pc/vbefill.c: Likewise.
12374
12375 * video/video.c: Likewise. Also added more comments.
12376
5915059b 123772006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12378
12379 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12380 (struct grub_biosdisk_dap): Likewise.
12381
12382 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12383 linkage settings for all functions.
12384
90ce5d56 123852006-07-12 Marco Gerards <marco@gnu.org>
12386
12387 * configure.ac (--enable-mm-debug): Fix typo.
12388
12389 * genkernsyms.sh.in: Use proper quoting for `CC'.
12390
43e7f879 123912006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12392
12393 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12394 (normal_mod_ASFLAGS): Remove "-m32".
12395
4889bdec 123962006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12397
12398 * util/misc.c: Include config.h.
12399 [!HAVE_MEMALIGN]: Do not include malloc.h.
12400 (grub_memalign): Use posix_memalign, if present. Then, use
12401 memalign, if present. Otherwise, emit an error.
12402
12403 * util/grub-emu.c: Do not include malloc.h.
12404
12405 * include/grub/util/misc.h: Include unistd.h. This is required for
12406 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12407 D. Eades III <hde@foobar-qux.org>.
12408
12409 * configure.ac (AC_GNU_SOURCE): Added.
12410 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12411 type.
12412
fd39d4da 124132006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12414
12415 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12416 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12417
b786f3b5 124182006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12419
12420 * include/grub/types.h (grub_host_addr_t): Rename to
12421 grub_target_addr_t.
12422 (grub_host_off_t): Rename to grub_target_off_t.
12423 (grub_host_size_t): Rename to grub_target_size_t.
12424 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12425 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12426
12427 * include/grub/kernel.h (struct grub_module_header): Change type
12428 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12429 (grub_module_info): Likewise.
f19dbdb7 12430
051988bb 124312006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12432
12433 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12434 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12435 Velazquez <jesus.velazquez@gmail.com>.
12436
deae281b 124372006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12438
12439 Count partitions from 1 instead of 0 in the string representation
12440 of partitions. Still use 0-based internally.
f19dbdb7 12441
deae281b 12442 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12443 (sun_partition_map_iterate): Use grub_partition_t instead of
12444 struct grub_partition *. Cast DESC->START_CYLINDER to
12445 grub_uint64_t after converting the endian.
12446 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12447 (sun_partition_map_get_name): Add 1 to P->INDEX.
12448
12449 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12450 PCDATA->DOS_PART.
12451 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12452
12453 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12454 zero instead of one.
12455 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12456 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12457
12458 * partmap/apple.c (apple_partition_map_iterate): Change the type
12459 of POS to unsigned.
12460 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12461 (apple_partition_map_get_name): Add 1 into P->INDEX.
12462
12463 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12464 of POS to unsigned.
12465 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12466 calculate the offset of a partition.
12467 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12468 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12469
12470 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12471 SECTOR to grub_disk_addr_t.
12472 (acorn_partition_map_iterate): Likewise.
12473 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12474 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12475 top.
12476 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12477
12478 * kern/i386/pc/init.c (make_install_device): Add 1 into
12479 GRUB_INSTALL_DOS_PART.
12480
12481 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12482 conditional.
12483
524a1e6a 124842006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12485
12486 Clean up the code to support 64-bit addressing in disks and
12487 files. This change is not enough for filesystems yet.
f19dbdb7 12488
524a1e6a 12489 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12490 type of "start" to grub_uint64_t.
12491 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12492 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12493 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12494 convert addresses.
12495
12496 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12497 to grub_disk_addr_t.
12498
12499 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12500 string.
12501
12502 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12503
12504 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12505 to char *.
12506
12507 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12508
12509 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12510
12511 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12512
12513 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12514 to grub_off_t, to detect an error from grub_file_seek.
12515 (grub_multiboot_load_elf32): Likewise.
12516
12517 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12518 maximum unsigned long value when an overflow is detected.
12519 (grub_strtoull): New function.
12520 (grub_divmod64): Likewise.
12521 (grub_lltoa): use grub_divmod64.
12522
12523 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12524 grub_disk_addr_t.
12525 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12526 the pointer to next character. Use grub_strtoull instead of
12527 grub_strtoul.
12528 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12529 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12530 respectively.
12531
fe6b695a 12532 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 12533 return value is signed.
12534 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12535 test if OFFSET is less than zero, as OFFSET is unsigned now.
12536
12537 * kern/disk.c (struct grub_disk_cache): Change the type of
12538 "sector" to grub_disk_addr_t.
12539 (grub_disk_cache_get_index): Change the type of SECTOR to
12540 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12541 unsigned after shifting.
12542 (grub_disk_cache_invalidate): Change the type of SECTOR to
12543 grub_disk_addr_t.
12544 (grub_disk_cache_unlock): Likewise.
12545 (grub_disk_cache_store): Likewise.
12546 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12547 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12548 grub_disk_addr_t and grub_uint64_t, respectively.
12549 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12550 body, as the value of OFFSET is tweaked by
12551 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12552 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12553 respectively.
12554 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12555 body, as the value of OFFSET is tweaked by
12556 grub_disk_check_range. Change the types of LEN and N to
12557 grub_size_t.
12558
12559 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12560 and "saved_offset" to grub_off_t.
12561 (test_header): Cast BUF to char *.
12562 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12563 to char *.
12564 (grub_gzio_read): Change the types of OFFSET and SIZE to
12565 grub_off_t and grub_size_t, respectively.
12566
12567 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12568 Removed.
12569 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12570 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12571 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12572 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12573 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12574
12575 * include/grub/types.h (grub_off_t): Unconditionally set to
12576 grub_uint64_t.
12577 (grub_disk_addr_t): Changed to grub_uint64_t.
12578
12579 * include/grub/partition.h (struct grub_partition): Change the
12580 types of "start", "len" and "offset" to grub_disk_addr_t,
12581 grub_uint64_t and grub_disk_addr_t, respectively.
12582 (grub_partition_get_start): Return grub_disk_addr_t.
12583 (grub_partition_get_len): Return grub_uint64_t.
12584
12585 * include/grub/misc.h (grub_strtoull): New prototype.
12586 (grub_divmod64): Likewise.
12587
12588 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12589 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12590 grub_off_t, respectively.
12591 All callers and references changed.
12592
12593 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12594 grub_size_t in "read".
12595 All callers and references changed.
12596
12597 * include/grub/file.h (struct grub_file): Change the types of
12598 "offset" and "size" to grub_off_t and grub_off_t,
12599 respectively. Change the type of SECTOR to grub_disk_addr_t in
12600 "read_hook".
12601 (grub_file_read): Change the type of LEN to grub_size_t.
12602 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12603 grub_off_t.
12604 (grub_file_size): Return grub_off_t.
12605 (grub_file_tell): Likewise.
12606 All callers and references changed.
12607
12608 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12609 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12610 "write".
12611 (struct grub_disk): Change the type of "total_sectors" to
12612 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 12613 "read_hook".
524a1e6a 12614 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12615 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12616 (grub_disk_write): Likewise.
12617 All callers and references changed.
12618
12619 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12620 char * for grub_strncmp to silence gcc.
12621 (grub_iso9660_mount): Likewise.
12622 (grub_iso9660_mount): Likewise.
12623 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12624 return statement.
12625 (grub_iso9660_iterate_dir): Likewise.
12626 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12627
12628 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12629 LEN to grub_disk_addr_t and grub_size_t, respectively.
12630
12631 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12632
12633 * fs/jfs.c (grub_jfs_read_file): Likewise.
12634
12635 * fs/minix.c (grub_jfs_read_file): Likewise.
12636
12637 * fs/sfs.c (grub_jfs_read_file): Likewise.
12638
12639 * fs/ufs.c (grub_jfs_read_file): Likewise.
12640
12641 * fs/xfs.c (grub_jfs_read_file): Likewise.
12642
12643 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12644 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12645 respectively.
12646
12647 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12648 BLKNR to -1 instead of returning GRUB_ERRNO.
12649 (grub_ext2_read_file): Change the types of SECTOR and
12650 LEN to grub_disk_addr_t and grub_size_t, respectively.
12651
12652 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12653 LEN to grub_disk_addr_t and grub_size_t, respectively.
12654
12655 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12656 grub_file_read.
12657
12658 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12659 string. Do not cast SECTOR explicitly.
12660
12661 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12662 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12663 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12664 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12665 over 2TB and LBA mode is not supported, raise an error.
12666 (get_safe_sectors): New function.
12667 (grub_biosdisk_read): Use get_safe_sectors.
12668 (grub_biosdisk_write): Likewise.
12669
12670 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12671 (grub_efidisk_write): Likewise.
12672
12673 * disk/loopback.c (delete_loopback): Cosmetic changes.
12674 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12675 correctly.
12676 (grub_loopback_open): Likewise.
12677 (grub_loopback_read): Likewise. Also, change the type of POS to
12678 grub_off_t, and fix the usage of grub_memset.
12679
12680 * commands/i386/pc/play.c: Include grub/machine/time.h.
12681
12682 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12683 print FILE->SIZE.
12684
12685 * commands/configfile.c: Include grub/env.h.
12686
12687 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12688 GRUB_ERRNO directly instead. Change the type of POS to
12689 grub_off_t. Follow the coding standard.
12690
12691 * commands/blocklist.c: Include grub/partition.h.
12692 (grub_cmd_blocklist): Return an error if the underlying device is
12693 not a disk. Take the starting sector of a partition into account,
12694 if a partition is used.
12695
12696 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12697 a length field.
12698 (lba_mode): Support 64-bit addresses.
12699 (chs_mode): Likewise.
12700 (copy_buffer): Adapted to the new offsets of a length field and a
12701 segment field.
12702 (blocklist_default_start): Allocate 64-bit space.
12703
12704 * boot/i386/pc/boot.S (force_lba): Removed.
12705 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 12706 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 12707 space.
12708 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12709 is useless.
12710 (lba_mode): Refactored to support a 64-bit address. More size
12711 optimization.
12712 (setup_sectors): Likewise.
12713
53af98ad 127142006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12715
12716 * DISTLIST: Added include/grub/i386/linux.h. Removed
12717 include/grub/i386/pc/linux.h
12718
12719 * configure.ac (AC_INIT): Bumped to 1.94.
12720
12721 * config.guess: Updated from gnulib.
12722 * config.sub: Likewise.
12723 * install-sh: Likewise.
12724 * mkinstalldirs: Likewise.
12725
b4c1940a 127262006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12727
12728 * conf/common.rmk (grub_modules_init.lst): Depended on
12729 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12730 MODSRCFILES.
12731
12732 * genmk.rb (PModule::rule): Reverted the previous change.
12733
cfca1cfd 127342006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12735
12736 * conf/common.rmk (grub_modules_init.lst): Depends on
12737 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12738 that the target does not exist before producing.
12739 (grub_modules_init.h): Remove the target before generating.
12740 (grub_emu_init.c): Likewise.
12741
12742 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12743
aa6d7826 127442006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12745
12746 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12747 for the target-specific tests. Make sure that we also have the
12748 up-to-date target variables for those tests.
12749
26c607b9 127502006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12751
12752 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12753 (PModule::rule): Likewise.
12754
0162321a 127552006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12756
12757 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12758 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12759 target-specific flags should be prefixed.
12760 (PModule::rule): Likewise.
12761
6c826348 127622006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12763
12764 * configure.ac (CMP): Check if cmp is available explicitly.
12765
b977bf01 127662006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12767
12768 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12769 (target_cpu): New variable.
12770 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 12771
b977bf01 12772 * util/i386/pc/grub-install.in (host_cpu): Removed.
12773 (target_cpu): New variable.
12774 (pkglibdir): Use target_cpu instead of host_cpu.
12775
12776 * util/genmoddep.c: Removed.
f19dbdb7 12777
b977bf01 12778 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12779 instead of GRUB_HOST_SIZEOF_VOID_P.
12780 * kern/dl.c: Likewise.
12781
12782 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12783 ...
12784 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12785 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12786 (GRUB_TARGET_SIZEOF_LONG): ... this.
12787 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12788 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12789 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12790 to ...
12791 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12792 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12793 (GRUB_TARGET_SIZEOF_LONG): ... this.
12794 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12795 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12796 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12797 to ...
12798 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12799 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12800 (GRUB_TARGET_SIZEOF_LONG): ... this.
12801 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12802 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12803
12804 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12805 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12806 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12807 instead of GRUB_HOST_SIZEOF_LONG.
12808 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12809 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12810 GRUB_CPU_WORDS_BIGENDIAN.
12811 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12812 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12813 grub_host_ssize_t.
12814
12815 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12816 (genmoddep_SOURCES): Likewise.
12817 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12818 (genmoddep_SOURCES): Likewise.
12819 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12820 (genmoddep_SOURCES): Likewise.
12821 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12822 Likewise.
12823 (genmoddep_SOURCES): Likewise.
12824
12825 * genmoddep.awk: New file.
12826
12827 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12828 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12829 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12830 (PModule::rule): Likewise.
12831 (Program::rule): Likewise.
12832 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12833 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12834 respectively.
12835
12836 * configure.ac: Rewritten intensively to use host and target
12837 instead of build and host, respectively.
12838
12839 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12840 (host_cpu): Removed.
12841 (target_cpu): New variable.
12842 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12843 (BUILD_CC): Removed.
12844 (BUILD_CFLAGS): Likewise.
12845 (BUILD_CPPFLAGS): Likewise.
12846 (TARGET_CC): New variable.
12847 (TARGET_CFLAGS): Likewise.
12848 (TARGET_CPPFLAGS): Likewise.
12849 (TARGET_LDFLAGS): Likewise.
12850 (AWK): Likewise.
12851 (include): Use target_cpu instead of host_cpu.
12852 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 12853
b977bf01 12854 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12855
f09771a1 128562006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12857
12858 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12859 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12860 field 'false' to 'exec_on_false'.
12861 (grub_script_create_cmdif): Renamed argument names to reflect above
12862 changes.
12863
12864 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12865
12866 * normal/script.c (grub_script_create_cmdif): Likewise.
12867
118f4fb3 128682006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12869
12870 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12871 top.
12872 (grub_hfsplus_btree_recptr): Likewise.
12873 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12874 FILEBLOCK both to pass a block number and store next block
12875 number.
12876 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12877 overflow file correctly. Specify errors appropriately, because
12878 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12879 grub_hfsplus_btree_recptr to get the pointer to a found key.
12880 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12881 is found.
12882
12883 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12884 linux.mod.
12885 (_linux_mod_SOURCES): New variable.
12886 (_linux_mod_CFLAGS): Likewise.
12887 (_linux_mod_LDFLAGS): Likewise.
12888 (linux_mod_SOURCES): Likewise.
12889 (linux_mod_CFLAGS): Likewise.
12890 (linux_mod_LDFLAGS): Likewise.
12891
12892 * DISTLIST: Added loader/i386/efi/linux.c,
12893 loader/i386/efi/linux_normal.c and
12894 include/grub/i386/efi/loader.h.
12895
12896 * loader/i386/efi/linux.c: New file.
12897 * loader/i386/efi/linux_normal.c: Likewise.
12898 * include/grub/i386/efi/loader.h: Likewise.
12899
89a7d726 129002006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12901
12902 * commands/blocklist.c: New file.
12903
12904 * DISTLIST: Added commands/blocklist.c.
12905
12906 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 12907 color for the background, and a darker color for the foreground.
89a7d726 12908 (grub_console_checkkey): Return READ_KEY.
12909 (grub_console_cls): Set the background to
12910 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12911
12912 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12913
12914 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12915 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12916
12917 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12918 prototype.
12919
12920 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12921 BG. The spec is wrong again.
12922
12923 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12924 prototype.
12925 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12926
12927 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12928 commands/blocklist.c.
12929 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 12930
89a7d726 12931 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12932 (blocklist_mod_SOURCES): New variable.
12933 (blocklist_mod_CFLAGS): Likewise.
12934 (blocklist_mod_LDFLAGS): Likewise.
12935
75c8f258 129362006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12937
12938 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12939 duplication.
12940 (lba_mode): Use %eax more intensively to reduce the code size.
12941
da2eb181 129422006-05-20 Marco Gerards <marco@gnu.org>
12943
12944 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12945
12946 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12947 for `menuentry'.
12948 (script): Accept leading newlines.
12949 (newlines): New rule to describe 0 or more newlines.
12950 (commands): Accept `command' with trailing newline. Fixed the
12951 order in which arguments were passed to `grub_script_add_cmd'.
12952 Accept commands separated by newlines.
12953 (function): Changed to accept newlines.
12954 (menuentry) Rewritten.
12955
12956 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12957 front of the list, instead of to the end.
12958
577b4050 129592006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12960
12961 * util/i386/pc/grub-install.in (bindir): New variable.
12962 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12963 Shaver <lbgwjl@gmail.com>.
12964
0d6e1189 129652006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12966
12967 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12968 grub/machine/linux.h
12969 * loader/i386/pc/linux.c: Likewise.
12970
12971 * include/grub/i386/pc/linux.h: Moved to ...
12972 * include/grub/i386/linux.h: ... here.
12973
12974 * include/grub/i386/linux.h (struct linux_kernel_params): New
12975 struct.
f19dbdb7 12976
31b86e9f 129772006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12978
12979 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12980 checking.
12981 (grub_video_vbe_blit_glyph): Likewise.
12982 (grub_video_vbe_blit_bitmap): Likewise.
12983 (grub_video_vbe_blit_render_target): Likewise.
12984
83b984de 129852006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12986
12987 * configure.ac (--with-platform): Properly quote the square
12988 brackets.
12989
5f0413bd 129902006-05-08 Marco Gerards <marco@gnu.org>
12991
12992 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12993 this...
12994 (kernel_elf_HEADERS): ...to this. Updated all users.
12995 (grubof_symlist.c): Renamed from this...
12996 (kernel_elf_symlist.c): ...to this. Updated all users.
12997 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12998 (grubof_SOURCES): Renamed from this...
12999 (kernel_elf_SOURCES): ...to this.
13000 (grubof_HEADERS): Renamed from this...
13001 (kernel_elf_HEADERS): ...to this.
13002 (grubof_CFLAGS): Renamed from this...
13003 (kernel_elf_CFLAGS): ...to this.
13004 (grubof_ASFLAGS): Renamed from this...
13005 (kernel_elf_ASFLAGS): ...to this.
13006 (grubof_LDFLAGS): Renamed from this...
13007 (kernel_elf_LDFLAGS): ...to this.
13008
13009 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13010 this...
13011 (kernel_elf_HEADERS): ...to this. Updated all users.
13012 (grubof_symlist.c): Renamed from this...
13013 (kernel_elf_symlist.c): ...to this. Updated all users.
13014 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13015 (grubof_SOURCES): Renamed from this...
13016 (kernel_elf_SOURCES): ...to this.
13017 (grubof_HEADERS): Renamed from this...
13018 (kernel_elf_HEADERS): ...to this.
13019 (grubof_CFLAGS): Renamed from this...
13020 (kernel_elf_CFLAGS): ...to this.
13021 (grubof_ASFLAGS): Renamed from this...
13022 (kernel_elf_ASFLAGS): ...to this.
13023 (grubof_LDFLAGS): Renamed from this...
13024 (kernel_elf_LDFLAGS): ...to this.
13025
13026 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13027 `kernel.elf' instead of `grubof'.
13028
05568c2e 130292006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
13030
13031 Add --with-platform to configure. Use pkglibdir instead of
13032 pkgdatadir. This is reported by Roger Leigh.
13033
13034 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13035 (host_vendor): Likewise.
13036 (host_os): Likewise.
13037 (pkgdatadir): Likewise.
13038 (platform): New variable.
13039 (pkglibdir): Likewise.
13040 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 13041
05568c2e 13042 * util/i386/pc/grub-install.in (datadir): Removed.
13043 (host_vendor): Likewise.
13044 (host_os): Likewise.
13045 (pkgdatadir): Likewise.
13046 (platform): New variable.
13047 (pkglibdir): Likewise.
13048 Use PKGLIBDIR instead of PKGDATADIR.
13049
13050 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13051 instead of GRUB_DATADIR.
13052 (main): Likewise.
13053 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13054 (main): Likewise.
13055 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13056 (main): Likewise.
13057
13058 * configure.ac (--with-platform): New option.
13059 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13060
13061 * Makefile.in: Include a makefile based on PLATFORM instead of
13062 HOST_VENDOR.
13063 (pkgdatadir): Not appended by the machine type.
13064 (pkglibdir): Appended by the machine type.
13065 (host_vendor): Removed.
13066 (platform): New variable.
13067 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13068 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13069 (uninstall): Likewise.
13070
4e93851c 130712006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13072
13073 Use the environment context in the menu. Remove the commands
13074 "default" and "timeout", and use variables instead.
f19dbdb7 13075
4e93851c 13076 * normal/menu.c: Include grub/env.h.
13077 (print_entry): Cast TITLE to silence gcc.
13078 (get_timeout): New function.
13079 (set_timeout): Likewise.
13080 (get_entry_number): Likewise.
13081 (run_menu): Use a default entry, a fallback entry and a timeout
13082 in the environment variables "default", "fallback" and
13083 "timeout". Also, tweak the default entry if it is not within the
13084 current menu entries.
13085 (grub_menu_run): Use a fallback entry in the environment variable
13086 "fallback".
13087
13088 * normal/main.c (read_config_file): Do not initialize
13089 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13090 NEWMENU->TIMEOUT.
13091 (grub_normal_execute): Use a data slot to store the menu.
13092
13093 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13094 fallback_entry and timeout.
13095 (struct grub_menu_list): Removed.
13096 (grub_menu_list_t): Likewise.
13097 (struct grub_context): Likewise.
13098 (grub_context_t): Likewise.
13099 (grub_context_get): Likewise.
13100 (grub_context_get_current_menu): Likewise.
13101 (grub_context_push_menu): Likewise.
13102 (grub_context_pop_menu): Likewise.
13103 (grub_default_init): Likewise.
13104 (grub_default_fini): Likewise.
13105 (grub_timeout_init): Likewise.
13106 (grub_timeout_fini): Likewise.
13107
13108 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13109 and timeout.mod.
13110 (normal_mod_SOURCES): Removed normal/context.c.
13111
13112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13113 commands/default.c, commands/timeout.c and normal/context.c.
13114 (normal_mod_SOURCES): Removed normal/context.c.
13115
13116 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13117 commands/timeout.c and normal/context.c.
13118 (normal_mod_SOURCES): Removed normal/context.c.
13119
13120 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13121 commands/default.c, commands/timeout.c and normal/context.c.
13122 (normal_mod_SOURCES): Removed normal/context.c.
13123
13124 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13125 timeout.mod.
13126 (default_mod_SOURCES): Removed.
13127 (default_mod_CFLAGS): Likewise.
13128 (default_mod_LDFLAGS): Likewise.
13129 (timeout_mod_SOURCES): Removed.
13130 (timeout_mod_CFLAGS): Likewise.
13131 (timeout_mod_LDFLAGS): Likewise.
13132
13133 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13134 normal/context.c.
13135
13136 * commands/default.c: Removed.
13137 * commands/timeout.c: Likewise.
13138 * normal/context.c: Likewise.
13139
1eb9cc1d 131402006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13141
13142 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13143
385bd9c1 131442006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13145
13146 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13147 "next" to "prev" for readability.
13148 (struct grub_env_sorted_var): New struct.
13149 (grub_env_context): Renamed to ...
13150 (initial_context): ... this.
13151 (grub_env_var_context): Renamed to ...
13152 (current_context): ... this.
13153 (grub_env_find): Look only at CURRENT_CONTEXT.
13154 (grub_env_context_open): Rewritten to copy exported variables from
13155 previous context.
13156 (grub_env_context_close): Rewritten according to the new
13157 scheme. Also, add an assertion to prevent the initial context from
13158 removed.
13159 (grub_env_insert): Removed the code for the sorted list.
13160 (grub_env_remove): Likewise.
13161 (grub_env_export): Simply mark the variable with
13162 GRUB_ENV_VAR_GLOBAL.
13163 (grub_env_set): A cosmetic change for naming consistency.
13164 (grub_env_get): Likewise.
13165 (grub_env_unset): Likewise.
13166 (grub_env_iterate): Rewritten to sort variables within this
13167 function.
13168 (grub_register_variable_hook): Fixed for naming consistency. Call
13169 grub_env_find again, only if NAME is not found at the first time.
13170 (mangle_data_slot_name): New function.
13171 (grub_env_set_data_slot): Likewise.
13172 (grub_env_get_data_slot): Likewise.
13173 (grub_env_unset_data_slot): Likewise.
13174
13175 * include/grub/env.h (grub_env_var_type): New enum.
13176 (GRUB_ENV_VAR_LOCAL): New constant.
13177 (GRUB_ENV_VAR_GLOBAL): Likewise.
13178 (GRUB_ENV_VAR_DATA): Likewise.
13179 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13180 "type".
13181 (grub_env_set): Replace VAR with NAME for consistency.
13182 (grub_register_variable_hook): Likewise.
13183 (grub_env_export): Specify the name of the argument.
13184 (grub_env_set_data_slot): New prototype.
13185 (grub_env_get_data_slot): Likewise.
13186 (grub_env_unset_data_slot): Likewise.
13187
7f362539 131882006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13189
13190 Extend the loader so that GRUB can accept a loader which comes
13191 back to GRUB when a loaded image exits. Also, this change adds
13192 support for a chainloader on EFI.
f19dbdb7 13193
7f362539 13194 * term/efi/console.c: Include grub/misc.h.
13195 (grub_console_checkkey): Display a scan code on the top for
13196 debugging. This will be removed once the EFI port gets stable.
13197 Correct the scan code mapping.
13198
13199 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13200 allocate memory from larger regions, in order to reduce the number
13201 of allocated regions. Otherwise, the MacOSX loader panics.
13202 (filter_memory_map): Avoid less than 1MB for compatibility with
13203 other loaders.
13204 (add_memory_regions): Allocate from the tail of a region, if
13205 possible, to avoid allocating a region near to 1MB, for the MacOSX
13206 loader.
13207
13208 * kern/efi/init.c (grub_efi_set_prefix): Specify
13209 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13210
13211 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13212 argument IMAGE_HANDLE and specify it to get a loaded image.
13213 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13214 grub_efi_get_loaded_image.
fe6b695a 13215 (grub_efi_get_filename): Divide the length by the size of
7f362539 13216 grub_efi_char16_t.
13217 (grub_efi_get_device_path): New function.
13218 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13219 the length by the size of grub_efi_char16_t for a file path device
13220 path node.
13221
13222 * kern/loader.c (grub_loader_noreturn): New variable.
13223 (grub_loader_set): Accept a new argument NORETURN. Set
13224 GRUB_LOADER_NORETURN to NORETURN.
13225 All callers changed.
13226 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13227 grub_machine_fini.
13228
13229 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13230 prototype.
13231 (grub_efi_get_loaded_image): Take an argument to specify an image
13232 handle.
13233
13234 * include/grub/loader.h (grub_loader_set): Added one more argument
13235 NORETURN.
13236
13237 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13238 instead of grub_efi_open_protocol.
13239 (grub_efidisk_get_device_name): Likewise.
13240 (grub_efidisk_close): Print a newline.
13241 (grub_efidisk_get_device_handle): Fixed to use
13242 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13243 GRUB_EFI_DEVICE_PATH_TYPE.
13244
13245 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13246 * kern/efi/efi.c (device_path_guid): ... here.
13247
13248 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13249 chain.mod.
13250 (kernel_mod_HEADERS): Added efi/disk.h.
13251 (_chain_mod_SOURCES): New variable.
13252 (_chain_mod_CFLAGS): Likewise.
13253 (_chain_mod_LDFLAGS): Likewise.
13254 (chain_mod_SOURCES): Likewise.
13255 (chain_mod_CFLAGS): Likewise.
13256 (chain_mod_LDFLAGS): Likewise.
13257
13258 * DISTLIST: Added include/grub/efi/chainloader.h,
13259 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13260
13261 * include/grub/efi/chainloader.h: New file.
13262 * loader/efi/chainloader.c: Likewise.
13263 * loader/efi/chainloader_normal.c: Likewise.
13264
c0111d6e 132652006-04-30 Marco Gerards <marco@gnu.org>
13266
13267 * commands/configfile.c (grub_cmd_source): New function.
13268 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13269 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13270
df5341da 132712006-04-30 Marco Gerards <marco@gnu.org>
13272
13273 * normal/execute.c (grub_script_execute_cmd): Change the return
13274 type to `grub_err_t'. Correctly return the error.
13275 (grub_script_execute_cmdline): In case a command line is not a
13276 command or a function, try to interpret it as an assignment.
13277
f85934bd 132782006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13279
13280 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13281 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13282 skip a node whose name is obviously invalid as UTF-16,
13283 i.e. contains a NUL character. Stop the iteration when the last
13284 directory entry is found. Instead of using the return value of
13285 grub_hfsplus_btree_iterate_node, store the value in RET and use
13286 it, because the iterator can be stopped by the last directory
13287 entry.
13288
8f8a2cf8 132892006-04-30 Marco Gerards <marco@gnu.org>
13290
13291 * include/grub/env.h (grub_env_export): New prototype. Reported
13292 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13293
a27e84ce 132942006-04-30 Marco Gerards <marco@gnu.org>
13295
13296 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13297 size of the extents in a catalog file record.
13298
eaef0553 132992006-04-29 Marco Gerards <marco@gnu.org>
13300
13301 * commands/configfile.c (grub_cmd_configfile): Execute the
13302 configfile within its own context.
13303
13304 * include/grub/env.h (grub_env_context_open): New prototype.
13305 (grub_env_context_close): Likewise.
13306
13307 * kern/env.c (grub_env): Removed.
13308 (grub_env_sorted): Likewise.
13309 (grub_env_context): New variable.
13310 (grub_env_var_context): Likewise.
13311 (grub_env_find): Search both the active context and the global
13312 context.
13313 (grub_env_context_open): New function.
13314 (grub_env_context_close): Likewise.
13315 (grub_env_insert): Likewise.
13316 (grub_env_remove): Likewise.
13317 (grub_env_export): Likewise.
13318 (grub_env_set): Changed to use helper functions to avoid code
13319 duplication.
13320 (grub_env_iterate): Rewritten so both the current context and the
13321 global context are being used.
13322
13323 * normal/command.c (export_command): New function.
13324 (grub_command_init): Register the `export' function.
13325
7b455f4d 133262006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13327
13328 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13329 explicitly to suppress gcc's warnings.
13330 * fs/fat.c (grub_fat_find_dir): Likewise.
13331 (grub_fat_label): Likewise.
13332 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13333 (grub_xfs_mount): Likewise.
13334 (grub_xfs_label): Likewise.
13335 * fs/affs.c (grub_affs_mount): Likewise.
13336 (grub_affs_label): Likewise.
13337 (grub_affs_iterate_dir): Likewise.
13338 * fs/sfs.c (grub_sfs_mount): Likewise.
13339 (grub_sfs_iterate_dir): Likewise.
13340 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13341 * fs/hfs.c (grub_hfs_mount): Likewise.
13342 (grub_hfs_cmp_catkeys): Likewise.
13343 (grub_hfs_find_dir): Likewise.
13344 (grub_hfs_dir): Likewise.
13345 (grub_hfs_label): Likewise.
13346 * fs/jfs.c (grub_jfs_mount): Likewise.
13347 (grub_jfs_opendir): Likewise.
13348 (grub_jfs_getent): Likewise.
13349 (grub_jfs_lookup_symlink): Likewise.
13350 (grub_jfs_label): Likewise.
13351 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13352 (grub_hfsplus_iterate_dir): Likewise.
13353 (grub_hfsplus_btree_iterate_node): Made static.
13354
13355 * util/grub-emu.c (prefix): New variable.
13356 (grub_machine_set_prefix): New function.
13357 (main): Do not set the environment variable "prefix" here. Only
13358 set PREFIX, which is used later by grub_machine_set_prefix.
13359
13360 * include/grub/video.h: Do not include grub/symbol.h.
13361 (grub_video_register): Not exported. This symbol is not defined in
13362 the kernel.
13363 (grub_video_unregister): Likewise.
13364 (grub_video_iterate): Likewise.
13365 (grub_video_setup): Likewise.
13366 (grub_video_restore): Likewise.
13367 (grub_video_get_info): Likewise.
13368 (grub_video_get_blit_format): Likewise.
13369 (grub_video_set_palette): Likewise.
13370 (grub_video_get_palette): Likewise.
13371 (grub_video_set_viewport): Likewise.
13372 (grub_video_get_viewport): Likewise.
13373 (grub_video_map_color): Likewise.
13374 (grub_video_map_rgb): Likewise.
13375 (grub_video_map_rgba): Likewise.
13376 (grub_video_fill_rect): Likewise.
13377 (grub_video_blit_glyph): Likewise.
13378 (grub_video_blit_bitmap): Likewise.
13379 (grub_video_blit_render_target): Likewise.
13380 (grub_video_scroll): Likewise.
13381 (grub_video_swap_buffers): Likewise.
13382 (grub_video_create_render_target): Likewise.
13383 (grub_video_delete_render_target): Likewise.
13384 (grub_video_set_active_render_target): Likewise.
13385
13386 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13387 Undefined.
13388 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13389
13390 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13391 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13392 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13393 instead of $(srcdir)/genkernsyms.sh.
13394
13395 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13396 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13397 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13398 instead of $(srcdir)/genkernsyms.sh.
13399
13400 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13401 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13402 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13403 instead of $(srcdir)/genkernsyms.sh.
13404
13405 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13406 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13407 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13408 instead of $(srcdir)/genkernsyms.sh.
13409
13410 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13411 genkernsyms.sh.
13412
13413 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13414 genkernsyms.sh.
13415 (gensymlist.sh): New target.
13416 (genkernsyms.sh): Likewise.
13417
13418 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13419 genkernsyms.sh.in and gensymlist.sh.in.
13420
13421 * genkernsyms.sh: Removed.
13422 * gensymlist.sh: Likewise.
f19dbdb7 13423
7b455f4d 13424 * genkernsyms.sh.in: New file.
13425 * gensymlist.sh.in: Likewise.
13426
1885bb27 134272006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13428
13429 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13430 clobber "prefix", since we may have already set it manually.
13431
71538dff 134322006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13433
13434 * kern/misc.c (abort): New alias for grub_abort.
13435
2965c7cc 134362006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13437
13438 A new machine-specific function "grub_machine_set_prefix" is
13439 defined. This is called after loading modules, so that a prefix
13440 initialization can use modules. Also, this change adds an
13441 intensive debugging feature for the memory manager via the
13442 configure option "--enable-mm-debug".
f19dbdb7 13443
2965c7cc 13444 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13445 PART.LEN.
13446
13447 * kern/sparc64/ieee1275/init.c (abort): Removed.
13448 (grub_stop): Likewise.
13449 (grub_exit): New function.
13450 (grub_set_prefix): Renamed to ...
13451 (grub_machine_set_prefix): ... this.
13452 (grub_machine_init): Do not call grub_set_prefix.
13453
13454 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13455 (grub_machine_set_prefix): ... this.
13456 (grub_machine_init): Do not call grub_set_prefix.
13457
13458 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13459 (grub_machine_init): Do not set the prefix here.
13460
13461 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13462
13463 * kern/efi/init.c: Include grub/mm.h.
13464 (grub_efi_set_prefix): New function.
13465
13466 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13467 (grub_efi_get_filename): New function.
13468 (grub_print_device_path): Renamed to ...
13469 (grub_efi_print_device_path): ... this.
13470
13471 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13472 [MM_DEBUG] (grub_realloc): Likewise.
13473 [MM_DEBUG] (grub_free): Likewise.
13474 [MM_DEBUG] (grub_memalign): Likewise.
13475 [MM_DEBUG] (grub_mm_debug): New variable.
13476 [MM_DEBUG] (grub_debug_malloc): New function.
13477 [MM_DEBUG] (grub_debug_free): New function.
13478 [MM_DEBUG] (grub_debug_realloc): New function.
13479 [MM_DEBUG] (grub_debug_memalign): New function.
13480
13481 * kern/misc.c (grub_abort): Print a newline to distinguish
13482 the message.
13483
13484 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13485 grub_set_root_dev after loading modules. This is necessary when
13486 setting a prefix depends on modules.
13487
13488 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13489 (grub_efi_print_device_path): ... this.
13490 (grub_efi_get_filename): New prototype.
13491 (grub_efi_set_prefix): Likewise.
13492
13493 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13494 and grub/disk.h.
13495 (grub_efidisk_get_device_handle): New prototype.
13496 (grub_efidisk_get_device_name): Likewise.
13497
13498 * include/grub/mm.h: Include config.h.
13499 (MM_DEBUG): Removed.
13500 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13501 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13502 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13503 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13504 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13505 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13506 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13507 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13508 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13509
13510 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13511
13512 * disk/efi/efidisk.c: Include grub/partition.h.
13513 (iterate_child_devices): New function.
13514 (add_device): First, compare only last device path nodes, so that
13515 devices are sorted by the types.
13516 (grub_efidisk_get_device_handle): New function.
13517 (grub_efidisk_get_device_name): Likewise.
13518
13519 * configure.ac (--enable-mm-debug): New option to enable the
13520 memory manager debugging feature. This makes the binary much
13521 bigger, so is disabled by default.
13522
9cacaa17 135232006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13524
13525 Use grub_abort instead of grub_stop, and grub_exit must be
13526 define in each architecture now. Also, this change adds support
13527 for EFI disks.
f19dbdb7 13528
9cacaa17 13529 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13530 (grub_getkey): New function.
13531 (grub_term_get_current): Likewise.
13532
13533 * util/i386/pc/grub-setup.c: Include grub/term.h.
13534 (grub_getkey): New function.
13535 (grub_term_get_current): Likewise.
13536
13537 * util/misc.c (grub_stop): Renamed to ...
13538 (grub_exit): ... this.
13539
13540 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13541 (grub_exit): ... this.
13542 (grub_machine_init): Use grub_abort instead of abort.
13543 (grub_stop): Removed.
13544
13545 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13546 abort.
13547
13548 * kern/i386/pc/startup.S (grub_exit): New function.
13549 (cold_reboot): New label.
13550
13551 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13552 (grub_efi_init): Call grub_efidisk_init.
13553 (grub_efi_fini): Call grub_efidisk_fini.
13554
13555 * kern/efi/efi.c: Include grub/mm.h.
13556 (grub_efi_console_control_guid): Renamed to ...
13557 (console_control_guid): ... this.
13558 (grub_efi_loaded_image_guid): Renamed to ...
13559 (loaded_image_guid): ... this.
13560 (grub_efi_locate_handle): New function.
13561 (grub_efi_open_protocol): Likewise.
13562 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13563 GRUB_EFI_CONSOLE_CONTROL_GUID.
13564 (grub_efi_exit): Removed.
13565 (grub_stop): Likewise.
13566 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13567 (grub_exit): New function.
13568 (grub_print_device_path): Likewise.
13569
13570 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13571 (grub_enter_rescue_mode): Register "exit".
13572
13573 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13574 (grub_abort): New function.
13575
13576 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13577
13578 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13579
13580 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13581
13582 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13583 (grub_print_device_path): New prototype.
13584 (grub_efi_locate_handle): Likewise.
13585 (grub_efi_open_protocol): Likewise.
13586
13587 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13588 * disk/efi/efidisk.c: Likewise.
13589
13590 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13591
13592 * include/grub/efi/console_control.h
13593 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13594
13595 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13596 last 8 bytes as an array.
13597 (GRUB_EFI_DISK_IO_GUID): New macro.
13598 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13599 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13600 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13601 grub_uint8_t.
13602 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13603 (struct grub_efi_device_path): Rename the member "sub_type" to
13604 "subtype".
13605 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13606 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13607 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13608 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13609 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13610 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13611 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13612 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13613 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13614 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13615 (struct grub_efi_pci_device_path): New structure.
13616 (grub_efi_pci_device_path_t): New type.
13617 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13618 (struct grub_efi_pccard_device_path): New structure.
13619 (grub_efi_pccard_device_path_t): New type.
13620 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13621 (struct grub_efi_memory_mapped_device_path): New structure.
13622 (grub_efi_memory_mapped_device_path_t): New type.
13623 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13624 (struct grub_efi_vendor_device_path): New structure.
13625 (grub_efi_vendor_device_path_t): New type.
13626 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13627 (struct grub_efi_controller_device_path): New structure.
13628 (grub_efi_controller_device_path_t): New type.
13629 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13630 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13631 (struct grub_efi_acpi_device_path): New structure.
13632 (grub_efi_acpi_device_path_t): New type.
13633 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13634 (struct grub_efi_expanded_acpi_device_path): New structure.
13635 (grub_efi_expanded_acpi_device_path_t): New type.
13636 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13637 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13638 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13639 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13640 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13641 (struct grub_efi_atapi_device_path): New structure.
13642 (grub_efi_atapi_device_path_t): New type.
13643 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13644 (struct grub_efi_fibre_channel_device_path): New structure.
13645 (grub_efi_fibre_channel_device_path_t): New type.
13646 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13647 (struct grub_efi_1394_device_path): New structure.
13648 (grub_efi_1394_device_path_t): New type.
13649 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13650 (struct grub_efi_usb_device_path): New structure.
13651 (grub_efi_usb_device_path_t): New type.
13652 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13653 (struct grub_efi_usb_class_device_path): New structure.
13654 (grub_efi_usb_class_device_path_t): New type.
13655 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13656 (struct grub_efi_i2o_device_path): New structure.
13657 (grub_efi_i2o_device_path_t): New type.
13658 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13659 (struct grub_efi_mac_address_device_path): New structure.
13660 (grub_efi_mac_address_device_path_t): New type.
13661 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13662 (struct grub_efi_ipv4_device_path): New structure.
13663 (grub_efi_ipv4_device_path_t): New type.
13664 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13665 (struct grub_efi_ipv6_device_path): New structure.
13666 (grub_efi_ipv6_device_path_t): New type.
13667 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13668 (struct grub_efi_infiniband_device_path): New structure.
13669 (grub_efi_infiniband_device_path_t): New type.
13670 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13671 (struct grub_efi_uart_device_path): New structure.
13672 (grub_efi_uart_device_path_t): New type.
13673 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13674 (struct grub_efi_vendor_messaging_device_path): New structure.
13675 (grub_efi_vendor_messaging_device_path_t): New type.
13676 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13677 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13678 (struct grub_efi_hard_drive_device_path): New structure.
13679 (grub_efi_hard_drive_device_path_t): New type.
13680 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13681 (struct grub_efi_cdrom_device_path): New structure.
13682 (grub_efi_cdrom_device_path_t): New type.
13683 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13684 (struct grub_efi_vendor_media_device_path): New structure.
13685 (grub_efi_vendor_media_device_path_t): New type.
13686 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13687 (struct grub_efi_file_path_device_path): New structure.
13688 (grub_efi_file_path_device_path_t): New type.
13689 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13690 (struct grub_efi_protocol_device_path): New structure.
13691 (grub_efi_protocol_device_path_t): New type.
13692 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13693 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13694 (struct grub_efi_bios_device_path): New structure.
13695 (grub_efi_bios_device_path_t): New type.
13696 (struct grub_efi_disk_io): New structure.
13697 (grub_efi_disk_io_t): New type.
13698 (struct grub_efi_block_io_media): New structure.
13699 (grub_efi_block_io_media_t): New type.
13700 (struct grub_efi_block_io): New structure.
13701 (grub_efi_block_io_t): New type.
13702
13703 * include/grub/misc.h (grub_stop): Removed.
13704 (grub_exit): New prototype.
13705 (grub_abort): Likewise.
13706
13707 * include/grub/disk.h (enum grub_disk_dev_id): Added
13708 GRUB_DISK_DEVICE_EFIDISK_ID.
13709
13710 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13711 disk/efi/efidisk.c.
13712 (kernel_syms.lst): Remove the target if an error occurs.
13713
49986a9f 137142006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13715
13716 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13717 as it was simply too buggy.
13718
970d3b8a 137192006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13720
13721 * kern/misc.c (grub_lltoa): New function.
13722 (grub_vsprintf): Added support for the long long suffix,
13723 i.e. "ll".
13724
ff04ec24 137252006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13726
13727 * Makefile.in (LDFLAGS): Add variable.
13728 (LD): Remove variable.
13729 * configure.ac: Add -m32 to LDFLAGS.
13730 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13731 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13732 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13733 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13734 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13735 variables.
13736 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13737 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13738 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13739
37e5e1a4 137402006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13741
13742 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13743 length for unknown glyph.
13744
c352d8dd 137452006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13746
2eab1c0d 13747 Add support for pre-loaded modules into the EFI port.
f19dbdb7 13748
2eab1c0d 13749 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13750 completely. Accept one more argument DIR. The caller has changed.
13751
13752 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13753
13754 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13755 (grub_efi_loaded_image_guid): New variable.
13756 (grub_efi_get_loaded_image): New function.
13757 (grub_arch_modules_addr): Likewise.
13758
13759 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13760 prototype.
13761
13762 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13763 (struct grub_efi_loaded_image): New structure.
13764 (grub_efi_loaded_image_t): New type.
13765
137662006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13767
c352d8dd 13768 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13769 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13770 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13771
6d01d6b4 137722006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13773
13774 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13775
976a4ea0 137762006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13777
13778 * DISTLIST: Added include/grub/efi/console.h,
13779 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13780 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13781
13782 * include/grub/efi/console.h: New file.
13783 * include/grub/efi/time.h: Likewise.
13784 * include/grub/i386/efi/kernel.h: Likewise.
13785 * kern/efi/init.c: Likewise.
13786 * kern/efi/mm.c: Likewise.
13787 * term/efi/console.c: Likewise.
f19dbdb7 13788
976a4ea0 13789 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13790 (grub_stop): Removed.
13791 (grub_get_rtc): Likewise.
13792 (grub_machine_init): Simply call grub_efi_init.
13793 (grub_machine_fini): Call grub_efi_fini.
13794
13795 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13796 (grub_efi_output_string): Removed.
13797 (grub_efi_stall): New function.
13798 (grub_stop): Likewise.
13799 (grub_get_rtc): Likewise.
13800
13801 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13802 (grub_efi_stall): New prototype.
13803 (grub_efi_allocate_pages): Likewise.
13804 (grub_efi_free_pages): Likewise.
13805 (grub_efi_get_memory_map): Likewise.
13806 (grub_efi_mm_init): Likewise.
13807 (grub_efi_mm_fini): Likewise.
13808 (grub_efi_init): Likewise.
13809 (grub_efi_fini): Likewise.
13810
13811 * include/grub/i386/efi/time.h: Do not include
13812 grub/symbol.h. Include grub/efi/time.h.
13813 (GRUB_TICKS_PER_SECOND): Removed.
13814 (grub_get_rtc): Likewise.
13815
13816 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13817 Added padding. The EFI spec is buggy.
13818 (GRUB_EFI_BLACK): New macro.
13819 (GRUB_EFI_BLUE): Likewise.
13820 (GRUB_EFI_GREEN): Likewise.
13821 (GRUB_EFI_CYAN): Likewise.
13822 (GRUB_EFI_RED): Likewise.
13823 (GRUB_EFI_MAGENTA): Likewise.
13824 (GRUB_EFI_BROWN): Likewise.
13825 (GRUB_EFI_LIGHTGRAY): Likewise.
13826 (GRUB_EFI_BRIGHT): Likewise.
13827 (GRUB_EFI_DARKGRAY): Likewise.
13828 (GRUB_EFI_LIGHTBLUE): Likewise.
13829 (GRUB_EFI_LIGHTGREEN): Likewise.
13830 (GRUB_EFI_LIGHTCYAN): Likewise.
13831 (GRUB_EFI_LIGHTRED): Likewise.
13832 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13833 (GRUB_EFI_YELLOW): Likewise.
13834 (GRUB_EFI_WHITE): Likewise.
13835 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13836 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13837 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13838 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13839 (GRUB_EFI_BACKGROUND_RED): Likewise.
13840 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13841 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13842 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13843 (GRUB_EFI_TEXT_ATTR): Likewise.
13844
13845 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13846 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13847 (kernel_mod_HEADERS): Added efi/time.h.
13848
83709125 138492006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13850
13851 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13852 include/grub/efi/api.h, include/grub/efi/console_control.h,
13853 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13854 include/grub/i386/efi/time.h, kern/efi/efi.c,
13855 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13856 and util/i386/efi/grub-mkimage.c.
13857
13858 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13859
13860 * genmk.rb (PModule#rule): Do not export symbols if
13861 #{prefix}_EXPORTS is set to "no".
13862
13863 * conf/i386-efi.mk: New file.
13864 * conf/i386-efi.rmk: Likewise.
13865 * include/grub/efi/api.h: Likewise.
13866 * include/grub/efi/console_control.h: Likewise.
13867 * include/grub/efi/efi.h: Likewise.
13868 * include/grub/efi/pe32.h: Likewise.
13869 * include/grub/i386/efi/time.h: Likewise.
13870 * kern/efi/efi.c: Likewise.
13871 * kern/i386/efi/init.c: Likewise.
13872 * kern/i386/efi/startup.S: Likewise.
13873 * util/i386/efi/grub-mkimage.c: Likewise.
13874
138752006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 13876
13877 * include/grub/script.h: Include <grub/parser.h> and
13878 "grub_script.tab.h".
13879 (struct grub_lexer_param): New struct.
13880 (struct grub_parser_param): Likewise.
13881 (grub_script_create_arglist): Pass the state in an argument.
13882 (grub_script_add_arglist): Likewise.
13883 (grub_script_create_cmdline): Likewise.
13884 (grub_script_create_cmdblock): Likewise.
13885 (grub_script_create_cmdif): Likewise.
13886 (grub_script_create_cmdmenu): Likewise.
13887 (grub_script_add_cmd): Likewise.
13888 (grub_script_arg_add): Likewise.
13889 (grub_script_lexer_ref): Likewise.
13890 (grub_script_lexer_deref): Likewise.
13891 (grub_script_lexer_record_start): Likewise.
13892 (grub_script_lexer_record_stop): Likewise.
13893 (grub_script_mem_record): Likewise.
13894 (grub_script_mem_record_stop): Likewise.
13895 (grub_script_malloc): Likewise.
13896 (grub_script_yylex): Likewise.
13897 (grub_script_yyparse): Likewise.
13898 (grub_script_yyerror): Likewise.
13899 (grub_script_yylex): Likewise.
13900 (grub_script_lexer_init): Return the state.
13901
13902 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13903 (grub_script_lexer_done): Likewise.
13904 (grub_script_lexer_getline): Likewise.
13905 (grub_script_lexer_refs): Likewise.
13906 (script): Likewise.
13907 (newscript): Likewise.
13908 (record): Likewise.
13909 (recording): Likewise.
13910 (recordpos): Likewise.
13911 (recordlen): Likewise.
13912 (grub_script_lexer_init): Return the state instead of setting
13913 global variables.
13914 (grub_script_lexer_ref): Use the newly added argument for state
13915 instead of globals.
13916 (grub_script_lexer_deref): Likewise.
13917 (grub_script_lexer_record_start): Likewise.
13918 (grub_script_lexer_record_stop): Likewise.
13919 (recordchar): Likewise.
13920 (nextchar): Likewise.
13921 (grub_script_yylex2): Likewise.
13922 (grub_script_yylex): Likewise.
13923 (grub_script_yyerror): Likewise.
13924
13925 * normal/parser.y (func_mem): Removed variable.
13926 (menu_entry): Likewise.
13927 (err): Likewise.
13928 (%lex-param): New parser option.
13929 (%parse-param): Likewise.
13930 (script): Always return the AST.
13931 (argument): Pass the state around.
13932 (arguments): Likewise.
13933 (grubcmd): Likewise.
13934 (commands): Likewise.
13935 (function): Likewise.
13936 (menuentry): Likewise.
13937 (if_statement): Likewise.
13938 (if): Likewise.
13939
13940 * normal/script.c (grub_script_memused): Removed variable.
13941 (grub_script_parsed): Likewise.
13942 (grub_script_malloc): Added a state argument. Use that instead of
13943 global variables.
13944 (grub_script_mem_record): Likewise.
13945 (grub_script_mem_record_stop): Likewise.
13946 (grub_script_arg_add): Likewise.
13947 (grub_script_add_arglist): Likewise.
13948 (grub_script_create_cmdline): Likewise.
13949 (grub_script_create_cmdif): Likewise.
13950 (grub_script_create_cmdmenu): Likewise.
13951 (grub_script_add_cmd): Likewise.
13952 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 13953
e2a8c904 139542006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 13955
13956 * normal/command.c (grub_command_init): Remove the title command.
13957
13958 * normal/lexer.c (grub_script_yylex): Renamed from this...
13959 (grub_script_yylex2): ... to this.
13960 (grub_script_yylex): New function. Temporary
13961 introduced to filter some tokens.
13962 (grub_script_yyerror): Print a newline.
13963
13964 * normal/main.c (read_config_file): Output information about the
13965 lines that contain errors. Wait for a key after all lines have
13966 been processed. Don't return an empty menu.
13967
13968 * normal/parser.y (func_mem): Don't initialize.
13969 (menu_entry): Likewise.
13970 (err): New variable.
13971 (script): Don't return anything when an error was encountered.
13972 (ws, returns): Removed rules.
13973 (argument): Disabled concatenated variable support.
13974 (arguments): Remove explicit separators.
13975 (grubcmd): Likewise.
13976 (function): Likewise.
13977 (menuentry): Likewise.
13978 (if): Likewise.
13979 (commands): Likewise. Add error handling.
13980
13981 * normal/script.c (grub_script_create_cmdline): If
13982 `grub_script_parsed' is 0, assume the parser encountered an error.
13983
c9a86192 139842006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13985
13986 * configure.ac: Add support for EFI. Fix the typo
13987 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13988
70f3b243 139892006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13990
13991 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13992 foreign multibyte characters should be shown correctly.
13993
65f201ad 139942006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13995
13996 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13997 calculation.
13998 (read_config_file): Made it to close file before returning.
13999
b4b93674 140002006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
14001
14002 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14003 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14004 video/i386/pc/vbefill.c.
14005
14006 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14007 video/i386/pc/vbefill.c.
14008
14009 * include/grub/video.h (grub_video_blit_format): New enum.
14010 (grub_video_mode_info): Added new member blit_format.
14011 (grub_video_get_blit_format): New function prototype.
14012
14013 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14014 function prototype.
14015 (grub_video_vbe_map_rgb): Likewise.
14016 (grub_video_vbe_unmap_color): Likewise.
14017
14018 * include/grub/i386/pc/vbeblit.h: New file.
14019
14020 * include/grub/i386/pc/vbefill.h: New file.
14021
14022 * video/video.c (grub_video_get_blit_format): New function.
14023 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14024 (grub_video_vbe_map_rgb): Likewise.
14025 (grub_video_vbe_unmap_color): Likewise.
14026
14027 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14028 optimized fills.
14029 (grub_video_vbe_blit_render_target): Changed to use more optimized
14030 blits.
14031 (grub_video_vbe_setup): Added detection for optimized settings.
14032 (grub_video_vbe_create_render_target): Likewise.
14033
14034 * video/i386/pc/vbeblit.c: New file.
14035
14036 * video/i386/pc/vbefill.c: New file.
14037
c2379b9c 140382006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
14039
14040 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14041 here...
14042
14043 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14044 parsing to support both hex and dec ranges. If filename was missing
14045 show usage information.
14046
bd0d7896 140472006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14048
14049 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14050 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14051
14052 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14053 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14054 (video_mod_SOURCES): Added.
14055 (video_mod_CFLAGS): Likewise.
14056 (video_mod_LDFLAGS): Likewise.
14057 (gfxterm_mod_SOURCES): Likewise.
14058 (gfxterm_mod_CFLAGS): Likewise.
14059 (gfxterm_mod_LDFLAGS): Likewise.
14060 (videotest_mod_SOURCES): Likewise.
14061 (videotest_mod_CFLAGS): Likewise.
14062 (videotest_mod_LDFLAGS): Likewise.
14063 (vesafb_mod_SOURCES): Removed.
14064 (vesafb_mod_CFLAGS): Likewise.
14065 (vesafb_mod_LDFLAGS): Likewise.
14066 (vga_mod_SOURCES): Likewise.
14067 (vga_mod_CFLAGS): Likewise.
14068 (vga_mod_LDFLAGS): Likewise.
14069
14070 * commands/videotest.c: New file.
14071
14072 * font/manager.c (fill_with_default_glyph): Modified to use
14073 grub_font_glyph.
14074 (grub_font_get_glyph): Likewise.
14075 (fontmanager): Renamed from this...
14076 (font_manager): ... to this.
14077
14078 * include/grub/font.h (grub_font_glyph): Added new structure.
14079 (grub_font_get_glyph): Modified to use grub_font_glyph.
14080
14081 * include/grub/misc.h (grub_abs): Added as inline function.
14082
14083 * include/grub/video.h: New file.
14084
14085 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14086 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14087 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14088 (grub_vbe_get_controller_info): Renamed from this...
14089 (grub_vbe_bios_get_controller_info): ... to this.
14090 (grub_vbe_get_mode_info): Renamed from this...
14091 (grub_vbe_bios_get_mode_info): ... to this.
14092 (grub_vbe_set_mode): Renamed from this...
14093 (grub_vbe_bios_set_mode): ... to this.
14094 (grub_vbe_get_mode): Renamed from this...
14095 (grub_vbe_bios_get_mode): ... to this.
14096 (grub_vbe_set_memory_window): Renamed from this...
14097 (grub_vbe_bios_set_memory_window): ... to this.
14098 (grub_vbe_get_memory_window): Renamed from this...
14099 (grub_vbe_bios_get_memory_window): ... to this.
14100 (grub_vbe_set_scanline_length): Renamed from this...
14101 (grub_vbe_set_scanline_length): ... to this.
14102 (grub_vbe_get_scanline_length): Renamed from this...
14103 (grub_vbe_bios_get_scanline_length): ... to this.
14104 (grub_vbe_set_display_start): Renamed from this...
14105 (grub_vbe_bios_set_display_start): ... to this.
14106 (grub_vbe_get_display_start): Renamed from this...
14107 (grub_vbe_bios_get_display_start): ... to this.
14108 (grub_vbe_set_palette_data): Renamed from this...
14109 (grub_vbe_bios_set_palette_data): ... to this.
14110 (grub_vbe_set_pixel_rgb): Removed.
14111 (grub_vbe_set_pixel_index): Likewise.
14112
14113 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14114 from this...
14115 (grub_vbe_bios_get_controller_info): ... to this.
14116 (grub_vbe_get_mode_info): Renamed from this...
14117 (grub_vbe_bios_get_mode_info): ... to this.
14118 (grub_vbe_set_mode): Renamed from this...
14119 (grub_vbe_bios_set_mode): ... to this.
14120 (grub_vbe_get_mode): Renamed from this...
14121 (grub_vbe_bios_get_mode): ... to this.
14122 (grub_vbe_set_memory_window): Renamed from this...
14123 (grub_vbe_bios_set_memory_window): ... to this.
14124 (grub_vbe_get_memory_window): Renamed from this...
14125 (grub_vbe_bios_get_memory_window): ... to this.
14126 (grub_vbe_set_scanline_length): Renamed from this...
14127 (grub_vbe_set_scanline_length): ... to this.
14128 (grub_vbe_get_scanline_length): Renamed from this...
14129 (grub_vbe_bios_get_scanline_length): ... to this.
14130 (grub_vbe_set_display_start): Renamed from this...
14131 (grub_vbe_bios_set_display_start): ... to this.
14132 (grub_vbe_get_display_start): Renamed from this...
14133 (grub_vbe_bios_get_display_start): ... to this.
14134 (grub_vbe_set_palette_data): Renamed from this...
14135 (grub_vbe_bios_set_palette_data): ... to this.
14136 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14137 getting corrupted after calling it. Added more pushes and pops.
14138 (grub_vbe_bios_set_mode): Likewise.
14139 (grub_vbe_bios_get_mode): Likewise.
14140 (grub_vbe_bios_get_memory_window): Likewise.
14141 (grub_vbe_bios_set_scanline_length): Likewise.
14142 (grub_vbe_bios_get_scanline_length): Likewise.
14143 (grub_vbe_bios_get_display_start): Likewise.
14144 (grub_vbe_bios_set_palette_data): Likewise.
14145
14146 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14147 (cl_insert): Likewise.
14148 (cl_delete): Likewise.
14149
14150 * term/gfxterm.c: New file.
14151
14152 * term/i386/pc/vesafb.c: Removed file.
14153
14154 * video/video.c: New file.
14155
14156 * video/i386/pc/vbe.c (real2pm): Added new function.
14157 (grub_video_vbe_draw_pixel): Likewise.
14158 (grub_video_vbe_get_video_ptr): Likewise.
14159 (grub_video_vbe_get_pixel): Likewise
14160 (grub_video_vbe_init): Likewise.
14161 (grub_video_vbe_fini): Likewise.
14162 (grub_video_vbe_setup): Likewise.
14163 (grub_video_vbe_get_info): Likewise.
14164 (grub_video_vbe_set_palette): Likewise.
14165 (grub_video_vbe_get_palette): Likewise.
14166 (grub_video_vbe_set_viewport): Likewise.
14167 (grub_video_vbe_get_viewport): Likewise.
14168 (grub_video_vbe_map_color): Likewise.
14169 (grub_video_vbe_map_rgb): Likewise.
14170 (grub_video_vbe_map_rgba): Likewise.
14171 (grub_video_vbe_unmap_color): Likewise.
14172 (grub_video_vbe_fill_rect): Likewise.
14173 (grub_video_vbe_blit_glyph): Likewise.
14174 (grub_video_vbe_blit_bitmap): Likewise.
14175 (grub_video_vbe_blit_render_target): Likewise.
14176 (grub_video_vbe_scroll): Likewise.
14177 (grub_video_vbe_swap_buffers): Likewise.
14178 (grub_video_vbe_create_render_target): Likewise.
14179 (grub_video_vbe_delete_render_target): Likewise.
14180 (grub_video_vbe_set_active_render_target): Likewise.
14181 (grub_vbe_set_pixel_rgb): Remove function.
14182 (grub_vbe_set_pixel_index): Likewise.
14183 (index_color_mode): Remove static variable.
14184 (active_mode): Likewise.
14185 (framebuffer): Likewise.
14186 (bytes_per_scan_line): Likewise.
14187 (grub_video_vbe_adapter): Added new static variable.
14188 (framebuffer): Likewise.
14189 (render_target): Likewise.
14190 (initial_mode): Likewise.
14191 (mode_in_use): Likewise.
14192 (mode_list): Likewise.
14193
5f97350b 141942006-03-10 Marco Gerards <marco@gnu.org>
14195
14196 * configure.ac (AC_INIT): Bumped to 1.93.
14197
14198 * DISTLIST: Added `include/grub/hfs.h'.
14199
a3c5c6f8 142002006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14201
14202 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14203 18H, which might help the BIOS falling back to next boot media.
14204
6de53d26 142052006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14206
14207 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14208 Poe Chen <poe.poechen@gmail.com>.
14209
77c4a393 142102006-01-17 Marco Gerards <marco@gnu.org>
14211
14212 * include/grub/normal.h: Include <grub/script.h>.
14213 (grub_command_list): Removed struct.
14214 (grub_command_list_t): Removed type.
14215 (grub_menu_entry): Remove members `num' and `command_list'. Add
14216 members `commands' and `sourcecode'.
14217 * include/grub/script.h: Add inclusion guards.
14218 (grub_script_cmd_menuentry): New struct.
14219 (grub_script_execute_menuentry): New prototype.
14220 (grub_script_lexer_record_start): Likewise.
14221 (grub_script_lexer_record_stop): Likewise.
14222 * normal/execute.c (grub_script_execute_menuentry): New function.
14223 * normal/lexer.c (record, recording, recordpos, recordlen): New
14224 variables.
14225 (grub_script_lexer_record_start): New function.
14226 (grub_script_lexer_record_stop): Likewise.
14227 (recordchar): Likewise.
14228 (nextchar): Likewise.
14229 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14230 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14231 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14232 (current_menu): New variable.
14233 (free_menu): Mainly rewritten.
14234 (grub_normal_menu_addentry): New function.
14235 (read_config_file): Rewritten.
14236 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 14237 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 14238 the menu entry.
14239 (run): Mainly rewritten.
14240 * normal/parser.y (menu_entry): New variable.
14241 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14242 (menuentry): New rule.
14243 (command): Add `menuentry'.
14244 (if_statement): Allow additional returns before `fi'.
14245 * normal/script.c (grub_script_create_cmdmenu): New function.
14246
144f1f98 142472006-01-03 Marco Gerards <marco@gnu.org>
14248
14249 * INSTALL: GNU Bison is required.
14250 * configure.ac: Rewritten the test to detect Bison.
14251 * Makefile.in (YACC): New variable. Reported by Xun Sun
14252 <xun.sun.cn@gmail.com>.
14253
af4b2d89 142542006-01-03 Marco Gerards <marco@gnu.org>
14255
14256 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14257 the HFS+ filesystem to filesystem blocks.
14258 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14259 GCC warning is silenced.
14260
15643b71 142612006-01-03 Marco Gerards <marco@gnu.org>
14262
14263 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14264 read from disk from big endian to host byte order.
14265
00905879 142662006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14267
14268 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14269 documentation.
14270 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14271 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14272 embedded HFS+ filesystem.
14273 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14274 (grub_hfs_sblock): Move from here...
14275 * include/grub/hfs.h: To here... New file.
14276 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14277 documentation.
14278 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14279 New macros.
14280 (grub_hfsplus_volheader): Change type of member `magic' to
14281 `grub_uint16_t'.
14282 (grub_hfsplus_data): Add new member `embedded_offset'.
14283 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14284 returned block.
14285 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14286 Calculate the offset.
14287
8899bc3e 142882005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14289
14290 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14291 Removed.
14292 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14293
ae8c0277 142942005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14295
14296 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14297 ENV->NAME is NULL after allocating ENV->VALUE.
14298
07084456 142992005-12-25 Marco Gerards <marco@gnu.org>
14300
14301 * kern/env.c (grub_env_set): Rewritten the error handling code.
14302
4750f5f1 143032005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14304
14305 * geninit.sh: Made more robust, and more portable.
14306
50214199 143072005-12-25 Marco Gerards <marco@gnu.org>
14308
14309 Add support for Apple HFS+ filesystems.
f19dbdb7 14310
50214199 14311 * fs/hfsplus.c: New file.
14312
14313 * DISTLIST: Added `fs/hfsplus.c'.
14314
14315 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14316 (hfsplus_mod_SOURCES): New variable.
14317 (hfsplus_mod_CFLAGS): Likewise.
14318 (hfsplus_mod_LDFLAGS): Likewise.
14319 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14320 (grub_setup_SOURCES): Likewise.
14321 (grub_mkdevicemap_SOURCES): Likewise.
14322 (grub_emu_SOURCES): Likewise.
14323 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14324
14325 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14326
14327 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14328
befaed6c 143292005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14330
14331 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14332 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14333 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14334 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14335 normal/lexer.c, normal/parser.y, normal/script.c, and
14336 partmap/gpt.c.
14337 Removed kern/sparc64/cache.c.
14338
14339 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14340 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14341 grub_emu_init.c.
14342
14343 * configure.ac (AC_INIT): Bumped to 1.92.
14344
6a124103 143452005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14346
14347 * kern/err.c (grub_error_push): Added new function to support error
14348 stacks.
14349 (grub_error_pop): Likewise.
14350 (grub_error_stack_items): New local variable to support error stacks.
14351 (grub_error_stack_pos): Likewise.
14352 (grub_error_stack_assert): Likewise.
14353 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14354 stack depth.
14355 (grub_print_error): Added support to print errors from error stack.
14356
14357 * include/grub/err.h (grub_error_push): Added function prototype.
14358 (grub_error_pop): Likewise.
14359
be973c1b 143602005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14361
14362 * configure.ac: Accept `powerpc64' as host_cpu.
14363 (amd64): Rename to `biarch32'.
14364
14365 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14366 non-cacheline-aligned addresses.
14367
14368 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14369 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14370 if `size' is non-zero.
14371
b04216ab 143722005-12-03 Marco Gerards <mgerards@xs4all.nl>
14373
14374 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14375 and `cd' to make sure the filename is not prefixed with a
14376 directory name.
14377 (pkgdata_MODULES): Add `gpt.mod'.
14378 (gpt_mod_SOURCES): New variable.
14379 (gpt_mod_CFLAGS): Likewise.
14380 (gpt_mod_LDFLAGS): Likewise.
14381
14382 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14383
14384 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14385 New macro.
14386
14387 * partmap/gpt.c: New file.
14388
14389 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14390 GPT partition map is detected.
14391
41730ed9 143922005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14393
14394 * commands/i386/pc/play.c: New file.
14395 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14396 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14397 macros.
f19dbdb7 14398
95dc3643 143992005-11-27 Marco Gerards <mgerards@xs4all.nl>
14400
14401 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14402 ((unused))' to silence gcc warning.
14403
1569ec51 144042005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14405
14406 * configure.ac: Correct `AC_PROG_YACC' test.
14407
9abde152 144082005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14409
14410 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14411 check before installing files.
14412
44b83271 144132005-11-22 Mike Small <smallm@panix.com>
14414
14415 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14416 number regex so multidigit numbers are recognized correctly.
14417
144182005-11-22 Mike Small <smallm@panix.com>
14419
14420 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14421 debugging message before attempting to claim memory.
14422 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14423 multiple addresses in case of failure.
14424
9c12956b 144252005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14426
14427 * term/tparm.c (get_space): Remove empty `if' statement.
14428
14429 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14430
14431 * kern/parser.c (check_varstate): Rename `state' to 's'.
14432
aeaf81d9 144332005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14434
14435 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14436 variable definitions to the beginning of each function. Sort stack
14437 variables by size.
14438 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14439 `buf' argument to `char *'.
14440
79bbb63f 144412005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14442
14443 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14444 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14445 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 14446 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14447 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14448 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14449 configfile.mod, search.mod, gzio.mod and test.mod.
14450 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14451 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14452 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14453 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14454 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14455 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14456 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14457 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14458 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14459 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14460 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14461 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14462 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14463 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14464 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14465 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14466 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14467 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14468 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14469 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14470 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14471 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14472 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14473
14474 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14475 `grep --include'.
14476 (pkgdata_MODULES): Add test.mod.
14477
233b1628 144782005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14479
14480 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14481 appending to variables with "+=".
14482 (PModule): Use full pathname to generate *.lst filenames.
14483
14484 * Makefile.in: Fixed list rules moved from genmk.rb.
14485 (.DELETE_ON_ERROR): New special target.
14486 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14487
14488 * conf/i386-pc.rmk: Include conf/common.mk.
14489 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14490 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 14491 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14492 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14493 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14494 configfile.mod, search.mod, gzio.mod and test.mod.
14495 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14496 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14497 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14498 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14499 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14500 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14501 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14502 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14503 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14504 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14505 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14506 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14507 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14508 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14509 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14510 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14511 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14512 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14513 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14514 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14515 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14516 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14517 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14518 here...
14519 * conf/common.rmk: ... to here. New file.
14520
14521 * conf/common.mk: New file.
14522
16f820c8 145232005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14524
14525 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14526 (grub_script.tab.c): ... here.
14527
14528 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14529 (grub_script.tab.c): ... here.
14530
14531 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14532 (grub_script.tab.c): ... here.
14533
14534 * normal/command.c (grub_command_find): Fixed a memory leak of
14535 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14536
63ba1554 145372005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14538
14539 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14540 "@" which marks the start of a comment on ARM.
14541 (VARIABLE): Likewise.
14542
7f67dc13 145432005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14544
79bbb63f 14545 Add support for Linux/ADFS partition tables.
7f67dc13 14546
14547 * partmap/acorn.c: New file.
14548
14549 * include/grub/acorn_filecore.h: Likewise.
14550
14551 * DISTLIST: Added `partmap/acorn.c' and
14552 `include/grub/acorn_filecore.h'.
f19dbdb7 14553
7f67dc13 14554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14555 `partmap/acorn.c'.
14556 (pkgdata_MODULES): Add `acorn.mod'.
14557 (acorn_mod_SOURCES): New variable.
14558 (acorn_mod_CFLAGS): Likewise.
14559
14560 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14561 `partmap/acorn.c'.
14562 (pkgdata_MODULES): Add `acorn.mod'.
14563 (acorn_mod_SOURCES): New variable.
14564 (acorn_mod_CFLAGS): Likewise.
14565
14566 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14567 (pkgdata_MODULES): Add `acorn.mod'.
14568 (acorn_mod_SOURCES): New variable.
14569 (acorn_mod_CFLAGS): Likewise.
14570 (acorn_mod_LDFLAGS): Likewise.
14571
14572 * include/types.h (grub_disk_addr_t): New typedef.
14573
6d099807 145742005-11-13 Marco Gerards <mgerards@xs4all.nl>
14575
14576 * geninit.sh: New file.
14577
14578 * geninitheader.sh: Likewise.
14579
14580 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14581 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14582 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14583 * commands/configfile.c (grub_configfile_init)
14584 (grub_configfile_fini): Likewise.
14585 * commands/default.c (grub_default_init, grub_default_fini):
14586 Likewise.
14587 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14588 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14589 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14590 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14591 Likewise.
14592 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14593 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14594 Likewise.
14595 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 14596 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 14597 Likewise.
14598 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14599 Likewise.
fe6b695a 14600 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 14601 Likewise.
14602 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14603 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14604 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14605 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14606 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14607 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14608 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14609 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14610 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14611 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14612 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14613 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14614 * partmap/amiga.c (grub_amiga_partition_map_init)
14615 (grub_amiga_partition_map_fini): Likewise.
14616 * partmap/apple.c (grub_apple_partition_map_init)
14617 (grub_apple_partition_map_fini): Likewise.
14618 * partmap/pc.c (grub_pc_partition_map_init)
14619 (grub_pc_partition_map_fini): Likewise.
14620 * partmap/sun.c (grub_sun_partition_map_init,
14621 grub_sun_partition_map_fini): Likewise.
14622 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14623 Likewise.
14624
14625 * util/grub-emu.c: Include <grub_modules_init.h>.
14626 (main): Don't initialize and de-initialize any modules directly,
14627 use `grub_init_all' and `grub_fini_all' instead.
14628
14629 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14630 `grub_vesafb_mod_init'.
14631 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14632 all users.
14633 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14634 `grub_vga_mod_init'. Updated all users.
14635 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 14636
6d099807 14637 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14638 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14639 rules.
14640
14641 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14642 Generate a function to initialize the module in utilities.
14643 Updated all callers.
14644 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14645 initialize the module in utilities. Updated all callers.
14646
9046bcf0 146472005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14648
14649 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14650 escape sequence and a literal ^L to clear the screen.
14651
14652 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14653 when returning from Open Firmware.
14654
d13ea639 146552005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14656
14657 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14658 (grub_ofconsole_height): Likewise.
14659 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14660 manually insert a '\n'.
14661 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14662 `grub_ofconsole_height'. Return early if these are already set.
14663
a8fcf206 146642005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14665
14666 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14667 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14668 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14669 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14670 and `normal/script.c'.
14671 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14672 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14673 (test_mod_SOURCES): New variable.
14674 (test_mod_CFLAGS): Likewise.
14675 (test_mod_LDFLAGS): Likewise.
14676 (pkgdata_MODULES): Add `test.mod'.
14677 (grub_script.tab.c): New rule.
14678 (grub_script.tab.h): Likewise.
14679
b6b32745 146802005-11-07 Marco Gerards <mgerards@xs4all.nl>
14681
14682 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14683 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14684 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14685 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14686 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14687 (test_mod_SOURCES): New variable.
14688 (test_mod_CFLAGS): Likewise.
14689 (pkgdata_MODULES): Add `test.mod'.
14690 (grub_script.tab.c): New rule.
14691 (grub_script.tab.h): Likewise.
14692
daac212a 146932005-11-06 Marco Gerards <mgerards@xs4all.nl>
14694
14695 Add initial scripting support.
14696
14697 * commands/test.c: New file.
14698 * include/grub/script.h: Likewise.
14699 * normal/execute.c: Likewise.
14700 * normal/function.c: Likewise.
14701 * normal/lexer.c: Likewise.
14702 * normal/parser.y: Likewise.
14703 * normal/script.c: Likewise.
14704
14705 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 14706
daac212a 14707 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14708 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14709 `normal/function.c' and `normal/script.c'.
14710 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14711 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 14712 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14713 variables.
daac212a 14714 (pkgdata_MODULES): Add `test.mod'.
14715 (grub_script.tab.c): New rule.
14716 (grub_script.tab.h): Likewise.
14717
14718 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14719
14720 * include/grub/normal.h (grub_test_init): New prototype.
14721 (grub_test_fini): Likewise.
f19dbdb7 14722
daac212a 14723 * normal/command.c: Include <grub/script.h>.
14724 (grub_command_execute): Rewritten.
f19dbdb7 14725
daac212a 14726 * util/grub-emu.c (main): Call `grub_test_init' and
14727 `grub_test_fini'.
14728
77500b2b 147292005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14730
14731 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14732 to 0.
14733 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14734 there are no pending characters.
14735
e45deb9e 147362005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14737
14738 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14739 `grub_strndup' to drop device arguments. Replace unnecessary
14740 `grub_strndup' with `grub_strdup'.
14741
4ce32619 147422005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14743
14744 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14745 `debug' environment variable has been set.
14746
147472005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14748
4ce32619 14749 * Makefile.in (install-local): Use $(DATA).
14750 (uninstall): Likewise.
14751 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14752 (sbin_UTILITIES): ... to here.
14753 (sbin_SCRIPTS): New variable.
14754 (grub_install_SOURCES): New variable.
14755 * util/powerpc/ieee1275/grub-install.in: New file.
14756 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14757 variable.
14758 (add_segments): Call `grub_util_get_path'.
14759
25fe6f03 147602005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14761
14762 From Timothy Baldwin:
14763 * commands/ls.c (grub_ls_list_files): Close FILE with
14764 grub_file_close.
14765 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14766
04ccf3ec 147672005-10-24 Marco Gerards <mgerards@xs4all.nl>
14768
14769 * include/grub/parser.h: New file.
14770
14771 * kern/parser.c: Likewise.
14772
14773 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14774 (grub_setup_SOURCES): Likewise.
14775 (grub_probefs_SOURCES): Likewise.
14776 (grub_emu_SOURCES): Likewise.
14777 (kernel_img_HEADERS): Add `parser.h'.
14778
14779 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14780 (grub_emu_SOURCES): Add `kern/parser.c'.
14781 (grubof_SOURCES): Likewise.
14782
14783 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14784 (grubof_SOURCES): Add `kern/parser.c'.
14785
14786 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14787
14788 * kern/misc.c (grub_split_cmdline): Removed function.
14789
14790 * kern/rescue.c: Include <grub/parser.h>.
14791 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14792 of `grub_split_cmdline'.
14793
14794 * normal/command.c: Include <grub/parser.h>.
14795 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14796 of `grub_split_cmdline'.
14797
14798 * normal/completion.c: Include <grub/parser.h>.
14799 (cmdline_state): New variable.
14800 (iterate_dir): End the filename with a quote depending on the
14801 command line state.
14802 (get_state): new function.
14803 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14804 split the arguments and determine the current argument. When the
14805 argument string is not quoted, escape all spaces.
14806
6d8f4b0e 148072005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14808
14809 * normal/sparc64/setjmp.S: New file.
14810
15cf03ed 148112005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14812
14813 * include/grub/sparc64/libgcc.h: New file.
14814 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14815 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14816 normal/sparc64/setjmp.c.
14817
03e8661a 148182005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14819
14820 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14821 * kern/sparc64/cache.S: New file.
14822 * kern/sparc64/cache.c: Removed.
14823 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14824 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14825 -mtune=ultrasparc.
14826 (COMMON_LDFLAGS): Add -melf64_sparc.
14827 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14828 (grubof_SOURCES): Use cache.S instead of cache.c.
14829 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14830 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14831 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14832 commented though.
14833 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14834 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14835 (linux_mod_CFLAGS): Commented out.
14836 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14837 out because module isn't built.
14838 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14839 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14840 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14841 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14842 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14843 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14844 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14845 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14846 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14847 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14848 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14849 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14850 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14851 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14852
34eeec8a 148532005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14854
14855 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14856 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14857 longer, because HFS should not be used on PC.
14858
708367a3 148592005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14860
14861 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14862 consistently within the loop.
14863
6fa1251a 148642005-10-15 Marco Gerards <mgerards@xs4all.nl>
14865
14866 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14867 directory can not be read.
14868
4801580b 148692005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14870
14871 * configure.ac (AC_INIT): Increase the version number to 1.91.
14872
14873 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14874 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14875 term/i386/pc/serial.c.
14876
219ad426 148772005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14878
14879 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14880 file size must be permitted.
14881
14882 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14883 between %ah and %al.
14884
688e5699 148852005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14886
14887 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14888 grub_uint64_t.
14889 Call the hook with a NUL-terminated filename.
14890 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14891 grub_cpu_to_be32.
14892
14893 * kern/term.c (cursor_state): New variable.
14894 (grub_term_set_current): Reset the cursor state on a new
14895 terminal.
14896 (grub_setcursor): Rewritten to use CURSOR_STATE.
14897 (grub_getcursor): New function.
14898
14899 * include/grub/term.h (grub_getcursor): New prototype.
14900
14901 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14902 integers on ARM. Reported by Timothy Baldwin
14903 <T.E.Baldwin99@members.leeds.ac.uk>.
14904
bb34586c 149052005-10-11 Marco Gerards <mgerards@xs4all.nl>
14906
14907 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14908 allocated.
14909 (grub_sfs_dir): Likewise.
14910
9a909877 149112005-10-09 Marco Gerards <mgerards@xs4all.nl>
14912
14913 Add support for the SFS filesystem.
14914
14915 * fs/sfs.c: New file.
14916
14917 * DISTLIST: Added `fs/sfs.c'.
14918
14919 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14920 (grub_probefs_SOURCES): Likewise.
14921 (grub_emu_SOURCES): Likewise.
14922 (pkgdata_MODULES): Add `sfs.mod'.
14923 (sfs_mod_SOURCES): New variable.
14924 (sfs_mod_CFLAGS): Likewise.
14925 (sfs_mod_LDFLAGS): Likewise.
14926
14927 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14928 (pkgdata_MODULES): Add `sfs.mod'.
14929 (sfs_mod_SOURCES): New variable.
14930 (sfs_mod_CFLAGS): Likewise.
14931
14932 * util/grub-emu.c (main): Call `grub_sfs_init' and
14933 `grub_sfs_fini'.
14934
14935 * include/grub/fs.h (grub_sfs_init): New prototype.
14936 (grub_sfs_fini): Likewise.
14937
57bdbde3 149382005-10-07 Marco Gerards <mgerards@xs4all.nl>
14939
14940 Add support for the AFFS filesystem.
14941
14942 * fs/affs.c: New file.
14943
14944 * DISTLIST: Added `fs/affs.c'.
14945
14946 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14947 (grub_probefs_SOURCES): Likewise.
14948 (grub_emu_SOURCES): Likewise.
14949 (pkgdata_MODULES): Add `affs.mod'.
14950 (affs_mod_SOURCES): New variable.
14951 (affs_mod_CFLAGS): Likewise.
14952 (affs_mod_LDFLAGS): Likewise.
14953
14954 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14955 (pkgdata_MODULES): Add `affs.mod'.
14956 (affs_mod_SOURCES): New variable.
14957 (affs_mod_CFLAGS): Likewise.
14958
14959 * util/grub-emu.c (main): Call `grub_affs_init' and
14960 `grub_affs_fini'.
14961
14962 * include/grub/fs.h (grub_affs_init): New prototype.
14963 (grub_affs_fini): Likewise.
14964
047b67e0 149652005-10-01 Marco Gerards <mgerards@xs4all.nl>
14966
14967 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14968
59b8208a 149692005-10-01 Marco Gerards <mgerards@xs4all.nl>
14970
14971 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14972 `-m32' to CFLAGS.
14973
14974 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14975 linking.
f19dbdb7 14976
59b8208a 14977 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14978 (COMMON_LDFLAGS): New variable.
14979 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14980 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14981 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14982 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14983 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14984 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14985 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14986 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14987 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14988 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14989 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14990 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14991 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14992 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14993 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14994 variables.
14995 (normal_mod_ASFLAGS): Add `-m32'.
14996
14997 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14998 (grub_host_size_t, grub_host_ssize_t): New types.
14999 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 15000 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 15001 `GRUB_HOST_SIZEOF_VOID_P'.
15002
15003 * include/grub/kernel.h (struct grub_module_header): Type of
15004 member offset changed to `grub_host_off_t'. Type of member size
15005 changed to `grub_host_size_t'.
15006 (struct grub_module_info): Type of member offset changed to
15007 `grub_host_off_t'. Type of member size changed to
15008 `grub_host_size_t'.
15009
b4093103 150102005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
15011
15012 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 15013
b4093103 15014 * kern/i386/pc/startup.S (multiboot_header): New label.
15015 (multiboot_entry): Likewise.
15016 (multiboot_trampoline): Likewise.
15017
15018 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15019 Increased to 0x4A0.
15020
15021 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15022 put parentheses after a question mark.
15023 [!GRUB_UTIL] (my_mod): New variable.
15024
15025 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15026
b2499b29 150272005-09-28 Marco Gerards <mgerards@xs4all.nl>
15028
15029 Adds support for the XFS filesystem. Btrees are not supported
15030 yet.
15031
15032 * fs/xfs.c: New file.
15033
15034 * DISTLIST: Added `fs/xfs.c'.
15035
15036 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15037 (grub_probefs_SOURCES): Likewise.
15038 (grub_emu_SOURCES): Likewise.
15039 (pkgdata_MODULES): Add `xfs.mod'.
15040 (xfs_mod_SOURCES): New variable.
15041 (xfs_mod_CFLAGS): Likewise.
15042
15043 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15044 (pkgdata_MODULES): Add `xfs.mod'.
15045 (xfs_mod_SOURCES): New variable.
15046 (xfs_mod_CFLAGS): Likewise.
15047
15048 * util/grub-emu.c (main): Call `grub_xfs_init' and
15049 `grub_xfs_fini'.
15050
15051 * include/grub/fs.h (grub_xfs_init): New prototype.
15052 (grub_xfs_fini): Likewise.
15053
f19dbdb7 15054
83d37a62 150552005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15056
15057 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15058 color modes, allow greater than 16 colors to be configured as
15059 a default palette.
15060
47d2d65e 150612005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15062
15063 * normal/completion.c (complete_arguments): Add the qualifier
15064 const into OPTIONS.
15065
15066 From Omniflux <omniflux+lists@omniflux.com>:
15067 * include/grub/terminfo.h: New file.
15068 * include/grub/tparm.h: Likewise.
15069 * include/grub/i386/pc/serial.h: Likewise.
15070 * term/terminfo.c: Likewise.
15071 * term/tparm.c: Likewise.
15072 * term/i386/pc/serial.c: Likewise.
15073 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15074 serial.mod.
15075 (terminfo_mod_SOURCES): New variable.
15076 (terminfo_mod_CFLAGS): Likewise.
15077 (serial_mod_SOURCES): Likewise.
15078 (serial_mod_CFLAGS): Likewise.
15079
48b671ff 150802005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15081
15082 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15083 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15084 and kern/powerpc/ieee1275/cmain.c, respectively.
15085
15086 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15087 * kern/powerpc/ieee1275/crt0.S: ... here.
15088
15089 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15090 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 15091
48b671ff 15092 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15093 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15094 instead of boot/powerpc/ieee1275/crt0.S and
15095 boot/powerpc/ieee1275/cmain.c, respectively.
15096
15097 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15098 sectors. It was not used anyway.
15099
09fc77a7 151002005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15101
15102 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15103 `unused parameter' warning.
15104
003789c7 151052005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15106
15107 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15108 function.
15109 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15110 getcharwidth.
15111
67f44c86 151122005-08-28 Marco Gerards <metgerards@student.han.nl>
15113
15114 * include/grub/normal.h (enum grub_completion_type): Added
15115 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15116
15117 * normal/cmdline.c (print_completion): Handle
15118 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15119 * normal/menu_entry.c (store_completion): Likewise.
15120
15121 * normal/completion.c (complete_arguments): New function.
15122 (grub_normal_do_completion): Call `complete_arguments' when the
15123 current words start with a dash.
15124
0b5abe02 151252005-08-27 Marco Gerards <metgerards@student.han.nl>
15126
15127 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15128 `gzio.mod' instead of `io.mod').
15129
d9864ee1 151302005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15131
15132 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15133 (DISTDIRS): Added io and video.
15134 Rewrite the search routine to make an output consistently.
15135
15136 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15137 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15138 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15139 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15140 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15141 util/powerpc/ieee1275/misc.c.
f19dbdb7 15142
d9864ee1 15143 * include/grub/gzio.h: New file.
15144 * io/gzio.c: Likewise.
f19dbdb7 15145
d9864ee1 15146 * kern/file.c (grub_file_close): Call grub_device_close only if
15147 FILE->DEVICE is not NULL.
15148
15149 * include/grub/mm.h [!NULL] (NULL): New macro.
15150
15151 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15152
15153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15154 (pkgdata_MODULES): Added gzio.mod.
15155 (gzio_mod_SOURCES): New variable.
15156 (gzio_mod_CFLAGS): Likewise.
15157
15158 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15159 (pkgdata_MODULES): Added gzio.mod.
15160 (gzio_mod_SOURCES): New variable.
15161 (gzio_mod_CFLAGS): Likewise.
15162
15163 * commands/cat.c: Include grub/gzio.h.
15164 (grub_cmd_cat): Use grub_gzfile_open instead of
15165 grub_file_open.
f19dbdb7 15166
d9864ee1 15167 * commands/cmp.c: Include grub/gzio.h.
15168 (grub_cmd_cmp): Use grub_gzfile_open instead of
15169 grub_file_open.
15170
15171 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15172 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15173 grub_file_open.
15174 (grub_rescue_cmd_module): Likewise.
15175
fa46f4b5 151762005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15177
15178 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15179 kern/sparc64/ieee1275/init.c because it contains _start.
15180 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15181
e9211b5d 151822005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15183
15184 * configure.ac: Add support for sparc64 host with ieee1275
15185 firmware.
15186 * configure: Generated from configure.ac.
15187 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15188 instead of int.
15189 (grub_ofdisk_read): Likewise.
15190 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15191 pointers as (void *) to remove a warning.
15192 (grub_ofdisk_close): Likewise.
15193 (grub_ofdisk_read): Likewise.
15194 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15195 returns, so make it return void to remove a warning.
15196 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15197 Corresponding prototype change.
15198 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15199 values, and cast the pointers as (void *) to remove a warning.
15200 (grub_mm_dump): Likewise.
15201 * conf/sparc64-ieee1275.mk: New file.
15202 * conf/sparc64-ieee1275.rmk: Likewise.
15203 * include/grub/sparc64/setjmp.h: Likewise.
15204 * include/grub/sparc64/types.h: Likewise.
15205 * include/grub/sparc64/ieee1275/console.h: Likewise.
15206 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15207 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15208 * include/grub/sparc64/ieee1275/time.h: Likewise.
15209 * kern/sparc64/cache.c: Likewise.
15210 * kern/sparc64/dl.c: Likewise.
15211 * kern/sparc64/ieee1275/init.c: Likewise.
15212 * kern/sparc64/ieee1275/openfw.c: Likewise.
15213
385c6a92 152142005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15215
15216 * util/console.c (grub_ncurses_putchar): If C is greater than
15217 0x7f, set C to a question mark.
15218 (grub_ncurses_getcharwidth): New function.
15219 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15220 getcharwidth.
15221
15222 * normal/menu.c (print_entry): Made aware of Unicode. First,
15223 convert TITLE to UCS-4, and predict the cursor position by
15224 grub_getcharwidth.
15225
15226 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15227 const to SRC.
15228 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15229
16ccb8b1 152302005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15231
15232 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15233 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15234 grub_strcat.
15235
15236 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15237 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15238 grub_strcpy and grub_strlen. Take it into account that a space
15239 character is inserted as a delimiter.
15240
6a85ce79 152412005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15242
15243 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 15244 invalid magic in the error.
6a85ce79 15245
15246 * commands/search.c: New file.
f19dbdb7 15247
6a85ce79 15248 * util/grub-emu.c (main): Call grub_search_init and
15249 grub_search_fini.
15250
15251 * kern/rescue.c (grub_rescue_print_disks): Removed.
15252 (grub_rescue_print_devices): New function.
15253 (grub_rescue_cmd_ls): Use grub_device_iterate with
15254 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15255 grub_rescue_print_disks.
15256
15257 * kern/partition.c (grub_partition_iterate): Return the result of
15258 PARTMAP->ITERATE instead of GRUB_ERRNO.
15259
15260 * kern/device.c: Include grub/partition.h.
15261 (grub_device_iterate): New function.
15262
15263 * include/grub/partition.h (grub_partition_iterate): Return int
15264 instead of grub_err_t.
15265
15266 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15267 prototype.
15268 [GRUB_UTIL] (grub_search_fini): Likewise.
15269
15270 * include/grub/device.h (grub_device_iterate): New prototype.
15271
15272 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15273 commands/search.c.
15274 (pkgdata_MODULES): Added search.mod.
15275 (search_mod_SOURCES): New variable.
15276 (search_mod_CFLAGS): Likewise.
15277
15278 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15279 (pkgdata_MODULES): Added search.mod.
15280 (search_mod_SOURCES): New variable.
15281 (search_mod_CFLAGS): Likewise.
15282
15283 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15284 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15285 All callers changed.
15286
15287 * DISTLIST: Added commands/search.c.
15288
ef095434 152892005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15290
15291 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15292 conversion.
15293 (grub_getcharwidth): New function.
15294
15295 * kern/misc.c (grub_utf8_to_ucs4): New function.
15296
15297 * include/grub/term.h (struct grub_term): Added a new member
15298 "getcharwidth".
15299 (grub_getcharwidth): New prototype.
15300
15301 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15302
15303 * term/i386/pc/console.c (map_char): New function. Segregated from
15304 grub_console_putchar.
15305 (grub_console_putchar): Use map_char.
15306 (grub_console_getcharwidth): New function.
15307 (grub_console_term): Specified grub_console_getcharwidth as
15308 getcharwidth.
15309
15310 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15311 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15312
15313 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15314 GRUB_ERRNO.
15315 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15316 on grub_strtoul completely.
15317 (write_char): Declare local variables in the beginning of the
15318 function.
15319 (grub_vesafb_getcharwidth): New function.
15320 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15321 getcharwidth.
15322
1f0a95e4 153232005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15324
15325 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15326 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15327 commands/i386/pc/vbetest.c.
15328
15329 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15330 call grub_vbe_get_controller_info again, because the returned
15331 information is volatile.
15332 (grub_vbe_set_video_mode): Mostly rewritten.
15333 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15334 grub_vbe_status_t correctly.
15335 (grub_vbe_get_video_mode_info): Likewise.
15336 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15337 several if statements.
15338
15339 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15340 * commands/i386/pc/vbeinfo.c: ... this.
15341
15342 * commands/i386/pc/vbe_test.c: Renamed to ...
15343 * commands/i386/pc/vbetest.c: ... this.
15344
15345 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15346 ...
15347 (grub_cmd_vbeinfo): ... this. Save video modes before
15348 iterating. Skip a video mode, if it is not available, not enough
15349 information is given or it is monochrome. Show the memory
15350 model. Leave the interpretation of MODEVAR to grub_strtoul
15351 completely.
15352 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15353 (GRUB_MOD_FINI): Likewise.
15354
15355 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15356 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15357 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15358 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15359 grub_strtoul completely.
15360 (real2pm): Removed.
15361 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15362 (GRUB_MOD_FINI): Likewise.
15363
15364 * normal/misc.c: Include grub/mm.h.
15365
15366 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15367 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15368 (vbe_list_modes_mod_SOURCES): Removed.
15369 (vbe_list_modes_mod_CFLAGS): Likewise.
15370 (vbe_test_mod_SOURCES): Likewise.
15371 (vbe_test_mod_CFLAGS): Likewise.
15372 (vbeinfo_mod_SOURCES): New variable.
15373 (vbeinfo_mod_CFLAGS): Likewise.
15374 (vbetest_mod_SOURCES): Likewise.
15375 (vbetest_mod_CFLAGS): Likewise.
15376
992ffbbe 153772005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15378
15379 * normal/misc.c: New file.
15380
15381 * DISTLIST: Added normal/misc.c.
f19dbdb7 15382
992ffbbe 15383 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15384 DISK to HOOK. Call HOOK with DISK.
15385 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15386 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15387 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15388
15389 * normal/menu_entry.c (struct screen): Added a new member
15390 "completion_shown".
15391 (completion_buffer): New global variable.
15392 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15393 (store_completion): New function.
15394 (complete): Likewise.
15395 (clear_completions): Likewise.
15396 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15397 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15398 a tab, call complete.
15399
15400 * normal/completion.c (disk_dev): Removed.
15401 (print_simple_completion): Likewise.
15402 (print_partition_completion): Likewise.
15403 (print_func): New global variable.
15404 (add_completion): Do not take the arguments WHAT or PRINT any
15405 longer. Added a new argument TYPE. Instead of printing directly,
15406 call PRINT_FUNC if not NULL.
15407 All callers changed.
15408 (complete_device): Use a local variable DEV instead of
15409 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15410 (grub_normal_do_completion): Take a new argument HOOK. Do not
15411 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15412 empty string, return NULL instead.
15413 All callers changed.
15414
15415 * normal/cmdline.c (print_completion): New function.
15416
15417 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15418 to HOOK.
15419 All callers changed.
15420
15421 * kern/disk.c (grub_print_partinfo): Removed.
15422
15423 * include/grub/partition.h (struct grub_partition_map): Add a new
15424 argument DISK into HOOK of ITERATE.
15425 (grub_partition_iterate): Add a new argument DISK to HOOK.
15426
15427 * include/grub/normal.h (enum grub_completion_type): New enum.
15428 (grub_completion_type_t): New type.
15429 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15430 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15431 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15432 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15433 (grub_normal_do_completion): Added a new argument HOOK.
15434 (grub_normal_print_device_info): New prototype.
15435
15436 * include/grub/disk.h (grub_print_partinfo): Removed.
15437
15438 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15439 (normal_mod_SOURCES): Likewise.
15440 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15441 (normal_mod_SOURCES): Likewise.
15442
15443 * commands/ls.c (grub_ls_list_disks): Use
15444 grub_normal_print_device_info instead of grub_print_partinfo. Free
15445 PNAME.
15446 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15447 duplicating the code.
15448
0bd41162 154492005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15450
15451 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 15452 follow GCS more precisely.
15453 * commands/i386/pc/vbe_test.c: Likewise.
15454 * include/grub/i386/pc/vbe.h: Likewise.
15455 * term/i386/pc/vesafb.c: Likewise.
15456 * video/i386/pc/vbe.c: Likewise.
0bd41162 15457
6323696a 154582005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15459
15460 * DISTLIST: Added term/i386/pc/vesafb.c
15461 DISTLIST: Added video/i386/pc/vbe.c
15462 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15463 DISTLIST: Added commands/i386/pc/vbe_test.c.
15464 * commands/i386/pc/vbe_list_modes.c: New file.
15465 * commands/i386/pc/vbe_test.c: Likewise.
15466 * term/i386/pc/vesafb.c: Likewise.
15467 * video/i386/pc/vbe.c: Likewise.
15468 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15469 (grub_vbe_probe) Added prototype.
15470 (grub_vbe_set_video_mode) Likewise.
15471 (grub_vbe_get_video_mode) Likewise.
15472 (grub_vbe_get_video_mode_info) Likewise.
15473 (grub_vbe_set_pixel_rgb) Likewise.
15474 (grub_vbe_set_pixel_index) Likewise.
15475 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15476 (pkgdata_MODULES): Added vesafb.mod.
15477 (pkgdata_MODULES): Added vbe_list_modes.mod.
15478 (pkgdata_MODULES): Added vbe_test.mod.
15479 (vbe_mod_SOURCES): Added.
15480 (vbe_mod_CFLAGS): Likewise.
15481 (vesafb_mod_SOURCES): Likewise.
15482 (vesafb_mod_CFLAGS): Likewise.
15483 (vbe_list_modes_mod_SOURCES): Likewise.
15484 (vbe_list_modes_mod_CFLAGS): Likewise.
15485 (vbe_test_mod_SOURCES): Likewise.
15486 (vbe_test_mod_CFLAGS): Likewise.
15487
0a74e62f 154882005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15489
0a74e62f 15490 * normal/command.c (grub_command_execute): If INTERACTIVE is
15491 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15492 CMDLINE. Disable the pager if INTERACTIVE is true.
15493 All callers are changed.
15494
15495 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15496 before reading a config file.
15497 * normal/main.c (read_config_file): Even if a command is not
15498 found, register it if it is within an entry.
15499
15500 * util/grub-emu.c: Include sys/types.h and unistd.h.
15501 (options): Added --hold.
15502 (struct arguments): Added a new member "hold".
15503 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15504 missing.
15505 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15506 cleared by a debugger, if it is not zero.
15507
15508 * include/grub/normal.h (grub_command_execute): Add an argument
15509 INTERACTIVE.
15510
e51f85ae 155112005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15512
15513 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15514
e9c6f39b 155152005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15516
15517 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15518 program with another one, because the old one didn't detect a bug
15519 in gcc-3.4. Always use regparm 2, because the new test is still
15520 not enough for gcc-4.0. Someone must investigate a simple test
15521 case which detects a bug in gcc-4.0.
15522
8de3495c 155232005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15524
15525 * DISTLIST: Added normal/completion.c.
15526
15527 * normal/completion.c: New file.
f19dbdb7 15528
8de3495c 15529 * term/i386/pc/console.c (grub_console_getwh): New function.
15530 (grub_console_term): Assign grub_console_getwh to getwh.
15531
15532 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15533 function is defined in normal/completion.c as
15534 grub_normal_do_completion.
15535 (grub_cmdline_get): Use grub_normal_do_completion instead of
15536 grub_tab_complete.
15537
15538 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15539 returns non-zero, otherwise return 0.
15540 (grub_partition_iterate): First, probe the partition map. Then,
15541 call ITERATE only for this partition map.
15542
15543 * kern/misc.c (grub_strncmp): Rewritten.
15544
15545 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15546 returns non-zero. Otherwise return 0.
15547
15548 * include/grub/partition.h (grub_partition_map_iterate): Return
15549 int instead of void.
15550
15551 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15552
15553 * include/grub/misc.h (grub_strncmp): Change the type of N to
15554 grub_size_t.
15555
15556 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15557 of void.
15558
15559 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 15560 unsigned explicitly before comparing it with I.
8de3495c 15561
15562 * kern/main.c (grub_env_write_root): Add the attribute unused into
15563 VAR.
15564
15565 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15566 normal/completion.c.
15567 (normal_mod_SOURCES): Likewise.
15568 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15569 (normal_mod_SOURCES): Likewise.
15570
15571 * normal/command.c (grub_iterate_commands): If ITERATE returns
15572 non-zero, return one immediately.
15573
e85e144b 155742005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15575
15576 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15577 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15578 descriptions.
15579 (grub_vbe_get_controller_info): New function.
15580 (grub_vbe_get_mode_info): Likewise.
15581 (grub_vbe_set_mode): Likewise.
15582 (grub_vbe_get_mode): Likewise.
15583 (grub_vbe_set_memory_window): Likewise.
15584 (grub_vbe_get_memory_window): Likewise.
15585 (grub_vbe_set_scanline_length): Likewise.
15586 (grub_vbe_get_scanline_length): Likewise.
15587 (grub_vbe_set_display_start): Likewise.
15588 (grub_vbe_get_display_start): Likewise.
15589 (grub_vbe_set_palette_data): Likewise.
15590 * include/grub/i386/pc/vbe.h: New file.
15591
c46153d2 155922005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15593
15594 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15595 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15596 * DISTLIST: Likewise.
15597 * kern/ieee1275/of.c: Moved to ...
15598 * kern/ieee1275/ieee1275.c: ... here.
15599
0cb90c45 156002005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15601
15602 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15603 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15604 Pass 0 as `end' parameter to grub_strtoul().
15605
a19fb360 156062005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15607
15608 * include/grub/powerpc/ieee1275/console.h: Do not include
15609 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15610 ifdef.
15611 (grub_console_cur_color): Remove i386-specific prototype.
15612 (grub_console_real_putchar): Likewise.
15613 (grub_console_checkkey): Likewise.
15614 (grub_console_getkey): Likewise.
15615 (grub_console_getxy): Likewise.
15616 (grub_console_gotoxy): Likewise.
15617 (grub_console_cls): Likewise.
15618 (grub_console_setcursor): Likewise.
15619 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15620 Include <grub/machine/console.h>.
15621 * term/ieee1275/ofconsole.c: Likewise.
15622
4ac9bd04 156232005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15624
15625 * Makefile.in (LIBLZO): New variable.
15626
15627 * configure.ac: Check for LZO version 2.
15628
15629 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15630 lzo/lzo1x.h instead of lzo1x.h.
15631
15632 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15633 of -llzo.
15634
15635 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15636 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15637
15638 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15639 copying the data from PARTITION to P.
15640
f4917dfd 156412005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15642
15643 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15644 negative, unload the module.
15645
15646 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15647 map is "pc_partition_map" but not "pc".
15648 (usage): Fix the description. The options are --boot-image and
15649 --core-image but not --boot-file or --core-file.
15650 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15651 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15652 DEFAULT_DIRECTORY.
15653
15654 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15655 --core-file. Specify INSTALL_DEVICE as an argument.
15656
15657 * util/console.c: Include config.h.
15658 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15659 [HAVE_NCURSES_H]: Include ncurses.h.
15660 [HAVE_CURSES_H]: Include curses.h.
15661 [!A_NORMAL] (A_NORMAL): Defined as zero.
15662 [!A_STANDOUT] (A_STANDOUT): Likewise.
15663
15664 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15665 -lncurses.
15666 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15667
15668 * configure.ac: Check for curses libraries and headers.
15669
15670 * Makefile.in (LIBCURSES): New variable.
15671
15672 * genmk.rb (Script::rule): Set the executable bits.
15673
15674 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15675 name of the PC partition map is "pc_partition_map" but not "pc".
15676
0e143073 156772005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15678
15679 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15680 (modules): Likewise.
15681 (usage): Added descriptions for --modules and --grub-probefs.
15682 Handle --modules and --grub-probefs. Save the arguments in MODULES
15683 and GRUB_PROBEFS, respectively.
15684 Auto-detect a filesystem module against GRUBDIR. If the result is
15685 empty and modules are not specified explicitly, abort the
15686 installation. Add the result to MODULES.
15687
15688 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15689 disk/powerpc/ieee1275/ofdisk.c,
15690 include/grub/powerpc/ieee1275/init.h and
15691 term/powerpc/ieee1275/ofconsole.c.
15692 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15693 term/ieee1275/ofconsole.c.
15694
15695 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15696
15697 * COPYING: Upgraded to the latest version. Only the address of the
15698 FSF office has changed.
f19dbdb7 15699
efd6e6d5 157002005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15701
15702 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15703 kern/ieee1275.c with kern/ieee1275/of.c.
15704
15705 * kern/ieee1275.c: Moved to ...
15706 * kern/ieee1275/of.c: ... here.
15707
8ceafda2 157082005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15709
15710 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 15711 readability.
8ceafda2 15712
15713 * config.guess: Updated to the latest version from gnulib.
15714 * config.sub: Likewise.
15715 * install.sh: Likewise.
15716 * mkinstalldirs: Likewise.
15717
15718 * include/grub/console.h: Removed. This file is arch-specific. Do
15719 not put this in include/grub.
15720
15721 * include/grub/i386/pc/console.h: Resurrected.
15722
15723 * util/console.c: Include grub/machine/console.h instead of
15724 grub/console.h.
15725 * util/grub-emu.c: Likewise.
15726
267f6cd9 157272005-08-04 Marco Gerards <metgerards@student.han.nl>
15728
15729 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15730 hardcoded value.
f19dbdb7 15731
267f6cd9 15732 From Vincent Pelletier <subdino2004@yahoo.fr>
15733 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15734 Redefined to use grub_getwh.
15735 (grub_term): New member named getwh.
15736 (grub_getwh): New prototype.
15737 * kern/term.c (grub_getwh): New function.
15738 * term/i386/pc/console.c (grub_console_getwh): New function.
15739 (grub_console_term): New member `getwh'.
15740 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15741 (grub_vga_term): New member `getwh'.
0b5abe02 15742 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 15743 grub_ssize_t.
15744 (grub_ofconsole_getw): New function.
15745 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15746 (grub_ofconsole_term): New field named getwh and new initial
15747 value.
15748
3be7266d 157492005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15750
15751 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15752 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15753 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15754 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15755 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15756 of <grub/machine/ieee1275.h>.
15757 * commands/ieee1275/reboot.c: Likewise.
15758 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15759 * kern/ieee1275.c: ... to here. All users updated. Change all
15760 parameter structs to use new type `grub_ieee1275_cell_t'.
15761 * term/powerpc/ieee1275/ofconsole.c: Move ...
15762 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15763 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15764 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15765 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15766 to return int.
15767 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15768 Remove unused prototypes. All users updated.
15769 * include/grub/powerpc/ieee1275/console.h: Removed.
15770 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15771 `grub_ieee1275_cell_t'.
15772 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15773 Cast comparisons with -1 to the correct type.
15774 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15775 type to match `grub_ieee1275_entry_fn'.
15776
8b5f3938 157772005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15778
15779 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15780
15781 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15782 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15783 partmap/sun.c.
15784 (grub_probefs_SOURCES): New variable.
15785
15786 * util/i386/pc/grub-probefs.c: New file.
15787
15788 * util/i386/pc/grub-setup.c (main): Call
15789 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15790 grub_hfs_init and grub_jfs_init to initialize the system. Call
15791 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15792 grub_pc_partition_map_fini to finish the system.
15793
ea409713 157942005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15795
15796 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15797 function.
15798 (grub_multiboot_load_elf32): Likewise.
15799 (grub_multiboot_is_elf64): Likewise.
15800 (grub_multiboot_load_elf64): Likewise.
15801 (grub_multiboot_load_elf): Likewise.
15802 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15803 an ELF32 or ELF64 file.
15804 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15805
15806 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15807 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15808 NULL before calling FS->LABEL.
15809 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15810 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15811 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15812 before calling FS->LABEL.
15813
141a288b 158142005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15815
15816 * util/i386/pc/grub-install.in (datadir): New variable.
15817 (libdir): Removed.
15818 (pkgdatadir): New variable.
15819 (pkglibdir): Removed.
15820
0d5f8a54 158212005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15822
15823 * DISTLIST: Added util/i386/pc/grub-install.in.
15824
15825 * util/i386/pc/grub-install.in: New file.
15826
15827 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15828 (grub_install_SOURCES): Likewise.
15829
15830 * genmk.rb: Added support for scripts.
15831 (Script): New class.
15832 (scripts): New variable.
15833
15834 * Makefile.in (install-local): Install sbin_SCRIPTS by
15835 INSTALL_SCRIPT.
15836 (uninstall): Remove sbin_SCRIPTS.
15837
15838 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15839 device, try to get a GRUB device by
15840 grub_util_biosdisk_get_grub_dev.
15841 Free DEST_DEV.
15842
15843 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15844 description for --device-map.
15845
5f968e1e 158462005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15847
15848 Change the semantics of variable hooks. They now return strings
15849 instead of error values.
f19dbdb7 15850
5f968e1e 15851 * util/i386/pc/grub-setup.c: Include grub/env.h.
15852 (setup): Use grub_device_set_root instead of grub_env_set.
15853
15854 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15855 grub_env_get instead of grub_device_set_root and
15856 grub_device_get_root, respectively.
15857
15858 * kern/main.c (grub_env_write_root): New function.
15859 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15860 grub_env_set instead of grub_device_set_root.
15861
15862 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15863 many variables.
15864 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15865 rather than calling ENV->WRITE_HOOK afterwards.
15866 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15867 passing a pointer of a pointer.
15868 (grub_register_variable_hook): Change the types of "read_hook" and
15869 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15870 respectively.
15871 Allocate the default empty string on the heap, because this string
15872 may be freed later.
15873
15874 * kern/device.c: Include grub/env.h.
15875 (grub_device_set_root): Removed.
15876 (grub_device_get_root): Likewise.
15877 (grub_device_open): Use grub_env_get instead of
15878 grub_device_get_root.
15879
15880 * include/grub/env.h (grub_env_read_hook_t): New type.
15881 (grub_env_write_hook_t): Likewise.
15882 (grub_env_var): Change the types of "read_hook" and "write_hook"
15883 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15884 (grub_register_variable_hook): Likewise.
15885
15886 * include/grub/device.h (grub_device_set_root): Removed.
15887 (grub_device_set_root): Likewise.
15888
15889 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15890 make sure that DIRNAME terminates with '/', so that
15891 grub_fat_find_dir will fail if PATH is not a directory.
15892
15893 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15894 from DIRNAME.
15895 Use the qualifier auto for print_files and print_files_long.
15896 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15897 as a regular file.
15898 Put a newline only if there is no error.
15899 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15900 used.
15901
896f0afd 159022005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15903
15904 * kern/partition.c (grub_partition_probe): Initialize PART to
15905 NULL. Otherwise, when no partition map is registered, this returns
15906 a garbage.
15907
b28b81b2 159082005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15909
15910 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15911 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15912 valid.
15913
5f3607e0 159142005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15915
15916 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15917 information on each device, if it does not have partitions. Print
15918 "Device" instead of "Disk", because this function is not specific
15919 to disk devices.
15920
15921 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15922 static to ensure that it is put on the memory rather than a
15923 register.
15924
502c87e8 159252005-07-17 Yoshinori Okuji <okuji@enbug.org>
15926
15927 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15928 (grub_cat_init): Likewise.
15929 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15930 (options): Likewise.
15931 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15932 (grub_configfile_init): Likewise.
15933 * font/manager.c (GRUB_MOD_INIT): Likewise.
15934 * commands/help.c (GRUB_MOD_INIT): Likewise.
15935 (grub_help_init): Likewise.
15936 * normal/command.c (grub_command_init): Likewise.
15937 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15938 * disk/loopback.c (grub_loop_init): Likewise.
15939 (GRUB_MOD_INIT): Likewise.
15940 * commands/ls.c (grub_ls_init): Likewise.
15941 (GRUB_MOD_INIT): Likewise.
15942 (options): Likewise.
15943 * commands/boot.c (grub_boot_init): Likewise.
15944 (GRUB_MOD_INIT): Likewise.
15945 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15946 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15947 (GRUB_MOD_INIT): Likewise.
15948 * commands/cmp.c (grub_cmp_init): Likewise.
15949 (GRUB_MOD_INIT): Likewise.
15950
15951 * normal/arg.c: Use <> instead of "" to include header files.
15952 (SHORT_ARG_HELP): New macro.
15953 (SHORT_ARG_USAGE): Likewise.
15954 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15955 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15956 descriptions.
15957 (find_short): Check if C is 'h' or 'u' explicitly.
15958 (grub_arg_show_help): Use space characters instead of tabs. Treat
15959 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15960 are shown with --help and --usage only if they are not used for
15961 the command itself.
15962 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15963 'h' and 'u'.
15964
15965 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15966 const into "longarg". Change the type of "shortarg" to int.
15967
f806d18e 159682005-07-17 Yoshinori Okuji <okuji@enbug.org>
15969
15970 * boot/i386/pc/boot.S (boot_drive_check): New label.
15971
15972 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15973 macro.
15974
15975 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15976 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15977
e293232b 159782005-07-17 Yoshinori Okuji <okuji@enbug.org>
15979
15980 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15981 When turning off Gate A20, skip the check and return immediately,
15982 because this is not fatal usually.
15983
ebedfd00 159842005-07-17 Yoshinori Okuji <okuji@enbug.org>
15985
15986 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15987 be 0x7C00 instead of 0x8000.
15988
15989 * boot/i386/pc/pxeboot.S: Rewritten.
15990
15991 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15992 EXT_C.
15993 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15994 result.
15995
654fc59f 159962005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15997
15998 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15999 robustness. This routine now supports a BIOS call and System
16000 Control Port A to modify the gate A20.
16001
16002 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16003 Increased to 0x440.
16004
09f9923f 160052005-07-12 Hollis Blanchard <hollis@penguinppc.org>
16006
16007 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16008 device path and resulting ihandle.
16009 (grub_ofdisk_close): dprintf the ihandle being closed.
16010 (grub_ofdisk_read): dprintf function parameters.
16011 * kern/mm.c (grub_mm_init_region): Likewise.
16012 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16013 (grub_linux_boot): dprintf the Linux entry point, initrd address and
16014 size, and boot arguments.
16015 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16016 before loading into memory.
16017 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16018 before loading into memory.
16019
7ef504d8 160202005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
16021
16022 * kern/mm.c: Added much documentation.
16023 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16024 8, set to 5 instead of 8.
16025
e0f050c2 160262005-07-10 Yoshinori Okuji <okuji@enbug.org>
16027
16028 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16029
16030 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16031 (grub_mkdevicemap_SOURCES): New variable.
16032
16033 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16034 lib/device.c of GRUB Legacy.
16035
7224189a 160362005-07-10 Yoshinori Okuji <okuji@enbug.org>
16037
16038 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16039 instead of PATH is NULL.
16040
68c864eb 160412005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16042
16043 * commands/cmp.c (BUFFER_SIZE): New macro.
16044 (grub_cmd_cmp): Close the right file at the right time. Compare
16045 only data just read. Don't report files of different size as
16046 identical. Dynamically allocate buffers. Move variable
16047 declarations at the beginning of function.
16048
e6f3e614 160492005-07-09 Yoshinori Okuji <okuji@enbug.org>
16050
16051 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16052 reverse.
16053
f8f1559a 160542004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16055
16056 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16057 when backspace is pressed at beginning of line.
16058
39c9d41d 160592005-07-03 Yoshinori Okuji <okuji@enbug.org>
16060
16061 * DISTLIST: Added genfslist.sh.
16062
16063 * normal/main.c (fs_module_list): New variable.
16064 (autoload_fs_module): New function.
16065 (read_fs_list): Likewise.
16066 (grub_normal_execute): Call read_fs_list.
16067
16068 * kern/fs.c (grub_fs_autoload_hook): New variable.
16069 (grub_fs_probe): Added support for auto-loading.
16070
16071 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16072 (grub_fs_module_list_t): New type.
16073
16074 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16075 (grub_fs_autoload_hook): New prototype.
16076
16077 * genfslist.sh: New file.
f19dbdb7 16078
39c9d41d 16079 * genmk.rb: Added a rule to generate a filesystem list.
16080
121c1d83 160812005-06-30 Marco Gerards <metgerards@student.han.nl>
16082
16083 * configure.ac: Fix the test for cross-compiling.
16084
16085 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16086 define GRUB_UTIL anymore.
16087
16088 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16089 so this function works on other systems than just big endian.
16090 (load_modules): Likewise.
16091 (add_segments): Likewise.
16092
e75d76e1 160932005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16094
16095 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16096 contains `l' modifier, get a long from va_arg().
16097
50b5a0a7 160982005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16099
16100 * kern/mm.c (grub_free): If the next free block which is being
16101 merged is the first free block, set the first block to the block
16102 being freed.
16103 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16104
89371b20 161052005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16106
16107 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16108 `grub_ieee1275_chosen'.
16109
168d6e58 161102005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16111
16112 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16113 (grub_ieee1275_chosen): New variable.
16114 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16115 `chosen'.
16116 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16117 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16118 Rename first argument to `phandle' for consistency.
16119 (grub_ieee1275_get_property_length): Likewise.
16120 (grub_ieee1275_next_property): Likewise. Change type of first argument
16121 to grub_ieee1275_phandle_t.
16122 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16123 Move export next to declaration.
16124 (grub_ieee1275_chosen): New variable.
16125 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16126 Correct cosmetic typo.
16127 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16128 `grub_ieee1275_chosen'.
16129 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16130 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16131 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16132 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16133 `grub_ieee1275_chosen'.
16134
ca5baa3f 161352005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16136
16137 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16138 /chosen/bootargs.
16139 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16140 /chosen/bootargs as "variable=value" pairs.
16141
708b345f 161422005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16143
16144 * include/grub/misc.h (grub_dprintf): New macro.
16145 (grub_real_dprintf): New prototype.
16146 (grub_strword): Likewise.
16147 (grub_iswordseparator): Likewise.
16148 * kern/misc.c (grub_real_dprintf): New function.
16149 (grub_strword): Likewise.
16150 (grub_iswordseparator): Likewise.
16151
f4c5e67c 161522005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16153
16154 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16155 (roundup): Remove macro.
16156 (grub_ieee1275_flags): Make static.
16157 (grub_ieee1275_realmode): Remove.
16158 (grub_ieee1275_test_flag): New function.
16159 (grub_ieee1275_set_flag): Likewise.
16160 (find_options): Rename to `grub_ieee1275_find_options'; update
16161 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16162 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16163 (cmain): New prototype.
16164 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16165 `grub_ieee1275_flags' directly.
16166 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16167 machine/biosdisk.h.
16168 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16169 Don't include grub/machine/init.h.
16170 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16171 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16172 Remove prototype.
16173 (grub_ieee1275_realmode): Likewise.
16174 (grub_ieee1275_flag): New enum.
16175 (grub_ieee1275_test_flag): New prototype.
16176 (grub_ieee1275_set_flag): New prototype.
16177 * include/grub/powerpc/ieee1275/init.h: Remove file.
16178 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16179 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16180 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16181 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16182 comment.
16183 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16184 `grub_ieee1275_test_flag'.
16185 (grub_ieee1275_encode_devname): Likewise.
16186
ed16607e 161872005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16188
16189 * include/grub/powerpc/ieee1275/ieee1275.h
16190 (grub_ieee1275_encode_devname): New prototype.
16191 (grub_ieee1275_get_filename): Likewise.
16192 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16193 function.
16194 (grub_set_prefix): Likewise.
16195 (grub_machine_init): Call grub_set_prefix.
16196 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16197 (grub_parse_type): New enum.
16198 (grub_ieee1275_get_devargs): New function.
16199 (grub_ieee1275_get_devname): Likewise.
16200 (grub_ieee1275_parse_args): Likewise.
16201 (grub_ieee1275_get_filename): Likewise.
16202 (grub_ieee1275_encode_devname): Likewise.
16203
be369920 162042005-03-30 Marco Gerards <metgerards@student.han.nl>
16205
16206 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16207 `grub_loader_unset'.
16208
a5ce3a4a 162092005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16210
16211 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16212 instead of grub_ieee1275_interpret.
16213 (grub_halt_init): New function.
16214 (grub_halt_fini): Likewise.
16215 (GRUB_MOD_INIT): Correct message grammar.
16216 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16217 instead of grub_ieee1275_interpret.
16218 (grub_reboot_init): New function.
16219 (grub_reboot_fini): Likewise.
16220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16221 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16222 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16223 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16224 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16225 function.
16226 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16227 Add prototype.
16228 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16229 prototype.
16230 (grub_halt): Likewise.
16231 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16232 (cmain): Remove __attribute__((unused)).
16233 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16234 (grub_heap_len): Likewise.
16235 (grub_machine_fini): New function.
16236 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16237 (grub_halt): Likewise.
16238 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16239 function.
16240 * util/powerpc/ieee1275/misc.c: New file.
16241
0058f771 162422005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16243
16244 * DISTLIST: New file.
16245 * gendistlist.sh: Likewise.
f19dbdb7 16246
0058f771 16247 * Makefile.in (COMMON_DISTFILES): Removed.
16248 (BOOT_DISTFILES): Likewise.
16249 (CONF_DISTFILES): Likewise.
16250 (DISK_DISTFILES): Likewise.
16251 (FS_DISTFILES): Likewise.
16252 (INCLUDE_DISTFILES): Likewise.
16253 (KERN_DISTFILES): Likewise.
16254 (LOADER_DISTFILES): Likewise.
16255 (TERM_DISTFILES): Likewise.
16256 (UTIL_DISTFILES): Likewise.
16257 (DISTFILES): Likewise.
16258 (uninstall): Uninstall files in $(pkgdata_DATA).
16259 (DISTLIST): New target.
16260 (distdir): Use the contents of the file DISTLIST to get a list of
16261 distributed files.
16262
46b3b8a5 162632005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16264
16265 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16266 descriptor. This is ported from GRUB Legacy.
16267
16268 * gencmdlist.sh: Added an extra semicolon to make it work with
16269 old sed versions. Reported by Robert Bihlmeyer
16270 <robbe@orcus.priv.at>.
16271
5822ff87 162722005-03-08 Yoshinori Okuji <okuji@enbug.org>
16273
16274 Automatic loading of commands is supported.
f19dbdb7 16275
5822ff87 16276 * normal/main.c (read_command_list): New function.
16277 (grub_normal_execute): Call read_command_list.
16278
16279 * normal/command.c (grub_register_command): Return zero or CMD.
16280 Allocate CMD->NAME from the heap.
16281 Initialize CMD->MODULE_NAME to zero.
16282 Find the same name as well. If the same command is found and it is
16283 a dummy command, overwrite members. If it is not a dummy command,
16284 return zero.
16285 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16286 (grub_command_find): If a dummy command is found, load a module
16287 and retry to find a command only once.
16288
16289 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16290 make sure that each command is loaded.
16291
16292 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16293 macro.
16294 (struct grub_command): Remove const from the member `name'.
16295 Add a new member `module_name'.
16296 (grub_register_command): Return grub_command_t.
16297
16298 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16299 sure that each command is loaded.
16300
16301 * genmk.rb (PModule::rule): Specify a module name without the
16302 suffix ".mod" to gencmdlist.sh.
16303
7b1f4b57 163042005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16305
16306 * gencmdlist.sh: New file.
f19dbdb7 16307
7b1f4b57 16308 * genmk.rb (PModule::rule): Generate a rule for a command list.
16309 Clean command.lst.
16310 Generate command.lst from $(COMMANDFILES).
16311
16312 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16313 (DATA): Added $(pkgdata_DATA).
16314 (install-local): Install files in $(pkgdata_DATA).
16315
062aaf39 163162005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16317
16318 * term/i386/pc/vga.c (debug_command): Removed.
16319 (GRUB_MOD_INIT): Do not register the command "debug".
16320
16321 From Hollis Blanchard:
16322 * commands/configfile.c: New file.
16323 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16324 commands/configfile.c.
16325 (pkgdata_MODULES): Added configfile.mod.
16326 (configfile_mod_SOURCES): New variable.
16327 (configfile_mod_CFLAGS): Likewise.
16328 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16329 commands/configfile.c.
16330 (pkgdata_MODULES): Added configfile.mod.
16331 (configfile_mod_SOURCES): New variable.
16332 (configfile_mod_CFLAGS): Likewise.
16333 * util/grub-emu.c (main): Call grub_configfile_init and
16334 grub_configfile_fini.
16335 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16336 prototype.
16337 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 16338
cee01aa6 163392005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16340
16341 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16342 address.
16343
16344 * commands/help.c (grub_cmd_help): Do not print newlines after
16345 the last command in print_command_help.
16346
93f3a1d8 163472005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16348
16349 * commands/default.h: New file.
16350 * commands/timeout.h: Likewise.
16351 * normal/context.c: Likewise.
f19dbdb7 16352
93f3a1d8 16353 * util/misc.c: Do not include sys/times.h.
16354 Include sys/time.h and grub/machine/time.h.
16355 (grub_get_rtc): Rewritten with gettimeofday.
16356
16357 * util/grub-emu.c (main): Call grub_default_init and
16358 grub_timeout_init before grub_normal_init, and call
16359 grub_timeout_fini and grub_default_fini after grub_main.
16360
16361 * util/console.c (grub_ncurses_checkkey): Return the read
16362 character or -1.
16363
16364 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16365 timeouts.
16366
16367 * normal/main.c (read_config_file): Push MENU. If this fails,
16368 print an error and wait for a user input.
16369 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16370 If a menu is empty or an error occurs, pop MENU.
16371 (grub_normal_execute): Pop and free MENU after grub_menu_run
16372 returns.
16373
16374 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16375
16376 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16377 include time.h.
16378 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16379 without GRUB_UTIL.
16380 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16381 time.h.
16382 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16383 without GRUB_UTIL.
16384
16385 * include/grub/normal.h (struct grub_menu_list): New struct.
16386 (grub_menu_list_t): New type.
16387 (struct grub_context): New struct.
16388 (grub_context_t): New type.
16389 (grub_register_command): Got rid of EXPORT_FUNC.
16390 (grub_unregister_command): Likewise.
16391 (grub_context_get): New prototype.
16392 (grub_context_get_current_menu): Likewise.
16393 (grub_context_push_menu): Likewise.
16394 (grub_context_pop_menu): Likewise.
16395 [GRUB_UTIL] (grub_default_init): Likewise.
16396 [GRUB_UTIL] (grub_default_fini): Likewise.
16397 [GRUB_UTIL] (grub_timeout_init): Likewise.
16398 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16399
16400 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16401 commands/timeout.c and normal/context.c.
16402 (pkgdata_MODULES): Added default.mod and timeout.mod.
16403 (normal_mod_SOURCES): Added normal/context.c.
16404 (default_mod_SOURCES): New variable.
16405 (default_mod_CFLAGS): Likewise.
16406 (timeout_mod_SOURCES): Likewise.
16407 (timeout_mod_CFLAGS): Likewise.
16408 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16409 conf/i386-pc.rmk.
16410 (pkgdata_MODULES): Added default.mod and timeout.mod.
16411 (normal_mod_SOURCES): Added normal/context.c.
16412 (default_mod_SOURCES): New variable.
16413 (default_mod_CFLAGS): Likewise.
16414 (timeout_mod_SOURCES): Likewise.
16415 (timeout_mod_CFLAGS): Likewise.
16416
16417 * Makefile.in (all-local): Added $(MKFILES).
16418
4ed2e1dd 164192005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16420
16421 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16422 (grub_emu_SOURCES): Likewise.
16423 (pkgdata_MODULES): Add `sun.mod'.
16424 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16426 `partmap/sun.c'.
16427 (pkgdata_MODULES): Add `sun.mod'.
16428 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16429 * include/grub/partition.h (grub_sun_partition_map_init): New
16430 prototype.
16431 (grub_sun_partition_map_fini): Likewise.
16432 * partmap/sun.c: New file.
16433 * util/grub-emu.c (main): Initialize and de-initialize the sun
16434 partitionmap support.
16435
4d4e372e 164362005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16437
16438 This implements an Emacs-like menu entry editor.
f19dbdb7 16439
4d4e372e 16440 * normal/menu_entry.c: New file.
f19dbdb7 16441
4d4e372e 16442 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16443 characters to ASCII.
16444 (saved_char): New variable.
16445 (grub_ncurses_checkkey): Rewritten completely.
16446 (grub_ncurses_getkey): Likewise.
16447 (grub_ncurses_init): Call raw instead of cbreak.
16448
16449 * normal/menu.c (print_entry): Do not put a space.
16450 (init_page): Renamed to ...
16451 (grub_menu_init_page): ... this. All callers changed.
16452 (edit_menu_entry): Removed.
16453 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16454
16455 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16456
16457 * kern/misc.c (grub_vprintf): Call grub_refresh.
16458
16459 * normal/menu.c (DISP_LEFT): Renamed to ...
16460 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16461 * normal/menu.c (DISP_UP): Renamed to ...
16462 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16463 * normal/menu.c (DISP_RIGHT): Renamed to ...
16464 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16465 * normal/menu.c (DISP_DOWN): Renamed to ...
16466 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16467 * normal/menu.c (DISP_HLINE): Renamed to ...
16468 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16469 * normal/menu.c (DISP_VLINE): Renamed to ...
16470 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16471 * normal/menu.c (DISP_UL): Renamed to ...
16472 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16473 * normal/menu.c (DISP_UR): Renamed to ...
16474 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16475 * normal/menu.c (DISP_LL): Renamed to ...
16476 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16477 * normal/menu.c (DISP_LR): Renamed to ...
16478 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16479 * normal/menu.c (TERM_WIDTH): Renamed to ...
16480 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16481 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16482 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16483 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16484 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16485 * normal/menu.c (TERM_MARGIN): Renamed to ...
16486 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16487 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16488 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16489 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16490 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16491 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16492 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16493 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16494 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16495 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16496 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16497 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16498 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16499 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16500 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16501 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16502 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16503 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16504 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16505 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16506 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16507 All callers changed.
16508
16509 * include/grub/normal.h: New prototype.
16510
16511 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16512 normal/menu_entry.c.
16513 (normal_mod_SOURCES): Likewise.
16514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16515 (normal_mod_SOURCES): Likewise.
16516
e6b92c8a 165172005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16518
16519 * include/grub/normal.h (grub_halt_init): New prototype.
16520 (grub_halt_fini): Likewise.
16521 (grub_reboot_init): Likewise.
16522 (grub_reboot_fini): Likewise.
16523
16524 * util/grub-emu.c: Include signal.h.
16525 (main_env): New global variable.
16526 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16527 catch C-c.
16528 (grub_machine_fini): New function.
16529 (main): Call grub_halt_init and grub_reboot_init before
16530 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16531 Call setjmp with MAIN_ENV to go back afterwards.
16532 Call grub_machine_fini right before return.
16533
16534 * include/grub/util/misc.h: Include setjmp.h.
16535 (main_env): New prototype.
16536
16537 * include/grub/kernel.h (grub_machine_fini): New prototype.
16538 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16539 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16540
16541 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16542 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16543 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 16544
e6b92c8a 16545 * util/i386/pc/misc.c: New file.
f19dbdb7 16546
e6b92c8a 16547 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16548 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16549 commands/i386/pc/reboot.c.
16550
c642636f 165512005-02-14 Guillem Jover <guillem@hadrons.org>
16552
16553 * include/grub/dl.h (grub_dl_check_header): New prototype.
16554 (grub_arch_dl_check_header): Change return type to grub_err_t,
16555 remove size parameter and export function. Update all callers.
16556 * kern/dl.c (grub_dl_check_header): New function.
16557 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16558 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16559 are inside the core.
16560 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16561 independent ELF header checks.
16562 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16563 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16564 `grub_dl_check_header' instead of explicit checks. Check for the
16565 ELF type.
16566 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16567 `grub_dl_check_header' instead of explicit checks. Remove arch
16568 specific ELF header checks.
16569
e6b92c8a 16570 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16571 argument SIZE.
16572
5eabe94b 165732005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16574
16575 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16576 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16577
1b14a681 165782005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16579
16580 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 16581 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 16582 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 16583 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 16584 * partmap/amiga.c (amiga_partition_map_iterate): Return
16585 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16586 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16587
aca108aa 165882005-02-01 Guillem Jover <guillem@hadrons.org>
16589
16590 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16591 help info.
16592
c9f9c556 165932005-01-31 Marco Gerards <metgerards@student.han.nl>
16594
16595 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16596 Removed prototype.
16597 (grub_rescue_cmd_linux): New prototype.
16598 (grub_rescue_cmd_initrd): Likewise.
16599 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16600 `bi_rec'.
16601 (grub_linux_release_mem): Release the memory for the initrd.
16602 (grub_load_linux): Renamed from this...
16603 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16604 Changed `entry' not to be static. Loop over memory regions to
16605 find another one when the default fails.
16606 (grub_rescue_cmd_initrd): New function.
16607 (grub_linux_init): Remove function.
16608 (grub_linux_fini): Likewise.
16609 (GRUB_MOD_INIT): Register `initrd'.
16610 (GRUB_MOD_FINI): Unregister `initrd'.
16611 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16612 Function removed.
16613 (grub_linux_normal_fini): Likewise.
16614 (GRUB_MOD_INIT): Register `initrd'.
16615 (GRUB_MOD_FINI): Unregister `initrd'.
16616
990cf3aa 166172005-01-31 Marco Gerards <metgerards@student.han.nl>
16618
16619 * commands/help.c: New file.
16620 * normal/arg.c (show_help): Renamed to...
16621 (grub_arg_show_help): ... this.
16622 * commands/i386/pc/halt.c: New file.
16623 * commands/i386/pc/reboot.c: Likewise.
16624 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16625 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16626 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16627 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16628 variables.
16629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16630 `commands/help.c'.
16631 (pkgdata_MODULES): Add `help.mod'.
16632 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16633 * grub/i386/pc/init.h (grub_reboot): New prototype.
16634 (grub_halt): Likewise.
16635 * include/grub/normal.h (grub_arg_show_help): New prototype.
16636 (grub_help_init): Likewise.
16637 (grub_help_fini): Likewise.
16638 * util/grub-emu.c (main): Initialize and deinitialize the help
16639 command.
16640
16641 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16642
16643 * normal/command.c (grub_command_init): Fixed the description of
16644 the `set' and `unset' commands.
16645
166462005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 16647
16648 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16649 function.
16650 * commands/ieee1275/halt.c: New file.
16651 * commands/ieee1275/reboot.c: Likewise.
16652 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16653 `__attribute__ ((unused))'. Some GCS related fixed.
16654 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16655 (grub_suspend_fini): Likewise.
16656 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16657 and `halt.mod'.
16658 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16659 (halt_mod_CFLAGS): New variables.
16660 * include/grub/powerpc/ieee1275/ieee1275.h
16661 (grub_ieee1275_interpret): New prototype.
16662
1ab09cc7 166632005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16664
16665 * include/grub/misc.h (memmove): New prototype.
16666 (memcpy): Likewise.
16667
8b8cbdb2 166682005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16669
16670 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16671 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16672
e3741a27 166732005-01-22 Marco Gerards <metgerards@student.han.nl>
16674
16675 * kern/misc.c (grub_strndup): Function rewritten.
16676
776bd780 166772005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16678
16679 * normal/menu.c (TERM_WIDTH): Macro redefined.
16680 (TERM_TOP_BORDER_Y): Likewise.
16681 (draw_border): Replaced while-loop by a for-loop. Make the number
16682 of lines consistent with the number of lines displayed in
16683 print_entries. Added a margin below the rectangle.
16684 (print_entry): Make the entry fit in the rectangle.
16685 (print_entries): Display the scroll arrows next to the right
16686 border.
16687
78026bce 166882005-01-21 Marco Gerards <metgerards@student.han.nl>
16689
16690 * fs/minix.c (grub_minix_find_file): Reserve more space for
16691 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16692 `grub_strncpy' to copy `path' into it.
16693
67bbaf0f 166942005-01-21 Marco Gerards <metgerards@student.han.nl>
16695
16696 Add the loopback device, a device via which files can be accessed
16697 as devices.
f19dbdb7 16698
67bbaf0f 16699 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16700 (pkgdata_MODULES): Add loopback.mod.
16701 (loopback_mod_SOURCES): New variable.
16702 (loopback_mod_CFLAGS): Likewise.
16703 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16704 `disk/loopback.c'.
16705 (pkgdata_MODULES): Add loopback.mod.
16706 (loopback_mod_SOURCES): New variable.
16707 (loopback_mod_CFLAGS): Likewise.
16708 * disk/loopback.c: new file.
16709 * include/grub/normal.h (grub_loop_init): New prototype.
16710 (grub_loop_fini): New prototype.
16711 * util/grub-emu.c (main): Initialize and de-initialize loopback
16712 support.
16713 * include/grub/disk.h (grub_disk_dev_id): Add
16714 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16715
6f1c18bd 167162005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16717
16718 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16719 function.
16720 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16721 (suspend_mod_SOURCES): New variable.
16722 (suspend_mod_CFLAGS): Likewise.
16723 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16724 New prototype.
16725 * commands/ieee1275/suspend.c: New file.
16726
b38551da 167272005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16728
16729 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 16730 ((unused))' to `__attribute__ ((used))'.
b38551da 16731 (GRUB_MOD_FINI): Likewise.
16732 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16733 * genmk.rb (PModule): Assign space to common symbols when linking
16734 modules.
16735
777aff39 167362005-01-20 Marco Gerards <metgerards@student.han.nl>
16737
16738 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16739 `unsigned' arguments to `grub_size_t'.
16740 (grub_malloc): Likewise.
16741 (grub_realloc): Likewise.
16742 (grub_memalign): Likewise.
16743 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16744 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16745 * util/misc.c (grub_malloc): Likewise.
16746 (grub_realloc): Likewise.
16747 * kern/mm.c (get_header_from_pointer): Change the casts to
16748 `unsigned' into a cast to `grub_size_t'.
16749
16750 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16751 point to `currnode' when `currnode' is changed.
16752
16753 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16754 Schottelius <nico-linux@schottelius.org>.
16755
d0ff18e1 167562005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16757
16758 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16759 (note_path): Remove variable.
16760 (GRUB_IEEE1275_NOTE_NAME): New macro.
16761 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16762 (grub_ieee1275_note_hdr): New structure.
16763 (grub_ieee1275_note_desc): Likewise.
16764 (grub_ieee1275_note): Likewise.
16765 (load_note): Remove `dir' argument. All callers updated. Remove
16766 `note_img' and `path'. Do not load a file from `note_path'.
16767 Initialize a struct grub_ieee1275_note and write that to `out'.
16768 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16769
4ca7004c 167702005-01-05 Marco Gerards <metgerards@student.han.nl>
16771
16772 * util/misc.c (grub_util_read_image): Revert last change. It
16773 called `grub_util_read_at', which seeks from the beginning of the
16774 file.
16775
0b412211 167762005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16777
16778 * TODO: Add note about endianness in grub-mkimage.
16779 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16780 section.
16781 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16782 (grub_mkimage_SOURCES): New target.
16783 * include/grub/kernel.h (grub_start_addr): Remove variable.
16784 (grub_end_addr): Likewise.
16785 (grub_total_module_size): Likewise.
16786 (grub_kernel_image_size): Likewise.
16787 (GRUB_MODULE_MAGIC): New constant.
16788 (grub_module_info): New structure.
16789 (grub_arch_modules_addr): New prototype.
16790 (grub_get_end_addr): Remove prototype.
16791 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16792 * include/grub/powerpc/ieee1275/kernel.h: New file.
16793 * include/grub/util/misc.h (grub_util_get_fp_size): New
16794 prototype.
16795 (grub_util_read_at): Likewise.
16796 (grub_util_write_image_at): Likewise.
16797 * kern/main.c (grub_get_end_addr): Remove function.
16798 (grub_load_modules): Call grub_arch_modules_addr instead of using
16799 grub_end_addr. Look for a grub_module_info struct in memory. Use
16800 the grub_module_info fields instead of calling grub_get_end_addr
16801 as loop conditions. Move grub_add_unused_region code here.
16802 (grub_add_unused_region): Remove function.
16803 * kern/i386/pc/init.c: Include grub/cache.h.
16804 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16805 one call to add_mem_region.
16806 (grub_arch_modules_addr): New function.
16807 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16808 (grub_total_module_size): Likewise.
16809 Include grub/machine/kernel.h.
16810 (grub_arch_modules_addr): New function.
16811 * util/grub-emu.c (grub_end_addr): Remove variable.
16812 (grub_total_module_size): Likewise.
16813 (grub_arch_modules_addr): New function.
16814 * util/misc.c: Include unistd.h.
16815 (grub_util_get_fp_size): New function.
16816 (grub_util_read_at): Likewise.
16817 (grub_util_write_image_at): Likewise.
16818 (grub_util_read_image): Call grub_util_read_at.
16819 (grub_util_write_image): Call grub_util_write_image_at.
16820 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16821 additional memory in kernel_img for a struct grub_module_info.
16822 Fill in that grub_module_info.
16823 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16824
458786f8 168252005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16826
16827 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16828 New function.
16829 * include/grub/powerpc/ieee1275/ieee1275.h
16830 (grub_ieee1275_milliseconds): New prototype.
16831 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16832 Change to 1000.
16833 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16834 grub_ieee1275_milliseconds.
16835
ac507d1b 168362005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16837
16838 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16839 variable.
16840 (find_options): New function.
16841 (cmain): Call find_options.
16842 * include/grub/powerpc/ieee1275/ieee1275.h
16843 (grub_ieee1275_realmode): New extern variable.
16844 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16845 grub_map if grub_ieee1275_realmode is false.
16846
6b8fd1c4 168472004-12-29 Marco Gerards <metgerards@student.han.nl>
16848
16849 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16850 lines are inserted and make it work like readline. Reported by
16851 Vincent Pelletier <subdino2004@yahoo.fr>.
16852
8514a1e0 168532004-12-28 Marco Gerards <metgerards@student.han.nl>
16854
16855 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16856
16857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16858 `kern/powerpc/cache.S'.
16859
924b6140 168602004-12-27 Marco Gerards <metgerards@student.han.nl>
16861
16862 * genmk.rb: Handle the `Program' class in the main loop. Written
16863 by Johan Rydberg <jrydberg@gnu.org>.
16864 (Program): New class.
16865 (programs): New variable.
16866 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16867 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16868 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16869 (help_arch): Function removed.
16870 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16871 `powerpc/libgcc.h' and `loader.h'.
16872 (pkgdata_PROGRAMS): New variable.
16873 (sbin_UTILITIES): Variable removed.
16874 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16875 (grubof_SOURCES): Variable re-defined so it only includes the
16876 core functionality.
16877 (grubof_CFLAGS): Remove `-DGRUBOF'.
16878 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16879 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16880 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16881 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16882 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16883 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16884 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16885 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16886 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16887 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16888 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16889 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16890 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16891 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16892 (pc_mod_CFLAGS): New variables.
16893 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16894 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16895 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16896 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16897 Moved from here...
16898 * include/grub/i386/pc/init.h (grub_os_area_addr)
16899 (rub_os_area_size): ... to here.
16900 * include/grub/powerpc/ieee1275/ieee1275.h
16901 (grub_ieee1275_entry_fn): Export symbol.
16902 * include/grub/powerpc/ieee1275/init.h: New file.
16903 * include/grub/powerpc/libgcc.h: Likewise.
16904 * include/grub/cache.h: Likewise.
16905 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16906 <hollis@penguinppc.org>.
16907 * kern/dl.c: Include <grub/cache.h>.
16908 (grub_dl_flush_cache): New function.
16909 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16910 for this module.
16911 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16912 (grub_console_init): Removed prototypes.
16913 (grub_machine_init): Don't initialize the modules anymore.
16914 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16915 static.
16916 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16917 Macro undef removed.
16918 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16919 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16920 relocation `R_PPC_REL32'. Return an error when the relocation is
16921 unknown.
16922 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16923 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16924 * util/misc.c (grub_arch_sync_caches): Likewise.
16925
e4b47e0c 169262004-12-19 Marco Gerards <metgerards@student.han.nl>
16927
16928 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16929 `symlist.c', add `grubof_symlist.c'.
16930 (symlist.c): Variable removed.
16931 (grubof_HEADERS): Variable added.
16932 (grubof_symlist.c): New target.
16933 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16934 `kernel_img_HEADERS'.
16935 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16936 * kern/powerpc/dl.c: New file.
16937 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16938 Function removed.
16939 (grub_arch_dl_relocate_symbols): Likewise.
16940 (grub_register_exported_symbols): Likewise.
16941
4ceb3636 169422004-12-13 Marco Gerards <metgerards@student.han.nl>
16943
16944 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16945 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16946 to fail instead. Reported by Vincent Pelletier
16947 <subdino2004@yahoo.fr>.
16948
16949 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16950 it is not allocated. Reported by Vincent Pelletier
16951 <subdino2004@yahoo.fr>.
16952
16953 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16954 output so the output looks better.
f19dbdb7 16955
3f1578fe 169562004-12-04 Marco Gerards <metgerards@student.han.nl>
16957
16958 Modulize the partition map support and add support for the amiga
16959 partition map.
f19dbdb7 16960
3f1578fe 16961 * commands/ls.c: Include <grub/partition.h> instead of
16962 <grub/machine/partition.h>.
16963 * kern/disk.c: Likewise.
16964 * kern/rescue.c: Likewise.
16965 * loader/i386/pc/chainloader.c: Likewise.
16966 * normal/cmdline.c: Likewise.
16967 * kern/powerpc/ieee1275/init.c: Likewise.
16968 (grub_machine_init): Call `grub_pc_partition_map_init',
16969 `grub_amiga_partition_map_init' and
16970 `grub_apple_partition_map_init'.
16971 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16972 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16973 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16974 `partition.h' and `pc_partition.h'.
16975 (grub_setup_SOURCES): Remove
16976 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16977 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16978 (grub_emu_SOURCES): Likewise.
16979 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16980 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16981 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16982 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16983 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16984 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16985 (grubof_SOURCES): Likewise.
16986 * disk/i386/pc/partition.c: File removed.
16987 * disk/powerpc/ieee1275/partition.c: Likewise.
16988 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16989 * include/grub/i386/pc/partition.h: Likewise.
16990 * kern/partition.c: New file.
16991 * partmap/amiga.c: Likewise.
16992 * partmap/apple.c: Likewise.
16993 * partmap/pc.c: Likewise.
16994 * include/grub/partition.h: Likewise..
16995 * include/grub/pc_partition.h: Likewise.
16996 * util/grub-emu.c: Include <grub/partition.h> instead of
16997 <grub/machine/partition.h>.
16998 (main): Call `grub_pc_partition_map_init',
16999 `grub_amiga_partition_map_init' and
17000 `grub_apple_partition_map_init' and deinitialize afterwards.
17001 * util/i386/pc/biosdisk.c: Include `#include
17002 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17003 `<grub/machine/partition.h>'.
17004 * util/i386/pc/grub-setup.c: Likewise.
17005 * util/i386/pc/biosdisk.c: Likewise.
17006 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17007 partition information in case of a PC partition.
17008 * util/i386/pc/grub-setup.c: Include `#include
17009 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17010 `<grub/machine/partition.h>'.
17011 (setup): Only access the PC specific partition information in case
17012 of a PC partition.
17013
0ef4ced9 170142004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17015
0ef4ced9 17016 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17017 (grub_longjmp): Likewise.
17018 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17019 20.
17020 * normal/powerpc/setjmp.S: New file.
17021 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17022 `normal/powerpc/setjmp.S'.
17023 (grubof_CFLAGS): Add `-DGRUBOF'.
17024 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17025 [GRUB_UTIL && !GRUBOF].
f19dbdb7 17026
19950e29 170272004-11-16 Marco Gerards <metgerards@student.han.nl>
17028
17029 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17030 property named `name'. Correctly handle the error returned by
17031 `grub_ieee1275_finddevice' if a device can not be opened.
17032
a2fea427 170332004-11-02 Hollis Blanchard <hollis@penguinppc.org>
17034
17035 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17036 `actual' for negativity.
17037 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17038 kern/fshelp.c.
17039
41ea0ea3 170402004-11-01 Marco Gerards <metgerards@student.han.nl>
17041
17042 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17043 (PAGE_OFFSET): New macro.
17044 (CRTC_ADDR_PORT): Likewise.
17045 (CRTC_DATA_PORT): Likewise.
17046 (START_ADDR_HIGH_REGISTER): Likewise.
17047 (START_ADDR_LOW_REGISTER): Likewise.
17048 (GRAPHICS_ADDR_PORT): Likewise.
17049 (GRAPHICS_DATA_PORT): Likewise.
17050 (READ_MAP_REGISTER): Likewise.
17051 (INPUT_STATUS1_REGISTER): Likewise.
17052 (INPUT_STATUS1_VERTR_BIT): Likewise.
17053 (page): New variable.
17054 (wait_vretrace): New function.
17055 (set_read_map): Likewise.
17056 (set_start_address): Likewise.
17057 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17058 the right page.
17059 (check_vga_mem): Take the page into account.
17060 (write_char): Likewise.
17061 (write_cursor): Likewise.
17062 (scroll_up): Likewise. Copy the page to the page that is not
17063 shown and switch between both pages.
17064 (grub_vga_putchar): Fix off by one error.
17065 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17066 account.
17067
ad0bd20b 170682004-11-01 Marco Gerards <metgerards@student.han.nl>
17069
17070 Add support for iso9660 (including rockridge).
f19dbdb7 17071
ad0bd20b 17072 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17073 (iso9660_mod_SOURCES): New variable.
17074 (iso9660_mod_CFLAGS): Likewise.
17075 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17076 * include/grub/fs.h (grub_iso9660_init): New prototype.
17077 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17078 * fs/iso9660.c: New file.
17079
17080 * include/grub/misc.h (grub_strncat): New prototype.
17081 * kern/misc.c (grub_strncat): New function.
f19dbdb7 17082
ad0bd20b 17083 * fs/hfs.c (grub_hfs_mount): Translate the error
17084 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17085 * fs/jfs.c (grub_jfs_mount): Likewise.
17086 * fs/ufs.c (grub_ufs_mount): Likewise.
17087
a5477a59 170882004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17089
17090 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17091 which initialized BAT registers.
17092 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17093 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17094 Move from here...
17095 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17096 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17097 ... to here.
17098 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17099 (grub_mapclaim): Likewise.
17100 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17101 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17102 hand.
17103
9304c1f8 171042004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17105
17106 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17107 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17108 -ffreestanding and -msoft-float.
17109
86f4ae25 171102004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17111
17112 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17113 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17114 set in grub_ieee1275_flags.
17115
38912228 171162004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17117
17118 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17119 prototype.
17120 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17121 grub_console_init first.
17122 Change the memory range used for grub_ieee1275_claim and
17123 grub_mm_init_region.
17124 Print an error message if the claim fails.
17125 Include <grub/misc.h>.
17126
d1923dc8 171272004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17128
17129 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17130 Call grub_children_iterate for device nodes of type `scsi',
17131 `ide', or `ata'.
17132 (grub_ofdisk_open): Remove manual device alias resolution.
17133 Fix memory leak when device cannot be opened.
f19dbdb7 17134 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 17135 (grub_children_iterate): New prototype.
17136 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17137 New function.
17138 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17139 Return -1 if args.size was -1.
17140
4512e4f3 171412004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17142
17143 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17144 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17145 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17146 Open Firmware's memory for it; claim memory from _start to _end.
17147 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17148 (_end): New extern.
17149 (_start): Zero BSS from __bss_start to _end.
17150 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17151 New extern.
17152 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17153
4d61feb0 171542004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17155
ad0bd20b 17156 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17157 -1 if args.base was -1.
4d61feb0 17158
026fa2f9 171592004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17160
17161 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17162 escape sequence instead of a literal ^L. Also call
17163 grub_ofconsole_gotoxy.
17164
9f2220ef 171652004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17166
17167 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17168 void * arguments to grub_addr_t. All callers updated. Also make
17169 the `result' argument optional.
17170 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17171 All callers updated.
17172
8a572cd7 171732004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17174
17175 * commands/ls.c (grub_ls_list_files): Use the string following the
17176 initial ')', if present, as the filesystem path.
17177 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17178
17179 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17180
18aa81f2 171812004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17182
17183 Make the source code of the menu interface more readable.
f19dbdb7 17184
18aa81f2 17185 * normal/menu.c: Include grub/mm.h.
17186 (TERM_WIDTH): New macro.
17187 (TERM_HEIGHT): Likewise.
17188 (TERM_INFO_HEIGHT): Likewise.
17189 (TERM_MARGIN): Likewise.
17190 (TERM_SCROLL_WIDTH): Likewise.
17191 (TERM_TOP_BORDER_Y): Likewise.
17192 (TERM_LEFT_BORDER_X): Likewise.
17193 (TERM_BORDER_WIDTH): Likewise.
17194 (TERM_MESSAGE_HEIGHT): Likewise.
17195 (TERM_BORDER_HEIGHT): Likewise.
17196 (TERM_NUM_ENTRIES): Likewise.
17197 (TERM_FIRST_ENTRY_Y): Likewise.
17198 (TERM_ENTRY_WIDTH): Likewise.
17199 (TERM_CURSOR_X): Likewise.
17200 (draw_border): Use macros instead of magic numbers.
17201 (print_entry): Likewise.
17202 (print_entries): Likewise.
17203 (run_menu): Likewise. Also, handle the key 'e'.
17204 (run_menu_entry): Ignore empty command lines.
17205 (print_message): Added a new argument EDIT. If EDIT is true,
17206 print a different message.
17207 (init_page): Likewise.
17208 (edit_menu_entry): New function. Not implemented yet.
17209
b47efe30 172102004-09-17 Marco Gerards <metgerards@student.han.nl>
17211
17212 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17213 can be loaded from normal mode.
f19dbdb7 17214
b47efe30 17215 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17216 `multiboot.mod'.
17217 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17218 (multiboot_mod_CFLAGS): New variables.
17219 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 17220 * loader/i386/pc/multiboot_normal.c: Likewise.
17221
b47efe30 17222 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17223 attribute `unused'.
f19dbdb7 17224
b47efe30 17225 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17226 `fdiro' to read the mode information from instead of `diro'.
17227
17228 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17229 looking up a symlink.
17230
17231 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17232 macro.
17233 * normal/command.c (grub_command_execute): Don't parse the
17234 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17235 flags of the command.
17236
17237 * normal/menu.c (grub_menu_run): Fix typo.
17238
da75ac71 172392004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17240
17241 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17242
17243 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17244 `y + 1' instead of `y - 1'.
17245
17246 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 17247
062b24c2 172482004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17249
17250 From Hollis Blanchard <hollis@penguinppc.org>:
17251 * kern/misc.c (memmove): New alias for grub_memmove.
17252 (memcmp): New alias for grub_memcmp.
17253 (memset): New alias for grub_memset.
f19dbdb7 17254 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 17255 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 17256 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 17257 (grub_ieee1275_get_property): Likewise.
f19dbdb7 17258
8ddad845 172592004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17260
17261 Added normal mode command `chainloader' as module chain.mod, which
17262 depends on normal.mod and _chain.mod.
f19dbdb7 17263
8ddad845 17264 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17265 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17266 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17267 Deleted prototype.
17268 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17269 but arguments parsing moved to ...
17270 (grub_chainloader_cmd): ... here. New function.
17271 * include/grub/i386/pc/chainloader.h: New file.
17272 * loader/i386/pc/chainloader_normal.c: Likewise.
17273
2c1f4ce3 172742004-09-11 Marco Gerards <metgerards@student.han.nl>
17275
17276 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17277 (grub_mkimage_LDFLAGS): Likewise.
17278 (grub_emu_SOURCES): Likewise.
17279 (kernel_img_HEADERS): Added fshelp.h.
17280 * fs/ext2.c: Include <grub/fshelp.h>.
17281 (FILETYPE_REG): New macro.
17282 (FILETYPE_INO_REG): Likewise.
17283 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17284 Changed all users.
17285 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17286 all users.
17287 (grub_fshelp_node): New struct.
17288 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17289 to a pointer.
17290 (grub_ext2_get_file_block): Removed function.
17291 (grub_ext2_read_block): New function.
17292 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17293 This function was written.
17294 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17295 (grub_ext2_find_file): Removed function.
17296 (grub_ext2_read_symlink): New function.
17297 (grub_ext2_iterate_dir): Likewise.
17298 (grub_ext2_open): Rewritten.
17299 (grub_ext2_dir): Rewritten.
17300 * include/grub/fshelp.h: New file.
17301 * fs/fshelp.c: Likewise.
17302
3c52136a 173032004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17304
17305 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17306 (print_message): Add a missing newline.
17307 (run_menu): Added timeout support.
17308 (run_menu_entry): New local function.
17309 (grub_menu_run): Added support for booting.
17310
17311 * kern/loader.c (grub_loader_is_loaded): New function.
17312
17313 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17314 (grub_get_rtc): Exported.
17315
17316 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17317 (grub_get_rtc): Exported.
17318
17319 * include/grub/normal.h (struct grub_command_list): Remove
17320 constant from the member `command'.
17321
17322 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17323
17324 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17325
17326 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17327
aa033560 173282004-08-28 Marco Gerards <metgerards@student.han.nl>
17329
17330 Add support for the JFS filesystem.
17331
17332 * fs/jfs.c: New file.
17333 * include/grub/fs.h (grub_jfs_init): New prototype.
17334 (grub_jfs_fini): New prototype.
17335 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17336 (grub_emu_SOURCES): Likewise.
17337 (pkgdata_MODULES): Add jfs.mod.
17338 (jfs_mod_SOURCES): New variable.
17339 (jfs_mod_CFLAGS): Likewise.
17340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17341 (grubof_SOURCES): Likewise.
17342 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17343
17344 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17345 endian to the host endian.
17346 (grub_fat_utf16_to_utf8): Move function from there...
17347 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 17348 the endianness of the source string anymore.
aa033560 17349 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17350
94bc45af 173512004-08-24 Marco Gerards <metgerards@student.han.nl>
17352
17353 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17354 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17355 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17356 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 17357
94bc45af 17358 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17359 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17360 for `node_found' and `it_dir'.
17361 (grub_hfs_dir): Add prototype for `dir_hook'.
17362
17363 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17364 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17365 and `indir32' to silence a gcc warning.
17366
17367 * include/grub/fs.h (grub_hfs_init): New prototype.
17368 (grub_hfs_fini): Likewise.
f19dbdb7 17369
17370
97543f08 173712004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17372
17373 Each disk device has its own id now. This is useful to make use
17374 of multiple disk devices.
f19dbdb7 17375
97543f08 17376 * include/grub/disk.h (grub_disk_dev_id): New enum.
17377 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17378 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17379
17380 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17381 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17382
17383 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17384 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17385
17386 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17387 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17388
17389 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17390 "id" which is used by the cache manager.
17391
17392 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17393 of just "GRUB".
17394
64372eb4 173952004-08-18 Marco Gerards <metgerards@student.han.nl>
17396
17397 * fs/hfs.c: New file.
17398 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17399 (grub_emu_SOURCES): Likewise.
17400 (pkgdata_MODULES): Add hfs.mod.
17401 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17402 (grubof_SOURCES): Likewise.
17403 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17404
17405 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17406 * kern/misc.c (grub_strncasecmp): Add function.
17407
cc61b58f 174082004-08-14 Marco Gerards <metgerards@student.han.nl>
17409
17410 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17411 with parentheses.
17412
17413 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17414 (grub_ext2_dir): In case the directory entry type is unknown, read
17415 it from the inode.
17416
0ef123f6 174172004-08-02 Peter Bruin <pjbruin@dds.nl>
17418
17419 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17420 grub_load_linux instead of grub_rescue_cmd_linux as second
17421 argument of grub_rescue_register_command.
17422
17423 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17424
a447c5df 174252004-07-27 Marco Gerards <metgerards@student.han.nl>
17426
17427 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17428 function.
17429 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17430 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17431 `loader/powerpc/ieee1275/linux.c',
17432 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17433 * include/grub/powerpc/ieee1275/ieee1275.h
17434 (grub_ieee1275_release): New prototype.
17435 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17436 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17437 normal, boot, linux and linux_normal.
17438 * loader/powerpc/ieee1275/linux.c: New file.
17439 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17440
5a9e3546 174412004-07-12 Marco Gerards <metgerards@student.han.nl>
17442
17443 * normal/arg.c (grub_arg_parse): Correct error handling after
17444 reallocating the argumentlist (check if `argl' is not null instead
17445 of checking if `args' is not null).
17446 * kern/mm.c (grub_realloc): Return the same pointer when using the
17447 same region, instead of returning the header address.
17448
e15199cb 174492004-07-11 Marco Gerards <metgerards@student.han.nl>
17450
17451 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17452 one block instead of two when looking for the initial partition.
17453 (grub_partition_probe): Initialize the local variable `p' with 0.
17454 Use base 10 for the grub_strtoul call.
17455 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17456 need for one local variable.
17457 (grub_strtoul): Don't add the new value to `num', instead of that
17458 just assign it.
17459
020616c2 174602004-07-11 Marco Gerards <metgerards@student.han.nl>
17461
17462 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17463 (pxeboot_img_SOURCES): New variable.
17464 (pxeboot_img_ASFLAGS): Likewise.
17465 (pxeboot_img_LDFLAGS): Likewise.
17466 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17467 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17468 <lode_leroy@hotmail.com>.
17469
6c51eb64 174702004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17471
17472 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17473 there was no input.
17474
cfb12aff 174752004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17476
17477 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17478 the history buffer logic.
17479
6eabba74 174802004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17481
17482 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17483 (FILETYPE_INO_SYMLINK): New macros.
17484 (grub_ext2_find_file): Check if the node is a directory using the
17485 inode stat information instead of using the filetype in the
17486 dirent. Exclude the first character of an absolute symlink.
17487 (grub_ext2_dir): Mask out the filetype part of the mode member of
17488 the inode.
17489
66e19ef8 174902004-05-24 Marco Gerards <metgerards@student.han.nl>
17491
17492 Add support for UFS version 1 and 2. Add support for the minix
17493 filesystem version 1 and 2, both the variants with 14 and 30 long
17494 filenames.
f19dbdb7 17495
66e19ef8 17496 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17497 fs/minix.c.
17498 (grub_emu_SOURCES): Likewise.
17499 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17500 (ufs_mod_SOURCES): New variable.
17501 (ufs_mod_CFLAGS): Likewise.
17502 (minix_mod_SOURCES): Likewise.
17503 (minix_mod_CFLAGS): Likewise.
17504 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17505 fs/minix.c.
17506 (grubof_SOURCES): Likewise.
17507 * fs/ufs.c: New file.
17508 * fs/minix.c: New file.
17509 * include/grub/fs.h (grub_ufs_init): New prototype.
17510 (grub_ufs_fini): Likewise.
17511 (grub_minix_init): Likewise.
17512 (grub_minix_fini): Likewise.
17513 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17514 minix fs.
17515
cc2e748a 175162004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17517
17518 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17519 commands/ls.c, commands/terminal.c, commands/boot.c,
17520 commands/cmp.c and commands/cat.c.
17521 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17522
17523 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17524 "env.h"
17525
4b13b216 175262004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17527
17528 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17529 and grub_, respectively. Because the conversion is trivial and
17530 mechanical, I omit the details here. Please refer to the CVS
17531 if you need more information.
17532
6a142551 175332004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17534
17535 * include/pupa: Renamed to ...
17536 * include/grub: ... this.
17537 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17538 * util/i386/pc/grub-mkimage.c: ... this.
17539 * util/i386/pc/pupa-setup.c: Renamed to ...
17540 * util/i386/pc/grub-setup.c: ... this.
17541 * util/pupa-emu.c: Renamed to ...
17542 * util/grub-emu.c: ... this.
17543
e56cdf21 175442004-03-29 Marco Gerards <metgerards@student.han.nl>
17545
17546 Add support for the newworld apple macintosh (PPC). This has been
17547 tested on the powerbook 2000 only. It only adds support for
17548 generic ieee1275 functions, console and disk support. This should
17549 be easy to port to other architectures with support for Open
17550 Firmware.
f19dbdb7 17551
e56cdf21 17552 * configure.ac: Accept the powerpc as host_cpu. In the case of
17553 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17554 specific tests are only executed while building for the i386.
17555 Inverse test for crosscompile.
17556 * genmk.rb (Utility): Allow assembler files.
17557 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17558 * conf/powerpc-ieee1275.rmk: New file.
17559 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17560 * disk/powerpc/ieee1275/partition.c: Likewise.
17561 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17562 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17563 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17564 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17565 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17566 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17567 * include/pupa/powerpc/ieee1275/loader.h
17568 * include/pupa/powerpc/setjmp.h: Likewise.
17569 * include/pupa/powerpc/types.h: Likewise.
17570 * kern/powerpc/ieee1275/init.c: Likewise.
17571 * kern/powerpc/ieee1275/openfw.c: Likewise.
17572 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17573
17574 These files were written by Johan Rydberg
17575 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 17576
e56cdf21 17577 * boot/powerpc/ieee1275/cmain.c: New file.
17578 * boot/powerpc/ieee1275/crt0.S: Likewise.
17579 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17580 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17581
8c8cc205 175822004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17583
17584 * Makefile.in: Update copyright.
17585 * genmodsrc.sh: Likewise.
17586 * gensymlist.sh: Likewise.
17587 * term/i386/pc/vga.c: Indent correctly.
17588
17589 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17590 bugreporting address.
17591 * util/i386/pc/pupa-setup.c (usage): Likewise,
17592 (main): Call pupa_ext2_init and pupa_ext2_fini.
17593
f19dbdb7 17594 * fs/fat.c (log2): Renamed to ...
8c8cc205 17595 (fat_log2): ... this.
17596 All callers changed.
17597 * kern/misc.c (memcpy): Alias to pupa_memmove.
17598 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17599 lvalue cast.
17600 * util/console.c (pupa_ncurses_fini): Return 0.
17601
17602 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17603 Move fail label here.
17604 [__GNU__]: Don't warn when using stat.
17605 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17606 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17607 long int. Use strtol instead of strtoul.
f19dbdb7 17608
db1771cf 176092004-03-14 Marco Gerards <metgerards@student.han.nl>
17610
17611 * commands/boot.c: New file.
17612 * commands/cat.c: Likewise.
17613 * commands/cmp.c: Likewise.
17614 * commands/ls.c: Likewise.
17615 * commands/terminal.c: Likewise.
17616 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17617 (pupa_register_command): Changed interface to match the new
17618 argument parser.
17619 (pupa_command_execute): Changed (almost rewritten) so it uses
17620 pupa_split_command. Added support for setting variables using the
17621 syntax `foo=bar'.
17622 (rescue_command): Changed to work with the new argument parser.
17623 (terminal_command): Moved from here to commands/terminal.c.
17624 (set_command): New function.
17625 (unset_command): New function.
17626 (insmod_command): New function.
17627 (rmmod_command): New function.
17628 (lsmod_command): New function.
17629 (pupa_command_init): Don't initialize the command terminal
17630 anymore. Initialize the commands set, unset, insmod, rmmod and
17631 lsmod.
17632 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17633 (kernel_img_HEADERS): Add arg.h and env.h.
17634 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17635 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17636 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17637 normal/arg.c.
17638 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17639 terminal.mod.
17640 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17641 (boot_mod_SOURCES): New variable.
17642 (terminal_mod_SOURCES): Likewise.
17643 (ls_mod_SOURCES): Likewise.
17644 (cmp_mod_SOURCES): Likewise.
17645 (cat_mod_SOURCES): Likewise.
17646
17647 * normal/arg.c: New file.
17648 * kern/env.c: Likewise.
17649 * include/pupa/arg.h: Likewise.
17650 * include/pupa/env.h: Likewise.
17651 * font/manager.c (font_command): Changed to match argument parsing
17652 interface changes.
17653 (PUPA_MOD_INIT): Likewise.
17654 * hello/hello.c (pupa_cmd_hello): Likewise.
17655 (PUPA_MOD_INIT): Likewise.
17656 * include/pupa/disk.h: Include <pupa/device.h>.
17657 (pupa_print_partinfo): New prototype.
17658 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17659 (pupa_dl_get_prefix): Likewise.
17660 * include/pupa/misc.h: Include <pupa/err.h>.
17661 (pupa_isgraph): New prototype.
17662 (pupa_isdigit): Likewise.
17663 (pupa_split_cmdline): Likewise.
17664 * include/pupa/normal.h: Include <pupa/arg.h>.
17665 (pupa_command): Changed the prototype of the member `func' to
17666 match the argument parsing interface. Added member `options'.
17667 (pupa_register_command): Updated to match function.
17668 (pupa_arg_parse): New prototype.
17669 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17670 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17671 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17672 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17673 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17674 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17675 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17676 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17677 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17678 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17679 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17680 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17681 * kern/disk.c: Include <pupa/file.h>.
17682 (pupa_print_partinfo): New function.
17683 * kern/dl.c: Include <pupa/env.h>.
17684 (pupa_dl_dir): Variable removed.
17685 (pupa_dl_load): Use the environment variable `prefix' instead of
17686 the variable pupa_dl_dir.
17687 (pupa_dl_set_prefix): Function removed.
17688 (pupa_dl_get_prefix): Likewise.
17689 * kern/i386/pc/init.c: Include <pupa/env.h>.
17690 (pupa_machine_init): Use the environment variable `prefix' instead of
17691 using pupa_dl_set_prefix to set the prefix.
17692 * kern/main.c: Include <pupa/env.h>.
17693 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17694 using pupa_dl_get_prefix to get the prefix.
17695 * kern/misc.c: Include <pupa/env.h>.
17696 (pupa_isdigit): New function.
17697 (pupa_isgraph): Likewise.
17698 (pupa_ftoa): Likewise.
17699 (pupa_vsprintf): Added support for printing values of the type
17700 `double'. Make it possible to format variable output when using
17701 formatting like `%1.2%f'.
17702 (pupa_split_cmdline): New function.
17703 * kern/rescue.c: Include <pupa/env.h>.
17704 (next_word): Removed function.
17705 (pupa_rescue_cmd_prefix): Likewise.
17706 (pupa_rescue_cmd_set): New function.
17707 (pupa_rescue_cmd_unset): New function.
17708 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17709 split the command line instead of splitting it here. Added
17710 support for setting variables using the syntax `foo=bar'. Don't
17711 initialize the prefix command anymore. Initialized the set and
17712 unset commands.
17713 * normal/cmdline.c: Include <pupa/env.h>.
17714 (pupa_tab_complete): Added prototypes for print_simple_completion,
17715 print_partition_completion, add_completion, iterate_commands,
17716 iterate_dev, iterate_part and iterate_dir. Moved code to print
17717 partition information from here to kern/disk.c.
fe6b695a 17718 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 17719 * normal/main.c: Include <pupa/env.h>.
17720 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17721 instead of using pupa_dl_get_prefix to get the prefix.
17722 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17723 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17724 warning.
17725 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17726 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17727 ((unused))' to silence a gcc warning.
17728 (pupa_vga_setcolor): Likewise.
17729 (debug_command): Changed to match argument parsing
17730 interface changes.
17731 * util/pupa-emu.c: Include <pupa/env.h>.
17732 (options): Added 0's for unused fields to silence a gcc warning.
17733 (argp): Likewise.
17734 (main): Use the environment variable `prefix' instead of using
17735 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17736 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17737 and terminal.
17738
17739 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17740 * util/misc.c: Include <malloc.h>.
17741 (pupa_malloc): Rewritten so errors are correctly reported.
17742 (pupa_realloc): Likewise.
17743 (pupa_memalign): Likewise.
17744 (pupa_mm_init_region): Declare unused variables with
17745 `__attribute__ ((unused))' to silence a gcc warning.
17746 * normal/i386/setjmp.S: Remove tab at the end of the file to
17747 silence a gcc warning.
17748 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17749 variables with `__attribute__ ((unused))' to silence a gcc
17750 warning.
17751 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17752 local variable i unsigned to silence a gcc warning.
17753
17754 * kern/term.c: Include <pupa/misc.h>.
17755 (pupa_more_lines): New variable.
17756 (pupa_more): Likewise.
17757 (pupa_putcode): When the pager is active pause at the end of every
17758 screen.
17759 (pupa_set_more): New function.
17760 * include/pupa/term.h (pupa_set_more): New prototype.
17761
17762
3b1139cb 177632004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17764
17765 Now this project is GRUB 2 rather than PUPA. The location of
17766 the CVS repository was moved to GRUB's.
f19dbdb7 17767
3b1139cb 17768 * configure.ac: Use bug-grub as the reporting address.
17769 Use GRUB instead of PUPA.
17770 Change the version number to 1.90.
17771
8367695c 177722004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17773
17774 * genkernsyms.sh: Updated copyright information.
17775 * genmk.rb: Likewise.
17776 * genmodsrc.sh: Likewise.
17777 * gensymlist.sh: Likewise.
17778 * boot/i386/pc/boot.S: Likewise.
17779 * boot/i386/pc/diskboot.S: Likewise.
17780 * disk/i386/pc/biosdisk.c: Likewise.
17781 * disk/i386/pc/partition.c: Likewise.
17782 * font/manager.c: Likewise.
17783 * fs/ext2.c: Likewise.
17784 * fs/fat.c: Likewise.
17785 * include/pupa/boot.h: Likewise.
17786 * include/pupa/device.h: Likewise.
17787 * include/pupa/disk.h: Likewise.
17788 * include/pupa/dl.h: Likewise.
17789 * include/pupa/elf.h: Likewise.
17790 * include/pupa/err.h: Likewise.
17791 * include/pupa/file.h: Likewise.
17792 * include/pupa/font.h: Likewise.
17793 * include/pupa/fs.h: Likewise.
17794 * include/pupa/kernel.h: Likewise.
17795 * include/pupa/loader.h: Likewise.
17796 * include/pupa/misc.h: Likewise.
17797 * include/pupa/mm.h: Likewise.
17798 * include/pupa/net.h: Likewise.
17799 * include/pupa/normal.h: Likewise.
17800 * include/pupa/rescue.h: Likewise.
17801 * include/pupa/setjmp.h: Likewise.
17802 * include/pupa/symbol.h: Likewise.
17803 * include/pupa/term.h: Likewise.
17804 * include/pupa/types.h: Likewise.
17805 * include/pupa/i386/setjmp.h: Likewise.
17806 * include/pupa/i386/types.h: Likewise.
17807 * include/pupa/i386/pc/biosdisk.h: Likewise.
17808 * include/pupa/i386/pc/boot.h: Likewise.
17809 * include/pupa/i386/pc/console.h: Likewise.
17810 * include/pupa/i386/pc/init.h: Likewise.
17811 * include/pupa/i386/pc/kernel.h: Likewise.
17812 * include/pupa/i386/pc/linux.h: Likewise.
17813 * include/pupa/i386/pc/loader.h: Likewise.
17814 * include/pupa/i386/pc/memory.h: Likewise.
17815 * include/pupa/i386/pc/multiboot.h: Likewise.
17816 * include/pupa/i386/pc/partition.h: Likewise.
17817 * include/pupa/i386/pc/time.h: Likewise.
17818 * include/pupa/i386/pc/vga.h: Likewise.
17819 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17820 * include/pupa/util/getroot.h: Likewise.
17821 * include/pupa/util/misc.h: Likewise.
17822 * include/pupa/util/resolve.h: Likewise.
17823 * kern/device.c: Likewise.
17824 * kern/disk.c: Likewise.
17825 * kern/dl.c: Likewise.
17826 * kern/err.c: Likewise.
17827 * kern/file.c: Likewise.
17828 * kern/fs.c: Likewise.
17829 * kern/loader.c: Likewise.
17830 * kern/main.c: Likewise.
17831 * kern/misc.c: Likewise.
17832 * kern/mm.c: Likewise.
17833 * kern/rescue.c: Likewise.
17834 * kern/term.c: Likewise.
17835 * kern/i386/dl.c: Likewise.
17836 * kern/i386/pc/init.c: Likewise.
17837 * kern/i386/pc/lzo1x.S: Likewise.
17838 * kern/i386/pc/startup.S: Likewise.
17839 * loader/i386/pc/chainloader.c: Likewise.
17840 * loader/i386/pc/linux.c: Likewise.
17841 * loader/i386/pc/multiboot.c: Likewise.
17842 * normal/cmdline.c: Likewise.
17843 * normal/command.c: Likewise.
17844 * normal/main.c: Likewise.
17845 * normal/menu.c: Likewise.
17846 * normal/i386/setjmp.S: Likewise.
17847 * term/i386/pc/console.c: Likewise.
17848 * term/i386/pc/vga.c: Likewise.
17849 * util/console.c: Likewise.
17850 * util/genmoddep.c: Likewise.
17851 * util/misc.c: Likewise.
17852 * util/pupa-emu.c: Likewise.
17853 * util/resolve.c: Likewise.
17854 * util/unifont2pff.rb: Likewise.
17855 * util/i386/pc/biosdisk.c: Likewise.
17856 * util/i386/pc/getroot.c: Likewise.
17857 * util/i386/pc/pupa-mkimage.c: Likewise.
17858 * util/i386/pc/pupa-setup.c: Likewise.
17859
e6eced71 178602004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17861
17862 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17863 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17864 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17865 reading and reset it after reading.
17866 (pupa_ext2_close): Return PUPA_ERR_NONE.
17867
17868 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17869 Correct value.
17870 (struct linux_kernel_header): Add kernel_version and
17871 initrd_addr_max.
17872 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17873 pupa_file_read succeeds.
17874 (pupa_rescue_cmd_initrd): Implement.
17875
5aded270 178762003-12-03 Marco Gerards <metgerards@student.han.nl>
17877
17878 * fs/ext2.c (pupa_ext2_label): New function.
17879 (pupa_ext2_fs): Added label.
17880 * fs/fat.c (pupa_fat_label): New function.
17881 (pupa_fat_fs): Added label.
17882 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17883
17884 * kern/misc.c (pupa_strndup): New function.
17885 * include/pupa/misc.h (pupa_strndup): New prototype.
17886
17887 * include/pupa/normal.h: Include <pupa/err.h>.
17888 (pupa_set_history): New prototype.
17889 (pupa_iterate_commands): New prototype.
17890 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17891 <pupa/disk.h>, <pupa/file.h>.
17892 (hist_size): New variable.
17893 (hist_lines): Likewise.
17894 (hist_end): Likewise.
17895 (hist_used): Likewise.
17896 (pupa_set_history): New function.
17897 (pupa_history_get): Likewise.
17898 (pupa_history_add): Likewise.
17899 (pupa_history_replace): Likewise.
17900 (pupa_tab_complete): Likewise.
17901 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17902 completion shows partitionnames while completing partitions, this
17903 feature was suggested by Jeff Bailey.
17904 * normal/command.c (pupa_iterate_commands): New function.
17905 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17906 (pupa_normal_init): Initialize history buffer.
17907 (PUPA_MOD_INIT): Likewise.
17908 (pupa_normal_fini): Free the history buffer.
17909 (PUPA_MOD_FINI): Likewise.
17910
17911 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17912 key.
17913
17914 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17915 * configure.ac [i386]: Check for regparam bug.
17916 (NESTED_FUNC_ATTR) [! i386]: Defined.
17917
1f7315a3 179182003-11-17 Marco Gerards <metgerards@student.han.nl>
17919
17920 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17921 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17922 (pupa_emu_SOURCES): New variable.
17923 (pupa_emu_LDFLAGS): Likewise.
17924 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17925 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17926 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17927 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17928 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17929 (pupa_jmp_buf): New typedef.
17930 (pupa_setjmp) [PUPA_UTIL]: New macro.
17931 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17932 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17933 (pupa_refresh): New prototype.
17934 * include/pupa/util/getroot.h: New file.
17935 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17936 it.
17937 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17938 (pupa_rescue_cmd_cat): Likewise.
17939 (pupa_rescue_cmd_ls): Likewise.
17940 (pupa_rescue_cmd_testload): Likewise.
17941 (pupa_rescue_cmd_lsmod): Likewise.
17942 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17943 * normal/menu.c (run_menu): Likewise.
17944 * kern/term.c (pupa_cls): Likewise.
17945 (pupa_refresh): New function.
17946 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17947 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17948 * util/console.c: New file.
f19dbdb7 17949
1f7315a3 17950 * util/i386/pc/getroot.c: New file.
17951 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17952 (pupa_putchar): New function.
17953 (pupa_refresh): Likewise.
17954 (xgetcwd): Function moved to ...
17955 (strip_extra_slashes): Likewise.
17956 (get_prefix): Likewise.
f19dbdb7 17957 * util/i386/pc/getroot.c: ... here.
1f7315a3 17958 (find_root_device): Function moved and renamed to...
17959 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17960 Changed all callers.
17961 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17962 and renamed to...
17963 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17964 Changed all callers.
17965 * util/misc.c (pupa_memalign): New function.
17966 (pupa_mm_init_region): Likewise.
17967 (pupa_register_exported_symbols): Likewise.
17968 (pupa_putchar): Function removed.
17969 * util/pupa-emu.c: New file.
17970
9a5c1ade 179712003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17972
17973 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17974 (_multiboot_mod_SOURCES): New variable.
17975 (_multiboot_mod_CFLAGS): Likewise.
17976 * loader/i386/pc/multiboot.c: New file.
17977 * include/pupa/i386/pc/multiboot.h: Likewise.
17978 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17979 (pupa_multiboot_real_boot): New function.
17980 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17981 (pupa_multiboot_real_boot): New prototype.
17982 (pupa_rescue_cmd_multiboot): Likewise
17983 (pupa_rescue_cmd_module): Likewise.
17984
17985 * kern/loader.c (pupa_loader_set): Continue when
17986 pupa_loader_unload_func() fails.
17987 (pupa_loader_unset): New function.
17988 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17989
17990 * kern/misc.c (pupa_stpcpy): New function.
17991 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17992
8e72a9c0 179932003-11-12 Marco Gerards <metgerards@student.han.nl>
17994
17995 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17996 for available extensions.
17997
17998 * include/pupa/i386/pc/time.h: New file.
17999 * kern/disk.c: Include <pupa/machine/time.h>.
18000 (PUPA_CACHE_TIMEOUT): New macro.
18001 (pupa_last_time): New variable.
18002 (pupa_disk_open): Flush the cache when there was a timeout.
18003 (pupa_disk_close): Reset the timer.
18004 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18005 pupa_currticks.
18006 * util/misc.c: Include <sys/times.h>
18007 (pupa_get_rtc): New function.
18008
c4adbd32 180092003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
18010
18011 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18012 as blocks.
18013 (pupa_ext2_get_file_block): Use blocks member.
18014
18015 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18016 first block. Return -1 instead of pupa_errno on error.
18017
bfd30f06 180182003-10-27 Marco Gerards <metgerards@student.han.nl>
18019
18020 * README: In the pupa-mkimage example use _chain instead of chain
18021 and ext2 instead of fat.
18022 * TODO: Replace ext2fs with jfs as an example. Add an item for
18023 adding journal playback for ext2fs.
18024 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18025 (pkgdata_MODULES): Added ext2.mod.
18026 (ext2_mod_SOURCES): New variable.
18027 (ext2_mod_CFLAGS): Likewise.
18028 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18029 * include/pupa/misc.h (pupa_strncpy): New prototype.
18030 (pupa_strcat): Likewise.
18031 (pupa_strncmp): Likewise.
18032 * kern/misc.c (pupa_strcat): Enable function.
18033 (pupa_strncpy): New function.
18034 (pupa_strncmp): Likewise.
18035 * fs/ext2.c: New file.
f19dbdb7 18036
bfd30f06 18037 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18038 when the read failed before retrying.
18039 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18040 (_FILE_OFFSET_BITS): Likewise.
18041 * configure.ac: Added AC_SYS_LARGEFILE.
18042
98d15063 180432003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18044
18045 * genmk.rb (PModule#rule): Make sure to get only symbol names
18046 from the output of nm.
18047 Reported by Robert Millan <zeratul2@wanadoo.es>.
18048
18d9c7cd 180492003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18050
18051 I forgot to check in these changes for a long time. This adds
18052 incomplete support for VGA console, and this is still very
18053 buggy. Also, a lot of consideration is required for I18N,
18054 UNICODE, and VGA font issues. Therefore, assume that this is
18055 such that "better than nothing".
f19dbdb7 18056
18d9c7cd 18057 * font/manager.c: New file.
18058 * include/pupa/font.h: Likewise.
18059 * include/pupa/i386/pc/vga.h: Likewise.
18060 * term/i386/pc/vga.c: Likewise.
18061 * util/unifont2pff.rb: Likewise.
18062
18063 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18064 (pkgdata_MODULES): Added vga.mod and font.mod.
18065 (vga_mod_SOURCES): New variables.
18066 (vga_mod_CFLAGS): Likewise.
18067 (font_mod_SOURCES): Likewise.
18068 (font_mod_CFLAGS): Likewise.
18069
18070 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18071
18072 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 18073 (struct pupa_term): Added init and fini.
18d9c7cd 18074 Changed the argument of putchar to pupa_uint32_t.
18075
18076 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18077 (pupa_console_real_putchar): New prototype.
18078 (pupa_console_putchar): Removed.
18079 (pupa_console_checkkey): Exported.
18080 (pupa_console_getkey): Likewise.
18081
18082 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18083 characters.
18084
18085 * kern/term.c (pupa_term_set_current): Rewritten.
18086 (pupa_putchar): Likewise.
18087 (pupa_putcode): New function.
18088
18089 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18090 (pupa_console_real_putchar): ... this.
18091 (pupa_vga_set_mode): New function.
18092 (pupa_vga_get_font): Likewise.
18093
18094 * normal/command.c: Include pupa/term.h.
18095 (terminal_command): New function.
18096 (pupa_command_init): Register the command "terminal".
18097
18098 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18099 (DISP_UP): Likewise.
18100 (DISP_RIGHT): Likewise.
18101 (DISP_DOWN): Likewise.
18102 (DISP_HLINE): Likewise.
18103 (DISP_VLINE): Likewise.
18104 (DISP_UL): Likewise.
18105 (DISP_UR): Likewise.
18106 (DISP_LL): Likewise.
18107 (DISP_LR): Likewise.
18108
18109 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 18110
977329f5 181112003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18112
18113 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18114 FIX. Reverse the path_list.
18115
18116 * include/pupa/normal.h: Export pupa_register_command and
18117 pupa_unregister_command.
18118
18119 * hello/hello.c (pupa_cmd_hello): New module.
18120 * conf/i386-pc.rmk: Added hello.mod.
18121
1f5ab428 181222003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18123
18124 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 18125
1f5ab428 18126 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18127 (compress_kernel): New variable.
18128 (generate_image): Heavily modified to support compressing a
18129 large part of the core image.
18130
18131 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18132 leak.
18133 (pupa_util_load_image): New function.
18134
18135 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18136 (pupa_compressed_size): New variable.
18137 (codestart): Enable Gate A20 here.
18138 Decompress the compressed part of the core image.
18139 Rearrange the code to put functions and variables which are
18140 required for initialization in the non-compressed part.
18141 Include lzo1x.S.
18142
18143 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18144 here.
18145
18146 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18147
f19dbdb7 18148 * include/pupa/i386/pc/kernel.h
1f5ab428 18149 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18150 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18151 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18152 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18153 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18154
18155 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18156
18157 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18158 (Utility#rule): Likewise.
18159
18160 * configure.ac: Check if LZO is available.
18161
ce5bf700 181622003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18163
18164 * include/pupa/normal.h: New file.
18165 * include/pupa/setjmp.h: Likewise.
18166 * include/pupa/i386/setjmp.h: Likewise.
18167 * normal/cmdline.c: Likewise.
18168 * normal/command.c: Likewise.
18169 * normal/main.c: Likewise.
18170 * normal/menu.c: Likewise.
18171 * normal/i386/setjmp.S: Likewise.
f19dbdb7 18172
ce5bf700 18173 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18174 (pupa_rescue_cmd_initrd): Likewise.
18175
18176 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18177 Likewise.
18178
18179 * kern/i386/pc/startup.S (translation_table): New variable.
18180 (translate_keycode): New function.
18181 (pupa_console_getkey): Call translate_keycode.
18182
18183 * kern/rescue.c (attempt_normal_mode): New function.
18184 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18185 it failed, print a message.
18186
18187 * kern/mm.c (pupa_real_malloc): Print more information when a
18188 free magic is broken.
18189 (pupa_free): If the first free header is not free actually, set
18190 it to P.
18191
18192 * kern/main.c (pupa_load_normal_mode): Just load the module
18193 "normal".
18194 (pupa_main): Don't print the message
18195 "Entering into rescue mode..." here.
18196
18197 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18198 Declared.
18199 (pupa_rescue_cmd_initrd): Likewise.
18200 (pupa_rescue_cmd_initrd): Likewise.
18201
18202 * include/pupa/symbol.h (FUNCTION): Specify the type.
18203 (VARIABLE): Likewise.
18204
18205 * include/pupa/err.h (pupa_err_t): Added
18206 PUPA_ERR_UNKNOWN_COMMAND.
18207
18208 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18209 (pupa_dl_get_prefix): Likewise.
18210
18211 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18212 Added _chain.mod and _linux.mod instead of chain.mod and
18213 linux.mod.
18214 (chain_mod_SOURCES): Renamed to ...
18215 (_chain_mod_SOURCES): ... this.
18216 (chain_mod_CFLAGS): Renamed to ...
18217 (_chain_mod_CFLAGS): ... this.
18218 (linux_mod_SOURCES): Renamed to ...
18219 (_linux_mod_SOURCES): ... this.
18220 (linux_mod_CFLAGS): Renamed to ...
18221 (_linux_mod_CFLAGS): ... this.
18222 (normal_mod_SOURCES): New variable.
18223 (normal_mod_CFLAGS): Likewise.
18224 (normal_mod_ASFLAGS): Likewise.
18225
182262003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18227
18228 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18229 possible.
18230
fe6b695a 18231 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 18232 recursively.
18233 (pupa_dl_unref): Unrefer depending modules recursively.
18234 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18235 a module is unloaded before one depending on that module is
18236 unloaded.
18237 (pupa_dl_unload): Unload depending modules explicitly,
18238 if possible.
18239
c04da074 182402003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18241
18242 * include/pupa/i386/pc/linux.h: New file.
18243 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 18244
c04da074 18245 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18246 Removed.
18247 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18248 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18249 of PUPA_CHAINLOADER_BOOT_SECTOR.
18250
18251 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18252 (pupa_linux_prot_size): New variable.
18253 (pupa_linux_tmp_addr): Likewise.
18254 (pupa_linux_real_addr): Likewise.
18255 (pupa_linux_boot_zimage): New function.
18256 (pupa_linux_boot_bzimage): Likewise.
18257
18258 * kern/i386/pc/init.c (struct mem_region): New structure.
18259 (MAX_REGIONS): New macro.
18260 (mem_regions): New variable.
18261 (num_regions): Likewise.
18262 (pupa_os_area_addr): Likewise.
18263 (pupa_os_area_size): Likewise.
18264 (pupa_lower_mem): Likewise.
18265 (pupa_upper_mem): Likewise.
18266 (add_mem_region): New function.
18267 (compact_mem_regions): Likewise.
18268 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18269 the size of the conventional memory and that of so-called upper
18270 memory (before the first memory hole).
18271 Instead of adding each found region to free memory, use
18272 add_mem_region and add them after removing overlaps.
18273 Also, add only 1/4 of the upper memory to free memory. The rest
18274 is used for loading OS images. Maybe this is ad hoc, but this
18275 makes it much easier to relocate OS images when booting.
18276
18277 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18278 (pupa_enter_rescue_mode): Don't register initrd and module.
18279
18280 * kern/mm.c: Include pupa/dl.h.
18281
18282 * kern/main.c: Include pupa/file.h and pupa/device.h.
18283
18284 * kern/loader.c (pupa_loader_load_module_func): Removed.
18285 (pupa_loader_load_module): Likewise.
18286
18287 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18288 ``.o''.
18289
18290 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18291 (pupa_linux_tmp_addr): Likewise.
18292 (pupa_linux_real_addr): Likewise.
18293 (pupa_linux_boot_zimage): Likewise.
18294 (pupa_linux_boot_bzimage): Likewise.
18295
18296 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18297 (pupa_upper_mem): Likewise.
18298 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18299 module is too dangerous.
18300
18301 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18302 (pupa_os_area_size): Likewise.
18303 (pupa_loader_set): Remove the first argument. Loader doesn't
18304 manage modules or initrd any longer.
18305 (pupa_loader_load_module): Removed.
18306
18307 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18308 (linux_mod_SOURCES): New variable.
18309 (linux_mod_CFLAGS): Likewise.
18310
a13f9237 183112003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18312
18313 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18314 the length of a blocklist correctly.
18315
18316 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18317 Use ioctl only if the OS file is a block device.
18318 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18319 not very useful for normal files.
18320
18321 * kern/main.c (pupa_set_root_dev): New function.
18322 (pupa_load_normal_mode): Likewise.
18323 (pupa_main): Call those above.
18324
18325 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18326 pupa_uint16_t.
18327
18328 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18329
a5ffe966 183302003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18331
18332 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18333 (setup): Configure the installed partition information and the
18334 dl prefix.
18335
18336 * loader/i386/pc/chainloader.c (my_mod): New variable.
18337 (pupa_chainloader_unload): New function.
18338 (pupa_rescue_cmd_chainloader): Refer itself.
18339 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18340
18341 * kern/i386/pc/startup.S (install_partition): Removed.
18342 (version_string): Likewise.
18343 (config_file): Likewise.
18344 (pupa_install_dos_part): New variable.
18345 (pupa_install_bsd_part): Likewise.
18346 (pupa_prefix): Likewise.
18347 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18348
18349 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18350 and pupa/misc.h.
18351 (make_install_device): New function.
18352 (pupa_machine_init): Set the dl prefix.
18353
18354 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18355 (buf): Renamed to ...
18356 (linebuf): ... this.
18357 (pupa_rescue_cmd_prefix): New function.
18358 (pupa_rescue_cmd_insmod): Likewise.
18359 (pupa_rescue_cmd_rmmod): Likewise.
18360 (pupa_rescue_cmd_lsmod): Likewise.
18361 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18362 rmmod and lsmod.
18363
18364 * kern/mm.c (pupa_memalign): If failed even after invalidating
18365 disk caches, unload unneeded modules and retry.
18366
18367 * kern/misc.c (pupa_memmove): New function.
18368 (pupa_memcpy): Removed.
18369 (pupa_strcpy): New function.
18370 (pupa_itoa): Made static.
18371
18372 * kern/dl.c (pupa_dl_iterate): New function.
18373 (pupa_dl_ref): Likewise.
18374 (pupa_dl_unref): Likewise.
18375 (pupa_dl_unload): Return if succeeded or not.
18376 (pupa_dl_unload_unneeded): New function.
18377 (pupa_dl_unload_all): Likewise.
18378 (pupa_dl_init): Renamed to ...
18379 (pupa_dl_set_prefix): ... this.
18380 (pupa_dl_get_prefix): New function.
18381
18382 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18383 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18384 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18385 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18386 (pupa_install_dos_part): Declared.
18387 (pupa_install_bsd_part): Likewise.
18388 (pupa_prefix): Likewise.
18389 (pupa_boot_drive): Likewise.
18390
18391 * include/pupa/types.h: Fix a typo.
18392
18393 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18394 pupa_memmove.
18395 (pupa_memmove): Declared.
18396 (pupa_strcpy): Likewise.
18397
18398 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18399 pupa_mod_init takes one argument, its own module.
18400 (pupa_dl_unload_unneeded): Declared.
18401 (pupa_dl_unload_all): Likewise.
18402 (pupa_dl_ref): Likewise.
18403 (pupa_dl_unref): Likewise.
18404 (pupa_dl_iterate): Likewise.
18405 (pupa_dl_init): Renamed to ...
18406 (pupa_dl_set_prefix): ... this.
18407 (pupa_dl_get_prefix): Declared.
18408
18409 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 18410 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 18411 unloaded.
18412 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18413 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18414
18415 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18416 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18417
012d7999 184182003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18419
18420 * util/i386/pc/pupa-setup.c (setup): Define the internal
18421 function find_first_partition_start at the top level, because GCC
18422 3.0.x cannot compile internal functions in deeper scopes
18423 correctly.
18424 (find_root_device): Use lstat instead of stat.
18425 Don't follow symbolic links.
18426 Fix the path-constructing code.
18427
18428 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18429 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18430 by a BLKGETSIZE ioctl first, because block devices don't fill
18431 the member st_mode of the structure stat on Linux.
18432 [__linux__] (linux_find_partition): Use a temporary buffer
18433 REAL_DEV for the working space. Copy it to DEV before returning.
18434 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18435 buffer cache consistent.
18436 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18437 strncmp. The previous value was merely wrong.
18438 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18439
18440 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18441 FAT size is 12. The previous value was merely wrong.
18442
18443 * kern/main.c (pupa_main): Don't split the starting message from
18444 newlines.
18445
18446 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18447 LF, because BIOS goes crazy about character attributes in this
18448 case.
18449
1cc73a62 184502003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18451
18452 * include/i386/pc/util/biosdisk.h: New file.
18453 * util/i386/pc/biosdisk.c: Likewise.
18454 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 18455
1cc73a62 18456 * Makefile.in (INCLUDE_DISTFILES): Added
18457 include/pupa/i386/pc/util/biosdisk.h.
18458 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18459 directory util/i386/pc.
18460 (install-local): Added a rule for sbin_UTILITIES.
18461 (uninstall): Likewise.
18462
18463 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18464
18465 * util/misc.c (xrealloc): New function.
18466 (pupa_malloc): Likewise.
18467 (pupa_free): Likewise.
18468 (pupa_realloc): Likewise.
18469 (pupa_stop): Likewise.
18470 (pupa_putchar): Likewise.
18471
18472 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18473
18474 * include/pupa/util/misc.h (xrealloc): Declared.
18475
18476 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18477 macro.
18478 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18479 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18480
18481 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18482 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18483
18484 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18485 way should be implemented.
18486 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18487
18488 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18489 the size of NAME for safety.
18490 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18491 0x88.
18492
18493 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18494 (pupa_setup_SOURCES): Likewise.
18495
18496 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18497
08b70fe8 184982002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18499
18500 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18501 bunch of pushl's from pusha, because this destroys the return
18502 value.
18503
62ddcc8f 185042002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18505
18506 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18507 This means that any missing prototypes could be fatal. Also, you
18508 must take care when writing assembly code. See the comments at
18509 the beginning of startup.S, for more details.
f19dbdb7 18510
62ddcc8f 18511 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18512 compilation mechanism.
18513 (pupa_chainloader_real_boot): Likewise.
18514 (pupa_biosdisk_rw_int13_extensions): Likewise.
18515 (pupa_biosdisk_rw_standard): Likewise.
18516 (pupa_biosdisk_check_int13_extensions): Likewise.
18517 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18518 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18519 (pupa_get_memsize): Likewise.
18520 (pupa_get_mmap_entry): Likewise.
18521 (pupa_console_putchar): Likewise.
18522 (pupa_console_setcursor): Likewise.
18523 (pupa_getrtsecs): Use pushl instead of push.
18524
18525 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18526 memory instead of the stack for a mmap entry, because some
18527 BIOSes may ignore the maximum size and overflow.
18528
18529 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18530
18531 * genmk.rb (PModule#rule): Compile automatically generated
18532 sources with module-specific CFLAGS as well as other sources.
18533
9962ed99 185342002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18535
18536 * configure.ac: Check ld.
18537 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18538 respectively, before checking endianness and sizes.
18539
18540 * Makefile.in (LD): New variable.
f19dbdb7 18541
abdfc3c5 185422002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18543
18544 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18545
6a161fa9 185462002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18547
18548 * Changelog: New file.
18549