]> git.proxmox.com Git - grub2.git/blob - ChangeLog
2009-07-16 Pavel Roskin <proski@gnu.org>
[grub2.git] / ChangeLog
1 2009-07-16 Pavel Roskin <proski@gnu.org>
2
3 * configure.ac: Typo fixes.
4
5 * kern/mm.c (grub_zalloc): New function.
6 (grub_debug_zalloc): Likewise.
7 * include/grub/mm.h: Declare grub_zalloc() and
8 grub_debug_zalloc().
9 * util/misc.c (grub_zalloc): New function.
10 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
11 instead of grub_malloc(), remove unneeded initializations.
12 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
13 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
14 * commands/parttool.c (grub_cmd_parttool): Likewise.
15 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
16 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
17 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
18 * disk/usbms.c (grub_usbms_finddevs): Likewise.
19 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
20 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
21 (grub_cmd_efiemu_pnvram): Likewise.
22 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
23 * fs/iso9660.c (grub_iso9660_mount): Likewise.
24 (grub_iso9660_iterate_dir): Likewise.
25 * fs/jfs.c (grub_jfs_opendir): Likewise.
26 * fs/ntfs.c (list_file): Likewise.
27 (grub_ntfs_mount): Likewise.
28 * kern/disk.c (grub_disk_open): Likewise.
29 * kern/dl.c (grub_dl_load_core): Likewise.
30 * kern/elf.c (grub_elf_file): Likewise.
31 * kern/env.c (grub_env_context_open): Likewise.
32 (grub_env_set): Likewise.
33 (grub_env_set_data_slot): Likewise.
34 * kern/file.c (grub_file_open): Likewise.
35 * kern/fs.c (grub_fs_blocklist_open): Likewise.
36 * loader/i386/multiboot.c (grub_module): Likewise.
37 * loader/xnu.c (grub_xnu_create_key): Likewise.
38 (grub_xnu_create_value): Likewise.
39 * normal/main.c (grub_normal_add_menu_entry): Likewise.
40 (read_config_file): Likewise.
41 * normal/menu_entry.c (make_screen): Likewise.
42 * partmap/sun.c (sun_partition_map_iterate): Likewise.
43 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
44 * script/sh/script.c (grub_script_parse): Likewise.
45 * video/bitmap.c (grub_video_bitmap_create): Likewise.
46 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
47 * video/readers/png.c (grub_png_output_byte): Likewise.
48 (grub_video_reader_png): Likewise.
49
50 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
51
52 Enable all targets that can be built by default
53
54 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
55 grub-mkfont and grub-fstest if they can be built
56
57 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
58
59 Fix hang and segmentation fault in grub-emu-usb
60
61 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
62 * util/usb.c (grub_libusb_devices): likewise
63 (grub_libusb_init): rename to ...
64 (GRUB_MOD_INIT (libusb)):...this
65 (grub_libusb_fini): rename to ..
66 (GRUB_MOD_FINI (libusb)):...this
67 * disk/usbms.c (grub_usbms_transfer): fix retry logic
68 * include/grub/disk.h (grub_raid_init): removed, it's useless
69 (grub_raid_fini): likewise
70 (grub_lvm_init): likewise
71 (grub_lvm_fini): likewise
72 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
73 by grub_init_all
74
75 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
76
77 Fix libusb
78
79 * Makefile.in (LIBUSB): new macro
80 * genmk.rb (Utility/print_tail): new method
81 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
82 (top level): call util.print_tail at the end.
83
84 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
85
86 Make FreeBSD accept zpool.cache
87
88 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
89 type is /boot/zfs/zpool.cache
90
91 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
92
93 Fix 64-bit efiemu
94
95 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
96 correct wrong typedef
97 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
98
99 2009-07-15 Pavel Roskin <proski@gnu.org>
100
101 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
102 * kern/disk.c (struct grub_disk_cache): Likewise.
103
104 * commands/probe.c (options): Typo fix.
105
106 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
107 Increase to 0x5a to accommodate FAT32. Adjust other offsets
108 accordingly.
109 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
110
111 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
112 the end of "Error" to make the message more readable.
113
114 * boot/i386/pc/boot.S (kernel_segment): Remove.
115 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
116 for destination.
117
118 * boot/i386/pc/boot.S (boot_version): Remove.
119 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
120 Remove.
121
122 * include/grub/i386/pc/boot.h: Sort all offsets.
123 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
124 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
125 * boot/i386/pc/boot.S: Assert location of every offset listed in
126 include/grub/i386/pc/boot.h.
127
128 2009-07-13 Pavel Roskin <proski@gnu.org>
129
130 * include/grub/i386/coreboot/machine.h: Rename
131 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
132 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
133 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
134
135 * kern/dl.c: Force native word size to suppress warnings when
136 compiling grub-emu.
137
138 * kern/device.c (grub_device_iterate): Change struct part_ent to
139 hold the name, not a pointer to it. Use one grub_malloc() per
140 partition, not two. Free partition_name if grub_malloc() fails.
141 Set ents to NULL only before grub_partition_iterate() is called.
142
143 2009-07-11 Bean <bean123ch@gmail.com>
144
145 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
146 childname.
147
148 2009-07-10 Bean <bean123ch@gmail.com>
149 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
150
151 * kern/ieee1275/openfw.c (grub_children_iterate)
152 (grub_devalias_iterate): Fix size evaluation for property or path
153 strings, which was broken since r2132.
154
155 2009-07-07 Pavel Roskin <proski@gnu.org>
156
157 * commands/search.c (search_file): Merge into ...
158 (search_fs): ... this. Accept search type as argument.
159 (grub_cmd_search): Pass search type to search_fs().
160
161 * include/grub/util/console.h: New file.
162 * util/console.c: Use it instead of grub/machine/console.h.
163 * util/grub-emu.c: Likewise.
164
165 * lib/arg.c (find_long_option): Remove.
166 (find_long): Add `len' argument, make `s' const char *.
167 (grub_arg_parse): Parse long options in place, not in a
168 temporary buffer.
169
170 2009-07-06 Pavel Roskin <proski@gnu.org>
171
172 * commands/search.c (search_fs): Fix potential NULL pointer
173 dereference.
174
175 * commands/search.c (search_fs): Replace QUID macro with quid_fn
176 function pointer.
177
178 2009-07-06 Daniel Mierswa <impulze@impulze.org>
179
180 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
181 comparison.
182
183 2009-07-05 Pavel Roskin <proski@gnu.org>
184
185 * include/grub/i386/linux.h (struct linux_kernel_params):
186 Restore padding3, it's still needed.
187
188 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
189 FreeBSD.
190 * util/osdetect.lua: Likewise.
191
192 2009-07-05 Bean <bean123ch@gmail.com>
193
194 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
195
196 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
197 (grub_lua_getenv): Likewise.
198 (grub_lua_setenv): Likewise.
199 (save_errno): New function.
200 (push_result): Likewise.
201 (grub_lua_enum_device): Likewise.
202 (grub_lua_enum_file): Likewise.
203 (grub_lua_file_open): Likewise.
204 (grub_lua_file_close): Likewise.
205 (grub_lua_file_seek): Likewise.
206 (grub_lua_file_read): Likewise.
207 (grub_lua_file_getline): Likewise.
208 (grub_lua_file_getsize): Likewise.
209 (grub_lua_file_getpos): Likewise.
210 (grub_lua_file_eof): Likewise.
211 (grub_lua_file_exist): Likewise.
212 (grub_lua_add_menu): Likewise.
213
214 * script/lua/grub_lua.h (isupper): New inline function.
215 (islower): Likewise.
216 (ispunct): Likewise.
217 (isxdigit): Likewise.
218 (strcspn): Change to normal function.
219 (strpbkr): New function declaration.
220 (memchr): Likewise.
221
222 * script/lua/grub_main.c (scan_str): New function.
223 (strcspn): Likewise.
224 (strpbrk): Likewise.
225 (memchr): Likewise.
226
227 * script/lua/linit.c (lualibs): Enable the string library.
228
229 * util/osdetect.lua: New file.
230
231 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
232
233 * include/grub/i386/linux.h (struct linux_kernel_params): Add
234 `capabilities' member.
235
236 2009-07-02 Pavel Roskin <proski@gnu.org>
237
238 * genparttoollist.sh: Add missing newline at the end.
239
240 2009-07-01 Pavel Roskin <proski@gnu.org>
241
242 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
243
244 * util/hostdisk.c (open_device): Remove `const' from
245 `sysctl_size', as sysctlbyname() can change it (in this case it
246 doesn't actually happen).
247
248 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
249 using signed long int constants.
250
251 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
252 constant to avoid a warning on FreeBSD.
253
254 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
255 where it's needed.
256
257 * Makefile.in: Install include/grub/machine symlink.
258
259 * Makefile.in: When installing symlinks, use "cp -fR", which
260 works on FreeBSD and MacOSX.
261 From Yves Blusseau <cl7m42e02@sneakemail.com>
262
263 * kern/dl.c (grub_dl_resolve_symbol): Make static.
264 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
265
266 * util/misc.c: Move grub_reboot() and grub_halt() ...
267 * util/grub-emu.c: ... here. Make main_env static.
268 * include/grub/util/misc.h: Remove main_env.
269
270 * kern/mm.c: Use correct format to print size_t.
271
272 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
273 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
274 * kern/powerpc/dl.c: Likewise.
275 * kern/sparc64/dl.c: Likewise.
276 * kern/x86_64/dl.c: Likewise.
277
278 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
279
280 Fix grub-emu build on sparc64-ieee1275.
281
282 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
283 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
284
285 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
286
287 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
288 (grub_reboot, grub_halt): New functions.
289
290 * util/i386/pc/misc.c: Delete. Update all users.
291 * util/sparc64/ieee1275/misc.c: Likewise.
292 * util/powerpc/ieee1275/misc.c: Likewise.
293
294 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
295
296 * conf/i386.rmk (setjmp_mod_SOURCES)
297 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
298 * conf/common.rmk (setjmp_mod_SOURCES)
299 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
300 to use $(target_cpu).
301 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
302 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
303 * conf/powerpc-ieee1275.rmk: Likewise.
304 * conf/sparc64-ieee1275.rmk: Likewise.
305
306 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
307 $(target_cpu) for kern/$(target_cpu)/dl.c.
308 * conf/i386-efi.rmk: Likewise.
309 * conf/i386-ieee1275.rmk: Likewise.
310 * conf/x86_64-efi.rmk: Likewise.
311 * conf/i386-coreboot.rmk: Likewise.
312 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
313 $(target_cpu) for kern/$(target_cpu)/dl.c and for
314 kern/$(target_cpu)/cache.S.
315 * conf/sparc64-ieee1275.rmk: Likewise.
316
317 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
318
319 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
320 type to `grub_uint8_t', and adjust `padding9' accordingly.
321
322 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
323
324 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
325
326 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
327 assembly in final jump, using register constraints.
328
329 (grub_linux_boot): For text mode, initialize `have_vga' using
330 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
331
332 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
333 right before the final jump.
334
335 Set `video_mode' to 0x3.
336
337 Document initialization of `video_page', `video_mode' and
338 `video_ega_bx'.
339
340 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
341
342 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
343 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
344 and set GRUB_LINUX_FLAG_QUIET appropiately.
345
346 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
347
348 Fix build on Debian / sparc.
349
350 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
351
352 2009-06-28 Pavel Roskin <proski@gnu.org>
353
354 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
355 fix a warning.
356
357 * util/grub.d/10_linux.in: Match SUSE style initrd names.
358
359 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
360
361 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
362 `err'.
363
364 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
365
366 Revert r2338.
367
368 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
369 file can't be opened. grub_file_open() is already supposed to set
370 grub_errno / grub_errmsg appropiately.
371 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
372
373 2009-06-27 Pavel Roskin <proski@gnu.org>
374 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
375
376 * include/grub/dl.h: Include grub/elf.h.
377 (struct grub_dl): Add symtab field.
378 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
379 GRUB_MODULES_MACHINE_READONLY.
380 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
381 of the header for read-only modules.
382 (grub_dl_unload): Free mod->symtab for read-only modules.
383 * kern/i386/dl.c: Use mod->symtab.
384 * kern/powerpc/dl.c: Likewise.
385 * kern/sparc64/dl.c: Likewise.
386 * kern/x86_64/dl.c: Likewise.
387
388 * conf/i386-qemu.rmk: New file.
389 * kern/i386/qemu/startup.S: Likewise.
390 * kern/i386/qemu/mmap.c: Likewise.
391 * boot/i386/qemu/boot.S: Likewise.
392 * include/grub/i386/qemu/time.h: Likewise.
393 * include/grub/i386/qemu/serial.h: Likewise.
394 * include/grub/i386/qemu/kernel.h: Likewise.
395 * include/grub/i386/qemu/console.h: Likewise.
396 * include/grub/i386/qemu/boot.h: Likewise.
397 * include/grub/i386/qemu/init.h: Likewise.
398 * include/grub/i386/qemu/machine.h: Likewise.
399 * include/grub/i386/qemu/loader.h: Likewise.
400 * include/grub/i386/qemu/memory.h: Likewise.
401
402 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
403 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
404 [qemu] (pkglib_IMAGES): Add `boot.img'.
405 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
406 [qemu] (boot_img_FORMAT): New variables.
407 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
408 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
409 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
410 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
411 [qemu] (kernel_img_FORMAT): New variables.
412
413 * configure.ac: Recognise `i386-qemu'.
414
415 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
416 (for no compression).
417 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
418 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
419 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
420 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
421 ifdefs).
422
423 2009-06-27 Pavel Roskin <proski@gnu.org>
424
425 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
426 read.
427 * efiemu/prepare32.c: Likewise.
428 * efiemu/prepare64.c: Likewise.
429
430 2009-06-26 Pavel Roskin <proski@gnu.org>
431
432 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
433 * include/grub/elf.h: Define symbols without "32" or "64" based
434 on GRUB_TARGET_WORDSIZE.
435 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
436 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
437 ELF definitions.
438 * efiemu/loadcore64.c: Likewise.
439 * loader/i386/bsd32.c: Likewise.
440 * loader/i386/bsd64.c: Likewise.
441 * kern/dl.c: Remove own ELF definitions.
442 * util/i386/efi/grub-mkimage.c: Likewise.
443
444 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
445
446 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
447 segment 0x0 unconditionally, because the reference generated by
448 GAS is an absolute address.
449
450 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
451
452 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
453 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
454
455 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
456
457 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
458 indexes. Check for -f explicitly.
459 (search_file): Improve error message.
460 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
461
462 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
463
464 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
465 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
466
467 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
468
469 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
470 * conf/i386-ieee1275.rmk: Likewise.
471 * conf/i386-coreboot.rmk: Likewise.
472
473 * kern/i386/pc/startup.S (grub_stop): Remove function.
474 * kern/i386/ieee1275/startup.S: Likewise.
475 * kern/i386/coreboot/startup.S: Likewise.
476 * kern/i386/misc.S (grub_stop): New function.
477
478 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
479
480 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
481 * kern/i386/realmode.S (real_to_prot): ... to here.
482
483 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
484
485 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
486 with `kernel.img'.
487 (kernel_elf_SOURCES): Rename to ...
488 (kernel_img_SOURCES): ... this.
489 (kernel_elf_HEADERS): Rename to ...
490 (kernel_img_HEADERS): ... this. Update all users.
491 (kernel_elf_ASFLAGS): Rename to ...
492 (kernel_img_ASFLAGS): ... this.
493 (kernel_elf_CFLAGS): Rename to ...
494 (kernel_img_CFLAGS): ... this.
495 (kernel_elf_LDFLAGS): Rename to ...
496 (kernel_img_LDFLAGS): ... this.
497 * conf/i386-coreboot.rmk: Likewise.
498 * conf/powerpc-ieee1275.rmk: Likewise.
499
500 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
501 with "kernel.img".
502
503 2009-06-21 Pavel Roskin <proski@gnu.org>
504
505 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
506 to match nested functions.
507 * loader/sparc64/ieee1275/linux.c: Likewise.
508
509 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
510
511 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
512
513 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
514 all i386 platforms.
515
516 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
517
518 Fix asm file handling on ELF, and remove workarounds.
519
520 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
521 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
522 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
523 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
524
525 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
526
527 Load BSD ELF modules
528
529 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
530 and loader/i386/bsd64.c
531 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
532 (FREEBSD_MODTYPE_ELF_MODULE): New definition
533 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
534 (grub_freebsd_load_elfmodule32): New declaration
535 (grub_freebsd_load_elfmoduleobj64): Likewise
536 (grub_freebsd_load_elf_meta32): Likewise
537 (grub_freebsd_load_elf_meta64): Likewise
538 (grub_freebsd_add_meta): Likewise
539 (grub_freebsd_add_meta_module): Likewise
540 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
541 (grub_freebsd_add_meta_module): Likewise and move module-specific
542 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
543 (grub_cmd_freebsd): Add elf-kernel specific parts
544 based on grub_freebsd_add_meta_module
545 (grub_cmd_freebsd_module): Add type parsing moved from
546 grub_freebsd_add_meta_module
547 (grub_cmd_freebsd_module_elf): New function
548 (cmd_freebsd_module_elf): New variable
549 (GRUB_MOD_INIT): Register freebsd_module_elf
550 * loader/i386/bsd32.c: New file
551 * loader/i386/bsd64.c: Likewise
552 * loader/i386/bsdXX.c: Likewise
553 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
554 (grub_elf64_load): Likewise
555 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
556 All users updated
557 (grub_elf64_load_hook_t): Likewise
558
559 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
560
561 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
562 variable.
563 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
564 don't write a menu entry for recovery mode.
565
566 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
567
568 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
569 after it's no longer needed.
570
571 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
572
573 * include/grub/i386/loader.h (grub_linux_prot_size)
574 (grub_linux_tmp_addr, grub_linux_real_addr)
575 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
576 GRUB_MACHINE_PCBIOS.
577 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
578 common grub_util_info() call to ...
579 (generate_image): ... here.
580 Fix use of uninitialized memory, comparison of signed with
581 unsigned integers and memory leak.
582 Remove bogus module address message.
583
584 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
585
586 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
587 grub_raid_register
588 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
589
590 2009-06-19 Pavel Roskin <proski@gnu.org>
591
592 * configure.ac: Remove stray AC_MSG_CHECKING.
593
594 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
595
596 * disk/scsi.c (grub_scsi_open): use continue instead of big if
597
598 2009-06-18 Pavel Roskin <proski@gnu.org>
599
600 * conf/common.rmk: Add fs_file.mod.
601 * disk/fs_file.c: New file.
602 * include/grub/disk.h (enum grub_disk_dev_id): Add
603 GRUB_DISK_DEVICE_FILE_ID.
604
605 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
606
607 Fix build with Apple's toolchain. Part 2
608
609 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
610 a fake start
611
612 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
613
614 Fix build with Apple's toolchain. Part 1
615
616 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
617 for long calls
618 * configure.ac: remove a leftover AC_MSG_RESULT
619 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
620 Apple's toolchain
621
622 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
623
624 Fix warnings
625
626 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
627 (decomp_block): initialize ch
628 use grub_memcpy instead of memcpy
629
630 2009-06-17 Pavel Roskin <proski@gnu.org>
631
632 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
633 version, use declarations needed to use vga_text as the startup
634 console.
635
636 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
637 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
638 the kernel.
639 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
640 and grub_at_keyboard_fini(), it's done on module load and
641 unload.
642
643 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
644
645 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
646 file can't be found.
647 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
648
649 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
650
651 Fix newline handling
652
653 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
654 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
655 (grub_script_yylex): don't segfault on unterminated script
656 newline terminates command and variable
657
658 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
659
660 avoid double grub_adjust_range call. Bug reported by David Simner
661
662 * kern/disk.c (grub_disk_write): change to raw disk access before
663 calling disk_read
664
665 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
666
667 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
668 spaces, for the benefit of help2man.
669 * util/i386/efi/grub-mkimage.c (usage): Likewise.
670
671 2009-06-16 Pavel Roskin <proski@gnu.org>
672
673 * kern/i386/halt.c: Include grub/machine/init.h.
674 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
675
676 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
677
678 * util/grub.d/30_os-prober.in: Use ${root} in the generated
679 drivemap menuentry.
680
681 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
682
683 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
684 `echo' command.
685
686 2009-06-16 Pavel Roskin <proski@gnu.org>
687
688 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
689 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
690 save %dx, we only need %dl and we never change it.
691 * boot/i386/pc/cdboot.S: Don't set the root drive.
692 * boot/i386/pc/pxeboot.S: Likewise.
693 * include/grub/i386/pc/boot.h: Remove
694 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
695 GRUB_BOOT_MACHINE_DRIVE_CHECK.
696 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
697 * kern/i386/pc/init.c (make_install_device): Remove references
698 to grub_root_drive.
699 * kern/i386/pc/startup.S: Likewise.
700 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
701
702 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
703
704 xnu_uuid command
705
706 * commands/xnu_uuid.c: new file
707 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
708 (xnu_uuid_mod_SOURCES): new variable
709 (xnu_uuid_mod_CFLAGS): likewise
710 (xnu_uuid_mod_LDFLAGS): likewise
711 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
712 * conf/i386-ieee1275.rmk: likewise
713 * conf/i386-pc.rmk: likewise
714 * conf/powerpc-ieee1275.rmk: likewise
715 * conf/sparc64-ieee1275.rmk: likewise
716 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
717
718 2009-06-16 Pavel Roskin <proski@gnu.org>
719
720 * configure.ac: Avoid '==' in test command, it's not portable.
721
722 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
723
724 Probe command
725
726 * commands/probe.c: new file
727 * conf/common.rmk (pkglib_MODULES): add probe.mod
728 (probe_mod_SOURCES): new variable
729 (probe_mod_CFLAGS): likewise
730 (probe_mod_LDFLAGS): likewise
731 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
732 * conf/i386-ieee1275.rmk: likewise
733 * conf/i386-pc.rmk: likewise
734 * conf/powerpc-ieee1275.rmk: likewise
735 * conf/sparc64-ieee1275.rmk: likewise
736
737 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
738
739 Fix handling of string like \"hello\" and "a
740 b"
741
742 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
743 (grub_script_yylex): fix parsing of quoting, escaping and newline
744
745 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
746
747 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
748 handling
749
750 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
751
752 * util/grub-mkconfig.in: Fix parsing of --output option.
753
754 2009-06-12 Pavel Roskin <proski@gnu.org>
755
756 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
757 genmk.rb don't need to be generated or installed.
758
759 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
760
761 * commands/i386/pc/drivemap_int13h.S: add more comments
762
763 2009-06-11 Pavel Roskin <proski@gnu.org>
764
765 * Makefile.in (uninstall): Uninstall manuals.
766
767 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
768 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
769 and update-grub_lib in two places.
770 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
771
772 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
773 a compiler warning.
774
775 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
776 `entry_lo' to fix variable shadowing.
777
778 2009-06-11 Christian Franke <franke@computer.org>
779
780 * kern/misc.c (__enable_execute_stack): Add missing return type
781 to prevent gcc warning.
782
783 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
784
785 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
786
787 2009-06-11 Pavel Roskin <proski@gnu.org>
788
789 * Makefile.in: Don't rely on any scripts being executable.
790 Always use $(SHELL) to run shell scripts.
791
792 * configure.ac: Always define ___main if using -nostdlib. This
793 fixes tests on Cygwin.
794
795 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
796
797 UDF fix
798
799 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
800 is in bytes and not in blocks
801
802 2009-06-11 Pavel Roskin <proski@gnu.org>
803
804 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
805 warning.
806
807 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
808
809 * util/grub.d/30_os-prober.in: Fix a comment. Source
810 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
811 to set the root device. Place drivemap command in the generated
812 chain entry.
813
814 2009-06-11 Pavel Roskin <proski@gnu.org>
815
816 * configure.ac: Remove host_m32. Issues with 64-bit utilities
817 have long been resolved.
818
819 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
820
821 * util/grub.d/10_linux.in: Capitalise "Linux".
822
823 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
824
825 2009-06-11 Pavel Roskin <proski@gnu.org>
826
827 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
828 fix a gcc warning and ensure that the function won't ever exit.
829
830 * kern/i386/ieee1275/init.c: Add missing prototype for
831 grub_stop_floppy().
832
833 * loader/ieee1275/multiboot2.c [__i386__]: Include
834 grub/cpu/multiboot.h.
835
836 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
837 casts to short - they are not portable and cause warnings. Fix
838 use of uninitialized values in input_buf. Use ARRAY_SIZE.
839
840 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
841
842 Drivemap fixes
843
844 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
845 new function
846 (grub_get_root_biosnumber_saved): new variable
847 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
848 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
849 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
850 %dx after the call if necessary
851 * conf/common.rmk (pkglib_MODULES): remove boot.mod
852 (boot_mod_SOURCES): remove
853 (boot_mod_CFLAGS): remove
854 (boot_mod_LDFLAGS): remove
855 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
856 (boot_mod_SOURCES): new variable
857 (boot_mod_CFLAGS): likewise
858 (boot_mod_LDFLAGS): likewise
859 * conf/i386-efi.rmk: likewise
860 * conf/i386-ieee1275.rmk: likewise
861 * conf/i386-pc.rmk: likewise
862 * conf/powerpc-ieee1275.rmk: likewise
863 * conf/sparc64-ieee1275.rmk: likewise
864 * conf/x86_64-efi.rmk: likewise
865 * include/grub/i386/pc/biosnum.h: new file
866 * lib/i386/pc/biosnum.c: likewise
867 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
868 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
869 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
870
871 2009-06-10 Pavel Roskin <proski@gnu.org>
872
873 * io/gzio.c (test_header): Don't reuse one buffer for all data.
874 Use separate variables. Read only the file size at the end, but
875 not the checksum that we don't use.
876
877 * kern/file.c (grub_file_read): Use void pointer for the buffer.
878 Adjust all callers.
879
880 * kern/ieee1275/openfw.c: Remove libc includes.
881 * kern/ieee1275/cmain.c: Likewise.
882 * include/grub/ieee1275/ieee1275.h: Likewise.
883
884 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
885 compiler warnings.
886
887 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
888
889 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
890 `genparttoollist.sh'.
891 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
892 Add `*.sh' to the list find searches for and change `mdate.sh'
893 to `mdate-sh'.
894
895 2009-06-10 Pavel Roskin <proski@gnu.org>
896
897 * include/grub/multiboot2.h: Provide compatibility defines for
898 multiboot2.h.
899 * include/multiboot2.h: Include stdint.h only if needed, using
900 angle brackets.
901 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
902 grub/multiboot2.h.
903 * loader/ieee1275/multiboot2.c: Likewise.
904 * loader/multiboot2.c: Likewise.
905 * loader/multiboot_loader.c: Likewise.
906
907 * configure.ac: Use -nostdlib when probing for the target. It
908 should not be required to have libc for the target.
909
910 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
911 they fail without libc headers for the target.
912 * include/grub/powerpc/libgcc.h: Use weak attribute for all
913 exports.
914 * include/grub/sparc64/libgcc.h: Likewise. Don't use
915 preprocessor conditionals.
916
917 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
918 build system doesn't need to be aware of the tar.c internals.
919
920 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
921
922 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
923
924 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
925
926 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
927 disk limit to 26 for IDE, Virtio, Xen and SCSI.
928
929 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
930
931 * util/i386/pc/grub-install.in: Change the error message if UUIDs
932 aren't available if ata.mod gets used.
933
934 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
935
936 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
937 initialising controller.
938 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
939
940 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
941
942 * util/i386/pc/grub-install.in: Add a parameter --disk-module
943 to choose between ata and biosdisk module on i386-pc.
944
945 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
946
947 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
948 Subclass and Programming Interface fields in terms of the 3 byte
949 Class Code register.
950 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
951
952 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
953 interface is OHCI. Add grub_dprintf for symmetry with
954 bus/usb/uhci.c.
955 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
956 interface is UHCI. Add interf variable for programming
957 interface. Print interface with class/subclass.
958
959 * bus/usb/ohci.c: Set interf with correct field.
960
961 * bus/usb/uhci.c: Remove unneeded doubled lines.
962 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
963 Remove whitespace inside comment.
964
965 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
966
967 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
968 as fallback an equivalent option without depth.
969
970 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
971
972 Not fail if unable to retrieve C/H/S on LBA disks
973
974 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
975 if unable to retrieve C/H/S on LBA disks
976
977 2009-06-08 Pavel Roskin <proski@gnu.org>
978
979 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
980 about aliasing.
981
982 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
983
984 * Makefile.in (uninstall): Remove all $lib_DATA files.
985
986 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
987
988 Bugfix: install on partitionless device
989
990 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
991 is a whole disk
992
993 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
994
995 * Makefile.in (uninstall): Remove all $include_DATA files.
996
997 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
998
999 * commands/true.c: New file. Implement the true and false commands.
1000 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1001 (true_mod_SOURCES): New variable.
1002 (true_mod_CFLAGS): Likewise.
1003 (true_mod_LDFLAGS): Likewise.
1004
1005 2009-06-05 Colin D Bennett <colin@gibibit.com>
1006
1007 Optimized font character lookup using binary search instead of linear
1008 search. Fonts now are required to have the character index ordered by
1009 code point.
1010
1011 * font/font.c (load_font_index): Verify that fonts have ordered
1012 character indices.
1013 (find_glyph): Use binary search instead of linear search to find a
1014 character in a font.
1015
1016 2009-06-05 Michael Scherer <misc@mandriva.org>
1017
1018 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1019 uses case sensitive btree.
1020 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1021 only for case insensitive filesystems.
1022
1023 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1024
1025 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1026 * conf/common.rmk (search_mod_CFLAGS): likewise
1027
1028 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1029
1030 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1031 compensate a compiler bug
1032
1033 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1034
1035 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1036 instead of '\b'
1037
1038 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1039
1040 Definitions for creating asm symbols with Apple's CC
1041
1042 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1043 [APPLE_CC] (VARIABLE): likewise
1044
1045 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1046
1047 Disable lnxboot.img when compiled
1048 with Apple's CC
1049
1050 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1051 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1052 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1053 [! APPLE_CC] (CODE_LENG): skip
1054 [! APPLE_CC] (setup_sects): likewise
1055 [! APPLE_CC]: skip filling
1056
1057 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1058
1059 Address in trampolines based on 32-bit registers when compiled
1060 with Apple's CC
1061
1062 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1063 for addresses
1064 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1065
1066 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1067
1068 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1069
1070 * kern/misc.c [APPLE_CC] (memcpy): new function
1071 [APPLE_CC] (memmove): likewise
1072 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1073 (memcpy): define alias conditionally on !APPLE_CC
1074 (memset): likewise
1075 (abort): likewise
1076 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1077 APPLE_CC are defined
1078 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1079 (grub_assert_fail): make prototype conditional
1080
1081 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1082
1083 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1084
1085 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1086 grub-macho2img
1087 (CLEANFILES): add grub-macho2img
1088 (grub_macho2img_SOURCES): new variable
1089 * kern/i386/pc/startup.S (bss_start): new variable
1090 (bss_end): likewise
1091 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1092 * util/grub-macho2img.c: new file
1093
1094 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1095
1096 Use objconv when compiling with Apple's CC
1097
1098 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1099 (efiemu64.o): likewise
1100 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1101 when compiling with Apple's CC
1102 (efiemu64_s.o): likewise
1103 * configure.ac: check for objconv when compiling with Apple's CC
1104 * genmk.rb: use objconv for modules when compiled with Apple's CC
1105
1106 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1107
1108 Define segment as well as section when compiling with
1109 Apple's CC
1110
1111 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1112 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1113 (efiemu_convert_pointer): likewise
1114 (efiemu_set_virtual_address_map): likewise
1115 (efiemu_convert_pointer): likewise
1116 (efiemu_getcrc32): likewise
1117 (init_crc32_table): likewise
1118 (reflect): likewise
1119 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1120 (GRUB_MOD_DEP): likewise
1121
1122 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1123
1124 Allow a compilation without -mcmodel=large
1125
1126 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1127 when compiled without -mcmodel=large
1128 (filter_memory_map): remove memory post 4 GiB when compiled
1129 without -mcmodel=large
1130 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1131 TARGET_CFLAGS when -mcmodel=large isn't supported
1132
1133 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1134
1135 Remove nested functions in efiemu core
1136
1137 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1138
1139 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1140
1141 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1142
1143 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1144 temporary storage
1145 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1146 using Apple's CC
1147 (grub_cpu_is_tsc_supported): likewise
1148 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1149
1150 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1151
1152 Absolute addressing through constant with Apple's cc
1153
1154 * kern/i386/pc/startup.S: Define necessary constants
1155 and address through it when using ABS with Apple's CC
1156 * boot/i386/pc/diskboot.S: likewise
1157 * boot/i386/pc/boot.S: likewise
1158 * boot/i386/pc/lnxboot.S: likewise
1159 * boot/i386/pc/cdboot.S: likewise
1160 * mmap/i386/pc/mmap_helper.S: likewise
1161 * commands/i386/pc/drivemap_int13h.S: likewise
1162
1163 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1164
1165 Check if compiler is apple cc
1166
1167 * Makefile.in (ASFLAGS): new variable
1168 (TARGET_ASFLAGS): likewise
1169 (TARGET_MODULE_FORMAT): likewise
1170 (TARGET_APPLE_CC): likewise
1171 (OBJCONV): likewise
1172 (TARGET_IMG_CFLAGS): likewise
1173 (TARGET_CPPFLAGS): add includedir
1174 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1175 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1176 Check for linker script only if compiler isn't Apple's CC
1177 (TARGET_MODULE_FORMAT): set
1178 (TARGET_APPLE_CC): likewise
1179 (TARGET_ASFLAGS): likewise
1180 (ASFLAGS): likewise
1181 Check for objcopy only if compiler isn't Apple's CC
1182 Check for BSS symbol only if compiler isn't Apple's CC
1183 * genmk.rb: adapt nm options if we use Apple's utils
1184 * aclocal.m4 (grub_apple_cc): new test
1185 (grub_apple_target_cc): likewise
1186
1187 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1188
1189 Simplify sed expressions and improve awk
1190
1191 * Makefile.in (install-local): simplify sed expression
1192 * gencmdlist.sh: likewise
1193 * genmoddep.awk: avoid adding module as a dependency of itself
1194
1195 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1196
1197 Add missing start symbols
1198
1199 * boot/i386/pc/boot.S: add start
1200 * boot/i386/pc/pxeboot.S: likewise
1201
1202 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1203
1204 Fix wrong assumptions with grub-mkimage on EFI
1205
1206 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1207 (relocate_addresses): consider both r_addend and value at offset
1208 (make_mods_section): zerofill modinfo and header
1209 (convert_elf): write prefix here
1210
1211 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1212
1213 Use .asciz instead of .string
1214
1215 * i386/pc/diskboot.S: use .asciz instead of .string
1216 * i386/pc/boot.S: likewise
1217 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1218 (GRUB_MOD_NAME): likewise
1219
1220 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1221
1222 gfxpayload support
1223
1224 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1225 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1226 (grub_video_setup): remove
1227 (grub_video_set_mode): new prototype
1228 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1229 (vid_mode): remove
1230 (linux_vesafb_res): compile only on PCBIOS
1231 (grub_linux_boot): support gfxpayload
1232 * loader/i386/pc/xnu.c (video_hook): new function
1233 (grub_xnu_set_video): support gfxpayload
1234 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1235 (DEFAULT_VIDEO_HEIGHT): likewise
1236 (DEFAULT_VIDEO_FLAGS): likewise
1237 (DEFAULT_VIDEO_MODE): new definition
1238 (video_hook): new function
1239 (grub_gfxterm_init): use grub_video_set_mode
1240 * util/grub.d/30_os-prober.in: remove explicit modesetting before
1241 loading xnu
1242 * video/video.c (grub_video_setup): removed
1243 (grub_video_set_mode): new function based on grub_gfxterm_init and
1244 grub_video_setup
1245
1246 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1247
1248 Avoid calling biosdisk in drivemap
1249
1250 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1251 (revparse_biosdisk): likewise
1252 (list_mappings): derive name from id directly
1253 (grub_cmd_drivemap): use tryparse_diskstring
1254
1255 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1256
1257 Script fixes
1258
1259 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1260 (grub_lexer_param): add tokenonhold
1261 (grub_script_create_cmdline): remove cmdline. All callers updated
1262 (grub_script_function_create): make functionname
1263 grub_script_arg. All callers updated
1264 (grub_script_execute_argument_to_string): new prototype
1265 * kern/parser.c (state_transitions): reorder
1266 (grub_parser_cmdline_state): fix a bug and make more compact
1267 * script/sh/execute.c (grub_script_execute_argument_to_string):
1268 make global
1269 (grub_script_execute_cmdline): use new format
1270 * script/sh/function.c (grub_script_function_create): make functionname
1271 grub_script_arg. All callers updated
1272 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1273 (grub_script_yylex): remove
1274 (grub_script_yylex2): renamed to ...
1275 (grub_script_yylex): ...renamed
1276 parse the expressions like a${b}c
1277 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1278 (GRUB_PARSER_TOKEN_VAR): remove
1279 (GRUB_PARSER_TOKEN_NAME): likewise
1280 ("if"): declare as typeless
1281 ("while"): likewise
1282 ("function"): likewise
1283 ("else"): likewise
1284 ("then"): likewise
1285 ("fi"): likewise
1286 (text): remove
1287 (argument): likewise
1288 (script): accept empty scripts and make exit on error
1289 (arguments): use GRUB_PARSER_TOKEN_ARG
1290 (function): likewise
1291 (command): move error handling to script
1292 (menuentry): move grub_script_lexer_ref before
1293 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1294 argument. All callers updated
1295
1296 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1297
1298 Prevent GRUB from probing floppies during boot.
1299
1300 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1301 * commands/search.c (options): Add --no-floppy.
1302 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1303 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1304 --no-floppy when searching for UUIDs.
1305
1306 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1307
1308 Simplify the code duplication in commands/search.c.
1309
1310 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1311 (search_fs): ... this. Update all users.
1312
1313 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
1314
1315 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1316
1317 2009-05-28 Pavel Roskin <proski@gnu.org>
1318
1319 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1320 Remove the original symlink explicitly.
1321
1322 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1323 just one slash. That's how grub_fshelp_find_file() does it.
1324
1325 2009-05-26 Pavel Roskin <proski@gnu.org>
1326
1327 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1328 to `str'.
1329
1330 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1331 possibly unused.
1332
1333 2009-05-25 Christian Franke <franke@computer.org>
1334
1335 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1336 register.
1337 (grub_atapi_identify): Add wait after drive select.
1338 (grub_ata_identify): Do more strict status register check before
1339 calling grub_atapi_identify (). Suppress error message if status
1340 register is 0x00 after command failure. Add status register
1341 check after PIO read to avoid bogus identify due to stuck DRQ.
1342 Thanks to Pavel Roskin for testing.
1343 (grub_device_initialize): Remove unsafe status register check.
1344 Thanks to 'phcoder' for problem report and patch.
1345 Prevent sign extension in debug message.
1346
1347 2009-05-23 Colin D Bennett <colin@gibibit.com>
1348
1349 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1350 definition file, and functions defined in `normal/menu.c' have had
1351 their prototypes moved to `include/grub/menu.h' for consistency.
1352
1353 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1354 from normal.h.
1355 (grub_menu_get_entry): Likewise.
1356 (grub_menu_get_timeout): Likewise.
1357 (grub_menu_set_timeout): Likewise.
1358 (grub_menu_execute_entry): Likewise.
1359 (grub_menu_execute_with_fallback): Likewise.
1360 (grub_menu_entry_run): Likewise.
1361
1362 * include/grub/normal.h: Re-ordered and grouped function
1363 prototypes by file that the function is defined in.
1364 (grub_menu_execute_callback): Removed; moved to menu.h.
1365 (grub_menu_get_entry): Likewise.
1366 (grub_menu_get_timeout): Likewise.
1367 (grub_menu_set_timeout): Likewise.
1368 (grub_menu_execute_entry): Likewise.
1369 (grub_menu_execute_with_fallback): Likewise.
1370 (grub_menu_entry_run): Likewise.
1371 (grub_menu_addentry): Renamed from this ...
1372 (grub_normal_add_menu_entry): ... to this.
1373
1374 * normal/main.c (grub_menu_addentry): Renamed from this ...
1375 (grub_normal_add_menu_entry): ... to this.
1376
1377 * script/sh/execute.c (grub_script_execute_menuentry): Update
1378 reference to renamed grub_menu_addentry function.
1379
1380 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1381
1382 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1383
1384 2009-05-22 Pavel Roskin <proski@gnu.org>
1385
1386 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1387 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1388 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1389 compiling for the i386 targets, but not for the utilities.
1390
1391 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1392 to grub_uint8_t.
1393 (grub_root_drive): Likewise.
1394 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1395 remove alignment.
1396 (grub_root_drive): Change size to byte.
1397 (grub_start_addr): Remove.
1398 (grub_end_addr): Likewise.
1399 (grub_apm_bios_info): Likewise.
1400
1401 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1402
1403 * normal/i386: Remove.
1404 * normal/powerpc: Likewise.
1405 * normal/sparc64: Likewise.
1406 * normal/x86_64: Likewise.
1407
1408 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1409
1410 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1411 * loader/i386/linux_trampoline.S: Fix indentation
1412 * loader/i386/xnu_helper.S: Likewise
1413
1414 2009-05-18 Colin D Bennett <colin@gibibit.com>
1415
1416 Display error messages when parsing a Lua statement fails.
1417 Previously, executing a syntactically invalid statement like
1418 ")foo" or "bar;" would silently fail.
1419
1420 * script/lua/grub_main.c (handle_lua_error): New function.
1421 (grub_lua_parse_line): Improved reporting of Lua parser and
1422 execution errors.
1423
1424 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1425
1426 Remove -Werror which causes build to fail on some systems
1427
1428 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1429 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1430 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1431
1432 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1433
1434 trampoline for linux on 64-bit platform
1435
1436 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1437 loader/i386/efi/linux_trampoline.S
1438 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1439 declaration
1440 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1441 here
1442 * loader/i386/linux_trampoline.S: moved here
1443 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1444 trampoline
1445 (jumpvector): removed
1446 (grub_linux_trampoline_start): new declaration
1447 (grub_linux_trampoline_end): likewise
1448 (grub_linux_boot): use trampoline when on 64-bit platform
1449 * loader/i386/linux.c: likewise
1450
1451 2009-05-16 Pavel Roskin <proski@gnu.org>
1452
1453 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1454 const to avoid a warning.
1455 (grub_lua_setenv): Likewise.
1456 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1457 lmsg to fix a warning.
1458
1459 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1460
1461 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1462 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1463 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1464 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1465 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1466 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1467 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1468 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1469
1470 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1471
1472 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1473
1474 2009-05-16 Bean <bean123ch@gmail.com>
1475
1476 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1477 (lua_mod_SOURCES): New variable.
1478 (lua_mod_CFLAGS): Likewise.
1479 (lua_mod_LDFLAGS): Likewise.
1480
1481 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1482 (setjmp_mod_SOURCES): New variable.
1483 (setjmp_mod_CFLAGS): Likewise.
1484 (setjmp_LDFLAGS): Likewise.
1485
1486 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1487 (setjmp_mod_SOURCES): New variable.
1488 (setjmp_mod_CFLAGS): Likewise.
1489 (setjmp_LDFLAGS): Likewise.
1490
1491 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1492 (setjmp_mod_SOURCES): New variable.
1493 (setjmp_mod_CFLAGS): Likewise.
1494 (setjmp_LDFLAGS): Likewise.
1495
1496 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1497 (setjmp_mod_SOURCES): New variable.
1498 (setjmp_mod_CFLAGS): Likewise.
1499 (setjmp_LDFLAGS): Likewise.
1500
1501 * normal/i386/setjmp.S: Moved from here ...
1502 * lib/i386/setjmp.S: ... Moved here
1503 * normal/x86_64/setjmp.S: Moved from here ...
1504 * lib/x86_64/setjmp.S: ... Moved here
1505 * normal/powerpc/setjmp.S: Moved from here ...
1506 * lib/powerpc/setjmp.S: ... Moved here
1507 * normal/sparc64/setjmp.S: Moved from here ...
1508 * lib/sparc64/setjmp.S: ... Moved here
1509
1510 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1511 returns_twice in mingw.
1512
1513 * script/lua/grub_lib.c: New file.
1514 * script/lua/grub_lib.h: Likewise.
1515 * script/lua/grub_lua.h: Likewise.
1516 * script/lua/grub_main.c: Likewise.
1517 * script/lua/lapi.c: Likewise.
1518 * script/lua/lapi.h: Likewise.
1519 * script/lua/lauxlib.c: Likewise.
1520 * script/lua/lauxlib.h: Likewise.
1521 * script/lua/lbaselib.c: Likewise.
1522 * script/lua/lcode.c: Likewise.
1523 * script/lua/lcode.h: Likewise.
1524 * script/lua/ldblib.c: Likewise.
1525 * script/lua/ldebug.c: Likewise.
1526 * script/lua/ldebug.h: Likewise.
1527 * script/lua/ldo.c: Likewise.
1528 * script/lua/ldo.h: Likewise.
1529 * script/lua/ldump.c: Likewise.
1530 * script/lua/lfunc.c: Likewise.
1531 * script/lua/lfunc.h: Likewise.
1532 * script/lua/lgc.c: Likewise.
1533 * script/lua/lgc.h: Likewise.
1534 * script/lua/linit.c: Likewise.
1535 * script/lua/liolib.c: Likewise.
1536 * script/lua/llex.c: Likewise.
1537 * script/lua/llex.h: Likewise.
1538 * script/lua/llimits.h: Likewise.
1539 * script/lua/lmathlib.c: Likewise.
1540 * script/lua/lmem.c: Likewise.
1541 * script/lua/lmem.h: Likewise.
1542 * script/lua/loadlib.c: Likewise.
1543 * script/lua/lobject.c: Likewise.
1544 * script/lua/lobject.h: Likewise.
1545 * script/lua/lopcodes.c: Likewise.
1546 * script/lua/lopcodes.h: Likewise.
1547 * script/lua/loslib.c: Likewise.
1548 * script/lua/lparser.c: Likewise.
1549 * script/lua/lparser.h: Likewise.
1550 * script/lua/lstate.c: Likewise.
1551 * script/lua/lstate.h: Likewise.
1552 * script/lua/lstring.c: Likewise.
1553 * script/lua/lstring.h: Likewise.
1554 * script/lua/lstrlib.c: Likewise.
1555 * script/lua/ltable.c: Likewise.
1556 * script/lua/ltable.h: Likewise.
1557 * script/lua/ltablib.c: Likewise.
1558 * script/lua/ltm.c: Likewise.
1559 * script/lua/ltm.h: Likewise.
1560 * script/lua/lua.h: Likewise.
1561 * script/lua/luaconf.h: Likewise.
1562 * script/lua/lualib.h: Likewise.
1563 * script/lua/lundump.c: Likewise.
1564 * script/lua/lundump.h: Likewise.
1565 * script/lua/lvm.c: Likewise.
1566 * script/lua/lvm.h: Likewise.
1567 * script/lua/lzio.c: Likewise.
1568 * script/lua/lzio.h: Likewise.
1569
1570 2009-05-16 Bean <bean123ch@gmail.com>
1571
1572 * include/grub/kernel.h (grub_module_header_types): Add type
1573 OBJ_TYPE_CONFIG.
1574
1575 * kern/main.c (grub_load_config): New function.
1576 (grub_main): Call grub_load_config to read boot config.
1577
1578 * grub-mkimage (generate_image): New parameter config_path.
1579 (options): New option --config.
1580 (main): Parse --config option, and pass it to generate_image.
1581
1582 2009-05-14 Christian Franke <franke@computer.org>
1583
1584 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1585 This fixes build on Cygwin.
1586
1587 2009-05-14 Pavel Roskin <proski@gnu.org>
1588
1589 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1590 jump. This saves two bytes, so the typical case of 2 swapped
1591 drives would fit 32 bytes.
1592
1593 2009-05-13 Pavel Roskin <proski@gnu.org>
1594
1595 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1596 grub_uint32_t to avoid a warning.
1597
1598 * loader/i386/linux.c (allocate_pages): When assigning
1599 real_mode_mem, cast through grub_size_t to fix a warning. The
1600 code already makes sure that the value would fit a pointer.
1601 (grub_linux_setup_video): Cast render_target->data to
1602 grub_size_t to fix a warning.
1603
1604 2009-05-13 Javier Martín <lordhabbit@gmail.com>
1605
1606 * commands/i386/pc/drivemap.c: New file - implement drivemap
1607 command.
1608 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1609 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1610
1611 2009-05-13 Pavel Roskin <proski@gnu.org>
1612
1613 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1614 embedding_area_exists.
1615
1616 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1617
1618 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1619 it easier to understand / work with.
1620 Improve warning messages for cases where there's no embedding area,
1621 or when it is too small (or core.img too large).
1622
1623 2009-05-13 Pavel Roskin <proski@gnu.org>
1624
1625 * loader/i386/pc/multiboot2.c: Add necessary includes for
1626 grub_multiboot2_real_boot().
1627
1628 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1629 PX record is always little-endian. We only need the lower 2
1630 bytes of the mode.
1631
1632 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1633 facilitate code reuse.
1634 (grub_cpio_mount): Use "struct head", not a char buffer. This
1635 fixes a warning reported by gcc 4.4.
1636
1637 * kernel/disk.c (grub_disk_read): Use void pointer for the
1638 buffer.
1639 (grub_disk_write): Use const void pointer for the buffer.
1640 Adjust all callers. Remove unnecessary casts.
1641
1642 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1643
1644 * util/i386/pc/grub-install.in: Update copyright year.
1645
1646 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1647
1648 gptsync
1649
1650 * commands/gptsync.c: new file
1651 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1652 (gptsync_mod_SOURCES): new variable
1653 (gptsync_mod_CFLAGS): likewise
1654 (gptsync_mod_LDFLAGS): likewise
1655 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1656 new definition
1657 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1658 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1659 * conf/i386-ieee1275.rmk: likewise
1660 * conf/i386-pc.rmk: likewise
1661 * conf/powerpc-ieee1275.rmk: likewise
1662
1663 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1664
1665 Fixed grub-emu
1666
1667 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1668 (grub_dl_ref): likewise
1669
1670 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1671
1672 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1673 split in two functions (one for msdos and one for gpt).
1674
1675 2009-05-08 Pavel Roskin <proski@gnu.org>
1676
1677 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1678 not modified.
1679
1680 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1681 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1682 Initialize them with -1. Add sanity check for bad1. Eliminate
1683 nerr variable.
1684
1685 2009-05-08 David S. Miller <davem@davemloft.net>
1686
1687 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1688
1689 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1690
1691 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1692 existence.
1693
1694 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1695
1696 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1697 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1698
1699 2009-05-05 David S. Miller <davem@davemloft.net>
1700
1701 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1702
1703 2009-05-05 Pavel Roskin <proski@gnu.org>
1704
1705 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1706 of grub_dl_ref() and grub_dl_unref().
1707 * commands/parttool.c: Remove preprocessor conditionals around
1708 grub_dl_ref() and grub_dl_unref().
1709 * fs/affs.c: Likewise.
1710 * fs/afs.c: Likewise.
1711 * fs/cpio.c: Likewise.
1712 * fs/ext2.c: Likewise.
1713 * fs/fat.c: Likewise.
1714 * fs/hfs.c: Likewise.
1715 * fs/hfsplus.c: Likewise.
1716 * fs/iso9660.c: Likewise.
1717 * fs/jfs.c: Likewise.
1718 * fs/minix.c: Likewise.
1719 * fs/ntfs.c: Likewise.
1720 * fs/reiserfs.c: Likewise.
1721 * fs/sfs.c: Likewise.
1722 * fs/udf.c: Likewise.
1723 * fs/ufs.c: Likewise.
1724 * fs/xfs.c: Likewise.
1725 * include/grub/dl.h: Likewise.
1726 * loader/xnu.c: Likewise.
1727
1728 2009-05-04 Pavel Roskin <proski@gnu.org>
1729
1730 * commands/acpi.c: Remove unused variable my_mod.
1731 * partmap/amiga.c: Likewise.
1732 * partmap/apple.c: Likewise.
1733 * partmap/gpt.c: Likewise.
1734 * partmap/pc.c: Likewise.
1735 * partmap/sun.c: Likewise.
1736 * term/gfxterm.c: Likewise.
1737 * term/i386/pc/vesafb.c: Likewise.
1738 * term/i386/pc/vga.c: Likewise.
1739
1740 2009-05-04 David S. Miller <davem@davemloft.net>
1741
1742 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1743 pointer args to grub_ieee1275_get_property().
1744
1745 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1746
1747 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1748 devices, and do not traverse down under controller nodes.
1749
1750 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1751 (grub_ofdisk_open): Use it to un-escape "," characters.
1752 * kern/disk.c (find_part_sep): New.
1753 (grub_disk_open): Use it to find the first non-escaped ','
1754 character in the disk name.
1755 * util/ieee1275/devicemap.c (escape_of_path): New.
1756 (grub_util_emit_devicemap_entry): Use it.
1757 * util/sparc64/ieee1275/grub-install.in: Update script to
1758 strip partition specifiers properly by not triggering on
1759 '\' escaped ',' characters.
1760
1761 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1762
1763 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1764 to 0x300.
1765 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1766 resolutions.
1767 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1768 on documentation from Wikipedia).
1769
1770 2009-05-04 Pavel Roskin <proski@gnu.org>
1771
1772 * disk/ata.c: Spelling fixes.
1773 * disk/raid.c: Likewise.
1774 * disk/usbms.c: Likewise.
1775 * disk/dmraid_nvidia.c: Likewise.
1776 * kern/ieee1275/openfw.c: Likewise.
1777 * kern/ieee1275/init.c: Likewise.
1778 * kern/ieee1275/cmain.c: Likewise.
1779 * boot/i386/pc/cdboot.S: Likewise.
1780 * video/readers/png.c: Likewise.
1781 * video/i386/pc/vbe.c: Likewise.
1782 * fs/udf.c: Likewise.
1783 * fs/hfs.c: Likewise.
1784 * fs/reiserfs.c: Likewise.
1785 * efiemu/runtime/efiemu.c: Likewise.
1786 * efiemu/main.c: Likewise.
1787 * efiemu/mm.c: Likewise.
1788 * include/grub/elf.h: Likewise.
1789 * include/grub/xnu.h: Likewise.
1790 * include/grub/usbdesc.h: Likewise.
1791 * include/grub/usb.h: Likewise.
1792 * include/grub/script_sh.h: Likewise.
1793 * include/grub/lib/LzmaEnc.h: Likewise.
1794 * include/grub/efiemu/efiemu.h: Likewise.
1795 * include/grub/command.h: Likewise.
1796 * normal/menu.c: Likewise.
1797 * normal/main.c: Likewise.
1798 * normal/datetime.c: Likewise.
1799 * bus/usb/uhci.c: Likewise.
1800 * mmap/i386/uppermem.c: Likewise.
1801 * mmap/mmap.c: Likewise.
1802 * commands/acpi.c: Likewise.
1803 * commands/test.c: Likewise.
1804 * partmap/apple.c: Likewise.
1805 * font/font.c: Likewise.
1806 * loader/sparc64/ieee1275/linux.c: Likewise.
1807 * loader/macho.c: Likewise.
1808 * loader/i386/bsd_trampoline.S: Likewise.
1809 * loader/i386/bsd.c: Likewise.
1810 * loader/xnu.c: Likewise.
1811 * term/i386/pc/vesafb.c: Likewise.
1812 * term/usb_keyboard.c: Likewise.
1813 * util/resolve.c: Likewise.
1814 * util/getroot.c: Likewise.
1815
1816 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1817
1818 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1819
1820 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1821
1822 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1823 build error.
1824
1825 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1826
1827 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1828 parameter only available on BIOS.
1829
1830 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1831
1832 Removed wrong semicolon in declaration
1833
1834 * grub/misc.h (grub_dprintf): remove semicolon
1835
1836 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1837
1838 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1839 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1840 is done by grub_cmd_linux() now).
1841 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1842 restore video to text mode.
1843 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1844 indicates lack of "vga=" parameter. "vga=0" is mapped to
1845 `GRUB_LINUX_VID_MODE_NORMAL'.
1846
1847 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1848
1849 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1850 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1851 and `normal/script.c'. Add `kern/rescue_reader.c',
1852 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1853 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1854 `grub_script.tab.c'.
1855
1856 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1857 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1858 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1859 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1860 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1861
1862 * Makefile.in: Remove duplicated 2008 in Copyright line.
1863
1864 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1865
1866 * util/misc.c (grub_util_warn): New function. Emits a warning
1867 unconditionally.
1868 * include/grub/util/misc.h (grub_util_warn): New declaration.
1869
1870 * util/i386/pc/grub-install.in: Understand --force and pass it down
1871 to grub-setup.
1872
1873 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1874 down to setup().
1875 (setup): Improve error messages and add warnings when requested to
1876 install in odd layouts. Refuse to install using blocklists unless
1877 --force was set.
1878
1879 2009-05-04 martin f. krafft <madduck@madduck.net>
1880
1881 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1882
1883 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1884
1885 Updated copyright year
1886
1887 * fs/hfsplus.c: updated copyright year
1888
1889 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1890
1891 HFS+ UUID
1892
1893 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1894 in the space previously used by unused3
1895 (grub_hfsplus_uuid): new function
1896 (grub_hfsplus_fs): added uuid field
1897
1898 2009-05-03 Pavel Roskin <proski@gnu.org>
1899
1900 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1901 suppress warnings. It's no longer needed.
1902 * disk/host.c: Likewise.
1903 * disk/ata_pthru.c: Likewise.
1904 * disk/loopback.c: Likewise.
1905 * hook/datehook.c: Likewise.
1906 * parttool/pcpart.c: Likewise.
1907 * fs/i386/pc/pxe.c: Likewise.
1908 * fs/ntfscomp.c: Likewise.
1909 * efiemu/main.c: Likewise.
1910 * mmap/mmap.c: Likewise.
1911 * commands/crc.c: Likewise.
1912 * commands/hexdump.c: Likewise.
1913 * commands/hdparm.c: Likewise.
1914 * commands/acpi.c: Likewise.
1915 * commands/echo.c: Likewise.
1916 * commands/minicmd.c: Likewise.
1917 * commands/blocklist.c: Likewise.
1918 * commands/memrw.c: Likewise.
1919 * commands/loadenv.c: Likewise.
1920 * commands/usbtest.c: Likewise.
1921 * commands/lsmmap.c: Likewise.
1922 * commands/boot.c: Likewise.
1923 * commands/parttool.c: Likewise.
1924 * commands/configfile.c: Likewise.
1925 * commands/search.c: Likewise.
1926 * commands/ieee1275/suspend.c: Likewise.
1927 * commands/cat.c: Likewise.
1928 * commands/i386/pc/pxecmd.c: Likewise.
1929 * commands/i386/pc/play.c: Likewise.
1930 * commands/i386/pc/halt.c: Likewise.
1931 * commands/i386/pc/vbeinfo.c: Likewise.
1932 * commands/i386/pc/vbetest.c: Likewise.
1933 * commands/lspci.c: Likewise.
1934 * commands/date.c: Likewise.
1935 * commands/handler.c: Likewise.
1936 * commands/ls.c: Likewise.
1937 * commands/test.c: Likewise.
1938 * commands/cmp.c: Likewise.
1939 * commands/efi/loadbios.c: Likewise.
1940 * commands/efi/fixvideo.c: Likewise.
1941 * commands/halt.c: Likewise.
1942 * commands/help.c: Likewise.
1943 * commands/reboot.c: Likewise.
1944 * hello/hello.c: Likewise.
1945 * script/sh/main.c: Likewise.
1946 * loader/xnu.c: Likewise.
1947 * term/terminfo.c: Likewise.
1948 * term/i386/pc/serial.c: Likewise.
1949 * term/usb_keyboard.c: Likewise.
1950
1951 2009-05-03 David S. Miller <davem@davemloft.net>
1952
1953 * normal/menu.c: Include grub/parser.h
1954
1955 2009-05-03 Pavel Roskin <proski@gnu.org>
1956
1957 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1958 not char*.
1959 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1960 Suggested by Javier Martín <lordhabbit@gmail.com>
1961
1962 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1963 efiemu??.o doesn't exist.
1964 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1965 copying.
1966
1967 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1968
1969 FreeBSD 64-bit support
1970
1971 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1972 and loader/i386/bsd_trampoline.S
1973 (bsd_mod_ASFLAGS): new variable
1974 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1975 (FREEBSD_MODTYPE_KERNEL64): likewise
1976 (grub_bsd64_trampoline_start): likewise
1977 (grub_bsd64_trampoline_end): likewise
1978 (grub_bsd64_trampoline_selfjump): likewise
1979 (grub_bsd64_trampoline_gdt): likewise
1980 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1981 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1982 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1983 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1984 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1985 of "attrib" member
1986 * loader/i386/bsd_pagetable.c: new file
1987 * loader/i386/bsd_trampoline.S: likewise
1988 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1989 (ALIGN_VAR): likewise
1990 (entry_hi): new variable
1991 (kern_end_mdofs): likewise
1992 (is_64bit): likewise
1993 (grub_freebsd_add_meta): use ALIGN_VAR
1994 (grub_e820_mmap): new declaration
1995 (grub_freebsd_add_mmap): new function
1996 (grub_freebsd_add_meta_module): support 64 bit kernels
1997 (grub_freebsd_list_modules): use ALIGN_VAR
1998 (gdt_descriptor): new declaration
1999 (grub_freebsd_boot): support 64 bit kernels
2000 (grub_bsd_elf64_hook): new function
2001 (grub_bsd_load_elf): support elf64
2002
2003 2009-05-03 Bean <bean123ch@gmail.com>
2004
2005 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2006 after we get the result of if statement.
2007
2008 2009-05-03 Bean <bean123ch@gmail.com>
2009
2010 * Makefile.in (enable_efiemu): New variable.
2011
2012 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2013 set.
2014 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2015 path.
2016 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2017 path, add -mno-red-zone option.
2018 (efiemu64_s.o): Likewise.
2019 (efiemu64.o): Use macro $^ for source file.
2020
2021 * configure.ac (--enable-efiemu): New option.
2022
2023 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2024
2025 xnu support
2026
2027 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2028 (pkglib_MODULES): add xnu.mod
2029 (xnu_mod_SOURCES): new variable
2030 (xnu_mod_CFLAGS): likewise
2031 (xnu_mod_LDFLAGS): likewise
2032 (xnu_mod_ASFLAGS): likewise
2033 * conf/i386-pc.rmk: likewise
2034 * conf/x86_64-efi.rmk: likewise
2035 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2036 new declaration
2037 * include/grub/i386/macho.h: new file
2038 * include/grub/i386/xnu.h: likewise
2039 * include/grub/macho.h: likewise
2040 * include/grub/machoload.h: likewise
2041 * include/grub/x86_64/macho.h: likewise
2042 * include/grub/x86_64/xnu.h: likewise
2043 * include/grub/xnu.h: likewise
2044 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2045 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2046 * loader/i386/efi/xnu.c: new file
2047 * loader/i386/pc/xnu.c: likewise
2048 * loader/i386/xnu.c: likewise
2049 * loader/i386/xnu_helper.S: likewise
2050 * loader/macho.c: likewise
2051 * loader/xnu.c: likewise
2052 * loader/xnu_resume.c: likewise
2053 * util/grub-dumpdevtree: likewise
2054 * include/grub/i386/pit.h: include grub/err.h
2055 (grub_pit_wait): export
2056 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2057
2058 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2059
2060 Efiemu
2061
2062 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2063 _linux_efi, linux_efi.
2064 new files in grub-emu
2065 new targets efiemu32.o and efiemu64.o
2066 * loader/linux_normal_efiemu.c: likewise
2067 * loader/i386/efi/linux.c: added preliminary efiemu support
2068 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2069 files to copy
2070 * include/grub/autoefi.h: new file
2071 * include/grub/i386/efiemu.h: likewise
2072 * include/grub/i386/pc/efiemu.h: likewise
2073 * include/grub/efi/api.h: add LL suffix when necessary
2074 new definitions relating to tables
2075 * include/grub/efiemu/efiemu.h: new file
2076 * include/grub/efiemu/runtime.h: likewise
2077 * efiemu/prepare.c: likewise
2078 * efiemu/loadcore_common.c: likewise
2079 * efiemu/loadcore64.c: likewise
2080 * efiemu/runtime/efiemu.sh: likewise
2081 * efiemu/runtime/efiemu.S: likewise
2082 * efiemu/runtime/efiemu.c: likewise
2083 * efiemu/runtime/config.h: likewise
2084 * efiemu/prepare32.c: likewise
2085 * efiemu/main.c: likewise
2086 * efiemu/modules/pnvram.c: likewise
2087 * efiemu/modules/i386: likewise
2088 * efiemu/modules/i386/pc: likewise
2089 * efiemu/modules/acpi.c: likewise
2090 * efiemu/i386/pc/cfgtables.c: likewise
2091 * efiemu/i386/loadcore64.c: likewise
2092 * efiemu/i386/loadcore32.c: likewise
2093 * efiemu/prepare64.c: likewise
2094 * efiemu/loadcore.c: likewise
2095 * efiemu/symbols.c: likewise
2096 * efiemu/mm.c: likewise
2097 * efiemu/loadcore32.c: likewise
2098
2099 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2100
2101 ACPI spoofing
2102
2103 * commands/acpi.c: new file
2104 * commands/i386/pc/acpi.c: likewise
2105 * commands/efi/acpi.c: likewise
2106 * include/grub/acpi.h: likewise
2107 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2108 (acpi_mod_SOURCES): new variable
2109 (acpi_mod_CFLAGS): likewise
2110 (acpi_mod_LDFLAGS): likewise
2111 * conf/i386-efi.rmk: likewise
2112 * conf/x86_64-efi.rmk: likewise
2113
2114 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2115
2116 Missing part from mmap patch
2117
2118 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2119 (grub_mmap_unregister)
2120 (grub_mmap_free_and_unregister): use grub_mmap_register
2121
2122 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2123
2124 Mmap services
2125
2126 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2127 * loader/i386/linux.c (find_mmap_size): likewise
2128 (allocate_pages): likewise
2129 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2130 (grub_fill_multiboot_mmap): likewise
2131 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2132 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2133 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2134 (OPENBSD_MMAP_RESERVED): likewise
2135 * include/grub/i386/pc/memory.h: include grub/memory.h
2136 (grub_lower_mem): removed
2137 (grub_upper_mem): likewise
2138 (GRUB_MACHINE_MEMORY_ACPI): new definition
2139 (GRUB_MACHINE_MEMORY_NVS): likewise
2140 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2141 (GRUB_MACHINE_MEMORY_HOLE): likewise
2142 (grub_machine_mmap_register): likewise
2143 (grub_machine_mmap_unregister): likewise
2144 (grub_machine_get_upper): likewise
2145 (grub_machine_get_lower): likewise
2146 (grub_machine_get_post64): likewise
2147 * include/grub/i386/efi/memory.h: new file
2148 * include/grub/x86_64/efi/memory.h: likewise
2149 * include/grub/efi/memory.h: likewise
2150 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2151 (mmap_mod_SOURCES): new variable
2152 (mmap_mod_LDFLAGS): likewise
2153 (mmap_mod_ASFLAGS): likewise
2154 * conf/i386-coreboot.rmk: likewise
2155 * conf/i386-ieee1275.rmk: likewise
2156 * conf/i386-efi.rmk: likewise
2157 * conf/x86_64-efi.rmk: likewise
2158 * include/grub/types.h (UINT_TO_PTR): new macro
2159 (PTR_TO_UINT32): likewise
2160 (PTR_TO_UINT64): likewise
2161 * include/grub/memory.h: new file
2162 * mmap/i386/pc/mmap.c: likewise
2163 * mmap/i386/pc/mmap_helper.S: likewise
2164 * mmap/i386/uppermem.c: likewise
2165 * mmap/mmap.c: likewise
2166 * mmap/efi/mmap.c: likewise
2167 * kern/i386/coreboot/init.c (grub_machine_init): don't use
2168 grub_upper_mem
2169 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2170 (grub_upper_mem): likewise
2171 (grub_machine_init): don't use grub_upper_mem,
2172 make grub_lower_mem local
2173 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2174 grub_mmap_iterate and grub_mmap_get_upper
2175 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2176
2177 2009-05-02 Bean <bean123ch@gmail.com>
2178
2179 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2180 script/sh/parser.y.
2181 (pkglib_MODULES): Add normal.mod and sh.mod.
2182 (normal_SOURCES): New variable.
2183 (normal_mod_CFLAGS): Likewise.
2184 (normal_mod_LDFLAGS): Likewise.
2185 (sh_mod_SOURCES): Likewise.
2186 (sh_mod_CFLAGS): Likewise.
2187 (sh_mod_LDFLAGS): Likewise.
2188
2189 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2190 script/sh/lexer.c_DEPENDENCIES.
2191 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2192 kern/rescue_reader.c and kern/rescue_parser.c.
2193 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2194 (grub_emu_SOURCES): Change source files.
2195 (pkglib_MODULES): Remove normal.mod.
2196 (normal_SOURCES): Removed.
2197 (normal_mod_CFLAGS): Likewise.
2198 (normal_mod_LDFLAGS): Likewise.
2199 * conf/i386-coreboot.rmk: Likewise.
2200 * conf/i386-efi.rmk: Likewise.
2201 * conf/i386-ieee1276.rmk: Likewise.
2202 * conf/powerpc-ieee1275.rmk: Likewise.
2203 * conf/sparc64-ieee1275.rmk: Likewise.
2204 * conf/x86_64-efi.rmk: Likewise.
2205
2206 * include/grub/command.h (grub_command_execute): New inline function.
2207
2208 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2209
2210 * include/grub/normal.h: Remove <grub/setjmp.h>.
2211 (grub_fs_module_list): Moved to normal/autofs.c.
2212 (grub_exit_env): Removed.
2213 (grub_command_execute): Likewise.
2214 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2215 parameter script.
2216 (read_command_list): New function declaration.
2217 (read_fs_list): Likewise.
2218
2219 * include/parser.h: Include <grub/reader.h>.
2220 (grub_parser_split_cmdline): Change type of getline parameter.
2221 (grub_parser): New structure.
2222 (grub_parser_class): New variable.
2223 (grub_parser_execute): New function declaration.
2224 (grub_register_rescue_parser): Likewise.
2225 (grub_parser_register): New inline function.
2226 (grub_parser_unregister): Likewise.
2227 (grub_parser_get_current): Likewise.
2228 (grub_parser_set_current): Likewise.
2229
2230 * include/grub/reader.h: New file.
2231 * kern/reader.c: Likewise.
2232 * kern/rescue_parser.c: Likewise.
2233 * kern/rescue_reader.c: Likewise.
2234 * normal/autofs.c: Likewise.
2235 * normal/dyncmd.c: Likewise.
2236
2237 * include/grub/rescue.h: Removed.
2238 * normal/command.h: Likewise.
2239
2240 * include/grub/script.h: Moved to ...
2241 * include/grub/script_sh.h: ... Moved here.
2242 * normal/execute.c: Moved to ...
2243 * script/sh/execute.c: ... Moved here.
2244 * normal/function.c: Moved to ...
2245 * script/sh/function.c: ... Moved here.
2246 * normal/lexer.c: Moved to ...
2247 * script/sh/lexer.c: ... Moved here.
2248 * normal/parser.y: Moved to ...
2249 * script/sh/parser.y: ... Moved here.
2250 * normal/script.c: Moved to ...
2251 * script/sh/script.c: ... Moved here.
2252
2253 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2254 <grub/reader.h>.
2255 (grub_exit_env): Removed.
2256 (fs_module_list): Moved to normal/autofs.c.
2257 (grub_file_getline): Don't handle comment here.
2258 (free_menu): Skip removed field entry->commands.
2259 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2260 script parameter.
2261 (read_config_file): Removed nested parameter, change getline function.
2262 (grub_enter_normal_mode): Removed.
2263 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2264 (read_command_list): Likewise.
2265 (autoload_fs_module): Moved to normal/autofs.c.
2266 (read_fs_list): Likewise.
2267 (reader_nested): New variable.
2268 (grub_normal_execute): Run parser.sh to switch to sh parser.
2269 (grub_cmd_rescue): Removed.
2270 (cmd_normal): Removed.
2271 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2272 rescue command.
2273 (grub_cmdline_run): New function.
2274 (grub_normal_reader_init): Likewise.
2275 (grub_normal_read_line): Likewise.
2276 (grub_env_write_pager): Likewise.
2277 (cmdline): New variable.
2278 (grub_normal_reader): Likewise.
2279 (GRUB_MOD_INIT): Register normal reader and set as current, register
2280 pager hook, register normal command with grub_register_command_prio,
2281 so that it won't show up in command.lst.
2282 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2283 grub_fs_autoload_hook.
2284
2285 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2286 (grub_menu_execute_entry): Replace grub_script_execute with
2287 grub_parser_execute, change parameter to grub_command_execute.
2288
2289 * normal/menu_text.c: Remove <grub/script.h>.
2290
2291 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2292 and <grub/parser.h>.
2293 (run): Change editor_getline to use new parser interface. Change
2294 parameter to grub_command_execute.
2295
2296 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2297 <grub/reader.h> and <grub/parser.h>.
2298 (grub_load_normal_mode): Execute normal command.
2299 (grub_main): Call grub_register_core_commands,
2300 grub_register_rescue_parser and grub_register_rescue_reader, use
2301 grub_reader_loop to enter input loop.
2302
2303 * kern/parser.c (grub_parser_split_cmdline): Change type of
2304 getline parameter.
2305 (grub_parser_class): New variable.
2306 (grub_parser_execute): New function.
2307
2308 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2309 * loader/multiboot2.c: Likewise.
2310 * loader/sparc64/ieee1275/linux.c: Likewise.
2311
2312 * util/grub-emu.c (read_command_list): New dummy function.
2313
2314 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2315
2316 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2317 count to 16 for CCISS and IDA.
2318
2319 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2320
2321 * normal/menu_text.c (grub_wait_after_message): Print a newline
2322 after waiting for user input.
2323
2324 * loader/i386/linux.c: Include `<grub/normal.h>'.
2325 (grub_cmd_linux): Improve the error message about `ask' mode, by
2326 waiting for user input so it's not missed (we can do this, since
2327 user requested interaction).
2328
2329 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2330
2331 Added missing lst to grub-mkrescue
2332
2333 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2334 and ${input_dir}/parttool.lst
2335
2336 2009-04-30 David S. Miller <davem@davemloft.net>
2337
2338 * util/hostdisk.c (device_is_wholedisk): New function.
2339 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2340 zero only if device_is_wholedisk() returns true.
2341
2342 * util/hostdisk.c (convert_system_partition_to_system_disk):
2343 Handle virtual disk devices named /dev/vdiskX as found on sparc
2344 and powerpc.
2345
2346 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2347 lettered partition specifier is found, convert to numbered.
2348
2349 2009-04-29 David S. Miller <davem@davemloft.net>
2350
2351 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2352 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2353
2354 * normal/command.c: Add missing newline at end of file.
2355
2356 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2357 warnings.
2358 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2359 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2360 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2361 ihandles have a 32-bit type but need to be stored in a "void *".
2362
2363 2009-04-28 Pavel Roskin <proski@gnu.org>
2364
2365 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2366 not disk. Adjust all dependencies.
2367 (grub_fs_uuid_close): Use grub_device_close(), not
2368 grub_disk_close().
2369
2370 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2371 parent's partition, don't copy it by reference, as it gets freed
2372 on close.
2373
2374 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2375
2376 Preboot hooks support
2377
2378 * commands/boot.c (struct grub_preboot_t): new declaration
2379 (preboots_head): new variable
2380 (preboots_tail): likewise
2381 (grub_loader_register_preboot_hook): new function
2382 (grub_loader_unregister_preboot_hook): likewise
2383 (grub_loader_set): launch preboot hooks
2384 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2385 (grub_loader_register_preboot_hook): new declaration
2386 (grub_loader_unregister_preboot_hook): likewise
2387
2388 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2389
2390 Warning fix
2391
2392 * disk/scsi.c (grub_scsi_open): added missing cast when
2393 calling grub_dprintf
2394
2395 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2396
2397 Bug and warning fixes
2398
2399 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2400 declaration
2401 * commands/test.c (test_parse): fixed bug with file tests and corrected
2402 declaration of find_file
2403
2404 2009-04-26 Pavel Roskin <proski@gnu.org>
2405
2406 * Makefile.in: Don't install empty manual pages if help2man is
2407 missing. Use help2man option for output, not shell redirection.
2408
2409 2009-04-26 David S. Miller <davem@davemloft.net>
2410
2411 * util/grub-mkdevicemap.c (make_device_map): Add missing
2412 NESTED_FUNC_ATTR to process_device().
2413
2414 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2415
2416 Test command
2417
2418 * commands/test.c: rewritten to use bash-like test
2419
2420 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2421
2422 Parttool autoloading and improvements
2423
2424 * Makefile.in (pkglib_DATA): add parttool.lst
2425 (parttool.lst): new target
2426 * genmk.rb: generate parttool-*
2427 (CLEANFILES): add #{parttool}
2428 (PARTTOOLFILES): new variable
2429 * genparttoollist.sh: new file
2430 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2431 (grub_pcpart_type): likewise
2432 * commands/parttool.c (helpmsg): new variable
2433 (grub_cmd_parttool): output help if not enough arguments are supplied
2434 autoload modules
2435 (GRUB_MOD_INIT(parttool)): use helpmsg
2436
2437 2009-04-24 David S. Miller <davem@davemloft.net>
2438
2439 Avoiding opening same device multiple times in device iterator.
2440
2441 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2442 and use it to build a list of partitions in iterate_disk() and
2443 iterate_partition().
2444
2445 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2446 on disk->data.
2447
2448 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2449 grub_devalias_iterate() result instead of unconditional 0.
2450 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2451 Also, capture hook return value, either directly or via
2452 grub_children_iterate(), and propagate to caller.
2453 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2454 grub_children_iterate): Return value is now 'int' instead of
2455 'grub_err_t'.
2456 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2457 like a proper iterator, stopping when hooks return non-zero.
2458 (grub_devalias_iterate): Likewise.
2459
2460 2009-04-23 David S. Miller <davem@davemloft.net>
2461
2462 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2463
2464 2009-04-22 David S. Miller <davem@davemloft.net>
2465
2466 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2467 is larger than address_cells, use that value for address_cells too.
2468
2469 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2470 IEEE1275_MAX_PATH_LEN): Define.
2471 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2472 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2473 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2474 'devtype'. Explicitly NULL terminate devalias expansion.
2475
2476 * util/sparc64/ieee1275/misc.c: New file.
2477 * util/sparc64/ieee1275/grub-setup.c: New file.
2478 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2479 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2480 * util/sparc64/ieee1275/grub-install.in: New file.
2481 * util/ieee1275/ofpath.c: New file.
2482 * util/ieee1275/devicemap.c: New file.
2483 * util/devicemap.c: New file.
2484 * util/deviceiter.c: New file.
2485 * kern/sparc64/ieee1275/init.c: New file.
2486 * include/grub/util/ofpath.h: New file.
2487 * include/grub/util/deviceiter.h: New file.
2488 * util/grub-mkdevicemap.c: Include deviceiter.h.
2489 Implement using grub_util_emit_devicemap_entry and
2490 grub_util_iterate_devices.
2491 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2492 util/devicemap.c into grub-mkdevicemap
2493 * conf/i386-efi.rmk: Likewise.
2494 * conf/i386-ieee1275.rmk: Likewise.
2495 * conf/i386-pc.rmk: Likewise.
2496 * conf/powerpc-ieee1275.rmk: Likewise.
2497 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2498 images and installation utilities. Build kernel as image
2499 instead of as elf binary. Use common rules as much as possible.
2500
2501 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2502
2503 Correct GPT definition
2504
2505 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2506 of "attrib" member
2507
2508 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2509
2510 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2511
2512 2009-04-19 David S. Miller <davem@davemloft.net>
2513
2514 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2515 (grub_rescue_cmd_linux): Rename to...
2516 (grub_cmd_linux): and fix prototype.
2517 (grub_rescue_cmd_initrd): Rename to...
2518 (grub_cmd_initrd): and fix prototype.
2519 (cmd_linux, cmd_initrd): New.
2520 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2521 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2522
2523 2009-04-17 Pavel Roskin <proski@gnu.org>
2524
2525 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2526 format.
2527 (grub_ohci_transfer): Likewise.
2528
2529 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2530
2531 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2532 return without a value. Fix inconsistent indentation.
2533
2534 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2535 match struct grub_fs.
2536
2537 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2538 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2539 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2540 * commands/lspci.c (grub_lspci_iter): Likewise.
2541
2542 2009-04-16 Bean <bean123ch@gmail.com>
2543
2544 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2545 value.
2546
2547 2009-04-15 Pavel Roskin <proski@gnu.org>
2548
2549 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2550 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2551 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2552 definitions.
2553
2554 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2555
2556 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2557 that no multiple data or metadata areas are supported and `Unknown
2558 metadata header'.
2559
2560 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2561
2562 Move loader out of the kernel
2563
2564 * kern/loader.c: moved to ...
2565 * commands/boot.c: ... moved here
2566 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2567 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2568 * include/grub/kernel.h (grub_machine_fini): export
2569 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2570 (grub_loader_set): likewise
2571 (grub_loader_unset): likewise
2572 (grub_loader_boot): likewise
2573 * conf/common.rmk: new module boot.mod
2574 (pkglib_MODULES): add boot.mod
2575 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2576 (grub_emu_SOURCES): likewise
2577 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2578 (grub_emu_SOURCES): likewise
2579 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2580 (grub_emu_SOURCES): likewise
2581 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2582 (grub_emu_SOURCES): likewise
2583 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2584 (grub_emu_SOURCES): likewise
2585 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2586 (grub_emu_SOURCES): likewise
2587 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2588 (grub_emu_SOURCES): likewise
2589
2590 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2591
2592 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2593
2594 * kern/misc.c (grub_itoa): Removed function
2595 (grub_ltoa): likewise
2596 (grub_vsprintf): use grub_lltoa
2597
2598 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2599
2600 Restore grub-emu
2601
2602 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2603 * conf/i386-coreboot.rmk: likewise
2604 * conf/i386-ieee1275.rmk: likewise
2605 * conf/powerpc-ieee1275.rmk: likewise
2606
2607 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2608
2609 * INSTALL: Add that `./autogen.sh' needs to be run before
2610 `./configure.'.
2611
2612 2009-04-14 Bean <bean123ch@gmail.com>
2613
2614 * Makefile.in (pkglib_DATA): Add handler.lst.
2615 (handler.lst): New rule.
2616
2617 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2618 * conf/i386-coreboot.rmk: Likewise.
2619 * conf/i386-ieee1275.rmk: Likewise.
2620 * conf/i386-efi.rmk: Likewise.
2621 * conf/x86_64-efi.rmk: Likewise.
2622 * conf/powerpc-ieee1275.rmk: Likewise.
2623 * conf/sparc64-ieee1275.rmk: Likewise.
2624
2625 * genhandlerlist.sh: New file.
2626
2627 * genmk.rb: Add rules to generate handler.lst.
2628
2629 * include/grub/normal.h (grub_file_getline): New function definition.
2630 (read_handler_list): Likewise.
2631 (free_handler_list): Likewise.
2632
2633 * include/grub/term.h (grub_term_register_input): Add name parameter
2634 for auto generation of handler.lst.
2635 (grub_term_register_output): Likewise.
2636
2637 * normal/handler.c: New file.
2638
2639 * normal/main.c (get_line): Renamed to grub_file_getline.
2640 (read_config_file): Use the newly renamed grub_file_getline.
2641 (read_command_list): Likewise.
2642 (read_fs_list): Likewise.
2643 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2644 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2645
2646 * term/efi/console.c (grub_console_init): Add name parameter for auto
2647 generation of handler.lst.
2648 * term/gfxterm.c: Likewise.
2649 * term/i386/pc/at_keyboard.c: Likewise.
2650 * term/i386/pc/console.c: Likewise.
2651 * term/i386/pc/serial.c: Likewise.
2652 * term/i386/pc/vesafb.c: Likewise.
2653 * term/i386/pc/vga.c: Likewise.
2654 * term/i386/pc/vga_text.c: Likewise.
2655 * term/ieee1275/ofconsole.c: Likewise.
2656 * term/usb_keyboard.c: Likewise.
2657
2658 2009-04-14 Bean <bean123ch@gmail.com>
2659
2660 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2661 properly with null character.
2662
2663 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2664
2665 * configure: Remove.
2666 * config.h.in: Likewise.
2667 * stamp-h.in: Likewise.
2668 * DISTLIST: Likewise.
2669 * conf/common.mk: Likewise.
2670 * conf/i386-coreboot.mk: Likewise.
2671 * conf/i386-efi.mk: Likewise.
2672 * conf/i386-ieee1275.mk: Likewise.
2673 * conf/i386.mk: Likewise.
2674 * conf/i386-pc.mk: Likewise.
2675 * conf/powerpc-ieee1275.mk: Likewise.
2676 * conf/sparc64-ieee1275.mk: Likewise.
2677 * conf/x86_64-efi.mk: Likewise.
2678
2679 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2680 develop on GRUB.
2681
2682 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2683 David S. Miller <davem@davemloft.net>
2684
2685 * util/hostdisk.c (make_device_name): Fix buffer length
2686 calculations.
2687
2688 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2689
2690 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2691 <sys/param.h> and <sys/sysctl.h>.
2692 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2693 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2694 opening the device and reset them afterwards.
2695
2696 2009-04-13 Pavel Roskin <proski@gnu.org>
2697
2698 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2699 Reported by John Stanley <jpsinthemix@verizon.net>
2700
2701 2009-04-13 Robert Millan <rmh@aybabtu.com>
2702
2703 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2704 that name for menuentries when appropriate.
2705
2706 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2707
2708 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2709
2710 2009-04-13 Robert Millan <rmh@aybabtu.com>
2711
2712 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2713 to Linux, simply abort telling the user it's no longer supported.
2714
2715 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2716
2717 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2718 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2719 `freebsd_loadenv' only when devices.hints exist.
2720
2721 2009-04-13 Pavel Roskin <proski@gnu.org>
2722
2723 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2724
2725 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2726
2727 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2728 partition number.
2729 (grub_drive): Likewise.
2730
2731 2009-04-13 David S. Miller <davem@davemloft.net>
2732
2733 * kern/sparc64/ieee1275/ieee1275.c: New file.
2734 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2735 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2736 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2737 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2738 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2739 grub_ieee1275_alloc_physmem): Declare new exported functions.
2740
2741 * include/grub/sparc64/ieee1275/loader.h: New file.
2742 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2743 * include/grub/sparc64/kernel.h: Likewise.
2744 * loader/sparc64/ieee1275/linux.c: Likewise.
2745
2746 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2747 (grub_fstest_SOURCES): Likewise.
2748
2749 * util/hostdisk.c (make_device_name): Do not make any assumptions
2750 about the length of drive names.
2751
2752 * kern/dl.c (grub_dl_load_file): Close file immediately when
2753 we are done using it.
2754
2755 2009-04-12 David S. Miller <davem@davemloft.net>
2756
2757 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2758 values. Noticed by Pavel Roskin.
2759
2760 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2761 target compiler.
2762
2763 * genmk.rb: Add more flexible image type specification, also
2764 pass --strip-unneeded to objcopy.
2765 * conf/i386-pc.rmk: Use *_FORMAT.
2766 * conf/i386-pc.mk: Rebuilt.
2767
2768 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2769 (OFDISK_HASH_SZ): Define.
2770 (ofdisk_hash): New hash table.
2771 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2772 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2773 instead of device phandle which is not unique.
2774
2775 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2776 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2777 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2778 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2779 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2780 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2781 GRUB_KERNEL_MACHINE_DATA_END): Define.
2782 (grub_kernel_image_size, grub_total_module_size): Declare.
2783
2784 2009-04-12 Pavel Roskin <proski@gnu.org>
2785
2786 * configure.ac: Change the logic when we check for target tools.
2787 Do it when the target is specified and it's different from the
2788 specified value of the host.
2789
2790 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2791
2792 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2793 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2794 GNU/kFreeBSD. Check if a device is a character device. Use
2795 DIOCGMEDIASIZE to get the size.
2796 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2797 support for GNU/kFreeBSD.
2798 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2799 is a character device instead of a block device. Add support for
2800 FreeBSD device names.
2801
2802 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2803 is a character device instead of a block device.
2804
2805 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2806 is a character device instead of a block device.
2807
2808 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2809
2810 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2811 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2812 FreeBSD. Check if a device is a character device. Use
2813 DIOCGMEDIASIZE to get the size.
2814 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2815 support for FreeBSD.
2816 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2817 is a character device instead of a block device. Add support for
2818 FreeBSD device names.
2819
2820 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2821 a character device instead of a block device.
2822 (grub_util_check_char_device): New function.
2823
2824 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2825 a character device instead of a block device.
2826
2827 * include/grub/util/getroot.h (grub_util_check_char_device): New
2828 prototype.
2829
2830 2009-04-11 David S. Miller <davem@davemloft.net>
2831
2832 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2833 static libgcc.
2834 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2835 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2836 function, if present.
2837 (__bswapdi2): Likewise.
2838
2839 * include/grub/sparc64/ieee1275/boot.h: New file.
2840 * boot/sparc64/ieee1275/boot.S: Likewise.
2841 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2842
2843 * kern/misc.c (grub_ltoa): New function.
2844 (grub_vsprintf): Use it to format 'long' integers.
2845
2846 2009-04-10 David S. Miller <davem@davemloft.net>
2847
2848 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2849 slots are of type grub_ieee1275_cell_t.
2850 (grub_nand_read): Likewise.
2851 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2852 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2853 macros are used to compare values in arg/ret block of the call.
2854 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2855 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2856 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2857 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2858 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2859 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2860 grub_ieee1275_close, grub_ieee1275_set_property,
2861 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2862 grub_ieee1275_cell_t.
2863 * kern/ieee1275/openfw.c (grub_map): Likewise.
2864 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2865 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2866
2867 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2868 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2869 (grub_devalias_iterate): Likewise.
2870
2871 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2872
2873 UFS improvements
2874
2875 * fs/ufs.c (INODE_NBLOCKS): new definition
2876 (struct grub_ufs_dirent): added fields for non-BSD dirents
2877 (grub_ufs_get_file_block): fixed double indirect handling
2878 (grub_ufs_lookup_symlink): use more robust way to determine whether
2879 symlink is inline
2880 (grub_ufs_find_file): support for non-BSD dirents
2881 (grub_ufs_dir): support for non-BSD dirents
2882
2883 2009-04-10 Bean <bean123ch@gnail.com>
2884
2885 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2886 attribute, otherwise the size would be wrong for i386 platform.
2887
2888 * include/grub/pci.h (grub_pci_read_word): New inline function.
2889 (grub_pci_read_byte): Likewise.
2890 (grub_pci_write): Likewise.
2891 (grub_pci_write_word): Likewise.
2892 (grub_pci_write_byte): Likewise.
2893
2894 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2895
2896 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2897 (find_framebuf): Scan pci to locate the frame buffer address.
2898
2899 * commands/efi/fixvideo.c: New file.
2900
2901 * commands/efi/loadbios.c: Likewise.
2902
2903 * commands/memrw.c: Likewise.
2904
2905 * util/grub-dumpbios.in: Likewise.
2906
2907 * conf/common.rmk (grub-dumpbios): New utility.
2908 (pkglib_MODULES): New module memrw.mod.
2909 (memrw_mod_SOURCE): New macro.
2910 (memrw_mod_CFLAGS): Likewise.
2911 (memrw_mod_LDFLAGS): Likewise.
2912
2913 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2914 fixvideo.mod.
2915 (loadbios_mod_SOURCE): New macro.
2916 (loadbios_mod_CFLAGS): Likewise.
2917 (loadbios_mod_LDFLAGS): Likewise.
2918 (fixvideo_mod_SOURCE): Likewise.
2919 (fixvideo_mod_CFLAGS): Likewise.
2920 (fixvideo_mod_LDFLAGS): Likewise.
2921
2922 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2923 fixvideo.mod.
2924 (loadbios_mod_SOURCE): New macro.
2925 (loadbios_mod_CFLAGS): Likewise.
2926 (loadbios_mod_LDFLAGS): Likewise.
2927 (fixvideo_mod_SOURCE): Likewise.
2928 (fixvideo_mod_CFLAGS): Likewise.
2929 (fixvideo_mod_LDFLAGS): Likewise.
2930
2931 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2932
2933 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2934
2935 2009-04-07 David S. Miller <davem@davemloft.net>
2936
2937 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2938 support for R_SPARC_OLO10 relocations. Fix compile warning for
2939 R_SPARC_WDISP30 case.
2940 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2941
2942 2009-04-06 Pavel Roskin <proski@gnu.org>
2943
2944 * include/grub/misc.h (ARRAY_SIZE): New macro.
2945 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2946 New macro.
2947 * loader/i386/linux.c (allocate_pages): Use free_pages().
2948 (grub_linux_unload): Don't use free_pages().
2949 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2950 wrong index. Treat all other modes as text modes.
2951 (grub_cmd_linux): Initialize vid_mode unconditionally to
2952 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2953
2954 * commands/help.c (print_command_help): Use cmd->prio, not
2955 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2956
2957 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2958
2959 Parttool
2960
2961 * parttool/pcpart.c: new file
2962 * commands/parttool.c: likewise
2963 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2964 (parttool_mod_SOURCES): new variable
2965 (parttool_mod_CFLAGS): likewise
2966 (parttool_mod_LDFLAGS): likewise
2967 (pcpart_mod_SOURCES): likewise
2968 (pcpart_mod_CFLAGS): likewise
2969 (pcpart_mod_LDFLAGS): likewise
2970 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2971 and parttool/pcpart.c
2972 * conf/i386-efi.rmk: likewise
2973 * conf/i386-ieee1275.rmk: likewise
2974 * conf/i386-pc.rmk: likewise
2975 * conf/powerpc-ieee1275.rmk: likewise
2976 * conf/sparc64-ieee1275.rmk: likewise
2977 * conf/x86_64-ieee1275.rmk: likewise
2978
2979 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2980
2981 Support for mtime and further expandability of dir command
2982
2983 * include/grub/lib/datetime.h: moved to ...
2984 * include/grub/datetime.h: ... moved here and added
2985 declaration of grub_unixtime2datetime. All users updated
2986 * include/grub/fs.h: new syntax for dir and mtime functions in
2987 struct grub_fs
2988 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2989 and GRUB_FSHELP_FLAGS_MASK
2990 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2991 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2992 (grub_ext2_mtime): new function
2993 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2994 (grub_hfsplus_mtime): new function
2995 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2996 (GRUB_UFS_ATTR_FILE): likewise
2997 (GRUB_UFS_ATTR_LNK): likewise
2998 (struct grub_ufs_sblock): new fields mtime
2999 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3000 all users updated
3001 (grub_ufs_dir): mtime support
3002 (grub_ufs_mtime): new function
3003 * fs/affs.c (grub_affs_dir): use new dir syntax
3004 * fs/afs.c (grub_afs_dir): likewise
3005 * fs/cpio.c (grub_cpio_dir): likewise
3006 * fs/fat.c (grub_fat_find_dir): likewise
3007 * fs/hfs.c (grub_hfs_dir): likewise
3008 * fs/iso9660.c (grub_iso9660_dir): likewise
3009 * fs/jfs.c (grub_jfs_dir): likewise
3010 * fs/minix.c (grub_minix_dir): likewise
3011 * fs/ntfs.c (grub_ntfs_dir): likewise
3012 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3013 * fs/sfs.c (grub_sfs_dir): likewise
3014 * fs/xfs.c (grub_xfs_dir): likewise
3015 * util/hostfs.c (grub_hostfs_dir): likewise
3016 * lib/datetime.c: moved to ...
3017 * normal/datetime.c: ... moved here
3018 (grub_unixtime2datetime): new function
3019 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3020 * normal/completion.c (iterate_dir): use new dir syntax
3021 * normal/misc.c (grub_normal_print_device_info): tell the
3022 last modification time of a volume
3023 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3024 * conf/common.rmk: added lib/datetime.c to ls.mod
3025 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3026 (normal_mod_SOURCES): likewise
3027 (datetime_mod_SOURCES): Removed lib/datetime.c
3028 * conf/i386-efi.rmk: likewise
3029 * conf/i386-ieee1275.rmk: likewise
3030 * conf/i386-pc.rmk: likewise
3031 * conf/powerpc-ieee1275.rmk: likewise
3032 * conf/sparc64-ieee1275.rmk: likewise
3033 * conf/x86_64-efi.rmk: likewise
3034
3035 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3036
3037 Trim trailing spaces in FAT label and support mtools-like labels
3038
3039 * fs/fat.c (grub_fat_iterate_dir): New function based
3040 on grub_fat_find_dir
3041 (grub_fat_find_dir): use grub_fat_iterate_dir
3042 (grub_fat_label): likewise
3043
3044 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3045
3046 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3047 and command.h
3048 remove extraneous kernel_elf_HEADERS
3049
3050 2009-04-04 Bean <bean123ch@gnail.com>
3051
3052 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3053
3054 * util/misc.c: Likewise.
3055
3056 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3057
3058 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3059 instead of grub_printf.
3060
3061 2009-04-03 Robert Millan <rmh@aybabtu.com>
3062
3063 * loader/i386/linux.c (grub_linux_setup_video): Fill
3064 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3065 values from `mode info' structure instead of hardcoded
3066 values.
3067
3068 2009-04-01 Pavel Roskin <proski@gnu.org>
3069
3070 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3071 unused now.
3072 * genmk.rb: Likewise.
3073 * configure.ac: Likewise.
3074
3075 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3076
3077 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3078 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3079
3080 2009-04-01 David S. Miller <davem@davemloft.net>
3081
3082 * normal/sparc64/setjmp.S: Fix setjmp implementation.
3083 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3084 (grub_setjmp): Mark with 'returns_twice' attribute.
3085 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3086 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3087 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3088
3089 2009-04-01 Robert Millan <rmh@aybabtu.com>
3090
3091 Reapply fix from 2008-07-28 which was accidentally reverted; also
3092 perform the same fix to a similar check in same function.
3093
3094 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3095 with the same number are found, just use issue a warning with
3096 grub_dprintf(), as this error has been reported to be non-fatal.
3097
3098 2009-03-31 Pavel Roskin <proski@gnu.org>
3099
3100 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3101 for cross-compilation.
3102
3103 2009-03-30 Robert Millan <rmh@aybabtu.com>
3104
3105 Fix i386-ieee1275 build.
3106
3107 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3108 Remove declaration.
3109
3110 2009-03-30 Pavel Roskin <proski@gnu.org>
3111
3112 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3113 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3114 zero-terminated, rely only on the strlen value. Fix comparison
3115 of strings differing in length.
3116
3117 2009-03-30 Robert Millan <rmh@aybabtu.com>
3118
3119 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3120 checking for abi version. Improve error messages on BIOS to notify
3121 user about `linux16' command.
3122
3123 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3124
3125 Leak fixes
3126
3127 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3128 in case of collision
3129 * disk/scsi.c (grub_scsi_open): free scsi in case of error
3130
3131 2009-03-29 Robert Millan <rmh@aybabtu.com>
3132
3133 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3134 set `vid_mode' accordingly.
3135 (grub_linux_boot): Process `vid_mode' and set video mode.
3136
3137 2009-03-29 Robert Millan <rmh@aybabtu.com>
3138
3139 * util/grub.d/10_linux.in (linux_entry): New function.
3140 Factorize generation of Linux boot entries.
3141
3142 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3143
3144 Make the format of Environment Block plain text. The boot loader
3145 part is not tested well yet.
3146
3147 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3148 (buffer): Removed.
3149 (envblk): Likewise.
3150 (usage): Remove "info" and "clear". Add "unset". Update the
3151 description of "set", as this does not delete variables any
3152 longer.
3153 (create_envblk_file): Complete rewrite.
3154 (open_envblk_file): Likewise.
3155 (cmd_info): Removed.
3156 (cmd_list): Likewise.
3157 (cmd_set): Likewise.
3158 (cmd_clear): Likewise.
3159 (list_variables): New function.
3160 (write_envblk): Likewise.
3161 (set_variables): Likewise.
3162 (unset_variables): Likewise.
3163 (main): Complete rewrite.
3164
3165 * commands/loadenv.c (buffer): Removed.
3166 (envblk): Likewise.
3167 (open_envblk_file): New function.
3168 (read_envblk_file): Complete rewrite.
3169 (grub_cmd_load_env): Likewise.
3170 (grub_cmd_list_env): Likewise.
3171 (struct blocklist): New struct.
3172 (free_blocklists): New function.
3173 (check_blocklists): Likewise.
3174 (write_blocklists): Likewise.
3175 (grub_cmd_save_env): Complete rewrite.
3176
3177 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3178 a plain text signature.
3179 (GRUB_ENVBLK_MAXLEN): Removed.
3180 (struct grub_envblk): Complete rewrite.
3181 (grub_envblk_find): Removed.
3182 (grub_envblk_insert): Likewise.
3183 (grub_envblk_open): New prototype.
3184 (grub_envblk_set): Likewise.
3185 (grub_envblk_delete): Put const to VALUE.
3186 (grub_envblk_iterate): Put const to NAME and VALUE.
3187 (grub_envblk_close): New prototype.
3188 (grub_envblk_buffer): New inline function.
3189 (grub_envblk_size): Likewise.
3190
3191 * lib/envblk.c: Include grub/mm.h.
3192 (grub_env_find): Removed.
3193 (grub_envblk_open): New function.
3194 (grub_envblk_close): Likewise.
3195 (escaped_value_len): Likewise.
3196 (find_next_line): Likewise.
3197 (grub_envblk_insert): Removed.
3198 (grub_envblk_set): New function.
3199 (grub_envblk_delete): Complete rewrite.
3200 (grub_envblk_iterate): Likewise.
3201
3202 2009-03-28 Robert Millan <rmh@aybabtu.com>
3203
3204 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3205 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3206 variables. Use 16-bit loader.
3207 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3208 loader.
3209 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3210 (grub_linux16_boot): ... this. Update all users.
3211 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3212 (grub_linux_boot): ... this. Update all users.
3213
3214 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3215 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3216 commands to `linux16' and `initrd16'.
3217 (GRUB_MOD_FINI(linux)): Rename to ...
3218 (GRUB_MOD_FINI(linux16)): ... this.
3219
3220 2009-03-24 Pavel Roskin <proski@gnu.org>
3221
3222 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3223 not just for compilation.
3224
3225 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3226
3227 Move multiboot helper out of kernel
3228
3229 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3230 `loader/i386/multiboot_helper.S'.
3231 * conf/i386-coreboot.rmk: Likewise
3232 * conf/i386-ieee1275.rmk: Likewise
3233
3234 * kern/i386/loader.S: Move multiboot helpers from here...
3235 * loader/i386/multiboot_helper.S: ...moved here
3236 * include/grub/i386/loader.h: Move declarations of multiboot
3237 helpers from here...
3238 * include/grub/i386/multiboot.h: ...moved here
3239 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3240
3241 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3242
3243 * kern/env.c (grub_env_context_open): Added an argument to specify
3244 whether a new context inherits exported variables from current
3245 one. This is useful when making a sandbox to interpret a config
3246 file.
3247 All callers updated.
3248
3249 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3250
3251 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3252
3253 * kern/env.c (grub_env_context_close): Fix memory leaks.
3254
3255 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3256
3257 * normal/main.c (grub_normal_execute): Added an argument
3258 BATCH to specify if an interactive interface should be provided
3259 after reading a config file.
3260 All callers updated.
3261 (read_command_list): Prevent being executed twice.
3262 (read_fs_list): Likewise.
3263
3264 * include/grub/normal.h (grub_normal_execute): Updated the
3265 prototype.
3266
3267 2009-03-22 Pavel Roskin <proski@gno.org>
3268
3269 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3270 _start.
3271 * kern/i386/pc/startup.S: Likewise.
3272 * kern/i386/efi/startup.S: Likewise.
3273 * kern/i386/ieee1275/startup.S: Likewise.
3274 * kern/i386/coreboot/startup.S: Likewise.
3275 * kern/x86_64/efi/startup.S: Likewise.
3276
3277 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3278 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3279 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3280
3281 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3282
3283 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3284
3285 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3286 limit detection.
3287 Use vaddr of correct segment for entry_point.
3288
3289 2009-03-21 Bean <bean123ch@gmail.com>
3290
3291 * commands/blocklist.c: Add include file <grub/command.h>, remove
3292 <grub/normal.h> and <grub/arg.h>.
3293 (grub_cmd_blocklist): Use the new command interface.
3294 (GRUB_MOD_INIT): Likewise.
3295 (GRUB_MOD_FINI): Likewise.
3296 * commands/boot.c: Likewise.
3297 * commands/cat.c: Likewise.
3298 * commands/cmp.c: Likewise.
3299 * commands/configfile.c: Likewise.
3300 * commands/crc.c: Likewise.
3301 * commands/echo.c: Likewise.
3302 * commands/halt.c: Likewise.
3303 * commands/handler.c: Likewise.
3304 * commands/hdparm.c: Likewise.
3305 * commands/help.c: Likewise.
3306 * commands/hexdump.c: Likewise.
3307 * commands/loadenv.c: Likewise.
3308 * commands/ls.c: Likewise.
3309 * commands/lsmmap.c: Likewise.
3310 * commands/lspci.c: Likewise.
3311 * commands/loadenv.c: Likewise.
3312 * commands/read.c: Likewise.
3313 * commands/reboot.c: Likewise.
3314 * commands/search.c: Likewise.
3315 * commands/sleep.c: Likewise.
3316 * commands/test.c: Likewise.
3317 * commands/usbtest.c: Likewise.
3318 * commands/videotest.c: Likewise.
3319 * commands/i386/cpuid.c: Likewise.
3320 * commands/i386/pc/halt.c: Likewise.
3321 * commands/i386/pc/play.c: Likewise.
3322 * commands/i386/pc/pxecmd.c: Likewise.
3323 * commands/i386/pc/vbeinfo.c: Likewise.
3324 * commands/i386/pc/vbetest.c: Likewise.
3325 * commands/ieee1275/suspend.c: Likewise.
3326 * disk/loopback.c: Likewise.
3327 * font/font_cmd.c: Likewise.
3328 * hello/hello.c: Likewise.
3329 * loader/efi/appleloader.c: Likewise.
3330 * loader/efi/chainloader.c: Likewise.
3331 * loader/i386/bsd.c: Likewise.
3332 * loader/i386/efi/linux.c: Likewise.
3333 * loader/i386/ieee1275/linux.c: Likewise.
3334 * loader/i386/linux.c: Likewise.
3335 * loader/i386/pc/chainloader.c: Likewise.
3336 * loader/i386/pc/linux.c: Likewise.
3337 * loader/powerpc/ieee1275/linux.c: Likewise.
3338 * loader/multiboot_loader.c: Likewise.
3339 * term/gfxterm.c: Likewise.
3340 * term/i386/pc/serial.c: Likewise.
3341 * term/terminfo.c: Likewise.
3342
3343 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3344 * term/i386/pc/vga.c: Likewise.
3345 * video/readers/jpeg.c: Likewise.
3346 * video/readers/png.c: Likewise.
3347 * video/readers/tga.c: Likewise.
3348
3349 * util/grub-fstest (cmd_loopback): Removed.
3350 (cmd_blocklist): Likewise.
3351 (cmd_ls): Likewise.
3352 (grub_register_command): Likewise.
3353 (grub_unregister_command): Likewise.
3354 (execute_command): Use grub_command_find to locate command and execute
3355 it.
3356
3357 * include/grub/efi/chainloader.h: Removed.
3358 * loader/efi/chainloader_normal.c: Likewise.
3359 * loader/i386/bsd_normal.c: Likewise.
3360 * loader/i386/pc/chainloader_normal.c: Likewise.
3361 * loader/i386/pc/multiboot_normal.c: Likewise.
3362 * loader/linux_normal.c: Likewise.
3363 * loader/multiboot_loader_normal.c: Likewise.
3364 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3365
3366 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3367 and grub_register_command_p1.
3368
3369 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3370 kern/command.c, lib/arg.c and commands/extcmd.c.
3371 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3372 (minicmd_mod_SOURCES): New variable.
3373 (minicmd_mod_CFLAGS): Likewise.
3374 (minicmd_mod_LDFLAGS): Likewise.
3375 (extcmd_mod_SOURCES): Likewise.
3376 (extcmd_mod_CFLAGS): Likewise.
3377 (extcmd_mod_LDFLAGS): Likewise.
3378 (boot_mod_SOURCES): Removed.
3379 (boot_mod_CFLAGS): Likewise.
3380 (boot_mod_LDFLAGS): Likewise.
3381
3382 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3383 kern/corecmd.c.
3384 (kernel_img_HEADERS): Add command.h.
3385 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3386 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3387 and lib/arg.c.
3388 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3389 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3390 remove the corresponding normal mode command.
3391 (normal_mod_SOURCES): Remove normal/arg.c.
3392 * conf/i386-coreboot.rmk: Likewise.
3393 * conf/i386-efi.rmk: Likewise.
3394 * conf/i386-ieee1275.rmk: Likewise.
3395 * conf/powerpc-ieee1275.rmk: Likewise.
3396 * conf/x86_64-efi.rmk: Likewise.
3397
3398 * include/grub/arg.h: Move from here ...
3399 * include/grub/lib/arg.h: ... to here.
3400
3401 * normal/arg.c: Move from here ...
3402 * lib/arg.c: ... to here.
3403
3404 * commands/extcmd.c: New file.
3405 * commands/minicmd.c: Likewise.
3406 * include/grub/command.h: Likewise.
3407 * include/grub/extcmd.h: Likewise.
3408 * kern/command.c: Likewise.
3409 * kern/corecmd.c: Likewise.
3410
3411 * kern/list.c (grub_list_iterate): Return int instead of void.
3412 (grub_list_insert): New function.
3413 (grub_prio_list_insert): Likewise.
3414
3415 * kern/rescue.c (grub_rescue_command): Removed.
3416 (grub_rescue_command_list): Likewise.
3417 (grub_rescue_register_command): Likewise.
3418 (grub_rescue_unregister_command): Likewise.
3419 (grub_rescue_cmd_boot): Move to minicmd.c
3420 (grub_rescue_cmd_help): Likewise.
3421 (grub_rescue_cmd_info): Likewise.
3422 (grub_rescue_cmd_boot): Likewise.
3423 (grub_rescue_cmd_testload): Likewise.
3424 (grub_rescue_cmd_dump): Likewise.
3425 (grub_rescue_cmd_rmmod): Likewise.
3426 (grub_rescue_cmd_lsmod): Likewise.
3427 (grub_rescue_cmd_exit): Likewise.
3428 (grub_rescue_print_devices): Moved to corecmd.c.
3429 (grub_rescue_print_files): Likewise.
3430 (grub_rescue_cmd_ls): Likewise.
3431 (grub_rescue_cmd_insmod): Likewise.
3432 (grub_rescue_cmd_set): Likewise.
3433 (grub_rescue_cmd_unset): Likewise.
3434 (attempt_normal_mode): Use grub_command_find to get normal module.
3435 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3436 commands, remove grub_rescue_register_command calls.
3437
3438 * normal/command.c (grub_register_command): Removed.
3439 (grub_unregister_command): Likewise.
3440 (grub_command_find): Likewise.
3441 (grub_iterate_commands): Likewise.
3442 (rescue_command): Likewise.
3443 (export_command): Moved to corecmd.c.
3444 (set_command): Removed.
3445 (unset_command): Likewise.
3446 (insmod_command): Likewise.
3447 (rmmod_command): Likewise.
3448 (lsmod_command): Likewise.
3449 (grub_command_init): Likewise.
3450
3451 * normal/completion.c (iterate_command): Use cmd->prio to check for
3452 active command.
3453 (complete_arguments): Use grub_extcmd_t structure to find options.
3454 (grub_normal_do_completion): Change function grub_iterate_commands to
3455 grub_command_iterate.
3456
3457 * normal/execute.c (grub_script_execute_cmd): No need to parse
3458 argument here.
3459
3460 * normal/main.c (grub_dyncmd_dispatcher): New function.
3461 (read_command_list): Register unload commands as dyncmd.
3462 (grub_cmd_normal): Use new command interface, register rescue,
3463 unregister normal at entry, register normal, unregister rescue at exit.
3464
3465 * include/grub/list.h (grub_list_test_t): New type.
3466 (grub_list_iterate): Return int instead of void.
3467 (grub_list_insert): New function.
3468 (GRUB_AS_NAMED_LIST_P): New macro.
3469 (GRUB_AS_PRIO_LIST): Likewise.
3470 (GRUB_AS_PRIO_LIST_P): Likewise.
3471 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3472 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3473 (grub_prio_list): New structure.
3474 (grub_prio_list_insert): New function.
3475 (grub_prio_list_remove): New inline function.
3476
3477 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3478 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3479 (GRUB_COMMAND_FLAG_MENU): Likewise.
3480 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3481 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3482 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3483 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3484 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3485 (grub_command): Likewise.
3486 (grub_register_command): Likewise.
3487 (grub_command_find): Likewise.
3488 (grub_iterate_commands): Likewise.
3489 (grub_command_init): Likewise.
3490 (grub_arg_parse): Likewise.
3491 (grub_arg_show_help): Likewise.
3492
3493 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3494 (grub_rescue_unregister_command): Likewise.
3495
3496 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3497 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3498 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3499
3500 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3501 grub_rescue_cmd_initrd.
3502 * include/grub/i386/loader.h: Likewise.
3503 * include/grub/x86_64/loader.h: Likewise.
3504
3505 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3506
3507 2009-03-21 Bean <bean123ch@gmail.com>
3508
3509 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3510 instead of stat in mingw environment.
3511
3512 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3513
3514 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3515
3516 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3517 AC_CONFIG_LINKS.
3518
3519 2009-03-21 Bean <bean123ch@gmail.com>
3520
3521 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3522 out of range error.
3523
3524 2009-03-18 Michel Dänzer <michel@daenzer.net>
3525
3526 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3527 checking inode flags for EXT4_EXTENTS_FLAG.
3528
3529 2009-03-18 Robert Millan <rmh@aybabtu.com>
3530
3531 * loader/i386/linux.c: Include `<grub/video.h>' and
3532 `<grub/i386/pc/vbe.h>'..
3533 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3534 (grub_linux32_boot): Attempt to configure video settings with
3535 grub_linux_setup_video().
3536 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3537 to avoid grub_console_fini() which would step out of graphical mode
3538 unconditionally.
3539
3540 2009-03-14 Robert Millan <rmh@aybabtu.com>
3541
3542 Fix build on powerpc.
3543 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3544
3545 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3546
3547 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3548 background image command.
3549
3550 2009-03-12 Colin D Bennett <colin@gibibit.com>
3551
3552 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3553 (grub_gfxterm_putchar): Extract pairs of identical calls to
3554 draw_cursor out of conditional blocks.
3555
3556 2009-03-11 Pavel Roskin <proski@gnu.org>
3557
3558 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3559 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3560
3561 2009-03-11 Robert Millan <rmh@aybabtu.com>
3562
3563 * loader/i386/multiboot_elfxx.c
3564 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3565
3566 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3567
3568 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3569 `kern/handler.c'.
3570
3571 2009-03-11 Robert Millan <rmh@aybabtu.com>
3572
3573 * loader/i386/multiboot.c (code_size): New variable.
3574 (grub_multiboot): Define offsets by adding to `code_size' rather
3575 than subtracting from `grub_multiboot_payload_size'. Provide
3576 4-byte alignment to MBI and others by increasing
3577 `boot_loader_name_length' appropriately.
3578
3579 * loader/i386/multiboot_elfxx.c
3580 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3581
3582 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3583
3584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3585 `fs/ext2.c'.
3586
3587 2009-03-08 Robert Millan <rmh@aybabtu.com>
3588
3589 Make loader/i386/linux.c usable on i386-pc again.
3590
3591 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3592 memory to heap.
3593 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3594 `#error' stanza.
3595
3596 2009-03-07 Bean <bean123ch@gmail.com>
3597
3598 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3599 allocation.
3600
3601 2009-03-06 Robert Millan <rmh@aybabtu.com>
3602
3603 Fix display issue on terminals with screen size other than 80x25
3604 (e.g. gfxterm with resolution higher than 640x480).
3605
3606 * normal/main.c (grub_normal_init_page): Display title text in a
3607 position relative to the center of the terminal instead of relying
3608 on a hardcoded offset.
3609
3610 2009-03-04 Robert Millan <rmh@aybabtu.com>
3611
3612 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3613 installed.
3614
3615 * Makefile.in (host_kernel): New variable.
3616 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3617 scripts instead of just the windows one.
3618 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3619
3620 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3621
3622 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3623 `kern/handler.c'.
3624 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3625 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3626 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3627 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3628 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3629 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3630
3631 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3632
3633 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3634 or if there's no space for the disk label and print the partition number on a
3635 invalid magic.
3636
3637 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3638
3639 * util/misc.c: Include <time.h>.
3640 (grub_millisleep): New function.
3641
3642 2009-03-04 Bean <bean123ch@gmail.com>
3643
3644 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3645 another option -mno-red-zone.
3646
3647 * commands/handler.c: Change module description.
3648
3649 * kern/handler.c: Add missing space at the end of description line.
3650
3651 * kern/list.c: Likewise.
3652
3653 2009-03-03 Robert Millan <rmh@aybabtu.com>
3654
3655 Move more components to the relocation area, and fix mbi pointer
3656 handling to use the destination rather than the origin (thanks to
3657 Vladimir Serbinenko for spotting).
3658
3659 * loader/i386/multiboot.c (mbi_dest): New variable.
3660 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3661 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3662 relocation area.
3663
3664 2009-03-01 Bean <bean123ch@gmail.com>
3665
3666 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3667 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3668 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3669 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3670
3671 * loader/i386/efi/linux.c (acpi_guid): New variable.
3672 (acpi_guid): Likewise.
3673 (EBDA_SEG_ADDR): New constant.
3674 (LOW_MEM_ADDR): Likewise.
3675 (FAKE_EBDA_SEG): Likewise.
3676 (fake_bios_data): New function.
3677 (grub_linux_boot): Call fake_bios_data.
3678
3679 2009-03-01 Bean <bean123ch@gmail.com>
3680
3681 * commands/terminal.c: Removed.
3682
3683 * commands/handler.c: New file.
3684
3685 * include/grub/list.h: Likewise.
3686
3687 * include/grub/handler.h: Likewise.
3688
3689 * kern/list.c: Likewise.
3690
3691 * kern/handler.c: Likewise.
3692
3693 * kern/term.h: Include header file <grub/handler.h>.
3694 (grub_term_input): Move next field to the beginning.
3695 (grub_term_output): Likewise.
3696 (grub_term_input_class): New variable.
3697 (grub_term_output_class): Likewise.
3698 (grub_term_register_input): Changed to inline function.
3699 (grub_term_register_output): Likewise.
3700 (grub_term_unregister_input): Likewise.
3701 (grub_term_unregister_output): Likewise.
3702 (grub_term_set_current_input): Likewise.
3703 (grub_term_set_current_output): Likewise.
3704 (grub_term_get_current_input): Likewise.
3705 (grub_term_get_current_output): Likewise.
3706 (grub_term_iterate_input): Removed.
3707 (grub_term_iterate_output): Likewise.
3708
3709 * kern/term.c (grub_term_list_input): Removed.
3710 (grub_term_list_output): Likewise.
3711 (grub_term_input_class): New variable.
3712 (grub_term_output_class): Likewise.
3713 (grub_cur_term_input): Change variable as macro.
3714 (grub_cur_term_output): Likewise.
3715 (grub_term_register_input): Removed.
3716 (grub_term_register_output): Likewise.
3717 (grub_term_unregister_input): Likewise.
3718 (grub_term_unregister_output): Likewise.
3719 (grub_term_set_current_input): Likewise.
3720 (grub_term_set_current_output): Likewise.
3721 (grub_term_iterate_input): Likewise.
3722 (grub_term_iterate_output): Likewise.
3723 (grub_term_get_current_input): Likewise.
3724 (grub_term_get_current_output): Likewise.
3725
3726 * util/grub-editenv.c: Include header file <grub/handler.h>.
3727 (grub_term_get_current_input): Removed.
3728 (grub_term_get_current_output): Likewise.
3729 (grub_term_input_class): New variable.
3730 (grub_term_output_class): Likewise.
3731
3732 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3733 (grub_term_get_current_output): Likewise.
3734 (grub_term_input_class): New variable.
3735 (grub_term_output_class): Likewise.
3736
3737 * util/grub-probe.c (grub_term_get_current_input): Removed.
3738 (grub_term_get_current_output): Likewise.
3739 (grub_term_input_class): New variable.
3740 (grub_term_output_class): Likewise.
3741
3742 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3743 (grub_term_get_current_output): Likewise.
3744 (grub_term_input_class): New variable.
3745 (grub_term_output_class): Likewise.
3746
3747 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3748 (terminal_mod_SOURCES): Likewise.
3749 (terminal_mod_CFLAGS): Likewise.
3750 (terminal_mod_LDFLAGS): Likewise.
3751
3752 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3753 handler.c.
3754 (kernel_img_SOURCES): Add list.c and handler.c.
3755 (kernel_img_HEADERS): Add list.h and handler.h.
3756
3757 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3758 handler.c.
3759 (kernel_mod_SOURCES): Add list.c and handler.c.
3760 (kernel_mod_HEADERS): Add list.h and handler.h.
3761
3762 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3763 handler.c.
3764 (kernel_elf_SOURCES): Add list.c and handler.c.
3765 (kernel_elf_HEADERS): Add list.h and handler.h.
3766
3767 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3768 handler.c.
3769 (kernel_elf_SOURCES): Add list.c and handler.c.
3770 (kernel_elf_HEADERS): Add list.h and handler.h.
3771
3772 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3773 handler.c.
3774 (kernel_mod_SOURCES): Add list.c and handler.c.
3775 (kernel_mod_HEADERS): Add list.h and handler.h.
3776
3777 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3778 handler.c.
3779 (kernel_elf_SOURCES): Add list.c and handler.c.
3780 (kernel_elf_HEADERS): Add list.h and handler.h.
3781
3782 2009-02-27 Robert Millan <rmh@aybabtu.com>
3783
3784 Factorize elf32 / elf64 code in Multiboot loader. This will
3785 prevent it from getting out of sync again.
3786
3787 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3788 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3789 grub_multiboot_load_elf64): Move from here ...
3790 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3791 grub_multiboot_load_elf): ... to here (new file).
3792
3793 2009-02-27 Robert Millan <rmh@aybabtu.com>
3794
3795 * util/grub.d/10_linux.in: Rename "single-user mode" to
3796 "recovery mode".
3797
3798 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3799
3800 Don't leak in SCSI code.
3801 * disk/scsi.c (grub_scsi_close): free `scsi'.
3802
3803 2009-02-27 Robert Millan <rmh@aybabtu.com>
3804
3805 * loader/i386/pc/multiboot.c: Move from here ...
3806 * loader/i386/multiboot.c: ... to here. Update all users.
3807
3808 2009-02-27 Robert Millan <rmh@aybabtu.com>
3809
3810 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3811 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3812
3813 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3814
3815 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3816 b-tree.
3817
3818 2009-02-27 Robert Millan <rmh@aybabtu.com>
3819
3820 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3821 `0x' qualifier as 0 when base is specified as parameter).
3822
3823 2009-02-24 Bean <bean123ch@gmail.com>
3824
3825 * configure.ac: Check for -mcmodel=large in x86_64 target.
3826
3827 * include/grub/efi/api.h (efi_call_10): New macro.
3828 (efi_wrap_10): New function.
3829
3830 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3831 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3832 (GRUB_PE32_REL_BASED_LOW): Likewise.
3833 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3834 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3835 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3836 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3837 (GRUB_PE32_REL_BASED_REL): Likewise.
3838 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3839 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3840 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3841
3842 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3843 issue.
3844
3845 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3846 (efi_wrap_10): New function.
3847
3848 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3849
3850 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3851 MB/MBP model (NV chipset).
3852 (devdata_devs): Add devpath_5 to the list.
3853
3854 * load/i386/efi/linux.c (video_base): Remove variable.
3855 (RGB_MASK): New macro.
3856 (RGB_MAGIC): Likewise.
3857 (LINE_MIN): Likewise.
3858 (LINE_MAX): Likewise.
3859 (FBTEST_STEP): Likewise.
3860 (FBTEST_COUNT): Likewise.
3861 (fb_list): New variable.
3862 (grub_find_video_card): Remove function.
3863 (find_framebuf): New function.
3864 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3865 line length.
3866
3867 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3868 problem for x86_64.
3869
3870 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3871
3872 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3873
3874 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3875 coding tool name.
3876
3877 2009-02-22 Robert Millan <rmh@aybabtu.com>
3878
3879 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3880 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3881 in our relocation, instead of using it directly from heap. Also
3882 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3883
3884 2009-02-21 Robert Millan <rmh@aybabtu.com>
3885
3886 Implement USB keyboard support (based on patch by Marco Gerards)
3887
3888 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3889 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3890 (usb_keyboard_mod_LDFLAGS): New variables.
3891
3892 * term/usb_keyboard.c: New file.
3893
3894 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3895
3896 Corrected wrong declaration
3897
3898 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3899
3900 2009-02-14 Christian Franke <franke@computer.org>
3901
3902 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3903 (grub_lspci_iter): Print class code and programming interface byte.
3904
3905 2009-02-14 Christian Franke <franke@computer.org>
3906
3907 * gendistlist.sh: Ignore `.svn' directories.
3908
3909 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3910
3911 * fs/fat.c: Add 2009 to Copyright line.
3912
3913 2009-02-14 Christian Franke <franke@computer.org>
3914
3915 * commands/hdparm.c: New file. Provides `hdparm' command
3916 which sends ATA commands via grub_disk_ata_pass_through ().
3917
3918 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3919
3920 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3921 and <grub/cpu/io.h> to include/grub/ata.h.
3922 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3923 (GRUB_CDROM_SECTOR_SIZE): Remove.
3924 (GRUB_ATA_*): Move to include/grub/ata.h.
3925 (GRUB_ATAPI_*): Likewise.
3926 (enum grub_ata_commands): Likewise.
3927 (enum grub_ata_timeout_milliseconds): Likewise.
3928 (struct grub_ata_device): Likewise.
3929 (grub_ata_regset): Likewise.
3930 (grub_ata_regget): Likewise.
3931 (grub_ata_regset2): Likewise.
3932 (grub_ata_regget2): Likewise.
3933 (grub_ata_check_ready): Likewise.
3934 (grub_ata_wait_not_busy): Remove static, exported in
3935 include/grub/ata.h.
3936 (grub_ata_wait_drq): Likewise.
3937 (grub_ata_pio_read): Likewise.
3938
3939 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3940 function for hdparm.mod.
3941
3942 * include/grub/ata.h: New file, contains declarations from
3943 disk/ata.c.
3944 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3945
3946 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3947 (grub_disk_ata_pass_through): New exported variable.
3948
3949 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3950
3951 2009-02-13 Colin D Bennett <colin@gibibit.com>
3952
3953 Support multiple fallback entries, and provide an API to support
3954 executing default+fallback menu entries. Renamed the `terminal' menu
3955 viewer to `text'.
3956
3957 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3958 variable declaration.
3959 (grub_menu_execute_callback): New structure declaration.
3960 (grub_menu_execute_callback_t): New typedef.
3961 (grub_menu_execute_with_fallback): New function declaration.
3962 (grub_menu_get_entry): Likewise.
3963 (grub_menu_get_timeout): Likewise.
3964 (grub_menu_set_timeout): Likewise.
3965
3966 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3967
3968 * normal/menu.c (grub_wait_after_message): Moved to
3969 `normal/menu_text.c'.
3970 (draw_border): Likewise.
3971 (print_message): Likewise.
3972 (print_entry): Likewise.
3973 (print_entries): Likewise.
3974 (grub_menu_init_page): Likewise.
3975 (get_entry_number): Likewise.
3976 (print_timeout): Likewise.
3977 (run_menu): Likewise.
3978 (grub_menu_execute_entry): Likewise.
3979 (show_text_menu): Likewise.
3980 (get_and_remove_first_entry_number): New function.
3981 (grub_menu_execute_with_fallback): Likewise.
3982 (get_entry): Renamed to ...
3983 (grub_menu_get_entry): .. this and made it global.
3984 (get_timeout): Renamed to ...
3985 (grub_menu_get_timeout): ... this and made it global.
3986 (set_timeout): Renamed to ...
3987 (grub_menu_set_timeout): ... this and made it global.
3988 (grub_normal_terminal_menu_viewer): Renamed to ...
3989 (grub_normal_text_menu_viewer): ... this.
3990
3991 * normal/menu_text.c: New file. Extracted text-menu-specific code
3992 from normal/menu.c.
3993
3994 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3995 (normal_mod_SOURCES): Likewise.
3996
3997 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3998 (normal_mod_SOURCES): Likewise.
3999
4000 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4001 (normal_mod_SOURCES): Likewise.
4002
4003 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4004 (normal_mod_SOURCES): Likewise.
4005
4006 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4007 (normal_mod_SOURCES): Likewise.
4008
4009 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4010 (normal_mod_SOURCES): Likewise.
4011
4012 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4013 (normal_mod_SOURCES): Likewise.
4014
4015 2009-02-11 Robert Millan <rmh@aybabtu.com>
4016
4017 * util/grub.d/00_header.in: Update old reference to `font' command.
4018
4019 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4020
4021 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4022
4023 Based on patch from Javier Martín.
4024
4025 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4026
4027 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4028 to avoid false positives with FAT.
4029 (grub_fstest_SOURCES): Likewise.
4030 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4031 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4032 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4033 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4034 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4035 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4036
4037 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4038
4039 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4040 bpb.version_specific.fat12_or_fat16.fstype and
4041 bpb.version_specific.fat32.fstype.
4042
4043 2009-02-08 Robert Millan <rmh@aybabtu.com>
4044
4045 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4046
4047 2009-02-08 Robert Millan <rmh@aybabtu.com>
4048
4049 * Makefile.in (host_os, host_cpu): New variables.
4050 (target_os): Remove. Update all users.
4051
4052 2009-02-08 Marco Gerards <marco@gnu.org>
4053
4054 * Makefile.in (enable_grub_emu_usb): New variable.
4055 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4056 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4057 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4058 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4059 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4060 `usbtest.mod' and `usbms.mod'.
4061 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4062 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4063 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4064 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4065 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4066 variables.
4067
4068 * disk/usbms.c: New file.
4069
4070 * include/grub/usb.h: Likewise.
4071
4072 * include/grub/usbtrans.h: Likewise.
4073
4074 * include/grub/usbdesc.h: Likewise.
4075
4076 * bus/usb/usbtrans.c: Likewise.
4077
4078 * bus/usb/ohci.c: Likewise.
4079
4080 * bus/usb/uhci.c: Likewise.
4081
4082 * bus/usb/usbhub.c: Likewise.
4083
4084 * bus/usb/usb.c: Likewise.
4085
4086 * commands/usbtest.c: Likewise.
4087
4088 * util/usb.c: Likewise.
4089
4090 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4091
4092 * configure.ac: Test for libusb presence.
4093
4094 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4095
4096 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4097
4098 * kern/mm.c: Add more comments.
4099
4100 2009-02-08 Robert Millan <rmh@aybabtu.com>
4101
4102 Patch from Javier Martín.
4103 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4104 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4105
4106 2009-02-08 Robert Millan <rmh@aybabtu.com>
4107
4108 * fs/cpio.c: Split tar functionality to ...
4109 * fs/tar.c: ... here (new file). Update all users.
4110
4111 2009-02-07 Robert Millan <rmh@aybabtu.com>
4112
4113 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4114 backward-incompatible features.
4115
4116 Based on patch from Javier Martín, with some adjustments.
4117
4118 2009-02-07 Michael Scherer <misc@mandriva.org>
4119
4120 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4121
4122 2009-02-07 Robert Millan <rmh@aybabtu.com>
4123
4124 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4125 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4126 after the RAID stuff.
4127
4128 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4129
4130 Fixes problem when running vbetest command as reported by
4131 Vladimir Serbinenko <phcoder@gmail.com>.
4132
4133 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4134
4135 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
4136
4137 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4138 /dev/md/NpN style mdraid devices.
4139
4140 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4141
4142 * util/unifont2pff.rb: Remove.
4143
4144 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4145
4146 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4147 `#'.
4148
4149 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
4150
4151 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4152 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4153 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4154 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4156 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4157 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4158
4159 2009-02-02 Christian Franke <franke@computer.org>
4160
4161 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4162
4163 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
4164
4165 * INSTALL: Note that we now require at least autoconf 2.59 and
4166 that LZO is optional.
4167
4168 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4169
4170 Base on patch on bug #24154 created by Tomas Tintera
4171 <trosos@seznam.cz>.
4172
4173 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4174
4175 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4176
4177 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4178 <bero@arklinux.org>.
4179
4180 * normal/parser.y (script_init): Add missing semicolon.
4181
4182 2009-01-31 Colin D Bennett <colin@gibibit.com>
4183
4184 * normal/main.c: Add include to grub/menu_viewer.h.
4185 (free_menu_entry_classes): Added.
4186 (grub_normal_menu_addentry): Added class property handling.
4187 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4188 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4189
4190 * normal/menu_viewer.c: New file.
4191
4192 * normal/menu.c (run_menu_entry): Renamed to ...
4193 (grub_menu_execute_entry): ... this and made it as global.
4194 (grub_menu_run): Renamed to ...
4195 (show_text_menu): ... this and made it local.
4196 (show_text_menu): Adapt to new function names.
4197 (grub_normal_terminal_menu_viewer): New global variable.
4198
4199 * include/grub/menu.h: New file.
4200
4201 * include/grub/menu_viewer.h: New file.
4202
4203 * include/grub/normal.h: Added include to grub/menu.h.
4204 (grub_menu_entry): Moved to include/grub/menu.h.
4205 (grub_menu_entry_t): Likewise.
4206 (grub_menu): Likewise.
4207 (grub_menu_t): Likewise.
4208 (grub_normal_terminal_menu_viewer): Added.
4209 (grub_menu_execute_entry): Likewise.
4210 (grub_menu_run): Removed.
4211
4212 * DISTLIST: Added include/grub/menu.h.
4213 Added include/grub/menu_viewer.h.
4214 Added normal/menu_viewer.c.
4215
4216 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4217
4218 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4219 arglist for menutitle arguments.
4220
4221 * normal/main.c (grub_normal_menu_addentry): Likewise.
4222
4223 * normal/parser.y (menuentry): Likewise.
4224
4225 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4226
4227 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4228 (grub_script_create_cmdmenu): Likewise.
4229
4230 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4231
4232 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4233 changes.
4234
4235 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4236
4237 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4238
4239 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4240
4241 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4242
4243 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4244
4245 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4246
4247 2009-01-30 Christian Franke <franke@computer.org>
4248
4249 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4250 in option help text.
4251
4252 2009-01-27 Pavel Roskin <proski@gnu.org>
4253
4254 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4255
4256 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4257
4258 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4259
4260 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4261
4262 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4263 unregister function.
4264
4265 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4266
4267 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4268
4269 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4270
4271 * util/grub-mkfont.c (usage): Fix typo.
4272
4273 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4274
4275 2009-01-26 Daniel Mierswa <impulze@impulze.org>
4276
4277 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4278
4279 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4280
4281 * kern/misc.c (grub_strcasecmp): New function.
4282 (grub_strcasecmp): Use grub_size_t instead of int for length.
4283 Fix return value.
4284 * include/grub/misc.h: Update function prototypes.
4285
4286 2009-01-26 Robert Millan <rmh@aybabtu.com>
4287
4288 * configure.ac: Fix cross-compilation check.
4289
4290 2009-01-22 Christian Franke <franke@computer.org>
4291
4292 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4293 (precision) digit string. Allow `.format2' without `format1' (width).
4294 Limit input chars for `%s' output to `format2' if specified. This is
4295 compatible with standard printf ().
4296
4297 2009-01-22 Christian Franke <franke@computer.org>
4298
4299 * disk/ata.c (grub_ata_wait_status): Replace by ...
4300 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4301 other status bits may be invalid while BSY is asserted.
4302 (grub_ata_check_ready): New function.
4303 (grub_ata_cmd): Removed.
4304 (grub_ata_wait_drq): New function.
4305 (grub_ata_strncpy): Remove inline.
4306 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4307 and error check now done by grub_ata_wait_drq ().
4308 (grub_ata_pio_write): Likewise.
4309 (grub_atapi_identify): Set DEV before check for !BSY. Use
4310 grub_ata_wait_drq () to wait for data.
4311 (grub_ata_device_initialize): Add status register check to
4312 detect missing SATA slave devices. Add debug messages.
4313 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4314 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4315 transfer loop by grub_ata_pio_write ().
4316 (grub_ata_identify): Set DEV before check for !BSY. Use
4317 grub_ata_wait_drq () to wait for data.
4318 (grub_ata_setaddress): Set DEV before check for !BSY.
4319 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4320 read/write in one loop. Fix invalid command on write. Fix incomplete
4321 command on (size % batch) == 0. Add missing error check after write of
4322 last block. Add debug messages.
4323 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4324
4325 2009-01-19 Christian Franke <franke@computer.org>
4326
4327 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4328 (GRUB_ATAPI_IREASON_*): Likewise.
4329 (grub_ata_pio_write): Fix timeout error return.
4330 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4331 (grub_atapi_wait_drq): New function.
4332 (grub_atapi_packet): New parameter `size'.
4333 Use grub_atapi_wait_drq () and direct write instead of
4334 grub_ata_pio_write ().
4335 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4336 reads the number of bytes requested by the device for each DRQ
4337 assertion.
4338 (grub_atapi_write): Remove old implementation, return not
4339 implemented instead.
4340
4341 2009-01-19 Christian Franke <franke@computer.org>
4342
4343 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4344 of 512 to calculate data size.
4345 (grub_scsi_read12): Likewise.
4346 (grub_scsi_write10): Likewise.
4347 (grub_scsi_write12): Likewise.
4348 (grub_scsi_read): Adjust size according to blocksize.
4349 Add checks for invalid blocksize and unaligned transfer.
4350
4351 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4352
4353 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4354
4355 * term/gfxterm.c (write_char): Fix background rendering for wide
4356 width glyphs.
4357
4358 2009-01-19 Robert Millan <rmh@aybabtu.com>
4359
4360 * config.guess: Update to latest version from config git.
4361 * config.sub: Likewise.
4362
4363 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4364
4365 * Makefile.in: Change font compilation to use new grub-mkfont instead
4366 of java version.
4367
4368 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4369 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4370 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4371 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4372 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4373 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4374 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4375 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4376 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4377
4378 2009-01-16 Christian Franke <franke@computer.org>
4379
4380 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4381 (enum grub_ata_timeout_milliseconds): New enum.
4382 (grub_ata_wait_status): Add parameter milliseconds.
4383 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4384 recovery from timed-out commands.
4385 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4386 return grub_errno instead of REG_ERROR.
4387 (grub_ata_pio_write): Add parameter milliseconds.
4388 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4389 Pass milliseconds to grub_ata_wait_status () and
4390 grub_ata_pio_read ().
4391 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4392 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4393 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4394 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4395 It is not suitable for device detection, because DEV bit is ignored,
4396 the command may run too long, and not all devices set the signature
4397 properly.
4398 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4399 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4400 Fix device selection, DEV bit must be set first to address the registers
4401 of the correct device.
4402 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4403 grub_ata_pio_read/write ().
4404 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4405 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4406
4407 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4408
4409 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4410
4411 2009-01-13 Bean <bean123ch@gmail.com>
4412
4413 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4414
4415 2009-01-13 Bean <bean123ch@gmail.com>
4416
4417 * Makefile.in: (enable_grub_mkfont): New variable.
4418 (freetype_cflags): Likewise.
4419 (freetype_libs): Likewise.
4420
4421 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4422 (grub_mkfont_SOURCES): New variable.
4423 (grub_mkfont_CFLAGS): Likewise.
4424 (grub_mkfont_LDFLAGS): Likewise.
4425
4426 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4427 library if `--enable-grub-mkfont' is requested.
4428 (enable_grub_mkfont): New variable.
4429 (freetype_cflags): Likewise.
4430 (freetype_libs): Likewise.
4431
4432 * util/grub-mkfont.c: New file.
4433
4434 2009-01-12 Christian Franke <franke@computer.org>
4435
4436 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4437 mode check. Fix setting of compat_use[].
4438
4439 2009-01-10 Robert Millan <rmh@aybabtu.com>
4440
4441 Update a few copyright years which we forgot to do in 2008 (only for
4442 files whose changes made in 2008 were copyright-significant)
4443
4444 * Makefile.in: Add 2008 to Copyright line.
4445 * disk/ieee1275/ofdisk.c: Likewise.
4446 * disk/efi/efidisk.c: Likewise.
4447 * kern/dl.c: Likewise.
4448 * kern/sparc64/ieee1275/init.c: Likewise.
4449 * kern/mm.c: Likewise.
4450 * kern/efi/mm.c: Likewise.
4451 * boot/i386/pc/boot.S: Likewise.
4452 * genfslist.sh: Likewise.
4453 * fs/iso9660.c: Likewise.
4454 * fs/hfs.c: Likewise.
4455 * fs/jfs.c: Likewise.
4456 * fs/minix.c: Likewise.
4457 * fs/ufs.c: Likewise.
4458 * gensymlist.sh.in: Likewise.
4459 * genkernsyms.sh.in: Likewise.
4460 * include/grub/misc.h: Likewise.
4461 * include/grub/types.h: Likewise.
4462 * include/grub/symbol.h: Likewise.
4463 * include/grub/elf.h: Likewise.
4464 * include/grub/kernel.h: Likewise.
4465 * include/grub/disk.h: Likewise.
4466 * include/grub/dl.h: Likewise.
4467 * include/grub/i386/linux.h: Likewise.
4468 * include/grub/i386/pc/biosdisk.h: Likewise.
4469 * include/grub/efi/api.h: Likewise.
4470 * include/grub/efi/pe32.h: Likewise.
4471 * include/grub/util/misc.h: Likewise.
4472 * normal/execute.c: Likewise.
4473 * normal/arg.c: Likewise.
4474 * normal/completion.c: Likewise.
4475 * normal/lexer.c: Likewise.
4476 * normal/parser.y: Likewise.
4477 * normal/misc.c: Likewise.
4478 * commands/i386/pc/vbeinfo.c: Likewise.
4479 * commands/hexdump.c: Likewise.
4480 * commands/terminal.c: Likewise.
4481 * commands/ls.c: Likewise.
4482 * commands/help.c: Likewise.
4483 * partmap/pc.c: Likewise.
4484 * loader/efi/chainloader.c: Likewise.
4485 * loader/multiboot_loader.c: Likewise.
4486 * loader/i386/pc/multiboot2.c: Likewise.
4487 * term/efi/console.c: Likewise.
4488 * term/i386/pc/serial.c: Likewise.
4489 * util/lvm.c: Likewise.
4490 * util/console.c: Likewise.
4491 * util/i386/efi/grub-mkimage.c: Likewise.
4492 * util/raid.c: Likewise.
4493
4494 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4495
4496 * commands/videotest.c: Removed include to grub/machine/memory.h.
4497
4498 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4499 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4500 (video_mod_SOURCES): Removed.
4501 (video_mod_CFLAGS): Likewise.
4502 (video_mod_LDFLAGS): Likewise.
4503 (gfxterm_mod_SOURCES): Likewise.
4504 (gfxterm_mod_CFLAGS): Likewise.
4505 (gfxterm_mod_LDFLAGS): Likewise.
4506 (videotest_mod_SOURCES): Likewise.
4507 (videotest_mod_CFLAGS): Likewise.
4508 (videotest_mod_LDFLAGS): Likewise.
4509 (bitmap_mod_SOURCES): Likewise.
4510 (bitmap_mod_CFLAGS): Likewise.
4511 (bitmap_mod_LDFLAGS): Likewise.
4512 (tga_mod_SOURCES): Likewise.
4513 (tga_mod_CFLAGS): Likewise.
4514 (tga_mod_LDFLAGS): Likewise.
4515 (jpeg_mod_SOURCES): Likewise.
4516 (jpeg_mod_CFLAGS): Likewise.
4517 (jpeg_mod_LDFLAGS): Likewise.
4518 (png_mod_SOURCES): Likewise.
4519 (png_mod_CFLAGS): Likewise.
4520 (png_mod_LDFLAGS): Likewise.
4521
4522 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4523 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4524 (video_mod_SOURCES): Added.
4525 (video_mod_CFLAGS): Likewise.
4526 (video_mod_LDFLAGS): Likewise.
4527 (videotest_mod_SOURCES): Likewise.
4528 (videotest_mod_CFLAGS): Likewise.
4529 (videotest_mod_LDFLAGS): Likewise.
4530 (bitmap_mod_SOURCES): Likewise.
4531 (bitmap_mod_CFLAGS): Likewise.
4532 (bitmap_mod_LDFLAGS): Likewise.
4533 (tga_mod_SOURCES): Likewise.
4534 (tga_mod_CFLAGS): Likewise.
4535 (tga_mod_LDFLAGS): Likewise.
4536 (jpeg_mod_SOURCES): Likewise.
4537 (jpeg_mod_CFLAGS): Likewise.
4538 (jpeg_mod_LDFLAGS): Likewise.
4539 (png_mod_SOURCES): Likewise.
4540 (png_mod_CFLAGS): Likewise.
4541 (png_mod_LDFLAGS): Likewise.
4542 (gfxterm_mod_SOURCES): Likewise.
4543 (gfxterm_mod_CFLAGS): Likewise.
4544 (gfxterm_mod_LDFLAGS): Likewise.
4545
4546 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4547 grub/machine/console.h.
4548
4549 2009-01-04 Jerone Young <jerone@gmail.com>
4550
4551 Make on screen instructions clearer
4552
4553 Based on patch created by Jidanni <jidanni@jidanni.org>
4554
4555 * normal/menu.c: print clearer instructions on the screen
4556
4557 2009-01-02 Colin D Bennett <colin@gibibit.com>
4558
4559 New font engine.
4560
4561 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4562 build system and fixed gfxterm.c to work with different sized fonts.
4563
4564 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4565
4566 * configure: Re-generated.
4567
4568 * DISTLIST: Removed font/manager.c.
4569 Added font/font.c.
4570 Added font/font_cmd.c.
4571
4572 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4573 compilation.
4574
4575 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4576
4577 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4578
4579 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4580
4581 * normal/menu.c: Likewise.
4582
4583 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4584 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4585
4586 * include/grub/font.h: Replaced with new file.
4587
4588 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4589 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4590 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4591 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4592 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4593 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4594 fg_red, fg_green, fg_blue, fg_alpha.
4595 (grub_video_adapter): Removed blit_glyph.
4596 (grub_video_blit_glyph): Removed.
4597
4598 * font/manager.c: Removed file.
4599
4600 * font/font.c: New file.
4601
4602 * font/font_cmd.c: Likewise.
4603
4604 * video/video.c (grub_video_blit_glyph): Removed.
4605
4606 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4607 (grub_video_vbe_map_rgba): Likewise.
4608 (grub_video_vbe_unmap_color_int): Likewise.
4609 (grub_video_vbe_blit_glyph): Removed.
4610 (grub_video_vbe_adapter): Removed blit_glyph.
4611
4612 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4613 (get_pixel): Likewise.
4614 (set_pixel): Likewise.
4615
4616 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4617
4618 * term/gfxterm.c: Adapted to new font engine.
4619
4620 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4621
4622 * term/i386/pc/vga.c: Likewise.
4623
4624 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4625
4626 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4627
4628 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4629
4630 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4631
4632 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4633
4634 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4635
4636 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4637
4638 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4639
4640 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4641
4642 * util/grub.d/00_header.in: Changed to use new loadfont command.
4643
4644 * util/grub-mkconfig_lib.in: Changed font extension.
4645
4646 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4647
4648 * util/getroot.c (grub_util_get_grub_dev): Add support for
4649 /dev/md/dNNpNN style partitionable mdraid devices.
4650
4651 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4652
4653 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4654 at a time limit of the PXE TFTP API correctly.
4655 (grub_pxefs_close): Likewise.
4656
4657 2008-11-29 Robert Millan <rmh@aybabtu.com>
4658
4659 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4660 grub_ata_device_initialize() calls.
4661
4662 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4663
4664 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4665 iteration failed.
4666 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4667
4668 2008-11-28 Robert Millan <rmh@aybabtu.com>
4669
4670 Fix build on powerpc-ieee1275. Based on patch created by
4671 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4672 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4673 `kern/ieee1275/mmap.c'.
4674 * include/grub/powerpc/ieee1275/memory.h: New file.
4675
4676 Provide grub-install on coreboot.
4677 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4678 (grub_install_SOURCES): New variable.
4679 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4680 usable on coreboot.
4681
4682 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4683
4684 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4685 to `grub_term_input_t'.
4686 (grub_term_get_current_output): Change return type to
4687 `grub_term_output_t'.
4688
4689 2008-11-22 Robert Millan <rmh@aybabtu.com>
4690
4691 Fix breakage on coreboot due to declaration mismatch.
4692 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4693 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4694 grub_vga_text_cls().
4695
4696 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4697 comments. Avoid copying one more byte than necessary (just in case).
4698
4699 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4700 to 0x200000 (avoids trouble with some OFW implementations, and matches
4701 with the one in Yaboot).
4702 Reported by Manoel Abranches
4703
4704 2008-11-20 Robert Millan <rmh@aybabtu.com>
4705
4706 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4707 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4708
4709 * util/grub-mkconfig_lib.in (grub_warn): New function.
4710 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4711 warnings, to obtain consistent formatting.
4712 * util/grub.d/00_header.in: Likewise.
4713 * util/update-grub_lib.in: Likewise.
4714
4715 * loader/i386/linux.c (allocate_pages): Fix a warning.
4716 Move comment text to `#error' stanza.
4717
4718 Harmonize ieee1275's grub_available_iterate() with the generic
4719 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4720 build problem on i386-ieee1275):
4721 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4722 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4723 parameter `type'. Update all users of this function.
4724 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4725 `kern/ieee1275/mmap.c'.
4726 * kern/ieee1275/init.c
4727 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4728 with ...
4729 (grub_machine_mmap_iterate): ... this.
4730 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4731 return type to `grub_err_t'. Update all implementations of this
4732 function prototype.
4733 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4734 Likewise.
4735
4736 Add `lsmmap' command (lists firmware-provided memory map):
4737 * commands/lsmmap.c: New file.
4738 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4739 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4740 variables.
4741 * conf/powerpc-ieee1275.rmk: Likewise.
4742 * conf/i386-coreboot.rmk: Likewise.
4743 * conf/i386-ieee1275.rmk: Likewise.
4744
4745 2008-11-19 Robert Millan <rmh@aybabtu.com>
4746
4747 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4748 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4749 constraints to initrd allocation (based on code from
4750 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4751 for Linux to find it.
4752
4753 2008-11-14 Robert Millan <rmh@aybabtu.com>
4754
4755 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4756 order to cope with duplicate slashes.
4757
4758 2008-11-14 Robert Millan <rmh@aybabtu.com>
4759
4760 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4761 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4762 don't want to mess with lower memory, because it is used in the Linux
4763 loader.
4764
4765 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4766 an appropriate place in lower memory, between 0x10000 and 0x90000,
4767 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4768 is in our heap (probably as a result of it being corrupted during
4769 decompression). Add #error instance with comment to explain why this
4770 loader isn't currently usable on PC/BIOS.
4771
4772 2008-11-14 Robert Millan <rmh@aybabtu.com>
4773
4774 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4775 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4776
4777 2008-11-12 Robert Millan <rmh@aybabtu.com>
4778
4779 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4780
4781 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4782 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4783 from here ...
4784 * include/grub/i386/pc/memory.h: ... to here.
4785
4786 2008-11-12 Robert Millan <rmh@aybabtu.com>
4787
4788 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4789 split).
4790
4791 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4792 (grub_console_cur_color, grub_console_real_putchar)
4793 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4794 (grub_console_setcolorstate, grub_console_setcolor)
4795 (grub_console_getcolor): Move from here ...
4796 * include/grub/i386/vga_common.h: ... to here (new file).
4797
4798 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4799 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4800 `<grub/i386/io.h>'.
4801 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4802 `<grub/i386/vga_common.h>'.
4803
4804 2008-11-12 Robert Millan <rmh@aybabtu.com>
4805
4806 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4807 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4808 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4809 variables.
4810 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4811 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4812
4813 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4814 grub_console_init() with call to grub_vga_text_init().
4815 (grub_machine_fini): Replace call to
4816 grub_console_fini() with call to grub_vga_text_fini() and
4817 grub_at_keyboard_fini().
4818
4819 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4820 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4821 (grub_console_setcolorstate, grub_console_setcolor)
4822 (grub_console_getcolor): New function prototypes.
4823
4824 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4825 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4826 (grub_vga_text_setcursor): Static-ize.
4827 (grub_vga_text_term): New structure.
4828 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4829
4830 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4831 (grub_console_cur_color, grub_console_standard_color)
4832 (grub_console_normal_color, grub_console_highlight_color)
4833 (map_char, grub_console_putchar, grub_console_getcharwidth)
4834 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4835 (grub_console_getcolor): Move from here ...
4836 * term/i386/vga_common.c: ... to here (same function names).
4837
4838 2008-11-12 Robert Millan <rmh@aybabtu.com>
4839
4840 Use newly-added Multiboot support in coreboot.
4841
4842 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4843 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4844
4845 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4846 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4847 (codestart): Store the MBI in `startup_multiboot_info' when we're
4848 being loaded using Multiboot.
4849
4850 * kern/i386/coreboot/init.c (grub_machine_init): Move
4851 grub_at_keyboard_init() call to beginning of function (useful for
4852 debugging). Call grub_machine_mmap_init() before attempting to use
4853 grub_machine_mmap_iterate().
4854 (grub_lower_mem, grub_upper_mem): Move from here ...
4855 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4856 here (new file).
4857
4858 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4859 function prototype.
4860
4861 2008-11-12 Robert Millan <rmh@aybabtu.com>
4862
4863 Fix a regression introduced by the at_keyboard.mod split. Because
4864 some terminals are default on some platforms and non-default on
4865 others, the first terminal being registered determines which is
4866 going to be default.
4867
4868 * kern/term.c (grub_term_register_input): If this is the first
4869 terminal being registered, set it as the current one.
4870 (grub_term_register_output): Likewise.
4871
4872 * term/efi/console.c (grub_console_init): Do not call
4873 grub_term_set_current_output() or grub_term_set_current_input().
4874 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4875 * term/i386/pc/console.c (grub_console_init): Likewise.
4876 (grub_console_fini): Do not call grub_term_set_current_input()
4877 (but leave grub_term_set_current_output() to restore text mode).
4878
4879 2008-11-10 Robert Millan <rmh@aybabtu.com>
4880
4881 * util/grub.d/00_header.in: Add backward compatibility check for
4882 versions of terminal.mod that don't understand `terminal_input' or
4883 `terminal_output'.
4884
4885 2008-11-09 Robert Millan <rmh@aybabtu.com>
4886
4887 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4888 `terminal_input' / `terminal_output', not `terminal'.
4889
4890 2008-11-08 Robert Millan <rmh@aybabtu.com>
4891
4892 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4893 (DISTCLEANFILES): Add `build_env.mk'.
4894
4895 2008-11-08 Robert Millan <rmh@aybabtu.com>
4896
4897 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4898 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4899 members. Update all users.
4900 * util/console.c (grub_ncurses_term): Split in ...
4901 (grub_ncurses_term_input): ... this, and ...
4902 (grub_ncurses_term_output): ... this. Update all users.
4903 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4904
4905 2008-11-08 Robert Millan <rmh@aybabtu.com>
4906
4907 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4908 (PKGDATA): Add $(pkgdata_SRCDIR).
4909 (pkglib_BUILDDIR): New variable.
4910 (pkgdata_SRCDIR): New variable.
4911 (build_env.mk): New target.
4912 (include_DATA): New variable.
4913 (install-local): Install $(include_DATA) files in $(includedir).
4914
4915 2008-11-07 Pavel Roskin <proski@gnu.org>
4916
4917 * gendistlist.sh: Use C locale for sorting to ensure consistent
4918 output on all systems.
4919
4920 * util/grub.d/00_header.in: Remove incorrect space before
4921 "serial".
4922
4923 2008-11-07 Robert Millan <rmh@aybabtu.com>
4924
4925 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4926 per specification.
4927 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4928 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4929 (based on find_multi_boot1_header).
4930 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4931 using find_multi_boot2_header(), and abort if neither Multiboot or
4932 Multiboot headers were found.
4933
4934 2008-11-07 Robert Millan <rmh@aybabtu.com>
4935
4936 Modularize at_keyboard.mod:
4937
4938 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4939 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4940 (at_keyboard_mod_LDFLAGS): New variables.
4941
4942 Actual terminal split:
4943
4944 * include/grub/term.h (struct grub_term): Split in ...
4945 (struct grub_term_input): ... this, and ...
4946 (struct grub_term_output): ... this. Update all users.
4947 (grub_term_set_current): Split in ...
4948 (grub_term_set_current_input): ... this, and ...
4949 (grub_term_set_current_output): ... this.
4950 (grub_term_get_current): Split in ...
4951 (grub_term_get_current_input): ... this, and ...
4952 (grub_term_get_current_output): ... this.
4953 (grub_term_register): Split in ...
4954 (grub_term_register_input): ... this, and ...
4955 (grub_term_register_output): ... this.
4956 (grub_term_unregister): Split in ...
4957 (grub_term_unregister_input): ... this, and ...
4958 (grub_term_unregister_output): ... this.
4959 (grub_term_iterate): Split in ...
4960 (grub_term_iterate_input): ... this, and ...
4961 (grub_term_iterate_output): ... this.
4962
4963 * kern/term.c (grub_term_list): Split in ...
4964 (grub_term_list_input): ... this, and ...
4965 (grub_term_list_output): ... this. Update all users.
4966 (grub_cur_term): Split in ...
4967 (grub_cur_term_input): ... this, and ...
4968 (grub_cur_term_output): ... this. Update all users.
4969 (grub_term_set_current): Split in ...
4970 (grub_term_set_current_input): ... this, and ...
4971 (grub_term_set_current_output): ... this.
4972 (grub_term_get_current): Split in ...
4973 (grub_term_get_current_input): ... this, and ...
4974 (grub_term_get_current_output): ... this.
4975 (grub_term_register): Split in ...
4976 (grub_term_register_input): ... this, and ...
4977 (grub_term_register_output): ... this.
4978 (grub_term_unregister): Split in ...
4979 (grub_term_unregister_input): ... this, and ...
4980 (grub_term_unregister_output): ... this.
4981 (grub_term_iterate): Split in ...
4982 (grub_term_iterate_input): ... this, and ...
4983 (grub_term_iterate_output): ... this.
4984
4985 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4986 a check for input and one for output (and only attempt to get keys
4987 from user when input works).
4988
4989 * util/grub-probe.c (grub_term_get_current): Split in ...
4990 (grub_term_get_current_input): ... this, and ...
4991 (grub_term_get_current_output): ... this.
4992 * util/grub-fstest.c: Likewise.
4993 * util/i386/pc/grub-setup.c: Likewise.
4994 * util/grub-editenv.c: Likewise.
4995
4996 Portability adjustments:
4997
4998 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4999 `term/i386/pc/at_keyboard.c'.
5000 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5001 grub_keyboard_controller_init() (now handled by terminal .init).
5002 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5003 grub_at_keyboard_init().
5004 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5005 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5006 at_keyboard.mod via input terminal interface).
5007 * include/grub/i386/coreboot/console.h: Convert into a stub for
5008 `<grub/i386/pc/console.h>'.
5009
5010 Migrate full terminals to new API:
5011
5012 * term/efi/console.c (grub_console_term): Split into ...
5013 (grub_console_term_input): ... this, and ...
5014 (grub_console_term_output): ... this. Update all users.
5015 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5016 (grub_ofconsole_init): Split into ...
5017 (grub_ofconsole_init_input): ... this, and ...
5018 (grub_ofconsole_init_output): ... this.
5019 (grub_ofconsole_term): Split into ...
5020 (grub_ofconsole_term_input): ... this, and ...
5021 (grub_ofconsole_term_output): ... this. Update all users.
5022 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5023 (grub_serial_term_input): ... this, and ...
5024 (grub_serial_term_output): ... this. Update all users.
5025 * term/i386/pc/console.c (grub_console_term): Split into ...
5026 (grub_console_term_input): ... this, and ...
5027 (grub_console_term_output): ... this. Update all users.
5028 (grub_console_term_input): Only enable it on PC/BIOS platform.
5029 (grub_console_init): Remove grub_keyboard_controller_init() call.
5030
5031 Migrate input terminals to new API:
5032
5033 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5034 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5035 i386-specific anyway).
5036 (grub_console_checkkey): Rename to ...
5037 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5038 users.
5039 (grub_keyboard_controller_orig): New variable.
5040 (grub_console_getkey): Rename to ...
5041 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5042 users.
5043 (grub_keyboard_controller_init): Static-ize. Save original
5044 controller value so that it can be restored ...
5045 (grub_keyboard_controller_fini): ... here (new function).
5046 (grub_at_keyboard_term): New structure.
5047 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5048 functions.
5049
5050 Migrate output terminals to new API:
5051
5052 * term/i386/pc/vga.c (grub_vga_term): Change type to
5053 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5054 members. Update all users.
5055 * term/gfxterm.c (grub_video_term): Change type to
5056 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5057 members. Update all users.
5058 * include/grub/i386/pc/console.h (grub_console_checkkey)
5059 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5060 etc).
5061
5062 Migrate `terminal' command and userland tools to new API:
5063
5064 * commands/terminal.c (grub_cmd_terminal): Split into ...
5065 (grub_cmd_terminal_input): ... this, and ...
5066 (grub_cmd_terminal_output): ... this.
5067 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5068 `terminal_input' and `terminal_output'.
5069 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5070 `terminal_input' / `terminal_output' API.
5071 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5072 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5073 provided ${GRUB_TERMINAL}, convert it).
5074
5075 2008-11-04 Robert Millan <rmh@aybabtu.com>
5076
5077 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5078 for FreeBSD.
5079 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5080
5081 2008-11-03 Bean <bean123ch@gmail.com>
5082
5083 * kern/elf.c (grub_elf32_load): Revert to previous code.
5084 (grub_elf64_load): Likewise.
5085
5086 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5087
5088 2008-11-01 Robert Millan <rmh@aybabtu.com>
5089
5090 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5091 (TARGET_CPPFLAGS): Likewise.
5092 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5093
5094 2008-11-01 Carles Pina i Estany <carles@pina.cat>
5095
5096 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5097
5098 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5099
5100 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5101 addition of objects until the code is not going to be able to fail.
5102
5103 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
5104
5105 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5106 (add a missing NULL check, and correct them by moving the pointer
5107 operations after the actual check).
5108
5109 2008-10-29 Robert Millan <rmh@aybabtu.com>
5110
5111 * util/i386/pc/grub-install.in: Handle empty string as output from
5112 make_system_path_relative_to_its_root().
5113
5114 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5115
5116 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5117 circular metadata worst case scenario. If the metadata is circular
5118 then copy the wrap in place.
5119 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5120 project lib/format_text/layout.h
5121 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5122
5123 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5124
5125 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5126
5127 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
5128
5129 * util/update-grub_lib.in: Mention filename in warning message.
5130
5131 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5132
5133 * NEWS: Update for rename of update-grub to grub-mkconfig.
5134
5135 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
5136
5137 * util/update-grub_lib.in: Copy to ...
5138 * util/grub-mkconfig_lib.in: ... this. Update all users.
5139 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5140 * util/update-grub.in: Rename to ...
5141 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5142 option. Add `--output' option to allow users to specify the generated
5143 configuration file. Default to stdout.
5144 (update_grub_dir): Rename to ...
5145 (grub_mkconfig_dir): ... this.
5146 (grub_cfg): Default to an empty string.
5147 * conf/common.rmk (update-grub): Rename to ...
5148 (grub-mkconfig): ... this.
5149 (update-grub_lib): Copy to ...
5150 (grub-mkconfig_lib): ... this.
5151 (update-grub_SCRIPTS): Copy to ...
5152 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5153 (update-grub_DATA): Rename to ...
5154 (grub-mkconfig_DATA): ... this.
5155
5156 2008-09-28 Robert Millan <rmh@aybabtu.com>
5157
5158 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5159 to `modified'. Add the real `created' field.
5160 (grub_iso9660_uuid): Use `modified' rather than `created' for
5161 constructing the UUID.
5162
5163 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
5164
5165 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5166 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5167
5168 2008-09-28 Bean <bean123ch@gmail.com>
5169
5170 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5171 Thanks to Christian Franke for finding this bug.
5172
5173 2008-09-25 Robert Millan <rmh@aybabtu.com>
5174
5175 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5176 instances of grub_util_get_disk_name() (see previous commit).
5177
5178 2008-09-25 Robert Millan <rmh@aybabtu.com>
5179
5180 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5181 `util/i386/get_disk_name.c'.
5182 * conf/i386-efi.rmk: Likewise.
5183 * conf/x86_64-efi.rmk: Likewise.
5184 * conf/i386-coreboot.rmk: Likewise.
5185 * conf/i386-ieee1275.rmk: Likewise.
5186 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5187 `util/ieee1275/get_disk_name.c'.
5188 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5189 * util/ieee1275/get_disk_name.c: Remove file.
5190 * util/i386/get_disk_name.c: Remove file.
5191 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5192 "hd%d" for device.map entries, rather than using
5193 grub_util_get_disk_name().
5194
5195 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5196
5197 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5198 warning.
5199 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5200
5201 2008-09-24 Carles Pina i Estany <carles@pina.cat>
5202
5203 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5204 Changed to 0x5100.
5205 (GRUB_TERM_PPAGE): Changed to 0x4900.
5206
5207 2008-09-24 Robert Millan <rmh@aybabtu.com>
5208
5209 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5210 macros (they were i386-pc specific).
5211 * include/grub/sparc64/ieee1275/console.h: Likewise.
5212 * include/grub/efi/console.h: Likewise.
5213
5214 2008-09-22 Bean <bean123ch@gmail.com>
5215
5216 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5217 resident and in attribute list.
5218
5219 * include/grub/ntfs.h (BMP_LEN): Removed.
5220
5221 2008-09-22 Bean <bean123ch@gmail.com>
5222
5223 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5224 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5225
5226 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5227 error occurs, as grub_disk_open will call grub_disk_close, which will
5228 call p->close (scsi).
5229
5230 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5231
5232 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5233 (AC_PREREQ): Bumped to 2.59.
5234 (AC_TRY_COMPILE): Replace obsolete macro with ...
5235 (AC_COMPILE_IFELSE): ... this.
5236 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5237 (AC_LINK_IFELSE): ... this.
5238
5239 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
5240
5241 * autogen.sh: Add a call to `gendistlist.sh'.
5242
5243 2008-09-19 Christian Franke <franke@computer.org>
5244
5245 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5246 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5247 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5248 Export __enable_execute_stack() to modules.
5249 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5250 New function.
5251
5252 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5253
5254 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5255 Sort the list.
5256
5257 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
5258
5259 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5260 #include <grub/util/hostdisk.h>.
5261
5262 2008-09-08 Robert Millan <rmh@aybabtu.com>
5263
5264 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5265 segments when their filesz is zero (grub_file_read() interprets
5266 zero-size as "read until EOF", which results in memory corruption).
5267 Use `lowest_segment' rather than 0 for calculating the current
5268 segment load address.
5269
5270 2008-09-08 Robert Millan <rmh@aybabtu.com>
5271
5272 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5273 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5274 clobbered useful information.
5275
5276 2008-09-08 Robert Millan <rmh@aybabtu.com>
5277
5278 * include/grub/util/biosdisk.h: Move to ...
5279 * include/grub/util/hostdisk.h: ... here. Update all users.
5280 * util/biosdisk.c: Move to ...
5281 * util/hostdisk.c: ... here. Update all users.
5282
5283 2008-09-07 Robert Millan <rmh@aybabtu.com>
5284
5285 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5286 variables.
5287 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5288 and length can be stored directly in the `mbi->mmap_addr' and
5289 `mbi->mmap_length' struct fields.
5290
5291 2008-09-07 Robert Millan <rmh@aybabtu.com>
5292
5293 * conf/i386.rmk: New file. Provides declaration for building
5294 `cpuid.mod'.
5295 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5296 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5297 variables.
5298 Include `conf/i386.mk'.
5299 * conf/i386-efi.rmk: Likewise.
5300 * conf/x86_64-efi.rmk: Likewise.
5301 * conf/i386-coreboot.rmk: Likewise.
5302 * conf/i386-ieee1275.rmk: Likewise.
5303
5304 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5305
5306 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5307 Adds optimization support for BGR based modes.
5308
5309 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5310 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5311 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5312 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5313 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5314 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5315 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5316 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5317 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5318 (grub_video_i386_vbeblit_index_index): Likewise.
5319 (grub_video_i386_vbeblit_replace_directN): Added.
5320 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5321 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5322 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5323 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5324 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5325 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5326 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5327 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5328 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5329 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5330 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5331 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5332 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5333
5334 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5335 (grub_video_i386_vbefill_R8G8B8): Likewise.
5336 (grub_video_i386_vbefill_index): Likewise.
5337 (grub_video_i386_vbefill_direct32): Added.
5338 (grub_video_i386_vbefill_direct24): Likewise.
5339 (grub_video_i386_vbefill_direct16): Likewise.
5340 (grub_video_i386_vbefill_direct8): Likewise.
5341
5342 * include/grub/video.h (grub_video_blit_format): Removed
5343 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5344 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5345 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5346 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5347 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5348
5349 * video/video.c (grub_video_get_blit_format): Updated to use new
5350 blit formats. Added handling for 16 bit color modes.
5351
5352 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5353 fillers.
5354 (common_blitter): Updated to use new blitters.
5355
5356 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5357 Removed.
5358 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5359 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5360 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5361 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5362 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5363 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5364 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5365 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5366 (grub_video_i386_vbeblit_index_index): Likewise.
5367 (grub_video_i386_vbeblit_replace_directN): Added.
5368 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5369 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5370 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5371 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5372 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5373 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5374 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5375 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5376 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5377 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5378 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5379 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5380 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5381
5382 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5383 (grub_video_i386_vbefill_R8G8B8): Likewise.
5384 (grub_video_i386_vbefill_index): Likewise.
5385 (grub_video_i386_vbefill_direct32): Added.
5386 (grub_video_i386_vbefill_direct24): Likewise.
5387 (grub_video_i386_vbefill_direct16): Likewise.
5388 (grub_video_i386_vbefill_direct8): Likewise.
5389
5390 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5391 types.
5392
5393 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5394 types.
5395
5396 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5397 blitter types.
5398
5399 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5400 types.
5401
5402 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5403
5404 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5405 RAID level 1.
5406
5407 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5408
5409 * fs/iso9660.c (grub_iso9660_date): New structure.
5410 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5411 (grub_iso9660_uuid): New function.
5412
5413 2008-09-05 Bean <bean123ch@gmail.com>
5414
5415 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5416
5417 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5418 insensitive bit for names in Win32 and Win32 & DOS namespace.
5419
5420 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5421
5422 * include/grub/types.h (LONG_MAX): Likewise.
5423
5424 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5425
5426 * util/getroot.c: Include <config.h>.
5427 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5428 add support for /dev/md/N devices and handle LVM double dash escaping.
5429
5430 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5431
5432 * config.guess: Update to latest version from config git.
5433 * config.sub: Likewise.
5434
5435 2008-09-03 Robert Millan <rmh@aybabtu.com>
5436
5437 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5438 `disk->total_sectors'.
5439
5440 2008-09-01 Colin D Bennett <colin@gibibit.com>
5441
5442 * include/grub/normal.h: Fixed incorrect comment for
5443 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5444
5445 2008-09-01 Colin D Bennett <colin@gibibit.com>
5446
5447 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5448 values with defines.
5449
5450 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5451 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5452 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5453 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5454 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5455 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5456 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5457 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5458 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5459 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5460 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5461 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5462 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5463 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5464 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5465 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5466 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5467 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5468 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5469
5470 2008-08-31 Robert Millan <rmh@aybabtu.com>
5471
5472 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5473 declaration.
5474 (grub_multiboot): Fix a few warnings.
5475
5476 2008-08-31 Robert Millan <rmh@aybabtu.com>
5477
5478 * loader/i386/pc/multiboot.c: Update comment not to say that
5479 boot_device support is unimplemented.
5480
5481 2008-08-31 Robert Millan <rmh@aybabtu.com>
5482
5483 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5484 or memory map support are unimplemented.
5485
5486 2008-08-31 Colin D Bennett <colin@gibibit.com>
5487
5488 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5489
5490 2008-08-31 Colin D Bennett <colin@gibibit.com>
5491
5492 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5493 total video memory in 'vbeinfo' output; show color format details for
5494 each video mode.
5495
5496 2008-08-30 Pavel Roskin <proski@gnu.org>
5497
5498 * util/genmoddep.c: Remove for real this time.
5499 * DISTLIST: Remove util/genmoddep.c.
5500
5501 2008-08-30 Robert Millan <rmh@aybabtu.com>
5502
5503 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5504 as required by Multiboot spec (it was already 4-byte aligned, but
5505 only by chance).
5506
5507 2008-08-29 Pavel Roskin <proski@gnu.org>
5508
5509 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5510 * kern/powerpc/ieee1275/startup.S: ... this.
5511 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5512 * DISTLIST: Likewise.
5513
5514 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5515 grub/cpu/kernel.h. Add start label for consistency with other
5516 platforms. Add grub_prefix immediately after start. Add jump
5517 to the code after grub_prefix.
5518 * include/grub/powerpc/kernel.h: Provide valid values for
5519 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5520
5521 2008-08-29 Bean <bean123ch@gmail.com>
5522
5523 * configure.ac: Change host_os to cygwin for mingw.
5524 (asprintf): New check for function.
5525
5526 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5527 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5528
5529 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5530 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5531 sync, sleep and grub_util_get_disk_size for mingw.
5532
5533 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5534 to get size in mingw.
5535 (open_device): Use flag O_BINARY if it's defined.
5536 (find_root_device): Add dummy code for mingw.
5537
5538 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5539 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5540 (get_scsi_disk_name): Return 0 for mingw.
5541
5542 * util/hostfs.c: #include <grub/util/misc.h>.
5543 (grub_hostfs_open): Use "rb" flag to open file, use
5544 grub_util_get_disk_size to get disk size for mingw.
5545
5546 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5547 (asprintf): New function if HAVE_ASPRINTF is not set.
5548 (sync): New function for mingw.
5549 (sleep): Likewise.
5550 (grub_util_get_disk_size): Likewise.
5551
5552 2008-08-28 Pavel Roskin <proski@gnu.org>
5553
5554 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5555 kern/time.c.
5556
5557 2008-08-28 Robert Millan <rmh@aybabtu.com>
5558
5559 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5560
5561 2008-08-28 Robert Millan <rmh@aybabtu.com>
5562
5563 Change find_grub_drive() syntax so it doesn't prevent it from
5564 detecting NULL names as errors.
5565
5566 * util/biosdisk.c (find_grub_drive): Move free slot search code
5567 from here ...
5568 (find_free_slot): ... to here.
5569 (read_device_map): Use find_free_slot() to search for free slots.
5570
5571 2008-08-27 Marco Gerards <marco@gnu.org>
5572
5573 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5574 (scsi_mod_SOURCES): New variable.
5575 (scsi_mod_CFLAGS): Likewise
5576 (scsi_mod_LDFLAGS): Likewise.
5577
5578 * disk/scsi.c: New file.
5579
5580 * include/grub/scsi.h: Likewise.
5581
5582 * include/grub/scsicmd.h: Likewise.
5583
5584 * disk/ata.c: Include <grub/scsi.h>.
5585 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5586 instead.
5587 (grub_ata_iterate): Skip ATAPI devices.
5588 (grub_ata_open): Only handle ATAPI devices.
5589 (struct grub_atapi_read): Removed.
5590 (grub_atapi_readsector): Likewise.
5591 (grub_ata_read): No longer handle ATAPI devices.
5592 (grub_ata_write): Likewise.
5593 (grub_atapi_iterate): New function.
5594 (grub_atapi_read): Likewise.
5595 (grub_atapi_write): Likewise.
5596 (grub_atapi_open): Likewise.
5597 (grub_atapi_close): Likewise.
5598 (grub_atapi_dev): New variable.
5599 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5600 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5601
5602 * include/grub/disk.h (enum grub_disk_dev_id): Add
5603 `GRUB_DISK_DEVICE_SCSI_ID'.
5604
5605 2008-08-26 Robert Millan <rmh@aybabtu.com>
5606
5607 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5608 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5609 descriptive.
5610
5611 2008-08-23 Bean <bean123ch@gmail.com>
5612
5613 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5614 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5615 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5616 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5617 dm_nv.mod.
5618 (raid5rec_mod_SOURCES): New macro.
5619 (raid5rec_mod_CFLAGS): Likewise.
5620 (raid5rec_mod_LDFLAGS): Likewise.
5621 (raid6rec_mod_SOURCES): Likewise.
5622 (raid6rec_mod_CFLAGS): Likewise.
5623 (raid6rec_mod_LDFLAGS): Likewise.
5624 (mdraid_mod_SOURCES): Likewise.
5625 (mdraid_mod_CFLAGS): Likewise.
5626 (mdraid_mod_LDFLAGS): Likewise.
5627 (dm_nv_mod_SOURCES): Likewise.
5628 (dm_nv_mod_CFLAGS): Likewise.
5629 (dm_nv_mod_LDFLAGS): Likewise.
5630
5631 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5632 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5633 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5634
5635 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5636 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5637
5638 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5639
5640 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5641
5642 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5643
5644 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5645
5646 * disk/raid5_recover.c: New file.
5647
5648 * disk/raid6_recover.c: Likewise.
5649
5650 * disk/mdraid_linux.c: Likewise.
5651
5652 * disk/dmraid_nvidia.c: Likewise.
5653
5654 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5655 ULONG_MAX.
5656
5657 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5658 calculate the size of raid device.
5659 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5660 different layout of raid5.
5661 (grub_raid_scan_device): Remove code specific to mdraid.
5662 (grub_raid_list): New variable.
5663 (free_array): New function.
5664 (grub_raid_register): Likewise.
5665 (grub_raid_unregister): Likewise.
5666 (grub_raid_rescan): Likewise.
5667 (GRUB_MOD_INIT): Don't iterate device here.
5668 (GRUB_MOD_FINI): Use free_array to release resource.
5669
5670 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5671 (grub_raid5_recover_func_t): New function variable type.
5672 (grub_raid6_recover_func_t): Likewise.
5673 (grub_raid5_recover_func): New variable.
5674 (grub_raid6_recover_func): Likewise.
5675 (grub_raid_register): New function.
5676 (grub_raid_unregister): Likewise.
5677 (grub_raid_rescan): Likewise.
5678 (grub_raid_block_xor): Likewise.
5679
5680 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5681 (CMD_CRC): New macro.
5682 (part): Removed.
5683 (read_file): Handle device as well as file.
5684 (cmd_crc): New function.
5685 (fstest): Handle multiple disks.
5686 (options): Remove part, raw and long, add root and diskcount.
5687 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5688 (main): Find the first non option entry and ignore subsequent options,
5689 add handling for the new options, support multiple disks.
5690
5691 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5692
5693 2008-08-23 Bean <bean123ch@gmail.com>
5694
5695 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5696
5697 * genfslist.sh: Ignore kernel.mod.
5698
5699 * genpartmaplist.sh: Likewise.
5700
5701 2008-08-23 Robert Millan <rmh@aybabtu.com>
5702
5703 * util/getroot.c (find_root_device): Skip anything that starts with
5704 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5705
5706 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5707
5708 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5709 * util/grub.d/00_header.in: Allow the administrator to change default
5710 gfxmode via ${GRUB_GFXMODE}.
5711
5712 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5713
5714 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5715
5716 2008-08-21 Robert Millan <rmh@aybabtu.com>
5717
5718 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5719 loader.
5720 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5721 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5722
5723 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5724
5725 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5726 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5727
5728 2008-08-19 Robert Millan <rmh@aybabtu.com>
5729
5730 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5731 (struct grub_virtual_screen): Remove `cursor_color'.
5732 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5733 initialization.
5734 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5735
5736 2008-08-18 Robert Millan <rmh@aybabtu.com>
5737
5738 Unify (identical) linux_normal.c files.
5739 * loader/i386/efi/linux_normal.c: Move from here ...
5740 * loader/linux_normal.c: ... to here. Update all users.
5741 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5742 * loader/i386/ieee1275/linux_normal.c: Likewise.
5743
5744 2008-08-18 Robert Millan <rmh@aybabtu.com>
5745
5746 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5747 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5748 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5749 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5750 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5751 New macros.
5752 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5753 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5754 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5755 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5756 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5757 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5758 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5759 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5760 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5761 portably using grub_getxy().
5762 Replace `-EFI' with `-bzImage' in boot message.
5763
5764 2008-08-17 Robert Millan <rmh@aybabtu.com>
5765
5766 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5767
5768 2008-08-17 Robert Millan <rmh@aybabtu.com>
5769
5770 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5771
5772 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5773 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5774 (grub_machine_mmap_iterate): New function declaration.
5775 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5776 structure.
5777 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5778 macros.
5779
5780 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5781 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5782 Move e820 parsing from here ...
5783 * kern/i386/pc/mmap.c: New file.
5784 (grub_machine_mmap_iterate): ... to here.
5785
5786 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5787 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5788 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5789 (grub_available_iterate): Redeclare to return `void', and redeclare
5790 its hook to use grub_uint64_t as addr and size parameters, and rename
5791 to ...
5792 (grub_machine_mmap_iterate): ... this. Update all users.
5793
5794 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5795 to make it more readable. Rename to ...
5796 (grub_machine_mmap_iterate): ... this.
5797
5798 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5799 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5800 (grub_multiboot): Allocate an extra region after the payload, and fill
5801 it with a Multiboot memory map. Adjust a.out loader to calculate size
5802 with the extra space.
5803 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5804 with the extra space.
5805
5806 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5807
5808 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5809
5810 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5811
5812 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5813 mdate-sh to the list `find' searches for.
5814 * DISTLIST: Regenerated.
5815
5816 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5817
5818 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5819 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5820 genmoddep.awk, gensymlist.sh.in.
5821 (DISTDIRS): Add bus, docs, hook, lib.
5822 * DISTLIST: Regenerated.
5823 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5824
5825 2008-08-16 Robert Millan <rmh@aybabtu.com>
5826
5827 * disk/raid.c (grub_raid_init): Handle/report errors set by
5828 grub_device_iterate().
5829 * disk/lvm.c (grub_lvm_init): Likewise.
5830
5831 2008-08-15 Bean <bean123ch@gmail.com>
5832
5833 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5834 and datehook.mod.
5835 (datetime_mod_SOURCES): New macro.
5836 (datetime_mod_CFLAGS): Likewise.
5837 (datetime_mod_LDFLAGS): Likewise.
5838 (date_mod_SOURCES): Likewise.
5839 (date_mod_CFLAGS): Likewise.
5840 (date_mod_LDFLAGS): Likewise.
5841 (datehook_mod_SOURCES): Likewise.
5842 (datehook_mod_CFLAGS): Likewise.
5843 (datehook_mod_LDFLAGS): Likewise.
5844
5845 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5846 and datehook.mod.
5847 (datetime_mod_SOURCES): New macro.
5848 (datetime_mod_CFLAGS): Likewise.
5849 (datetime_mod_LDFLAGS): Likewise.
5850 (date_mod_SOURCES): Likewise.
5851 (date_mod_CFLAGS): Likewise.
5852 (date_mod_LDFLAGS): Likewise.
5853 (datehook_mod_SOURCES): Likewise.
5854 (datehook_mod_CFLAGS): Likewise.
5855 (datehook_mod_LDFLAGS): Likewise.
5856
5857 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5858 and datehook.mod.
5859 (datetime_mod_SOURCES): New macro.
5860 (datetime_mod_CFLAGS): Likewise.
5861 (datetime_mod_LDFLAGS): Likewise.
5862 (date_mod_SOURCES): Likewise.
5863 (date_mod_CFLAGS): Likewise.
5864 (date_mod_LDFLAGS): Likewise.
5865 (datehook_mod_SOURCES): Likewise.
5866 (datehook_mod_CFLAGS): Likewise.
5867 (datehook_mod_LDFLAGS): Likewise.
5868
5869 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5870 and datehook.mod.
5871 (datetime_mod_SOURCES): New macro.
5872 (datetime_mod_CFLAGS): Likewise.
5873 (datetime_mod_LDFLAGS): Likewise.
5874 (date_mod_SOURCES): Likewise.
5875 (date_mod_CFLAGS): Likewise.
5876 (date_mod_LDFLAGS): Likewise.
5877 (datehook_mod_SOURCES): Likewise.
5878 (datehook_mod_CFLAGS): Likewise.
5879 (datehook_mod_LDFLAGS): Likewise.
5880
5881 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5882 and datehook.mod.
5883 (datetime_mod_SOURCES): New macro.
5884 (datetime_mod_CFLAGS): Likewise.
5885 (datetime_mod_LDFLAGS): Likewise.
5886 (date_mod_SOURCES): Likewise.
5887 (date_mod_CFLAGS): Likewise.
5888 (date_mod_LDFLAGS): Likewise.
5889 (datehook_mod_SOURCES): Likewise.
5890 (datehook_mod_CFLAGS): Likewise.
5891 (datehook_mod_LDFLAGS): Likewise.
5892
5893 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5894
5895 * commands/date.c: New file.
5896
5897 * hook/datehook.c: Likewise.
5898
5899 * include/grub/lib/datetime.h: Likewise.
5900
5901 * include/grub/i386/cmos.h: Likewise.
5902
5903 * lib/datetime.c: Likewise.
5904
5905 * lib/i386/datetime.c: Likewise.
5906
5907 * lib/efi/datetime.c: Likewise.
5908
5909 2008-08-14 Robert Millan <rmh@aybabtu.com>
5910
5911 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5912 (grub_mkelfimage_SOURCES): New variable.
5913 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5914
5915 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5916 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5917 * conf/powerpc-ieee1275.rmk: Likewise.
5918 * conf/i386-ieee1275.rmk: Likewise.
5919
5920 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5921 * kern/i386/coreboot/init.c: Likewise.
5922
5923 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5924 with `<grub/cpu/kernel.h>'.
5925 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5926 to ...
5927 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5928 * kern/i386/coreboot/startup.S: Likewise.
5929
5930 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5931 (GRUB_MOD_GAP): Remove.
5932 * include/grub/powerpc/kernel.h: New file.
5933 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5934 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5935 * include/grub/i386/kernel.h: New file.
5936 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5937 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5938 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5939
5940 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5941 `grub-mkelfimage'.
5942 Use --directory when invoking grub_mkimage.
5943
5944 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5945 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5946 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5947 and GRUB_KERNEL_CPU_PREFIX.
5948
5949 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5950
5951 * include/grub/err.h (grub_err_printf): New function prototype.
5952 * util/misc.c (grub_err_printf): New function.
5953 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5954 grub_printf.
5955 * kern/err.c (grub_print_error): Use grub_err_printf.
5956
5957 2008-08-13 Robert Millan <rmh@aybabtu.com>
5958
5959 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5960
5961 2008-08-13 Robert Millan <rmh@aybabtu.com>
5962
5963 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5964 boot entry.
5965
5966 2008-08-12 Robert Millan <rmh@aybabtu.com>
5967
5968 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5969 of the relocation code from here ...
5970 (grub_multiboot): ... to here.
5971 (forward_relocator, backward_relocator): Move from here ...
5972 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5973 (grub_multiboot_backward_relocator): ... to here.
5974 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5975 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5976 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5977 (grub_multiboot_forward_relocator_end)
5978 (grub_multiboot_backward_relocator)
5979 (grub_multiboot_backward_relocator_end): New variables.
5980
5981 2008-08-12 Bean <bean123ch@gmail.com>
5982
5983 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5984
5985 2008-08-11 Robert Millan <rmh@aybabtu.com>
5986
5987 * kern/i386/linuxbios/startup.S: Move from here ...
5988 * kern/i386/coreboot/startup.S: ... to here.
5989
5990 * kern/i386/linuxbios/init.c: Move from here ...
5991 * kern/i386/coreboot/init.c: ... to here.
5992
5993 * kern/i386/linuxbios/table.c: Move from here ...
5994 * kern/i386/coreboot/mmap.c: ... to here.
5995
5996 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5997
5998 2008-08-11 Robert Millan <rmh@aybabtu.com>
5999
6000 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6001 errors. Leave it to the upper layer to handle them.
6002
6003 2008-08-09 Christian Franke <franke@computer.org>
6004
6005 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6006 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6007 Install `grub.d/10_windows' only on Cygwin.
6008 * configure.ac: Add subst of `target_os'.
6009 Check `target_os' also before setting TARGET_OBJ2ELF.
6010 Add `--enable-grub-pe2elf'.
6011
6012 2008-08-08 Robert Millan <rmh@aybabtu.com>
6013
6014 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6015 (grub_last_time): Change type to grub_uint64_t.
6016 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6017 (grub_disk_close): Likewise.
6018
6019 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6020 (run_menu): Migrate code from to using grub_get_time_ms().
6021
6022 * util/misc.c (grub_get_time_ms): New function.
6023
6024 2008-08-08 Marco Gerards <marco@gnu.org>
6025
6026 * disk/ata.c (grub_ata_regget): Change return type to
6027 `grub_uint8_t'.
6028 (grub_ata_regget2): Likewise.
6029 (grub_ata_wait_status): New function.
6030 (grub_ata_wait_busy): Removed function, updated all users to use
6031 `grub_ata_wait_status'.
6032 (grub_ata_wait_drq): Likewise.
6033 (grub_ata_cmd): New function.
6034 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6035 error handling.
6036 (grub_ata_pio_write): Add error handling.
6037 (grub_atapi_identify): Likewise.
6038 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6039 handling.
6040 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6041 handling. Actually use the detected registers. Reorder the
6042 detection logic such that it is easier to read.
6043 (grub_ata_pciinit): Do not assign the same ID to each controller.
6044 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6045 handling.
6046 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6047
6048 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6049
6050 2008-08-08 Marco Gerards <marco@gnu.org>
6051
6052 * NEWS: Update.
6053
6054 2008-08-07 Bean <bean123ch@gmail.com>
6055
6056 * include/grub/x86_64/pci.h: New file.
6057
6058 2008-08-07 Christian Franke <franke@computer.org>
6059
6060 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6061 (TIMER2_GATE): Likewise.
6062 (grub_pit_wait): Add enable/disable of the timer2 gate
6063 bit of port 0x61. This fixes a possible infinite loop.
6064
6065 2008-08-07 Bean <bean123ch@gmail.com>
6066
6067 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6068 kern/i386/tsc.c and kern/i386/pit.c.
6069
6070 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6071 x86_64 platform.
6072
6073 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6074 <grub/i386/tsc.h>.
6075
6076 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6077
6078 2008-08-07 Bean <bean123ch@gmail.com>
6079
6080 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6081
6082 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6083
6084 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6085 multiple inclusion. Add #include <grub/types.h>.
6086
6087 2008-08-06 Christian Franke <franke@computer.org>
6088
6089 * conf/common.rmk: Build and install `10_windows'.
6090 * util/grub.d/10_windows.in: New script.
6091
6092 2008-08-06 Pavel Roskin <proski@gnu.org>
6093
6094 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6095
6096 2008-08-06 Robert Millan <rmh@aybabtu.com>
6097
6098 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6099 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6100
6101 2008-08-06 Bean <bean123ch@gmail.com>
6102
6103 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6104 (grub_pxefs_fs_int): Remove dummy definition.
6105 (grub_pxefs_open): Use data->block_size to store the current block
6106 size setting.
6107 (grub_pxefs_read): Use block size stored in data->block_size. As the
6108 value of grub_pxe_blksize can be changed after the file is opened.
6109
6110 2008-08-06 Bean <bean123ch@gmail.com>
6111
6112 * fs/i386/pc/pxe.c (curr_file): new variable.
6113 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6114 require the dummy internal file system anymore.
6115 (grub_pxefs_read): Removed.
6116 (grub_pxefs_close): Likewise.
6117 (grub_pxefs_fs_int): Likewise.
6118 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6119 connection when we switch file.
6120 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6121
6122 2008-08-06 Robert Millan <rmh@aybabtu.com>
6123
6124 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6125 `halt.mod'.
6126 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6127 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6128
6129 * kern/i386/halt.c: New file.
6130 * kern/i386/reboot.c: Likewise.
6131 * include/grub/i386/reboot.h: Likewise.
6132 * include/grub/i386/halt.h: Likewise.
6133
6134 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6135 Include `<grub/cpu/halt.h>'.
6136 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6137 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6138
6139 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6140 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6141 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6142 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6143 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6144 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6145 from here ...
6146 * include/grub/i386/at_keyboard.h: ... to here.
6147
6148 2008-08-05 Robert Millan <rmh@aybabtu.com>
6149
6150 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6151 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6152 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6153 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6154 `kern/generic/millisleep.c'.
6155
6156 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6157 instead of grub_get_rtc().
6158 (grub_tsc_init): Initialize `tsc_boot_time'.
6159
6160 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6161 (grub_machine_init): Use grub_tsc_init() rather than
6162 installing an RTC-based handler via grub_install_get_time_ms().
6163
6164 * kern/i386/pit.c: New file.
6165 * include/grub/i386/pit.h: Likewise.
6166
6167 2008-08-05 Bean <bean123ch@gmail.com>
6168
6169 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6170
6171 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6172 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6173 (pxe_mod_SOURCES): New macro.
6174 (pxe_mod_CFLAGS): Likewise.
6175 (pxe_mod_LDFLAGS): Likewise.
6176 (pxecmd_mod_SOURCES): Likewise.
6177 (pxecmd_mod_CFLAGS): Likewise.
6178 (pxecmd_mod_LDFLAGS): Likewise.
6179
6180 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6181 (grub_pxe_call): Likewise.
6182
6183 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6184
6185 * commands/i386/pc/pxecmd.c: New file.
6186
6187 * fs/i386/pc/pxe.c: Likewise.
6188
6189 * include/grub/i386/pc/pxe.h: Likewise.
6190
6191 2008-08-05 Bean <bean123ch@gmail.com>
6192
6193 * util/console.c (grub_console_cur_color): New variable.
6194 (grub_console_standard_color): Likewise.
6195 (grub_console_normal_color): Likewise.
6196 (grub_console_highlight_color): Likewise.
6197 (color_map): Likewise.
6198 (use_color): Likewise.
6199 (NUM_COLORS): New macro.
6200 (grub_ncurses_setcolorstate): Handle color properly.
6201 (grub_ncurses_setcolor): Don't change color here, just remember the
6202 settings, color will be set in grub_ncurses_setcolorstate.
6203 (grub_ncurses_getcolor): New function.
6204 (grub_ncurses_init): Initialize color pairs.
6205 (grub_ncurses_term): New member grub_ncurses_getcolor.
6206
6207 2008-08-05 Colin D Bennett <colin@gibibit.com>
6208
6209 High resolution timer support. Implemented for x86 CPUs using TSC.
6210 Extracted generic grub_millisleep() so it's linked in only as needed.
6211 This requires a Pentium compatible CPU; if the RDTSC instruction is
6212 not supported, then it falls back on the generic grub_get_time_ms()
6213 implementation that uses the machine's RTC.
6214
6215 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6216 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6217 `kern/generic/millisleep.c'.
6218
6219 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6220 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6221
6222 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6223 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6224
6225 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6226
6227 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6228 `kern/generic/millisleep.c'.
6229
6230 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6231
6232 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6233
6234 * kern/generic/rtc_get_time_ms.c: New file.
6235
6236 * kern/generic/millisleep.c: New file.
6237
6238 * kern/misc.c: Don't include
6239 <kern/time.h> anymore.
6240 (grub_millisleep_generic): Removed.
6241
6242 * commands/sleep.c (grub_interruptible_millisleep): Uses
6243 grub_get_time_ms() instead of grub_get_rtc().
6244
6245 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6246 function.
6247 (grub_cpu_is_cpuid_supported): New inline function.
6248 (grub_cpu_is_tsc_supported): New inline function.
6249 (grub_tsc_init): New function prototype.
6250 (grub_tsc_get_time_ms): New function prototype.
6251
6252 * kern/i386/tsc.c (grub_get_time_ms): New file.
6253
6254 * include/grub/time.h: Include <grub/types.h.
6255 (grub_millisleep_generic): Removed.
6256 (grub_get_time_ms): New prototype.
6257 (grub_install_get_time_ms): New prototype.
6258 (grub_rtc_get_time_ms): New prototype.
6259
6260 * kern/time.c (grub_get_time_ms): New function.
6261 (grub_install_get_time_ms): New function.
6262
6263 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6264 <grub/time.h> anymore.
6265 (grub_millisleep): Removed.
6266 (grub_machine_init): Call grub_tsc_init.
6267
6268 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6269 get_time_ms() implementation.
6270
6271 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6272 (ieee1275_get_time_ms): New function.
6273 (grub_machine_init): Install get_time_ms() implementation.
6274
6275 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6276 (grub_machine_init): Call grub_tsc_init().
6277 (grub_millisleep): Removed.
6278
6279 * kern/ieee1275/init.c (grub_millisleep): Removed.
6280 (grub_machine_init): Install ieee1275_get_time_ms()
6281 implementation.
6282 (ieee1275_get_time_ms): New function.
6283 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6284 real work.
6285
6286 2008-08-05 Marco Gerards <marco@gnu.org>
6287
6288 * disk/ata.c: Include <grub/pci.h>.
6289 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6290 (grub_ata_initialize): Rewritten.
6291 (grub_ata_device_initialize): New function.
6292
6293 2008-08-04 Pavel Roskin <proski@gnu.org>
6294
6295 * kern/main.c: Include grub/mm.h.
6296
6297 2008-08-04 Robert Millan <rmh@aybabtu.com>
6298
6299 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6300 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6301 corruption problem).
6302
6303 2008-08-04 Robert Millan <rmh@aybabtu.com>
6304
6305 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6306 warnings introduced in my last commit.
6307
6308 2008-08-03 Robert Millan <rmh@aybabtu.com>
6309
6310 Make PCI available on all i386 architectures.
6311
6312 * include/grub/i386/pc/pci.h: Move from here ...
6313 * include/grub/i386/pci.h: ... to here.
6314
6315 * include/grub/i386/pc/pci.h: Remove.
6316 * include/grub/i386/efi/pci.h: Remove.
6317 * include/grub/x86_64/efi/pci.h: Remove.
6318
6319 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6320 `<grub/cpu/pci.h>'.
6321
6322 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6323 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6324 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6325
6326 * conf/i386-ieee1275.rmk: Likewise.
6327
6328 2008-08-03 Robert Millan <rmh@aybabtu.com>
6329
6330 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6331 (grub_console_setcursor): Make it possible to set cursor off.
6332
6333 2008-08-03 Robert Millan <rmh@aybabtu.com>
6334
6335 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6336 of modules instead of assuming which platform provides what.
6337 * util/update-grub.in: Likewise.
6338
6339 2008-08-03 Robert Millan <rmh@aybabtu.com>
6340
6341 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6342 instead of `grub_install_dos_part' to determine whether a drive needs
6343 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6344 because it can be overridden when loading GRUB via Multiboot).
6345
6346 2008-08-02 Robert Millan <rmh@aybabtu.com>
6347
6348 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6349
6350 2008-08-02 Robert Millan <rmh@aybabtu.com>
6351
6352 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6353 of informational grub_dprintf() calls.
6354
6355 2008-08-02 Robert Millan <rmh@aybabtu.com>
6356
6357 * disk/memdisk.c (memdisk_size): Don't initialize.
6358 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6359
6360 * include/grub/i386/pc/kernel.h
6361 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6362 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6363 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6364 (grub_arch_memdisk_size): Remove.
6365
6366 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6367 field (was only used to transfer a constant). Add `type' field to
6368 support multiple module types.
6369 (grub_module_iterate): New function.
6370
6371 * kern/device.c (grub_device_open): Do not hide error messages
6372 when grub_disk_open() fails. Use grub_print_error() instead.
6373
6374 * kern/i386/pc/init.c (grub_arch_modules_addr)
6375 (grub_arch_memdisk_size): Remove functions.
6376 (grub_arch_modules_addr): Return the module address in high memory
6377 (now that it isn't copied anymore).
6378
6379 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6380 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6381 decompression routine (grub_total_module_size already includes that
6382 now). Don't copy modules back to low memory.
6383
6384 * kern/main.c: Include `<grub/mm.h>'.
6385 (grub_load_modules): Split out (and use) ...
6386 (grub_module_iterate): ... this function, which iterates through
6387 module objects and runs a hook.
6388 Comment out grub_mm_init_region() call, as it would cause non-ELF
6389 modules to be overwritten.
6390
6391 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6392 the memdisk image in its own region, make it part of the module list.
6393 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6394 (main): Parse --memdisk|-m option, and pass user-provided path as
6395 parameter to generate_image().
6396 (add_segments): Pass `memdisk_path' down to load_modules().
6397 (load_modules): Embed memdisk image in module section when requested.
6398 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6399 `header.type' instead of `header.offset'.
6400
6401 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6402 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6403 (memdisk_mod_LDFLAGS): New variables.
6404 * conf/i386-coreboot.rmk: Likewise.
6405 * conf/i386-ieee1275.rmk: Likewise.
6406
6407 2008-08-02 Robert Millan <rmh@aybabtu.com>
6408
6409 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6410 (backward_relocator): New variables. Used to allocate and relocate
6411 the payload, respectively.
6412 (grub_multiboot_load_elf32): Load into heap instead of requested
6413 address, install the appropriate relocator code in each bound of
6414 the payload, and set the entry point such that
6415 grub_multiboot_real_boot() will jump to one of them.
6416
6417 * kern/i386/loader.S (grub_multiboot_payload_size)
6418 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6419 (grub_multiboot_payload_entry_offset): New variables.
6420 (grub_multiboot_real_boot): Set cpu context to what the relocator
6421 expects, and jump to the relocator instead of the payload.
6422
6423 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6424 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6425 (grub_multiboot_payload_entry_offset): Export.
6426
6427 2008-08-01 Bean <bean123ch@gmail.com>
6428
6429 * normal/menu_entry.c (editor_getline): Don't return the original
6430 string as result, as it will be released by lexer once it has done
6431 using it.
6432
6433 2008-08-01 Robert Millan <rmh@aybabtu.com>
6434
6435 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6436 within menuentries, not before them.
6437 util/grub.d/10_hurd.in: Likewise.
6438
6439 2008-08-01 Bean <bean123ch@gmail.com>
6440
6441 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6442 (bufio_mod_SOURCES): New macro.
6443 (bufio_mod_CFLAGS): Likewise.
6444 (bufio_mod_LDFLAGS): Likewise.
6445
6446 * include/grub/bufio.h: New file.
6447
6448 * io/bufio.c: Likewise.
6449
6450 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6451 (grub_video_reader_png): Use grub_buffile_open to open file.
6452
6453 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6454 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6455
6456 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6457 (grub_video_reader_tga): Use grub_buffile_open to open file.
6458
6459 * font/manager.c: Include <grub/bufio.h>.
6460 (add_font): Use grub_buffile_open to open file.
6461
6462 2008-07-31 Robert Millan <rmh@aybabtu.com>
6463
6464 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6465 ELF segments, use a macro for arbitrarily accessing any of them instead
6466 of preparing a pointer that allows access to one at a time.
6467 (grub_multiboot_load_elf64): Likewise.
6468
6469 2008-07-31 Bean <bean123ch@gmail.com>
6470
6471 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6472 GRUB_KERNEL_MACHINE_DATA_END.
6473
6474 2008-07-30 Robert Millan <rmh@aybabtu.com>
6475
6476 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6477 Increase from 0x50 to 0x60.
6478 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6479 use UUIDs to identify the root drive for them. If that's not
6480 possible, abort.
6481 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6482 check, for cross-disk installs.
6483
6484 2008-07-30 Robert Millan <rmh@aybabtu.com>
6485
6486 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6487 is non-empty, use it to set the `prefix' environment variable instead
6488 of the usual approach.
6489 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6490 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6491 environment variable instead of dummy make_install_device().
6492
6493 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6494 (start): Insert a data section, with `grub_prefix' variable.
6495 * kern/i386/linuxbios/startup.S: Likewise.
6496
6497 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6498 New variable reference.
6499 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6500 New macro. Defines offset of `grub_prefix' within startup.S (relative
6501 to `start').
6502 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6503 section within startup.S (relative to `start').
6504 * include/grub/i386/coreboot/kernel.h: Likewise.
6505
6506 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6507 Overwrite grub_prefix with its contents, at the beginning of the
6508 first segment.
6509 (main): Understand -p|--prefix.
6510
6511 2008-07-30 Robert Millan <rmh@aybabtu.com>
6512
6513 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6514
6515 2008-07-30 Robert Millan <rmh@aybabtu.com>
6516
6517 * term/i386/pc/vga_text.c (grub_console_cls): Use
6518 grub_console_gotoxy() to go back to beginning of the screen.
6519 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6520
6521 2008-07-29 Christian Franke <franke@computer.org>
6522
6523 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6524 Add conversion of emulated mount points on Cygwin.
6525
6526 2008-07-29 Christian Franke <franke@computer.org>
6527
6528 * util/update-grub.in: Add a check for admin
6529 group on Cygwin.
6530 Remove old `grub.cfg.new' before creation.
6531 Add `-f' to `mv' to handle the different filesystem
6532 semantics of Windows.
6533
6534 2008-07-29 Bean <bean123ch@gmail.com>
6535
6536 * normal/main.c (get_line): Fix buffer overflow bug.
6537
6538 2008-07-28 Robert Millan <rmh@aybabtu.com>
6539
6540 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6541 (struct grub_apple_header): New struct. Describes the layout of
6542 the partmap header.
6543 (apple_partition_map_iterate): Check the header magic as well as the
6544 partition magic (which was already being checked).
6545
6546 2008-07-28 Pavel Roskin <proski@gnu.org>
6547
6548 * genmk.rb: Add a warning to the beginning of the output that
6549 it's a generated file and should not be edited.
6550
6551 2008-07-28 Robert Millan <rmh@aybabtu.com>
6552
6553 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6554 with the same number are found, just use issue a warning with
6555 grub_dprintf(), as this error has been reported to be non-fatal.
6556
6557 2008-07-27 Robert Millan <rmh@aybabtu.com>
6558
6559 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6560 information.
6561
6562 2008-07-27 Bean <bean123ch@gmail.com>
6563
6564 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6565 (grub_fat_find_dir): Ignore case when comparing filename.
6566
6567 2008-07-27 Bean <bean123ch@gmail.com>
6568
6569 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6570 smallino, as it's more descriptive, and i8count can be confused with
6571 the other field count.
6572 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6573 inode type.
6574
6575 2008-07-27 Bean <bean123ch@gmail.com>
6576
6577 * commands/crc.c: New file.
6578
6579 * lib/crc.c: Likewise.
6580
6581 * include/grub/lib/crc.h: Likewise.
6582
6583 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6584
6585 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6586 (hexdump): Move this function to ...
6587
6588 * lib/hexdump.c: ... here.
6589
6590 * include/grub/hexdump.h: Renamed to ...
6591
6592 * include/grub/lib/hexdump.h: ... this.
6593
6594 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6595
6596 * util/grub-editenv.c: Likewise.
6597
6598 * include/envblk.h: Renamed to ...
6599
6600 * include/lib/envblk.h: ... this.
6601
6602 * util/envblk.c: Renamed to ...
6603
6604 * lib/envblk.c: ... this.
6605
6606 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6607 lib/hexdump.c.
6608 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6609 (pkglib_MODULES): Add crc.mod.
6610 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6611 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6612 (crc_mod_SOURCES): New macro.
6613 (crc_mod_CFLAGS): Likewise.
6614 (crc_mod_LDFLAGS): Likewise.
6615
6616 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6617
6618 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6619
6620 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6621
6622 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6623
6624 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6625
6626 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6627
6628 * commands/help.c: Include <grub/term.h>.
6629 (TERM_WIDTH): Removed. Updated all users.
6630
6631 2008-07-27 Pavel Roskin <proski@gnu.org>
6632
6633 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6634 spurious warnings about a comment within a comment.
6635
6636 2008-07-25 Robert Millan <rmh@aybabtu.com>
6637
6638 * util/getroot.c (find_root_device): Skip devices that match
6639 /dev/dm-[0-9]. This lets the real device be found for any type of
6640 abstraction (LVM, EVMS, RAID..).
6641 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6642 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6643 device is found first, find_root_device() will now skip it.
6644
6645 2008-07-24 Pavel Roskin <proski@gnu.org>
6646
6647 * include/grub/types.h: Use __builtin_bswap32() and
6648 __builtin_bswap64() with gcc 4.3 and newer.
6649
6650 2008-07-24 Christian Franke <franke@computer.org>
6651
6652 * util/i386/pc/grub-install.in: If `--debug' is specified,
6653 pass `--verbose' to grub-setup.
6654 Abort script if make_system_path_relative_to_its_root() fails.
6655
6656 2008-07-24 Bean <bean123ch@gmail.com>
6657
6658 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6659 variable `target_platform' should be `platform'.
6660
6661 2008-07-24 Bean <bean123ch@gmail.com>
6662
6663 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6664 (grub_png_init_fixed_block): New function.
6665 (grub_png_decode_image_data): Handle fixed huffman code compression.
6666
6667 2008-07-24 Bean <bean123ch@gmail.com>
6668
6669 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6670 (grub_pe2elf_SOURCES): New macro.
6671 (CLEANFILES): Add grub-pe2elf.
6672
6673 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6674 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6675 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6676 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6677 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6678 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6679 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6680 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6681 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6682 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6683 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6684 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6685 (GRUB_PE32_DT_FUNCTION): Likewise.
6686 (GRUB_PE32_REL_I386_DIR32): Likewise.
6687 (GRUB_PE32_REL_I386_REL32): Likewise.
6688 (grub_pe32_symbol): New structure.
6689 (grub_pe32_reloc): Likewise.
6690
6691 * util/grub-pe2elf.c: New file.
6692
6693 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6694 start symbol in non pc platform.
6695
6696 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6697
6698 The following patches are from Christian Franke.
6699
6700 * include/grub/dl.h: Remove .previous, gas supports this only
6701 for ELF format.
6702
6703 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6704 Remove .type, gas supports this only for ELF format.
6705
6706 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6707 nullbytes in symbol table. This fixes an infinite loop if table is
6708 zero filled.
6709
6710 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6711 TARGET_IMG_LDFLAGS and EXEEXT.
6712
6713 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6714 TARGET_IMG_LDFLAGS_AC.
6715 (grub_CHECK_STACK_ARG_PROBE): New function.
6716
6717 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6718
6719 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6720
6721 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6722 to set TARGET_IMG_LD* accordingly.
6723 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6724 Add call to grub_CHECK_STACK_ARG_PROBE.
6725 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6726
6727 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6728
6729 * genmk.rb: Add EXEEXT to CLEANFILES.
6730
6731 2008-07-23 Robert Millan <rmh@aybabtu.com>
6732
6733 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6734 define the codes for arrows and lines used for the menu).
6735 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6736 as well.
6737
6738 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6739 fonts, because the latter are too slow.
6740
6741 2008-07-21 Bean <bean123ch@gmail.com>
6742
6743 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6744 a20. Run keyboard test last, as it will cause macbook to halt.
6745
6746 2008-07-18 Pavel Roskin <proski@gnu.org>
6747
6748 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6749 load foreign architecture modules correctly anyway. Keep
6750 support for loading host architecture modules, whether we
6751 compile them or not.
6752
6753 2008-07-17 Pavel Roskin <proski@gnu.org>
6754
6755 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6756 change target_cpu. The compiler default can mismatch target_cpu
6757 in any case.
6758
6759 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6760 * kern/efi/efi.c: Likewise.
6761
6762 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6763 target compiler is functional.
6764 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6765 are set up.
6766
6767 * configure.ac: Default to efi platform for x86_64-apple. Allow
6768 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6769 adjustments from the rest, only do them if target is not
6770 explicitly given. Merge other adjustments with the final sanity
6771 check. Remove an extraneous check for supported CPU. Be
6772 specific which CPU and which platform is not supported.
6773
6774 * configure.ac: Default to pc platform for x86_64.
6775
6776 2008-07-17 Robert Millan <rmh@aybabtu.com>
6777
6778 Partial LinuxBIOS -> Coreboot rename.
6779
6780 * conf/i386-linuxbios.rmk: Renamed to ...
6781 * conf/i386-coreboot.rmk: ... this.
6782 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6783 * configure.ac: Accept "coreboot" as input platform (but maintain
6784 compatibility with "linuxbios").
6785 * include/grub/i386/linuxbios: Renamed to ...
6786 * include/grub/i386/coreboot: ... this.
6787
6788 2008-07-17 Bean <bean123ch@gmail.com>
6789
6790 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6791 (appleldr_mod_SOURCE): New variable.
6792 (appleldr_mod_CFLAGS): Likewise.
6793 (appleldr_mod_LDFLAGS): Likewise.
6794 (pci_mod_SOURCES): Likewise.
6795 (pci_mod_CFLAGS): Likewise.
6796 (pci_mod_LDFLAGS): Likewise.
6797 (lspci_mod_SOURCES): Likewise.
6798 (lspci_mod_CFLAGS): Likewise.
6799 (lspci_mod_LDFLAGS): Likewise.
6800
6801 * conf/x86_64-efi.rmk: New file.
6802
6803 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6804 macro.
6805 (grub_efidisk_write): Likewise.
6806
6807 * include/efi/api.h (efi_call_0): New macro.
6808 (efi_call_1): Likewise.
6809 (efi_call_2): Likewise.
6810 (efi_call_3): Likewise.
6811 (efi_call_4): Likewise.
6812 (efi_call_5): Likewise.
6813 (efi_call_6): Likewise.
6814
6815 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6816 grub_rescue_cmd_chainloader.
6817
6818 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6819 (grub_pe32_optional_header): Change some fields based on i386 or
6820 x86_64 platform.
6821 (GRUB_PE32_PE32_MAGIC): Likewise.
6822
6823 * include/grub/efi/uga_draw.h: New file.
6824
6825 * include/grub/elf.h (STN_ABS): New constant.
6826 (R_X86_64_NONE): Relocation constant for x86_64.
6827 (R_X86_64_64): Likewise.
6828 (R_X86_64_PC32): Likewise.
6829 (R_X86_64_GOT32): Likewise.
6830 (R_X86_64_PLT32): Likewise.
6831 (R_X86_64_COPY): Likewise.
6832 (R_X86_64_GLOB_DAT): Likewise.
6833 (R_X86_64_JUMP_SLOT): Likewise.
6834 (R_X86_64_RELATIVE): Likewise.
6835 (R_X86_64_GOTPCREL): Likewise.
6836 (R_X86_64_32): Likewise.
6837 (R_X86_64_32S): Likewise.
6838 (R_X86_64_16): Likewise.
6839 (R_X86_64_PC16): Likewise.
6840 (R_X86_64_8): Likewise.
6841 (R_X86_64_PC8): Likewise.
6842
6843 * include/grub/i386/efi/pci.h: New file.
6844
6845 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6846 Change it value based on platform.
6847 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6848 (GRUB_E820_RAM): Likewise.
6849 (GRUB_E820_RESERVED): Likewise.
6850 (GRUB_E820_ACPI): Likewise.
6851 (GRUB_E820_NVS): Likewise.
6852 (GRUB_E820_EXEC_CODE): Likewise.
6853 (GRUB_E820_MAX_ENTRY): Likewise.
6854 (grub_e820_mmap): New structure.
6855 (linux_kernel_header): Change the efi field according to different
6856 kernel version, also field from linux_kernel_header.
6857
6858 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6859
6860 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6861 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6862 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6863 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6864 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6865 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6866 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6867 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6868 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6869 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6870
6871 * include/grub/x86_64/efi/kernel.h: New file.
6872
6873 * include/grub/x86_64/efi/loader.h: Likewise.
6874
6875 * include/grub/x86_64/efi/machine.h: Likewise.
6876
6877 * include/grub/x86_64/efi/pci.h: Likewise.
6878
6879 * include/grub/x86_64/efi/time.h: Likewise.
6880
6881 * include/grub/x86_64/linux.h: Likewise.
6882
6883 * include/grub/x86_64/setjmp.h: Likewise.
6884
6885 * include/grub/x86_64/time.h: Likewise.
6886
6887 * include/grub/x86_64/types.h: Likewise.
6888
6889 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6890 GRUB_TARGET_SIZEOF_VOID_P.
6891
6892 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6893 (grub_efi_locate_handle): Likewise.
6894 (grub_efi_open_protocol): Likewise.
6895 (grub_efi_set_text_mode): Likewise.
6896 (grub_efi_stall): Likewise.
6897 (grub_exit): Likewise.
6898 (grub_reboot): Likewise.
6899 (grub_halt): Likewise.
6900 (grub_efi_exit_boot_services): Likewise.
6901 (grub_get_rtc): Likewise.
6902
6903 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6904 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6905 (grub_efi_allocate_pages): Wrap efi calls.
6906 (grub_efi_free_pages): Wrap efi calls.
6907 (grub_efi_get_memory_map): Wrap efi calls.
6908
6909 * kern/x86_64/dl.c: New file.
6910
6911 * kern/x86_64/efi/callwrap.S: Likewise.
6912
6913 * kern/x86_64/efi/startup.S: Likewise.
6914
6915 * loader/efi/appleloader.c: Likewise.
6916
6917 * loader/efi/chainloader.c (cmdline): New variable.
6918 (grub_chainloader_unload): Wrap efi calls.
6919 (grub_chainloader_boot): Likewise.
6920 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6921 command line.
6922
6923 * loader/efi/chainloader_normal.c (chainloader_command):
6924 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6925 command line.
6926
6927 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6928 method.
6929 (grub_e820_add_region): New function.
6930 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6931 booting.
6932 (grub_find_video_card): New function.
6933 (grub_linux_setup_video): New function.
6934 (grub_rescue_cmd_linux): Probe for video information.
6935
6936 * normal/x86_64/setjmp.S: New file.
6937
6938 * term/efi/console.c (map_char): New function.
6939 (grub_console_putchar): Map unicode char.
6940 (grub_console_checkkey): Wrap efi calls.
6941 (grub_console_getkey): Likewise.
6942 (grub_console_getwh): Likewise.
6943 (grub_console_gotoxy): Likewise.
6944 (grub_console_cls): Likewise.
6945 (grub_console_setcolorstate): Likewise.
6946 (grub_console_setcursor): Likewise.
6947
6948 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6949
6950 2008-07-16 Pavel Roskin <proski@gnu.org>
6951
6952 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6953 format strings.
6954
6955 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6956 pointer, not an integer. This fixes a warning and prevents
6957 precision loss on 64-bit systems.
6958 (relocate_addresses): Remove unneeded cast.
6959
6960 2008-07-15 Pavel Roskin <proski@gnu.org>
6961
6962 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6963
6964 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6965
6966 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6967 Fix comparison between signed and unsigned.
6968
6969 * include/grub/i386/ieee1275/console.h: Declare
6970 grub_console_init() and grub_console_fini().
6971
6972 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6973 It's empty and unused.
6974
6975 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6976 beginning to avoid warnings with some compilers.
6977
6978 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6979 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6980
6981 2008-07-14 Pavel Roskin <proski@gnu.org>
6982
6983 * kern/env.c (grub_register_variable_hook): Don't copy empty
6984 string, it leaks memory. Pass "" to grub_env_set(), it should
6985 handle constant strings.
6986
6987 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6988 * commands/cmp.c (grub_cmd_cmp): Likewise.
6989 * kern/dl.c (grub_dl_flush_cache): Likewise.
6990 (grub_dl_load_core): Likewise.
6991 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6992 (grub_elf64_load_phdrs): Likewise.
6993
6994 2008-07-13 Pavel Roskin <proski@gnu.org>
6995
6996 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6997 between signed and unsigned.
6998 (LzmaEnc_Finish): Fix warning about an unused parameter.
6999
7000 2008-07-13 Bean <bean123ch@gmail.com>
7001
7002 * Makefile.in (enable_lzo): New rule.
7003
7004 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7005
7006 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7007
7008 * boot/i386/pc/lnxboot.S: #include <config.h>.
7009
7010 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7011 its value according to the compression algorithm used, lzo or lzma.
7012
7013 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7014 compression algorithm according to configure macro.
7015
7016 * kern/i386/pc/startup.S (codestart): Likewise.
7017
7018 * kern/i386/pc/lzma_decode.S: New file.
7019
7020 * include/grub/lib/LzFind.h: Likewise.
7021
7022 * include/grub/lib/LzHash.h: Likewise.
7023
7024 * include/grub/lib/LzmaDec.h: Likewise.
7025
7026 * include/grub/lib/LzmaEnc.h: Likewise.
7027
7028 * include/grub/lib/LzmaTypes.h: Likewise.
7029
7030 * lib/LzFind.c: Likewise.
7031
7032 * lib/LzmaDec.c: Likewise.
7033
7034 * lib/LzmaEnc.c: Likewise.
7035
7036 2008-07-13 Bean <bean123ch@gmail.com>
7037
7038 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7039 (grub_ext4_extent_header): New structure.
7040 (grub_ext4_extent): Likewise.
7041 (grub_ext4_extent_idx): Likewise.
7042 (grub_ext4_find_leaf): New function.
7043 (grub_ext2_read_block): Handle extents.
7044
7045 2008-07-12 Robert Millan <rmh@aybabtu.com>
7046
7047 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7048
7049 2008-07-11 Robert Millan <rmh@aybabtu.com>
7050
7051 * util/grub.d/40_custom.in: New file. Example on how to add custom
7052 entries to /etc/grub.d.
7053 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7054 40_custom (implicitly, by merging all the grub.d rules).
7055
7056 2008-07-11 Pavel Roskin <proski@gnu.org>
7057
7058 * commands/read.c (grub_getline): Fix invalid memory access.
7059 Don't add newline to the variable value.
7060
7061 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7062 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7063 (serial_hw_get_port): Check validity of the port number.
7064 (grub_cmd_serial): Check return value of serial_hw_get_port().
7065
7066 2008-07-07 Pavel Roskin <proski@gnu.org>
7067
7068 * boot/i386/pc/diskboot.S (notification_string): Replace
7069 "Loading kernel" with just "loading". This is shorter, less
7070 confusing and saves a few bytes for possible future changes.
7071
7072 2008-07-05 Pavel Roskin <proski@gnu.org>
7073
7074 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7075 size for ATAPI devices, they are undefined. Output sector
7076 number in decimal form.
7077
7078 * disk/ata.c: Use named constants for status bits.
7079
7080 2008-07-04 Pavel Roskin <proski@gnu.org>
7081
7082 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7083 grub_addr_t before casting it to the void pointer to fix a
7084 warning. Non-addressable regions are discarded earlier.
7085 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7086 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7087 (check_signature): Don't shadow table_header.
7088 (grub_linuxbios_table_iterate): Cast numeric constants to
7089 grub_linuxbios_table_header_t.
7090 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7091 grub_stop().
7092
7093 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7094 prevent warnings.
7095
7096 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7097 pointer, which can cause warnings. Support 64-bit addresses.
7098
7099 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7100 of sizeof(long). This fixes PowerPC image generation on x86_64.
7101
7102 2008-07-04 Robert Millan <rmh@aybabtu.com>
7103
7104 This fixes a performance issue when pc & gpt partmap iterators
7105 didn't abort iteration even after our hook found what it was
7106 looking for (often causing expensive probes of non-existent drives).
7107
7108 Some callers relied on previous buggy behaviour, since they would
7109 raise an error when their own hooks caused early abortion of its
7110 iteration.
7111
7112 * kern/device.c (grub_device_open): Improve error message.
7113 * disk/lvm.c (grub_lvm_open): Likewise.
7114 * disk/raid.c (grub_raid_open): Likewise.
7115
7116 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7117 when hook requests it, independently of grub_errno.
7118 (pc_partition_map_probe): Do not fail when find_func() caused
7119 early abortion of pc_partition_map_iterate().
7120
7121 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7122 when hook requests it, independently of grub_errno.
7123 (gpt_partition_map_probe): Do not fail when find_func() caused
7124 early abortion of gpt_partition_map_iterate().
7125
7126 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7127 when hook requests it, independently of grub_errno. Do not fail when
7128 part_map_iterate_hook() caused early abortion of p->iterate().
7129
7130 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7131 when grub_partition_iterate() returned with non-zero.
7132
7133 2008-07-03 Pavel Roskin <proski@gnu.org>
7134
7135 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7136 like we do in grub_ata_pio_read().
7137 (grub_ata_readwrite): Always write individual sectors. Fix the
7138 sector count for the remainder.
7139 (grub_ata_write): Enable writing to ATA devices. Correctly
7140 report error for ATAPI devices.
7141
7142 2008-07-02 Pavel Roskin <proski@gnu.org>
7143
7144 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7145 warning.
7146
7147 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7148 for every read sector, we already increment it for the whole
7149 batch. This fixes reading more than 256 sectors at once.
7150
7151 * util/grub-editenv.c (cmd_info): Cast argument to long
7152 explicitly. ptrdiff_t reduces to int on i386.
7153
7154 * util/grub-editenv.c (main): Be specific which parameter is
7155 missing.
7156
7157 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7158 (memdisk): Make memdisk_orig_addr a pointer.
7159
7160 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7161 for file offsets, use grub_off_t instead. Fix printf format
7162 warnings.
7163
7164 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7165 there. Real unexpected warnings should not drown in the noise
7166 about known problems.
7167
7168 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7169 grub_disk_addr_t for memory addresses.
7170
7171 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7172 explicitly to fix a warning.
7173
7174 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7175
7176 * Makefile.in (MODULE_LDFLAGS): New variable.
7177 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7178 the linker accepts --build-id=none.
7179 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7180 MODULE_LDFLAGS.
7181 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7182
7183 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7184 those in Linux XFS code. Provide a way to access 64-bit parent
7185 inode.
7186 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7187 the end of struct grub_xfs_dir_header.
7188
7189 2008-07-02 Bean <bean123ch@gmail.com>
7190
7191 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7192 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7193 and GRUB_IEEE1275_FLAG_NO_ANSI.
7194
7195 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7196 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7197 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7198
7199 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7200 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7201
7202 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7203 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7204
7205 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7206 esc sequence on non ANSI terminal.
7207 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7208
7209 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7210 beginning of file.
7211
7212 2008-07-02 Bean <bean123ch@gmail.com>
7213
7214 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7215 (grub_editenv_SOURCES): New variable.
7216 (pkglib_MODULES): Add loadenv.mod.
7217 (loadenv_mod_SOURCES): New variable.
7218 (loadenv_mod_CFLAGS): Likewise.
7219 (loadenv_mod_LDFLAGS): Likewise.
7220
7221 * include/grub/envblk.h: New file.
7222
7223 * util/envblk.c: New file.
7224
7225 * util/grub-editenv.c: New file.
7226
7227 * commands/loadenv.c: New file.
7228
7229 2008-07-01 Pavel Roskin <proski@gnu.org>
7230
7231 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7232 not unsigned char. This fixes warnings and is consistent with
7233 other tags.
7234
7235 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7236
7237 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7238
7239 * term/tparm.c (analyze): Always set *popcount.
7240
7241 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7242 cast to fix a warning.
7243
7244 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7245 cast to suppress a warning.
7246
7247 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7248 grub_fshelp_read_file() expects.
7249
7250 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7251 write uuid as a 32-bit value in CPU byte order, so declare and
7252 use it as such.
7253
7254 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7255 long if the format specifier expects it.
7256 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7257 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7258 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7259 long to fix a warning.
7260 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7261 grub_dprintf() arguments to fix warnings.
7262
7263 2008-06-30 Pavel Roskin <proski@gnu.org>
7264
7265 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7266 install_bsd_part immediately before core.img is embedded or
7267 modified on disk. This fixes core.img verification if core.img
7268 cannot be embedded.
7269
7270 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7271 core_path to calculate the blocklist.
7272 Patch from Javier Martín <lordhabbit@gmail.com>
7273
7274 2008-06-29 Robert Millan <rmh@aybabtu.com>
7275
7276 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7277 block to disk block.
7278 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7279 Patch from Niels Böhm <bitbucket@arcor.de>
7280
7281 2008-06-29 Robert Millan <rmh@aybabtu.com>
7282
7283 * util/update-grub_lib.in (font_path): Search for fonts in
7284 /boot/grub first, which is more likely to be readable (we aren't
7285 deciding where fonts live, just looking for them).
7286
7287 2008-06-26 Pavel Roskin <proski@gnu.org>
7288
7289 * util/biosdisk.c (read_device_map): Don't leave dead map
7290 entries for devices failing stat() check.
7291
7292 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7293 core_path_dev for the core.img path on the target device.
7294
7295 2008-06-26 Robert Millan <rmh@aybabtu.com>
7296
7297 * disk/fs_uuid.c: New file.
7298 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7299 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7300 (fs_uuid_mod_LDFLAGS): New variables.
7301 * include/grub/disk.h (grub_disk_dev_id): Add
7302 `GRUB_DISK_DEVICE_UUID_ID'.
7303 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7304 implement iterate().
7305
7306 2008-06-26 Robert Millan <rmh@aybabtu.com>
7307
7308 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7309 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7310 Linux image includes no initrd.
7311
7312 2008-06-21 Javier Martín <lordhabbit@gmail.com>
7313
7314 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7315 call to resolve the core image location that effectively appended the
7316 name twice.
7317
7318 2008-06-21 Robert Millan <rmh@aybabtu.com>
7319
7320 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7321 call from here ...
7322
7323 * util/grub.d/10_hurd.in: ... to here ...
7324 * util/grub.d/10_linux.in: ... and here.
7325
7326 2008-06-19 Robert Millan <rmh@aybabtu.com>
7327
7328 * kern/main.c (grub_main): Export `prefix' variable immediately
7329 after it has been set by grub_machine_set_prefix().
7330
7331 2008-06-19 Robert Millan <rmh@aybabtu.com>
7332
7333 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7334 search result when not saving to variable, not the other way around.
7335 When saving to variable, abort iteration as soon as a match is found.
7336
7337 2008-06-19 Robert Millan <rmh@aybabtu.com>
7338
7339 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7340 check for partition that provides /boot/grub. Its logic is flawed,
7341 as it prevents prepare_grub_to_access_device() from being called
7342 multiple times.
7343
7344 2008-06-19 Robert Millan <rmh@aybabtu.com>
7345
7346 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7347 "insmod" command directly when abstraction modules are needed,
7348 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7349 since it had already been processed).
7350
7351 2008-06-19 Pavel Roskin <proski@gnu.org>
7352
7353 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7354 changed. This is needed in case GRUB_LIBDIR changes.
7355 * conf/i386-ieee1275.rmk: Likewise.
7356 * conf/i386-linuxbios.rmk: Likewise.
7357 * conf/i386-pc.rmk: Likewise.
7358 * conf/powerpc-ieee1275.rmk: Likewise.
7359
7360 2008-06-18 Pavel Roskin <proski@gnu.org>
7361
7362 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7363 kernel_elf_symlist.c to symlist.c for consistency with other
7364 architectures. Update all users.
7365 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7366
7367 2008-06-18 Robert Millan <rmh@aybabtu.com>
7368
7369 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7370 it in prefix.
7371
7372 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7373 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7374 a RAID device, run setup() for all members independently on whether
7375 LVM abstraction is being used.
7376 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7377 If grub-mkimage has set `*install_dos_part == -2', don't override this
7378 value.
7379 Perform *install_dos_part adjustments independently on whether
7380 we're embedding or not.
7381 Clarify error message when image is too big for embedding.
7382 Remove duplicate *install_dos_part stanza.
7383
7384 2008-06-17 Robert Millan <rmh@aybabtu.com>
7385
7386 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7387 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7388 variables.
7389 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7390 values in grub_ofconsole_normal_color and
7391 grub_ofconsole_highlight_color (they're not directly related to
7392 background and foreground).
7393 (grub_ofconsole_setcolorstate): Extract background and foreground
7394 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7395
7396 2008-06-17 Robert Millan <rmh@aybabtu.com>
7397
7398 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7399 /boot/grub for the check in last commit, not /boot (they could be
7400 different partitions).
7401
7402 2008-06-16 Robert Millan <rmh@aybabtu.com>
7403
7404 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7405 asked to setup access for the same partition that provides /boot,
7406 don't bother using UUIDs since our root already has the value we
7407 want.
7408
7409 2008-06-16 Robert Millan <rmh@aybabtu.com>
7410
7411 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7412 I2O devices.
7413 Patch from Sven Mueller <sven@debian.org>.
7414
7415 2008-06-16 Robert Millan <rmh@aybabtu.com>
7416
7417 * util/update-grub.in: Check for $EUID instead of $UID.
7418 Reported by Vincent Zweije.
7419
7420 2008-06-16 Bean <bean123ch@gmail.com>
7421
7422 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7423 (grub_ext2_read_block): Likewise.
7424 (grub_ext2_read_inode): Likewise.
7425 (grub_ext2_mount): Likewise.
7426 (grub_ext2_close): Likewise.
7427 (grub_ext3_get_journal): Removed.
7428
7429 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7430 (grub_reiserfs_read_symlink): Likewise.
7431 (grub_reiserfs_mount): Likewise.
7432 (grub_reiserfs_open): Likewise.
7433 (grub_reiserfs_read): Likewise.
7434 (grub_reiserfs_close): Likewise.
7435 (grub_reiserfs_get_journal): Removed.
7436
7437 * fs/fshelp.c (grub_fshelp_read): Removed.
7438 (grub_fshelp_map_block): Likewise.
7439
7440 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7441 (grub_fshelp_journal): Likewise.
7442 (grub_fshelp_read): Likewise.
7443 (grub_fshelp_map_block): Likewise.
7444
7445 2008-06-16 Pavel Roskin <proski@gnu.org>
7446
7447 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7448 floating point anymore.
7449 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7450
7451 2008-06-15 Pavel Roskin <proski@gnu.org>
7452
7453 * commands/ls.c (grub_ls_list_files): Use integer calculations
7454 for human readable format, avoid floating point use.
7455 * kern/misc.c (grub_ftoa): Remove.
7456 (grub_vsprintf): Remove floating point support.
7457
7458 2008-06-15 Robert Millan <rmh@aybabtu.com>
7459
7460 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7461 devices.
7462 Reported by Max Vozeler.
7463
7464 2008-06-15 Robert Millan <rmh@aybabtu.com>
7465
7466 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7467 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7468 skipped later.
7469 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7470 the beginning of the prefix.
7471
7472 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7473 It is assumed that if we have a memdisk, grub-mkimage has set
7474 grub_prefix to include the "(memdisk)" drive in it.
7475
7476 2008-06-15 Robert Millan <rmh@aybabtu.com>
7477
7478 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7479 Initialize keyboard controller after registering the terminal, so that
7480 grub_printf() can be called from grub_keyboard_controller_init().
7481
7482 2008-06-15 Robert Millan <rmh@aybabtu.com>
7483
7484 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7485 extent-btree which is written as big endian on disk.
7486 Reported by Alain Greppin <al@chilibi.org>.
7487
7488 2008-06-14 Robert Millan <rmh@aybabtu.com>
7489
7490 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7491 * util/i386/pc/grub-install.in (modules): Likewise.
7492
7493 2008-06-13 Pavel Roskin <proski@gnu.org>
7494
7495 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7496
7497 2008-06-13 Bean <bean123ch@gmail.com>
7498
7499 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7500
7501 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7502
7503 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7504 to indicate sparse block.
7505
7506 2008-06-12 Pavel Roskin <proski@gnu.org>
7507
7508 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7509 number, grub_fshelp_read() does it for us.
7510
7511 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7512 linear disk read with journal translation.
7513 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7514 * include/grub/fshelp.h: Declare grub_fshelp_read().
7515
7516 2008-06-09 Pavel Roskin <proski@gnu.org>
7517
7518 * fs/minix.c (grub_minix_mount): Handle error reading
7519 superblock.
7520
7521 2008-06-08 Robert Millan <rmh@aybabtu.com>
7522
7523 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7524 don't append the RAID prefix afterwards.
7525 Reported by Clint Adams.
7526
7527 2008-06-08 Robert Millan <rmh@aybabtu.com>
7528
7529 Based on description from Pavel:
7530 * kern/disk.c (grub_disk_check_range): Rename to ...
7531 (grub_disk_adjust_range): ... this. Add a comment explaining the
7532 tasks performed by this function.
7533
7534 2008-06-08 Robert Millan <rmh@aybabtu.com>
7535
7536 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7537 `num_serial' (for consistency with other variables).
7538 (struct grub_ntfs_data): Add `uuid' member.
7539 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7540 (grub_ntfs_uuid): New function.
7541 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7542
7543 2008-06-07 Pavel Roskin <proski@gnu.org>
7544
7545 * util/biosdisk.c (open_device): Revert last change to the
7546 function, it broke installation. The sector needs to be
7547 different dependent on which device is opened.
7548
7549 2008-06-06 Robert Millan <rmh@aybabtu.com>
7550
7551 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7552 rest of GRUB, and breakage doesn't happen if its value were modified.
7553
7554 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7555 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7556 a constant (same value).
7557 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7558 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7559
7560 2008-06-06 Robert Millan <rmh@aybabtu.com>
7561
7562 * util/biosdisk.c (open_device): Do not modify sector offset when
7563 accessing a partition. kern/disk.c already handles this for us.
7564
7565 2008-06-06 Robert Millan <rmh@aybabtu.com>
7566
7567 * util/grub-emu.c (grub_machine_init): Move code in this function from
7568 here ...
7569 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7570 segfault in case grub_printf() is called).
7571
7572 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7573 grub_probe. Update all users not to explicitly add it again.
7574 (grub_device): New variable; contains corresponding device for grubdir.
7575 (fs_module, partmap_module, devabstraction_module): Pass
7576 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7577 every time.
7578
7579 2008-06-05 Robert Millan <rmh@aybabtu.com>
7580
7581 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7582 is found, print it (same layout as with labels).
7583
7584 2008-06-04 Robert Millan <rmh@aybabtu.com>
7585
7586 * util/biosdisk.c (get_drive): Rename to ...
7587 (find_grub_drive): ... this. Update all users.
7588
7589 (get_os_disk): Rename to ...
7590 (convert_system_partition_to_system_disk): ... this. Update all users.
7591
7592 (find_drive): Rename to ...
7593 (find_system_device): ... this. Update all users.
7594
7595 2008-06-04 Robert Millan <rmh@aybabtu.com>
7596
7597 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7598 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7599 (make_device_map): Likewise.
7600
7601 2008-06-01 Robert Millan <rmh@aybabtu.com>
7602
7603 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7604 before dereferencing it.
7605
7606 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7607 union with fat12/fat16-specific ones. Add some new fields, including
7608 `num_serial' for both versions.
7609 (struct grub_fat_data): Add `uuid' member.
7610 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7611 names. Initialize `data->uuid' using `num_serial'.
7612 (grub_fat_uuid): New function.
7613 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7614
7615 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7616 (grub_reiserfs_uuid): New function.
7617 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7618 member.
7619
7620 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7621 (grub_xfs_uuid): New function.
7622 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7623
7624 2008-06-01 Robert Millan <rmh@aybabtu.com>
7625
7626 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7627 code that is backward compatible with pre-uuid search command.
7628
7629 2008-05-31 Robert Millan <rmh@aybabtu.com>
7630
7631 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7632 floppies after everything else, to ensure floppy drive isn't accessed
7633 unnecessarily (patch from Bean).
7634
7635 2008-05-31 Robert Millan <rmh@aybabtu.com>
7636
7637 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7638 not print device names when we were asked to set a variable.
7639
7640 2008-05-31 Robert Millan <rmh@aybabtu.com>
7641
7642 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7643 using "cursor-on" and "cursor-off" commands (understood at least by
7644 the Open Firmware flavour on OLPC).
7645
7646 2008-05-31 Michael Gorven <michael@gorven.za.net>
7647
7648 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7649 on and off sequences.
7650
7651 2008-05-31 Robert Millan <rmh@aybabtu.com>
7652
7653 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7654 * util/update-grub.in: Likewise.
7655
7656 2008-05-30 Pavel Roskin <proski@gnu.org>
7657
7658 * util/biosdisk.c (linux_find_partition): Simplify logic and
7659 make the code more universal. Keep special processing for
7660 devfs, but use a simple rule for all other devices. If the
7661 device ends with a number, append 'p' and the partition number.
7662 Otherwise, append only the partition number.
7663
7664 2008-05-30 Robert Millan <rmh@aybabtu.com>
7665
7666 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7667 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7668 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7669 the `root' parameter to Linux.
7670
7671 2008-05-30 Robert Millan <rmh@aybabtu.com>
7672
7673 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7674 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7675 --fs_uuid with --fs-uuid.
7676 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7677 all filesystems support them).
7678
7679 2008-05-30 Robert Millan <rmh@aybabtu.com>
7680
7681 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7682 grub_printf() flags, since we're printing in units of 2 bytes.
7683
7684 2008-05-30 Robert Millan <rmh@aybabtu.com>
7685
7686 * util/grub.d/00_header.in: Remove obsolete comment referencing
7687 convert_system_path_to_grub_path().
7688 * util/update-grub.in: Likewise.
7689 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7690 (convert_system_path_to_grub_path): Add a warning message explaining
7691 that this function is deprecated. Rely on is_path_readable_by_grub()
7692 for the readability checks.
7693 (font_path): Use is_path_readable_by_grub() for the readability
7694 check rather than convert_system_path_to_grub_path().
7695
7696 2008-05-30 Robert Millan <rmh@aybabtu.com>
7697
7698 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7699 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7700 converting it first.
7701 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7702 grub.cfg for access to font file, and afterwards call it again to set
7703 the root device.
7704
7705 2008-05-30 Robert Millan <rmh@aybabtu.com>
7706
7707 * commands/search.c (options): Add --fs_uuid option.
7708 (search_fs_uuid): New function.
7709 (grub_cmd_search): Fix --set argument passing.
7710 Use search_fs_uuid() when requested via --fs_uuid.
7711 (grub_search_init): Update help message.
7712 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7713 and redeclare it as an array of 16-bit words.
7714 (grub_ext2_uuid): New function.
7715 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7716 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7717 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7718 (GRUB_DEVICE_BOOT_UUID): New variables.
7719 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7720 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7721 whenever possible.
7722 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7723 just assume `root' variable has the right value.
7724 * util/grub.d/10_linux.in: Likewise.
7725 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7726 via PRINT_FS_UUID.
7727 (main): Recognise `-t fs_uuid' argument.
7728
7729 2008-05-30 Robert Millan <rmh@aybabtu.com>
7730
7731 * util/biosdisk.c (map): Redefine structure to hold information
7732 about GRUB drive name.
7733 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7734 drive names.
7735 (call_hook): Remove.
7736 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7737 member. Assume drive has partitions.
7738 (grub_util_biosdisk_open): Access device names via `.device' struct
7739 member.
7740 (open_device): Likewise.
7741 (find_drive): Likewise.
7742 (read_device_map): Adjust map[] usage to match the new struct
7743 definition. Don't check for duplicates (still possible, but not cheap
7744 anymore).
7745 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7746 (make_device_name): Remove assumption of BIOS-like drive names.
7747
7748 2008-05-30 Pavel Roskin <proski@gnu.org>
7749
7750 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7751 compiling execute.c doesn't need grub_script.tab.h anymore.
7752 (normal/command.c_DEPENDENCIES): Likewise.
7753 (normal/function.c_DEPENDENCIES): Likewise.
7754 * conf/i386-ieee1275.rmk: Likewise.
7755 * conf/i386-linuxbios.rmk: Likewise.
7756 * conf/i386-pc.rmk: Likewise.
7757 * conf/powerpc-ieee1275.rmk: Likewise.
7758 * conf/sparc64-ieee1275.rmk: Likewise.
7759
7760 2008-05-29 Pavel Roskin <proski@gnu.org>
7761
7762 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7763 when scanning metadata for volume group name.
7764
7765 * include/grub/script.h: Don't include grub_script.tab.h. It's
7766 a generated file, which may only be included from the files with
7767 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7768 use union YYSTYPE, as the later allows forward declaration.
7769 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7770
7771 2008-05-29 Robert Millan <rmh@aybabtu.com>
7772
7773 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7774 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7775 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7776 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7777 scan codes.
7778
7779 2008-05-29 Robert Millan <rmh@aybabtu.com>
7780
7781 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7782 control key combinations.
7783
7784 2008-05-29 Robert Millan <rmh@aybabtu.com>
7785
7786 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7787 * util/ieee1275/grub-install.in: ... to here.
7788 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7789 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7790 (grub_install_SOURCES): Likewise.
7791
7792 2008-05-29 Robert Millan <rmh@aybabtu.com>
7793
7794 * fs/affs.c: Update copyright year.
7795 * fs/ext2.c: Likewise.
7796 * fs/fshelp.c: Likewise.
7797 * fs/hfsplus.c: Likewise.
7798 * fs/ntfs.c: Likewise.
7799 * fs/xfs.c: Likewise.
7800 * include/grub/fshelp.h: Likewise.
7801 * util/grub-mkdevicemap.c: Likewise.
7802
7803 2008-05-28 Robert Millan <rmh@aybabtu.com>
7804
7805 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7806 might need to be fatfs to support some firmware implementations
7807 (e.g. OFW or EFI).
7808
7809 2008-05-28 Robert Millan <rmh@aybabtu.com>
7810
7811 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7812 devices.
7813 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7814 (make_device_map): Likewise.
7815
7816 2008-05-20 Bean <bean123ch@gmail.com>
7817
7818 * fs/fshelp.c (grub_fshelp_map_block): New function.
7819 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7820 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7821
7822 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7823 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7824 (grub_fshelp_journal): New structure.
7825 (grub_fshelp_map_block): New function prototype.
7826 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7827 (grub_fshelp_map_block): Likewise.
7828
7829 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7830 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7831 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7832 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7833 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7834 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7835 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7836 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7837 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7838 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7839 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7840 (grub_ext2_sblock): New members for journal support.
7841 (grub_ext3_journal_header): New structure.
7842 (grub_ext3_journal_revoke_header): Likewise.
7843 (grub_ext3_journal_block_tag): Likewise.
7844 (grub_ext3_journal_sblock): Likewise.
7845 (grub_fshelp_node): New members logfile and journal.
7846 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7847 grub_fshelp_map_block to get real block number.
7848 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7849 number.
7850 (grub_ext2_read_inode): Likewise.
7851 (grub_ext3_get_journal): New function.
7852 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7853 (grub_ext2_close): Release memory used by journal.
7854
7855 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7856 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7857 (grub_reiserfs_transaction_header): Renamed to
7858 grub_reiserfs_description_block, replace field data with real_blocks.
7859 (grub_reiserfs_commit_block): New structure.
7860 (grub_reiserfs_data): New member journal.
7861 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7862 number.
7863 (grub_reiserfs_read_symlink): Likewise.
7864 (grub_reiserfs_iterate_dir): Likewise.
7865 (grub_reiserfs_open): Likewise.
7866 (grub_reiserfs_read): Likewise.
7867 (grub_reiserfs_get_journal): New function.
7868 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7869 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7870 using grub_reiserfs_get_journal.
7871 (grub_reiserfs_close): Release memory used by journal.
7872
7873 * fs/affs.c (grub_affs_read_block): Change block type to
7874 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7875
7876 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7877
7878 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7879
7880 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7881
7882 * fs/udf.c (grub_udf_read_block): Change block type to
7883 grub_disk_addr_t. Use type cast to avoid warning.
7884
7885 * fs/xfs.c (grub_xfs_read_block): Likewise.
7886
7887 2008-05-16 Christian Franke <franke@computer.org>
7888
7889 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7890 to ensure that break with ESC will always work.
7891 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7892 Remove ESC from keyboard queue.
7893
7894 2008-05-16 Christian Franke <franke@computer.org>
7895
7896 * util/biosdisk.c: [__CYGWIN__] Add includes.
7897 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7898 (get_os_disk): Move variable declarations to OS specific
7899 parts to avoid warning.
7900 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7901 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7902 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7903 Cygwin.
7904 * util/getroot.c: [__CYGWIN__] Add includes.
7905 (strip_extra_slashes): Fix "/" case.
7906 [__CYGWIN__] (get_win32_path): New function.
7907 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7908 [__CYGWIN__] (find_root_device): Disable.
7909 [__CYGWIN__] (get_bootsec_serial): New function.
7910 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7911 [__linux__] (grub_guess_root_device): Add early returns to simplify
7912 structure.
7913 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7914 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7915 check for Linux only.
7916
7917 2008-05-15 Bean <bean123ch@gmail.com>
7918
7919 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7920 keyboard hang problem in apple's intel mac.
7921
7922 2008-05-09 Robert Millan <rmh@aybabtu.com>
7923
7924 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7925 devices.
7926 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7927 (make_device_map): Likewise.
7928 Reported by Aurelien Jarno <aurel32@debian.org>
7929
7930 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7931
7932 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7933 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7934 (make_device_map): Output entries for xvd type disks.
7935
7936 2008-05-07 Robert Millan <rmh@aybabtu.com>
7937
7938 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7939 devices.
7940 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7941 (make_device_map): Likewise.
7942 Reported by Roland Dreier <rdreier@cisco.com>
7943
7944 2008-05-07 Robert Millan <rmh@aybabtu.com>
7945
7946 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7947 grub_strstr() call. Correct a few mistakes in failure path handling.
7948
7949 2008-05-06 Robert Millan <rmh@aybabtu.com>
7950
7951 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7952 Do not print a trailing slash (therefore, the root directory is an
7953 empty string).
7954 (convert_system_path_to_grub_path): Do not remove trailing slash
7955 from make_system_path_relative_to_its_root() output.
7956
7957 * util/i386/pc/grub-install.in: Add trailing slash to output from
7958 make_system_path_relative_to_its_root().
7959
7960 2008-05-06 Robert Millan <rmh@aybabtu.com>
7961
7962 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7963 ensures that output lines aren't intermangled with those sent to
7964 stderr (via grub_util_info()).
7965 * util/grub-probe.c (grub_refresh): Likewise.
7966 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7967
7968 2008-05-05 Christian Franke <franke@computer.org>
7969
7970 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7971 Add Cygwin device names.
7972 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7973 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7974 (check_device): Return error instead of success on empty name.
7975 (make_device_map): Move label inside linux specific code to
7976 prevent compiler warning.
7977
7978 2008-04-30 Robert Millan <rmh@aybabtu.com>
7979
7980 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7981 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7982 first boot option.
7983 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7984
7985 2008-04-29 Robert Millan <rmh@aybabtu.com>
7986
7987 * docs/grub.cfg: New file (example GRUB configuration).
7988
7989 2008-04-26 Robert Millan <rmh@aybabtu.com>
7990
7991 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7992 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7993 and `disk/ieee1275/nand.c'.
7994
7995 2008-04-25 Bean <bean123ch@gmail.com>
7996
7997 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7998 i386-linuxbios.
7999
8000 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8001 change the buffer size to 4096 for cdrom device.
8002
8003 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8004 and nand.mod.
8005 (_linux_mod_SOURCES): New variable.
8006 (_linux_mod_CFLAGS): Likewise.
8007 (_linux_mod_LDFLAGS): Likewise.
8008 (linux_mod_SOURCES): Likewise.
8009 (linux_mod_CFLAGS): Likewise.
8010 (linux_mod_LDFLAGS): Likewise.
8011 (nand_mod_SOURCES): Likewise.
8012 (nand_mod_CFLAGS): Likewise.
8013 (nand_mod_LDFLAGS): Likewise.
8014
8015 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8016 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8017 type property. (nand device in olpc don't have this property)
8018
8019 * include/grub/disk.h (grub_disk_dev_id): New macro
8020 GRUB_DISK_DEVICE_NAND_ID.
8021
8022 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8023 function prototype.
8024 (grub_rescue_cmd_initrd): Likewise.
8025
8026 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8027 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8028 ofw_cif_handler and ofw_idt, adjust padding number.
8029
8030 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8031 GRUB_MACHINE_IEEE1275 is defined.
8032
8033 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8034 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8035
8036 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8037 on nested function heap_init.
8038 (grub_upper_mem): New variable for i386-ieee1275.
8039 (grub_get_extended_memory): New function for i386-ieee1275.
8040 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8041
8042 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8043 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8044 property.
8045
8046 * loader/i386/ieee1275/linux.c: New file.
8047
8048 * loader/i386/ieee1275/linux_normal.c: New file.
8049
8050 * disk/ieee1275/nand.c: New file.
8051
8052 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8053
8054 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8055 value.
8056 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8057
8058 2008-04-18 Robert Millan <rmh@aybabtu.com>
8059
8060 Restructures early code path on ieee1275 to unify grub_main() as
8061 the first C function that is executed in every platform.
8062
8063 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8064 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8065 cmain().
8066 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8067 * kern/ieee1275/cmain.c (cmain): Rename to ...
8068 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8069 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8070 at the beginning.
8071
8072 2008-04-18 Robert Millan <rmh@aybabtu.com>
8073
8074 * util/update-grub.in: Fix syntax error when setting
8075 `GRUB_PRELOAD_MODULES'.
8076 Reported by Stephane Chazelas <stephane@artesyncp.com>
8077
8078 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8079
8080 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8081 section into account, newer toolchains generate unique build ids
8082 * configure.ac: remove the test for --build-id=none acceptance,
8083 we want build ids to be preserved
8084 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8085 far from other sections don't cause the raw binary images grow
8086 size
8087
8088 2008-04-15 Robert Millan <rmh@aybabtu.com>
8089
8090 * disk/lvm.c: Update copyright year.
8091 * kern/misc.c: Likewise.
8092
8093 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8094
8095 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8096 there is no memory left for physical volume name.
8097
8098 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8099
8100 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8101 volume name mapping to support bigger than 9 character names properly.
8102
8103 2008-04-13 Robert Millan <rmh@aybabtu.com>
8104
8105 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8106 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8107
8108 2008-04-13 Christian Franke <franke@computer.org>
8109
8110 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8111 to create a floppy emulation boot CD when non emulation mode
8112 does not work.
8113 Enable Joliet CD filesystem extension.
8114
8115 2008-04-13 Robert Millan <rmh@aybabtu.com>
8116
8117 * kern/misc.c (grub_strncat): Fix off-by-one error.
8118 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8119
8120 * kern/env.c (grub_env_context_close): Clear current context, not
8121 previous one.
8122 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8123
8124 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8125
8126 2008-04-13 Robert Millan <rmh@aybabtu.com>
8127
8128 Improve robustness when handling LVM.
8129
8130 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8131 (and leave `*p' unmodified).
8132 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8133 through it.
8134 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8135 iterating through it.
8136 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8137 through it.
8138 (grub_lvm_scan_device): Check the return value (and fail gracefully
8139 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8140 Don't assume `vg->pvs != NULL' when iterating through it.
8141
8142 2008-04-13 Robert Millan <rmh@aybabtu.com>
8143
8144 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8145 * genmk.rb (partmap): New variable.
8146 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8147 (#{partmap}): New target rule.
8148 * genpartmaplist.sh: New file.
8149 * Makefile.in (pkglib_DATA): Add partmap.lst.
8150 (partmap.lst): New target rule.
8151 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8152 modules (including all partition maps), instead of preloading them.
8153
8154 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8155
8156 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8157 `linux-boot-prober' (if installed) to detect other operating
8158 systems which are installed on the computer and add them to
8159 the boot menu.
8160 * conf/common.rmk: Build and install 30_os-prober.
8161
8162 2008-04-12 Robert Millan <rmh@aybabtu.com>
8163
8164 * kern/powerpc/ieee1275/init.c: Move from here ...
8165 * kern/ieee1275/init.c: ... to here. Update all users.
8166
8167 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8168 * kern/ieee1275/cmain.c: ... to here. Update all users.
8169
8170 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8171 * kern/ieee1275/openfw.c: ... to here. Update all users.
8172
8173 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8174 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8175
8176 2008-04-10 Pavel Roskin <proski@gnu.org>
8177
8178 * configure.ac: Always use "_cv_" in cache variables for
8179 compatibility with Autoconf 2.62.
8180
8181 2008-04-07 Robert Millan <rmh@aybabtu.com>
8182
8183 Revert grub/machine/init.h addition by Pavel (since it breaks on
8184 i386-ieee1275 and others):
8185 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8186 * util/powerpc/ieee1275/misc.c: Likewise.
8187
8188 2008-04-07 Robert Millan <rmh@aybabtu.com>
8189
8190 * util/grub-probe.c (probe): Improve error message.
8191
8192 2008-04-07 Robert Millan <rmh@aybabtu.com>
8193
8194 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8195 (this prevents the presence of a bogus entry from ruining the whole
8196 thing).
8197
8198 2008-04-06 Pavel Roskin <proski@gnu.org>
8199
8200 * util/biosdisk.c: Include grub/util/biosdisk.h.
8201 * util/grub-fstest.c (execute_command): Make static.
8202 * util/grub-mkdevicemap.c (check_device): Likewise.
8203 * util/i386/pc/misc.c: Include grub/machine/init.h.
8204 * util/powerpc/ieee1275/misc.c: Likewise.
8205 * util/lvm.c: Include grub/util/lvm.h.
8206 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8207 grub/cache.h.
8208 * util/raid.c: Include grub/util/raid.h.
8209 (grub_util_getdiskname): Make static.
8210
8211 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8212 grub_hostfs_fini(), as they are called from grub_init_all() and
8213 grub_fini_all() respectively. This fixes an infinite loop in
8214 grub-fstest due to double registration of hostfs.
8215 Reported by Christian Franke <Christian.Franke@t-online.de>
8216
8217 2008-04-05 Pavel Roskin <proski@gnu.org>
8218
8219 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8220 all 8 functions. Otherwise, probe function 0 only.
8221
8222 2008-04-04 Pavel Roskin <proski@gnu.org>
8223
8224 * commands/lspci.c (grub_lspci_iter): Print the bus number
8225 correctly.
8226
8227 * commands/lspci.c (grub_pci_classes): Fix typos.
8228 (grub_lspci_iter): Don't print func twice. Print vendor ID
8229 before device ID, as it's normally done.
8230
8231 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8232 Fix signedness warnings.
8233 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8234 Likewise.
8235 * util/ieee1275/get_disk_name.c: Include config.h so that
8236 _GNU_SOURCE is defined and getline() is declared. Mark an
8237 unused argument as such. Fix a signedness warning.
8238
8239 2008-04-02 Pavel Roskin <proski@gnu.org>
8240
8241 * genkernsyms.sh.in: Use more robust assignments for CC and
8242 srcdir. Quote srcdir.
8243 * gensymlist.sh.in: Likewise. Assert at the compile time that
8244 the symbol table is not empty.
8245
8246 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8247 * fs/cpio.c (grub_cpio_read): Likewise.
8248
8249 2008-04-01 Pavel Roskin <proski@gnu.org>
8250
8251 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8252 * disk/host.c (grub_host_open): Likewise.
8253 * disk/loopback.c (grub_loopback_open): Likewise.
8254 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8255 disk->id as in disk/host.c, not a multi-character constant.
8256
8257 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8258 later is obsolete, potentially dangerous and sets a bad example.
8259 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8260 * util/misc.c (grub_util_get_image_size): Likewise.
8261
8262 * disk/loopback.c (options): Improve help for "--partitions".
8263
8264 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8265 options to align them with the short options, e.g. "echo -e".
8266
8267 2008-03-31 Bean <bean123ch@gmail.com>
8268
8269 * video/reader/png.c (grub_png_data): New member is_16bit and
8270 image_data.
8271 (grub_png_decode_image_header): Detect 16 bit png image.
8272 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8273 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8274 (grub_video_reader_png): Release memory occupied by image_data.
8275
8276 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8277 4096 bytes.
8278 (grub_nfs_mount): Skip the test for sector per cluster.
8279
8280 * include/grub/ntfs.h (MAX_SPC): Removed.
8281
8282 2008-03-31 Bean <bean123ch@gmail.com>
8283
8284 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8285 (grub_probe_SOURCES): Add fs/afs.c.
8286 (grub_fstest_SOURCES): Likewise.
8287 (afs_mod_SOURCES): New variable.
8288 (afs_mod_CFLAGS): Likewise.
8289 (afs_mod_LDFLAGS): Likewise.
8290
8291 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8292 (grub_emu_SOURCES): Likewise.
8293
8294 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8295
8296 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8297
8298 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8299
8300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8301
8302 * fs/afs.c: New file.
8303
8304 2008-03-30 Pavel Roskin <proski@gnu.org>
8305
8306 * disk/host.c: Include grub/misc.h to fix a warning.
8307 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8308 warnings about implicit declarations.
8309
8310 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8311 variable.
8312 * include/grub/i386/loader.h: Change declaration of
8313 grub_linux_boot() to match what grub_loader_set() expects.
8314 * util/getroot.c (grub_guess_root_device): Return const char* to
8315 fix a warning.
8316 * util/grub-probe.c (probe): Fix a warning about uninitialized
8317 abstraction_name variable.
8318 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8319 second argument as unused to fix a warning.
8320
8321 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8322 missing grub_error() call.
8323
8324 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8325 2.60 and newer uses it to define datadir.
8326
8327 * commands/sleep.c: Fix warning about implicit declaration.
8328 * disk/memdisk.c: Likewise.
8329 * loader/aout.c: Likewise.
8330 * loader/i386/bsd_normal.c: Likewise.
8331 * util/grub-probe.c: Likewise.
8332
8333 * commands/i386/cpuid.c (has_longmode): Make static.
8334 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8335 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8336
8337 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8338 GDT. This is more robust, as %ds can change.
8339 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8340 calling real_to_prot().
8341 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8342
8343 2008-03-28 Pavel Roskin <proski@gnu.org>
8344
8345 * kern/i386/pc/startup.S: Assert that uncompressed functions
8346 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8347 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8348 code, as they push parts of the code (error handlers) beyond
8349 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8350 code as correctness and size.
8351
8352 2008-03-28 Pavel Roskin <proski@gnu.org>
8353
8354 * kern/i386/pc/startup.S
8355 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8356 data block address to the real mode, keep offset minimal. This
8357 works around a bug in AWARD BIOS on old Athlon systems, which
8358 makes CD detection hang.
8359
8360 2008-03-26 Pavel Roskin <proski@gnu.org>
8361
8362 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8363 const.
8364 * include/grub/normal.h: Add grub_parse_color_name_pair()
8365 declaration.
8366
8367 2008-03-24 Bean <bean123ch@gmail.com>
8368
8369 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8370 (cd_count): Removed.
8371 (cd_drive): New variable.
8372 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8373 (grub_biosdisk_call_hook): Likewise.
8374 (grub_biosdisk_iterate): Change cdrom detection method.
8375 (grub_biosdisk_open): Replace cd_start with cd_drive.
8376 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8377 detect cdrom device.
8378
8379 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8380 Removed.
8381 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8382 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8383 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8384 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8385 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8386 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8387 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8388 (grub_biosdisk_cdrp): New structure.
8389 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8390
8391 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8392
8393 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8394 device.
8395
8396 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8397 New function.
8398
8399 2008-03-20 Robert Millan <rmh@aybabtu.com>
8400
8401 Remove 2 TiB limit in ata.mod.
8402 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8403 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8404 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8405 grub_uint64_t instead of grub_uint32_t.
8406
8407 2008-03-05 Bean <bean123ch@gmail.com>
8408
8409 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8410 (grub_multiboot): Set boot device.
8411
8412 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8413
8414 2008-03-02 Bean <bean123ch@gmail.com>
8415
8416 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8417 symlink_buffer.
8418
8419 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8420
8421 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8422 texinfo.tex.
8423
8424 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8425 modified.
8426
8427 * docs/fdl.texi: New file.
8428
8429 * docs/mdate-sh: New file. Copied from gnulib.
8430 * docs/texinfo.tex: Likewise.
8431
8432 * config.guess: Updated from gnulib.
8433 * install-sh: Likewise.
8434
8435 2008-02-28 Robert Millan <rmh@aybabtu.com>
8436
8437 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8438 (aout_mod_SOURCES): New variable.
8439 (aout_mod_CFLAGS): Likewise.
8440 (aout_mod_LDFLAGS): Likewise.
8441
8442 * conf/i386-ieee1275.rmk: Likewise.
8443
8444 2008-02-28 Robert Millan <rmh@aybabtu.com>
8445
8446 * util/update-grub.in: Reorganise terminal validity check. Accept
8447 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8448 Based on suggestion by Franklin PIAT.
8449
8450 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8451
8452 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8453 function.
8454 * util/getroot.c (grub_util_check_block_device): New function that
8455 returns the given argument if it is a block device and returns NULL else.
8456 * util/grub-probe.c (argument_is_device): New variable.
8457 (probe): Promote device_name from a variable to an argument. Receive
8458 device_name from grub_util_check_block_device() if path is NULL and from
8459 grub_guess_root_device() else. Do not free() device_name anymore.
8460 (options): Introduce new parameter '-d, --device'.
8461 (main): Add description of the new parameter to the help screen.
8462 Rename path variable to argument. Set argument_is_device if the '-d'
8463 option is given. Pass argument to probe() depending on
8464 argument_is_device.
8465
8466 2008-02-24 Bean <bean123ch@gmail.com>
8467
8468 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8469 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8470 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8471 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8472 (GRUB_ISO9660_VOLDESC_END): Likewise.
8473 (grub_iso9660_primary_voldesc): New member escape.
8474 (grub_iso9660_data): New member joliet.
8475 (grub_iso9660_convert_string): New function.
8476 (grub_iso9660_mount): Detect joliet extension.
8477 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8478 (grub_iso9660_iso9660_label): Likewise.
8479
8480 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8481 (grub_setup_SOURCES): Add fs/udf.c.
8482 (grub_fstest_SOURCES): Likewise.
8483 (udf_mod_SOURCES): New variable.
8484 (udf_mod_CFLAGS): Likewise.
8485 (udf_mod_LDFLAGS): Likewise.
8486
8487 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8488 (grub_emu_SOURCES): Likewise.
8489
8490 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8491
8492 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8493
8494 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8495
8496 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8497
8498 * fs/udf.c: New file.
8499
8500 2008-02-24 Robert Millan <rmh@aybabtu.com>
8501
8502 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8503 (normal/lexer.c_DEPENDENCIES): New variables.
8504 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8505 (normal/lexer.c_DEPENDENCIES): Likewise.
8506 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8507 (normal/lexer.c_DEPENDENCIES): Likewise.
8508 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8509 (normal/lexer.c_DEPENDENCIES): Likewise.
8510 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8511 (normal/lexer.c_DEPENDENCIES): Likewise.
8512 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8513 (normal/lexer.c_DEPENDENCIES): Likewise.
8514
8515 2008-02-23 Robert Millan <rmh@aybabtu.com>
8516
8517 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8518 since they were intended to be in hex. This didn't break previously
8519 because of a bug in gpt_partition_map_iterate() (see below).
8520
8521 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8522 when checking the validity of GPT header.
8523 Remove `partno', since it always provides the same information as `i'.
8524
8525 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8526
8527 * include/grub/efi/time.h: Fix a wrong comment.
8528
8529 2008-02-19 Pavel Roskin <proski@gnu.org>
8530
8531 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8532 message.
8533
8534 2008-02-19 Bean <bean123ch@gmail.com>
8535
8536 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8537 (aout_mod_SOURCES): New variable.
8538 (aout_mod_CFLAGS): Likewise.
8539 (aout_mod_LDFLAGS): Likewise.
8540 (_bsd_mod_SOURCES): New variable.
8541 (_bsd_mod_CFLAGS): Likewise.
8542 (_bsd_mod_LDFLAGS): Likewise.
8543 (bsd_mod_SOURCES): New variable.
8544 (bsd_mod_CFLAGS): Likewise.
8545 (bsd_mod_LDFLAGS): Likewise.
8546
8547 * include/grub/aout.h: New file.
8548
8549 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8550
8551 * include/grub/i386/bsd.h: New file.
8552
8553 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8554 to make it public.
8555
8556 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8557 function is called, so that it's possible to change it inside the hook.
8558 (grub_elf64_load): Likewise.
8559 (grub_elf_file): Don't close the file if elf header is not found.
8560 (grub_elf_close): Close the file if grub_elf_file fails (The new
8561 grub_elf_file won't close it).
8562 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8563 (grub_elf64_size): Likewise.
8564
8565 * kern/i386/loader.S (grub_unix_real_boot): New function.
8566
8567 * loader/aout.c: New file.
8568
8569 * loader/i386/bsd.c: New file.
8570
8571 * loader/i386/bsd_normal.c: New file.
8572
8573 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8574
8575 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8576 can test other formats.
8577
8578 2008-02-19 Robert Millan <rmh@aybabtu.com>
8579
8580 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8581 (grub_gpt_partition_type_empty): Redefine with macro from
8582 `<grub/gpt_partition.h>'.
8583 (gpt_partition_map_iterate): Adjust partition type comparison.
8584
8585 Export `entry' as partmap-specific `part.data' struct.
8586 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8587
8588 * include/grub/gpt_partition.h (grub_gpt_header)
8589 (grub_gpt_partentry): ... to here (new file).
8590
8591 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8592
8593 (grub_gpt_partition_type_bios_boot): New const variable, defined
8594 with macro from `<grub/gpt_partition.h>'.
8595
8596 (setup): Replace `first_start' with `embed_region', which keeps
8597 track of the embed region (and is partmap-agnostic).
8598
8599 Replace find_first_partition_start() with find_usable_region(),
8600 which finds a usable region for embedding using partmap-specific
8601 knowledge (supports PC/MSDOS and GPT).
8602
8603 Fix all assumptions that the embed region start at sector 1, using
8604 `embed_region.start' from now on. Similarly, use `embed_region.end'
8605 rather than `first_start' to calculate available size.
8606
8607 In grub_util_info() message, replace "into after the MBR" with an
8608 indication of the specific sector our embed region starts at.
8609
8610 2008-02-19 Robert Millan <rmh@aybabtu.com>
8611
8612 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8613 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8614 `commands/reboot.c'.
8615 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8616 (halt_mod_SOURCES): Likewise.
8617 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8618 (halt_mod_SOURCES): Likewise.
8619
8620 2008-02-17 Christian Franke <franke@computer.org>
8621
8622 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8623
8624 2008-02-17 Robert Millan <rmh@aybabtu.com>
8625
8626 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8627 set `first_start' to 0 for non-PC/MSDOS partition maps.
8628
8629 2008-02-16 Robert Millan <rmh@aybabtu.com>
8630
8631 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8632 do not assume partition map is PC/MSDOS before performing checks that
8633 are specific to that layout.
8634
8635 2008-02-13 Robert Millan <rmh@aybabtu.com>
8636
8637 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8638 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8639 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8640
8641 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8642
8643 * configure.ac: Only a cosmetic change on the handling of
8644 -fno-stack-protector.
8645
8646 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8647
8648 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8649 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8650 reboot.c.
8651 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8652 (halt_mod_SOURCES): New variable.
8653 (halt_mod_CFLAGS): Likewise.
8654 (halt_mod_LDFLAGS): Likewise.
8655 (reboot_mod_SOURCES): Likewise.
8656 (reboot_mod_CFLAGS): Likewise.
8657 (reboot_mod_LDFLAGS): Likewise.
8658
8659 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8660 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8661 reboot.c.
8662 (halt_mod_SOURCES): Likewise.
8663 (reboot_mod_SOURCES): Likewise.
8664
8665 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8666 commands/i386/pc/reboot.c by commands/reboot.c.
8667 (reboot_mod_SOURCES): Likewise.
8668
8669 * commands/i386/pc/reboot.c: merge this file ...
8670
8671 * commands/ieee1275/reboot.c: ... and this file ...
8672
8673 * commands/reboot.c: ... to this file.
8674 Add some precompiler directive to include the correct header for
8675 each machine.
8676
8677 * commands/ieee1275/halt.c: move this file ...
8678
8679 * commands/halt.c: ... to here.
8680 Add some precompiler directive to include the correct header for
8681 each machine.
8682
8683 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8684 (grub_halt): Likewise.
8685
8686 * kern/efi/efi.c (grub_reboot): New function.
8687 (grub_halt): Likewise.
8688
8689 2008-02-12 Robert Millan <rmh@aybabtu.com>
8690
8691 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8692 /dev (like it is done for /dev/mapper). This doesn't provide support
8693 for EVMS, but at least it is now easy to identify the problem when it
8694 arises.
8695
8696 2008-02-11 Robert Millan <rmh@aybabtu.com>
8697
8698 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8699 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8700 comparing it with -1, not 0.
8701
8702 2008-02-10 Robert Millan <rmh@aybabtu.com>
8703
8704 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8705 `disk/lvm.c'.
8706 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8707 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8708
8709 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8710 `disk/lvm.c' to the end of the list.
8711 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8712 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8713
8714 2008-02-10 Robert Millan <rmh@aybabtu.com>
8715
8716 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8717 grub_print_error() instead. This will let user know why we're entering
8718 rescue mode.
8719 Based on suggestions from Sam Morris.
8720
8721 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8722
8723 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8724 on remaining N args, instead of "--" arg N times.
8725
8726 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8727
8728 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8729 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8730 pattern for unknown glyphs.
8731
8732 2008-02-09 Robert Millan <rmh@aybabtu.com>
8733
8734 * configure.ac: Probe for `help2man'.
8735 * Makefile.in (builddir): New variable.
8736 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8737 or otherwise add a few flags/options to it.
8738 (install-local): For every executable utility or script that is
8739 installed, invoke $(HELP2MAN) to install a manpage based on --help
8740 output.
8741
8742 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8743 that it doesn't prevent --help from working in build tree.
8744
8745 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8746 with `bug-grub@gnu.org'.
8747 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8748 * util/update-grub.in (usage): New function.
8749 Implement proper argument check, with support for --help and --version
8750 (as well as existing -y).
8751
8752 2008-02-09 Christian Franke <franke@computer.org>
8753
8754 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8755 avoid overwriting previous output.
8756 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8757
8758 2008-02-09 Robert Millan <rmh@aybabtu.com>
8759
8760 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8761 drawing the menu.
8762
8763 2008-02-09 Robert Millan <rmh@aybabtu.com>
8764
8765 * commands/sleep.c: New file.
8766 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8767 (sleep_mod_SOURCES): New variable.
8768 (sleep_mod_CFLAGS): Likewise.
8769 (sleep_mod_LDFLAGS): Likewise.
8770
8771 2008-02-09 Robert Millan <rmh@aybabtu.com>
8772
8773 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8774 situations in which we can deduce the RAID size and the superblock
8775 doesn't match it.
8776
8777 2008-02-09 Robert Millan <rmh@aybabtu.com>
8778
8779 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8780 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8781 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8782
8783 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8784 and return a grub_diskmemberlist_t composed of physical array members.
8785 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8786
8787 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8788 prototype.
8789 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8790 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8791 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8792
8793 * util/grub-probe.c (probe): Move partmap probing code from here ...
8794 (probe_partmap): ... to here.
8795 (probe): Use probe_partmap() once for the disk we're probing, and
8796 additionally, when such disk contains a memberlist() struct member,
8797 once for each disk that is contained in the structure returned by
8798 memberlist().
8799
8800 2008-02-09 Robert Millan <rmh@aybabtu.com>
8801
8802 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8803 environment variable to 'all' in order to obtain debug output from
8804 non-util/ code.
8805 * util/i386/pc/grub-setup.c (main): Likewise.
8806
8807 2008-02-08 Robert Millan <rmh@aybabtu.com>
8808
8809 * disk/raid.c (grub_raid_scan_device): Check for
8810 `array->device[sb.this_disk.number]' rather than for
8811 `array->device[sb.this_disk.number]->name', since the latter is not
8812 guaranteed to be accessible.
8813
8814 2008-02-08 Robert Millan <rmh@aybabtu.com>
8815
8816 * disk/raid.c: Update copyright.
8817 * fs/cpio.c: Likewise.
8818 * include/grub/raid.h: Likewise.
8819 * loader/i386/pc/multiboot.c: Likewise.
8820 * util/hostfs.c: Likewise.
8821
8822 2008-02-08 Robert Millan <rmh@aybabtu.com>
8823
8824 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8825 to a grub_disk_t array.
8826 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8827 `device[x]'.
8828 (grub_raid_scan_device): Replace `device[x].name' accesses with
8829 `device[x]->name'. Simplify initialization of `array->device[x]'.
8830
8831 2008-02-08 Robert Millan <rmh@aybabtu.com>
8832
8833 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8834 grub_dprintf() calls.
8835 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8836 error message.
8837
8838 2008-02-07 Christian Franke <franke@computer.org>
8839
8840 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8841 instead of fseek and ftell to support large files.
8842 (grub_hostfs_read): Likewise.
8843
8844 2008-02-07 Robert Millan <rmh@aybabtu.com>
8845
8846 Patch from Jeroen Dekkers.
8847 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8848 failure, since successfully reading all array members might not be
8849 required.
8850
8851 2008-02-06 Robert Millan <rmh@aybabtu.com>
8852
8853 * util/grub-probe.c (probe): Simplify partmap probing (with the
8854 assumption that the first word up to the underscore equals to
8855 the module name).
8856
8857 2008-02-06 Christian Franke <franke@computer.org>
8858
8859 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8860 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8861 last block of a cpio or tar stream.
8862 Check for "TRAILER!!!" instead of any empty data
8863 block to detect last block of a cpio stream.
8864 (grub_cpio_dir): Fix constness of variable np.
8865 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8866 cpio or tar trailer is detected. This fixes a crash
8867 on open of a non existing file.
8868
8869 2008-02-05 Bean <bean123ch@gmail.com>
8870
8871 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8872 address of entry.
8873 (grub_multiboot_load_elf64): Likewise.
8874 (grub_multiboot): Initialize mbi structure.
8875
8876 * util/grub-fstest.c: Don't include unused header file script.h.
8877
8878 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8879 of file.
8880 (grub_fstest_SOURCES): Likewise.
8881
8882 2008-02-05 Robert Millan <rmh@aybabtu.com>
8883
8884 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8885 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8886 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8887 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8888
8889 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8890 (translation_table): Replace hardcoded values with macros
8891 provided by `<grub/term.h>'.
8892
8893 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8894 (keyboard_map): Correct/add a few values, with macros provided
8895 by `<grub/term.h>'.
8896 (keyboard_map_shift): Zero values that don't differ from their
8897 `keyboard_map' equivalents.
8898 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8899 Discard the second scan code that is always sent by Caps lock.
8900 Only use `keyboard_map_shift' when it provides a non-zero value,
8901 otherwise fallback to `keyboard_map'.
8902
8903 2008-02-04 Bean <bean123ch@gmail.com>
8904
8905 * Makefile.in (enable_grub_fstest): New variable.
8906
8907 * conf/common.rmk (grub_fstest_init.lst): New rule.
8908 (grub_fstest_init.h): Likewise.
8909 (grub_fstest_init.c): Likewise.
8910 (util/grub-fstest.c_DEPENDENCIES): New variable.
8911 (grub_fstest_SOURCES): Likewise.
8912
8913 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8914
8915 * util/grub-fstest.c: New file.
8916
8917 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8918
8919 Make grub-setup handle a separate root device.
8920
8921 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8922 so that the root device can be compared with the destination
8923 device.
8924 When embedding the core image, if the root and destination devices
8925 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8926 0xFF.
8927 When not embedding, set ROOT_DRIVE to 0xFF.
8928
8929 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8930
8931 Add support for having a grub directory in a different drive. This
8932 is still only the data handling part.
8933
8934 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8935 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8936 (grub_root_drive): New variable.
8937
8938 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8939 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8940 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8941 as it was.
8942
8943 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8944
8945 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8946 macro.
8947 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8948
8949 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8950 is bogus, because PXE booting does not specify any drive
8951 correctly.
8952
8953 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8954 am not sure if this is really correct.
8955
8956 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8957 is always identical to the boot drive when booting from a CD.
8958
8959 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8960 longer.
8961 (root_drive): New variable.
8962 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8963 (setup_sectors): Push %dx right after popping it, because %dh will
8964 be modified later.
8965 (copy_buffer): Restore %dx.
8966
8967 2008-02-03 Robert Millan <rmh@aybabtu.com>
8968
8969 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8970 use `cdboot.img' for cdrom images.
8971
8972 2008-02-03 Robert Millan <rmh@aybabtu.com>
8973
8974 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8975 only setup gfxterm when `font' command has succeeded.
8976
8977 2008-02-03 Robert Millan <rmh@aybabtu.com>
8978
8979 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8980 (grub_rescue_cmd_multiboot_loader)
8981 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8982
8983 2008-02-03 Pavel Roskin <proski@gnu.org>
8984
8985 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8986 %edx and %esi from stack only after grub_gate_a20() is called.
8987 grub_gate_a20() clobbers %edx.
8988
8989 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8990
8991 * configure.ac (AC_INIT): Bumped to 1.96.
8992
8993 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8994 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8995 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8996 video/readers/png.c.
8997
8998 2008-02-03 Bean <bean123ch@gmail.com>
8999
9000 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9001 (cdboot_img_SOURCES): New variable.
9002 (cdboot_img_ASFLAGS): New variable.
9003 (cdboot_img_LDFLAGS): New variable.
9004
9005 * boot/i386/pc/cdboot.S: New file.
9006
9007 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9008 (cd_count): Likewise.
9009 (grub_biosdisk_get_drive): Add support for cd device.
9010 (grub_biosdisk_call_hook): Likewise.
9011 (grub_biosdisk_iterate): Likewise.
9012 (grub_biosdisk_open): Likewise.
9013 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9014 (grub_biosdisk_rw): Support reading from cd device.
9015 (GRUB_MOD_INIT): Iterate cd devices.
9016
9017 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9018 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9019 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9020
9021 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9022
9023 2008-02-02 Robert Millan <rmh@aybabtu.com>
9024
9025 * commands/read.c: New file.
9026 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9027 (read_mod_SOURCES): New variable.
9028 (read_mod_CFLAGS): Likewise.
9029 (read_mod_LDFLAGS): Likewise.
9030
9031 2008-02-02 Robert Millan <rmh@aybabtu.com>
9032
9033 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9034 determining whether menu has to be displayed.
9035
9036 2008-02-02 Marco Gerards <marco@gnu.org>
9037
9038 * bus/pci.c: New file.
9039
9040 * include/grub/pci.h: Likewise.
9041
9042 * include/grub/i386/pc/pci.h: Likewise.
9043
9044 * commands/lspci.c: Likewise.
9045
9046 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9047 `lspci.mod'.
9048 (pci_mod_SOURCES): New variable.
9049 (pci_mod_CFLAGS): Likewise.
9050 (pci_mod_LDFLAGS): Likewise.
9051 (lspci_mod_SOURCES): Likewise.
9052 (lspci_mod_CFLAGS): Likewise.
9053 (lspci_mod_LDFLAGS): Likewise.
9054
9055 2008-02-02 Bean <bean123ch@gmail.com>
9056
9057 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9058 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9059
9060 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9061 (grub_xfs_btree_node): New structure.
9062 (grub_xfs_btree_root): New structure.
9063 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9064 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9065 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9066 (GRUB_XFS_EXTENT_SIZE): Likewise.
9067 (grub_xfs_read_block): Support btree format type.
9068 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9069 Use directory block as basic unit.
9070
9071 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9072
9073 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9074 __attribute__ ((__regparm__ (1))).
9075
9076 2008-02-01 Robert Millan <rmh@aybabtu.com>
9077
9078 Correct a mistake in previous commit.
9079
9080 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9081 top.
9082 (normal/command.c_DEPENDENCIES): New variable.
9083
9084 2008-02-01 Robert Millan <rmh@aybabtu.com>
9085
9086 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9087 top.
9088 (normal/command.c_DEPENDENCIES): New variable.
9089 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9090 * conf/i386-ieee1275.rmk: Likewise.
9091 * conf/i386-linuxbios.rmk: Likewise.
9092 * conf/i386-pc.rmk: Likewise.
9093 * conf/sparc64-ieee1275.rmk: Likewise.
9094 * conf/powerpc-ieee1275.rmk: Likewise.
9095 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9096
9097 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9098
9099 2008-02-01 Robert Millan <rmh@aybabtu.com>
9100
9101 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9102 call at beginning of function.
9103
9104 2008-01-31 Pavel Roskin <proski@gnu.org>
9105
9106 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9107 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9108 (grub_mkrescue_SOURCES): Likewise.
9109 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9110
9111 2008-01-30 Robert Millan <rmh@aybabtu.com>
9112
9113 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9114 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9115 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9116 (grub_probe_SOURCES): ... to here.
9117
9118 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9119 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9120 * conf/i386-ieee1275.rmk: Likewise.
9121 * conf/i386-linuxbios.rmk: Likewise.
9122 * conf/powerpc-ieee1275.rmk: Likewise.
9123
9124 2008-01-30 Tristan Gingold <gingold@free.fr>
9125
9126 * kern/rescue.c: Silently accept empty lines.
9127
9128 2008-01-29 Bean <bean123ch@gmail.com>
9129
9130 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9131 (real_code_2): Code cleanup and change comment style.
9132 (move_memory): Avoid using 32-bit address mode.
9133
9134 2008-01-29 Bean <bean123ch@gmail.com>
9135
9136 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9137 (png_mod_SOURCES): New variable.
9138 (png_mod_CFLAGS): Likewise.
9139 (png_mod_LDFLAGS): Likewise.
9140
9141 * video/readers/png.c: New file.
9142
9143 2008-01-28 Robert Millan <rmh@aybabtu.com>
9144
9145 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9146 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9147 `ifndef GRUB_MOD_GAP' hack.
9148 * util/elf/grub-mkimage.c (add_segments): Likewise.
9149
9150 2008-01-27 Robert Millan <rmh@aybabtu.com>
9151
9152 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9153 `GRUB_MOD_GAP' for platforms in which it's not defined.
9154 * util/elf/grub-mkimage.c (add_segments): Likewise.
9155
9156 2008-01-27 Robert Millan <rmh@aybabtu.com>
9157
9158 Get grub-emu to build again (including parallel builds).
9159
9160 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9161 Split into ...
9162 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9163 (normal/execute.c_DEPENDENCIES): ... this, ...
9164 (grub-emu_DEPENDENCIES): ... and this.
9165
9166 * conf/i386-efi.rmk: Likewise.
9167 * conf/i386-linuxbios.rmk: Likewise.
9168 * conf/i386-ieee1275.rmk: Likewise.
9169 * conf/powerpc-ieee1275.rmk: Likewise.
9170 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9171
9172 2008-01-27 Robert Millan <rmh@aybabtu.com>
9173
9174 * NEWS: Add a few items.
9175
9176 2008-01-27 Robert Millan <rmh@aybabtu.com>
9177
9178 Fix parallel builds with grub-emu. Based on earlier commit for
9179 grub-probe and grub-setup.
9180
9181 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9182 (util/grub-emu.c_DEPENDENCIES): ... this.
9183 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9184 (util/grub-emu.c_DEPENDENCIES): ... this.
9185 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9186 (util/grub-emu.c_DEPENDENCIES): ... this.
9187 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9188 (util/grub-emu.c_DEPENDENCIES): ... this.
9189 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9190 (util/grub-emu.c_DEPENDENCIES): ... this.
9191
9192 2008-01-27 Pavel Roskin <proski@gnu.org>
9193
9194 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9195 to create a gap between _end and the modules added to the image
9196 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9197 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9198 * util/elf/grub-mkimage.c (add_segments): Likewise.
9199
9200 2008-01-26 Pavel Roskin <proski@gnu.org>
9201
9202 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9203 just return an error.
9204
9205 2008-01-26 Bean <bean123ch@gmail.com>
9206
9207 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9208 (grub_reiserfs_get_item): Save offset of the next item.
9209 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9210
9211 2008-01-25 Robert Millan <rmh@aybabtu.com>
9212
9213 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9214 make all filesystem sources appear together (possibly fixing omissions
9215 while at it).
9216 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9217 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9218 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9219 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9220
9221 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9222 add `kern/file.c'.
9223 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9224 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9225 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9226 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9227
9228 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9229 (probe): Add a sanity check to make sure of our ability to read
9230 requested files when probing for filesystem type.
9231
9232 * genmk.rb: Update copyright year (2007).
9233
9234 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9235 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9236 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9237 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9238 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9239 : Remove function prototypes.
9240
9241 2008-01-25 Robert Millan <rmh@aybabtu.com>
9242
9243 Revert my previous commits (based on wrong assumption of how grub_errno
9244 works).
9245
9246 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9247 * kern/file.c (grub_file_open): Likewise.
9248
9249 2008-01-24 Pavel Roskin <proski@gnu.org>
9250
9251 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9252 that hang if GRUB tries to setup colors.
9253 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9254 colors for firmwares that don't support it.
9255 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9256 Recognize Open Hack'Ware, set flags to work around its
9257 limitations.
9258
9259 2008-01-24 Robert Millan <rmh@aybabtu.com>
9260
9261 * kern/file.c (grub_file_open): Do not account previous failures of
9262 unrelated functions when grub_errno is checked for.
9263 Reported by Oleg Strikov.
9264
9265 2008-01-24 Bean <bean123ch@gmail.com>
9266
9267 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9268 (grub_ufs_sblock): New member volume name.
9269 (grub_ufs_find_file): Fix string copy bug.
9270 (grub_ufs_label): Implement this function properly.
9271
9272 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9273 (grub_hfs_iterate_records): Use the correct file number for extents
9274 and catalog file. Fix problem in next index calculation.
9275 (grub_hfs_find_node): Replace recursive function call with loop.
9276 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9277
9278 2008-01-23 Robert Millan <rmh@aybabtu.com>
9279
9280 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9281 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9282 (grub_multiboot2_real_boot): New function prototype.
9283
9284 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9285 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9286
9287 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9288 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9289
9290 2008-01-23 Robert Millan <rmh@aybabtu.com>
9291
9292 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9293 #ifdef'ed out grub_printf().
9294
9295 2008-01-23 Robert Millan <rmh@aybabtu.com>
9296
9297 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9298 grub_dprintf calls, since they make "debug=all" mode unusable.
9299 (grub_console_checkkey): Likewise.
9300
9301 2008-01-23 Robert Millan <rmh@aybabtu.com>
9302
9303 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9304 `term/i386/pc/at_keyboard.c'.
9305 (pkglib_MODULES): Add `serial.mod'.
9306 (serial_mod_SOURCES): New variable.
9307 (serial_mod_CFLAGS): Likewise.
9308 (serial_mod_LDFLAGS): Likewise.
9309
9310 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9311 `<grub/powerpc/ieee1275/console.h>'.
9312 (grub_keyboard_controller_init): New function prototype.
9313 (grub_console_checkkey): Likewise.
9314 (grub_console_getkey): Likewise.
9315
9316 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9317 keyboard on i386.
9318
9319 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9320 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9321
9322 2008-01-23 Robert Millan <rmh@aybabtu.com>
9323
9324 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9325 present, "(memdisk)/boot/grub" becomes the default prefix.
9326
9327 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9328 a memdisk tarball with all the modules. Add --overlay=DIR option that
9329 allows users to overlay additional files into the image.
9330
9331 2008-01-23 Robert Millan <rmh@aybabtu.com>
9332
9333 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9334 and `machine/memory.h'.
9335 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9336 (_multiboot_mod_SOURCES): New variable.
9337 (_multiboot_mod_CFLAGS): Likewise.
9338 (_multiboot_mod_LDFLAGS): Likewise.
9339 (multiboot_mod_SOURCES): Likewise.
9340 (multiboot_mod_CFLAGS): Likewise.
9341 (multiboot_mod_LDFLAGS): Likewise.
9342
9343 * include/grub/i386/ieee1275/loader.h: New file.
9344
9345 * include/grub/i386/ieee1275/machine.h: Likewise.
9346
9347 * include/grub/i386/ieee1275/memory.h: Likewise.
9348
9349 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9350 variable declaration.
9351 (grub_os_area_size): Likewise.
9352
9353 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9354 (grub_lower_mem, grub_upper_mem): New variables.
9355 (grub_stop_floppy): New function (just to make
9356 grub_multiboot2_real_boot() happy).
9357
9358 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9359 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9360 (grub_stop): New function.
9361 Include `"../realmode.S"' and `"../loader.S"'.
9362
9363 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9364 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9365
9366 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9367 rely on grub_multiboot2_real_boot() for final boot.
9368
9369 2008-01-22 Robert Millan <rmh@aybabtu.com>
9370
9371 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9372 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9373 device that doesn't look like an SD card.
9374 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9375 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9376 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9377 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9378 found.
9379
9380 2008-01-22 Robert Millan <rmh@aybabtu.com>
9381
9382 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9383 avoid claiming over our own code.
9384
9385 2008-01-22 Bean <bean123ch@gmail.com>
9386
9387 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9388 (jpeg_mod_SOURCES): New variable.
9389 (jpeg_mod_CFLAGS): Likewise.
9390 (jpeg_mod_LDFLAGS): Likewise.
9391
9392 * video/readers/jpeg.c : New file.
9393
9394 2008-01-22 Bean <bean123ch@gmail.com>
9395
9396 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9397 there are no more items.
9398
9399 2008-01-21 Robert Millan <rmh@aybabtu.com>
9400
9401 * kern/mm.c (grub_mm_init_region): Improve debug message.
9402
9403 2008-01-21 Robert Millan <rmh@aybabtu.com>
9404
9405 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9406 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9407 address.
9408 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9409 a C macro.
9410 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9411 Indicates start of upper memory.
9412 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9413 (generate_image): Abort when image size is big enough to corrupt
9414 upper memory.
9415
9416 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9417 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9418 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9419 instead of hardcoding 0xA0000.
9420 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9421 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9422 instead of hardcoding 0xA0000.
9423
9424 2008-01-21 Robert Millan <rmh@aybabtu.com>
9425
9426 * disk/memdisk.c (memdisk_size): New variable.
9427 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9428 `memdisk_size'.
9429 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9430 image to dynamic memory.
9431 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9432 `memdisk_size'. Free memdisk block.
9433
9434 2008-01-21 Robert Millan <rmh@aybabtu.com>
9435
9436 Fix detection of very small filesystems (like tar).
9437
9438 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9439 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9440 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9441 a problem with this disk).
9442
9443 2008-01-21 Robert Millan <rmh@aybabtu.com>
9444
9445 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9446 on grub_biosdisk_rw_standard() error.
9447
9448 2008-01-21 Robert Millan <rmh@aybabtu.com>
9449
9450 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9451 recent changes.
9452 * kern/elf.c: Likewise.
9453 * kern/ieee1275/ieee1275.c: Likewise.
9454 * kern/powerpc/ieee1275/openfw.c: Likewise.
9455 * term/ieee1275/ofconsole.c: Likewise.
9456
9457 2008-01-21 Robert Millan <rmh@aybabtu.com>
9458
9459 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9460
9461 * include/grub/kernel.h (grub_arch_memdisk_addr)
9462 (grub_arch_memdisk_size): Moved from here ...
9463
9464 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9465 (grub_arch_memdisk_size): ... to here.
9466
9467 2008-01-21 Robert Millan <rmh@aybabtu.com>
9468
9469 Mostly based on bugfix from Bean.
9470
9471 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9472 attribute with hook() parameter.
9473 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9474 declaration.
9475 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9476 attribute with hook() parameter.
9477 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9478 declaration.
9479
9480 2008-01-21 Robert Millan <rmh@aybabtu.com>
9481
9482 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9483 (pkglib_MODULES): Add `memdisk.mod'.
9484 (memdisk_mod_SOURCES): New variable.
9485 (memdisk_mod_CFLAGS): Likewise.
9486 (memdisk_mod_LDFLAGS): Likewise.
9487
9488 * disk/memdisk.c: New file.
9489
9490 * include/grub/disk.h (grub_disk_dev_id): Add
9491 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9492
9493 * include/grub/i386/pc/kernel.h
9494 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9495 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9496 (grub_kernel_image_size): New variable declaration.
9497 (grub_total_module_size): Likewise.
9498 (grub_memdisk_image_size): Likewise.
9499
9500 * include/grub/i386/pc/memory.h
9501 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9502
9503 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9504 (grub_arch_memdisk_addr): New variable declaration.
9505 (grub_arch_memdisk_size): Likewise.
9506
9507 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9508 (grub_arch_memdisk_size): Likewise.
9509
9510 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9511 (codestart): Replace hardcoded `0x100000' with
9512 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9513
9514 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9515 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9516 not NULL, append the contents of the file it refers to, at the end of
9517 the compressed kernel image. Initialize `grub_memdisk_image_size'
9518 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9519 (options): Add "memdisk"|'m' option.
9520 (main): Parse --memdisk|-m option, and pass user-provided path as
9521 parameter to generate_image().
9522
9523 2008-01-20 Robert Millan <rmh@aybabtu.com>
9524
9525 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9526 grub_dprintf() calls from here ...
9527 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9528
9529 2008-01-20 Robert Millan <rmh@aybabtu.com>
9530
9531 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9532
9533 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9534 declaration.
9535 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9536 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9537 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9538 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9539 property).
9540 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9541 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9542
9543 2008-01-19 Robert Millan <rmh@aybabtu.com>
9544
9545 Get rid of confusing function (superseded by
9546 `grub_ieee1275_get_integer_property')
9547 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9548 prototype.
9549 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9550 function.
9551 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9552 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9553 in native endianness from grub_ieee1275_get_integer_property().
9554
9555 2008-01-19 Robert Millan <rmh@aybabtu.com>
9556
9557 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9558 command after "shut-down", since implementations differ on which
9559 the command for halt is.
9560
9561 2008-01-19 Robert Millan <rmh@aybabtu.com>
9562
9563 * include/grub/i386/linuxbios/console.h: Add header protection.
9564 (grub_keyboard_controller_init): New function prototype.
9565 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9566 (KEYBOARD_COMMAND_READ): Likewise.
9567 (KEYBOARD_COMMAND_WRITE): Likewise.
9568 (KEYBOARD_SCANCODE_SET1): Likewise.
9569 (grub_keyboard_controller_write): New function.
9570 (grub_keyboard_controller_read): Likewise.
9571 (grub_keyboard_controller_init): Likewise.
9572
9573 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9574 (grub_console_init): On coreboot/LinuxBIOS, call
9575 grub_keyboard_controller_init().
9576
9577 2008-01-19 Robert Millan <rmh@aybabtu.com>
9578
9579 PowerPC changes provided by Pavel Roskin.
9580
9581 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9582 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9583 don't rely on cmain() doing it.
9584 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9585 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9586
9587 2008-01-16 Robert Millan <rmh@aybabtu.com>
9588
9589 * include/grub/i386/linuxbios/memory.h
9590 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9591 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9592 receive `table_header' as argument. Instead, probe for it in the
9593 known memory ranges where it can be present.
9594 (grub_available_iterate): Do not pass a fixed `table_header' address
9595 to grub_linuxbios_table_iterate().
9596
9597 2008-01-15 Robert Millan <rmh@aybabtu.com>
9598
9599 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9600 * conf/i386-ieee1275.rmk: New file.
9601 * include/grub/i386/ieee1275/console.h: Likewise.
9602 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9603 * include/grub/i386/ieee1275/kernel.h: Likewise.
9604 * include/grub/i386/ieee1275/time.h: Likewise.
9605 * kern/i386/ieee1275/init.c: Likewise.
9606 * kern/i386/ieee1275/startup.S: Likewise.
9607
9608 2008-01-15 Robert Millan <rmh@aybabtu.com>
9609
9610 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9611 when pointers are 32-bit (but still do set it to one when they are
9612 64-bit).
9613
9614 2008-01-15 Robert Millan <rmh@aybabtu.com>
9615
9616 * include/grub/ieee1275/ieee1275.h
9617 (grub_ieee1275_get_integer_property): New function prototype.
9618
9619 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9620 (grub_ieee1275_get_integer_property): New function. Wraps around
9621 grub_ieee1275_get_property() to handle endianness.
9622
9623 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9624 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9625 where appropriate.
9626 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9627 (grub_map): Likewise.
9628 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9629
9630 2008-01-15 Bean <bean123ch@gmail.com>
9631
9632 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9633 (grub_script_execute_cmdline): Reset grub_errno.
9634
9635 * normal/main.c (read_config_file): Reset grub_errno.
9636
9637 * normal/parse.y (script_init): New.
9638 (script): Move function and menuentry here.
9639 (delimiter): New.
9640 (command): Add delimiter at the end of command.
9641 (commands): Adjust to match the new command.
9642 (commandblock): Remove grub_script_lexer_record_start.
9643 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9644 (if): Use the new commands.
9645
9646 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9647
9648 2008-01-15 Robert Millan <rmh@aybabtu.com>
9649
9650 * normal/menu.c (run_menu): Move timeout message from here ...
9651 (print_timeout): ... to here.
9652 (run_menu): Use print_timeout() once during initial draw to print
9653 the whole message, and again in every clock tick to update only
9654 the number of seconds.
9655
9656 2008-01-15 Robert Millan <rmh@aybabtu.com>
9657
9658 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9659 actual size of `available' from grub_ieee1275_get_property(), and
9660 restrict parsing to that bound.
9661
9662 2008-01-15 Christian Franke <franke@computer.org>
9663
9664 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9665 (argp_program_version): Remove variable.
9666 (argp_program_bug_address): Likewise.
9667 (options): Convert from struct argp_option to struct option.
9668 (struct arguments): Remove.
9669 (parse_opt): Remove.
9670 (usage): New function.
9671 (main): Replace struct args members by simple variables.
9672 Replace argp_parse() by getopt_long().
9673 Add switch to evaluate options.
9674 Add missing "(...)" around root_dev in prefix string.
9675
9676 2008-01-14 Robert Millan <rmh@aybabtu.com>
9677
9678 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9679 for grub_ieee1275_exit(), in order to improve portability.
9680
9681 2008-01-14 Robert Millan <rmh@aybabtu.com>
9682
9683 * util/grub.d/10_linux.in (prefix): Define.
9684 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9685
9686 2008-01-13 Pavel Roskin <proski@gnu.org>
9687
9688 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9689 grub_errno if no errors have been detected.
9690
9691 2008-01-12 Robert Millan <rmh@aybabtu.com>
9692
9693 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9694 (grub_util_get_dev_abstraction): New function prototype.
9695
9696 * util/getroot.c: Include `<grub/util/getroot.h>'
9697 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9698 (grub_util_get_dev_abstraction): ... here (new function).
9699
9700 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9701 `PRINT_ABSTRACTION'.
9702 (probe): Probe for abstraction type when requested.
9703 (main): Understand `--target=abstraction'.
9704
9705 * util/i386/efi/grub-install.in: Add abstraction module to core
9706 image when it is found to be necessary.
9707 * util/i386/pc/grub-install.in: Likewise.
9708 * util/powerpc/ieee1275/grub-install.in: Likewise.
9709
9710 * util/update-grub_lib.in (font_path): Return system path without
9711 converting to GRUB path.
9712 * util/update-grub.in: Convert system path returned by font_path()
9713 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9714 abstraction module is needed for loading fonts (if any). Export
9715 that as `GRUB_PRELOAD_MODULES'.
9716 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9717 insmod commands).
9718
9719 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9720
9721 Remove some unused code from reiserfs.
9722
9723 * fs/reiserfs.c (struct grub_reiserfs_key)
9724 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9725 (struct grub_reiserfs_node_body): Removed.
9726 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9727 Likewise.
9728 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9729 Likewise.
9730 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9731 Likewise.
9732 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9733 Likewise.
9734 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9735 Likewise.
9736 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9737 Likewise.
9738 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9739 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9740 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9741
9742 2008-01-10 Robert Millan <rmh@aybabtu.com>
9743
9744 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9745 Determines if a file is garbage left by packaging systems, etc.
9746 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9747 for processing /etc/grub.d scripts.
9748 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9749 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9750 as a condition for processing Linux images.
9751
9752 2008-01-10 Pavel Roskin <proski@gnu.org>
9753
9754 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9755 to compile reiserfs.c on PowerPC.
9756
9757 2008-01-10 Robert Millan <rmh@aybabtu.com>
9758
9759 * kern/device.c (grub_device_iterate): Do not abort device iteration
9760 when one of the devices cannot be opened.
9761 * kern/disk.c (grub_disk_open): Do not account previous failures of
9762 unrelated functions when grub_errno is checked for.
9763
9764 2008-01-08 Robert Millan <rmh@aybabtu.com>
9765
9766 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9767 `! grub_linux_is_bzimage', change order of address comparison to make
9768 it more intuitive, and improve "too big zImage" error message.
9769
9770 2008-01-08 Robert Millan <rmh@aybabtu.com>
9771
9772 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9773 `$(update-grub_DATA)'.
9774 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9775 targets.
9776
9777 2008-01-07 Robert Millan <rmh@aybabtu.com>
9778
9779 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9780 which instruction is modified by grub-setup during installation
9781 (since it wasn't obvious by only looking at this file).
9782
9783 2008-01-07 Robert Millan <rmh@aybabtu.com>
9784
9785 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9786 listing actual TODO items.
9787
9788 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9789
9790 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9791 correctly.
9792 (grub_reiserfs_get_key_offset): Likewise.
9793 (grub_reiserfs_set_key_offset): Likewise.
9794 (grub_reiserfs_set_key_type): Likewise.
9795 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9796
9797 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9798 better to remove the bitfield version completely.
9799
9800 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9801
9802 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9803 allocated from the heap, due to the fshelp implementation.
9804 (grub_reiserfs_dir): Free NODE, due to the same reason.
9805
9806 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9807
9808 Mostly from Vincent Pelletier:
9809
9810 * fs/reiserfs.c: New file.
9811
9812 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9813 (reiserfs_mod_SOURCES): New variable.
9814 (reiserfs_mod_CFLAGS): Likewise.
9815 (reiserfs_mod_LDFLAGS): Likewise.
9816
9817 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9818 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9819 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9820 normal/color.c.
9821
9822 2008-01-06 Robert Millan <rmh@aybabtu.com>
9823
9824 * normal/color.c: Remove `<grub/env.h>'.
9825
9826 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9827
9828 * include/grub/normal.h: Include <grub/env.h>.
9829
9830 2008-01-05 Robert Millan <rmh@aybabtu.com>
9831
9832 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9833 usage example with `(hd0,1)'.
9834 Reported by Samuel Thibault.
9835
9836 2008-01-05 Robert Millan <rmh@aybabtu.com>
9837
9838 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9839 (grub_linux_boot_zimage): Rename to ...
9840 (grub_linux_boot): ... this.
9841 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9842 (grub_linux_boot_zimage): Conditionalize zImage copy.
9843
9844 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9845 (grub_linux_boot_bzimage): Remove prototype.
9846 (grub_linux_boot_zimage): Rename to ...
9847 (grub_linux_boot): ... this.
9848
9849 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9850 (grub_linux_boot): Remove function.
9851
9852 2008-01-05 Robert Millan <rmh@aybabtu.com>
9853
9854 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9855 (grub_env_write_color_highlight): Likewise.
9856 (grub_wait_after_message): Likewise.
9857
9858 * normal/color.c: New file.
9859
9860 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9861 (normal_mod_DEPENDENCIES): Likewise.
9862
9863 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9864 (normal_mod_DEPENDENCIES): Likewise.
9865
9866 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9867 (normal_mod_DEPENDENCIES): Likewise.
9868
9869 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9870 (normal_mod_DEPENDENCIES): Likewise.
9871
9872 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9873 for waiting after a message is printed.
9874 * normal/main.c (read_config_file): Likewise.
9875 (grub_normal_init): Register grub_env_write_color_normal() and
9876 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9877 `color_highlight' variables as global.
9878
9879 * normal/menu.c (grub_wait_after_message): New function.
9880 (grub_color_menu_normal): New variable. Replaces ...
9881 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9882 (grub_color_menu_highlight): New variable. Replaces ...
9883 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9884 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9885 `GRUB_TERM_COLOR_STANDARD'.
9886 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9887 `normal_code' and `highlight_code' to `old_color_normal' and
9888 `old_color_highlight', respectively.
9889 (grub_menu_init_page): Update colors when drawing the menu, based on
9890 `menu_color_normal' and `menu_color_highlight' variables.
9891 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9892 a message is printed.
9893
9894 2008-01-05 Robert Millan <rmh@aybabtu.com>
9895
9896 * kern/env.c (grub_env_context_open): Propagate hooks for global
9897 variables to new context.
9898
9899 * kern/main.c (grub_set_root_dev): Export `root' variable.
9900
9901 2008-01-05 Robert Millan <rmh@aybabtu.com>
9902
9903 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9904 discs unconditionally, since udev and others have options to provide
9905 them.
9906
9907 2008-01-05 Robert Millan <rmh@aybabtu.com>
9908
9909 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9910
9911 2008-01-04 Christian Franke <franke@computer.org>
9912
9913 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9914 of eisa_mmap.
9915
9916 2008-01-03 Pavel Roskin <proski@gnu.org>
9917
9918 * kern/i386/linuxbios/init.c: Put "void" to all function
9919 declarations with no arguments.
9920 * kern/powerpc/ieee1275/init.c: Likewise.
9921 * term/i386/pc/at_keyboard.c: Likewise.
9922 * term/i386/pc/vga_text.c: Likewise.
9923 * util/grub-mkdevicemap.c: Likewise.
9924
9925 2008-01-02 Robert Millan <rmh@aybabtu.com>
9926
9927 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9928 message when loaded image is out of bounds.
9929 (grub_multiboot_load_elf64): Likewise.
9930
9931 2008-01-02 Pavel Roskin <proski@gnu.org>
9932
9933 * util/grub.d/10_linux.in: Try version without ".old" when
9934 looking for initrd. It's better to use initrd from the newer
9935 kernel of the same version than no initrd at all.
9936
9937 2008-01-01 Robert Millan <rmh@aybabtu.com>
9938
9939 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9940
9941 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9942
9943 * include/grub/video.h: Added grub_video_unmap_color and
9944 grub_video_get_active_render_target.
9945 (grub_video_adapter): Added unmap_color and get_active_render_target.
9946
9947 * video/video.c: Added grub_video_unmap_color and
9948 grub_video_get_active_render_target.
9949 (grub_video_get_info): Changed method to accept NULL pointer as an
9950 argument to allow detection of active video adapter.
9951
9952 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9953 grub_video_vbe_unmap_color_int.
9954 Added grub_video_vbe_unmap_color and
9955 grub_video_vbe_get_active_render_target.
9956 (grub_video_vbe_adapter): Added unmap_color and
9957 get_active_render_target.
9958
9959 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9960 with grub_video_vbe_unmap_color_int.
9961
9962 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9963 (DEFAULT_NORMAL_COLOR): Likewise.
9964 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9965 (DEFAULT_FG_COLOR): Removed.
9966 (DEFAULT_BG_COLOR): Likewise.
9967 (DEFAULT_CURSOR_COLOR): Changed value.
9968 (grub_virtual_screen): Added standard_color_setting,
9969 normal_color_setting, highlight_color_setting and term_color.
9970 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9971 (bitmap_width): Added.
9972 (bitmap_height): Likewise.
9973 (bitmap): Likewise.
9974 (set_term_color): Likewise.
9975 (grub_virtual_screen_setup): Changed to use new terminal coloring
9976 settings.
9977 (grub_gfxterm_init): Added init for bitmap.
9978 (grub_gfxterm_fini): Added destroy for bitmap.
9979 (redraw_screen_rect): Updated to use background bitmap and new
9980 terminal coloring.
9981 (scroll_up): Added optimization for case when there is no bitmap.
9982 (grub_gfxterm_cls): Fixed to use correct background color.
9983 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9984 coloring.
9985 (grub_virtual_screen_setcolor): Likewise.
9986 (grub_virtual_screen_getcolor): Added.
9987 (grub_gfxterm_background_image_cmd): Likewise.
9988 (grub_video_term): Added setcolor and getcolor.
9989 (MOD_INIT): Added registration of background_image command.
9990 (MOD_TERM): Added unregistration for background_image command.
9991
9992 2007-12-30 Pavel Roskin <proski@gnu.org>
9993
9994 * loader/multiboot_loader.c: Fix multiboot command
9995 unregistration. Fix all typos in the word "multiboot".
9996
9997 2007-12-29 Pavel Roskin <proski@gnu.org>
9998
9999 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10000 support for initrd names used in Fedora.
10001
10002 2007-12-26 Bean <bean123ch@gmail.com>
10003
10004 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10005 (cpio_mod_SOURCES): New variable.
10006 (cpio_mod_CFLAGS): Likewise.
10007 (cpio_mod_LDFLAGS): Likewise.
10008
10009 * fs/cpio.c: New file.
10010
10011 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10012
10013 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10014
10015 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10016
10017 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10018
10019 2007-12-25 Robert Millan <rmh@aybabtu.com>
10020
10021 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10022 (grub_getcolor): New function.
10023
10024 * kern/term.c (grub_getcolor): New function.
10025 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10026 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10027 (print_entry): Set normal and highlight colors to
10028 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10029 respectively, before printing and restore them to old
10030 values afterwards.
10031 (grub_menu_init_page): Likewise. Fill an additional colored space
10032 that would otherwise be left blank.
10033
10034 * term/efi/console.c (grub_console_getcolor): New function.
10035 (struct grub_console_term.getcolor): New variable.
10036 * term/i386/pc/console.c (grub_console_getcolor): New function.
10037 (struct grub_console_term.getcolor): New variable.
10038 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10039 (struct grub_console_term.getcolor): New variable.
10040
10041 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10042 (struct grub_console_term.setcolor): Remove variable.
10043 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10044 (struct grub_console_term.setcolor): Remove variable.
10045 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10046 (struct grub_console_term.setcolor): Remove variable.
10047 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10048 (struct grub_console_term.setcolor): Remove variable.
10049
10050 2007-12-25 Robert Millan <rmh@aybabtu.com>
10051
10052 * configure.ac: Search for possible unifont.hex locations, and
10053 define UNIFONT_HEX if found.
10054
10055 * Makefile.in (UNIFONT_HEX): Define variable.
10056 (DATA): Rename to ...
10057 (PKGLIB): ... this. Update all users.
10058 (PKGDATA): New variable.
10059 (pkgdata_IMAGES): Rename to ...
10060 (pkglib_IMAGES): ... this. Update all users.
10061 (pkgdata_MODULES): Rename to ...
10062 (pkglib_MODULES): ... this. Update all users.
10063 (pkgdata_PROGRAMS): Rename to ...
10064 (pkglib_PROGRAMS): ... this. Update all users.
10065 (pkgdata_DATA): Rename to ...
10066 (pkglib_DATA): ... this. Update all users.
10067 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10068 (unicode.pff, ascii.pff): New rules.
10069 (all-local): Add `$(PKGDATA)' dependency.
10070 (install-local): Process `$(PKGDATA)'.
10071
10072 * util/update-grub_lib.in (font_path): Search for *.pff files in
10073 a few more locations, including `${pkgdata}'.
10074
10075 2007-12-23 Robert Millan <rmh@aybabtu.com>
10076
10077 Patch from Bean <bean123ch@gmail.com>:
10078 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10079 `size'.
10080
10081 2007-12-21 Bean <bean123ch@gmail.com>
10082
10083 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10084 (ntfscomp_mod_SOURCES): New variable.
10085 (ntfscomp_mod_CFLAGS): Likewise.
10086 (ntfscomp_mod_LDFLAGS): Likewise.
10087
10088 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10089 (grub_probe_SOURCES): Likewise.
10090 (grub_emu_SOURCES): Likewise.
10091
10092 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10093 (grub_emu_SOURCES): Likewise.
10094
10095 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10096 (grub_emu_SOURCES): Likewise.
10097
10098 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10099 (grub_emu_SOURCES): Likewise.
10100
10101 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10102 (read_run_list): Renamed to grub_ntfs_read_run_list.
10103 (decomp_nextvcn): Moved to ntfscomp.c.
10104 (decomp_getch): Likewise.
10105 (decomp_get16): Likewise.
10106 (decomp_block): Likewise.
10107 (read_block): Likewise.
10108 (read_data): Partially moved to ntfscomp.c.
10109 (fixup): Change unsigned to grub_uint16_t.
10110 (read_mft): Change unsigned long to grub_uint32_t.
10111 (read_attr): Likewise.
10112 (read_data): Likewise.
10113 (read_run_data): Likewise.
10114 (read_run_list): Likewise.
10115 (read_mft): Likewise.
10116
10117 * fs/ntfscomp.c: New file.
10118
10119 * include/grub/ntfs.h: New file.
10120
10121 2007-12-16 Robert Millan <rmh@aybabtu.com>
10122
10123 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10124 IDE disk check, since Linux is known to support 20 IDE disks.
10125 Reported by Colin Watson.
10126
10127 2007-12-15 Bean <bean123ch@gmail.com>
10128
10129 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10130 (lnxboot_img_SOURCES): New variable.
10131 (lnxboot_img_ASFLAGS): Likewise.
10132 (lnxboot_img_LDFLAGS): Likewise.
10133
10134 * boot/i386/pc/lnxboot.S: New file.
10135
10136 2007-11-24 Pavel Roskin <proski@gnu.org>
10137
10138 * configure.ac: Test if '--build-id=none' is supported by the
10139 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10140 objcopy to generate incorrect binary files (binutils
10141 2.17.50.0.18-1 as shipped by Fedora 8).
10142 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10143 linking, so that build ID doesn't break the test.
10144
10145 2007-11-24 Pavel Roskin <proski@gnu.org>
10146
10147 * include/grub/i386/time.h: use "void" in the argument list
10148 of grub_cpu_idle().
10149 * include/grub/powerpc/time.h: Likewise.
10150 * include/grub/sparc64/time.h: Likewise.
10151
10152 2007-11-18 Christian Franke <franke@computer.org>
10153
10154 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10155 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10156 This fixes the problem that function keys did not work in grub-emu.
10157
10158 2007-11-18 Christian Franke <franke@computer.org>
10159
10160 * disk/host.c (grub_host_open): Remove attribute unused from
10161 name parameter. Add check for "host". This fixes the problem
10162 that grub-emu does not find partitions.
10163
10164 2007-11-18 Christian Franke <franke@computer.org>
10165
10166 * util/hostfs.c (is_dir): New function.
10167 (grub_hostfs_dir): Handle missing dirent.d_type case.
10168 (grub_hostfs_read): Add missing fseek().
10169 (grub_hostfs_label): Clear label pointer. This fixes a crash
10170 of grub-emu on "ls (host)".
10171
10172 2007-11-18 Christian Franke <franke@computer.org>
10173
10174 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10175 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10176 to 64 bit boundary by default.
10177
10178 2007-11-18 Bean <bean123ch@gmail.com>
10179
10180 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10181 (hexdump_mod_SOURCES): New variable.
10182 (hexdump_mod_CFLAGS): Likewise.
10183 (hexdump_mod_LDFLAGS): Likewise.
10184
10185 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10186
10187 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10188
10189 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10190
10191 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10192
10193 * include/grub/hexdump.h: New file.
10194
10195 * commands/hexdump.c: New file.
10196
10197 2007-11-10 Robert Millan <rmh@aybabtu.com>
10198
10199 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10200 in grub_outb() calls.
10201 (beep_on): Likewise.
10202
10203 2007-11-10 Christian Franke <franke@computer.org>
10204
10205 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10206 (grub_menu_run): Likewise.
10207
10208 2007-11-10 Robert Millan <rmh@aybabtu.com>
10209
10210 * include/grub/i386/efi/machine.h: New file.
10211 * include/grub/i386/linuxbios/machine.h: Likewise.
10212 * include/grub/i386/pc/machine.h: Likewise.
10213 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10214 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10215
10216 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10217 (serial_hw_io_addr): New variable.
10218 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10219 instead of `(unsigned short *) 0x400'.
10220
10221 2007-11-10 Bean <bean123ch@gmail.com>
10222
10223 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10224
10225 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10226
10227 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10228 (vga_mod_SOURCES): Added.
10229 (vga_mod_CFLAGS): Likewise.
10230 (vga_mod_LDFLAGS): Likewise.
10231
10232 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10233 grub_outb() calls.
10234 (set_map_mask): Likewise.
10235 (set_read_map): Likewise.
10236 (set_read_address): Likewise.
10237 (vga_font): Removed variable.
10238 (get_vga_glyph): Removed function.
10239 (invalidate_char): Likewise.
10240 (write_char): Changed to use grub_font_get_glyph() for font
10241 information.
10242 (grub_vga_putchar): Likewise.
10243 (grub_vga_getcharwidth): Likewise.
10244
10245 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10246
10247 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10248 flags.
10249 (pxeboot_img_LDFLAGS): Likewise.
10250 (diskboot_img_LDFLAGS): Likewise.
10251 (kernel_img_LDFLAGS): Likewise.
10252
10253 2007-11-06 Robert Millan <rmh@aybabtu.com>
10254
10255 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10256 in grub_outb() calls.
10257 (serial_hw_init): Likewise.
10258
10259 2007-11-05 Robert Millan <rmh@aybabtu.com>
10260
10261 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10262 spaces. Skip non-regular files.
10263
10264 2007-11-05 Robert Millan <rmh@aybabtu.com>
10265
10266 * kern/disk.c (grub_disk_firmware_fini)
10267 (grub_disk_firmware_is_tainted): New variables.
10268
10269 * include/grub/disk.h (grub_disk_firmware_fini)
10270 (grub_disk_firmware_is_tainted): Likewise.
10271
10272 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10273 (grub_disk_biosdisk_fini): ... to here.
10274 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10275 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10276 is set. Register grub_disk_biosdisk_fini() in
10277 `grub_disk_firmware_fini'.
10278
10279 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10280 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10281 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10282 to finish existing firmware disk interface.
10283
10284 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10285 (ata_mod_SOURCES): New variable.
10286 (ata_mod_CFLAGS): Likewise.
10287 (ata_mod_LDFLAGS): Likewise.
10288
10289 2007-11-05 Robert Millan <rmh@aybabtu.com>
10290
10291 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10292 (grub_ata_wait): Reimplement using grub_millisleep().
10293
10294 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10295 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10296
10297 2007-11-03 Marco Gerards <marco@gnu.org>
10298
10299 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10300 (CRTC_ADDR_PORT): New macro.
10301 (CRTC_DATA_PORT): Likewise.
10302 (CRTC_CURSOR): Likewise.
10303 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10304 (CRTC_CURSOR_ADDR_LOW): Likewise.
10305 (update_cursor): New function.
10306 (grub_console_real_putchar): Call `update_cursor'.
10307 (grub_console_gotoxy): Likewise.
10308 (grub_console_cls): Set the default color when clearing the
10309 screen.
10310 (grub_console_setcursor): Implemented.
10311
10312 2007-11-03 Marco Gerards <marco@gnu.org>
10313
10314 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10315 become activate.
10316 (grub_ata_pio_write): Likewise.
10317
10318 (grub_atapi_identify): Wait after issuing an ATA command.
10319 (grub_atapi_packet): Likewise.
10320 (grub_ata_identify): Likewise.
10321 (grub_ata_readwrite): Likewise.
10322
10323 2007-11-03 Marco Gerards <marco@gnu.org>
10324
10325 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10326 (grub_ata_pio_write): Likewise.
10327 (grub_ata_readwrite): Use `grub_error', instead of
10328 returning `grub_errno'.
10329
10330 2007-11-03 Marco Gerards <marco@gnu.org>
10331
10332 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10333 grub_ata_pio_write once for every single sector, instead of for
10334 multiple sectors.
10335
10336 2007-10-31 Robert Millan <rmh@aybabtu.com>
10337
10338 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10339
10340 * conf/i386-linuxbios.rmk: New file.
10341
10342 * kern/i386/pc/hardware.c: Likewise.
10343 * term/i386/pc/at_keyboard.c: Likewise.
10344 * term/i386/pc/vga_text.c: Likewise.
10345
10346 * include/grub/i386/linuxbios/boot.h: Likewise.
10347 * include/grub/i386/linuxbios/console.h: Likewise.
10348 * include/grub/i386/linuxbios/init.h: Likewise.
10349 * include/grub/i386/linuxbios/kernel.h: Likewise.
10350 * include/grub/i386/linuxbios/loader.h: Likewise.
10351 * include/grub/i386/linuxbios/memory.h: Likewise.
10352 * include/grub/i386/linuxbios/serial.h: Likewise.
10353 * include/grub/i386/linuxbios/time.h: Likewise.
10354
10355 * kern/i386/linuxbios/init.c: Likewise.
10356 * kern/i386/linuxbios/startup.S: Likewise.
10357 * kern/i386/linuxbios/table.c: Likewise.
10358
10359 2007-10-31 Marco Gerards <marco@gnu.org>
10360
10361 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10362 (ata_mod_SOURCES): New variable.
10363 (ata_mod_CFLAGS): Likewise.
10364 (ata_mod_LDFLAGS): Likewise.
10365
10366 * disk/ata.c: New file.
10367
10368 * include/grub/disk.h (grub_disk_dev_id): Add
10369 `GRUB_DISK_DEV_ATA_ID'.
10370
10371 2007-10-31 Robert Millan <rmh@aybabtu.com>
10372
10373 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10374 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10375
10376 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10377 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10378
10379 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10380 `<grub/types.h>'.
10381
10382 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10383
10384 2007-10-27 Robert Millan <rmh@aybabtu.com>
10385
10386 * include/grub/types.h (ULONG_MAX): Define macro.
10387
10388 2007-10-22 Robert Millan <rmh@aybabtu.com>
10389
10390 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10391 `"../realmode.S"'.
10392 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10393
10394 2007-10-22 Robert Millan <rmh@aybabtu.com>
10395
10396 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10397 (pkgdata_MODULES): Add `biosdisk.mod'.
10398 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10399 variables.
10400
10401 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10402 (grub_biosdisk_init): Replace with ...
10403 (GRUB_MOD_INIT(biosdisk)): ... this.
10404 (grub_biosdisk_fini): Replace with ...
10405 (GRUB_MOD_FINI(biosdisk)): ... this.
10406
10407 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10408 (grub_machine_init): Remove call to grub_biosdisk_init().
10409 (grub_machine_fini): Remove call to grub_machine_fini().
10410
10411 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10412
10413 2007-10-22 Robert Millan <rmh@aybabtu.com>
10414
10415 * include/grub/time.h: New file.
10416 * include/grub/i386/time.h: Likewise.
10417 * include/grub/powerpc/time.h: Likewise.
10418 * include/grub/sparc64/time.h: Likewise.
10419
10420 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10421 instances to ...
10422 (KERNEL_MACHINE_TIME_HEADER): ... this.
10423 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10424 instances to ...
10425 (KERNEL_MACHINE_TIME_HEADER): ... this.
10426 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10427 instances to ...
10428 (KERNEL_MACHINE_TIME_HEADER): ... this.
10429
10430 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10431 (grub_millisleep): New function.
10432 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10433 (grub_millisleep): New function.
10434 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10435 Remove `grub/machine/time.h' include.
10436 (grub_millisleep): New function.
10437 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10438 Remove `grub/machine/time.h' include.
10439 (grub_millisleep): New function.
10440
10441 * include/grub/misc.h (grub_div_roundup): New function.
10442
10443 * kern/misc.c: Include `<grub/time.h>'.
10444 (grub_millisleep_generic): New function.
10445
10446 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10447 Add `time.h'.
10448 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10449 Add `time.h'.
10450 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10451 `machine/time.h'. Add `time.h'.
10452 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10453
10454 2007-10-21 Robert Millan <rmh@aybabtu.com>
10455
10456 * include/grub/misc.h (grub_max): New function.
10457
10458 2007-10-21 Robert Millan <rmh@aybabtu.com>
10459
10460 * util/misc.c (grub_util_info): Call fflush() before returning.
10461
10462 2007-10-20 Robert Millan <rmh@aybabtu.com>
10463
10464 * genmk.rb (Image): Copy `extra_flags' from here ...
10465 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10466
10467 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10468 to `argc' and `args' arguments.
10469
10470 2007-10-17 Robert Millan <rmh@aybabtu.com>
10471
10472 * kern/i386/loader.S: New file.
10473
10474 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10475 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10476 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10477 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10478 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10479 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10480 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10481 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10482 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10483 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10484 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10485 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10486 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10487 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10488
10489 * kern/i386/realmode.S: New file.
10490
10491 * kern/i386/pc/startup.S (protstack): Moved from here ...
10492 * kern/i386/realmode.S (protstack)... to here.
10493 * kern/i386/pc/startup.S (gdt): Moved from here ...
10494 * kern/i386/realmode.S (gdt)... to here.
10495 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10496 * kern/i386/realmode.S (prot_to_real)... to here.
10497
10498 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10499 `kern/i386/realmode.S'.
10500
10501 2007-10-17 Robert Millan <rmh@aybabtu.com>
10502
10503 * include/grub/i386/loader.h: New file.
10504
10505 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10506 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10507 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10508 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10509 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10510 * include/grub/i386/loader.h (grub_linux_prot_size)
10511 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10512 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10513 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10514 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10515
10516 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10517
10518 2007-10-15 Robert Millan <rmh@aybabtu.com>
10519
10520 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10521 filesystem when dev->disk is unset.
10522 Do probe for filesystem even when dev->disk->has_partitions is set.
10523 In case a filesystem is found, always report it.
10524 In case it isn't, if dev->disk->has_partitions is set, report that
10525 a partition table was found instead of reporting that no filesystem
10526 could be identified.
10527
10528 2007-10-12 Robert Millan <rmh@aybabtu.com>
10529
10530 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10531 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10532
10533 * include/grub/types.h (grub_host_to_target16): New macro.
10534 (grub_host_to_target32): Likewise.
10535 (grub_host_to_target64): Likewise.
10536 (grub_target_to_host16): Likewise.
10537 (grub_target_to_host32): Likewise.
10538 (grub_target_to_host64): Likewise.
10539
10540 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10541 Renamed from to ...
10542 (GRUB_MOD_ALIGN): ...this. Update all users.
10543
10544 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10545 grub_host_to_target32.
10546 Replace grub_be_to_cpu32 with grub_target_to_host32.
10547 (load_modules): Likewise.
10548 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10549 Replace grub_be_to_cpu32 with grub_target_to_host32.
10550 Replace grub_cpu_to_be16 with grub_host_to_target16.
10551 Replace grub_cpu_to_be32 grub_host_to_target32.
10552
10553 2007-10-12 Robert Millan <rmh@aybabtu.com>
10554
10555 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10556 * util/elf/grub-mkimage.c: ... here.
10557
10558 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10559 `util/powerpc/ieee1275/grub-mkimage.c'.
10560
10561 2007-10-07 Robert Millan <rmh@aybabtu.com>
10562
10563 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10564 and make it easier to figure out.
10565 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10566 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10567 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10568 leave us with less than HEAP_MIN_SIZE total heap.
10569 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10570
10571 2007-10-03 Robert Millan <rmh@aybabtu.com>
10572
10573 * include/grub/i386/io.h: New file.
10574 * commands/i386/pc/play.c (inb): Removed.
10575 (outb): Removed.
10576 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10577 with grub_outb().
10578 * term/i386/pc/serial.c (inb): Removed.
10579 (outb): Removed.
10580 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10581 with grub_outb().
10582 * term/i386/pc/vga.c (inb): Removed.
10583 (outb): Removed.
10584 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10585 with grub_outb().
10586
10587 2007-10-02 Robert Millan <rmh@aybabtu.com>
10588
10589 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10591 Reported by Marcin Kurek.
10592
10593 2007-09-07 Robert Millan <rmh@aybabtu.com>
10594
10595 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10596 SmartFirmware version updates (as released by Sven Luther), and avoid
10597 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10598 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10599 known broken.
10600
10601 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10602
10603 From Hitoshi Ozeki:
10604 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10605 when merging two regions.
10606
10607 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10608
10609 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10610 * normal/completion.c (grub_normal_do_completion): Likewise.
10611 Reported by Hitoshi Ozeki.
10612
10613 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10614
10615 Do not use devices at boot in chainloading.
10616
10617 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10618 (boot_part_addr): Likewise.
10619 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10620 with BOOT_DRIVE and BOOT_PART_ADDR.
10621 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10622 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10623
10624 2007-08-29 Robert Millan <rmh@aybabtu.com>
10625
10626 Patch from Simon Peter <dn.tlp@gmx.net>:
10627 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10628 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10629 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10630 util/i386/pc/grub-setup.c_DEPENDENCIES.
10631 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10632 util/grub-probe.c_DEPENDENCIES.
10633 * conf/powerpc-ieee1275.rmk: Likewise.
10634
10635 2007-08-28 Robert Millan <rmh@aybabtu.com>
10636
10637 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10638 to tell grub-mkdevicemap how to name devices.
10639 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10640 feature).
10641
10642 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10643 util/i386/get_disk_name.c.
10644 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10645 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10646 util/ieee1275/get_disk_name.c.
10647
10648 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10649
10650 * DISTLIST: Add util/i386/get_disk_name.c and
10651 util/ieee1275/get_disk_name.c.
10652
10653 * util/grub-mkdevicemap.c: Replace device naming logic with
10654 grub_util_get_disk_name() calls.
10655
10656 2007-08-20 Robert Millan <rmh@aybabtu.com>
10657
10658 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10659 (so that it works for both plural and singular quantities).
10660
10661 2007-08-05 Robert Millan <rmh@aybabtu.com>
10662
10663 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10664 so that [xz] isn't taken into account when determining order.
10665
10666 2007-08-02 Marco Gerards <marco@gnu.org>
10667
10668 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10669 `include/multiboot2.h', `include/grub/elfload.h',
10670 `include/multiboot.h', `include/grub/multiboot.h',
10671 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10672 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10673 `kern/elf.c', `loader/multiboot_loader.c',
10674 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10675 `loader/i386/pc/multiboot2.c',
10676 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10677 `util/i386/pc/grub-mkrescue.in'. Remove
10678 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10679 `include/grub/i386/pc/util/biosdisk.h' and
10680 `include/grub/powerpc/ieee1275/multiboot.h'.
10681
10682 2007-08-02 Bean <bean123ch@gmail.com>
10683
10684 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10685 (ntfs_mod_SOURCES): New variable.
10686 (ntfs_mod_CFLAGS): Likewise.
10687 (ntfs_mod_LDFLAGS): Likewise.
10688
10689 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10690 (grub_probe_SOURCES): Likewise.
10691 (grub_emu_SOURCES): Likewise.
10692
10693 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10694 (grub_emu_SOURCES): Likewise.
10695
10696 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10697 (grub_emu_SOURCES): Likewise.
10698
10699 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10700
10701 * fs/ntfs.c: New file.
10702
10703 2007-08-02 Bean <bean123ch@gmail.com>
10704
10705 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10706
10707 * file.h (grub_file): Likewise.
10708
10709 * fshelp.h (grub_fshelp_read_file): Likewise.
10710
10711 * util/i386/pc/grub-setup.c (setup): Likewise.
10712 (save_first_sector): Likewise.
10713 (save_blocklists): Likewise.
10714
10715 * fs/affs.c (grub_affs_read_file): Likewise.
10716
10717 * fs/ext2.c (grub_ext2_read_file): Likewise.
10718
10719 * fs/fat.c (grub_fat_read_data): Likewise.
10720
10721 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10722
10723 * fs/hfs.c (grub_hfs_read_file): Likewise.
10724
10725 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10726
10727 * fs/jfs.c (grub_jfs_read_file): Likewise.
10728
10729 * fs/minix.c (grub_minix_read_file): Likewise.
10730
10731 * fs/sfs.c (grub_sfs_read_file): Likewise.
10732
10733 * fs/ufs.c (grub_ufs_read_file): Likewise.
10734
10735 * fs/xfs.c (grub_xfs_read_file): Likewise.
10736
10737 * command/blocklist.c (read_blocklist): Likewise.
10738 (print_blocklist): Likewise.
10739
10740 2007-08-02 Marco Gerards <marco@gnu.org>
10741
10742 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10743 `util/hostfs.c'.
10744
10745 * disk/host.c: New file.
10746
10747 * util/hostfs.c: Likewise.
10748
10749 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10750 return `GRUB_ERR_BAD_FS'.
10751 * fs/sfs.c (grub_sfs_mount): Likewise.
10752 * fs/xfs.c (grub_xfs_mount): Likewise.
10753
10754 * include/grub/disk.h (enum grub_disk_dev_id): Add
10755 `GRUB_DISK_DEVICE_HOST_ID'.
10756
10757 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10758
10759 2007-07-24 Jerone Young <jerone@gmail.com>
10760
10761 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10762 modules for compilation.
10763 * conf/powerpc-ieee1275.rmk: Likewise.
10764
10765 * include/multiboot.h: Move multiboot definitions to one file. Rename
10766 many definitions to not get grub specific.
10767 * include/multiboot2.h: Create header with multiboot 2 definitions.
10768 * include/grub/multiboot.h: Header for grub specific function
10769 prototypes and definitions.
10770 * include/grub/multiboot2.h: Likewise.
10771 * include/grub/multiboot_loader.h: Likewise.
10772 * include/grub/i386/pc/multiboot.h: Removed.
10773 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10774
10775 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10776 and 2 to allow for one multiboot and module commands.
10777 * loader/multiboot2.c: Add multiboot2 functionality.
10778 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10779 and definition names.
10780 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10781 2 functions.
10782 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10783 ieee1275 specific multiboot2 code.
10784
10785 * kern/i386/pc/startup.S: Change headers and definition names for
10786 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10787
10788 2007-07-22 Robert Millan <rmh@aybabtu.com>
10789
10790 * geninitheader.sh: Process file specified in first parameter rather
10791 than hardcoding grub_modules_init.lst.
10792 * geninit.sh: Likewise. Also, construct header name dynamically rather
10793 than hardcoding grub_modules_init.h.
10794
10795 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10796 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10797 grub_probe_init.[ch] and grub_setup_init.[ch].
10798
10799 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10800 grub_modules_init.h with grub_emu_init.h.
10801 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10802 grub_probe_init.[ch] files.
10803 * conf/i386-efi.rmk: Likewise.
10804 * conf/i386-pc.rmk: Likewise.
10805 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10806 grub_setup_init.[ch] files.
10807
10808 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10809 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10810 to initialize modules rather than a list of hardcoded functions.
10811 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10812 grub_init_all() to initialize modules rather than a list of hardcoded
10813 functions.
10814
10815 2007-07-22 Robert Millan <rmh@aybabtu.com>
10816
10817 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10818 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10819
10820 2007-07-22 Robert Millan <rmh@aybabtu.com>
10821
10822 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10823 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10824 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10825 flag when running on SmartFirmware.
10826 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10827 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10828 was set.
10829
10830 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10831 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10832 rather than decreasing it.
10833
10834 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10835 there's not enough space to do it, fail in the same way as when it
10836 can't be done because there are no partitions.
10837
10838 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10839 when nvsetenv failed.
10840
10841 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10842
10843 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10844 because this rule is automatically generated.
10845 (grub-mkrescue): Removed for the same reason as above.
10846
10847 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10848
10849 Migrate to GNU General Public License Version 3.
10850
10851 * COPYING: Replaced with the plain text version of GPLv3.
10852
10853 * config.guess: Updated from gnulib.
10854 * config.sub: Likewise.
10855
10856 * geninit.sh: Output a GPLv3 copyright notice.
10857 * geninitheader.sh: Likewise.
10858 * genmodsrc.sh: Likewise.
10859 * gensymlist.sh.in: Likewise.
10860
10861 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10862 * boot/i386/pc/diskboot.S: Likewise.
10863 * boot/i386/pc/pxeboot.S: Likewise.
10864 * commands/blocklist.c: Likewise.
10865 * commands/boot.c: Likewise.
10866 * commands/cat.c: Likewise.
10867 * commands/cmp.c: Likewise.
10868 * commands/configfile.c: Likewise.
10869 * commands/echo.c: Likewise.
10870 * commands/help.c: Likewise.
10871 * commands/ls.c: Likewise.
10872 * commands/search.c: Likewise.
10873 * commands/terminal.c: Likewise.
10874 * commands/test.c: Likewise.
10875 * commands/videotest.c: Likewise.
10876 * commands/i386/cpuid.c: Likewise.
10877 * commands/i386/pc/halt.c: Likewise.
10878 * commands/i386/pc/play.c: Likewise.
10879 * commands/i386/pc/reboot.c: Likewise.
10880 * commands/i386/pc/vbeinfo.c: Likewise.
10881 * commands/i386/pc/vbetest.c: Likewise.
10882 * commands/ieee1275/halt.c: Likewise.
10883 * commands/ieee1275/reboot.c: Likewise.
10884 * commands/ieee1275/suspend.c: Likewise.
10885 * disk/loopback.c: Likewise.
10886 * disk/lvm.c: Likewise.
10887 * disk/raid.c: Likewise.
10888 * disk/efi/efidisk.c: Likewise.
10889 * disk/i386/pc/biosdisk.c: Likewise.
10890 * disk/ieee1275/ofdisk.c: Likewise.
10891 * font/manager.c: Likewise.
10892 * fs/affs.c: Likewise.
10893 * fs/ext2.c: Likewise.
10894 * fs/fat.c: Likewise.
10895 * fs/fshelp.c: Likewise.
10896 * fs/hfs.c: Likewise.
10897 * fs/hfsplus.c: Likewise.
10898 * fs/iso9660.c: Likewise.
10899 * fs/jfs.c: Likewise.
10900 * fs/minix.c: Likewise.
10901 * fs/sfs.c: Likewise.
10902 * fs/ufs.c: Likewise.
10903 * fs/xfs.c: Likewise.
10904 * hello/hello.c: Likewise.
10905 * include/grub/acorn_filecore.h: Likewise.
10906 * include/grub/arg.h: Likewise.
10907 * include/grub/bitmap.h: Likewise.
10908 * include/grub/boot.h: Likewise.
10909 * include/grub/cache.h: Likewise.
10910 * include/grub/device.h: Likewise.
10911 * include/grub/disk.h: Likewise.
10912 * include/grub/dl.h: Likewise.
10913 * include/grub/elfload.h: Likewise.
10914 * include/grub/env.h: Likewise.
10915 * include/grub/err.h: Likewise.
10916 * include/grub/file.h: Likewise.
10917 * include/grub/font.h: Likewise.
10918 * include/grub/fs.h: Likewise.
10919 * include/grub/fshelp.h: Likewise.
10920 * include/grub/gzio.h: Likewise.
10921 * include/grub/hfs.h: Likewise.
10922 * include/grub/kernel.h: Likewise.
10923 * include/grub/loader.h: Likewise.
10924 * include/grub/lvm.h: Likewise.
10925 * include/grub/misc.h: Likewise.
10926 * include/grub/mm.h: Likewise.
10927 * include/grub/net.h: Likewise.
10928 * include/grub/normal.h: Likewise.
10929 * include/grub/parser.h: Likewise.
10930 * include/grub/partition.h: Likewise.
10931 * include/grub/pc_partition.h: Likewise.
10932 * include/grub/raid.h: Likewise.
10933 * include/grub/rescue.h: Likewise.
10934 * include/grub/script.h: Likewise.
10935 * include/grub/setjmp.h: Likewise.
10936 * include/grub/symbol.h: Likewise.
10937 * include/grub/term.h: Likewise.
10938 * include/grub/terminfo.h: Likewise.
10939 * include/grub/tparm.h: Likewise.
10940 * include/grub/types.h: Likewise.
10941 * include/grub/video.h: Likewise.
10942 * include/grub/efi/api.h: Likewise.
10943 * include/grub/efi/chainloader.h: Likewise.
10944 * include/grub/efi/console.h: Likewise.
10945 * include/grub/efi/console_control.h: Likewise.
10946 * include/grub/efi/disk.h: Likewise.
10947 * include/grub/efi/efi.h: Likewise.
10948 * include/grub/efi/pe32.h: Likewise.
10949 * include/grub/efi/time.h: Likewise.
10950 * include/grub/i386/linux.h: Likewise.
10951 * include/grub/i386/setjmp.h: Likewise.
10952 * include/grub/i386/types.h: Likewise.
10953 * include/grub/i386/efi/kernel.h: Likewise.
10954 * include/grub/i386/efi/loader.h: Likewise.
10955 * include/grub/i386/efi/time.h: Likewise.
10956 * include/grub/i386/pc/biosdisk.h: Likewise.
10957 * include/grub/i386/pc/boot.h: Likewise.
10958 * include/grub/i386/pc/chainloader.h: Likewise.
10959 * include/grub/i386/pc/console.h: Likewise.
10960 * include/grub/i386/pc/init.h: Likewise.
10961 * include/grub/i386/pc/kernel.h: Likewise.
10962 * include/grub/i386/pc/loader.h: Likewise.
10963 * include/grub/i386/pc/memory.h: Likewise.
10964 * include/grub/i386/pc/multiboot.h: Likewise.
10965 * include/grub/i386/pc/serial.h: Likewise.
10966 * include/grub/i386/pc/time.h: Likewise.
10967 * include/grub/i386/pc/vbe.h: Likewise.
10968 * include/grub/i386/pc/vbeblit.h: Likewise.
10969 * include/grub/i386/pc/vbefill.h: Likewise.
10970 * include/grub/i386/pc/vbeutil.h: Likewise.
10971 * include/grub/i386/pc/vga.h: Likewise.
10972 * include/grub/ieee1275/ieee1275.h: Likewise.
10973 * include/grub/ieee1275/ofdisk.h: Likewise.
10974 * include/grub/powerpc/libgcc.h: Likewise.
10975 * include/grub/powerpc/setjmp.h: Likewise.
10976 * include/grub/powerpc/types.h: Likewise.
10977 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10978 * include/grub/powerpc/ieee1275/console.h: Likewise.
10979 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10980 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10981 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10982 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10983 * include/grub/powerpc/ieee1275/time.h: Likewise.
10984 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10985 * include/grub/sparc64/libgcc.h: Likewise.
10986 * include/grub/sparc64/setjmp.h: Likewise.
10987 * include/grub/sparc64/types.h: Likewise.
10988 * include/grub/sparc64/ieee1275/console.h: Likewise.
10989 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10990 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10991 * include/grub/sparc64/ieee1275/time.h: Likewise.
10992 * include/grub/util/biosdisk.h: Likewise.
10993 * include/grub/util/getroot.h: Likewise.
10994 * include/grub/util/lvm.h: Likewise.
10995 * include/grub/util/misc.h: Likewise.
10996 * include/grub/util/raid.h: Likewise.
10997 * include/grub/util/resolve.h: Likewise.
10998 * io/gzio.c: Likewise.
10999 * kern/device.c: Likewise.
11000 * kern/disk.c: Likewise.
11001 * kern/dl.c: Likewise.
11002 * kern/elf.c: Likewise.
11003 * kern/env.c: Likewise.
11004 * kern/err.c: Likewise.
11005 * kern/file.c: Likewise.
11006 * kern/fs.c: Likewise.
11007 * kern/loader.c: Likewise.
11008 * kern/main.c: Likewise.
11009 * kern/misc.c: Likewise.
11010 * kern/mm.c: Likewise.
11011 * kern/parser.c: Likewise.
11012 * kern/partition.c: Likewise.
11013 * kern/rescue.c: Likewise.
11014 * kern/term.c: Likewise.
11015 * kern/efi/efi.c: Likewise.
11016 * kern/efi/init.c: Likewise.
11017 * kern/efi/mm.c: Likewise.
11018 * kern/i386/dl.c: Likewise.
11019 * kern/i386/efi/init.c: Likewise.
11020 * kern/i386/efi/startup.S: Likewise.
11021 * kern/i386/pc/init.c: Likewise.
11022 * kern/i386/pc/lzo1x.S: Likewise.
11023 * kern/i386/pc/startup.S: Likewise.
11024 * kern/ieee1275/ieee1275.c: Likewise.
11025 * kern/powerpc/cache.S: Likewise.
11026 * kern/powerpc/dl.c: Likewise.
11027 * kern/powerpc/ieee1275/cmain.c: Likewise.
11028 * kern/powerpc/ieee1275/crt0.S: Likewise.
11029 * kern/powerpc/ieee1275/init.c: Likewise.
11030 * kern/powerpc/ieee1275/openfw.c: Likewise.
11031 * kern/sparc64/cache.S: Likewise.
11032 * kern/sparc64/dl.c: Likewise.
11033 * kern/sparc64/ieee1275/init.c: Likewise.
11034 * kern/sparc64/ieee1275/openfw.c: Likewise.
11035 * loader/efi/chainloader.c: Likewise.
11036 * loader/efi/chainloader_normal.c: Likewise.
11037 * loader/i386/efi/linux.c: Likewise.
11038 * loader/i386/efi/linux_normal.c: Likewise.
11039 * loader/i386/pc/chainloader.c: Likewise.
11040 * loader/i386/pc/chainloader_normal.c: Likewise.
11041 * loader/i386/pc/linux.c: Likewise.
11042 * loader/i386/pc/linux_normal.c: Likewise.
11043 * loader/i386/pc/multiboot.c: Likewise.
11044 * loader/i386/pc/multiboot_normal.c: Likewise.
11045 * loader/powerpc/ieee1275/linux.c: Likewise.
11046 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11047 * normal/arg.c: Likewise.
11048 * normal/cmdline.c: Likewise.
11049 * normal/command.c: Likewise.
11050 * normal/completion.c: Likewise.
11051 * normal/execute.c: Likewise.
11052 * normal/function.c: Likewise.
11053 * normal/lexer.c: Likewise.
11054 * normal/main.c: Likewise.
11055 * normal/menu.c: Likewise.
11056 * normal/menu_entry.c: Likewise.
11057 * normal/misc.c: Likewise.
11058 * normal/parser.y: Likewise.
11059 * normal/script.c: Likewise.
11060 * normal/i386/setjmp.S: Likewise.
11061 * normal/powerpc/setjmp.S: Likewise.
11062 * normal/sparc64/setjmp.S: Likewise.
11063 * partmap/acorn.c: Likewise.
11064 * partmap/amiga.c: Likewise.
11065 * partmap/apple.c: Likewise.
11066 * partmap/gpt.c: Likewise.
11067 * partmap/pc.c: Likewise.
11068 * partmap/sun.c: Likewise.
11069 * term/gfxterm.c: Likewise.
11070 * term/terminfo.c: Likewise.
11071 * term/efi/console.c: Likewise.
11072 * term/i386/pc/console.c: Likewise.
11073 * term/i386/pc/serial.c: Likewise.
11074 * term/i386/pc/vesafb.c: Likewise.
11075 * term/i386/pc/vga.c: Likewise.
11076 * term/ieee1275/ofconsole.c: Likewise.
11077 * util/biosdisk.c: Likewise.
11078 * util/console.c: Likewise.
11079 * util/genmoddep.c: Likewise.
11080 * util/getroot.c: Likewise.
11081 * util/grub-emu.c: Likewise.
11082 * util/grub-mkdevicemap.c: Likewise.
11083 * util/grub-probe.c: Likewise.
11084 * util/lvm.c: Likewise.
11085 * util/misc.c: Likewise.
11086 * util/raid.c: Likewise.
11087 * util/resolve.c: Likewise.
11088 * util/update-grub.in: Likewise.
11089 * util/update-grub_lib.in: Likewise.
11090 * util/grub.d/00_header.in: Likewise.
11091 * util/grub.d/10_hurd.in: Likewise.
11092 * util/grub.d/10_linux.in: Likewise.
11093 * util/i386/efi/grub-install.in: Likewise.
11094 * util/i386/efi/grub-mkimage.c: Likewise.
11095 * util/i386/pc/grub-install.in: Likewise.
11096 * util/i386/pc/grub-mkimage.c: Likewise.
11097 * util/i386/pc/grub-mkrescue.in: Likewise.
11098 * util/i386/pc/grub-setup.c: Likewise.
11099 * util/i386/pc/misc.c: Likewise.
11100 * util/powerpc/ieee1275/grub-install.in: Likewise.
11101 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11102 * util/powerpc/ieee1275/misc.c: Likewise.
11103 * video/bitmap.c: Likewise.
11104 * video/video.c: Likewise.
11105 * video/i386/pc/vbe.c: Likewise.
11106 * video/i386/pc/vbeblit.c: Likewise.
11107 * video/i386/pc/vbefill.c: Likewise.
11108 * video/i386/pc/vbeutil.c: Likewise.
11109 * video/readers/tga.c: Likewise.
11110
11111 2007-07-02 Robert Millan <rmh@aybabtu.com>
11112
11113 * conf/i386-efi.rmk: Replace obsolete reference to
11114 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11115 with util/getroot.c.
11116 * conf/powerpc-ieee1275.rmk: Likewise.
11117 * conf/sparc64-ieee1275.rmk: Likewise.
11118
11119 * util/grub-emu.c (main): Fix unchecked pointer handling.
11120
11121 2007-07-02 Robert Millan <rmh@aybabtu.com>
11122
11123 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11124 invocation to fail, in order to support partition-less media.
11125
11126 * util/i386/pc/grub-install.in: Likewise.
11127
11128 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11129 which fs or partmap modules are needed (akin to its sister scripts).
11130
11131 Also use grub-probe to get rid of unportable /proc/mounts check.
11132
11133 Print the same informational message that the other scripts do, before
11134 exiting.
11135
11136 2007-06-23 Robert Millan <rmh@aybabtu.com>
11137
11138 * util/update-grub_lib.in (font_path): New function. Determine whether
11139 a font file can be found and, if so, echo the GRUB path to it.
11140
11141 * util/update-grub.in: Handle multiple terminals depending on user
11142 input, platform availability and font file presence. Propagate
11143 variables of our findings to /etc/grub.d/ children.
11144
11145 * util/grub.d/00_header.in: Handle multiple terminals, based on
11146 environment setup by update-grub.
11147
11148 2007-06-23 Robert Millan <rmh@aybabtu.com>
11149
11150 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11151
11152 2007-06-21 Robert Millan <rmh@aybabtu.com>
11153
11154 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11155 indicate end of data section in kernel image.
11156 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11157 GRUB_KERNEL_MACHINE_DATA_END.
11158
11159 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11160 space for it.
11161 * kern/i386/efi/startup.S: Likewise.
11162
11163 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11164 during image generation. Implement --prefix option to override this
11165 patch.
11166 * util/i386/efi/grub-mkimage.c: Likewise.
11167
11168 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11169 code to make path relative to its root into a separate function.
11170
11171 * util/i386/pc/grub-install.in: Use newly provided
11172 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11173 pass the result to grub-install --prefix.
11174
11175 2007-06-13 Robert Millan <rmh@aybabtu.com>
11176
11177 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11178 DEFAULT_DEVICE_MAP.
11179 * util/grub-emu.c: Use above definitions from misc.h instead of
11180 defining them.
11181 * util/grub-mkdevicemap.c: Likewise.
11182 * util/i386/pc/grub-setup.c: Likewise.
11183 * util/grub-probe.c: Likewise.
11184 (probe): Abort with grub_util_error() when either
11185 grub_guess_root_device or grub_util_get_grub_dev fails.
11186
11187 2007-06-12 Robert Millan <rmh@aybabtu.com>
11188
11189 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11190 "pager" assignment.
11191 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11192 "pcdata".
11193 * util/grub-probe.c (probe): Likewise for "drive_name".
11194
11195 2007-06-11 Robert Millan <rmh@aybabtu.com>
11196
11197 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11198 not just the cdrom one.
11199
11200 2007-06-11 Robert Millan <rmh@aybabtu.com>
11201
11202 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11203 Add --pkglibdir=DIR option to override pkglibdir.
11204 Mention --image-type=TYPE in help output.
11205 Fix --grub-mkimage (it was a no-op).
11206 Abort gracefully when no parameter is given.
11207
11208 2007-06-11 Robert Millan <rmh@aybabtu.com>
11209
11210 * util/i386/pc/grub-mkrescue.in: New file.
11211 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11212 * Makefile.in: Handle bin_SCRIPTS.
11213
11214 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11215
11216 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11217 list of video modes.
11218
11219 2007-06-06 Robert Millan <rmh@aybabtu.com>
11220
11221 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11222 file doesn't exist, or if it is in a filesystem grub can't read.
11223
11224 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11225 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11226 header comment to fit in 80 columns when the variables are resolved.
11227
11228 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11229 could be identified by update-grub. Remove redundant check for
11230 unifont.pff existence (since convert_system_path_to_grub_path now
11231 handles that).
11232
11233 2007-06-04 Robert Millan <rmh@aybabtu.com>
11234
11235 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11236
11237 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11238
11239 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11240
11241 2007-06-04 Robert Millan <rmh@aybabtu.com>
11242
11243 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11244
11245 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11246 grub_apple_partition_map_fini.
11247
11248 * util/biosdisk.c
11249 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11250 to access >2 TiB disks).
11251
11252 Print disk->total_sectors with %llu instead of %lu, since this
11253 variable is always 64-bit (prevents wrong disk size from being displayed
11254 on either >2 TiB disk or big-endian CPU).
11255
11256 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11257 into a generic case that supports all (sane) partition maps.
11258
11259 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11260 breaks big-endian.
11261
11262 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11263 and grub_apple_partition_map_fini() after that.
11264
11265 2007-06-01 Robert Millan <rmh@aybabtu.com>
11266
11267 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11268
11269 * util/grub.d/00_header.in: Only enable gfxterm when
11270 convert_system_path_to_grub_path() succeeds.
11271
11272 2007-05-20 Robert Millan <rmh@aybabtu.com>
11273
11274 * util/update-grub_lib.in: New file.
11275 * DISTLIST: Add update-grub_lib.in.
11276 * conf/common.rmk: Generate update-grub_lib and install it in
11277 $(lib_DATA).
11278 * Makefile.in: Add install routine for $(lib_DATA).
11279
11280 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11281 function provided by update-grub_lib to support arbitrary paths of
11282 unifont.pff.
11283 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11284 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11285
11286 2007-05-19 Robert Millan <rmh@aybabtu.com>
11287
11288 * commands/i386/cpuid.c: New module.
11289 * DISTLIST: Add it.
11290 * conf/i386-efi.rmk: Enable cpuid.mod.
11291 * conf/i386-pc.rmk: Likewise.
11292
11293 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11294
11295 * kern/disk.c (grub_disk_read): Check return value of
11296 grub_realloc().
11297
11298 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11299
11300 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11301 arrays.
11302 * disk/raid.c (grub_raid_open): Likewise.
11303
11304 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11305
11306 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11307 stack instead of on the heap.
11308
11309 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11310 before doing a read on it.
11311
11312 * configure.ac: Only use -fno-stack-protector for the target
11313 environment.
11314
11315 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11316
11317 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11318 __attribute_ ((unused)) to mode_type argument.
11319
11320 * util/getroot.c (grub_guess_root_device): Fix #endif.
11321
11322 * kern/misc.c (memcmp): Fix prototype.
11323
11324 * include/grub/partition.h [GRUB_UTIL]
11325 (grub_gpt_partition_map_init): Add prototype.
11326 (grub_gpt_partition_map_fini): Likewise.
11327
11328 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11329 at the right place.
11330
11331 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11332 (grub_fat_read_data): Likewise.
11333 (grub_fat_find_dir): Likewise.
11334
11335 * font/manager.c (find_glyph): Make table a const.
11336 (grub_font_get_glyph): Remove bitmap from if statement.
11337
11338 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11339
11340 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11341 code, first search for device in /dev/mapper, then in /dev.
11342 (grub_util_get_grub_dev): New function.
11343 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11344 prototype.
11345 * util/grub-probe.c (probe): Remove check for RAID, call
11346 grub_util_get_grub_dev() instead of
11347 grub_util_biosdisk_get_grub_dev().
11348 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11349 grub_util_biosdisk_get_grub_dev().
11350 * util/i386/pc/grub-setup.c (main): Likewise.
11351
11352 2007-05-16 Robert Millan <rmh@aybabtu.com>
11353
11354 * DISTLIST: Update for the latest changes.
11355 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11356 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11357 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11358 grub/util/biosdisk.h.
11359 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11360 grub/util/biosdisk.h.
11361
11362 2007-05-16 Robert Millan <rmh@aybabtu.com>
11363
11364 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11365
11366 2007-05-16 Robert Millan <rmh@aybabtu.com>
11367
11368 * util/i386/efi/grub-install.in: New.
11369 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11370 newly added grub-install.
11371 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11372 include.
11373 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11374 grub/util/biosdisk.h.
11375 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11376 grub/util/biosdisk.h.
11377
11378 2007-05-16 Robert Millan <rmh@aybabtu.com>
11379
11380 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11381 * include/grub/util/biosdisk.h: ... here.
11382 * util/i386/pc/biosdisk.c: Moved to ...
11383 * util/biosdisk.c: ... here.
11384 * util/i386/pc/getroot.c: Moved to ...
11385 * util/getroot.c: ... here.
11386 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11387 * util/grub-mkdevicemap.c: ... here.
11388 * util/i386/pc/grub-probe.c: Moved to ...
11389 * util/grub-probe.c: ... here.
11390
11391 2007-05-15 Robert Millan <rmh@aybabtu.com>
11392
11393 * util/update-grub.in: Remove duplicated line in grub.cfg header
11394 message.
11395
11396 2007-05-13 Robert Millan <rmh@aybabtu.com>
11397
11398 * util/update-grub.in: Fix a few assumptions about the devices holding
11399 /, /boot and /boot/grub being the same.
11400 * util/grub.d/00_header.in: Likewise.
11401 * util/grub.d/10_hurd.in: Likewise.
11402 * util/grub.d/10_linux.in: Likewise.
11403
11404 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11405 patterns. Use that to define the `.old' suffix as older than `'.
11406
11407 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11408
11409 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11410 the grub.cfg header message.
11411
11412 2007-05-11 Robert Millan <rmh@aybabtu.com>
11413
11414 * util/update-grub.in: Create device.map if it doesn't already exist,
11415 before attempting to run grub-probe.
11416 Check for grub-probe and grub-mkdevicemap with the same code
11417 grub-install is using.
11418 Remove test mode.
11419
11420 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11421
11422 * Makefile.in: Add the datarootdir autoconf variable.
11423
11424 2007-05-09 Robert Millan <rmh@aybabtu.com>
11425
11426 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11427 fail gracefully if dev->disk->partition == NULL.
11428
11429 2007-05-07 Robert Millan <rmh@aybabtu.com>
11430
11431 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11432 determine partition map module.
11433 * util/i386/pc/grub-install.in: Use this feature to decide which
11434 partition module to load, instead of hardcoding pc and gpt.
11435
11436 2007-05-07 Robert Millan <rmh@aybabtu.com>
11437
11438 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11439 source directory differs from build directory.
11440
11441 2007-05-05 Robert Millan <rmh@aybabtu.com>
11442
11443 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11444 initialisation.
11445
11446 2007-05-05 Robert Millan <rmh@aybabtu.com>
11447
11448 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11449
11450 2007-05-05 Robert Millan <rmh@aybabtu.com>
11451
11452 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11453 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11454
11455 2007-05-05 Robert Millan <rmh@aybabtu.com>
11456
11457 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11458 (grub_probe_SOURCES): Likewise.
11459 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11460 GPT and initialize dos_part and bsd_part accordingly.
11461 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11462 install_bsd_part.
11463 (main): Activate gpt module for use during partition identification,
11464 and deactivate it afterwards.
11465 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11466 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11467 partition identification, and deactivate it afterwards.
11468
11469 2007-05-05 Robert Millan <rmh@aybabtu.com>
11470
11471 * term/i386/pc/console.c (grub_console_fini): Call
11472 grub_term_set_current() before grub_term_unregister().
11473
11474 2007-05-04 Robert Millan <rmh@aybabtu.com>
11475
11476 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11477 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11478 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11479 and update-grub_DATA.
11480 * conf/common.rmk: Build and install update-grub components.
11481 * conf/common.mk: Regenerate.
11482 * util/update-grub.in: New. Core of update-grub.
11483 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11484 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11485 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11486 * util/grub.d/README: New. Document grub.d directory layout.
11487
11488 2007-05-01 Robert Millan <rmh@aybabtu.com>
11489
11490 * util/grub-emu.c: Move initialization functions
11491 grub_util_biosdisk_init() and grub_init_all() before
11492 grub_util_biosdisk_get_grub_dev(), which relies on them.
11493
11494 2007-04-19 Robert Millan <rmh@aybabtu.com>
11495
11496 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11497 it is used later.
11498
11499 2007-04-18 Jerone Young <jerone@gmail.com>
11500
11501 * kernel/elf.c: Add missing parenthesis for conditional statement
11502 stanza.
11503
11504 2007-04-10 Jerone Young <jerone@gmail.com>
11505
11506 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11507 continue on and look for device node with real device name.
11508
11509 2007-04-10 Jerone Young <jerone@gmail.com>
11510
11511 * configure.ac: Add argument for autoconf to use transformation
11512 ability.
11513 * Makefile.in: Add autoconf package transformation code.
11514 * util/i386/pc/grub-install.in: Likewise.
11515 * util/powerpc/ieee1275/grub-install.in: Likewise.
11516
11517 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11518
11519 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11520 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11521 (EXT2_REVISION): Likewise.
11522 (EXT2_INODE_SIZE): Likewise.
11523 (struct grub_ext2_block_group): Added a missing member
11524 "used_dirs".
11525 (grub_ext2_read_inode): Divide by the inode size in a superblock
11526 instead of 128 to obtain INODES_PER_BLOCK.
11527 Use the macro EXT2_INODE_SIZE instead of directly using
11528 SBLOCK->INODE_SIZE.
11529
11530 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11531
11532 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11533 superblock instead of the structure size to compute an
11534 offset. This fixes the problem that GRUB could not read a
11535 filesystem when inode size is different from 128-byte.
11536
11537 2007-03-05 Marco Gerards <marco@gnu.org>
11538
11539 * normal/main.c (read_config_file): When "menu" is not set, create
11540 an initial context.
11541
11542 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11543
11544 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11545 (HEAP_LIMIT): New macro.
11546 (grub_claim_heap): Claim memory up to `heaplimit'.
11547
11548 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11549
11550 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11551 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11552 (_start): Likewise.
11553 (grub_arch_modules_addr): Return address after `_end'.
11554 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11555 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11556 (add_segments): Calculate `_end' from phdr size and location.
11557 (ALIGN_UP): Moved to ...
11558 * include/grub/misc.h: here.
11559 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11560 New macro.
11561 (GRUB_IEEE1275_MODULE_BASE): Removed.
11562
11563 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11564
11565 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11566 loop boundary.
11567
11568 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11569
11570 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11571 All users updated.
11572 (grub_elf64_load_hook_t): Likewise.
11573 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11574 debug output.
11575
11576 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11577
11578 * kern/mm.c: Update copyright.
11579 (grub_mm_debug): Correct syntax error.
11580 (grub_mm_dump_free): New function.
11581 (grub_debug_free): Call `grub_free'.
11582 * include/grub/mm.h: Update copyright.
11583 (grub_mm_dump_free): Add declaration.
11584
11585 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11586
11587 * include/grub/ieee1275/ieee1275.h: Update copyright.
11588 * kern/powerpc/ieee1275/init.c: Likewise.
11589 * kern/powerpc/ieee1275/openfw.c: Likewise.
11590
11591 * loader/powerpc/ieee1275/linux.c: Likewise.
11592 * include/grub/elfload.h: Likewise.
11593 * kern/elf.c: Likewise.
11594 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11595 callers.
11596 (grub_elf64_load): Likewise.
11597 (grub_elf32_load_segment): Move to a nested function.
11598 (grub_elf64_load_segment): Likewise.
11599
11600 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11601
11602 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11603 prototype.
11604 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11605 (grub_heap_len): Likewise.
11606 (HEAP_SIZE): New macro.
11607 (grub_claim_heap): New function.
11608 (grub_machine_init): Don't claim heap directly. Call
11609 `grub_claim_heap'.
11610 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11611 (grub_available_iterate): New function.
11612
11613 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11614
11615 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11616 * configure.ac: Use it for testing the HOST and TARGET compilers.
11617
11618 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11619
11620 * Makefile.in (enable_grub_emu): New variable.
11621 * configure.ac (--enable-grub-emu): New option.
11622 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11623 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11624 * conf/i386-pc.rmk: Likewise.
11625 * conf/powerpc-ieee1275.rmk: Likewise.
11626 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11627
11628 2006-12-12 Marco Gerards <marco@gnu.org>
11629
11630 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11631
11632 * kern/env.c (grub_env_unset): Don't free the member `value' when
11633 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11634 pointer.
11635
11636 * normal/main.c (current_menu): Removed.
11637 (free_menu): Unset the `menu' environment variable.
11638 (grub_normal_menu_addentry): Make use of the environment variable
11639 `menu', instead of using the global `current_menu'. Allocate
11640 memory for the sourcecode of this entry.
11641 (read_config_file): New argument `nested', changed all callers.
11642 Only in the case of a new context, initialize a new menu. Set the
11643 `menu' environment variable.
11644 (grub_normal_execute): Don't set and unset the environment
11645 variable `menu' here anymore. Only free the menu when leaving the
11646 context.
11647
11648 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11649 leak.
11650
11651 2006-12-11 Marco Gerards <marco@gnu.org>
11652
11653 * normal/menu_entry.c (run): Fix off by one bug so the last line
11654 is executed. Move the loader check to outside the loop.
11655
11656 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11657
11658 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11659
11660 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11661
11662 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11663 the number of sectors. Reported by Andrey Shuvikov
11664 <mr_hyro@yahoo.com>.
11665
11666 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11667
11668 * kern/disk.c (grub_disk_read): When there is a read error, always
11669 try to read only the necessary data.
11670
11671 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11672 disk/raid.c.
11673 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11674 prototype.
11675 [GRUB_UTIL] (grub_raid_fini): Likewise.
11676 [GRUB_UTIL] (grub_lvm_init): Likewise.
11677 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11678 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11679 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11680 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11681 and grub_raid_fini().
11682
11683 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11684
11685 * include/grub/types.h (__unused): Rename to UNUSED.
11686 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11687 (grub_elf64_size): Likewise.
11688
11689 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11690
11691 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11692 grub_error_push and grub_error_pop in the error-handling path.
11693 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11694 length.
11695
11696 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11697
11698 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11699 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11700 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11701 (kernel_elf_SOURCES): Likewise.
11702 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11703 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11704 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11705 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11706 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11707 (elf_mod_SOURCES): New variable.
11708 (elf_mod_CFLAGS): Likewise.
11709 (elf_mod_LDFLAGS): Likewise.
11710 * include/grub/types.h (__unused): New macro.
11711 * include/grub/elfload.h: New file.
11712 * kern/elf.c: Likewise.
11713 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11714 (ELF32_LOADMASK): New macro.
11715 (ELF64_LOADMASK): Likewise.
11716 (vmlinux): Removed.
11717 (grub_linux_load32): New function.
11718 (grub_linux_load64): Likewise.
11719 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11720 Use grub_elf_t instead of grub_file_t.
11721
11722 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11723
11724 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11725 `catch_result' to struct set_color_args.
11726
11727 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11728
11729 * normal/menu.c: Include grub/script.h.
11730 * normal/menu_entry.c: Likewise.
11731 * include/grub/normal.h: Do not include grub/script.h.
11732
11733 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11734
11735 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11736
11737 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11738
11739 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11740 disk.
11741 (grub_disk_close): Print debug messages when closing a disk.
11742 (grub_disk_read): Print debug messages when disk read fails.
11743 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11744 filesystem type.
11745 * kern/partition.c: Include misc.h.
11746 (grub_partition_iterate): Print debug messages when detecting
11747 partition type.
11748
11749 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11750
11751 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11752 is negative.
11753 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11754
11755 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11756
11757 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11758 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11759
11760 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11761
11762 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11763 instead of sizeof(lv). Patch by Michael Guntsche.
11764
11765 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11766
11767 * disk/lvm.c: Rename VGS to VG_LIST.
11768 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11769 (grub_lvm_open): Likewise.
11770 Thanks to Michael Guntsche for finding this bug.
11771
11772 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11773
11774 * configure.ac (AC_INIT): Bumped to 1.95.
11775
11776 2006-10-14 Robert Millan <rmh@aybabtu.com>
11777
11778 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11779 with "/dev/.static/dev/md".
11780
11781 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11782
11783 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11784 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11785 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11786 DRIVE_NAME are always freed.
11787
11788 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11789 DOS_PART, as a DOS partition is counted from one instead of zero
11790 now. Reported by Robert Millan.
11791
11792 2006-10-14 Robert Millan <rmh@aybabtu.com>
11793
11794 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11795 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11796 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11797 string returned by grub_guess_root_device.
11798 * util/i386/pc/grub-setup.c: Likewise.
11799 * util/i386/pc/grub-probefs.c: Likewise.
11800
11801 * util/i386/pc/grub-probefs.c: Rename to ...
11802 * util/i386/pc/grub-probe.c: ... this.
11803 * DISTLIST: Remove grub-probefs, add grub-probe.
11804 * conf/i386-efi.rmk: Likewise.
11805 * conf/i386-pc.rmk: Likewise.
11806 * util/i386/pc/grub-install.in: Likewise.
11807
11808 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11809 choose which information we want to print.
11810
11811 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11812
11813 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11814 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11815 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11816 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11817 video/readers/tga.c and video/i386/pc/vbeutil.c.
11818
11819 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11820
11821 Added support for RAID and LVM.
11822
11823 * disk/lvm.c: New file.
11824 * disk/raid.c: Likewise.
11825 * include/grub/lvm.h: Likewise.
11826 * include/grub/raid.h: Likewise.
11827 * include/grub/util/lvm.h: Likewise.
11828 * include/grub/util/raid.h: Likewise.
11829 * util/lvm.c: Likewise.
11830 * util/raid.c: Likewise.
11831
11832 * include/grub/disk.h (grub_disk_dev_id): Add
11833 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11834 (grub_disk_get_size): New prototype.
11835 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11836 returns a partition.
11837 (grub_disk_get_size): New function.
11838
11839 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11840 verbatim if grub_install_dos_part is -2.
11841
11842 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11843 and LVM devices.
11844
11845 * util/i386/pc/grub-setup.c (setup): New argument
11846 MUST_EMBED. Force embedding of GRUB when the argument is
11847 true. Close FILE before returning.
11848 (main): Add support for RAID and LVM.
11849
11850 * conf/common.rmk: Add RAID and LVM modules.
11851 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11852 util/lvm.c.
11853 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11854
11855 * kern/misc.c (grub_strstr): New function.
11856 * include/grub/misc.h (grub_strstr): New prototype.
11857
11858 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11859
11860 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11861
11862 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11863
11864 * kern/misc.c (grub_strtoull): Guess the base only if not
11865 specified.
11866
11867 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11868
11869 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11870 PowerMac support.
11871
11872 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11873
11874 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11875
11876 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11877 Remove `flags' argument. All callers changed.
11878 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11879 (IEEE1275_IHANDLE_INVALID): New variable.
11880 (IEEE1275_CELL_INVALID): New variable.
11881 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11882 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11883 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11884 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11885 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11886 codes from Open Firmware. All callers updated.
11887 (grub_ieee1275_next_property): Directly return Open Firmware return
11888 code.
11889 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11890 Standardize error checking from `grub_ieee1275_get_property'.
11891 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11892 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11893
11894 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11895
11896 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11897 `instance_to_package_args' to `instance_to_path_args'.
11898
11899 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11900 `grub_ieee1275_chosen'.
11901
11902 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11903 `grub_ieee1275_interpret'.
11904
11905 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11906
11907 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11908
11909 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11910
11911 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11912 (__cmpdi): Likewise.
11913
11914 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11915 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11916 `grub_ssize_t'.
11917
11918 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11919
11920 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11921 to type `grub_ssize_t'.
11922 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11923
11924 2006-09-22 Marco Gerards <marco@gnu.org>
11925
11926 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11927 newlines.
11928
11929 2006-09-22 Marco Gerards <marco@gnu.org>
11930
11931 * commands/echo.c: New file.
11932
11933 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11934
11935 * conf/common.rmk (echo_mod_SOURCES): New variable.
11936 (echo_mod_CFLAGS): Likewise.
11937 (echo_mod_LDFLAGS): Likewise.
11938
11939 2006-09-22 Marco Gerards <marco@gnu.org>
11940
11941 * normal/main.c (get_line): Malloc memory instead of using
11942 preallocated memory. Removed the arguments `cmdline' and
11943 `max_len'. Updated all callers.
11944
11945 2006-09-22 Marco Gerards <marco@gnu.org>
11946
11947 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11948 (normal_mod_DEPENDENCIES): Likewise.
11949
11950 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11951 (normal_mod_DEPENDENCIES): Likewise.
11952
11953 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11954
11955 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11956
11957 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11958 programs.
11959 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11960 (normal_mod_DEPENDENCIES): Likewise.
11961 * conf/i386-pc.mk: Regenerate.
11962 * conf/i386-efi.mk: Likewise
11963 * conf/common.mk: Likewise.
11964 * conf/powerpc-ieee1275.mk: Likewise.
11965 * conf/sparc64-ieee1275.mk: Likewise.
11966
11967 2006-09-22 Robert Millan <rmh@aybabtu.com>
11968
11969 Sync with i386 version.
11970 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11971 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11972
11973 2006-09-21 Robert Millan <rmh@aybabtu.com>
11974
11975 Import from GRUB Legacy (lib/device.c):
11976 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11977 (init_device_map) [__linux__]: Add support for I2O devices.
11978
11979 2006-09-14 Marco Gerards <marco@gnu.org>
11980
11981 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11982 `-melf_i386'.
11983
11984 2006-09-14 Robert Millan <rmh@aybabtu.com>
11985
11986 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11987 /boot/grub/*.lst.
11988
11989 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11990
11991 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11992 before adding it to device.map.
11993
11994 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11995
11996 * genmk.rb: Let GCC generate dependencies the first time it
11997 compiles a file; using the -MD option.
11998 * conf/common.mk: Regenerate.
11999 * conf/i386-pc.mk: Likewise.
12000 * conf/i386-efi.mk: Likewise.
12001 * conf/powerpc-ieee1275.mk: Likewise.
12002 * conf/sparc64-ieee1275.mk: Likewise.
12003
12004 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12005
12006 Move the prototypes of grub_setjmp and grub_longjmp to
12007 cpu/setjmp.h, so that each architecture may specify different
12008 attributes.
12009
12010 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12011 (grub_longjmp): Likewise.
12012 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12013 (grub_longjmp): Likewise.
12014 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12015 (grub_longjmp): Likewise.
12016
12017 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12018 [!GRUB_UTIL] (grub_longjmp): Removed.
12019
12020 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12021
12022 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12023 "color!" method does not return any value.
12024
12025 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12026
12027 * include/grub/bitmap.h: New file.
12028
12029 * include/grub/i386/pc/vbeutil.h: Likewise.
12030
12031 * video/bitmap.c: Likewise.
12032
12033 * video/readers/tga.c: Likewise.
12034
12035 * video/i386/pc/vbeutil.c: Likewise.
12036
12037 * commands/videotest.c: Code cleanup and updated to reflect to new
12038 video API.
12039
12040 * term/gfxterm.c: Likewise.
12041
12042 * video/video.c: Likewise.
12043
12044 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12045 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12046 (bitmap_mod_SOURCES): New entry.
12047 (bitmap_mod_CFLAGS): Likewise.
12048 (bitmap_mod_LDFLAGS): Likewise.
12049 (tga_mod_SOURCES): Likewise.
12050 (tga_mod_CFLAGS): Likewise.
12051 (tga_mod_LDFLAGS): Likewise.
12052
12053 * include/grub/video.h (grub_video_blit_operators): New enum type.
12054 (grub_video_render_target): Changed as forward declaration and moved
12055 actual definition to be video driver specific.
12056 (grub_video_adapter.blit_bitmap): Added blitting operator.
12057 (grub_video_adapter.blit_render_target): Likewise.
12058 (grub_video_blit_bitmap): Likewise.
12059 (grub_video_blit_render_target): Likewise.
12060
12061 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12062 driver specific render target definition.
12063 (grub_video_vbe_map_rgba): Added driver internal helper.
12064 (grub_video_vbe_unmap_color): Updated to use
12065 grub_video_i386_vbeblit_info.
12066 (grub_video_vbe_get_video_ptr): Likewise.
12067
12068 * include/grub/i386/pc/vbeblit.h
12069 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12070 grub_video_i386_vbeblit_info.
12071 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12072 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12073 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12074 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12075 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12076 (grub_video_i386_vbeblit_index_index): Likewise.
12077 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12078 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12079 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12080 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12081 operator.
12082 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12083 operator.
12084
12085 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12086 include/grub/i386/pc/vbeblit.h.
12087
12088 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12089 Updated to use grub_video_i386_vbeblit_info.
12090 (grub_video_i386_vbefill_R8G8B8): Likewise.
12091 (grub_video_i386_vbefill_index): Likewise.
12092 (grub_video_i386_vbefill): Added generic filler.
12093
12094 * video/i386/pc/vbefill.c: Updated to reflect changes on
12095 include/grub/i386/pc/vbefill.h.
12096
12097 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12098 grub_video_i386_vbeblit_info.
12099 (grub_video_vbe_unmap_color): Likewise.
12100 (grub_video_vbe_blit_glyph): Likewise.
12101 (grub_video_vbe_scroll): Likewise.
12102 (grub_video_vbe_draw_pixel): Removed function.
12103 (grub_video_vbe_get_pixel): Likewise.
12104 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12105 updated code to use it.
12106 (common_blitter): Added common blitter for render target and bitmap.
12107 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12108 (grub_video_vbe_blit_render_target): Likewise.
12109
12110 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
12111
12112 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12113 is in text mode if there is no console control protocol instance
12114 available.
12115
12116 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12117
12118 * include/grub/video.h: Code cleanup.
12119
12120 * include/grub/i386/pc/vbe.h: Likewise.
12121
12122 * video/i386/pc/vbe.c: Likewise.
12123
12124 * video/i386/pc/vbeblit.c: Likewise.
12125
12126 * video/i386/pc/vbefill.c: Likewise.
12127
12128 * video/video.c: Likewise. Also added more comments.
12129
12130 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12131
12132 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12133 (struct grub_biosdisk_dap): Likewise.
12134
12135 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12136 linkage settings for all functions.
12137
12138 2006-07-12 Marco Gerards <marco@gnu.org>
12139
12140 * configure.ac (--enable-mm-debug): Fix typo.
12141
12142 * genkernsyms.sh.in: Use proper quoting for `CC'.
12143
12144 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12145
12146 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12147 (normal_mod_ASFLAGS): Remove "-m32".
12148
12149 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12150
12151 * util/misc.c: Include config.h.
12152 [!HAVE_MEMALIGN]: Do not include malloc.h.
12153 (grub_memalign): Use posix_memalign, if present. Then, use
12154 memalign, if present. Otherwise, emit an error.
12155
12156 * util/grub-emu.c: Do not include malloc.h.
12157
12158 * include/grub/util/misc.h: Include unistd.h. This is required for
12159 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12160 D. Eades III <hde@foobar-qux.org>.
12161
12162 * configure.ac (AC_GNU_SOURCE): Added.
12163 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12164 type.
12165
12166 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12167
12168 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12169 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12170
12171 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12172
12173 * include/grub/types.h (grub_host_addr_t): Rename to
12174 grub_target_addr_t.
12175 (grub_host_off_t): Rename to grub_target_off_t.
12176 (grub_host_size_t): Rename to grub_target_size_t.
12177 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12178 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12179
12180 * include/grub/kernel.h (struct grub_module_header): Change type
12181 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12182 (grub_module_info): Likewise.
12183
12184 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12185
12186 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12187 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12188 Velazquez <jesus.velazquez@gmail.com>.
12189
12190 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12191
12192 Count partitions from 1 instead of 0 in the string representation
12193 of partitions. Still use 0-based internally.
12194
12195 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12196 (sun_partition_map_iterate): Use grub_partition_t instead of
12197 struct grub_partition *. Cast DESC->START_CYLINDER to
12198 grub_uint64_t after converting the endian.
12199 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12200 (sun_partition_map_get_name): Add 1 to P->INDEX.
12201
12202 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12203 PCDATA->DOS_PART.
12204 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12205
12206 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12207 zero instead of one.
12208 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12209 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12210
12211 * partmap/apple.c (apple_partition_map_iterate): Change the type
12212 of POS to unsigned.
12213 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12214 (apple_partition_map_get_name): Add 1 into P->INDEX.
12215
12216 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12217 of POS to unsigned.
12218 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12219 calculate the offset of a partition.
12220 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12221 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12222
12223 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12224 SECTOR to grub_disk_addr_t.
12225 (acorn_partition_map_iterate): Likewise.
12226 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12227 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12228 top.
12229 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12230
12231 * kern/i386/pc/init.c (make_install_device): Add 1 into
12232 GRUB_INSTALL_DOS_PART.
12233
12234 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12235 conditional.
12236
12237 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12238
12239 Clean up the code to support 64-bit addressing in disks and
12240 files. This change is not enough for filesystems yet.
12241
12242 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12243 type of "start" to grub_uint64_t.
12244 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12245 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12246 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12247 convert addresses.
12248
12249 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12250 to grub_disk_addr_t.
12251
12252 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12253 string.
12254
12255 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12256
12257 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12258 to char *.
12259
12260 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12261
12262 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12263
12264 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12265
12266 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12267 to grub_off_t, to detect an error from grub_file_seek.
12268 (grub_multiboot_load_elf32): Likewise.
12269
12270 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12271 maximum unsigned long value when an overflow is detected.
12272 (grub_strtoull): New function.
12273 (grub_divmod64): Likewise.
12274 (grub_lltoa): use grub_divmod64.
12275
12276 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12277 grub_disk_addr_t.
12278 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12279 the pointer to next character. Use grub_strtoull instead of
12280 grub_strtoul.
12281 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12282 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12283 respectively.
12284
12285 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12286 return value is signed.
12287 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12288 test if OFFSET is less than zero, as OFFSET is unsigned now.
12289
12290 * kern/disk.c (struct grub_disk_cache): Change the type of
12291 "sector" to grub_disk_addr_t.
12292 (grub_disk_cache_get_index): Change the type of SECTOR to
12293 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12294 unsigned after shifting.
12295 (grub_disk_cache_invalidate): Change the type of SECTOR to
12296 grub_disk_addr_t.
12297 (grub_disk_cache_unlock): Likewise.
12298 (grub_disk_cache_store): Likewise.
12299 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12300 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12301 grub_disk_addr_t and grub_uint64_t, respectively.
12302 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12303 body, as the value of OFFSET is tweaked by
12304 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12305 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12306 respectively.
12307 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12308 body, as the value of OFFSET is tweaked by
12309 grub_disk_check_range. Change the types of LEN and N to
12310 grub_size_t.
12311
12312 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12313 and "saved_offset" to grub_off_t.
12314 (test_header): Cast BUF to char *.
12315 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12316 to char *.
12317 (grub_gzio_read): Change the types of OFFSET and SIZE to
12318 grub_off_t and grub_size_t, respectively.
12319
12320 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12321 Removed.
12322 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12323 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12324 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12325 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12326 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12327
12328 * include/grub/types.h (grub_off_t): Unconditionally set to
12329 grub_uint64_t.
12330 (grub_disk_addr_t): Changed to grub_uint64_t.
12331
12332 * include/grub/partition.h (struct grub_partition): Change the
12333 types of "start", "len" and "offset" to grub_disk_addr_t,
12334 grub_uint64_t and grub_disk_addr_t, respectively.
12335 (grub_partition_get_start): Return grub_disk_addr_t.
12336 (grub_partition_get_len): Return grub_uint64_t.
12337
12338 * include/grub/misc.h (grub_strtoull): New prototype.
12339 (grub_divmod64): Likewise.
12340
12341 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12342 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12343 grub_off_t, respectively.
12344 All callers and references changed.
12345
12346 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12347 grub_size_t in "read".
12348 All callers and references changed.
12349
12350 * include/grub/file.h (struct grub_file): Change the types of
12351 "offset" and "size" to grub_off_t and grub_off_t,
12352 respectively. Change the type of SECTOR to grub_disk_addr_t in
12353 "read_hook".
12354 (grub_file_read): Change the type of LEN to grub_size_t.
12355 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12356 grub_off_t.
12357 (grub_file_size): Return grub_off_t.
12358 (grub_file_tell): Likewise.
12359 All callers and references changed.
12360
12361 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12362 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12363 "write".
12364 (struct grub_disk): Change the type of "total_sectors" to
12365 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12366 "read_hook".
12367 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12368 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12369 (grub_disk_write): Likewise.
12370 All callers and references changed.
12371
12372 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12373 char * for grub_strncmp to silence gcc.
12374 (grub_iso9660_mount): Likewise.
12375 (grub_iso9660_mount): Likewise.
12376 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12377 return statement.
12378 (grub_iso9660_iterate_dir): Likewise.
12379 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12380
12381 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12382 LEN to grub_disk_addr_t and grub_size_t, respectively.
12383
12384 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12385
12386 * fs/jfs.c (grub_jfs_read_file): Likewise.
12387
12388 * fs/minix.c (grub_jfs_read_file): Likewise.
12389
12390 * fs/sfs.c (grub_jfs_read_file): Likewise.
12391
12392 * fs/ufs.c (grub_jfs_read_file): Likewise.
12393
12394 * fs/xfs.c (grub_jfs_read_file): Likewise.
12395
12396 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12397 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12398 respectively.
12399
12400 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12401 BLKNR to -1 instead of returning GRUB_ERRNO.
12402 (grub_ext2_read_file): Change the types of SECTOR and
12403 LEN to grub_disk_addr_t and grub_size_t, respectively.
12404
12405 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12406 LEN to grub_disk_addr_t and grub_size_t, respectively.
12407
12408 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12409 grub_file_read.
12410
12411 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12412 string. Do not cast SECTOR explicitly.
12413
12414 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12415 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12416 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12417 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12418 over 2TB and LBA mode is not supported, raise an error.
12419 (get_safe_sectors): New function.
12420 (grub_biosdisk_read): Use get_safe_sectors.
12421 (grub_biosdisk_write): Likewise.
12422
12423 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12424 (grub_efidisk_write): Likewise.
12425
12426 * disk/loopback.c (delete_loopback): Cosmetic changes.
12427 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12428 correctly.
12429 (grub_loopback_open): Likewise.
12430 (grub_loopback_read): Likewise. Also, change the type of POS to
12431 grub_off_t, and fix the usage of grub_memset.
12432
12433 * commands/i386/pc/play.c: Include grub/machine/time.h.
12434
12435 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12436 print FILE->SIZE.
12437
12438 * commands/configfile.c: Include grub/env.h.
12439
12440 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12441 GRUB_ERRNO directly instead. Change the type of POS to
12442 grub_off_t. Follow the coding standard.
12443
12444 * commands/blocklist.c: Include grub/partition.h.
12445 (grub_cmd_blocklist): Return an error if the underlying device is
12446 not a disk. Take the starting sector of a partition into account,
12447 if a partition is used.
12448
12449 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12450 a length field.
12451 (lba_mode): Support 64-bit addresses.
12452 (chs_mode): Likewise.
12453 (copy_buffer): Adapted to the new offsets of a length field and a
12454 segment field.
12455 (blocklist_default_start): Allocate 64-bit space.
12456
12457 * boot/i386/pc/boot.S (force_lba): Removed.
12458 (boot_drive): Moved to under KERNEL_SECTOR.
12459 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12460 space.
12461 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12462 is useless.
12463 (lba_mode): Refactored to support a 64-bit address. More size
12464 optimization.
12465 (setup_sectors): Likewise.
12466
12467 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12468
12469 * DISTLIST: Added include/grub/i386/linux.h. Removed
12470 include/grub/i386/pc/linux.h
12471
12472 * configure.ac (AC_INIT): Bumped to 1.94.
12473
12474 * config.guess: Updated from gnulib.
12475 * config.sub: Likewise.
12476 * install-sh: Likewise.
12477 * mkinstalldirs: Likewise.
12478
12479 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12480
12481 * conf/common.rmk (grub_modules_init.lst): Depended on
12482 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12483 MODSRCFILES.
12484
12485 * genmk.rb (PModule::rule): Reverted the previous change.
12486
12487 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12488
12489 * conf/common.rmk (grub_modules_init.lst): Depends on
12490 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12491 that the target does not exist before producing.
12492 (grub_modules_init.h): Remove the target before generating.
12493 (grub_emu_init.c): Likewise.
12494
12495 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12496
12497 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12498
12499 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12500 for the target-specific tests. Make sure that we also have the
12501 up-to-date target variables for those tests.
12502
12503 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12504
12505 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12506 (PModule::rule): Likewise.
12507
12508 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12509
12510 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12511 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12512 target-specific flags should be prefixed.
12513 (PModule::rule): Likewise.
12514
12515 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12516
12517 * configure.ac (CMP): Check if cmp is available explicitly.
12518
12519 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12520
12521 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12522 (target_cpu): New variable.
12523 (pkglibdir): Use target_cpu instead of host_cpu.
12524
12525 * util/i386/pc/grub-install.in (host_cpu): Removed.
12526 (target_cpu): New variable.
12527 (pkglibdir): Use target_cpu instead of host_cpu.
12528
12529 * util/genmoddep.c: Removed.
12530
12531 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12532 instead of GRUB_HOST_SIZEOF_VOID_P.
12533 * kern/dl.c: Likewise.
12534
12535 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12536 ...
12537 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12538 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12539 (GRUB_TARGET_SIZEOF_LONG): ... this.
12540 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12541 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12542 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12543 to ...
12544 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12545 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12546 (GRUB_TARGET_SIZEOF_LONG): ... this.
12547 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12548 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12549 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12550 to ...
12551 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12552 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12553 (GRUB_TARGET_SIZEOF_LONG): ... this.
12554 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12555 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12556
12557 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12558 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12559 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12560 instead of GRUB_HOST_SIZEOF_LONG.
12561 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12562 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12563 GRUB_CPU_WORDS_BIGENDIAN.
12564 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12565 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12566 grub_host_ssize_t.
12567
12568 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12569 (genmoddep_SOURCES): Likewise.
12570 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12571 (genmoddep_SOURCES): Likewise.
12572 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12573 (genmoddep_SOURCES): Likewise.
12574 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12575 Likewise.
12576 (genmoddep_SOURCES): Likewise.
12577
12578 * genmoddep.awk: New file.
12579
12580 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12581 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12582 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12583 (PModule::rule): Likewise.
12584 (Program::rule): Likewise.
12585 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12586 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12587 respectively.
12588
12589 * configure.ac: Rewritten intensively to use host and target
12590 instead of build and host, respectively.
12591
12592 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12593 (host_cpu): Removed.
12594 (target_cpu): New variable.
12595 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12596 (BUILD_CC): Removed.
12597 (BUILD_CFLAGS): Likewise.
12598 (BUILD_CPPFLAGS): Likewise.
12599 (TARGET_CC): New variable.
12600 (TARGET_CFLAGS): Likewise.
12601 (TARGET_CPPFLAGS): Likewise.
12602 (TARGET_LDFLAGS): Likewise.
12603 (AWK): Likewise.
12604 (include): Use target_cpu instead of host_cpu.
12605 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12606
12607 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12608
12609 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12610
12611 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12612 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12613 field 'false' to 'exec_on_false'.
12614 (grub_script_create_cmdif): Renamed argument names to reflect above
12615 changes.
12616
12617 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12618
12619 * normal/script.c (grub_script_create_cmdif): Likewise.
12620
12621 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12622
12623 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12624 top.
12625 (grub_hfsplus_btree_recptr): Likewise.
12626 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12627 FILEBLOCK both to pass a block number and store next block
12628 number.
12629 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12630 overflow file correctly. Specify errors appropriately, because
12631 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12632 grub_hfsplus_btree_recptr to get the pointer to a found key.
12633 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12634 is found.
12635
12636 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12637 linux.mod.
12638 (_linux_mod_SOURCES): New variable.
12639 (_linux_mod_CFLAGS): Likewise.
12640 (_linux_mod_LDFLAGS): Likewise.
12641 (linux_mod_SOURCES): Likewise.
12642 (linux_mod_CFLAGS): Likewise.
12643 (linux_mod_LDFLAGS): Likewise.
12644
12645 * DISTLIST: Added loader/i386/efi/linux.c,
12646 loader/i386/efi/linux_normal.c and
12647 include/grub/i386/efi/loader.h.
12648
12649 * loader/i386/efi/linux.c: New file.
12650 * loader/i386/efi/linux_normal.c: Likewise.
12651 * include/grub/i386/efi/loader.h: Likewise.
12652
12653 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12654
12655 * commands/blocklist.c: New file.
12656
12657 * DISTLIST: Added commands/blocklist.c.
12658
12659 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12660 color for the background, and a darker color for the foreground.
12661 (grub_console_checkkey): Return READ_KEY.
12662 (grub_console_cls): Set the background to
12663 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12664
12665 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12666
12667 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12668 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12669
12670 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12671 prototype.
12672
12673 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12674 BG. The spec is wrong again.
12675
12676 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12677 prototype.
12678 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12679
12680 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12681 commands/blocklist.c.
12682 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12683
12684 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12685 (blocklist_mod_SOURCES): New variable.
12686 (blocklist_mod_CFLAGS): Likewise.
12687 (blocklist_mod_LDFLAGS): Likewise.
12688
12689 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12690
12691 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12692 duplication.
12693 (lba_mode): Use %eax more intensively to reduce the code size.
12694
12695 2006-05-20 Marco Gerards <marco@gnu.org>
12696
12697 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12698
12699 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12700 for `menuentry'.
12701 (script): Accept leading newlines.
12702 (newlines): New rule to describe 0 or more newlines.
12703 (commands): Accept `command' with trailing newline. Fixed the
12704 order in which arguments were passed to `grub_script_add_cmd'.
12705 Accept commands separated by newlines.
12706 (function): Changed to accept newlines.
12707 (menuentry) Rewritten.
12708
12709 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12710 front of the list, instead of to the end.
12711
12712 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12713
12714 * util/i386/pc/grub-install.in (bindir): New variable.
12715 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12716 Shaver <lbgwjl@gmail.com>.
12717
12718 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12719
12720 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12721 grub/machine/linux.h
12722 * loader/i386/pc/linux.c: Likewise.
12723
12724 * include/grub/i386/pc/linux.h: Moved to ...
12725 * include/grub/i386/linux.h: ... here.
12726
12727 * include/grub/i386/linux.h (struct linux_kernel_params): New
12728 struct.
12729
12730 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12731
12732 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12733 checking.
12734 (grub_video_vbe_blit_glyph): Likewise.
12735 (grub_video_vbe_blit_bitmap): Likewise.
12736 (grub_video_vbe_blit_render_target): Likewise.
12737
12738 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12739
12740 * configure.ac (--with-platform): Properly quote the square
12741 brackets.
12742
12743 2006-05-08 Marco Gerards <marco@gnu.org>
12744
12745 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12746 this...
12747 (kernel_elf_HEADERS): ...to this. Updated all users.
12748 (grubof_symlist.c): Renamed from this...
12749 (kernel_elf_symlist.c): ...to this. Updated all users.
12750 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12751 (grubof_SOURCES): Renamed from this...
12752 (kernel_elf_SOURCES): ...to this.
12753 (grubof_HEADERS): Renamed from this...
12754 (kernel_elf_HEADERS): ...to this.
12755 (grubof_CFLAGS): Renamed from this...
12756 (kernel_elf_CFLAGS): ...to this.
12757 (grubof_ASFLAGS): Renamed from this...
12758 (kernel_elf_ASFLAGS): ...to this.
12759 (grubof_LDFLAGS): Renamed from this...
12760 (kernel_elf_LDFLAGS): ...to this.
12761
12762 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12763 this...
12764 (kernel_elf_HEADERS): ...to this. Updated all users.
12765 (grubof_symlist.c): Renamed from this...
12766 (kernel_elf_symlist.c): ...to this. Updated all users.
12767 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12768 (grubof_SOURCES): Renamed from this...
12769 (kernel_elf_SOURCES): ...to this.
12770 (grubof_HEADERS): Renamed from this...
12771 (kernel_elf_HEADERS): ...to this.
12772 (grubof_CFLAGS): Renamed from this...
12773 (kernel_elf_CFLAGS): ...to this.
12774 (grubof_ASFLAGS): Renamed from this...
12775 (kernel_elf_ASFLAGS): ...to this.
12776 (grubof_LDFLAGS): Renamed from this...
12777 (kernel_elf_LDFLAGS): ...to this.
12778
12779 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12780 `kernel.elf' instead of `grubof'.
12781
12782 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12783
12784 Add --with-platform to configure. Use pkglibdir instead of
12785 pkgdatadir. This is reported by Roger Leigh.
12786
12787 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12788 (host_vendor): Likewise.
12789 (host_os): Likewise.
12790 (pkgdatadir): Likewise.
12791 (platform): New variable.
12792 (pkglibdir): Likewise.
12793 Use PKGLIBDIR instead of PKGDATADIR.
12794
12795 * util/i386/pc/grub-install.in (datadir): Removed.
12796 (host_vendor): Likewise.
12797 (host_os): Likewise.
12798 (pkgdatadir): Likewise.
12799 (platform): New variable.
12800 (pkglibdir): Likewise.
12801 Use PKGLIBDIR instead of PKGDATADIR.
12802
12803 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12804 instead of GRUB_DATADIR.
12805 (main): Likewise.
12806 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12807 (main): Likewise.
12808 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12809 (main): Likewise.
12810
12811 * configure.ac (--with-platform): New option.
12812 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12813
12814 * Makefile.in: Include a makefile based on PLATFORM instead of
12815 HOST_VENDOR.
12816 (pkgdatadir): Not appended by the machine type.
12817 (pkglibdir): Appended by the machine type.
12818 (host_vendor): Removed.
12819 (platform): New variable.
12820 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12821 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12822 (uninstall): Likewise.
12823
12824 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12825
12826 Use the environment context in the menu. Remove the commands
12827 "default" and "timeout", and use variables instead.
12828
12829 * normal/menu.c: Include grub/env.h.
12830 (print_entry): Cast TITLE to silence gcc.
12831 (get_timeout): New function.
12832 (set_timeout): Likewise.
12833 (get_entry_number): Likewise.
12834 (run_menu): Use a default entry, a fallback entry and a timeout
12835 in the environment variables "default", "fallback" and
12836 "timeout". Also, tweak the default entry if it is not within the
12837 current menu entries.
12838 (grub_menu_run): Use a fallback entry in the environment variable
12839 "fallback".
12840
12841 * normal/main.c (read_config_file): Do not initialize
12842 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12843 NEWMENU->TIMEOUT.
12844 (grub_normal_execute): Use a data slot to store the menu.
12845
12846 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12847 fallback_entry and timeout.
12848 (struct grub_menu_list): Removed.
12849 (grub_menu_list_t): Likewise.
12850 (struct grub_context): Likewise.
12851 (grub_context_t): Likewise.
12852 (grub_context_get): Likewise.
12853 (grub_context_get_current_menu): Likewise.
12854 (grub_context_push_menu): Likewise.
12855 (grub_context_pop_menu): Likewise.
12856 (grub_default_init): Likewise.
12857 (grub_default_fini): Likewise.
12858 (grub_timeout_init): Likewise.
12859 (grub_timeout_fini): Likewise.
12860
12861 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12862 and timeout.mod.
12863 (normal_mod_SOURCES): Removed normal/context.c.
12864
12865 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12866 commands/default.c, commands/timeout.c and normal/context.c.
12867 (normal_mod_SOURCES): Removed normal/context.c.
12868
12869 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12870 commands/timeout.c and normal/context.c.
12871 (normal_mod_SOURCES): Removed normal/context.c.
12872
12873 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12874 commands/default.c, commands/timeout.c and normal/context.c.
12875 (normal_mod_SOURCES): Removed normal/context.c.
12876
12877 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12878 timeout.mod.
12879 (default_mod_SOURCES): Removed.
12880 (default_mod_CFLAGS): Likewise.
12881 (default_mod_LDFLAGS): Likewise.
12882 (timeout_mod_SOURCES): Removed.
12883 (timeout_mod_CFLAGS): Likewise.
12884 (timeout_mod_LDFLAGS): Likewise.
12885
12886 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12887 normal/context.c.
12888
12889 * commands/default.c: Removed.
12890 * commands/timeout.c: Likewise.
12891 * normal/context.c: Likewise.
12892
12893 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12894
12895 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12896
12897 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12898
12899 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12900 "next" to "prev" for readability.
12901 (struct grub_env_sorted_var): New struct.
12902 (grub_env_context): Renamed to ...
12903 (initial_context): ... this.
12904 (grub_env_var_context): Renamed to ...
12905 (current_context): ... this.
12906 (grub_env_find): Look only at CURRENT_CONTEXT.
12907 (grub_env_context_open): Rewritten to copy exported variables from
12908 previous context.
12909 (grub_env_context_close): Rewritten according to the new
12910 scheme. Also, add an assertion to prevent the initial context from
12911 removed.
12912 (grub_env_insert): Removed the code for the sorted list.
12913 (grub_env_remove): Likewise.
12914 (grub_env_export): Simply mark the variable with
12915 GRUB_ENV_VAR_GLOBAL.
12916 (grub_env_set): A cosmetic change for naming consistency.
12917 (grub_env_get): Likewise.
12918 (grub_env_unset): Likewise.
12919 (grub_env_iterate): Rewritten to sort variables within this
12920 function.
12921 (grub_register_variable_hook): Fixed for naming consistency. Call
12922 grub_env_find again, only if NAME is not found at the first time.
12923 (mangle_data_slot_name): New function.
12924 (grub_env_set_data_slot): Likewise.
12925 (grub_env_get_data_slot): Likewise.
12926 (grub_env_unset_data_slot): Likewise.
12927
12928 * include/grub/env.h (grub_env_var_type): New enum.
12929 (GRUB_ENV_VAR_LOCAL): New constant.
12930 (GRUB_ENV_VAR_GLOBAL): Likewise.
12931 (GRUB_ENV_VAR_DATA): Likewise.
12932 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12933 "type".
12934 (grub_env_set): Replace VAR with NAME for consistency.
12935 (grub_register_variable_hook): Likewise.
12936 (grub_env_export): Specify the name of the argument.
12937 (grub_env_set_data_slot): New prototype.
12938 (grub_env_get_data_slot): Likewise.
12939 (grub_env_unset_data_slot): Likewise.
12940
12941 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12942
12943 Extend the loader so that GRUB can accept a loader which comes
12944 back to GRUB when a loaded image exits. Also, this change adds
12945 support for a chainloader on EFI.
12946
12947 * term/efi/console.c: Include grub/misc.h.
12948 (grub_console_checkkey): Display a scan code on the top for
12949 debugging. This will be removed once the EFI port gets stable.
12950 Correct the scan code mapping.
12951
12952 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12953 allocate memory from larger regions, in order to reduce the number
12954 of allocated regions. Otherwise, the MacOSX loader panics.
12955 (filter_memory_map): Avoid less than 1MB for compatibility with
12956 other loaders.
12957 (add_memory_regions): Allocate from the tail of a region, if
12958 possible, to avoid allocating a region near to 1MB, for the MacOSX
12959 loader.
12960
12961 * kern/efi/init.c (grub_efi_set_prefix): Specify
12962 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12963
12964 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12965 argument IMAGE_HANDLE and specify it to get a loaded image.
12966 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12967 grub_efi_get_loaded_image.
12968 (grub_efi_get_filename): Divide the length by the size of
12969 grub_efi_char16_t.
12970 (grub_efi_get_device_path): New function.
12971 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12972 the length by the size of grub_efi_char16_t for a file path device
12973 path node.
12974
12975 * kern/loader.c (grub_loader_noreturn): New variable.
12976 (grub_loader_set): Accept a new argument NORETURN. Set
12977 GRUB_LOADER_NORETURN to NORETURN.
12978 All callers changed.
12979 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12980 grub_machine_fini.
12981
12982 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12983 prototype.
12984 (grub_efi_get_loaded_image): Take an argument to specify an image
12985 handle.
12986
12987 * include/grub/loader.h (grub_loader_set): Added one more argument
12988 NORETURN.
12989
12990 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12991 instead of grub_efi_open_protocol.
12992 (grub_efidisk_get_device_name): Likewise.
12993 (grub_efidisk_close): Print a newline.
12994 (grub_efidisk_get_device_handle): Fixed to use
12995 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12996 GRUB_EFI_DEVICE_PATH_TYPE.
12997
12998 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12999 * kern/efi/efi.c (device_path_guid): ... here.
13000
13001 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13002 chain.mod.
13003 (kernel_mod_HEADERS): Added efi/disk.h.
13004 (_chain_mod_SOURCES): New variable.
13005 (_chain_mod_CFLAGS): Likewise.
13006 (_chain_mod_LDFLAGS): Likewise.
13007 (chain_mod_SOURCES): Likewise.
13008 (chain_mod_CFLAGS): Likewise.
13009 (chain_mod_LDFLAGS): Likewise.
13010
13011 * DISTLIST: Added include/grub/efi/chainloader.h,
13012 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13013
13014 * include/grub/efi/chainloader.h: New file.
13015 * loader/efi/chainloader.c: Likewise.
13016 * loader/efi/chainloader_normal.c: Likewise.
13017
13018 2006-04-30 Marco Gerards <marco@gnu.org>
13019
13020 * commands/configfile.c (grub_cmd_source): New function.
13021 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13022 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13023
13024 2006-04-30 Marco Gerards <marco@gnu.org>
13025
13026 * normal/execute.c (grub_script_execute_cmd): Change the return
13027 type to `grub_err_t'. Correctly return the error.
13028 (grub_script_execute_cmdline): In case a command line is not a
13029 command or a function, try to interpret it as an assignment.
13030
13031 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13032
13033 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13034 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13035 skip a node whose name is obviously invalid as UTF-16,
13036 i.e. contains a NUL character. Stop the iteration when the last
13037 directory entry is found. Instead of using the return value of
13038 grub_hfsplus_btree_iterate_node, store the value in RET and use
13039 it, because the iterator can be stopped by the last directory
13040 entry.
13041
13042 2006-04-30 Marco Gerards <marco@gnu.org>
13043
13044 * include/grub/env.h (grub_env_export): New prototype. Reported
13045 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13046
13047 2006-04-30 Marco Gerards <marco@gnu.org>
13048
13049 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13050 size of the extents in a catalog file record.
13051
13052 2006-04-29 Marco Gerards <marco@gnu.org>
13053
13054 * commands/configfile.c (grub_cmd_configfile): Execute the
13055 configfile within its own context.
13056
13057 * include/grub/env.h (grub_env_context_open): New prototype.
13058 (grub_env_context_close): Likewise.
13059
13060 * kern/env.c (grub_env): Removed.
13061 (grub_env_sorted): Likewise.
13062 (grub_env_context): New variable.
13063 (grub_env_var_context): Likewise.
13064 (grub_env_find): Search both the active context and the global
13065 context.
13066 (grub_env_context_open): New function.
13067 (grub_env_context_close): Likewise.
13068 (grub_env_insert): Likewise.
13069 (grub_env_remove): Likewise.
13070 (grub_env_export): Likewise.
13071 (grub_env_set): Changed to use helper functions to avoid code
13072 duplication.
13073 (grub_env_iterate): Rewritten so both the current context and the
13074 global context are being used.
13075
13076 * normal/command.c (export_command): New function.
13077 (grub_command_init): Register the `export' function.
13078
13079 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13080
13081 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13082 explicitly to suppress gcc's warnings.
13083 * fs/fat.c (grub_fat_find_dir): Likewise.
13084 (grub_fat_label): Likewise.
13085 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13086 (grub_xfs_mount): Likewise.
13087 (grub_xfs_label): Likewise.
13088 * fs/affs.c (grub_affs_mount): Likewise.
13089 (grub_affs_label): Likewise.
13090 (grub_affs_iterate_dir): Likewise.
13091 * fs/sfs.c (grub_sfs_mount): Likewise.
13092 (grub_sfs_iterate_dir): Likewise.
13093 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13094 * fs/hfs.c (grub_hfs_mount): Likewise.
13095 (grub_hfs_cmp_catkeys): Likewise.
13096 (grub_hfs_find_dir): Likewise.
13097 (grub_hfs_dir): Likewise.
13098 (grub_hfs_label): Likewise.
13099 * fs/jfs.c (grub_jfs_mount): Likewise.
13100 (grub_jfs_opendir): Likewise.
13101 (grub_jfs_getent): Likewise.
13102 (grub_jfs_lookup_symlink): Likewise.
13103 (grub_jfs_label): Likewise.
13104 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13105 (grub_hfsplus_iterate_dir): Likewise.
13106 (grub_hfsplus_btree_iterate_node): Made static.
13107
13108 * util/grub-emu.c (prefix): New variable.
13109 (grub_machine_set_prefix): New function.
13110 (main): Do not set the environment variable "prefix" here. Only
13111 set PREFIX, which is used later by grub_machine_set_prefix.
13112
13113 * include/grub/video.h: Do not include grub/symbol.h.
13114 (grub_video_register): Not exported. This symbol is not defined in
13115 the kernel.
13116 (grub_video_unregister): Likewise.
13117 (grub_video_iterate): Likewise.
13118 (grub_video_setup): Likewise.
13119 (grub_video_restore): Likewise.
13120 (grub_video_get_info): Likewise.
13121 (grub_video_get_blit_format): Likewise.
13122 (grub_video_set_palette): Likewise.
13123 (grub_video_get_palette): Likewise.
13124 (grub_video_set_viewport): Likewise.
13125 (grub_video_get_viewport): Likewise.
13126 (grub_video_map_color): Likewise.
13127 (grub_video_map_rgb): Likewise.
13128 (grub_video_map_rgba): Likewise.
13129 (grub_video_fill_rect): Likewise.
13130 (grub_video_blit_glyph): Likewise.
13131 (grub_video_blit_bitmap): Likewise.
13132 (grub_video_blit_render_target): Likewise.
13133 (grub_video_scroll): Likewise.
13134 (grub_video_swap_buffers): Likewise.
13135 (grub_video_create_render_target): Likewise.
13136 (grub_video_delete_render_target): Likewise.
13137 (grub_video_set_active_render_target): Likewise.
13138
13139 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13140 Undefined.
13141 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13142
13143 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13144 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13145 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13146 instead of $(srcdir)/genkernsyms.sh.
13147
13148 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13149 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13150 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13151 instead of $(srcdir)/genkernsyms.sh.
13152
13153 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13154 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13155 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13156 instead of $(srcdir)/genkernsyms.sh.
13157
13158 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13159 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13160 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13161 instead of $(srcdir)/genkernsyms.sh.
13162
13163 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13164 genkernsyms.sh.
13165
13166 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13167 genkernsyms.sh.
13168 (gensymlist.sh): New target.
13169 (genkernsyms.sh): Likewise.
13170
13171 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13172 genkernsyms.sh.in and gensymlist.sh.in.
13173
13174 * genkernsyms.sh: Removed.
13175 * gensymlist.sh: Likewise.
13176
13177 * genkernsyms.sh.in: New file.
13178 * gensymlist.sh.in: Likewise.
13179
13180 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13181
13182 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13183 clobber "prefix", since we may have already set it manually.
13184
13185 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13186
13187 * kern/misc.c (abort): New alias for grub_abort.
13188
13189 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13190
13191 A new machine-specific function "grub_machine_set_prefix" is
13192 defined. This is called after loading modules, so that a prefix
13193 initialization can use modules. Also, this change adds an
13194 intensive debugging feature for the memory manager via the
13195 configure option "--enable-mm-debug".
13196
13197 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13198 PART.LEN.
13199
13200 * kern/sparc64/ieee1275/init.c (abort): Removed.
13201 (grub_stop): Likewise.
13202 (grub_exit): New function.
13203 (grub_set_prefix): Renamed to ...
13204 (grub_machine_set_prefix): ... this.
13205 (grub_machine_init): Do not call grub_set_prefix.
13206
13207 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13208 (grub_machine_set_prefix): ... this.
13209 (grub_machine_init): Do not call grub_set_prefix.
13210
13211 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13212 (grub_machine_init): Do not set the prefix here.
13213
13214 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13215
13216 * kern/efi/init.c: Include grub/mm.h.
13217 (grub_efi_set_prefix): New function.
13218
13219 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13220 (grub_efi_get_filename): New function.
13221 (grub_print_device_path): Renamed to ...
13222 (grub_efi_print_device_path): ... this.
13223
13224 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13225 [MM_DEBUG] (grub_realloc): Likewise.
13226 [MM_DEBUG] (grub_free): Likewise.
13227 [MM_DEBUG] (grub_memalign): Likewise.
13228 [MM_DEBUG] (grub_mm_debug): New variable.
13229 [MM_DEBUG] (grub_debug_malloc): New function.
13230 [MM_DEBUG] (grub_debug_free): New function.
13231 [MM_DEBUG] (grub_debug_realloc): New function.
13232 [MM_DEBUG] (grub_debug_memalign): New function.
13233
13234 * kern/misc.c (grub_abort): Print a newline to distinguish
13235 the message.
13236
13237 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13238 grub_set_root_dev after loading modules. This is necessary when
13239 setting a prefix depends on modules.
13240
13241 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13242 (grub_efi_print_device_path): ... this.
13243 (grub_efi_get_filename): New prototype.
13244 (grub_efi_set_prefix): Likewise.
13245
13246 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13247 and grub/disk.h.
13248 (grub_efidisk_get_device_handle): New prototype.
13249 (grub_efidisk_get_device_name): Likewise.
13250
13251 * include/grub/mm.h: Include config.h.
13252 (MM_DEBUG): Removed.
13253 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13254 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13255 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13256 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13257 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13258 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13259 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13260 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13261 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13262
13263 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13264
13265 * disk/efi/efidisk.c: Include grub/partition.h.
13266 (iterate_child_devices): New function.
13267 (add_device): First, compare only last device path nodes, so that
13268 devices are sorted by the types.
13269 (grub_efidisk_get_device_handle): New function.
13270 (grub_efidisk_get_device_name): Likewise.
13271
13272 * configure.ac (--enable-mm-debug): New option to enable the
13273 memory manager debugging feature. This makes the binary much
13274 bigger, so is disabled by default.
13275
13276 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13277
13278 Use grub_abort instead of grub_stop, and grub_exit must be
13279 define in each architecture now. Also, this change adds support
13280 for EFI disks.
13281
13282 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13283 (grub_getkey): New function.
13284 (grub_term_get_current): Likewise.
13285
13286 * util/i386/pc/grub-setup.c: Include grub/term.h.
13287 (grub_getkey): New function.
13288 (grub_term_get_current): Likewise.
13289
13290 * util/misc.c (grub_stop): Renamed to ...
13291 (grub_exit): ... this.
13292
13293 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13294 (grub_exit): ... this.
13295 (grub_machine_init): Use grub_abort instead of abort.
13296 (grub_stop): Removed.
13297
13298 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13299 abort.
13300
13301 * kern/i386/pc/startup.S (grub_exit): New function.
13302 (cold_reboot): New label.
13303
13304 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13305 (grub_efi_init): Call grub_efidisk_init.
13306 (grub_efi_fini): Call grub_efidisk_fini.
13307
13308 * kern/efi/efi.c: Include grub/mm.h.
13309 (grub_efi_console_control_guid): Renamed to ...
13310 (console_control_guid): ... this.
13311 (grub_efi_loaded_image_guid): Renamed to ...
13312 (loaded_image_guid): ... this.
13313 (grub_efi_locate_handle): New function.
13314 (grub_efi_open_protocol): Likewise.
13315 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13316 GRUB_EFI_CONSOLE_CONTROL_GUID.
13317 (grub_efi_exit): Removed.
13318 (grub_stop): Likewise.
13319 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13320 (grub_exit): New function.
13321 (grub_print_device_path): Likewise.
13322
13323 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13324 (grub_enter_rescue_mode): Register "exit".
13325
13326 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13327 (grub_abort): New function.
13328
13329 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13330
13331 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13332
13333 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13334
13335 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13336 (grub_print_device_path): New prototype.
13337 (grub_efi_locate_handle): Likewise.
13338 (grub_efi_open_protocol): Likewise.
13339
13340 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13341 * disk/efi/efidisk.c: Likewise.
13342
13343 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13344
13345 * include/grub/efi/console_control.h
13346 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13347
13348 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13349 last 8 bytes as an array.
13350 (GRUB_EFI_DISK_IO_GUID): New macro.
13351 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13352 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13353 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13354 grub_uint8_t.
13355 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13356 (struct grub_efi_device_path): Rename the member "sub_type" to
13357 "subtype".
13358 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13359 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13360 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13361 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13362 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13363 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13364 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13365 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13366 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13367 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13368 (struct grub_efi_pci_device_path): New structure.
13369 (grub_efi_pci_device_path_t): New type.
13370 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13371 (struct grub_efi_pccard_device_path): New structure.
13372 (grub_efi_pccard_device_path_t): New type.
13373 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13374 (struct grub_efi_memory_mapped_device_path): New structure.
13375 (grub_efi_memory_mapped_device_path_t): New type.
13376 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13377 (struct grub_efi_vendor_device_path): New structure.
13378 (grub_efi_vendor_device_path_t): New type.
13379 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13380 (struct grub_efi_controller_device_path): New structure.
13381 (grub_efi_controller_device_path_t): New type.
13382 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13383 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13384 (struct grub_efi_acpi_device_path): New structure.
13385 (grub_efi_acpi_device_path_t): New type.
13386 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13387 (struct grub_efi_expanded_acpi_device_path): New structure.
13388 (grub_efi_expanded_acpi_device_path_t): New type.
13389 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13390 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13391 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13392 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13393 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13394 (struct grub_efi_atapi_device_path): New structure.
13395 (grub_efi_atapi_device_path_t): New type.
13396 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13397 (struct grub_efi_fibre_channel_device_path): New structure.
13398 (grub_efi_fibre_channel_device_path_t): New type.
13399 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13400 (struct grub_efi_1394_device_path): New structure.
13401 (grub_efi_1394_device_path_t): New type.
13402 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13403 (struct grub_efi_usb_device_path): New structure.
13404 (grub_efi_usb_device_path_t): New type.
13405 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13406 (struct grub_efi_usb_class_device_path): New structure.
13407 (grub_efi_usb_class_device_path_t): New type.
13408 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13409 (struct grub_efi_i2o_device_path): New structure.
13410 (grub_efi_i2o_device_path_t): New type.
13411 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13412 (struct grub_efi_mac_address_device_path): New structure.
13413 (grub_efi_mac_address_device_path_t): New type.
13414 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13415 (struct grub_efi_ipv4_device_path): New structure.
13416 (grub_efi_ipv4_device_path_t): New type.
13417 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13418 (struct grub_efi_ipv6_device_path): New structure.
13419 (grub_efi_ipv6_device_path_t): New type.
13420 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13421 (struct grub_efi_infiniband_device_path): New structure.
13422 (grub_efi_infiniband_device_path_t): New type.
13423 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13424 (struct grub_efi_uart_device_path): New structure.
13425 (grub_efi_uart_device_path_t): New type.
13426 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13427 (struct grub_efi_vendor_messaging_device_path): New structure.
13428 (grub_efi_vendor_messaging_device_path_t): New type.
13429 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13430 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13431 (struct grub_efi_hard_drive_device_path): New structure.
13432 (grub_efi_hard_drive_device_path_t): New type.
13433 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13434 (struct grub_efi_cdrom_device_path): New structure.
13435 (grub_efi_cdrom_device_path_t): New type.
13436 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13437 (struct grub_efi_vendor_media_device_path): New structure.
13438 (grub_efi_vendor_media_device_path_t): New type.
13439 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13440 (struct grub_efi_file_path_device_path): New structure.
13441 (grub_efi_file_path_device_path_t): New type.
13442 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13443 (struct grub_efi_protocol_device_path): New structure.
13444 (grub_efi_protocol_device_path_t): New type.
13445 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13446 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13447 (struct grub_efi_bios_device_path): New structure.
13448 (grub_efi_bios_device_path_t): New type.
13449 (struct grub_efi_disk_io): New structure.
13450 (grub_efi_disk_io_t): New type.
13451 (struct grub_efi_block_io_media): New structure.
13452 (grub_efi_block_io_media_t): New type.
13453 (struct grub_efi_block_io): New structure.
13454 (grub_efi_block_io_t): New type.
13455
13456 * include/grub/misc.h (grub_stop): Removed.
13457 (grub_exit): New prototype.
13458 (grub_abort): Likewise.
13459
13460 * include/grub/disk.h (enum grub_disk_dev_id): Added
13461 GRUB_DISK_DEVICE_EFIDISK_ID.
13462
13463 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13464 disk/efi/efidisk.c.
13465 (kernel_syms.lst): Remove the target if an error occurs.
13466
13467 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13468
13469 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13470 as it was simply too buggy.
13471
13472 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13473
13474 * kern/misc.c (grub_lltoa): New function.
13475 (grub_vsprintf): Added support for the long long suffix,
13476 i.e. "ll".
13477
13478 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13479
13480 * Makefile.in (LDFLAGS): Add variable.
13481 (LD): Remove variable.
13482 * configure.ac: Add -m32 to LDFLAGS.
13483 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13484 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13485 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13486 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13487 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13488 variables.
13489 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13490 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13491 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13492
13493 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13494
13495 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13496 length for unknown glyph.
13497
13498 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13499
13500 Add support for pre-loaded modules into the EFI port.
13501
13502 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13503 completely. Accept one more argument DIR. The caller has changed.
13504
13505 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13506
13507 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13508 (grub_efi_loaded_image_guid): New variable.
13509 (grub_efi_get_loaded_image): New function.
13510 (grub_arch_modules_addr): Likewise.
13511
13512 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13513 prototype.
13514
13515 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13516 (struct grub_efi_loaded_image): New structure.
13517 (grub_efi_loaded_image_t): New type.
13518
13519 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13520
13521 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13522 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13523 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13524
13525 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13526
13527 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13528
13529 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13530
13531 * DISTLIST: Added include/grub/efi/console.h,
13532 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13533 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13534
13535 * include/grub/efi/console.h: New file.
13536 * include/grub/efi/time.h: Likewise.
13537 * include/grub/i386/efi/kernel.h: Likewise.
13538 * kern/efi/init.c: Likewise.
13539 * kern/efi/mm.c: Likewise.
13540 * term/efi/console.c: Likewise.
13541
13542 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13543 (grub_stop): Removed.
13544 (grub_get_rtc): Likewise.
13545 (grub_machine_init): Simply call grub_efi_init.
13546 (grub_machine_fini): Call grub_efi_fini.
13547
13548 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13549 (grub_efi_output_string): Removed.
13550 (grub_efi_stall): New function.
13551 (grub_stop): Likewise.
13552 (grub_get_rtc): Likewise.
13553
13554 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13555 (grub_efi_stall): New prototype.
13556 (grub_efi_allocate_pages): Likewise.
13557 (grub_efi_free_pages): Likewise.
13558 (grub_efi_get_memory_map): Likewise.
13559 (grub_efi_mm_init): Likewise.
13560 (grub_efi_mm_fini): Likewise.
13561 (grub_efi_init): Likewise.
13562 (grub_efi_fini): Likewise.
13563
13564 * include/grub/i386/efi/time.h: Do not include
13565 grub/symbol.h. Include grub/efi/time.h.
13566 (GRUB_TICKS_PER_SECOND): Removed.
13567 (grub_get_rtc): Likewise.
13568
13569 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13570 Added padding. The EFI spec is buggy.
13571 (GRUB_EFI_BLACK): New macro.
13572 (GRUB_EFI_BLUE): Likewise.
13573 (GRUB_EFI_GREEN): Likewise.
13574 (GRUB_EFI_CYAN): Likewise.
13575 (GRUB_EFI_RED): Likewise.
13576 (GRUB_EFI_MAGENTA): Likewise.
13577 (GRUB_EFI_BROWN): Likewise.
13578 (GRUB_EFI_LIGHTGRAY): Likewise.
13579 (GRUB_EFI_BRIGHT): Likewise.
13580 (GRUB_EFI_DARKGRAY): Likewise.
13581 (GRUB_EFI_LIGHTBLUE): Likewise.
13582 (GRUB_EFI_LIGHTGREEN): Likewise.
13583 (GRUB_EFI_LIGHTCYAN): Likewise.
13584 (GRUB_EFI_LIGHTRED): Likewise.
13585 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13586 (GRUB_EFI_YELLOW): Likewise.
13587 (GRUB_EFI_WHITE): Likewise.
13588 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13589 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13590 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13591 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13592 (GRUB_EFI_BACKGROUND_RED): Likewise.
13593 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13594 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13595 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13596 (GRUB_EFI_TEXT_ATTR): Likewise.
13597
13598 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13599 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13600 (kernel_mod_HEADERS): Added efi/time.h.
13601
13602 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13603
13604 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13605 include/grub/efi/api.h, include/grub/efi/console_control.h,
13606 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13607 include/grub/i386/efi/time.h, kern/efi/efi.c,
13608 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13609 and util/i386/efi/grub-mkimage.c.
13610
13611 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13612
13613 * genmk.rb (PModule#rule): Do not export symbols if
13614 #{prefix}_EXPORTS is set to "no".
13615
13616 * conf/i386-efi.mk: New file.
13617 * conf/i386-efi.rmk: Likewise.
13618 * include/grub/efi/api.h: Likewise.
13619 * include/grub/efi/console_control.h: Likewise.
13620 * include/grub/efi/efi.h: Likewise.
13621 * include/grub/efi/pe32.h: Likewise.
13622 * include/grub/i386/efi/time.h: Likewise.
13623 * kern/efi/efi.c: Likewise.
13624 * kern/i386/efi/init.c: Likewise.
13625 * kern/i386/efi/startup.S: Likewise.
13626 * util/i386/efi/grub-mkimage.c: Likewise.
13627
13628 2006-04-17 Marco Gerards <marco@gnu.org>
13629
13630 * include/grub/script.h: Include <grub/parser.h> and
13631 "grub_script.tab.h".
13632 (struct grub_lexer_param): New struct.
13633 (struct grub_parser_param): Likewise.
13634 (grub_script_create_arglist): Pass the state in an argument.
13635 (grub_script_add_arglist): Likewise.
13636 (grub_script_create_cmdline): Likewise.
13637 (grub_script_create_cmdblock): Likewise.
13638 (grub_script_create_cmdif): Likewise.
13639 (grub_script_create_cmdmenu): Likewise.
13640 (grub_script_add_cmd): Likewise.
13641 (grub_script_arg_add): Likewise.
13642 (grub_script_lexer_ref): Likewise.
13643 (grub_script_lexer_deref): Likewise.
13644 (grub_script_lexer_record_start): Likewise.
13645 (grub_script_lexer_record_stop): Likewise.
13646 (grub_script_mem_record): Likewise.
13647 (grub_script_mem_record_stop): Likewise.
13648 (grub_script_malloc): Likewise.
13649 (grub_script_yylex): Likewise.
13650 (grub_script_yyparse): Likewise.
13651 (grub_script_yyerror): Likewise.
13652 (grub_script_yylex): Likewise.
13653 (grub_script_lexer_init): Return the state.
13654
13655 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13656 (grub_script_lexer_done): Likewise.
13657 (grub_script_lexer_getline): Likewise.
13658 (grub_script_lexer_refs): Likewise.
13659 (script): Likewise.
13660 (newscript): Likewise.
13661 (record): Likewise.
13662 (recording): Likewise.
13663 (recordpos): Likewise.
13664 (recordlen): Likewise.
13665 (grub_script_lexer_init): Return the state instead of setting
13666 global variables.
13667 (grub_script_lexer_ref): Use the newly added argument for state
13668 instead of globals.
13669 (grub_script_lexer_deref): Likewise.
13670 (grub_script_lexer_record_start): Likewise.
13671 (grub_script_lexer_record_stop): Likewise.
13672 (recordchar): Likewise.
13673 (nextchar): Likewise.
13674 (grub_script_yylex2): Likewise.
13675 (grub_script_yylex): Likewise.
13676 (grub_script_yyerror): Likewise.
13677
13678 * normal/parser.y (func_mem): Removed variable.
13679 (menu_entry): Likewise.
13680 (err): Likewise.
13681 (%lex-param): New parser option.
13682 (%parse-param): Likewise.
13683 (script): Always return the AST.
13684 (argument): Pass the state around.
13685 (arguments): Likewise.
13686 (grubcmd): Likewise.
13687 (commands): Likewise.
13688 (function): Likewise.
13689 (menuentry): Likewise.
13690 (if_statement): Likewise.
13691 (if): Likewise.
13692
13693 * normal/script.c (grub_script_memused): Removed variable.
13694 (grub_script_parsed): Likewise.
13695 (grub_script_malloc): Added a state argument. Use that instead of
13696 global variables.
13697 (grub_script_mem_record): Likewise.
13698 (grub_script_mem_record_stop): Likewise.
13699 (grub_script_arg_add): Likewise.
13700 (grub_script_add_arglist): Likewise.
13701 (grub_script_create_cmdline): Likewise.
13702 (grub_script_create_cmdif): Likewise.
13703 (grub_script_create_cmdmenu): Likewise.
13704 (grub_script_add_cmd): Likewise.
13705 (grub_script_parse): Setup the state before calling the parser.
13706
13707 2006-04-16 Marco Gerards <marco@gnu.org>
13708
13709 * normal/command.c (grub_command_init): Remove the title command.
13710
13711 * normal/lexer.c (grub_script_yylex): Renamed from this...
13712 (grub_script_yylex2): ... to this.
13713 (grub_script_yylex): New function. Temporary
13714 introduced to filter some tokens.
13715 (grub_script_yyerror): Print a newline.
13716
13717 * normal/main.c (read_config_file): Output information about the
13718 lines that contain errors. Wait for a key after all lines have
13719 been processed. Don't return an empty menu.
13720
13721 * normal/parser.y (func_mem): Don't initialize.
13722 (menu_entry): Likewise.
13723 (err): New variable.
13724 (script): Don't return anything when an error was encountered.
13725 (ws, returns): Removed rules.
13726 (argument): Disabled concatenated variable support.
13727 (arguments): Remove explicit separators.
13728 (grubcmd): Likewise.
13729 (function): Likewise.
13730 (menuentry): Likewise.
13731 (if): Likewise.
13732 (commands): Likewise. Add error handling.
13733
13734 * normal/script.c (grub_script_create_cmdline): If
13735 `grub_script_parsed' is 0, assume the parser encountered an error.
13736
13737 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13738
13739 * configure.ac: Add support for EFI. Fix the typo
13740 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13741
13742 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13743
13744 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13745 foreign multibyte characters should be shown correctly.
13746
13747 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13748
13749 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13750 calculation.
13751 (read_config_file): Made it to close file before returning.
13752
13753 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13754
13755 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13756 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13757 video/i386/pc/vbefill.c.
13758
13759 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13760 video/i386/pc/vbefill.c.
13761
13762 * include/grub/video.h (grub_video_blit_format): New enum.
13763 (grub_video_mode_info): Added new member blit_format.
13764 (grub_video_get_blit_format): New function prototype.
13765
13766 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13767 function prototype.
13768 (grub_video_vbe_map_rgb): Likewise.
13769 (grub_video_vbe_unmap_color): Likewise.
13770
13771 * include/grub/i386/pc/vbeblit.h: New file.
13772
13773 * include/grub/i386/pc/vbefill.h: New file.
13774
13775 * video/video.c (grub_video_get_blit_format): New function.
13776 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13777 (grub_video_vbe_map_rgb): Likewise.
13778 (grub_video_vbe_unmap_color): Likewise.
13779
13780 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13781 optimized fills.
13782 (grub_video_vbe_blit_render_target): Changed to use more optimized
13783 blits.
13784 (grub_video_vbe_setup): Added detection for optimized settings.
13785 (grub_video_vbe_create_render_target): Likewise.
13786
13787 * video/i386/pc/vbeblit.c: New file.
13788
13789 * video/i386/pc/vbefill.c: New file.
13790
13791 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13792
13793 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13794 here...
13795
13796 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13797 parsing to support both hex and dec ranges. If filename was missing
13798 show usage information.
13799
13800 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13801
13802 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13803 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13804
13805 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13806 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13807 (video_mod_SOURCES): Added.
13808 (video_mod_CFLAGS): Likewise.
13809 (video_mod_LDFLAGS): Likewise.
13810 (gfxterm_mod_SOURCES): Likewise.
13811 (gfxterm_mod_CFLAGS): Likewise.
13812 (gfxterm_mod_LDFLAGS): Likewise.
13813 (videotest_mod_SOURCES): Likewise.
13814 (videotest_mod_CFLAGS): Likewise.
13815 (videotest_mod_LDFLAGS): Likewise.
13816 (vesafb_mod_SOURCES): Removed.
13817 (vesafb_mod_CFLAGS): Likewise.
13818 (vesafb_mod_LDFLAGS): Likewise.
13819 (vga_mod_SOURCES): Likewise.
13820 (vga_mod_CFLAGS): Likewise.
13821 (vga_mod_LDFLAGS): Likewise.
13822
13823 * commands/videotest.c: New file.
13824
13825 * font/manager.c (fill_with_default_glyph): Modified to use
13826 grub_font_glyph.
13827 (grub_font_get_glyph): Likewise.
13828 (fontmanager): Renamed from this...
13829 (font_manager): ... to this.
13830
13831 * include/grub/font.h (grub_font_glyph): Added new structure.
13832 (grub_font_get_glyph): Modified to use grub_font_glyph.
13833
13834 * include/grub/misc.h (grub_abs): Added as inline function.
13835
13836 * include/grub/video.h: New file.
13837
13838 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13839 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13840 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13841 (grub_vbe_get_controller_info): Renamed from this...
13842 (grub_vbe_bios_get_controller_info): ... to this.
13843 (grub_vbe_get_mode_info): Renamed from this...
13844 (grub_vbe_bios_get_mode_info): ... to this.
13845 (grub_vbe_set_mode): Renamed from this...
13846 (grub_vbe_bios_set_mode): ... to this.
13847 (grub_vbe_get_mode): Renamed from this...
13848 (grub_vbe_bios_get_mode): ... to this.
13849 (grub_vbe_set_memory_window): Renamed from this...
13850 (grub_vbe_bios_set_memory_window): ... to this.
13851 (grub_vbe_get_memory_window): Renamed from this...
13852 (grub_vbe_bios_get_memory_window): ... to this.
13853 (grub_vbe_set_scanline_length): Renamed from this...
13854 (grub_vbe_set_scanline_length): ... to this.
13855 (grub_vbe_get_scanline_length): Renamed from this...
13856 (grub_vbe_bios_get_scanline_length): ... to this.
13857 (grub_vbe_set_display_start): Renamed from this...
13858 (grub_vbe_bios_set_display_start): ... to this.
13859 (grub_vbe_get_display_start): Renamed from this...
13860 (grub_vbe_bios_get_display_start): ... to this.
13861 (grub_vbe_set_palette_data): Renamed from this...
13862 (grub_vbe_bios_set_palette_data): ... to this.
13863 (grub_vbe_set_pixel_rgb): Removed.
13864 (grub_vbe_set_pixel_index): Likewise.
13865
13866 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13867 from this...
13868 (grub_vbe_bios_get_controller_info): ... to this.
13869 (grub_vbe_get_mode_info): Renamed from this...
13870 (grub_vbe_bios_get_mode_info): ... to this.
13871 (grub_vbe_set_mode): Renamed from this...
13872 (grub_vbe_bios_set_mode): ... to this.
13873 (grub_vbe_get_mode): Renamed from this...
13874 (grub_vbe_bios_get_mode): ... to this.
13875 (grub_vbe_set_memory_window): Renamed from this...
13876 (grub_vbe_bios_set_memory_window): ... to this.
13877 (grub_vbe_get_memory_window): Renamed from this...
13878 (grub_vbe_bios_get_memory_window): ... to this.
13879 (grub_vbe_set_scanline_length): Renamed from this...
13880 (grub_vbe_set_scanline_length): ... to this.
13881 (grub_vbe_get_scanline_length): Renamed from this...
13882 (grub_vbe_bios_get_scanline_length): ... to this.
13883 (grub_vbe_set_display_start): Renamed from this...
13884 (grub_vbe_bios_set_display_start): ... to this.
13885 (grub_vbe_get_display_start): Renamed from this...
13886 (grub_vbe_bios_get_display_start): ... to this.
13887 (grub_vbe_set_palette_data): Renamed from this...
13888 (grub_vbe_bios_set_palette_data): ... to this.
13889 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13890 getting corrupted after calling it. Added more pushes and pops.
13891 (grub_vbe_bios_set_mode): Likewise.
13892 (grub_vbe_bios_get_mode): Likewise.
13893 (grub_vbe_bios_get_memory_window): Likewise.
13894 (grub_vbe_bios_set_scanline_length): Likewise.
13895 (grub_vbe_bios_get_scanline_length): Likewise.
13896 (grub_vbe_bios_get_display_start): Likewise.
13897 (grub_vbe_bios_set_palette_data): Likewise.
13898
13899 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13900 (cl_insert): Likewise.
13901 (cl_delete): Likewise.
13902
13903 * term/gfxterm.c: New file.
13904
13905 * term/i386/pc/vesafb.c: Removed file.
13906
13907 * video/video.c: New file.
13908
13909 * video/i386/pc/vbe.c (real2pm): Added new function.
13910 (grub_video_vbe_draw_pixel): Likewise.
13911 (grub_video_vbe_get_video_ptr): Likewise.
13912 (grub_video_vbe_get_pixel): Likewise
13913 (grub_video_vbe_init): Likewise.
13914 (grub_video_vbe_fini): Likewise.
13915 (grub_video_vbe_setup): Likewise.
13916 (grub_video_vbe_get_info): Likewise.
13917 (grub_video_vbe_set_palette): Likewise.
13918 (grub_video_vbe_get_palette): Likewise.
13919 (grub_video_vbe_set_viewport): Likewise.
13920 (grub_video_vbe_get_viewport): Likewise.
13921 (grub_video_vbe_map_color): Likewise.
13922 (grub_video_vbe_map_rgb): Likewise.
13923 (grub_video_vbe_map_rgba): Likewise.
13924 (grub_video_vbe_unmap_color): Likewise.
13925 (grub_video_vbe_fill_rect): Likewise.
13926 (grub_video_vbe_blit_glyph): Likewise.
13927 (grub_video_vbe_blit_bitmap): Likewise.
13928 (grub_video_vbe_blit_render_target): Likewise.
13929 (grub_video_vbe_scroll): Likewise.
13930 (grub_video_vbe_swap_buffers): Likewise.
13931 (grub_video_vbe_create_render_target): Likewise.
13932 (grub_video_vbe_delete_render_target): Likewise.
13933 (grub_video_vbe_set_active_render_target): Likewise.
13934 (grub_vbe_set_pixel_rgb): Remove function.
13935 (grub_vbe_set_pixel_index): Likewise.
13936 (index_color_mode): Remove static variable.
13937 (active_mode): Likewise.
13938 (framebuffer): Likewise.
13939 (bytes_per_scan_line): Likewise.
13940 (grub_video_vbe_adapter): Added new static variable.
13941 (framebuffer): Likewise.
13942 (render_target): Likewise.
13943 (initial_mode): Likewise.
13944 (mode_in_use): Likewise.
13945 (mode_list): Likewise.
13946
13947 2006-03-10 Marco Gerards <marco@gnu.org>
13948
13949 * configure.ac (AC_INIT): Bumped to 1.93.
13950
13951 * DISTLIST: Added `include/grub/hfs.h'.
13952
13953 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13954
13955 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13956 18H, which might help the BIOS falling back to next boot media.
13957
13958 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13959
13960 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13961 Poe Chen <poe.poechen@gmail.com>.
13962
13963 2006-01-17 Marco Gerards <marco@gnu.org>
13964
13965 * include/grub/normal.h: Include <grub/script.h>.
13966 (grub_command_list): Removed struct.
13967 (grub_command_list_t): Removed type.
13968 (grub_menu_entry): Remove members `num' and `command_list'. Add
13969 members `commands' and `sourcecode'.
13970 * include/grub/script.h: Add inclusion guards.
13971 (grub_script_cmd_menuentry): New struct.
13972 (grub_script_execute_menuentry): New prototype.
13973 (grub_script_lexer_record_start): Likewise.
13974 (grub_script_lexer_record_stop): Likewise.
13975 * normal/execute.c (grub_script_execute_menuentry): New function.
13976 * normal/lexer.c (record, recording, recordpos, recordlen): New
13977 variables.
13978 (grub_script_lexer_record_start): New function.
13979 (grub_script_lexer_record_stop): Likewise.
13980 (recordchar): Likewise.
13981 (nextchar): Likewise.
13982 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13983 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13984 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13985 (current_menu): New variable.
13986 (free_menu): Mainly rewritten.
13987 (grub_normal_menu_addentry): New function.
13988 (read_config_file): Rewritten.
13989 * normal/menu.c (run_menu_entry): Mainly rewritten.
13990 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13991 the menu entry.
13992 (run): Mainly rewritten.
13993 * normal/parser.y (menu_entry): New variable.
13994 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13995 (menuentry): New rule.
13996 (command): Add `menuentry'.
13997 (if_statement): Allow additional returns before `fi'.
13998 * normal/script.c (grub_script_create_cmdmenu): New function.
13999
14000 2006-01-03 Marco Gerards <marco@gnu.org>
14001
14002 * INSTALL: GNU Bison is required.
14003 * configure.ac: Rewritten the test to detect Bison.
14004 * Makefile.in (YACC): New variable. Reported by Xun Sun
14005 <xun.sun.cn@gmail.com>.
14006
14007 2006-01-03 Marco Gerards <marco@gnu.org>
14008
14009 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14010 the HFS+ filesystem to filesystem blocks.
14011 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14012 GCC warning is silenced.
14013
14014 2006-01-03 Marco Gerards <marco@gnu.org>
14015
14016 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14017 read from disk from big endian to host byte order.
14018
14019 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14020
14021 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14022 documentation.
14023 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14024 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14025 embedded HFS+ filesystem.
14026 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14027 (grub_hfs_sblock): Move from here...
14028 * include/grub/hfs.h: To here... New file.
14029 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14030 documentation.
14031 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14032 New macros.
14033 (grub_hfsplus_volheader): Change type of member `magic' to
14034 `grub_uint16_t'.
14035 (grub_hfsplus_data): Add new member `embedded_offset'.
14036 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14037 returned block.
14038 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14039 Calculate the offset.
14040
14041 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14042
14043 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14044 Removed.
14045 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14046
14047 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14048
14049 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14050 ENV->NAME is NULL after allocating ENV->VALUE.
14051
14052 2005-12-25 Marco Gerards <marco@gnu.org>
14053
14054 * kern/env.c (grub_env_set): Rewritten the error handling code.
14055
14056 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14057
14058 * geninit.sh: Made more robust, and more portable.
14059
14060 2005-12-25 Marco Gerards <marco@gnu.org>
14061
14062 Add support for Apple HFS+ filesystems.
14063
14064 * fs/hfsplus.c: New file.
14065
14066 * DISTLIST: Added `fs/hfsplus.c'.
14067
14068 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14069 (hfsplus_mod_SOURCES): New variable.
14070 (hfsplus_mod_CFLAGS): Likewise.
14071 (hfsplus_mod_LDFLAGS): Likewise.
14072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14073 (grub_setup_SOURCES): Likewise.
14074 (grub_mkdevicemap_SOURCES): Likewise.
14075 (grub_emu_SOURCES): Likewise.
14076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14077
14078 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14079
14080 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14081
14082 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14083
14084 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14085 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14086 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14087 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14088 normal/lexer.c, normal/parser.y, normal/script.c, and
14089 partmap/gpt.c.
14090 Removed kern/sparc64/cache.c.
14091
14092 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14093 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14094 grub_emu_init.c.
14095
14096 * configure.ac (AC_INIT): Bumped to 1.92.
14097
14098 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14099
14100 * kern/err.c (grub_error_push): Added new function to support error
14101 stacks.
14102 (grub_error_pop): Likewise.
14103 (grub_error_stack_items): New local variable to support error stacks.
14104 (grub_error_stack_pos): Likewise.
14105 (grub_error_stack_assert): Likewise.
14106 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14107 stack depth.
14108 (grub_print_error): Added support to print errors from error stack.
14109
14110 * include/grub/err.h (grub_error_push): Added function prototype.
14111 (grub_error_pop): Likewise.
14112
14113 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14114
14115 * configure.ac: Accept `powerpc64' as host_cpu.
14116 (amd64): Rename to `biarch32'.
14117
14118 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14119 non-cacheline-aligned addresses.
14120
14121 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14122 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14123 if `size' is non-zero.
14124
14125 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
14126
14127 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14128 and `cd' to make sure the filename is not prefixed with a
14129 directory name.
14130 (pkgdata_MODULES): Add `gpt.mod'.
14131 (gpt_mod_SOURCES): New variable.
14132 (gpt_mod_CFLAGS): Likewise.
14133 (gpt_mod_LDFLAGS): Likewise.
14134
14135 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14136
14137 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14138 New macro.
14139
14140 * partmap/gpt.c: New file.
14141
14142 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14143 GPT partition map is detected.
14144
14145 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14146
14147 * commands/i386/pc/play.c: New file.
14148 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14149 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14150 macros.
14151
14152 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
14153
14154 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14155 ((unused))' to silence gcc warning.
14156
14157 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14158
14159 * configure.ac: Correct `AC_PROG_YACC' test.
14160
14161 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14162
14163 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14164 check before installing files.
14165
14166 2005-11-22 Mike Small <smallm@panix.com>
14167
14168 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14169 number regex so multidigit numbers are recognized correctly.
14170
14171 2005-11-22 Mike Small <smallm@panix.com>
14172
14173 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14174 debugging message before attempting to claim memory.
14175 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14176 multiple addresses in case of failure.
14177
14178 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14179
14180 * term/tparm.c (get_space): Remove empty `if' statement.
14181
14182 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14183
14184 * kern/parser.c (check_varstate): Rename `state' to 's'.
14185
14186 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14187
14188 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14189 variable definitions to the beginning of each function. Sort stack
14190 variables by size.
14191 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14192 `buf' argument to `char *'.
14193
14194 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14195
14196 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14197 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14198 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14199 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14200 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14201 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14202 configfile.mod, search.mod, gzio.mod and test.mod.
14203 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14204 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14205 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14206 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14207 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14208 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14209 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14210 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14211 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14212 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14213 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14214 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14215 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14216 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14217 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14218 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14219 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14220 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14221 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14222 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14223 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14224 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14225 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14226
14227 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14228 `grep --include'.
14229 (pkgdata_MODULES): Add test.mod.
14230
14231 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14232
14233 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14234 appending to variables with "+=".
14235 (PModule): Use full pathname to generate *.lst filenames.
14236
14237 * Makefile.in: Fixed list rules moved from genmk.rb.
14238 (.DELETE_ON_ERROR): New special target.
14239 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14240
14241 * conf/i386-pc.rmk: Include conf/common.mk.
14242 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14243 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14244 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14245 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14246 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14247 configfile.mod, search.mod, gzio.mod and test.mod.
14248 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14249 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14250 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14251 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14252 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14253 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14254 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14255 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14256 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14257 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14258 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14259 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14260 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14261 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14262 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14263 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14264 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14265 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14266 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14267 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14268 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14269 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14270 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14271 here...
14272 * conf/common.rmk: ... to here. New file.
14273
14274 * conf/common.mk: New file.
14275
14276 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14277
14278 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14279 (grub_script.tab.c): ... here.
14280
14281 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14282 (grub_script.tab.c): ... here.
14283
14284 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14285 (grub_script.tab.c): ... here.
14286
14287 * normal/command.c (grub_command_find): Fixed a memory leak of
14288 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14289
14290 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14291
14292 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14293 "@" which marks the start of a comment on ARM.
14294 (VARIABLE): Likewise.
14295
14296 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14297
14298 Add support for Linux/ADFS partition tables.
14299
14300 * partmap/acorn.c: New file.
14301
14302 * include/grub/acorn_filecore.h: Likewise.
14303
14304 * DISTLIST: Added `partmap/acorn.c' and
14305 `include/grub/acorn_filecore.h'.
14306
14307 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14308 `partmap/acorn.c'.
14309 (pkgdata_MODULES): Add `acorn.mod'.
14310 (acorn_mod_SOURCES): New variable.
14311 (acorn_mod_CFLAGS): Likewise.
14312
14313 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14314 `partmap/acorn.c'.
14315 (pkgdata_MODULES): Add `acorn.mod'.
14316 (acorn_mod_SOURCES): New variable.
14317 (acorn_mod_CFLAGS): Likewise.
14318
14319 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14320 (pkgdata_MODULES): Add `acorn.mod'.
14321 (acorn_mod_SOURCES): New variable.
14322 (acorn_mod_CFLAGS): Likewise.
14323 (acorn_mod_LDFLAGS): Likewise.
14324
14325 * include/types.h (grub_disk_addr_t): New typedef.
14326
14327 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14328
14329 * geninit.sh: New file.
14330
14331 * geninitheader.sh: Likewise.
14332
14333 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14334 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14335 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14336 * commands/configfile.c (grub_configfile_init)
14337 (grub_configfile_fini): Likewise.
14338 * commands/default.c (grub_default_init, grub_default_fini):
14339 Likewise.
14340 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14341 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14342 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14343 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14344 Likewise.
14345 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14346 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14347 Likewise.
14348 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14349 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14350 Likewise.
14351 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14352 Likewise.
14353 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14354 Likewise.
14355 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14356 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14357 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14358 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14359 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14360 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14361 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14362 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14363 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14364 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14365 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14366 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14367 * partmap/amiga.c (grub_amiga_partition_map_init)
14368 (grub_amiga_partition_map_fini): Likewise.
14369 * partmap/apple.c (grub_apple_partition_map_init)
14370 (grub_apple_partition_map_fini): Likewise.
14371 * partmap/pc.c (grub_pc_partition_map_init)
14372 (grub_pc_partition_map_fini): Likewise.
14373 * partmap/sun.c (grub_sun_partition_map_init,
14374 grub_sun_partition_map_fini): Likewise.
14375 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14376 Likewise.
14377
14378 * util/grub-emu.c: Include <grub_modules_init.h>.
14379 (main): Don't initialize and de-initialize any modules directly,
14380 use `grub_init_all' and `grub_fini_all' instead.
14381
14382 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14383 `grub_vesafb_mod_init'.
14384 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14385 all users.
14386 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14387 `grub_vga_mod_init'. Updated all users.
14388 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14389
14390 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14391 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14392 rules.
14393
14394 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14395 Generate a function to initialize the module in utilities.
14396 Updated all callers.
14397 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14398 initialize the module in utilities. Updated all callers.
14399
14400 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14401
14402 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14403 escape sequence and a literal ^L to clear the screen.
14404
14405 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14406 when returning from Open Firmware.
14407
14408 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14409
14410 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14411 (grub_ofconsole_height): Likewise.
14412 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14413 manually insert a '\n'.
14414 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14415 `grub_ofconsole_height'. Return early if these are already set.
14416
14417 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14418
14419 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14420 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14421 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14422 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14423 and `normal/script.c'.
14424 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14425 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14426 (test_mod_SOURCES): New variable.
14427 (test_mod_CFLAGS): Likewise.
14428 (test_mod_LDFLAGS): Likewise.
14429 (pkgdata_MODULES): Add `test.mod'.
14430 (grub_script.tab.c): New rule.
14431 (grub_script.tab.h): Likewise.
14432
14433 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14434
14435 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14436 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14437 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14438 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14439 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14440 (test_mod_SOURCES): New variable.
14441 (test_mod_CFLAGS): Likewise.
14442 (pkgdata_MODULES): Add `test.mod'.
14443 (grub_script.tab.c): New rule.
14444 (grub_script.tab.h): Likewise.
14445
14446 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14447
14448 Add initial scripting support.
14449
14450 * commands/test.c: New file.
14451 * include/grub/script.h: Likewise.
14452 * normal/execute.c: Likewise.
14453 * normal/function.c: Likewise.
14454 * normal/lexer.c: Likewise.
14455 * normal/parser.y: Likewise.
14456 * normal/script.c: Likewise.
14457
14458 * configure.ac: Add `AC_PROG_YACC' test.
14459
14460 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14461 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14462 `normal/function.c' and `normal/script.c'.
14463 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14464 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14465 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14466 variables.
14467 (pkgdata_MODULES): Add `test.mod'.
14468 (grub_script.tab.c): New rule.
14469 (grub_script.tab.h): Likewise.
14470
14471 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14472
14473 * include/grub/normal.h (grub_test_init): New prototype.
14474 (grub_test_fini): Likewise.
14475
14476 * normal/command.c: Include <grub/script.h>.
14477 (grub_command_execute): Rewritten.
14478
14479 * util/grub-emu.c (main): Call `grub_test_init' and
14480 `grub_test_fini'.
14481
14482 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14483
14484 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14485 to 0.
14486 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14487 there are no pending characters.
14488
14489 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14490
14491 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14492 `grub_strndup' to drop device arguments. Replace unnecessary
14493 `grub_strndup' with `grub_strdup'.
14494
14495 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14496
14497 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14498 `debug' environment variable has been set.
14499
14500 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14501
14502 * Makefile.in (install-local): Use $(DATA).
14503 (uninstall): Likewise.
14504 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14505 (sbin_UTILITIES): ... to here.
14506 (sbin_SCRIPTS): New variable.
14507 (grub_install_SOURCES): New variable.
14508 * util/powerpc/ieee1275/grub-install.in: New file.
14509 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14510 variable.
14511 (add_segments): Call `grub_util_get_path'.
14512
14513 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14514
14515 From Timothy Baldwin:
14516 * commands/ls.c (grub_ls_list_files): Close FILE with
14517 grub_file_close.
14518 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14519
14520 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14521
14522 * include/grub/parser.h: New file.
14523
14524 * kern/parser.c: Likewise.
14525
14526 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14527 (grub_setup_SOURCES): Likewise.
14528 (grub_probefs_SOURCES): Likewise.
14529 (grub_emu_SOURCES): Likewise.
14530 (kernel_img_HEADERS): Add `parser.h'.
14531
14532 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14533 (grub_emu_SOURCES): Add `kern/parser.c'.
14534 (grubof_SOURCES): Likewise.
14535
14536 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14537 (grubof_SOURCES): Add `kern/parser.c'.
14538
14539 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14540
14541 * kern/misc.c (grub_split_cmdline): Removed function.
14542
14543 * kern/rescue.c: Include <grub/parser.h>.
14544 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14545 of `grub_split_cmdline'.
14546
14547 * normal/command.c: Include <grub/parser.h>.
14548 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14549 of `grub_split_cmdline'.
14550
14551 * normal/completion.c: Include <grub/parser.h>.
14552 (cmdline_state): New variable.
14553 (iterate_dir): End the filename with a quote depending on the
14554 command line state.
14555 (get_state): new function.
14556 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14557 split the arguments and determine the current argument. When the
14558 argument string is not quoted, escape all spaces.
14559
14560 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14561
14562 * normal/sparc64/setjmp.S: New file.
14563
14564 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14565
14566 * include/grub/sparc64/libgcc.h: New file.
14567 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14568 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14569 normal/sparc64/setjmp.c.
14570
14571 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14572
14573 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14574 * kern/sparc64/cache.S: New file.
14575 * kern/sparc64/cache.c: Removed.
14576 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14577 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14578 -mtune=ultrasparc.
14579 (COMMON_LDFLAGS): Add -melf64_sparc.
14580 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14581 (grubof_SOURCES): Use cache.S instead of cache.c.
14582 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14583 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14584 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14585 commented though.
14586 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14587 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14588 (linux_mod_CFLAGS): Commented out.
14589 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14590 out because module isn't built.
14591 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14592 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14593 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14594 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14595 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14596 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14597 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14598 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14599 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14600 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14601 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14602 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14603 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14604 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14605
14606 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14607
14608 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14609 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14610 longer, because HFS should not be used on PC.
14611
14612 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14613
14614 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14615 consistently within the loop.
14616
14617 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14618
14619 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14620 directory can not be read.
14621
14622 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14623
14624 * configure.ac (AC_INIT): Increase the version number to 1.91.
14625
14626 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14627 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14628 term/i386/pc/serial.c.
14629
14630 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14631
14632 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14633 file size must be permitted.
14634
14635 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14636 between %ah and %al.
14637
14638 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14639
14640 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14641 grub_uint64_t.
14642 Call the hook with a NUL-terminated filename.
14643 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14644 grub_cpu_to_be32.
14645
14646 * kern/term.c (cursor_state): New variable.
14647 (grub_term_set_current): Reset the cursor state on a new
14648 terminal.
14649 (grub_setcursor): Rewritten to use CURSOR_STATE.
14650 (grub_getcursor): New function.
14651
14652 * include/grub/term.h (grub_getcursor): New prototype.
14653
14654 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14655 integers on ARM. Reported by Timothy Baldwin
14656 <T.E.Baldwin99@members.leeds.ac.uk>.
14657
14658 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14659
14660 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14661 allocated.
14662 (grub_sfs_dir): Likewise.
14663
14664 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14665
14666 Add support for the SFS filesystem.
14667
14668 * fs/sfs.c: New file.
14669
14670 * DISTLIST: Added `fs/sfs.c'.
14671
14672 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14673 (grub_probefs_SOURCES): Likewise.
14674 (grub_emu_SOURCES): Likewise.
14675 (pkgdata_MODULES): Add `sfs.mod'.
14676 (sfs_mod_SOURCES): New variable.
14677 (sfs_mod_CFLAGS): Likewise.
14678 (sfs_mod_LDFLAGS): Likewise.
14679
14680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14681 (pkgdata_MODULES): Add `sfs.mod'.
14682 (sfs_mod_SOURCES): New variable.
14683 (sfs_mod_CFLAGS): Likewise.
14684
14685 * util/grub-emu.c (main): Call `grub_sfs_init' and
14686 `grub_sfs_fini'.
14687
14688 * include/grub/fs.h (grub_sfs_init): New prototype.
14689 (grub_sfs_fini): Likewise.
14690
14691 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14692
14693 Add support for the AFFS filesystem.
14694
14695 * fs/affs.c: New file.
14696
14697 * DISTLIST: Added `fs/affs.c'.
14698
14699 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14700 (grub_probefs_SOURCES): Likewise.
14701 (grub_emu_SOURCES): Likewise.
14702 (pkgdata_MODULES): Add `affs.mod'.
14703 (affs_mod_SOURCES): New variable.
14704 (affs_mod_CFLAGS): Likewise.
14705 (affs_mod_LDFLAGS): Likewise.
14706
14707 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14708 (pkgdata_MODULES): Add `affs.mod'.
14709 (affs_mod_SOURCES): New variable.
14710 (affs_mod_CFLAGS): Likewise.
14711
14712 * util/grub-emu.c (main): Call `grub_affs_init' and
14713 `grub_affs_fini'.
14714
14715 * include/grub/fs.h (grub_affs_init): New prototype.
14716 (grub_affs_fini): Likewise.
14717
14718 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14719
14720 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14721
14722 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14723
14724 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14725 `-m32' to CFLAGS.
14726
14727 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14728 linking.
14729
14730 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14731 (COMMON_LDFLAGS): New variable.
14732 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14733 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14734 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14735 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14736 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14737 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14738 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14739 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14740 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14741 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14742 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14743 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14744 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14745 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14746 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14747 variables.
14748 (normal_mod_ASFLAGS): Add `-m32'.
14749
14750 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14751 (grub_host_size_t, grub_host_ssize_t): New types.
14752 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14753 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14754 `GRUB_HOST_SIZEOF_VOID_P'.
14755
14756 * include/grub/kernel.h (struct grub_module_header): Type of
14757 member offset changed to `grub_host_off_t'. Type of member size
14758 changed to `grub_host_size_t'.
14759 (struct grub_module_info): Type of member offset changed to
14760 `grub_host_off_t'. Type of member size changed to
14761 `grub_host_size_t'.
14762
14763 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14764
14765 Make GRUB's kernel compliant to Multiboot Specification.
14766
14767 * kern/i386/pc/startup.S (multiboot_header): New label.
14768 (multiboot_entry): Likewise.
14769 (multiboot_trampoline): Likewise.
14770
14771 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14772 Increased to 0x4A0.
14773
14774 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14775 put parentheses after a question mark.
14776 [!GRUB_UTIL] (my_mod): New variable.
14777
14778 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14779
14780 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14781
14782 Adds support for the XFS filesystem. Btrees are not supported
14783 yet.
14784
14785 * fs/xfs.c: New file.
14786
14787 * DISTLIST: Added `fs/xfs.c'.
14788
14789 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14790 (grub_probefs_SOURCES): Likewise.
14791 (grub_emu_SOURCES): Likewise.
14792 (pkgdata_MODULES): Add `xfs.mod'.
14793 (xfs_mod_SOURCES): New variable.
14794 (xfs_mod_CFLAGS): Likewise.
14795
14796 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14797 (pkgdata_MODULES): Add `xfs.mod'.
14798 (xfs_mod_SOURCES): New variable.
14799 (xfs_mod_CFLAGS): Likewise.
14800
14801 * util/grub-emu.c (main): Call `grub_xfs_init' and
14802 `grub_xfs_fini'.
14803
14804 * include/grub/fs.h (grub_xfs_init): New prototype.
14805 (grub_xfs_fini): Likewise.
14806
14807
14808 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14809
14810 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14811 color modes, allow greater than 16 colors to be configured as
14812 a default palette.
14813
14814 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14815
14816 * normal/completion.c (complete_arguments): Add the qualifier
14817 const into OPTIONS.
14818
14819 From Omniflux <omniflux+lists@omniflux.com>:
14820 * include/grub/terminfo.h: New file.
14821 * include/grub/tparm.h: Likewise.
14822 * include/grub/i386/pc/serial.h: Likewise.
14823 * term/terminfo.c: Likewise.
14824 * term/tparm.c: Likewise.
14825 * term/i386/pc/serial.c: Likewise.
14826 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14827 serial.mod.
14828 (terminfo_mod_SOURCES): New variable.
14829 (terminfo_mod_CFLAGS): Likewise.
14830 (serial_mod_SOURCES): Likewise.
14831 (serial_mod_CFLAGS): Likewise.
14832
14833 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14834
14835 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14836 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14837 and kern/powerpc/ieee1275/cmain.c, respectively.
14838
14839 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14840 * kern/powerpc/ieee1275/crt0.S: ... here.
14841
14842 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14843 * kern/powerpc/ieee1275/cmain.c: ... here.
14844
14845 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14846 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14847 instead of boot/powerpc/ieee1275/crt0.S and
14848 boot/powerpc/ieee1275/cmain.c, respectively.
14849
14850 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14851 sectors. It was not used anyway.
14852
14853 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14854
14855 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14856 `unused parameter' warning.
14857
14858 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14859
14860 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14861 function.
14862 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14863 getcharwidth.
14864
14865 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14866
14867 * include/grub/normal.h (enum grub_completion_type): Added
14868 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14869
14870 * normal/cmdline.c (print_completion): Handle
14871 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14872 * normal/menu_entry.c (store_completion): Likewise.
14873
14874 * normal/completion.c (complete_arguments): New function.
14875 (grub_normal_do_completion): Call `complete_arguments' when the
14876 current words start with a dash.
14877
14878 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14879
14880 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14881 `gzio.mod' instead of `io.mod').
14882
14883 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14884
14885 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14886 (DISTDIRS): Added io and video.
14887 Rewrite the search routine to make an output consistently.
14888
14889 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14890 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14891 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14892 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14893 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14894 util/powerpc/ieee1275/misc.c.
14895
14896 * include/grub/gzio.h: New file.
14897 * io/gzio.c: Likewise.
14898
14899 * kern/file.c (grub_file_close): Call grub_device_close only if
14900 FILE->DEVICE is not NULL.
14901
14902 * include/grub/mm.h [!NULL] (NULL): New macro.
14903
14904 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14905
14906 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14907 (pkgdata_MODULES): Added gzio.mod.
14908 (gzio_mod_SOURCES): New variable.
14909 (gzio_mod_CFLAGS): Likewise.
14910
14911 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14912 (pkgdata_MODULES): Added gzio.mod.
14913 (gzio_mod_SOURCES): New variable.
14914 (gzio_mod_CFLAGS): Likewise.
14915
14916 * commands/cat.c: Include grub/gzio.h.
14917 (grub_cmd_cat): Use grub_gzfile_open instead of
14918 grub_file_open.
14919
14920 * commands/cmp.c: Include grub/gzio.h.
14921 (grub_cmd_cmp): Use grub_gzfile_open instead of
14922 grub_file_open.
14923
14924 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14925 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14926 grub_file_open.
14927 (grub_rescue_cmd_module): Likewise.
14928
14929 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14930
14931 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14932 kern/sparc64/ieee1275/init.c because it contains _start.
14933 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14934
14935 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14936
14937 * configure.ac: Add support for sparc64 host with ieee1275
14938 firmware.
14939 * configure: Generated from configure.ac.
14940 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14941 instead of int.
14942 (grub_ofdisk_read): Likewise.
14943 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14944 pointers as (void *) to remove a warning.
14945 (grub_ofdisk_close): Likewise.
14946 (grub_ofdisk_read): Likewise.
14947 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14948 returns, so make it return void to remove a warning.
14949 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14950 Corresponding prototype change.
14951 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14952 values, and cast the pointers as (void *) to remove a warning.
14953 (grub_mm_dump): Likewise.
14954 * conf/sparc64-ieee1275.mk: New file.
14955 * conf/sparc64-ieee1275.rmk: Likewise.
14956 * include/grub/sparc64/setjmp.h: Likewise.
14957 * include/grub/sparc64/types.h: Likewise.
14958 * include/grub/sparc64/ieee1275/console.h: Likewise.
14959 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14960 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14961 * include/grub/sparc64/ieee1275/time.h: Likewise.
14962 * kern/sparc64/cache.c: Likewise.
14963 * kern/sparc64/dl.c: Likewise.
14964 * kern/sparc64/ieee1275/init.c: Likewise.
14965 * kern/sparc64/ieee1275/openfw.c: Likewise.
14966
14967 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14968
14969 * util/console.c (grub_ncurses_putchar): If C is greater than
14970 0x7f, set C to a question mark.
14971 (grub_ncurses_getcharwidth): New function.
14972 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14973 getcharwidth.
14974
14975 * normal/menu.c (print_entry): Made aware of Unicode. First,
14976 convert TITLE to UCS-4, and predict the cursor position by
14977 grub_getcharwidth.
14978
14979 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14980 const to SRC.
14981 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14982
14983 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14984
14985 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14986 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14987 grub_strcat.
14988
14989 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14990 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14991 grub_strcpy and grub_strlen. Take it into account that a space
14992 character is inserted as a delimiter.
14993
14994 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14995
14996 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14997 invalid magic in the error.
14998
14999 * commands/search.c: New file.
15000
15001 * util/grub-emu.c (main): Call grub_search_init and
15002 grub_search_fini.
15003
15004 * kern/rescue.c (grub_rescue_print_disks): Removed.
15005 (grub_rescue_print_devices): New function.
15006 (grub_rescue_cmd_ls): Use grub_device_iterate with
15007 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15008 grub_rescue_print_disks.
15009
15010 * kern/partition.c (grub_partition_iterate): Return the result of
15011 PARTMAP->ITERATE instead of GRUB_ERRNO.
15012
15013 * kern/device.c: Include grub/partition.h.
15014 (grub_device_iterate): New function.
15015
15016 * include/grub/partition.h (grub_partition_iterate): Return int
15017 instead of grub_err_t.
15018
15019 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15020 prototype.
15021 [GRUB_UTIL] (grub_search_fini): Likewise.
15022
15023 * include/grub/device.h (grub_device_iterate): New prototype.
15024
15025 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15026 commands/search.c.
15027 (pkgdata_MODULES): Added search.mod.
15028 (search_mod_SOURCES): New variable.
15029 (search_mod_CFLAGS): Likewise.
15030
15031 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15032 (pkgdata_MODULES): Added search.mod.
15033 (search_mod_SOURCES): New variable.
15034 (search_mod_CFLAGS): Likewise.
15035
15036 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15037 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15038 All callers changed.
15039
15040 * DISTLIST: Added commands/search.c.
15041
15042 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15043
15044 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15045 conversion.
15046 (grub_getcharwidth): New function.
15047
15048 * kern/misc.c (grub_utf8_to_ucs4): New function.
15049
15050 * include/grub/term.h (struct grub_term): Added a new member
15051 "getcharwidth".
15052 (grub_getcharwidth): New prototype.
15053
15054 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15055
15056 * term/i386/pc/console.c (map_char): New function. Segregated from
15057 grub_console_putchar.
15058 (grub_console_putchar): Use map_char.
15059 (grub_console_getcharwidth): New function.
15060 (grub_console_term): Specified grub_console_getcharwidth as
15061 getcharwidth.
15062
15063 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15064 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15065
15066 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15067 GRUB_ERRNO.
15068 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15069 on grub_strtoul completely.
15070 (write_char): Declare local variables in the beginning of the
15071 function.
15072 (grub_vesafb_getcharwidth): New function.
15073 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15074 getcharwidth.
15075
15076 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15077
15078 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15079 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15080 commands/i386/pc/vbetest.c.
15081
15082 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15083 call grub_vbe_get_controller_info again, because the returned
15084 information is volatile.
15085 (grub_vbe_set_video_mode): Mostly rewritten.
15086 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15087 grub_vbe_status_t correctly.
15088 (grub_vbe_get_video_mode_info): Likewise.
15089 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15090 several if statements.
15091
15092 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15093 * commands/i386/pc/vbeinfo.c: ... this.
15094
15095 * commands/i386/pc/vbe_test.c: Renamed to ...
15096 * commands/i386/pc/vbetest.c: ... this.
15097
15098 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15099 ...
15100 (grub_cmd_vbeinfo): ... this. Save video modes before
15101 iterating. Skip a video mode, if it is not available, not enough
15102 information is given or it is monochrome. Show the memory
15103 model. Leave the interpretation of MODEVAR to grub_strtoul
15104 completely.
15105 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15106 (GRUB_MOD_FINI): Likewise.
15107
15108 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15109 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15110 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15111 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15112 grub_strtoul completely.
15113 (real2pm): Removed.
15114 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15115 (GRUB_MOD_FINI): Likewise.
15116
15117 * normal/misc.c: Include grub/mm.h.
15118
15119 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15120 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15121 (vbe_list_modes_mod_SOURCES): Removed.
15122 (vbe_list_modes_mod_CFLAGS): Likewise.
15123 (vbe_test_mod_SOURCES): Likewise.
15124 (vbe_test_mod_CFLAGS): Likewise.
15125 (vbeinfo_mod_SOURCES): New variable.
15126 (vbeinfo_mod_CFLAGS): Likewise.
15127 (vbetest_mod_SOURCES): Likewise.
15128 (vbetest_mod_CFLAGS): Likewise.
15129
15130 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15131
15132 * normal/misc.c: New file.
15133
15134 * DISTLIST: Added normal/misc.c.
15135
15136 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15137 DISK to HOOK. Call HOOK with DISK.
15138 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15139 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15140 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15141
15142 * normal/menu_entry.c (struct screen): Added a new member
15143 "completion_shown".
15144 (completion_buffer): New global variable.
15145 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15146 (store_completion): New function.
15147 (complete): Likewise.
15148 (clear_completions): Likewise.
15149 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15150 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15151 a tab, call complete.
15152
15153 * normal/completion.c (disk_dev): Removed.
15154 (print_simple_completion): Likewise.
15155 (print_partition_completion): Likewise.
15156 (print_func): New global variable.
15157 (add_completion): Do not take the arguments WHAT or PRINT any
15158 longer. Added a new argument TYPE. Instead of printing directly,
15159 call PRINT_FUNC if not NULL.
15160 All callers changed.
15161 (complete_device): Use a local variable DEV instead of
15162 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15163 (grub_normal_do_completion): Take a new argument HOOK. Do not
15164 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15165 empty string, return NULL instead.
15166 All callers changed.
15167
15168 * normal/cmdline.c (print_completion): New function.
15169
15170 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15171 to HOOK.
15172 All callers changed.
15173
15174 * kern/disk.c (grub_print_partinfo): Removed.
15175
15176 * include/grub/partition.h (struct grub_partition_map): Add a new
15177 argument DISK into HOOK of ITERATE.
15178 (grub_partition_iterate): Add a new argument DISK to HOOK.
15179
15180 * include/grub/normal.h (enum grub_completion_type): New enum.
15181 (grub_completion_type_t): New type.
15182 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15183 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15184 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15185 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15186 (grub_normal_do_completion): Added a new argument HOOK.
15187 (grub_normal_print_device_info): New prototype.
15188
15189 * include/grub/disk.h (grub_print_partinfo): Removed.
15190
15191 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15192 (normal_mod_SOURCES): Likewise.
15193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15194 (normal_mod_SOURCES): Likewise.
15195
15196 * commands/ls.c (grub_ls_list_disks): Use
15197 grub_normal_print_device_info instead of grub_print_partinfo. Free
15198 PNAME.
15199 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15200 duplicating the code.
15201
15202 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15203
15204 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15205 follow GCS more precisely.
15206 * commands/i386/pc/vbe_test.c: Likewise.
15207 * include/grub/i386/pc/vbe.h: Likewise.
15208 * term/i386/pc/vesafb.c: Likewise.
15209 * video/i386/pc/vbe.c: Likewise.
15210
15211 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15212
15213 * DISTLIST: Added term/i386/pc/vesafb.c
15214 DISTLIST: Added video/i386/pc/vbe.c
15215 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15216 DISTLIST: Added commands/i386/pc/vbe_test.c.
15217 * commands/i386/pc/vbe_list_modes.c: New file.
15218 * commands/i386/pc/vbe_test.c: Likewise.
15219 * term/i386/pc/vesafb.c: Likewise.
15220 * video/i386/pc/vbe.c: Likewise.
15221 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15222 (grub_vbe_probe) Added prototype.
15223 (grub_vbe_set_video_mode) Likewise.
15224 (grub_vbe_get_video_mode) Likewise.
15225 (grub_vbe_get_video_mode_info) Likewise.
15226 (grub_vbe_set_pixel_rgb) Likewise.
15227 (grub_vbe_set_pixel_index) Likewise.
15228 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15229 (pkgdata_MODULES): Added vesafb.mod.
15230 (pkgdata_MODULES): Added vbe_list_modes.mod.
15231 (pkgdata_MODULES): Added vbe_test.mod.
15232 (vbe_mod_SOURCES): Added.
15233 (vbe_mod_CFLAGS): Likewise.
15234 (vesafb_mod_SOURCES): Likewise.
15235 (vesafb_mod_CFLAGS): Likewise.
15236 (vbe_list_modes_mod_SOURCES): Likewise.
15237 (vbe_list_modes_mod_CFLAGS): Likewise.
15238 (vbe_test_mod_SOURCES): Likewise.
15239 (vbe_test_mod_CFLAGS): Likewise.
15240
15241 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15242
15243 * normal/command.c (grub_command_execute): If INTERACTIVE is
15244 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15245 CMDLINE. Disable the pager if INTERACTIVE is true.
15246 All callers are changed.
15247
15248 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15249 before reading a config file.
15250 * normal/main.c (read_config_file): Even if a command is not
15251 found, register it if it is within an entry.
15252
15253 * util/grub-emu.c: Include sys/types.h and unistd.h.
15254 (options): Added --hold.
15255 (struct arguments): Added a new member "hold".
15256 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15257 missing.
15258 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15259 cleared by a debugger, if it is not zero.
15260
15261 * include/grub/normal.h (grub_command_execute): Add an argument
15262 INTERACTIVE.
15263
15264 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15265
15266 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15267
15268 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15269
15270 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15271 program with another one, because the old one didn't detect a bug
15272 in gcc-3.4. Always use regparm 2, because the new test is still
15273 not enough for gcc-4.0. Someone must investigate a simple test
15274 case which detects a bug in gcc-4.0.
15275
15276 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15277
15278 * DISTLIST: Added normal/completion.c.
15279
15280 * normal/completion.c: New file.
15281
15282 * term/i386/pc/console.c (grub_console_getwh): New function.
15283 (grub_console_term): Assign grub_console_getwh to getwh.
15284
15285 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15286 function is defined in normal/completion.c as
15287 grub_normal_do_completion.
15288 (grub_cmdline_get): Use grub_normal_do_completion instead of
15289 grub_tab_complete.
15290
15291 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15292 returns non-zero, otherwise return 0.
15293 (grub_partition_iterate): First, probe the partition map. Then,
15294 call ITERATE only for this partition map.
15295
15296 * kern/misc.c (grub_strncmp): Rewritten.
15297
15298 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15299 returns non-zero. Otherwise return 0.
15300
15301 * include/grub/partition.h (grub_partition_map_iterate): Return
15302 int instead of void.
15303
15304 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15305
15306 * include/grub/misc.h (grub_strncmp): Change the type of N to
15307 grub_size_t.
15308
15309 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15310 of void.
15311
15312 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15313 unsigned explicitly before comparing it with I.
15314
15315 * kern/main.c (grub_env_write_root): Add the attribute unused into
15316 VAR.
15317
15318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15319 normal/completion.c.
15320 (normal_mod_SOURCES): Likewise.
15321 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15322 (normal_mod_SOURCES): Likewise.
15323
15324 * normal/command.c (grub_iterate_commands): If ITERATE returns
15325 non-zero, return one immediately.
15326
15327 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15328
15329 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15330 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15331 descriptions.
15332 (grub_vbe_get_controller_info): New function.
15333 (grub_vbe_get_mode_info): Likewise.
15334 (grub_vbe_set_mode): Likewise.
15335 (grub_vbe_get_mode): Likewise.
15336 (grub_vbe_set_memory_window): Likewise.
15337 (grub_vbe_get_memory_window): Likewise.
15338 (grub_vbe_set_scanline_length): Likewise.
15339 (grub_vbe_get_scanline_length): Likewise.
15340 (grub_vbe_set_display_start): Likewise.
15341 (grub_vbe_get_display_start): Likewise.
15342 (grub_vbe_set_palette_data): Likewise.
15343 * include/grub/i386/pc/vbe.h: New file.
15344
15345 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15346
15347 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15348 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15349 * DISTLIST: Likewise.
15350 * kern/ieee1275/of.c: Moved to ...
15351 * kern/ieee1275/ieee1275.c: ... here.
15352
15353 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15354
15355 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15356 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15357 Pass 0 as `end' parameter to grub_strtoul().
15358
15359 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15360
15361 * include/grub/powerpc/ieee1275/console.h: Do not include
15362 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15363 ifdef.
15364 (grub_console_cur_color): Remove i386-specific prototype.
15365 (grub_console_real_putchar): Likewise.
15366 (grub_console_checkkey): Likewise.
15367 (grub_console_getkey): Likewise.
15368 (grub_console_getxy): Likewise.
15369 (grub_console_gotoxy): Likewise.
15370 (grub_console_cls): Likewise.
15371 (grub_console_setcursor): Likewise.
15372 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15373 Include <grub/machine/console.h>.
15374 * term/ieee1275/ofconsole.c: Likewise.
15375
15376 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15377
15378 * Makefile.in (LIBLZO): New variable.
15379
15380 * configure.ac: Check for LZO version 2.
15381
15382 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15383 lzo/lzo1x.h instead of lzo1x.h.
15384
15385 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15386 of -llzo.
15387
15388 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15389 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15390
15391 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15392 copying the data from PARTITION to P.
15393
15394 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15395
15396 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15397 negative, unload the module.
15398
15399 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15400 map is "pc_partition_map" but not "pc".
15401 (usage): Fix the description. The options are --boot-image and
15402 --core-image but not --boot-file or --core-file.
15403 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15404 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15405 DEFAULT_DIRECTORY.
15406
15407 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15408 --core-file. Specify INSTALL_DEVICE as an argument.
15409
15410 * util/console.c: Include config.h.
15411 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15412 [HAVE_NCURSES_H]: Include ncurses.h.
15413 [HAVE_CURSES_H]: Include curses.h.
15414 [!A_NORMAL] (A_NORMAL): Defined as zero.
15415 [!A_STANDOUT] (A_STANDOUT): Likewise.
15416
15417 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15418 -lncurses.
15419 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15420
15421 * configure.ac: Check for curses libraries and headers.
15422
15423 * Makefile.in (LIBCURSES): New variable.
15424
15425 * genmk.rb (Script::rule): Set the executable bits.
15426
15427 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15428 name of the PC partition map is "pc_partition_map" but not "pc".
15429
15430 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15431
15432 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15433 (modules): Likewise.
15434 (usage): Added descriptions for --modules and --grub-probefs.
15435 Handle --modules and --grub-probefs. Save the arguments in MODULES
15436 and GRUB_PROBEFS, respectively.
15437 Auto-detect a filesystem module against GRUBDIR. If the result is
15438 empty and modules are not specified explicitly, abort the
15439 installation. Add the result to MODULES.
15440
15441 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15442 disk/powerpc/ieee1275/ofdisk.c,
15443 include/grub/powerpc/ieee1275/init.h and
15444 term/powerpc/ieee1275/ofconsole.c.
15445 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15446 term/ieee1275/ofconsole.c.
15447
15448 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15449
15450 * COPYING: Upgraded to the latest version. Only the address of the
15451 FSF office has changed.
15452
15453 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15454
15455 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15456 kern/ieee1275.c with kern/ieee1275/of.c.
15457
15458 * kern/ieee1275.c: Moved to ...
15459 * kern/ieee1275/of.c: ... here.
15460
15461 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15462
15463 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15464 readability.
15465
15466 * config.guess: Updated to the latest version from gnulib.
15467 * config.sub: Likewise.
15468 * install.sh: Likewise.
15469 * mkinstalldirs: Likewise.
15470
15471 * include/grub/console.h: Removed. This file is arch-specific. Do
15472 not put this in include/grub.
15473
15474 * include/grub/i386/pc/console.h: Resurrected.
15475
15476 * util/console.c: Include grub/machine/console.h instead of
15477 grub/console.h.
15478 * util/grub-emu.c: Likewise.
15479
15480 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15481
15482 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15483 hardcoded value.
15484
15485 From Vincent Pelletier <subdino2004@yahoo.fr>
15486 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15487 Redefined to use grub_getwh.
15488 (grub_term): New member named getwh.
15489 (grub_getwh): New prototype.
15490 * kern/term.c (grub_getwh): New function.
15491 * term/i386/pc/console.c (grub_console_getwh): New function.
15492 (grub_console_term): New member `getwh'.
15493 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15494 (grub_vga_term): New member `getwh'.
15495 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15496 grub_ssize_t.
15497 (grub_ofconsole_getw): New function.
15498 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15499 (grub_ofconsole_term): New field named getwh and new initial
15500 value.
15501
15502 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15503
15504 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15505 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15506 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15507 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15508 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15509 of <grub/machine/ieee1275.h>.
15510 * commands/ieee1275/reboot.c: Likewise.
15511 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15512 * kern/ieee1275.c: ... to here. All users updated. Change all
15513 parameter structs to use new type `grub_ieee1275_cell_t'.
15514 * term/powerpc/ieee1275/ofconsole.c: Move ...
15515 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15516 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15517 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15518 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15519 to return int.
15520 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15521 Remove unused prototypes. All users updated.
15522 * include/grub/powerpc/ieee1275/console.h: Removed.
15523 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15524 `grub_ieee1275_cell_t'.
15525 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15526 Cast comparisons with -1 to the correct type.
15527 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15528 type to match `grub_ieee1275_entry_fn'.
15529
15530 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15531
15532 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15533
15534 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15535 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15536 partmap/sun.c.
15537 (grub_probefs_SOURCES): New variable.
15538
15539 * util/i386/pc/grub-probefs.c: New file.
15540
15541 * util/i386/pc/grub-setup.c (main): Call
15542 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15543 grub_hfs_init and grub_jfs_init to initialize the system. Call
15544 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15545 grub_pc_partition_map_fini to finish the system.
15546
15547 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15548
15549 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15550 function.
15551 (grub_multiboot_load_elf32): Likewise.
15552 (grub_multiboot_is_elf64): Likewise.
15553 (grub_multiboot_load_elf64): Likewise.
15554 (grub_multiboot_load_elf): Likewise.
15555 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15556 an ELF32 or ELF64 file.
15557 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15558
15559 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15560 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15561 NULL before calling FS->LABEL.
15562 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15563 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15564 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15565 before calling FS->LABEL.
15566
15567 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15568
15569 * util/i386/pc/grub-install.in (datadir): New variable.
15570 (libdir): Removed.
15571 (pkgdatadir): New variable.
15572 (pkglibdir): Removed.
15573
15574 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15575
15576 * DISTLIST: Added util/i386/pc/grub-install.in.
15577
15578 * util/i386/pc/grub-install.in: New file.
15579
15580 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15581 (grub_install_SOURCES): Likewise.
15582
15583 * genmk.rb: Added support for scripts.
15584 (Script): New class.
15585 (scripts): New variable.
15586
15587 * Makefile.in (install-local): Install sbin_SCRIPTS by
15588 INSTALL_SCRIPT.
15589 (uninstall): Remove sbin_SCRIPTS.
15590
15591 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15592 device, try to get a GRUB device by
15593 grub_util_biosdisk_get_grub_dev.
15594 Free DEST_DEV.
15595
15596 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15597 description for --device-map.
15598
15599 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15600
15601 Change the semantics of variable hooks. They now return strings
15602 instead of error values.
15603
15604 * util/i386/pc/grub-setup.c: Include grub/env.h.
15605 (setup): Use grub_device_set_root instead of grub_env_set.
15606
15607 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15608 grub_env_get instead of grub_device_set_root and
15609 grub_device_get_root, respectively.
15610
15611 * kern/main.c (grub_env_write_root): New function.
15612 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15613 grub_env_set instead of grub_device_set_root.
15614
15615 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15616 many variables.
15617 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15618 rather than calling ENV->WRITE_HOOK afterwards.
15619 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15620 passing a pointer of a pointer.
15621 (grub_register_variable_hook): Change the types of "read_hook" and
15622 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15623 respectively.
15624 Allocate the default empty string on the heap, because this string
15625 may be freed later.
15626
15627 * kern/device.c: Include grub/env.h.
15628 (grub_device_set_root): Removed.
15629 (grub_device_get_root): Likewise.
15630 (grub_device_open): Use grub_env_get instead of
15631 grub_device_get_root.
15632
15633 * include/grub/env.h (grub_env_read_hook_t): New type.
15634 (grub_env_write_hook_t): Likewise.
15635 (grub_env_var): Change the types of "read_hook" and "write_hook"
15636 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15637 (grub_register_variable_hook): Likewise.
15638
15639 * include/grub/device.h (grub_device_set_root): Removed.
15640 (grub_device_set_root): Likewise.
15641
15642 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15643 make sure that DIRNAME terminates with '/', so that
15644 grub_fat_find_dir will fail if PATH is not a directory.
15645
15646 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15647 from DIRNAME.
15648 Use the qualifier auto for print_files and print_files_long.
15649 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15650 as a regular file.
15651 Put a newline only if there is no error.
15652 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15653 used.
15654
15655 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15656
15657 * kern/partition.c (grub_partition_probe): Initialize PART to
15658 NULL. Otherwise, when no partition map is registered, this returns
15659 a garbage.
15660
15661 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15662
15663 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15664 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15665 valid.
15666
15667 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15668
15669 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15670 information on each device, if it does not have partitions. Print
15671 "Device" instead of "Disk", because this function is not specific
15672 to disk devices.
15673
15674 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15675 static to ensure that it is put on the memory rather than a
15676 register.
15677
15678 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15679
15680 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15681 (grub_cat_init): Likewise.
15682 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15683 (options): Likewise.
15684 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15685 (grub_configfile_init): Likewise.
15686 * font/manager.c (GRUB_MOD_INIT): Likewise.
15687 * commands/help.c (GRUB_MOD_INIT): Likewise.
15688 (grub_help_init): Likewise.
15689 * normal/command.c (grub_command_init): Likewise.
15690 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15691 * disk/loopback.c (grub_loop_init): Likewise.
15692 (GRUB_MOD_INIT): Likewise.
15693 * commands/ls.c (grub_ls_init): Likewise.
15694 (GRUB_MOD_INIT): Likewise.
15695 (options): Likewise.
15696 * commands/boot.c (grub_boot_init): Likewise.
15697 (GRUB_MOD_INIT): Likewise.
15698 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15699 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15700 (GRUB_MOD_INIT): Likewise.
15701 * commands/cmp.c (grub_cmp_init): Likewise.
15702 (GRUB_MOD_INIT): Likewise.
15703
15704 * normal/arg.c: Use <> instead of "" to include header files.
15705 (SHORT_ARG_HELP): New macro.
15706 (SHORT_ARG_USAGE): Likewise.
15707 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15708 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15709 descriptions.
15710 (find_short): Check if C is 'h' or 'u' explicitly.
15711 (grub_arg_show_help): Use space characters instead of tabs. Treat
15712 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15713 are shown with --help and --usage only if they are not used for
15714 the command itself.
15715 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15716 'h' and 'u'.
15717
15718 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15719 const into "longarg". Change the type of "shortarg" to int.
15720
15721 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15722
15723 * boot/i386/pc/boot.S (boot_drive_check): New label.
15724
15725 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15726 macro.
15727
15728 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15729 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15730
15731 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15732
15733 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15734 When turning off Gate A20, skip the check and return immediately,
15735 because this is not fatal usually.
15736
15737 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15738
15739 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15740 be 0x7C00 instead of 0x8000.
15741
15742 * boot/i386/pc/pxeboot.S: Rewritten.
15743
15744 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15745 EXT_C.
15746 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15747 result.
15748
15749 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15750
15751 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15752 robustness. This routine now supports a BIOS call and System
15753 Control Port A to modify the gate A20.
15754
15755 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15756 Increased to 0x440.
15757
15758 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15759
15760 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15761 device path and resulting ihandle.
15762 (grub_ofdisk_close): dprintf the ihandle being closed.
15763 (grub_ofdisk_read): dprintf function parameters.
15764 * kern/mm.c (grub_mm_init_region): Likewise.
15765 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15766 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15767 size, and boot arguments.
15768 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15769 before loading into memory.
15770 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15771 before loading into memory.
15772
15773 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15774
15775 * kern/mm.c: Added much documentation.
15776 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15777 8, set to 5 instead of 8.
15778
15779 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15780
15781 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15782
15783 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15784 (grub_mkdevicemap_SOURCES): New variable.
15785
15786 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15787 lib/device.c of GRUB Legacy.
15788
15789 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15790
15791 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15792 instead of PATH is NULL.
15793
15794 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15795
15796 * commands/cmp.c (BUFFER_SIZE): New macro.
15797 (grub_cmd_cmp): Close the right file at the right time. Compare
15798 only data just read. Don't report files of different size as
15799 identical. Dynamically allocate buffers. Move variable
15800 declarations at the beginning of function.
15801
15802 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15803
15804 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15805 reverse.
15806
15807 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15808
15809 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15810 when backspace is pressed at beginning of line.
15811
15812 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15813
15814 * DISTLIST: Added genfslist.sh.
15815
15816 * normal/main.c (fs_module_list): New variable.
15817 (autoload_fs_module): New function.
15818 (read_fs_list): Likewise.
15819 (grub_normal_execute): Call read_fs_list.
15820
15821 * kern/fs.c (grub_fs_autoload_hook): New variable.
15822 (grub_fs_probe): Added support for auto-loading.
15823
15824 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15825 (grub_fs_module_list_t): New type.
15826
15827 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15828 (grub_fs_autoload_hook): New prototype.
15829
15830 * genfslist.sh: New file.
15831
15832 * genmk.rb: Added a rule to generate a filesystem list.
15833
15834 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15835
15836 * configure.ac: Fix the test for cross-compiling.
15837
15838 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15839 define GRUB_UTIL anymore.
15840
15841 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15842 so this function works on other systems than just big endian.
15843 (load_modules): Likewise.
15844 (add_segments): Likewise.
15845
15846 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15847
15848 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15849 contains `l' modifier, get a long from va_arg().
15850
15851 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15852
15853 * kern/mm.c (grub_free): If the next free block which is being
15854 merged is the first free block, set the first block to the block
15855 being freed.
15856 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15857
15858 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15859
15860 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15861 `grub_ieee1275_chosen'.
15862
15863 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15864
15865 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15866 (grub_ieee1275_chosen): New variable.
15867 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15868 `chosen'.
15869 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15870 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15871 Rename first argument to `phandle' for consistency.
15872 (grub_ieee1275_get_property_length): Likewise.
15873 (grub_ieee1275_next_property): Likewise. Change type of first argument
15874 to grub_ieee1275_phandle_t.
15875 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15876 Move export next to declaration.
15877 (grub_ieee1275_chosen): New variable.
15878 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15879 Correct cosmetic typo.
15880 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15881 `grub_ieee1275_chosen'.
15882 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15883 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15884 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15885 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15886 `grub_ieee1275_chosen'.
15887
15888 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15889
15890 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15891 /chosen/bootargs.
15892 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15893 /chosen/bootargs as "variable=value" pairs.
15894
15895 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15896
15897 * include/grub/misc.h (grub_dprintf): New macro.
15898 (grub_real_dprintf): New prototype.
15899 (grub_strword): Likewise.
15900 (grub_iswordseparator): Likewise.
15901 * kern/misc.c (grub_real_dprintf): New function.
15902 (grub_strword): Likewise.
15903 (grub_iswordseparator): Likewise.
15904
15905 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15906
15907 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15908 (roundup): Remove macro.
15909 (grub_ieee1275_flags): Make static.
15910 (grub_ieee1275_realmode): Remove.
15911 (grub_ieee1275_test_flag): New function.
15912 (grub_ieee1275_set_flag): Likewise.
15913 (find_options): Rename to `grub_ieee1275_find_options'; update
15914 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15915 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15916 (cmain): New prototype.
15917 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15918 `grub_ieee1275_flags' directly.
15919 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15920 machine/biosdisk.h.
15921 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15922 Don't include grub/machine/init.h.
15923 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15924 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15925 Remove prototype.
15926 (grub_ieee1275_realmode): Likewise.
15927 (grub_ieee1275_flag): New enum.
15928 (grub_ieee1275_test_flag): New prototype.
15929 (grub_ieee1275_set_flag): New prototype.
15930 * include/grub/powerpc/ieee1275/init.h: Remove file.
15931 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15932 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15933 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15934 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15935 comment.
15936 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15937 `grub_ieee1275_test_flag'.
15938 (grub_ieee1275_encode_devname): Likewise.
15939
15940 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15941
15942 * include/grub/powerpc/ieee1275/ieee1275.h
15943 (grub_ieee1275_encode_devname): New prototype.
15944 (grub_ieee1275_get_filename): Likewise.
15945 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15946 function.
15947 (grub_set_prefix): Likewise.
15948 (grub_machine_init): Call grub_set_prefix.
15949 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15950 (grub_parse_type): New enum.
15951 (grub_ieee1275_get_devargs): New function.
15952 (grub_ieee1275_get_devname): Likewise.
15953 (grub_ieee1275_parse_args): Likewise.
15954 (grub_ieee1275_get_filename): Likewise.
15955 (grub_ieee1275_encode_devname): Likewise.
15956
15957 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15958
15959 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15960 `grub_loader_unset'.
15961
15962 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15963
15964 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15965 instead of grub_ieee1275_interpret.
15966 (grub_halt_init): New function.
15967 (grub_halt_fini): Likewise.
15968 (GRUB_MOD_INIT): Correct message grammar.
15969 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15970 instead of grub_ieee1275_interpret.
15971 (grub_reboot_init): New function.
15972 (grub_reboot_fini): Likewise.
15973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15974 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15975 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15976 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15977 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15978 function.
15979 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15980 Add prototype.
15981 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15982 prototype.
15983 (grub_halt): Likewise.
15984 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15985 (cmain): Remove __attribute__((unused)).
15986 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15987 (grub_heap_len): Likewise.
15988 (grub_machine_fini): New function.
15989 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15990 (grub_halt): Likewise.
15991 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15992 function.
15993 * util/powerpc/ieee1275/misc.c: New file.
15994
15995 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15996
15997 * DISTLIST: New file.
15998 * gendistlist.sh: Likewise.
15999
16000 * Makefile.in (COMMON_DISTFILES): Removed.
16001 (BOOT_DISTFILES): Likewise.
16002 (CONF_DISTFILES): Likewise.
16003 (DISK_DISTFILES): Likewise.
16004 (FS_DISTFILES): Likewise.
16005 (INCLUDE_DISTFILES): Likewise.
16006 (KERN_DISTFILES): Likewise.
16007 (LOADER_DISTFILES): Likewise.
16008 (TERM_DISTFILES): Likewise.
16009 (UTIL_DISTFILES): Likewise.
16010 (DISTFILES): Likewise.
16011 (uninstall): Uninstall files in $(pkgdata_DATA).
16012 (DISTLIST): New target.
16013 (distdir): Use the contents of the file DISTLIST to get a list of
16014 distributed files.
16015
16016 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16017
16018 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16019 descriptor. This is ported from GRUB Legacy.
16020
16021 * gencmdlist.sh: Added an extra semicolon to make it work with
16022 old sed versions. Reported by Robert Bihlmeyer
16023 <robbe@orcus.priv.at>.
16024
16025 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16026
16027 Automatic loading of commands is supported.
16028
16029 * normal/main.c (read_command_list): New function.
16030 (grub_normal_execute): Call read_command_list.
16031
16032 * normal/command.c (grub_register_command): Return zero or CMD.
16033 Allocate CMD->NAME from the heap.
16034 Initialize CMD->MODULE_NAME to zero.
16035 Find the same name as well. If the same command is found and it is
16036 a dummy command, overwrite members. If it is not a dummy command,
16037 return zero.
16038 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16039 (grub_command_find): If a dummy command is found, load a module
16040 and retry to find a command only once.
16041
16042 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16043 make sure that each command is loaded.
16044
16045 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16046 macro.
16047 (struct grub_command): Remove const from the member `name'.
16048 Add a new member `module_name'.
16049 (grub_register_command): Return grub_command_t.
16050
16051 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16052 sure that each command is loaded.
16053
16054 * genmk.rb (PModule::rule): Specify a module name without the
16055 suffix ".mod" to gencmdlist.sh.
16056
16057 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16058
16059 * gencmdlist.sh: New file.
16060
16061 * genmk.rb (PModule::rule): Generate a rule for a command list.
16062 Clean command.lst.
16063 Generate command.lst from $(COMMANDFILES).
16064
16065 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16066 (DATA): Added $(pkgdata_DATA).
16067 (install-local): Install files in $(pkgdata_DATA).
16068
16069 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16070
16071 * term/i386/pc/vga.c (debug_command): Removed.
16072 (GRUB_MOD_INIT): Do not register the command "debug".
16073
16074 From Hollis Blanchard:
16075 * commands/configfile.c: New file.
16076 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16077 commands/configfile.c.
16078 (pkgdata_MODULES): Added configfile.mod.
16079 (configfile_mod_SOURCES): New variable.
16080 (configfile_mod_CFLAGS): Likewise.
16081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16082 commands/configfile.c.
16083 (pkgdata_MODULES): Added configfile.mod.
16084 (configfile_mod_SOURCES): New variable.
16085 (configfile_mod_CFLAGS): Likewise.
16086 * util/grub-emu.c (main): Call grub_configfile_init and
16087 grub_configfile_fini.
16088 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16089 prototype.
16090 [GRUB_UTIL] (grub_configfile_fini): Likewise.
16091
16092 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16093
16094 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16095 address.
16096
16097 * commands/help.c (grub_cmd_help): Do not print newlines after
16098 the last command in print_command_help.
16099
16100 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16101
16102 * commands/default.h: New file.
16103 * commands/timeout.h: Likewise.
16104 * normal/context.c: Likewise.
16105
16106 * util/misc.c: Do not include sys/times.h.
16107 Include sys/time.h and grub/machine/time.h.
16108 (grub_get_rtc): Rewritten with gettimeofday.
16109
16110 * util/grub-emu.c (main): Call grub_default_init and
16111 grub_timeout_init before grub_normal_init, and call
16112 grub_timeout_fini and grub_default_fini after grub_main.
16113
16114 * util/console.c (grub_ncurses_checkkey): Return the read
16115 character or -1.
16116
16117 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16118 timeouts.
16119
16120 * normal/main.c (read_config_file): Push MENU. If this fails,
16121 print an error and wait for a user input.
16122 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16123 If a menu is empty or an error occurs, pop MENU.
16124 (grub_normal_execute): Pop and free MENU after grub_menu_run
16125 returns.
16126
16127 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16128
16129 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16130 include time.h.
16131 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16132 without GRUB_UTIL.
16133 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16134 time.h.
16135 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16136 without GRUB_UTIL.
16137
16138 * include/grub/normal.h (struct grub_menu_list): New struct.
16139 (grub_menu_list_t): New type.
16140 (struct grub_context): New struct.
16141 (grub_context_t): New type.
16142 (grub_register_command): Got rid of EXPORT_FUNC.
16143 (grub_unregister_command): Likewise.
16144 (grub_context_get): New prototype.
16145 (grub_context_get_current_menu): Likewise.
16146 (grub_context_push_menu): Likewise.
16147 (grub_context_pop_menu): Likewise.
16148 [GRUB_UTIL] (grub_default_init): Likewise.
16149 [GRUB_UTIL] (grub_default_fini): Likewise.
16150 [GRUB_UTIL] (grub_timeout_init): Likewise.
16151 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16152
16153 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16154 commands/timeout.c and normal/context.c.
16155 (pkgdata_MODULES): Added default.mod and timeout.mod.
16156 (normal_mod_SOURCES): Added normal/context.c.
16157 (default_mod_SOURCES): New variable.
16158 (default_mod_CFLAGS): Likewise.
16159 (timeout_mod_SOURCES): Likewise.
16160 (timeout_mod_CFLAGS): Likewise.
16161 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16162 conf/i386-pc.rmk.
16163 (pkgdata_MODULES): Added default.mod and timeout.mod.
16164 (normal_mod_SOURCES): Added normal/context.c.
16165 (default_mod_SOURCES): New variable.
16166 (default_mod_CFLAGS): Likewise.
16167 (timeout_mod_SOURCES): Likewise.
16168 (timeout_mod_CFLAGS): Likewise.
16169
16170 * Makefile.in (all-local): Added $(MKFILES).
16171
16172 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16173
16174 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16175 (grub_emu_SOURCES): Likewise.
16176 (pkgdata_MODULES): Add `sun.mod'.
16177 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16178 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16179 `partmap/sun.c'.
16180 (pkgdata_MODULES): Add `sun.mod'.
16181 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16182 * include/grub/partition.h (grub_sun_partition_map_init): New
16183 prototype.
16184 (grub_sun_partition_map_fini): Likewise.
16185 * partmap/sun.c: New file.
16186 * util/grub-emu.c (main): Initialize and de-initialize the sun
16187 partitionmap support.
16188
16189 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16190
16191 This implements an Emacs-like menu entry editor.
16192
16193 * normal/menu_entry.c: New file.
16194
16195 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16196 characters to ASCII.
16197 (saved_char): New variable.
16198 (grub_ncurses_checkkey): Rewritten completely.
16199 (grub_ncurses_getkey): Likewise.
16200 (grub_ncurses_init): Call raw instead of cbreak.
16201
16202 * normal/menu.c (print_entry): Do not put a space.
16203 (init_page): Renamed to ...
16204 (grub_menu_init_page): ... this. All callers changed.
16205 (edit_menu_entry): Removed.
16206 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16207
16208 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16209
16210 * kern/misc.c (grub_vprintf): Call grub_refresh.
16211
16212 * normal/menu.c (DISP_LEFT): Renamed to ...
16213 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16214 * normal/menu.c (DISP_UP): Renamed to ...
16215 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16216 * normal/menu.c (DISP_RIGHT): Renamed to ...
16217 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16218 * normal/menu.c (DISP_DOWN): Renamed to ...
16219 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16220 * normal/menu.c (DISP_HLINE): Renamed to ...
16221 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16222 * normal/menu.c (DISP_VLINE): Renamed to ...
16223 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16224 * normal/menu.c (DISP_UL): Renamed to ...
16225 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16226 * normal/menu.c (DISP_UR): Renamed to ...
16227 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16228 * normal/menu.c (DISP_LL): Renamed to ...
16229 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16230 * normal/menu.c (DISP_LR): Renamed to ...
16231 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16232 * normal/menu.c (TERM_WIDTH): Renamed to ...
16233 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16234 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16235 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16236 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16237 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16238 * normal/menu.c (TERM_MARGIN): Renamed to ...
16239 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16240 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16241 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16242 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16243 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16244 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16245 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16246 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16247 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16248 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16249 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16250 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16251 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16252 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16253 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16254 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16255 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16256 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16257 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16258 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16259 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16260 All callers changed.
16261
16262 * include/grub/normal.h: New prototype.
16263
16264 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16265 normal/menu_entry.c.
16266 (normal_mod_SOURCES): Likewise.
16267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16268 (normal_mod_SOURCES): Likewise.
16269
16270 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16271
16272 * include/grub/normal.h (grub_halt_init): New prototype.
16273 (grub_halt_fini): Likewise.
16274 (grub_reboot_init): Likewise.
16275 (grub_reboot_fini): Likewise.
16276
16277 * util/grub-emu.c: Include signal.h.
16278 (main_env): New global variable.
16279 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16280 catch C-c.
16281 (grub_machine_fini): New function.
16282 (main): Call grub_halt_init and grub_reboot_init before
16283 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16284 Call setjmp with MAIN_ENV to go back afterwards.
16285 Call grub_machine_fini right before return.
16286
16287 * include/grub/util/misc.h: Include setjmp.h.
16288 (main_env): New prototype.
16289
16290 * include/grub/kernel.h (grub_machine_fini): New prototype.
16291 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16292 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16293
16294 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16295 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16296 * term/i386/pc/console.c (grub_console_fini): Likewise.
16297
16298 * util/i386/pc/misc.c: New file.
16299
16300 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16301 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16302 commands/i386/pc/reboot.c.
16303
16304 2005-02-14 Guillem Jover <guillem@hadrons.org>
16305
16306 * include/grub/dl.h (grub_dl_check_header): New prototype.
16307 (grub_arch_dl_check_header): Change return type to grub_err_t,
16308 remove size parameter and export function. Update all callers.
16309 * kern/dl.c (grub_dl_check_header): New function.
16310 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16311 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16312 are inside the core.
16313 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16314 independent ELF header checks.
16315 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16316 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16317 `grub_dl_check_header' instead of explicit checks. Check for the
16318 ELF type.
16319 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16320 `grub_dl_check_header' instead of explicit checks. Remove arch
16321 specific ELF header checks.
16322
16323 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16324 argument SIZE.
16325
16326 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16327
16328 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16329 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16330
16331 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16332
16333 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16334 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16335 (part_map_iterate): Clear `grub_errno' and return 0 if
16336 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16337 * partmap/amiga.c (amiga_partition_map_iterate): Return
16338 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16339 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16340
16341 2005-02-01 Guillem Jover <guillem@hadrons.org>
16342
16343 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16344 help info.
16345
16346 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16347
16348 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16349 Removed prototype.
16350 (grub_rescue_cmd_linux): New prototype.
16351 (grub_rescue_cmd_initrd): Likewise.
16352 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16353 `bi_rec'.
16354 (grub_linux_release_mem): Release the memory for the initrd.
16355 (grub_load_linux): Renamed from this...
16356 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16357 Changed `entry' not to be static. Loop over memory regions to
16358 find another one when the default fails.
16359 (grub_rescue_cmd_initrd): New function.
16360 (grub_linux_init): Remove function.
16361 (grub_linux_fini): Likewise.
16362 (GRUB_MOD_INIT): Register `initrd'.
16363 (GRUB_MOD_FINI): Unregister `initrd'.
16364 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16365 Function removed.
16366 (grub_linux_normal_fini): Likewise.
16367 (GRUB_MOD_INIT): Register `initrd'.
16368 (GRUB_MOD_FINI): Unregister `initrd'.
16369
16370 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16371
16372 * commands/help.c: New file.
16373 * normal/arg.c (show_help): Renamed to...
16374 (grub_arg_show_help): ... this.
16375 * commands/i386/pc/halt.c: New file.
16376 * commands/i386/pc/reboot.c: Likewise.
16377 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16378 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16379 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16380 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16381 variables.
16382 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16383 `commands/help.c'.
16384 (pkgdata_MODULES): Add `help.mod'.
16385 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16386 * grub/i386/pc/init.h (grub_reboot): New prototype.
16387 (grub_halt): Likewise.
16388 * include/grub/normal.h (grub_arg_show_help): New prototype.
16389 (grub_help_init): Likewise.
16390 (grub_help_fini): Likewise.
16391 * util/grub-emu.c (main): Initialize and deinitialize the help
16392 command.
16393
16394 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16395
16396 * normal/command.c (grub_command_init): Fixed the description of
16397 the `set' and `unset' commands.
16398
16399 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16400
16401 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16402 function.
16403 * commands/ieee1275/halt.c: New file.
16404 * commands/ieee1275/reboot.c: Likewise.
16405 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16406 `__attribute__ ((unused))'. Some GCS related fixed.
16407 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16408 (grub_suspend_fini): Likewise.
16409 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16410 and `halt.mod'.
16411 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16412 (halt_mod_CFLAGS): New variables.
16413 * include/grub/powerpc/ieee1275/ieee1275.h
16414 (grub_ieee1275_interpret): New prototype.
16415
16416 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16417
16418 * include/grub/misc.h (memmove): New prototype.
16419 (memcpy): Likewise.
16420
16421 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16422
16423 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16424 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16425
16426 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16427
16428 * kern/misc.c (grub_strndup): Function rewritten.
16429
16430 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16431
16432 * normal/menu.c (TERM_WIDTH): Macro redefined.
16433 (TERM_TOP_BORDER_Y): Likewise.
16434 (draw_border): Replaced while-loop by a for-loop. Make the number
16435 of lines consistent with the number of lines displayed in
16436 print_entries. Added a margin below the rectangle.
16437 (print_entry): Make the entry fit in the rectangle.
16438 (print_entries): Display the scroll arrows next to the right
16439 border.
16440
16441 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16442
16443 * fs/minix.c (grub_minix_find_file): Reserve more space for
16444 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16445 `grub_strncpy' to copy `path' into it.
16446
16447 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16448
16449 Add the loopback device, a device via which files can be accessed
16450 as devices.
16451
16452 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16453 (pkgdata_MODULES): Add loopback.mod.
16454 (loopback_mod_SOURCES): New variable.
16455 (loopback_mod_CFLAGS): Likewise.
16456 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16457 `disk/loopback.c'.
16458 (pkgdata_MODULES): Add loopback.mod.
16459 (loopback_mod_SOURCES): New variable.
16460 (loopback_mod_CFLAGS): Likewise.
16461 * disk/loopback.c: new file.
16462 * include/grub/normal.h (grub_loop_init): New prototype.
16463 (grub_loop_fini): New prototype.
16464 * util/grub-emu.c (main): Initialize and de-initialize loopback
16465 support.
16466 * include/grub/disk.h (grub_disk_dev_id): Add
16467 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16468
16469 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16470
16471 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16472 function.
16473 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16474 (suspend_mod_SOURCES): New variable.
16475 (suspend_mod_CFLAGS): Likewise.
16476 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16477 New prototype.
16478 * commands/ieee1275/suspend.c: New file.
16479
16480 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16481
16482 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16483 ((unused))' to `__attribute__ ((used))'.
16484 (GRUB_MOD_FINI): Likewise.
16485 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16486 * genmk.rb (PModule): Assign space to common symbols when linking
16487 modules.
16488
16489 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16490
16491 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16492 `unsigned' arguments to `grub_size_t'.
16493 (grub_malloc): Likewise.
16494 (grub_realloc): Likewise.
16495 (grub_memalign): Likewise.
16496 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16497 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16498 * util/misc.c (grub_malloc): Likewise.
16499 (grub_realloc): Likewise.
16500 * kern/mm.c (get_header_from_pointer): Change the casts to
16501 `unsigned' into a cast to `grub_size_t'.
16502
16503 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16504 point to `currnode' when `currnode' is changed.
16505
16506 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16507 Schottelius <nico-linux@schottelius.org>.
16508
16509 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16510
16511 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16512 (note_path): Remove variable.
16513 (GRUB_IEEE1275_NOTE_NAME): New macro.
16514 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16515 (grub_ieee1275_note_hdr): New structure.
16516 (grub_ieee1275_note_desc): Likewise.
16517 (grub_ieee1275_note): Likewise.
16518 (load_note): Remove `dir' argument. All callers updated. Remove
16519 `note_img' and `path'. Do not load a file from `note_path'.
16520 Initialize a struct grub_ieee1275_note and write that to `out'.
16521 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16522
16523 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16524
16525 * util/misc.c (grub_util_read_image): Revert last change. It
16526 called `grub_util_read_at', which seeks from the beginning of the
16527 file.
16528
16529 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16530
16531 * TODO: Add note about endianness in grub-mkimage.
16532 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16533 section.
16534 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16535 (grub_mkimage_SOURCES): New target.
16536 * include/grub/kernel.h (grub_start_addr): Remove variable.
16537 (grub_end_addr): Likewise.
16538 (grub_total_module_size): Likewise.
16539 (grub_kernel_image_size): Likewise.
16540 (GRUB_MODULE_MAGIC): New constant.
16541 (grub_module_info): New structure.
16542 (grub_arch_modules_addr): New prototype.
16543 (grub_get_end_addr): Remove prototype.
16544 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16545 * include/grub/powerpc/ieee1275/kernel.h: New file.
16546 * include/grub/util/misc.h (grub_util_get_fp_size): New
16547 prototype.
16548 (grub_util_read_at): Likewise.
16549 (grub_util_write_image_at): Likewise.
16550 * kern/main.c (grub_get_end_addr): Remove function.
16551 (grub_load_modules): Call grub_arch_modules_addr instead of using
16552 grub_end_addr. Look for a grub_module_info struct in memory. Use
16553 the grub_module_info fields instead of calling grub_get_end_addr
16554 as loop conditions. Move grub_add_unused_region code here.
16555 (grub_add_unused_region): Remove function.
16556 * kern/i386/pc/init.c: Include grub/cache.h.
16557 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16558 one call to add_mem_region.
16559 (grub_arch_modules_addr): New function.
16560 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16561 (grub_total_module_size): Likewise.
16562 Include grub/machine/kernel.h.
16563 (grub_arch_modules_addr): New function.
16564 * util/grub-emu.c (grub_end_addr): Remove variable.
16565 (grub_total_module_size): Likewise.
16566 (grub_arch_modules_addr): New function.
16567 * util/misc.c: Include unistd.h.
16568 (grub_util_get_fp_size): New function.
16569 (grub_util_read_at): Likewise.
16570 (grub_util_write_image_at): Likewise.
16571 (grub_util_read_image): Call grub_util_read_at.
16572 (grub_util_write_image): Call grub_util_write_image_at.
16573 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16574 additional memory in kernel_img for a struct grub_module_info.
16575 Fill in that grub_module_info.
16576 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16577
16578 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16579
16580 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16581 New function.
16582 * include/grub/powerpc/ieee1275/ieee1275.h
16583 (grub_ieee1275_milliseconds): New prototype.
16584 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16585 Change to 1000.
16586 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16587 grub_ieee1275_milliseconds.
16588
16589 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16590
16591 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16592 variable.
16593 (find_options): New function.
16594 (cmain): Call find_options.
16595 * include/grub/powerpc/ieee1275/ieee1275.h
16596 (grub_ieee1275_realmode): New extern variable.
16597 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16598 grub_map if grub_ieee1275_realmode is false.
16599
16600 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16601
16602 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16603 lines are inserted and make it work like readline. Reported by
16604 Vincent Pelletier <subdino2004@yahoo.fr>.
16605
16606 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16607
16608 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16609
16610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16611 `kern/powerpc/cache.S'.
16612
16613 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16614
16615 * genmk.rb: Handle the `Program' class in the main loop. Written
16616 by Johan Rydberg <jrydberg@gnu.org>.
16617 (Program): New class.
16618 (programs): New variable.
16619 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16620 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16621 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16622 (help_arch): Function removed.
16623 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16624 `powerpc/libgcc.h' and `loader.h'.
16625 (pkgdata_PROGRAMS): New variable.
16626 (sbin_UTILITIES): Variable removed.
16627 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16628 (grubof_SOURCES): Variable re-defined so it only includes the
16629 core functionality.
16630 (grubof_CFLAGS): Remove `-DGRUBOF'.
16631 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16632 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16633 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16634 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16635 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16636 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16637 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16638 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16639 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16640 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16641 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16642 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16643 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16644 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16645 (pc_mod_CFLAGS): New variables.
16646 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16647 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16648 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16649 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16650 Moved from here...
16651 * include/grub/i386/pc/init.h (grub_os_area_addr)
16652 (rub_os_area_size): ... to here.
16653 * include/grub/powerpc/ieee1275/ieee1275.h
16654 (grub_ieee1275_entry_fn): Export symbol.
16655 * include/grub/powerpc/ieee1275/init.h: New file.
16656 * include/grub/powerpc/libgcc.h: Likewise.
16657 * include/grub/cache.h: Likewise.
16658 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16659 <hollis@penguinppc.org>.
16660 * kern/dl.c: Include <grub/cache.h>.
16661 (grub_dl_flush_cache): New function.
16662 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16663 for this module.
16664 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16665 (grub_console_init): Removed prototypes.
16666 (grub_machine_init): Don't initialize the modules anymore.
16667 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16668 static.
16669 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16670 Macro undef removed.
16671 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16672 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16673 relocation `R_PPC_REL32'. Return an error when the relocation is
16674 unknown.
16675 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16676 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16677 * util/misc.c (grub_arch_sync_caches): Likewise.
16678
16679 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16680
16681 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16682 `symlist.c', add `grubof_symlist.c'.
16683 (symlist.c): Variable removed.
16684 (grubof_HEADERS): Variable added.
16685 (grubof_symlist.c): New target.
16686 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16687 `kernel_img_HEADERS'.
16688 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16689 * kern/powerpc/dl.c: New file.
16690 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16691 Function removed.
16692 (grub_arch_dl_relocate_symbols): Likewise.
16693 (grub_register_exported_symbols): Likewise.
16694
16695 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16696
16697 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16698 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16699 to fail instead. Reported by Vincent Pelletier
16700 <subdino2004@yahoo.fr>.
16701
16702 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16703 it is not allocated. Reported by Vincent Pelletier
16704 <subdino2004@yahoo.fr>.
16705
16706 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16707 output so the output looks better.
16708
16709 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16710
16711 Modulize the partition map support and add support for the amiga
16712 partition map.
16713
16714 * commands/ls.c: Include <grub/partition.h> instead of
16715 <grub/machine/partition.h>.
16716 * kern/disk.c: Likewise.
16717 * kern/rescue.c: Likewise.
16718 * loader/i386/pc/chainloader.c: Likewise.
16719 * normal/cmdline.c: Likewise.
16720 * kern/powerpc/ieee1275/init.c: Likewise.
16721 (grub_machine_init): Call `grub_pc_partition_map_init',
16722 `grub_amiga_partition_map_init' and
16723 `grub_apple_partition_map_init'.
16724 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16725 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16726 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16727 `partition.h' and `pc_partition.h'.
16728 (grub_setup_SOURCES): Remove
16729 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16730 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16731 (grub_emu_SOURCES): Likewise.
16732 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16733 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16734 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16736 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16737 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16738 (grubof_SOURCES): Likewise.
16739 * disk/i386/pc/partition.c: File removed.
16740 * disk/powerpc/ieee1275/partition.c: Likewise.
16741 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16742 * include/grub/i386/pc/partition.h: Likewise.
16743 * kern/partition.c: New file.
16744 * partmap/amiga.c: Likewise.
16745 * partmap/apple.c: Likewise.
16746 * partmap/pc.c: Likewise.
16747 * include/grub/partition.h: Likewise..
16748 * include/grub/pc_partition.h: Likewise.
16749 * util/grub-emu.c: Include <grub/partition.h> instead of
16750 <grub/machine/partition.h>.
16751 (main): Call `grub_pc_partition_map_init',
16752 `grub_amiga_partition_map_init' and
16753 `grub_apple_partition_map_init' and deinitialize afterwards.
16754 * util/i386/pc/biosdisk.c: Include `#include
16755 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16756 `<grub/machine/partition.h>'.
16757 * util/i386/pc/grub-setup.c: Likewise.
16758 * util/i386/pc/biosdisk.c: Likewise.
16759 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16760 partition information in case of a PC partition.
16761 * util/i386/pc/grub-setup.c: Include `#include
16762 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16763 `<grub/machine/partition.h>'.
16764 (setup): Only access the PC specific partition information in case
16765 of a PC partition.
16766
16767 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16768
16769 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16770 (grub_longjmp): Likewise.
16771 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16772 20.
16773 * normal/powerpc/setjmp.S: New file.
16774 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16775 `normal/powerpc/setjmp.S'.
16776 (grubof_CFLAGS): Add `-DGRUBOF'.
16777 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16778 [GRUB_UTIL && !GRUBOF].
16779
16780 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16781
16782 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16783 property named `name'. Correctly handle the error returned by
16784 `grub_ieee1275_finddevice' if a device can not be opened.
16785
16786 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16787
16788 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16789 `actual' for negativity.
16790 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16791 kern/fshelp.c.
16792
16793 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16794
16795 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16796 (PAGE_OFFSET): New macro.
16797 (CRTC_ADDR_PORT): Likewise.
16798 (CRTC_DATA_PORT): Likewise.
16799 (START_ADDR_HIGH_REGISTER): Likewise.
16800 (START_ADDR_LOW_REGISTER): Likewise.
16801 (GRAPHICS_ADDR_PORT): Likewise.
16802 (GRAPHICS_DATA_PORT): Likewise.
16803 (READ_MAP_REGISTER): Likewise.
16804 (INPUT_STATUS1_REGISTER): Likewise.
16805 (INPUT_STATUS1_VERTR_BIT): Likewise.
16806 (page): New variable.
16807 (wait_vretrace): New function.
16808 (set_read_map): Likewise.
16809 (set_start_address): Likewise.
16810 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16811 the right page.
16812 (check_vga_mem): Take the page into account.
16813 (write_char): Likewise.
16814 (write_cursor): Likewise.
16815 (scroll_up): Likewise. Copy the page to the page that is not
16816 shown and switch between both pages.
16817 (grub_vga_putchar): Fix off by one error.
16818 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16819 account.
16820
16821 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16822
16823 Add support for iso9660 (including rockridge).
16824
16825 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16826 (iso9660_mod_SOURCES): New variable.
16827 (iso9660_mod_CFLAGS): Likewise.
16828 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16829 * include/grub/fs.h (grub_iso9660_init): New prototype.
16830 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16831 * fs/iso9660.c: New file.
16832
16833 * include/grub/misc.h (grub_strncat): New prototype.
16834 * kern/misc.c (grub_strncat): New function.
16835
16836 * fs/hfs.c (grub_hfs_mount): Translate the error
16837 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16838 * fs/jfs.c (grub_jfs_mount): Likewise.
16839 * fs/ufs.c (grub_ufs_mount): Likewise.
16840
16841 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16842
16843 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16844 which initialized BAT registers.
16845 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16846 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16847 Move from here...
16848 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16849 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16850 ... to here.
16851 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16852 (grub_mapclaim): Likewise.
16853 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16854 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16855 hand.
16856
16857 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16858
16859 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16860 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16861 -ffreestanding and -msoft-float.
16862
16863 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16864
16865 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16866 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16867 set in grub_ieee1275_flags.
16868
16869 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16870
16871 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16872 prototype.
16873 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16874 grub_console_init first.
16875 Change the memory range used for grub_ieee1275_claim and
16876 grub_mm_init_region.
16877 Print an error message if the claim fails.
16878 Include <grub/misc.h>.
16879
16880 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16881
16882 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16883 Call grub_children_iterate for device nodes of type `scsi',
16884 `ide', or `ata'.
16885 (grub_ofdisk_open): Remove manual device alias resolution.
16886 Fix memory leak when device cannot be opened.
16887 * include/grub/powerpc/ieee1275/ieee1275.h
16888 (grub_children_iterate): New prototype.
16889 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16890 New function.
16891 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16892 Return -1 if args.size was -1.
16893
16894 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16895
16896 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16897 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16898 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16899 Open Firmware's memory for it; claim memory from _start to _end.
16900 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16901 (_end): New extern.
16902 (_start): Zero BSS from __bss_start to _end.
16903 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16904 New extern.
16905 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16906
16907 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16908
16909 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16910 -1 if args.base was -1.
16911
16912 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16913
16914 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16915 escape sequence instead of a literal ^L. Also call
16916 grub_ofconsole_gotoxy.
16917
16918 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16919
16920 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16921 void * arguments to grub_addr_t. All callers updated. Also make
16922 the `result' argument optional.
16923 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16924 All callers updated.
16925
16926 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16927
16928 * commands/ls.c (grub_ls_list_files): Use the string following the
16929 initial ')', if present, as the filesystem path.
16930 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16931
16932 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16933
16934 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16935
16936 Make the source code of the menu interface more readable.
16937
16938 * normal/menu.c: Include grub/mm.h.
16939 (TERM_WIDTH): New macro.
16940 (TERM_HEIGHT): Likewise.
16941 (TERM_INFO_HEIGHT): Likewise.
16942 (TERM_MARGIN): Likewise.
16943 (TERM_SCROLL_WIDTH): Likewise.
16944 (TERM_TOP_BORDER_Y): Likewise.
16945 (TERM_LEFT_BORDER_X): Likewise.
16946 (TERM_BORDER_WIDTH): Likewise.
16947 (TERM_MESSAGE_HEIGHT): Likewise.
16948 (TERM_BORDER_HEIGHT): Likewise.
16949 (TERM_NUM_ENTRIES): Likewise.
16950 (TERM_FIRST_ENTRY_Y): Likewise.
16951 (TERM_ENTRY_WIDTH): Likewise.
16952 (TERM_CURSOR_X): Likewise.
16953 (draw_border): Use macros instead of magic numbers.
16954 (print_entry): Likewise.
16955 (print_entries): Likewise.
16956 (run_menu): Likewise. Also, handle the key 'e'.
16957 (run_menu_entry): Ignore empty command lines.
16958 (print_message): Added a new argument EDIT. If EDIT is true,
16959 print a different message.
16960 (init_page): Likewise.
16961 (edit_menu_entry): New function. Not implemented yet.
16962
16963 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16964
16965 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16966 can be loaded from normal mode.
16967
16968 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16969 `multiboot.mod'.
16970 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16971 (multiboot_mod_CFLAGS): New variables.
16972 * loader/i386/pc/linux_normal.c: New file.
16973 * loader/i386/pc/multiboot_normal.c: Likewise.
16974
16975 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16976 attribute `unused'.
16977
16978 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16979 `fdiro' to read the mode information from instead of `diro'.
16980
16981 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16982 looking up a symlink.
16983
16984 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16985 macro.
16986 * normal/command.c (grub_command_execute): Don't parse the
16987 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16988 flags of the command.
16989
16990 * normal/menu.c (grub_menu_run): Fix typo.
16991
16992 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16993
16994 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16995
16996 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16997 `y + 1' instead of `y - 1'.
16998
16999 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17000
17001 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17002
17003 From Hollis Blanchard <hollis@penguinppc.org>:
17004 * kern/misc.c (memmove): New alias for grub_memmove.
17005 (memcmp): New alias for grub_memcmp.
17006 (memset): New alias for grub_memset.
17007 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17008 Change "int handle" to "grub_ieee1275_phandle_t handle".
17009 * include/grub/powerpc/ieee1275/ieee1275.h
17010 (grub_ieee1275_get_property): Likewise.
17011
17012 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17013
17014 Added normal mode command `chainloader' as module chain.mod, which
17015 depends on normal.mod and _chain.mod.
17016
17017 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17018 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17019 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17020 Deleted prototype.
17021 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17022 but arguments parsing moved to ...
17023 (grub_chainloader_cmd): ... here. New function.
17024 * include/grub/i386/pc/chainloader.h: New file.
17025 * loader/i386/pc/chainloader_normal.c: Likewise.
17026
17027 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17028
17029 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17030 (grub_mkimage_LDFLAGS): Likewise.
17031 (grub_emu_SOURCES): Likewise.
17032 (kernel_img_HEADERS): Added fshelp.h.
17033 * fs/ext2.c: Include <grub/fshelp.h>.
17034 (FILETYPE_REG): New macro.
17035 (FILETYPE_INO_REG): Likewise.
17036 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17037 Changed all users.
17038 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17039 all users.
17040 (grub_fshelp_node): New struct.
17041 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17042 to a pointer.
17043 (grub_ext2_get_file_block): Removed function.
17044 (grub_ext2_read_block): New function.
17045 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17046 This function was written.
17047 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17048 (grub_ext2_find_file): Removed function.
17049 (grub_ext2_read_symlink): New function.
17050 (grub_ext2_iterate_dir): Likewise.
17051 (grub_ext2_open): Rewritten.
17052 (grub_ext2_dir): Rewritten.
17053 * include/grub/fshelp.h: New file.
17054 * fs/fshelp.c: Likewise.
17055
17056 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17057
17058 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17059 (print_message): Add a missing newline.
17060 (run_menu): Added timeout support.
17061 (run_menu_entry): New local function.
17062 (grub_menu_run): Added support for booting.
17063
17064 * kern/loader.c (grub_loader_is_loaded): New function.
17065
17066 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17067 (grub_get_rtc): Exported.
17068
17069 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17070 (grub_get_rtc): Exported.
17071
17072 * include/grub/normal.h (struct grub_command_list): Remove
17073 constant from the member `command'.
17074
17075 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17076
17077 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17078
17079 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17080
17081 2004-08-28 Marco Gerards <metgerards@student.han.nl>
17082
17083 Add support for the JFS filesystem.
17084
17085 * fs/jfs.c: New file.
17086 * include/grub/fs.h (grub_jfs_init): New prototype.
17087 (grub_jfs_fini): New prototype.
17088 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17089 (grub_emu_SOURCES): Likewise.
17090 (pkgdata_MODULES): Add jfs.mod.
17091 (jfs_mod_SOURCES): New variable.
17092 (jfs_mod_CFLAGS): Likewise.
17093 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17094 (grubof_SOURCES): Likewise.
17095 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17096
17097 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17098 endian to the host endian.
17099 (grub_fat_utf16_to_utf8): Move function from there...
17100 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
17101 the endianness of the source string anymore.
17102 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17103
17104 2004-08-24 Marco Gerards <metgerards@student.han.nl>
17105
17106 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17107 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17108 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17109 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17110
17111 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17112 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17113 for `node_found' and `it_dir'.
17114 (grub_hfs_dir): Add prototype for `dir_hook'.
17115
17116 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17117 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17118 and `indir32' to silence a gcc warning.
17119
17120 * include/grub/fs.h (grub_hfs_init): New prototype.
17121 (grub_hfs_fini): Likewise.
17122
17123
17124 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17125
17126 Each disk device has its own id now. This is useful to make use
17127 of multiple disk devices.
17128
17129 * include/grub/disk.h (grub_disk_dev_id): New enum.
17130 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17131 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17132
17133 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17134 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17135
17136 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17137 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17138
17139 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17140 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17141
17142 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17143 "id" which is used by the cache manager.
17144
17145 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17146 of just "GRUB".
17147
17148 2004-08-18 Marco Gerards <metgerards@student.han.nl>
17149
17150 * fs/hfs.c: New file.
17151 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17152 (grub_emu_SOURCES): Likewise.
17153 (pkgdata_MODULES): Add hfs.mod.
17154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17155 (grubof_SOURCES): Likewise.
17156 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17157
17158 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17159 * kern/misc.c (grub_strncasecmp): Add function.
17160
17161 2004-08-14 Marco Gerards <metgerards@student.han.nl>
17162
17163 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17164 with parentheses.
17165
17166 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17167 (grub_ext2_dir): In case the directory entry type is unknown, read
17168 it from the inode.
17169
17170 2004-08-02 Peter Bruin <pjbruin@dds.nl>
17171
17172 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17173 grub_load_linux instead of grub_rescue_cmd_linux as second
17174 argument of grub_rescue_register_command.
17175
17176 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17177
17178 2004-07-27 Marco Gerards <metgerards@student.han.nl>
17179
17180 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17181 function.
17182 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17183 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17184 `loader/powerpc/ieee1275/linux.c',
17185 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17186 * include/grub/powerpc/ieee1275/ieee1275.h
17187 (grub_ieee1275_release): New prototype.
17188 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17189 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17190 normal, boot, linux and linux_normal.
17191 * loader/powerpc/ieee1275/linux.c: New file.
17192 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17193
17194 2004-07-12 Marco Gerards <metgerards@student.han.nl>
17195
17196 * normal/arg.c (grub_arg_parse): Correct error handling after
17197 reallocating the argumentlist (check if `argl' is not null instead
17198 of checking if `args' is not null).
17199 * kern/mm.c (grub_realloc): Return the same pointer when using the
17200 same region, instead of returning the header address.
17201
17202 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17203
17204 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17205 one block instead of two when looking for the initial partition.
17206 (grub_partition_probe): Initialize the local variable `p' with 0.
17207 Use base 10 for the grub_strtoul call.
17208 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17209 need for one local variable.
17210 (grub_strtoul): Don't add the new value to `num', instead of that
17211 just assign it.
17212
17213 2004-07-11 Marco Gerards <metgerards@student.han.nl>
17214
17215 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17216 (pxeboot_img_SOURCES): New variable.
17217 (pxeboot_img_ASFLAGS): Likewise.
17218 (pxeboot_img_LDFLAGS): Likewise.
17219 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17220 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17221 <lode_leroy@hotmail.com>.
17222
17223 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17224
17225 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17226 there was no input.
17227
17228 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17229
17230 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17231 the history buffer logic.
17232
17233 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17234
17235 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17236 (FILETYPE_INO_SYMLINK): New macros.
17237 (grub_ext2_find_file): Check if the node is a directory using the
17238 inode stat information instead of using the filetype in the
17239 dirent. Exclude the first character of an absolute symlink.
17240 (grub_ext2_dir): Mask out the filetype part of the mode member of
17241 the inode.
17242
17243 2004-05-24 Marco Gerards <metgerards@student.han.nl>
17244
17245 Add support for UFS version 1 and 2. Add support for the minix
17246 filesystem version 1 and 2, both the variants with 14 and 30 long
17247 filenames.
17248
17249 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17250 fs/minix.c.
17251 (grub_emu_SOURCES): Likewise.
17252 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17253 (ufs_mod_SOURCES): New variable.
17254 (ufs_mod_CFLAGS): Likewise.
17255 (minix_mod_SOURCES): Likewise.
17256 (minix_mod_CFLAGS): Likewise.
17257 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17258 fs/minix.c.
17259 (grubof_SOURCES): Likewise.
17260 * fs/ufs.c: New file.
17261 * fs/minix.c: New file.
17262 * include/grub/fs.h (grub_ufs_init): New prototype.
17263 (grub_ufs_fini): Likewise.
17264 (grub_minix_init): Likewise.
17265 (grub_minix_fini): Likewise.
17266 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17267 minix fs.
17268
17269 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17270
17271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17272 commands/ls.c, commands/terminal.c, commands/boot.c,
17273 commands/cmp.c and commands/cat.c.
17274 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17275
17276 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17277 "env.h"
17278
17279 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17280
17281 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17282 and grub_, respectively. Because the conversion is trivial and
17283 mechanical, I omit the details here. Please refer to the CVS
17284 if you need more information.
17285
17286 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17287
17288 * include/pupa: Renamed to ...
17289 * include/grub: ... this.
17290 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17291 * util/i386/pc/grub-mkimage.c: ... this.
17292 * util/i386/pc/pupa-setup.c: Renamed to ...
17293 * util/i386/pc/grub-setup.c: ... this.
17294 * util/pupa-emu.c: Renamed to ...
17295 * util/grub-emu.c: ... this.
17296
17297 2004-03-29 Marco Gerards <metgerards@student.han.nl>
17298
17299 Add support for the newworld apple macintosh (PPC). This has been
17300 tested on the powerbook 2000 only. It only adds support for
17301 generic ieee1275 functions, console and disk support. This should
17302 be easy to port to other architectures with support for Open
17303 Firmware.
17304
17305 * configure.ac: Accept the powerpc as host_cpu. In the case of
17306 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17307 specific tests are only executed while building for the i386.
17308 Inverse test for crosscompile.
17309 * genmk.rb (Utility): Allow assembler files.
17310 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17311 * conf/powerpc-ieee1275.rmk: New file.
17312 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17313 * disk/powerpc/ieee1275/partition.c: Likewise.
17314 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17315 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17316 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17317 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17318 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17319 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17320 * include/pupa/powerpc/ieee1275/loader.h
17321 * include/pupa/powerpc/setjmp.h: Likewise.
17322 * include/pupa/powerpc/types.h: Likewise.
17323 * kern/powerpc/ieee1275/init.c: Likewise.
17324 * kern/powerpc/ieee1275/openfw.c: Likewise.
17325 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17326
17327 These files were written by Johan Rydberg
17328 (jrydberg@night.trouble.net) and I only modified them slightly.
17329
17330 * boot/powerpc/ieee1275/cmain.c: New file.
17331 * boot/powerpc/ieee1275/crt0.S: Likewise.
17332 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17333 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17334
17335 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17336
17337 * Makefile.in: Update copyright.
17338 * genmodsrc.sh: Likewise.
17339 * gensymlist.sh: Likewise.
17340 * term/i386/pc/vga.c: Indent correctly.
17341
17342 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17343 bugreporting address.
17344 * util/i386/pc/pupa-setup.c (usage): Likewise,
17345 (main): Call pupa_ext2_init and pupa_ext2_fini.
17346
17347 * fs/fat.c (log2): Renamed to ...
17348 (fat_log2): ... this.
17349 All callers changed.
17350 * kern/misc.c (memcpy): Alias to pupa_memmove.
17351 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17352 lvalue cast.
17353 * util/console.c (pupa_ncurses_fini): Return 0.
17354
17355 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17356 Move fail label here.
17357 [__GNU__]: Don't warn when using stat.
17358 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17359 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17360 long int. Use strtol instead of strtoul.
17361
17362 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17363
17364 * commands/boot.c: New file.
17365 * commands/cat.c: Likewise.
17366 * commands/cmp.c: Likewise.
17367 * commands/ls.c: Likewise.
17368 * commands/terminal.c: Likewise.
17369 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17370 (pupa_register_command): Changed interface to match the new
17371 argument parser.
17372 (pupa_command_execute): Changed (almost rewritten) so it uses
17373 pupa_split_command. Added support for setting variables using the
17374 syntax `foo=bar'.
17375 (rescue_command): Changed to work with the new argument parser.
17376 (terminal_command): Moved from here to commands/terminal.c.
17377 (set_command): New function.
17378 (unset_command): New function.
17379 (insmod_command): New function.
17380 (rmmod_command): New function.
17381 (lsmod_command): New function.
17382 (pupa_command_init): Don't initialize the command terminal
17383 anymore. Initialize the commands set, unset, insmod, rmmod and
17384 lsmod.
17385 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17386 (kernel_img_HEADERS): Add arg.h and env.h.
17387 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17388 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17389 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17390 normal/arg.c.
17391 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17392 terminal.mod.
17393 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17394 (boot_mod_SOURCES): New variable.
17395 (terminal_mod_SOURCES): Likewise.
17396 (ls_mod_SOURCES): Likewise.
17397 (cmp_mod_SOURCES): Likewise.
17398 (cat_mod_SOURCES): Likewise.
17399
17400 * normal/arg.c: New file.
17401 * kern/env.c: Likewise.
17402 * include/pupa/arg.h: Likewise.
17403 * include/pupa/env.h: Likewise.
17404 * font/manager.c (font_command): Changed to match argument parsing
17405 interface changes.
17406 (PUPA_MOD_INIT): Likewise.
17407 * hello/hello.c (pupa_cmd_hello): Likewise.
17408 (PUPA_MOD_INIT): Likewise.
17409 * include/pupa/disk.h: Include <pupa/device.h>.
17410 (pupa_print_partinfo): New prototype.
17411 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17412 (pupa_dl_get_prefix): Likewise.
17413 * include/pupa/misc.h: Include <pupa/err.h>.
17414 (pupa_isgraph): New prototype.
17415 (pupa_isdigit): Likewise.
17416 (pupa_split_cmdline): Likewise.
17417 * include/pupa/normal.h: Include <pupa/arg.h>.
17418 (pupa_command): Changed the prototype of the member `func' to
17419 match the argument parsing interface. Added member `options'.
17420 (pupa_register_command): Updated to match function.
17421 (pupa_arg_parse): New prototype.
17422 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17423 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17424 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17425 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17426 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17427 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17428 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17429 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17430 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17431 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17432 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17433 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17434 * kern/disk.c: Include <pupa/file.h>.
17435 (pupa_print_partinfo): New function.
17436 * kern/dl.c: Include <pupa/env.h>.
17437 (pupa_dl_dir): Variable removed.
17438 (pupa_dl_load): Use the environment variable `prefix' instead of
17439 the variable pupa_dl_dir.
17440 (pupa_dl_set_prefix): Function removed.
17441 (pupa_dl_get_prefix): Likewise.
17442 * kern/i386/pc/init.c: Include <pupa/env.h>.
17443 (pupa_machine_init): Use the environment variable `prefix' instead of
17444 using pupa_dl_set_prefix to set the prefix.
17445 * kern/main.c: Include <pupa/env.h>.
17446 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17447 using pupa_dl_get_prefix to get the prefix.
17448 * kern/misc.c: Include <pupa/env.h>.
17449 (pupa_isdigit): New function.
17450 (pupa_isgraph): Likewise.
17451 (pupa_ftoa): Likewise.
17452 (pupa_vsprintf): Added support for printing values of the type
17453 `double'. Make it possible to format variable output when using
17454 formatting like `%1.2%f'.
17455 (pupa_split_cmdline): New function.
17456 * kern/rescue.c: Include <pupa/env.h>.
17457 (next_word): Removed function.
17458 (pupa_rescue_cmd_prefix): Likewise.
17459 (pupa_rescue_cmd_set): New function.
17460 (pupa_rescue_cmd_unset): New function.
17461 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17462 split the command line instead of splitting it here. Added
17463 support for setting variables using the syntax `foo=bar'. Don't
17464 initialize the prefix command anymore. Initialized the set and
17465 unset commands.
17466 * normal/cmdline.c: Include <pupa/env.h>.
17467 (pupa_tab_complete): Added prototypes for print_simple_completion,
17468 print_partition_completion, add_completion, iterate_commands,
17469 iterate_dev, iterate_part and iterate_dir. Moved code to print
17470 partition information from here to kern/disk.c.
17471 (pupa_cmdline_run): Don't check if the function exists anymore.
17472 * normal/main.c: Include <pupa/env.h>.
17473 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17474 instead of using pupa_dl_get_prefix to get the prefix.
17475 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17476 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17477 warning.
17478 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17479 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17480 ((unused))' to silence a gcc warning.
17481 (pupa_vga_setcolor): Likewise.
17482 (debug_command): Changed to match argument parsing
17483 interface changes.
17484 * util/pupa-emu.c: Include <pupa/env.h>.
17485 (options): Added 0's for unused fields to silence a gcc warning.
17486 (argp): Likewise.
17487 (main): Use the environment variable `prefix' instead of using
17488 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17489 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17490 and terminal.
17491
17492 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17493 * util/misc.c: Include <malloc.h>.
17494 (pupa_malloc): Rewritten so errors are correctly reported.
17495 (pupa_realloc): Likewise.
17496 (pupa_memalign): Likewise.
17497 (pupa_mm_init_region): Declare unused variables with
17498 `__attribute__ ((unused))' to silence a gcc warning.
17499 * normal/i386/setjmp.S: Remove tab at the end of the file to
17500 silence a gcc warning.
17501 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17502 variables with `__attribute__ ((unused))' to silence a gcc
17503 warning.
17504 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17505 local variable i unsigned to silence a gcc warning.
17506
17507 * kern/term.c: Include <pupa/misc.h>.
17508 (pupa_more_lines): New variable.
17509 (pupa_more): Likewise.
17510 (pupa_putcode): When the pager is active pause at the end of every
17511 screen.
17512 (pupa_set_more): New function.
17513 * include/pupa/term.h (pupa_set_more): New prototype.
17514
17515
17516 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17517
17518 Now this project is GRUB 2 rather than PUPA. The location of
17519 the CVS repository was moved to GRUB's.
17520
17521 * configure.ac: Use bug-grub as the reporting address.
17522 Use GRUB instead of PUPA.
17523 Change the version number to 1.90.
17524
17525 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17526
17527 * genkernsyms.sh: Updated copyright information.
17528 * genmk.rb: Likewise.
17529 * genmodsrc.sh: Likewise.
17530 * gensymlist.sh: Likewise.
17531 * boot/i386/pc/boot.S: Likewise.
17532 * boot/i386/pc/diskboot.S: Likewise.
17533 * disk/i386/pc/biosdisk.c: Likewise.
17534 * disk/i386/pc/partition.c: Likewise.
17535 * font/manager.c: Likewise.
17536 * fs/ext2.c: Likewise.
17537 * fs/fat.c: Likewise.
17538 * include/pupa/boot.h: Likewise.
17539 * include/pupa/device.h: Likewise.
17540 * include/pupa/disk.h: Likewise.
17541 * include/pupa/dl.h: Likewise.
17542 * include/pupa/elf.h: Likewise.
17543 * include/pupa/err.h: Likewise.
17544 * include/pupa/file.h: Likewise.
17545 * include/pupa/font.h: Likewise.
17546 * include/pupa/fs.h: Likewise.
17547 * include/pupa/kernel.h: Likewise.
17548 * include/pupa/loader.h: Likewise.
17549 * include/pupa/misc.h: Likewise.
17550 * include/pupa/mm.h: Likewise.
17551 * include/pupa/net.h: Likewise.
17552 * include/pupa/normal.h: Likewise.
17553 * include/pupa/rescue.h: Likewise.
17554 * include/pupa/setjmp.h: Likewise.
17555 * include/pupa/symbol.h: Likewise.
17556 * include/pupa/term.h: Likewise.
17557 * include/pupa/types.h: Likewise.
17558 * include/pupa/i386/setjmp.h: Likewise.
17559 * include/pupa/i386/types.h: Likewise.
17560 * include/pupa/i386/pc/biosdisk.h: Likewise.
17561 * include/pupa/i386/pc/boot.h: Likewise.
17562 * include/pupa/i386/pc/console.h: Likewise.
17563 * include/pupa/i386/pc/init.h: Likewise.
17564 * include/pupa/i386/pc/kernel.h: Likewise.
17565 * include/pupa/i386/pc/linux.h: Likewise.
17566 * include/pupa/i386/pc/loader.h: Likewise.
17567 * include/pupa/i386/pc/memory.h: Likewise.
17568 * include/pupa/i386/pc/multiboot.h: Likewise.
17569 * include/pupa/i386/pc/partition.h: Likewise.
17570 * include/pupa/i386/pc/time.h: Likewise.
17571 * include/pupa/i386/pc/vga.h: Likewise.
17572 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17573 * include/pupa/util/getroot.h: Likewise.
17574 * include/pupa/util/misc.h: Likewise.
17575 * include/pupa/util/resolve.h: Likewise.
17576 * kern/device.c: Likewise.
17577 * kern/disk.c: Likewise.
17578 * kern/dl.c: Likewise.
17579 * kern/err.c: Likewise.
17580 * kern/file.c: Likewise.
17581 * kern/fs.c: Likewise.
17582 * kern/loader.c: Likewise.
17583 * kern/main.c: Likewise.
17584 * kern/misc.c: Likewise.
17585 * kern/mm.c: Likewise.
17586 * kern/rescue.c: Likewise.
17587 * kern/term.c: Likewise.
17588 * kern/i386/dl.c: Likewise.
17589 * kern/i386/pc/init.c: Likewise.
17590 * kern/i386/pc/lzo1x.S: Likewise.
17591 * kern/i386/pc/startup.S: Likewise.
17592 * loader/i386/pc/chainloader.c: Likewise.
17593 * loader/i386/pc/linux.c: Likewise.
17594 * loader/i386/pc/multiboot.c: Likewise.
17595 * normal/cmdline.c: Likewise.
17596 * normal/command.c: Likewise.
17597 * normal/main.c: Likewise.
17598 * normal/menu.c: Likewise.
17599 * normal/i386/setjmp.S: Likewise.
17600 * term/i386/pc/console.c: Likewise.
17601 * term/i386/pc/vga.c: Likewise.
17602 * util/console.c: Likewise.
17603 * util/genmoddep.c: Likewise.
17604 * util/misc.c: Likewise.
17605 * util/pupa-emu.c: Likewise.
17606 * util/resolve.c: Likewise.
17607 * util/unifont2pff.rb: Likewise.
17608 * util/i386/pc/biosdisk.c: Likewise.
17609 * util/i386/pc/getroot.c: Likewise.
17610 * util/i386/pc/pupa-mkimage.c: Likewise.
17611 * util/i386/pc/pupa-setup.c: Likewise.
17612
17613 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17614
17615 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17616 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17617 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17618 reading and reset it after reading.
17619 (pupa_ext2_close): Return PUPA_ERR_NONE.
17620
17621 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17622 Correct value.
17623 (struct linux_kernel_header): Add kernel_version and
17624 initrd_addr_max.
17625 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17626 pupa_file_read succeeds.
17627 (pupa_rescue_cmd_initrd): Implement.
17628
17629 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17630
17631 * fs/ext2.c (pupa_ext2_label): New function.
17632 (pupa_ext2_fs): Added label.
17633 * fs/fat.c (pupa_fat_label): New function.
17634 (pupa_fat_fs): Added label.
17635 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17636
17637 * kern/misc.c (pupa_strndup): New function.
17638 * include/pupa/misc.h (pupa_strndup): New prototype.
17639
17640 * include/pupa/normal.h: Include <pupa/err.h>.
17641 (pupa_set_history): New prototype.
17642 (pupa_iterate_commands): New prototype.
17643 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17644 <pupa/disk.h>, <pupa/file.h>.
17645 (hist_size): New variable.
17646 (hist_lines): Likewise.
17647 (hist_end): Likewise.
17648 (hist_used): Likewise.
17649 (pupa_set_history): New function.
17650 (pupa_history_get): Likewise.
17651 (pupa_history_add): Likewise.
17652 (pupa_history_replace): Likewise.
17653 (pupa_tab_complete): Likewise.
17654 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17655 completion shows partitionnames while completing partitions, this
17656 feature was suggested by Jeff Bailey.
17657 * normal/command.c (pupa_iterate_commands): New function.
17658 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17659 (pupa_normal_init): Initialize history buffer.
17660 (PUPA_MOD_INIT): Likewise.
17661 (pupa_normal_fini): Free the history buffer.
17662 (PUPA_MOD_FINI): Likewise.
17663
17664 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17665 key.
17666
17667 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17668 * configure.ac [i386]: Check for regparam bug.
17669 (NESTED_FUNC_ATTR) [! i386]: Defined.
17670
17671 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17672
17673 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17674 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17675 (pupa_emu_SOURCES): New variable.
17676 (pupa_emu_LDFLAGS): Likewise.
17677 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17678 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17679 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17680 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17681 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17682 (pupa_jmp_buf): New typedef.
17683 (pupa_setjmp) [PUPA_UTIL]: New macro.
17684 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17685 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17686 (pupa_refresh): New prototype.
17687 * include/pupa/util/getroot.h: New file.
17688 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17689 it.
17690 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17691 (pupa_rescue_cmd_cat): Likewise.
17692 (pupa_rescue_cmd_ls): Likewise.
17693 (pupa_rescue_cmd_testload): Likewise.
17694 (pupa_rescue_cmd_lsmod): Likewise.
17695 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17696 * normal/menu.c (run_menu): Likewise.
17697 * kern/term.c (pupa_cls): Likewise.
17698 (pupa_refresh): New function.
17699 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17700 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17701 * util/console.c: New file.
17702
17703 * util/i386/pc/getroot.c: New file.
17704 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17705 (pupa_putchar): New function.
17706 (pupa_refresh): Likewise.
17707 (xgetcwd): Function moved to ...
17708 (strip_extra_slashes): Likewise.
17709 (get_prefix): Likewise.
17710 * util/i386/pc/getroot.c: ... here.
17711 (find_root_device): Function moved and renamed to...
17712 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17713 Changed all callers.
17714 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17715 and renamed to...
17716 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17717 Changed all callers.
17718 * util/misc.c (pupa_memalign): New function.
17719 (pupa_mm_init_region): Likewise.
17720 (pupa_register_exported_symbols): Likewise.
17721 (pupa_putchar): Function removed.
17722 * util/pupa-emu.c: New file.
17723
17724 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17725
17726 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17727 (_multiboot_mod_SOURCES): New variable.
17728 (_multiboot_mod_CFLAGS): Likewise.
17729 * loader/i386/pc/multiboot.c: New file.
17730 * include/pupa/i386/pc/multiboot.h: Likewise.
17731 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17732 (pupa_multiboot_real_boot): New function.
17733 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17734 (pupa_multiboot_real_boot): New prototype.
17735 (pupa_rescue_cmd_multiboot): Likewise
17736 (pupa_rescue_cmd_module): Likewise.
17737
17738 * kern/loader.c (pupa_loader_set): Continue when
17739 pupa_loader_unload_func() fails.
17740 (pupa_loader_unset): New function.
17741 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17742
17743 * kern/misc.c (pupa_stpcpy): New function.
17744 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17745
17746 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17747
17748 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17749 for available extensions.
17750
17751 * include/pupa/i386/pc/time.h: New file.
17752 * kern/disk.c: Include <pupa/machine/time.h>.
17753 (PUPA_CACHE_TIMEOUT): New macro.
17754 (pupa_last_time): New variable.
17755 (pupa_disk_open): Flush the cache when there was a timeout.
17756 (pupa_disk_close): Reset the timer.
17757 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17758 pupa_currticks.
17759 * util/misc.c: Include <sys/times.h>
17760 (pupa_get_rtc): New function.
17761
17762 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17763
17764 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17765 as blocks.
17766 (pupa_ext2_get_file_block): Use blocks member.
17767
17768 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17769 first block. Return -1 instead of pupa_errno on error.
17770
17771 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17772
17773 * README: In the pupa-mkimage example use _chain instead of chain
17774 and ext2 instead of fat.
17775 * TODO: Replace ext2fs with jfs as an example. Add an item for
17776 adding journal playback for ext2fs.
17777 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17778 (pkgdata_MODULES): Added ext2.mod.
17779 (ext2_mod_SOURCES): New variable.
17780 (ext2_mod_CFLAGS): Likewise.
17781 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17782 * include/pupa/misc.h (pupa_strncpy): New prototype.
17783 (pupa_strcat): Likewise.
17784 (pupa_strncmp): Likewise.
17785 * kern/misc.c (pupa_strcat): Enable function.
17786 (pupa_strncpy): New function.
17787 (pupa_strncmp): Likewise.
17788 * fs/ext2.c: New file.
17789
17790 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17791 when the read failed before retrying.
17792 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17793 (_FILE_OFFSET_BITS): Likewise.
17794 * configure.ac: Added AC_SYS_LARGEFILE.
17795
17796 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17797
17798 * genmk.rb (PModule#rule): Make sure to get only symbol names
17799 from the output of nm.
17800 Reported by Robert Millan <zeratul2@wanadoo.es>.
17801
17802 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17803
17804 I forgot to check in these changes for a long time. This adds
17805 incomplete support for VGA console, and this is still very
17806 buggy. Also, a lot of consideration is required for I18N,
17807 UNICODE, and VGA font issues. Therefore, assume that this is
17808 such that "better than nothing".
17809
17810 * font/manager.c: New file.
17811 * include/pupa/font.h: Likewise.
17812 * include/pupa/i386/pc/vga.h: Likewise.
17813 * term/i386/pc/vga.c: Likewise.
17814 * util/unifont2pff.rb: Likewise.
17815
17816 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17817 (pkgdata_MODULES): Added vga.mod and font.mod.
17818 (vga_mod_SOURCES): New variables.
17819 (vga_mod_CFLAGS): Likewise.
17820 (font_mod_SOURCES): Likewise.
17821 (font_mod_CFLAGS): Likewise.
17822
17823 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17824
17825 * include/pupa/term.h: Include pupa/err.h.
17826 (struct pupa_term): Added init and fini.
17827 Changed the argument of putchar to pupa_uint32_t.
17828
17829 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17830 (pupa_console_real_putchar): New prototype.
17831 (pupa_console_putchar): Removed.
17832 (pupa_console_checkkey): Exported.
17833 (pupa_console_getkey): Likewise.
17834
17835 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17836 characters.
17837
17838 * kern/term.c (pupa_term_set_current): Rewritten.
17839 (pupa_putchar): Likewise.
17840 (pupa_putcode): New function.
17841
17842 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17843 (pupa_console_real_putchar): ... this.
17844 (pupa_vga_set_mode): New function.
17845 (pupa_vga_get_font): Likewise.
17846
17847 * normal/command.c: Include pupa/term.h.
17848 (terminal_command): New function.
17849 (pupa_command_init): Register the command "terminal".
17850
17851 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17852 (DISP_UP): Likewise.
17853 (DISP_RIGHT): Likewise.
17854 (DISP_DOWN): Likewise.
17855 (DISP_HLINE): Likewise.
17856 (DISP_VLINE): Likewise.
17857 (DISP_UL): Likewise.
17858 (DISP_UR): Likewise.
17859 (DISP_LL): Likewise.
17860 (DISP_LR): Likewise.
17861
17862 * term/i386/pc/console.c (pupa_console_putchar): New function.
17863
17864 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17865
17866 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17867 FIX. Reverse the path_list.
17868
17869 * include/pupa/normal.h: Export pupa_register_command and
17870 pupa_unregister_command.
17871
17872 * hello/hello.c (pupa_cmd_hello): New module.
17873 * conf/i386-pc.rmk: Added hello.mod.
17874
17875 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17876
17877 * kern/i386/pc/lzo1x.S: New file.
17878
17879 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17880 (compress_kernel): New variable.
17881 (generate_image): Heavily modified to support compressing a
17882 large part of the core image.
17883
17884 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17885 leak.
17886 (pupa_util_load_image): New function.
17887
17888 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17889 (pupa_compressed_size): New variable.
17890 (codestart): Enable Gate A20 here.
17891 Decompress the compressed part of the core image.
17892 Rearrange the code to put functions and variables which are
17893 required for initialization in the non-compressed part.
17894 Include lzo1x.S.
17895
17896 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17897 here.
17898
17899 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17900
17901 * include/pupa/i386/pc/kernel.h
17902 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17903 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17904 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17905 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17906 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17907
17908 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17909
17910 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17911 (Utility#rule): Likewise.
17912
17913 * configure.ac: Check if LZO is available.
17914
17915 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17916
17917 * include/pupa/normal.h: New file.
17918 * include/pupa/setjmp.h: Likewise.
17919 * include/pupa/i386/setjmp.h: Likewise.
17920 * normal/cmdline.c: Likewise.
17921 * normal/command.c: Likewise.
17922 * normal/main.c: Likewise.
17923 * normal/menu.c: Likewise.
17924 * normal/i386/setjmp.S: Likewise.
17925
17926 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17927 (pupa_rescue_cmd_initrd): Likewise.
17928
17929 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17930 Likewise.
17931
17932 * kern/i386/pc/startup.S (translation_table): New variable.
17933 (translate_keycode): New function.
17934 (pupa_console_getkey): Call translate_keycode.
17935
17936 * kern/rescue.c (attempt_normal_mode): New function.
17937 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17938 it failed, print a message.
17939
17940 * kern/mm.c (pupa_real_malloc): Print more information when a
17941 free magic is broken.
17942 (pupa_free): If the first free header is not free actually, set
17943 it to P.
17944
17945 * kern/main.c (pupa_load_normal_mode): Just load the module
17946 "normal".
17947 (pupa_main): Don't print the message
17948 "Entering into rescue mode..." here.
17949
17950 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17951 Declared.
17952 (pupa_rescue_cmd_initrd): Likewise.
17953 (pupa_rescue_cmd_initrd): Likewise.
17954
17955 * include/pupa/symbol.h (FUNCTION): Specify the type.
17956 (VARIABLE): Likewise.
17957
17958 * include/pupa/err.h (pupa_err_t): Added
17959 PUPA_ERR_UNKNOWN_COMMAND.
17960
17961 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17962 (pupa_dl_get_prefix): Likewise.
17963
17964 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17965 Added _chain.mod and _linux.mod instead of chain.mod and
17966 linux.mod.
17967 (chain_mod_SOURCES): Renamed to ...
17968 (_chain_mod_SOURCES): ... this.
17969 (chain_mod_CFLAGS): Renamed to ...
17970 (_chain_mod_CFLAGS): ... this.
17971 (linux_mod_SOURCES): Renamed to ...
17972 (_linux_mod_SOURCES): ... this.
17973 (linux_mod_CFLAGS): Renamed to ...
17974 (_linux_mod_CFLAGS): ... this.
17975 (normal_mod_SOURCES): New variable.
17976 (normal_mod_CFLAGS): Likewise.
17977 (normal_mod_ASFLAGS): Likewise.
17978
17979 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17980
17981 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17982 possible.
17983
17984 * kern/dl.c (pupa_dl_ref): Refer depending modules
17985 recursively.
17986 (pupa_dl_unref): Unrefer depending modules recursively.
17987 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17988 a module is unloaded before one depending on that module is
17989 unloaded.
17990 (pupa_dl_unload): Unload depending modules explicitly,
17991 if possible.
17992
17993 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17994
17995 * include/pupa/i386/pc/linux.h: New file.
17996 * loader/i386/pc/linux.c: Likewise.
17997
17998 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17999 Removed.
18000 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18001 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18002 of PUPA_CHAINLOADER_BOOT_SECTOR.
18003
18004 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18005 (pupa_linux_prot_size): New variable.
18006 (pupa_linux_tmp_addr): Likewise.
18007 (pupa_linux_real_addr): Likewise.
18008 (pupa_linux_boot_zimage): New function.
18009 (pupa_linux_boot_bzimage): Likewise.
18010
18011 * kern/i386/pc/init.c (struct mem_region): New structure.
18012 (MAX_REGIONS): New macro.
18013 (mem_regions): New variable.
18014 (num_regions): Likewise.
18015 (pupa_os_area_addr): Likewise.
18016 (pupa_os_area_size): Likewise.
18017 (pupa_lower_mem): Likewise.
18018 (pupa_upper_mem): Likewise.
18019 (add_mem_region): New function.
18020 (compact_mem_regions): Likewise.
18021 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18022 the size of the conventional memory and that of so-called upper
18023 memory (before the first memory hole).
18024 Instead of adding each found region to free memory, use
18025 add_mem_region and add them after removing overlaps.
18026 Also, add only 1/4 of the upper memory to free memory. The rest
18027 is used for loading OS images. Maybe this is ad hoc, but this
18028 makes it much easier to relocate OS images when booting.
18029
18030 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18031 (pupa_enter_rescue_mode): Don't register initrd and module.
18032
18033 * kern/mm.c: Include pupa/dl.h.
18034
18035 * kern/main.c: Include pupa/file.h and pupa/device.h.
18036
18037 * kern/loader.c (pupa_loader_load_module_func): Removed.
18038 (pupa_loader_load_module): Likewise.
18039
18040 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18041 ``.o''.
18042
18043 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18044 (pupa_linux_tmp_addr): Likewise.
18045 (pupa_linux_real_addr): Likewise.
18046 (pupa_linux_boot_zimage): Likewise.
18047 (pupa_linux_boot_bzimage): Likewise.
18048
18049 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18050 (pupa_upper_mem): Likewise.
18051 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18052 module is too dangerous.
18053
18054 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18055 (pupa_os_area_size): Likewise.
18056 (pupa_loader_set): Remove the first argument. Loader doesn't
18057 manage modules or initrd any longer.
18058 (pupa_loader_load_module): Removed.
18059
18060 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18061 (linux_mod_SOURCES): New variable.
18062 (linux_mod_CFLAGS): Likewise.
18063
18064 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18065
18066 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18067 the length of a blocklist correctly.
18068
18069 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18070 Use ioctl only if the OS file is a block device.
18071 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18072 not very useful for normal files.
18073
18074 * kern/main.c (pupa_set_root_dev): New function.
18075 (pupa_load_normal_mode): Likewise.
18076 (pupa_main): Call those above.
18077
18078 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18079 pupa_uint16_t.
18080
18081 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18082
18083 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18084
18085 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18086 (setup): Configure the installed partition information and the
18087 dl prefix.
18088
18089 * loader/i386/pc/chainloader.c (my_mod): New variable.
18090 (pupa_chainloader_unload): New function.
18091 (pupa_rescue_cmd_chainloader): Refer itself.
18092 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18093
18094 * kern/i386/pc/startup.S (install_partition): Removed.
18095 (version_string): Likewise.
18096 (config_file): Likewise.
18097 (pupa_install_dos_part): New variable.
18098 (pupa_install_bsd_part): Likewise.
18099 (pupa_prefix): Likewise.
18100 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18101
18102 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18103 and pupa/misc.h.
18104 (make_install_device): New function.
18105 (pupa_machine_init): Set the dl prefix.
18106
18107 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18108 (buf): Renamed to ...
18109 (linebuf): ... this.
18110 (pupa_rescue_cmd_prefix): New function.
18111 (pupa_rescue_cmd_insmod): Likewise.
18112 (pupa_rescue_cmd_rmmod): Likewise.
18113 (pupa_rescue_cmd_lsmod): Likewise.
18114 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18115 rmmod and lsmod.
18116
18117 * kern/mm.c (pupa_memalign): If failed even after invalidating
18118 disk caches, unload unneeded modules and retry.
18119
18120 * kern/misc.c (pupa_memmove): New function.
18121 (pupa_memcpy): Removed.
18122 (pupa_strcpy): New function.
18123 (pupa_itoa): Made static.
18124
18125 * kern/dl.c (pupa_dl_iterate): New function.
18126 (pupa_dl_ref): Likewise.
18127 (pupa_dl_unref): Likewise.
18128 (pupa_dl_unload): Return if succeeded or not.
18129 (pupa_dl_unload_unneeded): New function.
18130 (pupa_dl_unload_all): Likewise.
18131 (pupa_dl_init): Renamed to ...
18132 (pupa_dl_set_prefix): ... this.
18133 (pupa_dl_get_prefix): New function.
18134
18135 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18136 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18137 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18138 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18139 (pupa_install_dos_part): Declared.
18140 (pupa_install_bsd_part): Likewise.
18141 (pupa_prefix): Likewise.
18142 (pupa_boot_drive): Likewise.
18143
18144 * include/pupa/types.h: Fix a typo.
18145
18146 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18147 pupa_memmove.
18148 (pupa_memmove): Declared.
18149 (pupa_strcpy): Likewise.
18150
18151 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18152 pupa_mod_init takes one argument, its own module.
18153 (pupa_dl_unload_unneeded): Declared.
18154 (pupa_dl_unload_all): Likewise.
18155 (pupa_dl_ref): Likewise.
18156 (pupa_dl_unref): Likewise.
18157 (pupa_dl_iterate): Likewise.
18158 (pupa_dl_init): Renamed to ...
18159 (pupa_dl_set_prefix): ... this.
18160 (pupa_dl_get_prefix): Declared.
18161
18162 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18163 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18164 unloaded.
18165 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18166 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18167
18168 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18169 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18170
18171 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18172
18173 * util/i386/pc/pupa-setup.c (setup): Define the internal
18174 function find_first_partition_start at the top level, because GCC
18175 3.0.x cannot compile internal functions in deeper scopes
18176 correctly.
18177 (find_root_device): Use lstat instead of stat.
18178 Don't follow symbolic links.
18179 Fix the path-constructing code.
18180
18181 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18182 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18183 by a BLKGETSIZE ioctl first, because block devices don't fill
18184 the member st_mode of the structure stat on Linux.
18185 [__linux__] (linux_find_partition): Use a temporary buffer
18186 REAL_DEV for the working space. Copy it to DEV before returning.
18187 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18188 buffer cache consistent.
18189 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18190 strncmp. The previous value was merely wrong.
18191 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18192
18193 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18194 FAT size is 12. The previous value was merely wrong.
18195
18196 * kern/main.c (pupa_main): Don't split the starting message from
18197 newlines.
18198
18199 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18200 LF, because BIOS goes crazy about character attributes in this
18201 case.
18202
18203 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18204
18205 * include/i386/pc/util/biosdisk.h: New file.
18206 * util/i386/pc/biosdisk.c: Likewise.
18207 * util/i386/pc/pupa-setup.c: Likewise.
18208
18209 * Makefile.in (INCLUDE_DISTFILES): Added
18210 include/pupa/i386/pc/util/biosdisk.h.
18211 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18212 directory util/i386/pc.
18213 (install-local): Added a rule for sbin_UTILITIES.
18214 (uninstall): Likewise.
18215
18216 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18217
18218 * util/misc.c (xrealloc): New function.
18219 (pupa_malloc): Likewise.
18220 (pupa_free): Likewise.
18221 (pupa_realloc): Likewise.
18222 (pupa_stop): Likewise.
18223 (pupa_putchar): Likewise.
18224
18225 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18226
18227 * include/pupa/util/misc.h (xrealloc): Declared.
18228
18229 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18230 macro.
18231 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18232 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18233
18234 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18235 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18236
18237 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18238 way should be implemented.
18239 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18240
18241 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18242 the size of NAME for safety.
18243 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18244 0x88.
18245
18246 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18247 (pupa_setup_SOURCES): Likewise.
18248
18249 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18250
18251 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18252
18253 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18254 bunch of pushl's from pusha, because this destroys the return
18255 value.
18256
18257 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18258
18259 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18260 This means that any missing prototypes could be fatal. Also, you
18261 must take care when writing assembly code. See the comments at
18262 the beginning of startup.S, for more details.
18263
18264 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18265 compilation mechanism.
18266 (pupa_chainloader_real_boot): Likewise.
18267 (pupa_biosdisk_rw_int13_extensions): Likewise.
18268 (pupa_biosdisk_rw_standard): Likewise.
18269 (pupa_biosdisk_check_int13_extensions): Likewise.
18270 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18271 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18272 (pupa_get_memsize): Likewise.
18273 (pupa_get_mmap_entry): Likewise.
18274 (pupa_console_putchar): Likewise.
18275 (pupa_console_setcursor): Likewise.
18276 (pupa_getrtsecs): Use pushl instead of push.
18277
18278 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18279 memory instead of the stack for a mmap entry, because some
18280 BIOSes may ignore the maximum size and overflow.
18281
18282 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18283
18284 * genmk.rb (PModule#rule): Compile automatically generated
18285 sources with module-specific CFLAGS as well as other sources.
18286
18287 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18288
18289 * configure.ac: Check ld.
18290 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18291 respectively, before checking endianness and sizes.
18292
18293 * Makefile.in (LD): New variable.
18294
18295 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18296
18297 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18298
18299 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18300
18301 * Changelog: New file.
18302