]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
a58da8c7 12009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2
3 Fix 64-bit efiemu
4
5 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
6 correct wrong typedef
7 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
8
20591577 92009-07-15 Pavel Roskin <proski@gnu.org>
10
560ca572 11 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
12 * kern/disk.c (struct grub_disk_cache): Likewise.
13
e8e8e4fd 14 * commands/probe.c (options): Typo fix.
15
fde24e10 16 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
17 Increase to 0x5a to accommodate FAT32. Adjust other offsets
18 accordingly.
19 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
20
379c54c1 21 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
22 the end of "Error" to make the message more readable.
23
7bd8f5bf 24 * boot/i386/pc/boot.S (kernel_segment): Remove.
25 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
26 for destination.
27
40b132c5 28 * boot/i386/pc/boot.S (boot_version): Remove.
29 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
30 Remove.
31
20591577 32 * include/grub/i386/pc/boot.h: Sort all offsets.
33 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
34 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
35 * boot/i386/pc/boot.S: Assert location of every offset listed in
36 include/grub/i386/pc/boot.h.
37
2df32b2c 382009-07-13 Pavel Roskin <proski@gnu.org>
39
44b5d879 40 * include/grub/i386/coreboot/machine.h: Rename
41 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
42 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
43 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
44
17dc3751 45 * kern/dl.c: Force native word size to suppress warnings when
46 compiling grub-emu.
47
2df32b2c 48 * kern/device.c (grub_device_iterate): Change struct part_ent to
49 hold the name, not a pointer to it. Use one grub_malloc() per
50 partition, not two. Free partition_name if grub_malloc() fails.
51 Set ents to NULL only before grub_partition_iterate() is called.
52
75c59f59 532009-07-11 Bean <bean123ch@gmail.com>
54
55 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
56 childname.
57
0ae1bf88 582009-07-10 Bean <bean123ch@gmail.com>
592009-07-10 Robert Millan <rmh.grub@aybabtu.com>
60
61 * kern/ieee1275/openfw.c (grub_children_iterate)
62 (grub_devalias_iterate): Fix size evaluation for property or path
63 strings, which was broken since r2132.
64
8279cade 652009-07-07 Pavel Roskin <proski@gnu.org>
66
7d8a52d3 67 * commands/search.c (search_file): Merge into ...
68 (search_fs): ... this. Accept search type as argument.
69 (grub_cmd_search): Pass search type to search_fs().
70
25f9a05a 71 * include/grub/util/console.h: New file.
72 * util/console.c: Use it instead of grub/machine/console.h.
73 * util/grub-emu.c: Likewise.
74
8279cade 75 * lib/arg.c (find_long_option): Remove.
76 (find_long): Add `len' argument, make `s' const char *.
77 (grub_arg_parse): Parse long options in place, not in a
78 temporary buffer.
79
4a11b60f 802009-07-06 Pavel Roskin <proski@gnu.org>
81
99f68041 82 * commands/search.c (search_fs): Fix potential NULL pointer
83 dereference.
84
4a11b60f 85 * commands/search.c (search_fs): Replace QUID macro with quid_fn
86 function pointer.
87
e110f4de 882009-07-06 Daniel Mierswa <impulze@impulze.org>
89
90 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
91 comparison.
92
46eeb6a2 932009-07-05 Pavel Roskin <proski@gnu.org>
94
bab74958 95 * include/grub/i386/linux.h (struct linux_kernel_params):
96 Restore padding3, it's still needed.
97
46eeb6a2 98 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
99 FreeBSD.
100 * util/osdetect.lua: Likewise.
101
b4a1dc79 1022009-07-05 Bean <bean123ch@gmail.com>
103
104 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
105
106 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
107 (grub_lua_getenv): Likewise.
108 (grub_lua_setenv): Likewise.
109 (save_errno): New function.
110 (push_result): Likewise.
111 (grub_lua_enum_device): Likewise.
112 (grub_lua_enum_file): Likewise.
113 (grub_lua_file_open): Likewise.
114 (grub_lua_file_close): Likewise.
115 (grub_lua_file_seek): Likewise.
116 (grub_lua_file_read): Likewise.
117 (grub_lua_file_getline): Likewise.
118 (grub_lua_file_getsize): Likewise.
119 (grub_lua_file_getpos): Likewise.
120 (grub_lua_file_eof): Likewise.
121 (grub_lua_file_exist): Likewise.
122 (grub_lua_add_menu): Likewise.
123
124 * script/lua/grub_lua.h (isupper): New inline function.
125 (islower): Likewise.
126 (ispunct): Likewise.
127 (isxdigit): Likewise.
128 (strcspn): Change to normal function.
129 (strpbkr): New function declaration.
130 (memchr): Likewise.
131
132 * script/lua/grub_main.c (scan_str): New function.
133 (strcspn): Likewise.
134 (strpbrk): Likewise.
135 (memchr): Likewise.
136
137 * script/lua/linit.c (lualibs): Enable the string library.
138
139 * util/osdetect.lua: New file.
140
2da92295 1412009-07-04 Robert Millan <rmh.grub@aybabtu.com>
142
143 * include/grub/i386/linux.h (struct linux_kernel_params): Add
144 `capabilities' member.
145
b2582ec9 1462009-07-02 Pavel Roskin <proski@gnu.org>
147
148 * genparttoollist.sh: Add missing newline at the end.
149
32622956 1502009-07-01 Pavel Roskin <proski@gnu.org>
151
87a7339e 152 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
153
d23af54e 154 * util/hostdisk.c (open_device): Remove `const' from
155 `sysctl_size', as sysctlbyname() can change it (in this case it
156 doesn't actually happen).
157
c94b18a9 158 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
159 using signed long int constants.
160
c6cd3ef0 161 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
162 constant to avoid a warning on FreeBSD.
163
0df63420 164 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
165 where it's needed.
166
999577f1 167 * Makefile.in: Install include/grub/machine symlink.
168
6f41557f 169 * Makefile.in: When installing symlinks, use "cp -fR", which
170 works on FreeBSD and MacOSX.
171 From Yves Blusseau <cl7m42e02@sneakemail.com>
172
c8d22988 173 * kern/dl.c (grub_dl_resolve_symbol): Make static.
174 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
175
1b96e952 176 * util/misc.c: Move grub_reboot() and grub_halt() ...
177 * util/grub-emu.c: ... here. Make main_env static.
178 * include/grub/util/misc.h: Remove main_env.
179
2ef0084d 180 * kern/mm.c: Use correct format to print size_t.
181
32622956 182 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
183 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
184 * kern/powerpc/dl.c: Likewise.
185 * kern/sparc64/dl.c: Likewise.
186 * kern/x86_64/dl.c: Likewise.
187
3f7f0cd0 1882009-07-01 Robert Millan <rmh.grub@aybabtu.com>
189
190 Fix grub-emu build on sparc64-ieee1275.
191
192 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
194
211d06b5 1952009-07-01 Robert Millan <rmh.grub@aybabtu.com>
196
197 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
198 (grub_reboot, grub_halt): New functions.
199
200 * util/i386/pc/misc.c: Delete. Update all users.
201 * util/sparc64/ieee1275/misc.c: Likewise.
202 * util/powerpc/ieee1275/misc.c: Likewise.
203
aaf53e3c 2042009-07-01 Robert Millan <rmh.grub@aybabtu.com>
205
206 * conf/i386.rmk (setjmp_mod_SOURCES)
207 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
208 * conf/common.rmk (setjmp_mod_SOURCES)
209 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
210 to use $(target_cpu).
211 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
212 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
213 * conf/powerpc-ieee1275.rmk: Likewise.
214 * conf/sparc64-ieee1275.rmk: Likewise.
215
216 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
217 $(target_cpu) for kern/$(target_cpu)/dl.c.
218 * conf/i386-efi.rmk: Likewise.
219 * conf/i386-ieee1275.rmk: Likewise.
220 * conf/x86_64-efi.rmk: Likewise.
221 * conf/i386-coreboot.rmk: Likewise.
222 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
223 $(target_cpu) for kern/$(target_cpu)/dl.c and for
224 kern/$(target_cpu)/cache.S.
225 * conf/sparc64-ieee1275.rmk: Likewise.
226
a337130b 2272009-07-01 Robert Millan <rmh.grub@aybabtu.com>
228
229 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
230 type to `grub_uint8_t', and adjust `padding9' accordingly.
231
c6fe4d53 2322009-06-29 Robert Millan <rmh.grub@aybabtu.com>
233
b09db61d 234 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
235
c6fe4d53 236 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
237 assembly in final jump, using register constraints.
238
b09db61d 239 (grub_linux_boot): For text mode, initialize `have_vga' using
240 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
241
242 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
243 right before the final jump.
244
245 Set `video_mode' to 0x3.
246
247 Document initialization of `video_page', `video_mode' and
248 `video_ega_bx'.
249
28333ad0 2502009-06-29 Robert Millan <rmh.grub@aybabtu.com>
251
252 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
253 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
254 and set GRUB_LINUX_FLAG_QUIET appropiately.
255
02164e1b 2562009-06-29 Robert Millan <rmh.grub@aybabtu.com>
257
258 Fix build on Debian / sparc.
259
260 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
261
18b6c557 2622009-06-28 Pavel Roskin <proski@gnu.org>
263
85f2aab6 264 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
265 fix a warning.
266
18b6c557 267 * util/grub.d/10_linux.in: Match SUSE style initrd names.
268
ad760f81 2692009-06-27 Robert Millan <rmh.grub@aybabtu.com>
270
271 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
272 `err'.
273
87a4623b 2742009-06-27 Robert Millan <rmh.grub@aybabtu.com>
275
276 Revert r2338.
277
278 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
279 file can't be opened. grub_file_open() is already supposed to set
280 grub_errno / grub_errmsg appropiately.
281 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
282
8231fb77 2832009-06-27 Pavel Roskin <proski@gnu.org>
2842009-06-27 Robert Millan <rmh.grub@aybabtu.com>
285
286 * include/grub/dl.h: Include grub/elf.h.
287 (struct grub_dl): Add symtab field.
288 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
289 GRUB_MODULES_MACHINE_READONLY.
290 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
291 of the header for read-only modules.
292 (grub_dl_unload): Free mod->symtab for read-only modules.
293 * kern/i386/dl.c: Use mod->symtab.
294 * kern/powerpc/dl.c: Likewise.
295 * kern/sparc64/dl.c: Likewise.
296 * kern/x86_64/dl.c: Likewise.
297
298 * conf/i386-qemu.rmk: New file.
299 * kern/i386/qemu/startup.S: Likewise.
300 * kern/i386/qemu/mmap.c: Likewise.
301 * boot/i386/qemu/boot.S: Likewise.
302 * include/grub/i386/qemu/time.h: Likewise.
303 * include/grub/i386/qemu/serial.h: Likewise.
304 * include/grub/i386/qemu/kernel.h: Likewise.
305 * include/grub/i386/qemu/console.h: Likewise.
306 * include/grub/i386/qemu/boot.h: Likewise.
307 * include/grub/i386/qemu/init.h: Likewise.
308 * include/grub/i386/qemu/machine.h: Likewise.
309 * include/grub/i386/qemu/loader.h: Likewise.
310 * include/grub/i386/qemu/memory.h: Likewise.
311
312 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
313 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
314 [qemu] (pkglib_IMAGES): Add `boot.img'.
315 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
316 [qemu] (boot_img_FORMAT): New variables.
317 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
318 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
319 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
320 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
321 [qemu] (kernel_img_FORMAT): New variables.
322
323 * configure.ac: Recognise `i386-qemu'.
324
325 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
326 (for no compression).
327 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
328 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
329 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
330 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
331 ifdefs).
332
97fe384e 3332009-06-27 Pavel Roskin <proski@gnu.org>
334
335 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
336 read.
337 * efiemu/prepare32.c: Likewise.
338 * efiemu/prepare64.c: Likewise.
339
c402ab17 3402009-06-26 Pavel Roskin <proski@gnu.org>
341
342 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
343 * include/grub/elf.h: Define symbols without "32" or "64" based
344 on GRUB_TARGET_WORDSIZE.
345 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
346 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
347 ELF definitions.
348 * efiemu/loadcore64.c: Likewise.
349 * loader/i386/bsd32.c: Likewise.
350 * loader/i386/bsd64.c: Likewise.
351 * kern/dl.c: Remove own ELF definitions.
352 * util/i386/efi/grub-mkimage.c: Likewise.
353
9bbdfd4d 3542009-06-23 Robert Millan <rmh.grub@aybabtu.com>
355
356 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
357 segment 0x0 unconditionally, because the reference generated by
358 GAS is an absolute address.
359
a42ce6e9 3602009-06-22 Robert Millan <rmh.grub@aybabtu.com>
361
362 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
363 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
364
c952cf92 3652009-06-22 Robert Millan <rmh.grub@aybabtu.com>
366
367 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
368 indexes. Check for -f explicitly.
cc3752ad 369 (search_file): Improve error message.
370 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 371
132a0a59 3722009-06-22 Robert Millan <rmh.grub@aybabtu.com>
373
374 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
375 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
376
387a140c 3772009-06-22 Robert Millan <rmh.grub@aybabtu.com>
378
379 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
380 * conf/i386-ieee1275.rmk: Likewise.
381 * conf/i386-coreboot.rmk: Likewise.
382
383 * kern/i386/pc/startup.S (grub_stop): Remove function.
384 * kern/i386/ieee1275/startup.S: Likewise.
385 * kern/i386/coreboot/startup.S: Likewise.
386 * kern/i386/misc.S (grub_stop): New function.
387
41da9665 3882009-06-22 Robert Millan <rmh.grub@aybabtu.com>
389
390 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
391 * kern/i386/realmode.S (real_to_prot): ... to here.
392
bf337234 3932009-06-22 Robert Millan <rmh.grub@aybabtu.com>
394
395 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
396 with `kernel.img'.
397 (kernel_elf_SOURCES): Rename to ...
398 (kernel_img_SOURCES): ... this.
399 (kernel_elf_HEADERS): Rename to ...
400 (kernel_img_HEADERS): ... this. Update all users.
401 (kernel_elf_ASFLAGS): Rename to ...
402 (kernel_img_ASFLAGS): ... this.
403 (kernel_elf_CFLAGS): Rename to ...
404 (kernel_img_CFLAGS): ... this.
405 (kernel_elf_LDFLAGS): Rename to ...
406 (kernel_img_LDFLAGS): ... this.
407 * conf/i386-coreboot.rmk: Likewise.
408 * conf/powerpc-ieee1275.rmk: Likewise.
409
410 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
411 with "kernel.img".
412
f52196ff 4132009-06-21 Pavel Roskin <proski@gnu.org>
414
c3cee413 415 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
416 to match nested functions.
417 * loader/sparc64/ieee1275/linux.c: Likewise.
418
f52196ff 419 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
420
58750afc 4212009-06-21 Robert Millan <rmh.grub@aybabtu.com>
422
423 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
424 all i386 platforms.
425
15355c7d 4262009-06-21 Robert Millan <rmh.grub@aybabtu.com>
427
428 Fix asm file handling on ELF, and remove workarounds.
429
430 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
431 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
432 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
433 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
434
3f3ec72b 4352009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
436
437 Load BSD ELF modules
438
439 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
440 and loader/i386/bsd64.c
441 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
442 (FREEBSD_MODTYPE_ELF_MODULE): New definition
443 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
444 (grub_freebsd_load_elfmodule32): New declaration
445 (grub_freebsd_load_elfmoduleobj64): Likewise
446 (grub_freebsd_load_elf_meta32): Likewise
447 (grub_freebsd_load_elf_meta64): Likewise
448 (grub_freebsd_add_meta): Likewise
449 (grub_freebsd_add_meta_module): Likewise
450 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
451 (grub_freebsd_add_meta_module): Likewise and move module-specific
452 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
453 (grub_cmd_freebsd): Add elf-kernel specific parts
454 based on grub_freebsd_add_meta_module
455 (grub_cmd_freebsd_module): Add type parsing moved from
456 grub_freebsd_add_meta_module
457 (grub_cmd_freebsd_module_elf): New function
458 (cmd_freebsd_module_elf): New variable
459 (GRUB_MOD_INIT): Register freebsd_module_elf
460 * loader/i386/bsd32.c: New file
461 * loader/i386/bsd64.c: Likewise
462 * loader/i386/bsdXX.c: Likewise
463 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
464 (grub_elf64_load): Likewise
465 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
466 All users updated
467 (grub_elf64_load_hook_t): Likewise
468
0db15301 4692009-06-21 Colin Watson <cjwatson@ubuntu.com>
470
471 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
472 variable.
473 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
474 don't write a menu entry for recovery mode.
475
546796c1 4762009-06-20 Robert Millan <rmh.grub@aybabtu.com>
477
478 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
479 after it's no longer needed.
480
cd7310d5 4812009-06-20 Robert Millan <rmh.grub@aybabtu.com>
482
483 * include/grub/i386/loader.h (grub_linux_prot_size)
484 (grub_linux_tmp_addr, grub_linux_real_addr)
485 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
486 GRUB_MACHINE_PCBIOS.
487 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
488 common grub_util_info() call to ...
489 (generate_image): ... here.
490 Fix use of uninitialized memory, comparison of signed with
491 unsigned integers and memory leak.
492 Remove bogus module address message.
493
ab32d3b5 4942009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
495
496 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
497 grub_raid_register
498 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
499
024ef597 5002009-06-19 Pavel Roskin <proski@gnu.org>
501
502 * configure.ac: Remove stray AC_MSG_CHECKING.
503
3ac72b51 5042009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
505
506 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 507
e14cd814 5082009-06-18 Pavel Roskin <proski@gnu.org>
509
510 * conf/common.rmk: Add fs_file.mod.
511 * disk/fs_file.c: New file.
512 * include/grub/disk.h (enum grub_disk_dev_id): Add
513 GRUB_DISK_DEVICE_FILE_ID.
514
26586d98 5152009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
516
517 Fix build with Apple's toolchain. Part 2
518
519 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
520 a fake start
521
26de2bcd 5222009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
523
524 Fix build with Apple's toolchain. Part 1
525
526 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
527 for long calls
528 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 529 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 530 Apple's toolchain
531
09b3490b 5322009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
533
534 Fix warnings
535
536 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
537 (decomp_block): initialize ch
538 use grub_memcpy instead of memcpy
539
c22a006a 5402009-06-17 Pavel Roskin <proski@gnu.org>
541
d3638678 542 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
543 version, use declarations needed to use vga_text as the startup
544 console.
545
c22a006a 546 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
547 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
548 the kernel.
549 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
550 and grub_at_keyboard_fini(), it's done on module load and
551 unload.
552
05b129e0 5532009-06-17 Felix Zielcke <fzielcke@z-51.de>
554
555 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
556 file can't be found.
557 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
558
cf24ed9e 5592009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
560
561 Fix newline handling
562
563 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 564 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 565 (grub_script_yylex): don't segfault on unterminated script
566 newline terminates command and variable
567
74aa8e4b 5682009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
569
570 avoid double grub_adjust_range call. Bug reported by David Simner
571
572 * kern/disk.c (grub_disk_write): change to raw disk access before
573 calling disk_read
574
1bd265f3 5752009-06-17 Colin Watson <cjwatson@ubuntu.com>
576
577 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
578 spaces, for the benefit of help2man.
579 * util/i386/efi/grub-mkimage.c (usage): Likewise.
580
a2d08c06 5812009-06-16 Pavel Roskin <proski@gnu.org>
582
583 * kern/i386/halt.c: Include grub/machine/init.h.
584 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
585
b97bcb19 5862009-06-16 Felix Zielcke <fzielcke@z-51.de>
587
588 * util/grub.d/30_os-prober.in: Use ${root} in the generated
589 drivemap menuentry.
590
0644f96c 5912009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
592
593 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
594 `echo' command.
595
3ef17a2e 5962009-06-16 Pavel Roskin <proski@gnu.org>
597
598 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
599 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
600 save %dx, we only need %dl and we never change it.
601 * boot/i386/pc/cdboot.S: Don't set the root drive.
602 * boot/i386/pc/pxeboot.S: Likewise.
603 * include/grub/i386/pc/boot.h: Remove
604 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
605 GRUB_BOOT_MACHINE_DRIVE_CHECK.
606 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
607 * kern/i386/pc/init.c (make_install_device): Remove references
608 to grub_root_drive.
609 * kern/i386/pc/startup.S: Likewise.
610 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
611
693fe637 6122009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
613
614 xnu_uuid command
615
616 * commands/xnu_uuid.c: new file
617 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
618 (xnu_uuid_mod_SOURCES): new variable
619 (xnu_uuid_mod_CFLAGS): likewise
620 (xnu_uuid_mod_LDFLAGS): likewise
621 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
622 * conf/i386-ieee1275.rmk: likewise
623 * conf/i386-pc.rmk: likewise
624 * conf/powerpc-ieee1275.rmk: likewise
625 * conf/sparc64-ieee1275.rmk: likewise
626 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
627
c9da87d0 6282009-06-16 Pavel Roskin <proski@gnu.org>
629
630 * configure.ac: Avoid '==' in test command, it's not portable.
631
9c6f4596 6322009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
633
634 Probe command
635
636 * commands/probe.c: new file
637 * conf/common.rmk (pkglib_MODULES): add probe.mod
638 (probe_mod_SOURCES): new variable
639 (probe_mod_CFLAGS): likewise
640 (probe_mod_LDFLAGS): likewise
641 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
642 * conf/i386-ieee1275.rmk: likewise
643 * conf/i386-pc.rmk: likewise
644 * conf/powerpc-ieee1275.rmk: likewise
645 * conf/sparc64-ieee1275.rmk: likewise
646
70b7f9fd 6472009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
648
649 Fix handling of string like \"hello\" and "a
650 b"
651
652 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
653 (grub_script_yylex): fix parsing of quoting, escaping and newline
654
71c79a6b 6552009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
656
dd74360c 657 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 658 handling
dd74360c 659
0644f96c 6602009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 661
662 * util/grub-mkconfig.in: Fix parsing of --output option.
663
e40893c3 6642009-06-12 Pavel Roskin <proski@gnu.org>
665
666 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
667 genmk.rb don't need to be generated or installed.
668
3a1acfe2 6692009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
670
671 * commands/i386/pc/drivemap_int13h.S: add more comments
672
3a4575d4 6732009-06-11 Pavel Roskin <proski@gnu.org>
674
0658e928 675 * Makefile.in (uninstall): Uninstall manuals.
676
ca0388f0 677 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
678 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
679 and update-grub_lib in two places.
680 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
681
e3b27c39 682 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
683 a compiler warning.
684
3a4575d4 685 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
686 `entry_lo' to fix variable shadowing.
687
af1f4f55 6882009-06-11 Christian Franke <franke@computer.org>
689
690 * kern/misc.c (__enable_execute_stack): Add missing return type
691 to prevent gcc warning.
692
5225e649 6932009-06-11 Felix Zielcke <fzielcke@z-51.de>
694
695 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
696
7d83bd47 6972009-06-11 Pavel Roskin <proski@gnu.org>
698
c1cb63ba 699 * Makefile.in: Don't rely on any scripts being executable.
700 Always use $(SHELL) to run shell scripts.
701
7d83bd47 702 * configure.ac: Always define ___main if using -nostdlib. This
703 fixes tests on Cygwin.
704
948f48e7 7052009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
706
707 UDF fix
708
7d83bd47 709 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 710 is in bytes and not in blocks
7d83bd47 711
8ada9bc1 7122009-06-11 Pavel Roskin <proski@gnu.org>
713
714 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
715 warning.
716
25ad2323 7172009-06-11 Felix Zielcke <fzielcke@z-51.de>
718
719 * util/grub.d/30_os-prober.in: Fix a comment. Source
720 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
721 to set the root device. Place drivemap command in the generated
722 chain entry.
723
e65acb0c 7242009-06-11 Pavel Roskin <proski@gnu.org>
725
726 * configure.ac: Remove host_m32. Issues with 64-bit utilities
727 have long been resolved.
728
f285fe2d 7292009-06-11 Colin Watson <cjwatson@ubuntu.com>
730
bd47b0b5 731 * util/grub.d/10_linux.in: Capitalise "Linux".
732
f285fe2d 733 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
734
a0c62e4e 7352009-06-11 Pavel Roskin <proski@gnu.org>
736
b6783cb2 737 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
738 fix a gcc warning and ensure that the function won't ever exit.
739
dde032e8 740 * kern/i386/ieee1275/init.c: Add missing prototype for
741 grub_stop_floppy().
742
22cd079d 743 * loader/ieee1275/multiboot2.c [__i386__]: Include
744 grub/cpu/multiboot.h.
745
a0c62e4e 746 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
747 casts to short - they are not portable and cause warnings. Fix
748 use of uninitialized values in input_buf. Use ARRAY_SIZE.
749
63963d17 7502009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
751
752 Drivemap fixes
753
754 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
755 new function
756 (grub_get_root_biosnumber_saved): new variable
757 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
758 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 759 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 760 %dx after the call if necessary
761 * conf/common.rmk (pkglib_MODULES): remove boot.mod
762 (boot_mod_SOURCES): remove
763 (boot_mod_CFLAGS): remove
764 (boot_mod_LDFLAGS): remove
765 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
766 (boot_mod_SOURCES): new variable
767 (boot_mod_CFLAGS): likewise
768 (boot_mod_LDFLAGS): likewise
769 * conf/i386-efi.rmk: likewise
770 * conf/i386-ieee1275.rmk: likewise
771 * conf/i386-pc.rmk: likewise
772 * conf/powerpc-ieee1275.rmk: likewise
773 * conf/sparc64-ieee1275.rmk: likewise
774 * conf/x86_64-efi.rmk: likewise
775 * include/grub/i386/pc/biosnum.h: new file
776 * lib/i386/pc/biosnum.c: likewise
777 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
778 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
779 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 780
33abf7ae 7812009-06-10 Pavel Roskin <proski@gnu.org>
782
5ac35b35 783 * io/gzio.c (test_header): Don't reuse one buffer for all data.
784 Use separate variables. Read only the file size at the end, but
785 not the checksum that we don't use.
786
5c5215d5 787 * kern/file.c (grub_file_read): Use void pointer for the buffer.
788 Adjust all callers.
789
27d5fef7 790 * kern/ieee1275/openfw.c: Remove libc includes.
791 * kern/ieee1275/cmain.c: Likewise.
792 * include/grub/ieee1275/ieee1275.h: Likewise.
793
33abf7ae 794 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
795 compiler warnings.
796
d2d49665 7972009-06-10 Felix Zielcke <fzielcke@z-51.de>
798
799 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
800 `genparttoollist.sh'.
801 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
802 Add `*.sh' to the list find searches for and change `mdate.sh'
803 to `mdate-sh'.
804
fe052e37 8052009-06-10 Pavel Roskin <proski@gnu.org>
806
2763ac18 807 * include/grub/multiboot2.h: Provide compatibility defines for
808 multiboot2.h.
809 * include/multiboot2.h: Include stdint.h only if needed, using
810 angle brackets.
811 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
812 grub/multiboot2.h.
813 * loader/ieee1275/multiboot2.c: Likewise.
814 * loader/multiboot2.c: Likewise.
815 * loader/multiboot_loader.c: Likewise.
816
437e6adc 817 * configure.ac: Use -nostdlib when probing for the target. It
818 should not be required to have libc for the target.
819
06a6836c 820 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
821 they fail without libc headers for the target.
822 * include/grub/powerpc/libgcc.h: Use weak attribute for all
823 exports.
824 * include/grub/sparc64/libgcc.h: Likewise. Don't use
825 preprocessor conditionals.
826
fe052e37 827 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
828 build system doesn't need to be aware of the tar.c internals.
829
afd22553 8302009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 831
afd22553 832 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 833
6b787c4f 8342009-06-09 Robert Millan <rmh.grub@aybabtu.com>
835
836 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
837 disk limit to 26 for IDE, Virtio, Xen and SCSI.
838
8392009-06-09 Felix Zielcke <fzielcke@z-51.de>
840
841 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 842 aren't available if ata.mod gets used.
6b787c4f 843
473d1e45 8442009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 845
473d1e45 846 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 847 initialising controller.
473d1e45 848 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 849
255a27d4 8502009-06-08 Felix Zielcke <fzielcke@z-51.de>
851
852 * util/i386/pc/grub-install.in: Add a parameter --disk-module
853 to choose between ata and biosdisk module on i386-pc.
854
473d1e45 8552009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 856
d55842d8 857 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
858 Subclass and Programming Interface fields in terms of the 3 byte
859 Class Code register.
860 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
861
fa5db0b1 862 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
863 interface is OHCI. Add grub_dprintf for symmetry with
864 bus/usb/uhci.c.
865 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
866 interface is UHCI. Add interf variable for programming
867 interface. Print interface with class/subclass.
868
c0947beb 869 * bus/usb/ohci.c: Set interf with correct field.
870
69da8877 871 * bus/usb/uhci.c: Remove unneeded doubled lines.
872 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
873 Remove whitespace inside comment.
874
9e172e30 8752009-06-08 Robert Millan <rmh.grub@aybabtu.com>
876
877 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
878 as fallback an equivalent option without depth.
879
de65ee2b 8802009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
881
882 Not fail if unable to retrieve C/H/S on LBA disks
883
473d1e45 884 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 885 if unable to retrieve C/H/S on LBA disks
886
b57ea2c9 8872009-06-08 Pavel Roskin <proski@gnu.org>
888
889 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
890 about aliasing.
891
af361263 8922009-06-08 Felix Zielcke <fzielcke@z-51.de>
893
894 * Makefile.in (uninstall): Remove all $lib_DATA files.
895
4c9ec6b3 8962009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
897
898 Bugfix: install on partitionless device
899
900 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
901 is a whole disk
902
e76fc924 9032009-06-08 Felix Zielcke <fzielcke@z-51.de>
904
905 * Makefile.in (uninstall): Remove all $include_DATA files.
906
ba5a0d05 9072009-06-08 Felix Zielcke <fzielcke@z-51.de>
908
909 * commands/true.c: New file. Implement the true and false commands.
910 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
911 (true_mod_SOURCES): New variable.
912 (true_mod_CFLAGS): Likewise.
913 (true_mod_LDFLAGS): Likewise.
914
c8048e32 9152009-06-05 Colin D Bennett <colin@gibibit.com>
916
917 Optimized font character lookup using binary search instead of linear
918 search. Fonts now are required to have the character index ordered by
919 code point.
920
921 * font/font.c (load_font_index): Verify that fonts have ordered
922 character indices.
923 (find_glyph): Use binary search instead of linear search to find a
924 character in a font.
925
408305be 9262009-06-05 Michael Scherer <misc@mandriva.org>
927
928 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
929 uses case sensitive btree.
930 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
931 only for case insensitive filesystems.
932
8ee1e0d9 9332009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
934
935 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
936 * conf/common.rmk (search_mod_CFLAGS): likewise
937
a9966eb1 9382009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
939
473d1e45 940 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 941 compensate a compiler bug
942
9e7100fb 9432009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
944
473d1e45 945 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 946 instead of '\b'
473d1e45 947
ede21d71 9482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
949
950 Definitions for creating asm symbols with Apple's CC
951
952 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
953 [APPLE_CC] (VARIABLE): likewise
954
9dbf7653 9552009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
956
957 Disable lnxboot.img when compiled
958 with Apple's CC
959
960 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
961 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
962 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
963 [! APPLE_CC] (CODE_LENG): skip
964 [! APPLE_CC] (setup_sects): likewise
965 [! APPLE_CC]: skip filling
473d1e45 966
e93cdc3d 9672009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
968
969 Address in trampolines based on 32-bit registers when compiled
970 with Apple's CC
971
473d1e45 972 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 973 for addresses
974 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
975
6c688477 9762009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
977
978 Avoid aliases when compiling with Apple's CC for PCBIOS machine
979
980 * kern/misc.c [APPLE_CC] (memcpy): new function
981 [APPLE_CC] (memmove): likewise
982 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 983 (memcpy): define alias conditionally on !APPLE_CC
6c688477 984 (memset): likewise
985 (abort): likewise
986 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
987 APPLE_CC are defined
988 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
989 (grub_assert_fail): make prototype conditional
990
e37ffc5c 9912009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
992
993 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
994
473d1e45 995 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
996 grub-macho2img
e37ffc5c 997 (CLEANFILES): add grub-macho2img
998 (grub_macho2img_SOURCES): new variable
999 * kern/i386/pc/startup.S (bss_start): new variable
1000 (bss_end): likewise
1001 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1002 * util/grub-macho2img.c: new file
1003
cf00df31 10042009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1005
1006 Use objconv when compiling with Apple's CC
1007
1008 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1009 (efiemu64.o): likewise
1010 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1011 when compiling with Apple's CC
1012 (efiemu64_s.o): likewise
1013 * configure.ac: check for objconv when compiling with Apple's CC
1014 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 1015
d119a20c 10162009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1017
1018 Define segment as well as section when compiling with
1019 Apple's CC
1020
1021 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1022 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1023 (efiemu_convert_pointer): likewise
1024 (efiemu_set_virtual_address_map): likewise
1025 (efiemu_convert_pointer): likewise
1026 (efiemu_getcrc32): likewise
1027 (init_crc32_table): likewise
1028 (reflect): likewise
1029 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1030 (GRUB_MOD_DEP): likewise
473d1e45 1031
c8600122 10322009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1033
1034 Allow a compilation without -mcmodel=large
1035
1036 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1037 when compiled without -mcmodel=large
473d1e45 1038 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 1039 without -mcmodel=large
473d1e45 1040 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 1041 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 1042
e8df1d4e 10432009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1044
1045 Remove nested functions in efiemu core
1046
1047 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 1048
cc6c3ac1 10492009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1050
1051 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1052
1053 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1054 temporary storage
473d1e45 1055 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1056 using Apple's CC
cc6c3ac1 1057 (grub_cpu_is_tsc_supported): likewise
1058 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 1059
3e325901 10602009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1061
1062 Absolute addressing through constant with Apple's cc
1063
1064 * kern/i386/pc/startup.S: Define necessary constants
1065 and address through it when using ABS with Apple's CC
1066 * boot/i386/pc/diskboot.S: likewise
1067 * boot/i386/pc/boot.S: likewise
1068 * boot/i386/pc/lnxboot.S: likewise
1069 * boot/i386/pc/cdboot.S: likewise
1070 * mmap/i386/pc/mmap_helper.S: likewise
1071 * commands/i386/pc/drivemap_int13h.S: likewise
1072
2b167a72 10732009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1074
1075 Check if compiler is apple cc
1076
1077 * Makefile.in (ASFLAGS): new variable
1078 (TARGET_ASFLAGS): likewise
1079 (TARGET_MODULE_FORMAT): likewise
1080 (TARGET_APPLE_CC): likewise
1081 (OBJCONV): likewise
1082 (TARGET_IMG_CFLAGS): likewise
1083 (TARGET_CPPFLAGS): add includedir
1084 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1085 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1086 Check for linker script only if compiler isn't Apple's CC
1087 (TARGET_MODULE_FORMAT): set
1088 (TARGET_APPLE_CC): likewise
1089 (TARGET_ASFLAGS): likewise
1090 (ASFLAGS): likewise
1091 Check for objcopy only if compiler isn't Apple's CC
1092 Check for BSS symbol only if compiler isn't Apple's CC
1093 * genmk.rb: adapt nm options if we use Apple's utils
1094 * aclocal.m4 (grub_apple_cc): new test
1095 (grub_apple_target_cc): likewise
473d1e45 1096
fb14123e 10972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1098
1099 Simplify sed expressions and improve awk
1100
1101 * Makefile.in (install-local): simplify sed expression
1102 * gencmdlist.sh: likewise
1103 * genmoddep.awk: avoid adding module as a dependency of itself
1104
5b889789 11052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1106
1107 Add missing start symbols
1108
1109 * boot/i386/pc/boot.S: add start
fb14123e 1110 * boot/i386/pc/pxeboot.S: likewise
473d1e45 1111
fd2bf2e3 11122009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1113
1114 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 1115
1116 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 1117 (relocate_addresses): consider both r_addend and value at offset
1118 (make_mods_section): zerofill modinfo and header
1119 (convert_elf): write prefix here
473d1e45 1120
5389763d 11212009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1122
1123 Use .asciz instead of .string
1124
1125 * i386/pc/diskboot.S: use .asciz instead of .string
1126 * i386/pc/boot.S: likewise
1127 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1128 (GRUB_MOD_NAME): likewise
473d1e45 1129
3eb5ed4e 11302009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1131
1132 gfxpayload support
1133
1134 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1135 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1136 (grub_video_setup): remove
1137 (grub_video_set_mode): new prototype
1138 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1139 (vid_mode): remove
1140 (linux_vesafb_res): compile only on PCBIOS
1141 (grub_linux_boot): support gfxpayload
1142 * loader/i386/pc/xnu.c (video_hook): new function
1143 (grub_xnu_set_video): support gfxpayload
1144 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1145 (DEFAULT_VIDEO_HEIGHT): likewise
1146 (DEFAULT_VIDEO_FLAGS): likewise
1147 (DEFAULT_VIDEO_MODE): new definition
1148 (video_hook): new function
1149 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 1150 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 1151 loading xnu
1152 * video/video.c (grub_video_setup): removed
473d1e45 1153 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 1154 grub_video_setup
1155
4b0e1143 11562009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1157
1158 Avoid calling biosdisk in drivemap
1159
1160 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1161 (revparse_biosdisk): likewise
1162 (list_mappings): derive name from id directly
1163 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 1164
fda6cb98 11652009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1166
1167 Script fixes
1168
1169 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1170 (grub_lexer_param): add tokenonhold
1171 (grub_script_create_cmdline): remove cmdline. All callers updated
1172 (grub_script_function_create): make functionname
1173 grub_script_arg. All callers updated
1174 (grub_script_execute_argument_to_string): new prototype
1175 * kern/parser.c (state_transitions): reorder
1176 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 1177 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 1178 make global
1179 (grub_script_execute_cmdline): use new format
1180 * script/sh/function.c (grub_script_function_create): make functionname
1181 grub_script_arg. All callers updated
473d1e45 1182 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 1183 (grub_script_yylex): remove
1184 (grub_script_yylex2): renamed to ...
1185 (grub_script_yylex): ...renamed
1186 parse the expressions like a${b}c
1187 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1188 (GRUB_PARSER_TOKEN_VAR): remove
1189 (GRUB_PARSER_TOKEN_NAME): likewise
1190 ("if"): declare as typeless
1191 ("while"): likewise
1192 ("function"): likewise
1193 ("else"): likewise
1194 ("then"): likewise
1195 ("fi"): likewise
1196 (text): remove
1197 (argument): likewise
1198 (script): accept empty scripts and make exit on error
1199 (arguments): use GRUB_PARSER_TOKEN_ARG
1200 (function): likewise
1201 (command): move error handling to script
1202 (menuentry): move grub_script_lexer_ref before
473d1e45 1203 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 1204 argument. All callers updated
1205
f4448a07 12062009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1207
1208 Prevent GRUB from probing floppies during boot.
1209
1210 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1211 * commands/search.c (options): Add --no-floppy.
1212 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1213 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1214 --no-floppy when searching for UUIDs.
1215
2bf5885a 12162009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1217
1218 Simplify the code duplication in commands/search.c.
1219
1220 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1221 (search_fs): ... this. Update all users.
1222
f6fd460a 12232009-06-03 Felix Zielcke <fzielcke@z-51.de>
1224
1225 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1226
cbb3c83e 12272009-05-28 Pavel Roskin <proski@gnu.org>
1228
57788cfd 1229 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1230 Remove the original symlink explicitly.
1231
cbb3c83e 1232 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1233 just one slash. That's how grub_fshelp_find_file() does it.
1234
cd0d5e30 12352009-05-26 Pavel Roskin <proski@gnu.org>
1236
f0f8bbe2 1237 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1238 to `str'.
1239
cd0d5e30 1240 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1241 possibly unused.
1242
8c2cab51 12432009-05-25 Christian Franke <franke@computer.org>
1244
1245 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1246 register.
1247 (grub_atapi_identify): Add wait after drive select.
1248 (grub_ata_identify): Do more strict status register check before
1249 calling grub_atapi_identify (). Suppress error message if status
1250 register is 0x00 after command failure. Add status register
1251 check after PIO read to avoid bogus identify due to stuck DRQ.
1252 Thanks to Pavel Roskin for testing.
1253 (grub_device_initialize): Remove unsafe status register check.
1254 Thanks to 'phcoder' for problem report and patch.
1255 Prevent sign extension in debug message.
1256
230c0ad6 12572009-05-23 Colin D Bennett <colin@gibibit.com>
1258
1259 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1260 definition file, and functions defined in `normal/menu.c' have had
1261 their prototypes moved to `include/grub/menu.h' for consistency.
1262
1263 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1264 from normal.h.
1265 (grub_menu_get_entry): Likewise.
1266 (grub_menu_get_timeout): Likewise.
1267 (grub_menu_set_timeout): Likewise.
1268 (grub_menu_execute_entry): Likewise.
1269 (grub_menu_execute_with_fallback): Likewise.
1270 (grub_menu_entry_run): Likewise.
1271
1272 * include/grub/normal.h: Re-ordered and grouped function
1273 prototypes by file that the function is defined in.
1274 (grub_menu_execute_callback): Removed; moved to menu.h.
1275 (grub_menu_get_entry): Likewise.
1276 (grub_menu_get_timeout): Likewise.
1277 (grub_menu_set_timeout): Likewise.
1278 (grub_menu_execute_entry): Likewise.
1279 (grub_menu_execute_with_fallback): Likewise.
1280 (grub_menu_entry_run): Likewise.
1281 (grub_menu_addentry): Renamed from this ...
1282 (grub_normal_add_menu_entry): ... to this.
1283
1284 * normal/main.c (grub_menu_addentry): Renamed from this ...
1285 (grub_normal_add_menu_entry): ... to this.
1286
1287 * script/sh/execute.c (grub_script_execute_menuentry): Update
1288 reference to renamed grub_menu_addentry function.
1289
861f03a5 12902009-05-23 Felix Zielcke <fzielcke@z-51.de>
1291
1292 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1293
96b1619a 12942009-05-22 Pavel Roskin <proski@gnu.org>
1295
bf6a5fb2 1296 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1297 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1298 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1299 compiling for the i386 targets, but not for the utilities.
1300
96b1619a 1301 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1302 to grub_uint8_t.
1303 (grub_root_drive): Likewise.
1304 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1305 remove alignment.
1306 (grub_root_drive): Change size to byte.
1307 (grub_start_addr): Remove.
1308 (grub_end_addr): Likewise.
1309 (grub_apm_bios_info): Likewise.
1310
b729776b 13112009-05-21 Felix Zielcke <fzielcke@z-51.de>
1312
1313 * normal/i386: Remove.
1314 * normal/powerpc: Likewise.
1315 * normal/sparc64: Likewise.
1316 * normal/x86_64: Likewise.
1317
0a15ce80 13182009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1319
1320 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 1321 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 1322 * loader/i386/xnu_helper.S: Likewise
d6da58e6 1323
33db9015 13242009-05-18 Colin D Bennett <colin@gibibit.com>
1325
d6da58e6 1326 Display error messages when parsing a Lua statement fails.
1327 Previously, executing a syntactically invalid statement like
1328 ")foo" or "bar;" would silently fail.
33db9015 1329
1330 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 1331 (grub_lua_parse_line): Improved reporting of Lua parser and
1332 execution errors.
33db9015 1333
46422c89 13342009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1335
1336 Remove -Werror which causes build to fail on some systems
1337
1338 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1339 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1340 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 1341
22f53a96 13422009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1343
1344 trampoline for linux on 64-bit platform
1345
18f547ad 1346 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1347 loader/i386/efi/linux_trampoline.S
1348 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 1349 declaration
d6da58e6 1350 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1351 here
22f53a96 1352 * loader/i386/linux_trampoline.S: moved here
d6da58e6 1353 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1354 trampoline
22f53a96 1355 (jumpvector): removed
1356 (grub_linux_trampoline_start): new declaration
1357 (grub_linux_trampoline_end): likewise
1358 (grub_linux_boot): use trampoline when on 64-bit platform
1359 * loader/i386/linux.c: likewise
1360
cb5a0f40 13612009-05-16 Pavel Roskin <proski@gnu.org>
1362
1363 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1364 const to avoid a warning.
1365 (grub_lua_setenv): Likewise.
1366 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1367 lmsg to fix a warning.
1368
334f2c28 13692009-05-16 Felix Zielcke <fzielcke@z-51.de>
1370
1371 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 1372 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1373 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1374 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1375 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1376 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1377 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1378 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 1379
59e5d3ec 13802009-05-16 Felix Zielcke <fzielcke@z-51.de>
1381
1382 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1383
9d87a1ba 13842009-05-16 Bean <bean123ch@gmail.com>
1385
1386 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1387 (lua_mod_SOURCES): New variable.
1388 (lua_mod_CFLAGS): Likewise.
1389 (lua_mod_LDFLAGS): Likewise.
1390
1391 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1392 (setjmp_mod_SOURCES): New variable.
1393 (setjmp_mod_CFLAGS): Likewise.
1394 (setjmp_LDFLAGS): Likewise.
1395
1396 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1397 (setjmp_mod_SOURCES): New variable.
1398 (setjmp_mod_CFLAGS): Likewise.
1399 (setjmp_LDFLAGS): Likewise.
1400
1401 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1402 (setjmp_mod_SOURCES): New variable.
1403 (setjmp_mod_CFLAGS): Likewise.
1404 (setjmp_LDFLAGS): Likewise.
1405
1406 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1407 (setjmp_mod_SOURCES): New variable.
1408 (setjmp_mod_CFLAGS): Likewise.
1409 (setjmp_LDFLAGS): Likewise.
1410
1411 * normal/i386/setjmp.S: Moved from here ...
1412 * lib/i386/setjmp.S: ... Moved here
1413 * normal/x86_64/setjmp.S: Moved from here ...
1414 * lib/x86_64/setjmp.S: ... Moved here
1415 * normal/powerpc/setjmp.S: Moved from here ...
1416 * lib/powerpc/setjmp.S: ... Moved here
1417 * normal/sparc64/setjmp.S: Moved from here ...
1418 * lib/sparc64/setjmp.S: ... Moved here
1419
1420 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1421 returns_twice in mingw.
1422
1423 * script/lua/grub_lib.c: New file.
1424 * script/lua/grub_lib.h: Likewise.
1425 * script/lua/grub_lua.h: Likewise.
1426 * script/lua/grub_main.c: Likewise.
1427 * script/lua/lapi.c: Likewise.
1428 * script/lua/lapi.h: Likewise.
1429 * script/lua/lauxlib.c: Likewise.
1430 * script/lua/lauxlib.h: Likewise.
1431 * script/lua/lbaselib.c: Likewise.
1432 * script/lua/lcode.c: Likewise.
1433 * script/lua/lcode.h: Likewise.
1434 * script/lua/ldblib.c: Likewise.
1435 * script/lua/ldebug.c: Likewise.
1436 * script/lua/ldebug.h: Likewise.
1437 * script/lua/ldo.c: Likewise.
1438 * script/lua/ldo.h: Likewise.
1439 * script/lua/ldump.c: Likewise.
1440 * script/lua/lfunc.c: Likewise.
1441 * script/lua/lfunc.h: Likewise.
1442 * script/lua/lgc.c: Likewise.
1443 * script/lua/lgc.h: Likewise.
1444 * script/lua/linit.c: Likewise.
1445 * script/lua/liolib.c: Likewise.
1446 * script/lua/llex.c: Likewise.
1447 * script/lua/llex.h: Likewise.
1448 * script/lua/llimits.h: Likewise.
1449 * script/lua/lmathlib.c: Likewise.
1450 * script/lua/lmem.c: Likewise.
1451 * script/lua/lmem.h: Likewise.
1452 * script/lua/loadlib.c: Likewise.
1453 * script/lua/lobject.c: Likewise.
1454 * script/lua/lobject.h: Likewise.
1455 * script/lua/lopcodes.c: Likewise.
1456 * script/lua/lopcodes.h: Likewise.
1457 * script/lua/loslib.c: Likewise.
1458 * script/lua/lparser.c: Likewise.
1459 * script/lua/lparser.h: Likewise.
1460 * script/lua/lstate.c: Likewise.
1461 * script/lua/lstate.h: Likewise.
1462 * script/lua/lstring.c: Likewise.
1463 * script/lua/lstring.h: Likewise.
1464 * script/lua/lstrlib.c: Likewise.
1465 * script/lua/ltable.c: Likewise.
1466 * script/lua/ltable.h: Likewise.
1467 * script/lua/ltablib.c: Likewise.
1468 * script/lua/ltm.c: Likewise.
1469 * script/lua/ltm.h: Likewise.
1470 * script/lua/lua.h: Likewise.
1471 * script/lua/luaconf.h: Likewise.
1472 * script/lua/lualib.h: Likewise.
1473 * script/lua/lundump.c: Likewise.
1474 * script/lua/lundump.h: Likewise.
1475 * script/lua/lvm.c: Likewise.
1476 * script/lua/lvm.h: Likewise.
1477 * script/lua/lzio.c: Likewise.
1478 * script/lua/lzio.h: Likewise.
1479
5e898c9d 14802009-05-16 Bean <bean123ch@gmail.com>
1481
1482 * include/grub/kernel.h (grub_module_header_types): Add type
1483 OBJ_TYPE_CONFIG.
1484
1485 * kern/main.c (grub_load_config): New function.
1486 (grub_main): Call grub_load_config to read boot config.
1487
1488 * grub-mkimage (generate_image): New parameter config_path.
1489 (options): New option --config.
1490 (main): Parse --config option, and pass it to generate_image.
1491
cf353a47 14922009-05-14 Christian Franke <franke@computer.org>
1493
1494 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1495 This fixes build on Cygwin.
1496
3834887f 14972009-05-14 Pavel Roskin <proski@gnu.org>
1498
1499 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1500 jump. This saves two bytes, so the typical case of 2 swapped
1501 drives would fit 32 bytes.
1502
8090fc01 15032009-05-13 Pavel Roskin <proski@gnu.org>
1504
ac963883 1505 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1506 grub_uint32_t to avoid a warning.
1507
8090fc01 1508 * loader/i386/linux.c (allocate_pages): When assigning
1509 real_mode_mem, cast through grub_size_t to fix a warning. The
1510 code already makes sure that the value would fit a pointer.
1511 (grub_linux_setup_video): Cast render_target->data to
1512 grub_size_t to fix a warning.
1513
18f547ad 15142009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 1515
1516 * commands/i386/pc/drivemap.c: New file - implement drivemap
1517 command.
1518 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1519 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1520
6f6a8b28 15212009-05-13 Pavel Roskin <proski@gnu.org>
1522
1523 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1524 embedding_area_exists.
1525
15fbf4c4 15262009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1527
1528 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1529 it easier to understand / work with.
59978c8a 1530 Improve warning messages for cases where there's no embedding area,
1531 or when it is too small (or core.img too large).
15fbf4c4 1532
238e871f 15332009-05-13 Pavel Roskin <proski@gnu.org>
1534
0ab3a9a4 1535 * loader/i386/pc/multiboot2.c: Add necessary includes for
1536 grub_multiboot2_real_boot().
1537
a2c8c5f8 1538 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1539 PX record is always little-endian. We only need the lower 2
1540 bytes of the mode.
1541
faec96af 1542 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1543 facilitate code reuse.
1544 (grub_cpio_mount): Use "struct head", not a char buffer. This
1545 fixes a warning reported by gcc 4.4.
1546
238e871f 1547 * kernel/disk.c (grub_disk_read): Use void pointer for the
1548 buffer.
1549 (grub_disk_write): Use const void pointer for the buffer.
1550 Adjust all callers. Remove unnecessary casts.
1551
901d2f0c 15522009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1553
1554 * util/i386/pc/grub-install.in: Update copyright year.
1555
18f547ad 15562009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 1557
1558 gptsync
1559
1560 * commands/gptsync.c: new file
1561 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1562 (gptsync_mod_SOURCES): new variable
1563 (gptsync_mod_CFLAGS): likewise
1564 (gptsync_mod_LDFLAGS): likewise
18f547ad 1565 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 1566 new definition
1567 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1568 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1569 * conf/i386-ieee1275.rmk: likewise
1570 * conf/i386-pc.rmk: likewise
1571 * conf/powerpc-ieee1275.rmk: likewise
1572
b4ba690a 15732009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1574
1575 Fixed grub-emu
1576
1577 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1578 (grub_dl_ref): likewise
1579
317e1a44 15802009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1581
1582 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1583 split in two functions (one for msdos and one for gpt).
1584
041b8094 15852009-05-08 Pavel Roskin <proski@gnu.org>
1586
752473c2 1587 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1588 not modified.
1589
041b8094 1590 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1591 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1592 Initialize them with -1. Add sanity check for bad1. Eliminate
1593 nerr variable.
1594
172800ce 15952009-05-08 David S. Miller <davem@davemloft.net>
1596
1597 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1598
29aa5e81 15992009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1600
1601 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 1602 existence.
29aa5e81 1603
96613b62 16042009-05-05 Felix Zielcke <fzielcke@z-51.de>
1605
1606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 1607 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 1608
eef73c8a 16092009-05-05 David S. Miller <davem@davemloft.net>
1610
1611 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1612
119494b5 16132009-05-05 Pavel Roskin <proski@gnu.org>
1614
1615 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1616 of grub_dl_ref() and grub_dl_unref().
1617 * commands/parttool.c: Remove preprocessor conditionals around
1618 grub_dl_ref() and grub_dl_unref().
1619 * fs/affs.c: Likewise.
1620 * fs/afs.c: Likewise.
1621 * fs/cpio.c: Likewise.
1622 * fs/ext2.c: Likewise.
1623 * fs/fat.c: Likewise.
1624 * fs/hfs.c: Likewise.
1625 * fs/hfsplus.c: Likewise.
1626 * fs/iso9660.c: Likewise.
1627 * fs/jfs.c: Likewise.
1628 * fs/minix.c: Likewise.
1629 * fs/ntfs.c: Likewise.
1630 * fs/reiserfs.c: Likewise.
1631 * fs/sfs.c: Likewise.
1632 * fs/udf.c: Likewise.
1633 * fs/ufs.c: Likewise.
1634 * fs/xfs.c: Likewise.
1635 * include/grub/dl.h: Likewise.
1636 * loader/xnu.c: Likewise.
1637
de5fd76e 16382009-05-04 Pavel Roskin <proski@gnu.org>
1639
1640 * commands/acpi.c: Remove unused variable my_mod.
1641 * partmap/amiga.c: Likewise.
1642 * partmap/apple.c: Likewise.
1643 * partmap/gpt.c: Likewise.
1644 * partmap/pc.c: Likewise.
1645 * partmap/sun.c: Likewise.
1646 * term/gfxterm.c: Likewise.
1647 * term/i386/pc/vesafb.c: Likewise.
1648 * term/i386/pc/vga.c: Likewise.
1649
983598ad 16502009-05-04 David S. Miller <davem@davemloft.net>
1651
1652 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1653 pointer args to grub_ieee1275_get_property().
1654
8aadec43 1655 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1656
9554b15e 1657 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1658 devices, and do not traverse down under controller nodes.
1659
67e23c90 1660 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1661 (grub_ofdisk_open): Use it to un-escape "," characters.
1662 * kern/disk.c (find_part_sep): New.
1663 (grub_disk_open): Use it to find the first non-escaped ','
1664 character in the disk name.
1665 * util/ieee1275/devicemap.c (escape_of_path): New.
1666 (grub_util_emit_devicemap_entry): Use it.
1667 * util/sparc64/ieee1275/grub-install.in: Update script to
1668 strip partition specifiers properly by not triggering on
1669 '\' escaped ',' characters.
1670
74bfdd2f 16712009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1672
1673 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1674 to 0x300.
1675 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1676 resolutions.
1677 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1678 on documentation from Wikipedia).
1679
4241d2b1 16802009-05-04 Pavel Roskin <proski@gnu.org>
1681
1682 * disk/ata.c: Spelling fixes.
1683 * disk/raid.c: Likewise.
1684 * disk/usbms.c: Likewise.
1685 * disk/dmraid_nvidia.c: Likewise.
1686 * kern/ieee1275/openfw.c: Likewise.
1687 * kern/ieee1275/init.c: Likewise.
1688 * kern/ieee1275/cmain.c: Likewise.
1689 * boot/i386/pc/cdboot.S: Likewise.
1690 * video/readers/png.c: Likewise.
1691 * video/i386/pc/vbe.c: Likewise.
1692 * fs/udf.c: Likewise.
1693 * fs/hfs.c: Likewise.
1694 * fs/reiserfs.c: Likewise.
1695 * efiemu/runtime/efiemu.c: Likewise.
1696 * efiemu/main.c: Likewise.
1697 * efiemu/mm.c: Likewise.
1698 * include/grub/elf.h: Likewise.
1699 * include/grub/xnu.h: Likewise.
1700 * include/grub/usbdesc.h: Likewise.
1701 * include/grub/usb.h: Likewise.
1702 * include/grub/script_sh.h: Likewise.
1703 * include/grub/lib/LzmaEnc.h: Likewise.
1704 * include/grub/efiemu/efiemu.h: Likewise.
1705 * include/grub/command.h: Likewise.
1706 * normal/menu.c: Likewise.
1707 * normal/main.c: Likewise.
1708 * normal/datetime.c: Likewise.
1709 * bus/usb/uhci.c: Likewise.
1710 * mmap/i386/uppermem.c: Likewise.
1711 * mmap/mmap.c: Likewise.
1712 * commands/acpi.c: Likewise.
1713 * commands/test.c: Likewise.
1714 * partmap/apple.c: Likewise.
1715 * font/font.c: Likewise.
1716 * loader/sparc64/ieee1275/linux.c: Likewise.
1717 * loader/macho.c: Likewise.
1718 * loader/i386/bsd_trampoline.S: Likewise.
1719 * loader/i386/bsd.c: Likewise.
1720 * loader/xnu.c: Likewise.
1721 * term/i386/pc/vesafb.c: Likewise.
1722 * term/usb_keyboard.c: Likewise.
1723 * util/resolve.c: Likewise.
1724 * util/getroot.c: Likewise.
1725
0cfc0083 17262009-05-04 Felix Zielcke <fzielcke@z-51.de>
1727
1728 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1729
7c1d00cd 17302009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1731
1732 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1733 build error.
1734
b01f0548 17352009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1736
1737 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1738 parameter only available on BIOS.
1739
ecc3eb22 17402009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1741
1742 Removed wrong semicolon in declaration
1743
1744 * grub/misc.h (grub_dprintf): remove semicolon
1745
112972a9 17462009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1747
1748 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1749 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1750 is done by grub_cmd_linux() now).
1751 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1752 restore video to text mode.
1753 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1754 indicates lack of "vga=" parameter. "vga=0" is mapped to
1755 `GRUB_LINUX_VID_MODE_NORMAL'.
1756
afd5c115 17572009-05-04 Felix Zielcke <fzielcke@z-51.de>
1758
1759 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1760 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1761 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 1762 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 1763 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1764 `grub_script.tab.c'.
1765
1766 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1767 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1769 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1770 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1771
faa517ce 1772 * Makefile.in: Remove duplicated 2008 in Copyright line.
1773
ae0c0bdc 17742009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1775
473d1e45 1776 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 1777 unconditionally.
1778 * include/grub/util/misc.h (grub_util_warn): New declaration.
1779
1780 * util/i386/pc/grub-install.in: Understand --force and pass it down
1781 to grub-setup.
1782
1783 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1784 down to setup().
1785 (setup): Improve error messages and add warnings when requested to
1786 install in odd layouts. Refuse to install using blocklists unless
1787 --force was set.
1788
18f547ad 17892009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 1790
1791 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1792
6d260daa 17932009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1794
1795 Updated copyright year
1796
1797 * fs/hfsplus.c: updated copyright year
18f547ad 1798
69f853f8 17992009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1800
1801 HFS+ UUID
1802
18f547ad 1803 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 1804 in the space previously used by unused3
1805 (grub_hfsplus_uuid): new function
1806 (grub_hfsplus_fs): added uuid field
1807
4c402e73 18082009-05-03 Pavel Roskin <proski@gnu.org>
1809
1810 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1811 suppress warnings. It's no longer needed.
1812 * disk/host.c: Likewise.
1813 * disk/ata_pthru.c: Likewise.
1814 * disk/loopback.c: Likewise.
1815 * hook/datehook.c: Likewise.
1816 * parttool/pcpart.c: Likewise.
1817 * fs/i386/pc/pxe.c: Likewise.
1818 * fs/ntfscomp.c: Likewise.
1819 * efiemu/main.c: Likewise.
1820 * mmap/mmap.c: Likewise.
1821 * commands/crc.c: Likewise.
1822 * commands/hexdump.c: Likewise.
1823 * commands/hdparm.c: Likewise.
1824 * commands/acpi.c: Likewise.
1825 * commands/echo.c: Likewise.
1826 * commands/minicmd.c: Likewise.
1827 * commands/blocklist.c: Likewise.
1828 * commands/memrw.c: Likewise.
1829 * commands/loadenv.c: Likewise.
1830 * commands/usbtest.c: Likewise.
1831 * commands/lsmmap.c: Likewise.
1832 * commands/boot.c: Likewise.
1833 * commands/parttool.c: Likewise.
1834 * commands/configfile.c: Likewise.
1835 * commands/search.c: Likewise.
1836 * commands/ieee1275/suspend.c: Likewise.
1837 * commands/cat.c: Likewise.
1838 * commands/i386/pc/pxecmd.c: Likewise.
1839 * commands/i386/pc/play.c: Likewise.
1840 * commands/i386/pc/halt.c: Likewise.
1841 * commands/i386/pc/vbeinfo.c: Likewise.
1842 * commands/i386/pc/vbetest.c: Likewise.
1843 * commands/lspci.c: Likewise.
1844 * commands/date.c: Likewise.
1845 * commands/handler.c: Likewise.
1846 * commands/ls.c: Likewise.
1847 * commands/test.c: Likewise.
1848 * commands/cmp.c: Likewise.
1849 * commands/efi/loadbios.c: Likewise.
1850 * commands/efi/fixvideo.c: Likewise.
1851 * commands/halt.c: Likewise.
1852 * commands/help.c: Likewise.
1853 * commands/reboot.c: Likewise.
1854 * hello/hello.c: Likewise.
1855 * script/sh/main.c: Likewise.
1856 * loader/xnu.c: Likewise.
1857 * term/terminfo.c: Likewise.
1858 * term/i386/pc/serial.c: Likewise.
1859 * term/usb_keyboard.c: Likewise.
1860
515b5079 18612009-05-03 David S. Miller <davem@davemloft.net>
1862
1863 * normal/menu.c: Include grub/parser.h
1864
dfc31a22 18652009-05-03 Pavel Roskin <proski@gnu.org>
1866
2fee74f1 1867 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1868 not char*.
1869 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1870 Suggested by Javier Martín <lordhabbit@gmail.com>
1871
dfc31a22 1872 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1873 efiemu??.o doesn't exist.
1874 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1875 copying.
1876
18f547ad 18772009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1878
1879 FreeBSD 64-bit support
1880
18f547ad 1881 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1882 and loader/i386/bsd_trampoline.S
1883 (bsd_mod_ASFLAGS): new variable
1884 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1885 (FREEBSD_MODTYPE_KERNEL64): likewise
1886 (grub_bsd64_trampoline_start): likewise
1887 (grub_bsd64_trampoline_end): likewise
1888 (grub_bsd64_trampoline_selfjump): likewise
1889 (grub_bsd64_trampoline_gdt): likewise
1890 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1891 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1892 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1893 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1894 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1895 of "attrib" member
1896 * loader/i386/bsd_pagetable.c: new file
1897 * loader/i386/bsd_trampoline.S: likewise
1898 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1899 (ALIGN_VAR): likewise
1900 (entry_hi): new variable
1901 (kern_end_mdofs): likewise
1902 (is_64bit): likewise
1903 (grub_freebsd_add_meta): use ALIGN_VAR
1904 (grub_e820_mmap): new declaration
1905 (grub_freebsd_add_mmap): new function
1906 (grub_freebsd_add_meta_module): support 64 bit kernels
1907 (grub_freebsd_list_modules): use ALIGN_VAR
1908 (gdt_descriptor): new declaration
1909 (grub_freebsd_boot): support 64 bit kernels
1910 (grub_bsd_elf64_hook): new function
1911 (grub_bsd_load_elf): support elf64
1912
038c5720 19132009-05-03 Bean <bean123ch@gmail.com>
1914
1915 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1916 after we get the result of if statement.
1917
fc45fb58 19182009-05-03 Bean <bean123ch@gmail.com>
1919
1920 * Makefile.in (enable_efiemu): New variable.
1921
1922 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1923 set.
1924 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1925 path.
1926 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1927 path, add -mno-red-zone option.
1928 (efiemu64_s.o): Likewise.
1929 (efiemu64.o): Use macro $^ for source file.
1930
1931 * configure.ac (--enable-efiemu): New option.
1932
bbee0f2b 19332009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1934
1935 xnu support
1936
1937 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1938 (pkglib_MODULES): add xnu.mod
1939 (xnu_mod_SOURCES): new variable
1940 (xnu_mod_CFLAGS): likewise
1941 (xnu_mod_LDFLAGS): likewise
1942 (xnu_mod_ASFLAGS): likewise
1943 * conf/i386-pc.rmk: likewise
1944 * conf/x86_64-efi.rmk: likewise
7dd4a573 1945 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1946 new declaration
1947 * include/grub/i386/macho.h: new file
1948 * include/grub/i386/xnu.h: likewise
1949 * include/grub/macho.h: likewise
1950 * include/grub/machoload.h: likewise
1951 * include/grub/x86_64/macho.h: likewise
1952 * include/grub/x86_64/xnu.h: likewise
1953 * include/grub/xnu.h: likewise
1954 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1955 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1956 * loader/i386/efi/xnu.c: new file
1957 * loader/i386/pc/xnu.c: likewise
1958 * loader/i386/xnu.c: likewise
1959 * loader/i386/xnu_helper.S: likewise
1960 * loader/macho.c: likewise
1961 * loader/xnu.c: likewise
1962 * loader/xnu_resume.c: likewise
1963 * util/grub-dumpdevtree: likewise
1964 * include/grub/i386/pit.h: include grub/err.h
1965 (grub_pit_wait): export
1966 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1967
5caf964d 19682009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1969
1970 Efiemu
7dd4a573 1971
5caf964d 1972 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1973 _linux_efi, linux_efi.
1974 new files in grub-emu
5caf964d 1975 new targets efiemu32.o and efiemu64.o
1976 * loader/linux_normal_efiemu.c: likewise
1977 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1978 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1979 files to copy
1980 * include/grub/autoefi.h: new file
7dd4a573 1981 * include/grub/i386/efiemu.h: likewise
5caf964d 1982 * include/grub/i386/pc/efiemu.h: likewise
1983 * include/grub/efi/api.h: add LL suffix when necessary
1984 new definitions relating to tables
1985 * include/grub/efiemu/efiemu.h: new file
1986 * include/grub/efiemu/runtime.h: likewise
1987 * efiemu/prepare.c: likewise
1988 * efiemu/loadcore_common.c: likewise
1989 * efiemu/loadcore64.c: likewise
1990 * efiemu/runtime/efiemu.sh: likewise
1991 * efiemu/runtime/efiemu.S: likewise
1992 * efiemu/runtime/efiemu.c: likewise
1993 * efiemu/runtime/config.h: likewise
1994 * efiemu/prepare32.c: likewise
1995 * efiemu/main.c: likewise
1996 * efiemu/modules/pnvram.c: likewise
1997 * efiemu/modules/i386: likewise
1998 * efiemu/modules/i386/pc: likewise
1999 * efiemu/modules/acpi.c: likewise
2000 * efiemu/i386/pc/cfgtables.c: likewise
2001 * efiemu/i386/loadcore64.c: likewise
2002 * efiemu/i386/loadcore32.c: likewise
2003 * efiemu/prepare64.c: likewise
2004 * efiemu/loadcore.c: likewise
2005 * efiemu/symbols.c: likewise
2006 * efiemu/mm.c: likewise
2007 * efiemu/loadcore32.c: likewise
7dd4a573 2008
20092009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 2010
2011 ACPI spoofing
2012
2013 * commands/acpi.c: new file
2014 * commands/i386/pc/acpi.c: likewise
2015 * commands/efi/acpi.c: likewise
2016 * include/grub/acpi.h: likewise
2017 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2018 (acpi_mod_SOURCES): new variable
2019 (acpi_mod_CFLAGS): likewise
2020 (acpi_mod_LDFLAGS): likewise
2021 * conf/i386-efi.rmk: likewise
2022 * conf/x86_64-efi.rmk: likewise
2023
7dd4a573 20242009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 2025
2026 Missing part from mmap patch
2027
2028 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2029 (grub_mmap_unregister)
2030 (grub_mmap_free_and_unregister): use grub_mmap_register
2031
7dd4a573 20322009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 2033
2034 Mmap services
2035
2036 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2037 * loader/i386/linux.c (find_mmap_size): likewise
2038 (allocate_pages): likewise
2039 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2040 (grub_fill_multiboot_mmap): likewise
2041 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2042 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2043 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2044 (OPENBSD_MMAP_RESERVED): likewise
2045 * include/grub/i386/pc/memory.h: include grub/memory.h
2046 (grub_lower_mem): removed
2047 (grub_upper_mem): likewise
2048 (GRUB_MACHINE_MEMORY_ACPI): new definition
2049 (GRUB_MACHINE_MEMORY_NVS): likewise
2050 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2051 (GRUB_MACHINE_MEMORY_HOLE): likewise
2052 (grub_machine_mmap_register): likewise
2053 (grub_machine_mmap_unregister): likewise
2054 (grub_machine_get_upper): likewise
2055 (grub_machine_get_lower): likewise
2056 (grub_machine_get_post64): likewise
2057 * include/grub/i386/efi/memory.h: new file
2058 * include/grub/x86_64/efi/memory.h: likewise
2059 * include/grub/efi/memory.h: likewise
2060 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2061 (mmap_mod_SOURCES): new variable
2062 (mmap_mod_LDFLAGS): likewise
2063 (mmap_mod_ASFLAGS): likewise
2064 * conf/i386-coreboot.rmk: likewise
2065 * conf/i386-ieee1275.rmk: likewise
2066 * conf/i386-efi.rmk: likewise
2067 * conf/x86_64-efi.rmk: likewise
2068 * include/grub/types.h (UINT_TO_PTR): new macro
2069 (PTR_TO_UINT32): likewise
2070 (PTR_TO_UINT64): likewise
2071 * include/grub/memory.h: new file
2072 * mmap/i386/pc/mmap.c: likewise
2073 * mmap/i386/pc/mmap_helper.S: likewise
2074 * mmap/i386/uppermem.c: likewise
2075 * mmap/mmap.c: likewise
2076 * mmap/efi/mmap.c: likewise
7dd4a573 2077 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 2078 grub_upper_mem
2079 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2080 (grub_upper_mem): likewise
2081 (grub_machine_init): don't use grub_upper_mem,
2082 make grub_lower_mem local
2083 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2084 grub_mmap_iterate and grub_mmap_get_upper
2085 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2086
d558e6b5 20872009-05-02 Bean <bean123ch@gmail.com>
2088
2089 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2090 script/sh/parser.y.
2091 (pkglib_MODULES): Add normal.mod and sh.mod.
2092 (normal_SOURCES): New variable.
2093 (normal_mod_CFLAGS): Likewise.
2094 (normal_mod_LDFLAGS): Likewise.
2095 (sh_mod_SOURCES): Likewise.
2096 (sh_mod_CFLAGS): Likewise.
2097 (sh_mod_LDFLAGS): Likewise.
2098
2099 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2100 script/sh/lexer.c_DEPENDENCIES.
2101 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2102 kern/rescue_reader.c and kern/rescue_parser.c.
2103 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2104 (grub_emu_SOURCES): Change source files.
2105 (pkglib_MODULES): Remove normal.mod.
2106 (normal_SOURCES): Removed.
2107 (normal_mod_CFLAGS): Likewise.
2108 (normal_mod_LDFLAGS): Likewise.
2109 * conf/i386-coreboot.rmk: Likewise.
2110 * conf/i386-efi.rmk: Likewise.
2111 * conf/i386-ieee1276.rmk: Likewise.
2112 * conf/powerpc-ieee1275.rmk: Likewise.
2113 * conf/sparc64-ieee1275.rmk: Likewise.
2114 * conf/x86_64-efi.rmk: Likewise.
2115
2116 * include/grub/command.h (grub_command_execute): New inline function.
2117
2118 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2119
2120 * include/grub/normal.h: Remove <grub/setjmp.h>.
2121 (grub_fs_module_list): Moved to normal/autofs.c.
2122 (grub_exit_env): Removed.
2123 (grub_command_execute): Likewise.
2124 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2125 parameter script.
2126 (read_command_list): New function declaration.
2127 (read_fs_list): Likewise.
2128
2129 * include/parser.h: Include <grub/reader.h>.
2130 (grub_parser_split_cmdline): Change type of getline parameter.
2131 (grub_parser): New structure.
2132 (grub_parser_class): New variable.
2133 (grub_parser_execute): New function declaration.
2134 (grub_register_rescue_parser): Likewise.
2135 (grub_parser_register): New inline function.
2136 (grub_parser_unregister): Likewise.
2137 (grub_parser_get_current): Likewise.
2138 (grub_parser_set_current): Likewise.
2139
2140 * include/grub/reader.h: New file.
2141 * kern/reader.c: Likewise.
2142 * kern/rescue_parser.c: Likewise.
2143 * kern/rescue_reader.c: Likewise.
2144 * normal/autofs.c: Likewise.
2145 * normal/dyncmd.c: Likewise.
2146
2147 * include/grub/rescue.h: Removed.
2148 * normal/command.h: Likewise.
2149
2150 * include/grub/script.h: Moved to ...
2151 * include/grub/script_sh.h: ... Moved here.
2152 * normal/execute.c: Moved to ...
2153 * script/sh/execute.c: ... Moved here.
2154 * normal/function.c: Moved to ...
2155 * script/sh/function.c: ... Moved here.
2156 * normal/lexer.c: Moved to ...
2157 * script/sh/lexer.c: ... Moved here.
2158 * normal/parser.y: Moved to ...
2159 * script/sh/parser.y: ... Moved here.
2160 * normal/script.c: Moved to ...
2161 * script/sh/script.c: ... Moved here.
2162
2163 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2164 <grub/reader.h>.
2165 (grub_exit_env): Removed.
2166 (fs_module_list): Moved to normal/autofs.c.
2167 (grub_file_getline): Don't handle comment here.
2168 (free_menu): Skip removed field entry->commands.
2169 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2170 script parameter.
2171 (read_config_file): Removed nested parameter, change getline function.
2172 (grub_enter_normal_mode): Removed.
2173 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2174 (read_command_list): Likewise.
2175 (autoload_fs_module): Moved to normal/autofs.c.
2176 (read_fs_list): Likewise.
2177 (reader_nested): New variable.
2178 (grub_normal_execute): Run parser.sh to switch to sh parser.
2179 (grub_cmd_rescue): Removed.
2180 (cmd_normal): Removed.
2181 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2182 rescue command.
2183 (grub_cmdline_run): New function.
2184 (grub_normal_reader_init): Likewise.
2185 (grub_normal_read_line): Likewise.
2186 (grub_env_write_pager): Likewise.
2187 (cmdline): New variable.
2188 (grub_normal_reader): Likewise.
2189 (GRUB_MOD_INIT): Register normal reader and set as current, register
2190 pager hook, register normal command with grub_register_command_prio,
2191 so that it won't show up in command.lst.
2192 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2193 grub_fs_autoload_hook.
2194
2195 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2196 (grub_menu_execute_entry): Replace grub_script_execute with
2197 grub_parser_execute, change parameter to grub_command_execute.
2198
2199 * normal/menu_text.c: Remove <grub/script.h>.
2200
2201 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2202 and <grub/parser.h>.
2203 (run): Change editor_getline to use new parser interface. Change
2204 parameter to grub_command_execute.
2205
2206 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2207 <grub/reader.h> and <grub/parser.h>.
2208 (grub_load_normal_mode): Execute normal command.
2209 (grub_main): Call grub_register_core_commands,
2210 grub_register_rescue_parser and grub_register_rescue_reader, use
2211 grub_reader_loop to enter input loop.
2212
7dd4a573 2213 * kern/parser.c (grub_parser_split_cmdline): Change type of
2214 getline parameter.
d558e6b5 2215 (grub_parser_class): New variable.
2216 (grub_parser_execute): New function.
2217
2218 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2219 * loader/multiboot2.c: Likewise.
2220 * loader/sparc64/ieee1275/linux.c: Likewise.
2221
2222 * util/grub-emu.c (read_command_list): New dummy function.
2223
18db813d 22242009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2225
2226 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2227 count to 16 for CCISS and IDA.
2228
6c67de15 22292009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2230
2231 * normal/menu_text.c (grub_wait_after_message): Print a newline
2232 after waiting for user input.
2233
2234 * loader/i386/linux.c: Include `<grub/normal.h>'.
2235 (grub_cmd_linux): Improve the error message about `ask' mode, by
2236 waiting for user input so it's not missed (we can do this, since
2237 user requested interaction).
2238
d9dc87b0 22392009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2240
2241 Added missing lst to grub-mkrescue
2242
2243 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2244 and ${input_dir}/parttool.lst
2245
ac8a2baa 22462009-04-30 David S. Miller <davem@davemloft.net>
2247
ad22a610 2248 * util/hostdisk.c (device_is_wholedisk): New function.
2249 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2250 zero only if device_is_wholedisk() returns true.
2251
6966215d 2252 * util/hostdisk.c (convert_system_partition_to_system_disk):
2253 Handle virtual disk devices named /dev/vdiskX as found on sparc
2254 and powerpc.
2255
ac8a2baa 2256 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2257 lettered partition specifier is found, convert to numbered.
2258
979b4fb4 22592009-04-29 David S. Miller <davem@davemloft.net>
2260
e2bf39b2 2261 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2262 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2263
3c64e104 2264 * normal/command.c: Add missing newline at end of file.
2265
979b4fb4 2266 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2267 warnings.
2268 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2269 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2270 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2271 ihandles have a 32-bit type but need to be stored in a "void *".
2272
136d9f82 22732009-04-28 Pavel Roskin <proski@gnu.org>
2274
9459c306 2275 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2276 not disk. Adjust all dependencies.
2e08a26a 2277 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 2278 grub_disk_close().
2279
136d9f82 2280 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2281 parent's partition, don't copy it by reference, as it gets freed
2282 on close.
2283
7dd4a573 22842009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 2285
2286 Preboot hooks support
2287
2288 * commands/boot.c (struct grub_preboot_t): new declaration
2289 (preboots_head): new variable
2290 (preboots_tail): likewise
2291 (grub_loader_register_preboot_hook): new function
2292 (grub_loader_unregister_preboot_hook): likewise
2293 (grub_loader_set): launch preboot hooks
2294 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2295 (grub_loader_register_preboot_hook): new declaration
2296 (grub_loader_unregister_preboot_hook): likewise
2297
5af922b5 22982009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2299
2300 Warning fix
2301
7dd4a573 2302 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 2303 calling grub_dprintf
2304
a5562c30 23052009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2306
2307 Bug and warning fixes
2308
7dd4a573 2309 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 2310 declaration
2311 * commands/test.c (test_parse): fixed bug with file tests and corrected
2312 declaration of find_file
2313
4006f85c 23142009-04-26 Pavel Roskin <proski@gnu.org>
2315
2316 * Makefile.in: Don't install empty manual pages if help2man is
2317 missing. Use help2man option for output, not shell redirection.
2318
5c77c3de 23192009-04-26 David S. Miller <davem@davemloft.net>
2320
2321 * util/grub-mkdevicemap.c (make_device_map): Add missing
2322 NESTED_FUNC_ATTR to process_device().
2323
033b10a8 23242009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2325
2326 Test command
2327
2328 * commands/test.c: rewritten to use bash-like test
2329
e4343593 23302009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2331
2332 Parttool autoloading and improvements
2333
7dd4a573 2334 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 2335 (parttool.lst): new target
2336 * genmk.rb: generate parttool-*
2337 (CLEANFILES): add #{parttool}
2338 (PARTTOOLFILES): new variable
2339 * genparttoollist.sh: new file
7dd4a573 2340 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 2341 (grub_pcpart_type): likewise
2342 * commands/parttool.c (helpmsg): new variable
2343 (grub_cmd_parttool): output help if not enough arguments are supplied
2344 autoload modules
2345 (GRUB_MOD_INIT(parttool)): use helpmsg
2346
0d312500 23472009-04-24 David S. Miller <davem@davemloft.net>
2348
7dd4a573 2349 Avoiding opening same device multiple times in device iterator.
0d312500 2350
2351 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 2352 and use it to build a list of partitions in iterate_disk() and
0d312500 2353 iterate_partition().
2354
ac20caff 2355 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2356 on disk->data.
2357
0dcf7495 2358 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2359 grub_devalias_iterate() result instead of unconditional 0.
2360 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2361 Also, capture hook return value, either directly or via
2362 grub_children_iterate(), and propagate to caller.
2363 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2364 grub_children_iterate): Return value is now 'int' instead of
2365 'grub_err_t'.
2366 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2367 like a proper iterator, stopping when hooks return non-zero.
2368 (grub_devalias_iterate): Likewise.
2369
c8c08833 23702009-04-23 David S. Miller <davem@davemloft.net>
2371
2372 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2373
f01005a8 23742009-04-22 David S. Miller <davem@davemloft.net>
2375
2376 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2377 is larger than address_cells, use that value for address_cells too.
2378
4e8269da 2379 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2380 IEEE1275_MAX_PATH_LEN): Define.
2381 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2382 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2383 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2384 'devtype'. Explicitly NULL terminate devalias expansion.
2385
a1447506 2386 * util/sparc64/ieee1275/misc.c: New file.
2387 * util/sparc64/ieee1275/grub-setup.c: New file.
2388 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2389 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2390 * util/sparc64/ieee1275/grub-install.in: New file.
2391 * util/ieee1275/ofpath.c: New file.
2392 * util/ieee1275/devicemap.c: New file.
2393 * util/devicemap.c: New file.
2394 * util/deviceiter.c: New file.
2395 * kern/sparc64/ieee1275/init.c: New file.
2396 * include/grub/util/ofpath.h: New file.
2397 * include/grub/util/deviceiter.h: New file.
2398 * util/grub-mkdevicemap.c: Include deviceiter.h.
2399 Implement using grub_util_emit_devicemap_entry and
2400 grub_util_iterate_devices.
2401 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2402 util/devicemap.c into grub-mkdevicemap
2403 * conf/i386-efi.rmk: Likewise.
2404 * conf/i386-ieee1275.rmk: Likewise.
2405 * conf/i386-pc.rmk: Likewise.
2406 * conf/powerpc-ieee1275.rmk: Likewise.
2407 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2408 images and installation utilities. Build kernel as image
2409 instead of as elf binary. Use common rules as much as possible.
2410
7dd4a573 24112009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 2412
2413 Correct GPT definition
2414
7dd4a573 2415 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 2416 of "attrib" member
2417
c6c5219f 24182009-04-19 Felix Zielcke <fzielcke@z-51.de>
2419
2420 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2421
0552ff9f 24222009-04-19 David S. Miller <davem@davemloft.net>
2423
2424 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2425 (grub_rescue_cmd_linux): Rename to...
2426 (grub_cmd_linux): and fix prototype.
2427 (grub_rescue_cmd_initrd): Rename to...
2428 (grub_cmd_initrd): and fix prototype.
2429 (cmd_linux, cmd_initrd): New.
2430 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2431 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2432
d1a282fc 24332009-04-17 Pavel Roskin <proski@gnu.org>
2434
07c5039f 2435 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2436 format.
2437 (grub_ohci_transfer): Likewise.
2438
b012002d 2439 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2440
1bc09c35 2441 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2442 return without a value. Fix inconsistent indentation.
2443
e0ff9126 2444 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2445 match struct grub_fs.
2446
d1a282fc 2447 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2448 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2449 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2450 * commands/lspci.c (grub_lspci_iter): Likewise.
2451
a96df3f2 24522009-04-16 Bean <bean123ch@gmail.com>
2453
2454 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2455 value.
2456
41bb0fe9 24572009-04-15 Pavel Roskin <proski@gnu.org>
2458
2459 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2460 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2461 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2462 definitions.
2463
596c6970 24642009-04-15 Felix Zielcke <fzielcke@z-51.de>
2465
2466 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 2467 that no multiple data or metadata areas are supported and `Unknown
596c6970 2468 metadata header'.
2469
7dd4a573 24702009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 2471
2472 Move loader out of the kernel
2473
2474 * kern/loader.c: moved to ...
2475 * commands/boot.c: ... moved here
2476 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2477 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2478 * include/grub/kernel.h (grub_machine_fini): export
2479 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2480 (grub_loader_set): likewise
2481 (grub_loader_unset): likewise
2482 (grub_loader_boot): likewise
2483 * conf/common.rmk: new module boot.mod
2484 (pkglib_MODULES): add boot.mod
2485 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2486 (grub_emu_SOURCES): likewise
2487 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2488 (grub_emu_SOURCES): likewise
2489 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2490 (grub_emu_SOURCES): likewise
2491 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2492 (grub_emu_SOURCES): likewise
2493 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2494 (grub_emu_SOURCES): likewise
7dd4a573 2495 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2496 (grub_emu_SOURCES): likewise
0d5d5653 2497 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 2498 (grub_emu_SOURCES): likewise
0d5d5653 2499
7dd4a573 25002009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 2501
2502 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 2503
5999d619 2504 * kern/misc.c (grub_itoa): Removed function
2505 (grub_ltoa): likewise
2506 (grub_vsprintf): use grub_lltoa
2507
7dd4a573 25082009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 2509
2510 Restore grub-emu
2511
2512 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2513 * conf/i386-coreboot.rmk: likewise
2514 * conf/i386-ieee1275.rmk: likewise
2515 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2516
20318222 25172009-04-15 Felix Zielcke <fzielcke@z-51.de>
2518
2519 * INSTALL: Add that `./autogen.sh' needs to be run before
2520 `./configure.'.
2521
d05f0df3 25222009-04-14 Bean <bean123ch@gmail.com>
2523
2524 * Makefile.in (pkglib_DATA): Add handler.lst.
2525 (handler.lst): New rule.
2526
2527 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2528 * conf/i386-coreboot.rmk: Likewise.
2529 * conf/i386-ieee1275.rmk: Likewise.
2530 * conf/i386-efi.rmk: Likewise.
2531 * conf/x86_64-efi.rmk: Likewise.
2532 * conf/powerpc-ieee1275.rmk: Likewise.
2533 * conf/sparc64-ieee1275.rmk: Likewise.
2534
2535 * genhandlerlist.sh: New file.
2536
2537 * genmk.rb: Add rules to generate handler.lst.
2538
2539 * include/grub/normal.h (grub_file_getline): New function definition.
2540 (read_handler_list): Likewise.
2541 (free_handler_list): Likewise.
2542
2543 * include/grub/term.h (grub_term_register_input): Add name parameter
2544 for auto generation of handler.lst.
2545 (grub_term_register_output): Likewise.
2546
2547 * normal/handler.c: New file.
2548
2549 * normal/main.c (get_line): Renamed to grub_file_getline.
2550 (read_config_file): Use the newly renamed grub_file_getline.
2551 (read_command_list): Likewise.
2552 (read_fs_list): Likewise.
2553 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2554 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2555
2556 * term/efi/console.c (grub_console_init): Add name parameter for auto
2557 generation of handler.lst.
2558 * term/gfxterm.c: Likewise.
2559 * term/i386/pc/at_keyboard.c: Likewise.
2560 * term/i386/pc/console.c: Likewise.
2561 * term/i386/pc/serial.c: Likewise.
2562 * term/i386/pc/vesafb.c: Likewise.
2563 * term/i386/pc/vga.c: Likewise.
2564 * term/i386/pc/vga_text.c: Likewise.
2565 * term/ieee1275/ofconsole.c: Likewise.
2566 * term/usb_keyboard.c: Likewise.
2567
33c846be 25682009-04-14 Bean <bean123ch@gmail.com>
2569
2570 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2571 properly with null character.
2572
4484e01e 25732009-04-14 Felix Zielcke <fzielcke@z-51.de>
2574
2575 * configure: Remove.
2576 * config.h.in: Likewise.
f93d668e 2577 * stamp-h.in: Likewise.
4484e01e 2578 * DISTLIST: Likewise.
2579 * conf/common.mk: Likewise.
2580 * conf/i386-coreboot.mk: Likewise.
2581 * conf/i386-efi.mk: Likewise.
2582 * conf/i386-ieee1275.mk: Likewise.
2583 * conf/i386.mk: Likewise.
2584 * conf/i386-pc.mk: Likewise.
2585 * conf/powerpc-ieee1275.mk: Likewise.
2586 * conf/sparc64-ieee1275.mk: Likewise.
2587 * conf/x86_64-efi.mk: Likewise.
2588
2589 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2590 develop on GRUB.
2591
7dd4a573 25922009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 2593 David S. Miller <davem@davemloft.net>
2594
2595 * util/hostdisk.c (make_device_name): Fix buffer length
2596 calculations.
2597
e25b5a8c 25982009-04-14 Felix Zielcke <fzielcke@z-51.de>
2599
2600 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2601 <sys/param.h> and <sys/sysctl.h>.
2602 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2603 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2604 opening the device and reset them afterwards.
2605
1f1f580c 26062009-04-13 Pavel Roskin <proski@gnu.org>
2607
2608 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2609 Reported by John Stanley <jpsinthemix@verizon.net>
2610
7ebc2d6b 26112009-04-13 Robert Millan <rmh@aybabtu.com>
2612
2613 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 2614 that name for menuentries when appropriate.
7ebc2d6b 2615
d8ba3667 26162009-04-13 Felix Zielcke <fzielcke@z-51.de>
2617
2618 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2619
cba416eb 26202009-04-13 Robert Millan <rmh@aybabtu.com>
2621
2622 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2623 to Linux, simply abort telling the user it's no longer supported.
2624
a547a745 26252009-04-13 Felix Zielcke <fzielcke@z-51.de>
2626
2627 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 2628 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 2629 `freebsd_loadenv' only when devices.hints exist.
2630
232a769c 26312009-04-13 Pavel Roskin <proski@gnu.org>
2632
2633 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2634
c3012039 26352009-04-13 Felix Zielcke <fzielcke@z-51.de>
2636
2637 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2638 partition number.
2639 (grub_drive): Likewise.
2640
234022fe 26412009-04-13 David S. Miller <davem@davemloft.net>
2642
2643 * kern/sparc64/ieee1275/ieee1275.c: New file.
2644 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2645 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2646 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2647 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2648 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2649 grub_ieee1275_alloc_physmem): Declare new exported functions.
2650
d8e1836c 2651 * include/grub/sparc64/ieee1275/loader.h: New file.
2652 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2653 * include/grub/sparc64/kernel.h: Likewise.
2654 * loader/sparc64/ieee1275/linux.c: Likewise.
2655
96bd81ec 2656 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2657 (grub_fstest_SOURCES): Likewise.
2658
6a4737e5 2659 * util/hostdisk.c (make_device_name): Do not make any assumptions
2660 about the length of drive names.
2661
1d7a72fd 2662 * kern/dl.c (grub_dl_load_file): Close file immediately when
2663 we are done using it.
2664
56bc2471 26652009-04-12 David S. Miller <davem@davemloft.net>
2666
2667 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2668 values. Noticed by Pavel Roskin.
2669
df38d0bb 2670 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2671 target compiler.
7dd4a573 2672
e382e93a 2673 * genmk.rb: Add more flexible image type specification, also
2674 pass --strip-unneeded to objcopy.
2675 * conf/i386-pc.rmk: Use *_FORMAT.
2676 * conf/i386-pc.mk: Rebuilt.
2677
f5dbbca9 2678 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2679 (OFDISK_HASH_SZ): Define.
2680 (ofdisk_hash): New hash table.
2681 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2682 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2683 instead of device phandle which is not unique.
2684
91c88b12 2685 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2686 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2687 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2688 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2689 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2690 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2691 GRUB_KERNEL_MACHINE_DATA_END): Define.
2692 (grub_kernel_image_size, grub_total_module_size): Declare.
2693
5b5d4aa5 26942009-04-12 Pavel Roskin <proski@gnu.org>
2695
7dd4a573 2696 * configure.ac: Change the logic when we check for target tools.
2697 Do it when the target is specified and it's different from the
2698 specified value of the host.
5b5d4aa5 2699
c91e1793 27002009-04-11 Felix Zielcke <fzielcke@z-51.de>
2701
2702 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2703 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2704 GNU/kFreeBSD. Check if a device is a character device. Use
2705 DIOCGMEDIASIZE to get the size.
2706 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2707 support for GNU/kFreeBSD.
2708 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2709 is a character device instead of a block device. Add support for
2710 FreeBSD device names.
2711
2712 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2713 is a character device instead of a block device.
2714
2715 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2716 is a character device instead of a block device.
2717
b1ac8644 27182009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2719
2720 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2721 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2722 FreeBSD. Check if a device is a character device. Use
2723 DIOCGMEDIASIZE to get the size.
2724 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2725 support for FreeBSD.
2726 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2727 is a character device instead of a block device. Add support for
2728 FreeBSD device names.
2729
2730 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2731 a character device instead of a block device.
2732 (grub_util_check_char_device): New function.
2733
2734 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2735 a character device instead of a block device.
2736
2737 * include/grub/util/getroot.h (grub_util_check_char_device): New
2738 prototype.
2739
a3f7515a 27402009-04-11 David S. Miller <davem@davemloft.net>
2741
2742 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2743 static libgcc.
2744 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2745 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2746 function, if present.
2747 (__bswapdi2): Likewise.
2748
0d44993d 2749 * include/grub/sparc64/ieee1275/boot.h: New file.
2750 * boot/sparc64/ieee1275/boot.S: Likewise.
2751 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2752
ed3d2bc2 2753 * kern/misc.c (grub_ltoa): New function.
2754 (grub_vsprintf): Use it to format 'long' integers.
2755
d3bfb59c 27562009-04-10 David S. Miller <davem@davemloft.net>
2757
2758 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2759 slots are of type grub_ieee1275_cell_t.
2760 (grub_nand_read): Likewise.
2761 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2762 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2763 macros are used to compare values in arg/ret block of the call.
2764 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2765 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2766 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2767 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2768 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2769 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2770 grub_ieee1275_close, grub_ieee1275_set_property,
2771 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2772 grub_ieee1275_cell_t.
2773 * kern/ieee1275/openfw.c (grub_map): Likewise.
2774 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2775 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2776
450e2238 2777 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2778 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2779 (grub_devalias_iterate): Likewise.
2780
7dd4a573 27812009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 2782
2783 UFS improvements
2784
2785 * fs/ufs.c (INODE_NBLOCKS): new definition
2786 (struct grub_ufs_dirent): added fields for non-BSD dirents
2787 (grub_ufs_get_file_block): fixed double indirect handling
2788 (grub_ufs_lookup_symlink): use more robust way to determine whether
2789 symlink is inline
2790 (grub_ufs_find_file): support for non-BSD dirents
2791 (grub_ufs_dir): support for non-BSD dirents
2792
e7e6862a 27932009-04-10 Bean <bean123ch@gnail.com>
2794
2795 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2796 attribute, otherwise the size would be wrong for i386 platform.
2797
2798 * include/grub/pci.h (grub_pci_read_word): New inline function.
2799 (grub_pci_read_byte): Likewise.
2800 (grub_pci_write): Likewise.
2801 (grub_pci_write_word): Likewise.
2802 (grub_pci_write_byte): Likewise.
2803
2804 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2805
2806 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2807 (find_framebuf): Scan pci to locate the frame buffer address.
2808
2809 * commands/efi/fixvideo.c: New file.
2810
2811 * commands/efi/loadbios.c: Likewise.
2812
2813 * commands/memrw.c: Likewise.
2814
2815 * util/grub-dumpbios.in: Likewise.
2816
2817 * conf/common.rmk (grub-dumpbios): New utility.
2818 (pkglib_MODULES): New module memrw.mod.
2819 (memrw_mod_SOURCE): New macro.
2820 (memrw_mod_CFLAGS): Likewise.
2821 (memrw_mod_LDFLAGS): Likewise.
2822
7dd4a573 2823 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2824 fixvideo.mod.
2825 (loadbios_mod_SOURCE): New macro.
2826 (loadbios_mod_CFLAGS): Likewise.
2827 (loadbios_mod_LDFLAGS): Likewise.
2828 (fixvideo_mod_SOURCE): Likewise.
2829 (fixvideo_mod_CFLAGS): Likewise.
2830 (fixvideo_mod_LDFLAGS): Likewise.
2831
7dd4a573 2832 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2833 fixvideo.mod.
2834 (loadbios_mod_SOURCE): New macro.
2835 (loadbios_mod_CFLAGS): Likewise.
2836 (loadbios_mod_LDFLAGS): Likewise.
2837 (fixvideo_mod_SOURCE): Likewise.
2838 (fixvideo_mod_CFLAGS): Likewise.
2839 (fixvideo_mod_LDFLAGS): Likewise.
2840
af63ada2 28412009-04-08 Felix Zielcke <fzielcke@z-51.de>
2842
2843 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2844
c2cdde70 28452009-04-07 David S. Miller <davem@davemloft.net>
2846
2847 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2848 support for R_SPARC_OLO10 relocations. Fix compile warning for
2849 R_SPARC_WDISP30 case.
ea3f72cf 2850 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2851
761319cf 28522009-04-06 Pavel Roskin <proski@gnu.org>
2853
1007d1f5 2854 * include/grub/misc.h (ARRAY_SIZE): New macro.
2855 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2856 New macro.
2857 * loader/i386/linux.c (allocate_pages): Use free_pages().
2858 (grub_linux_unload): Don't use free_pages().
2859 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2860 wrong index. Treat all other modes as text modes.
2861 (grub_cmd_linux): Initialize vid_mode unconditionally to
2862 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2863
761319cf 2864 * commands/help.c (print_command_help): Use cmd->prio, not
2865 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2866
ea761d40 28672009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2868
ea761d40 2869 Parttool
2870
2871 * parttool/pcpart.c: new file
2872 * commands/parttool.c: likewise
2873 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2874 (parttool_mod_SOURCES): new variable
2875 (parttool_mod_CFLAGS): likewise
2876 (parttool_mod_LDFLAGS): likewise
2877 (pcpart_mod_SOURCES): likewise
2878 (pcpart_mod_CFLAGS): likewise
2879 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2880 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2881 and parttool/pcpart.c
2882 * conf/i386-efi.rmk: likewise
2883 * conf/i386-ieee1275.rmk: likewise
2884 * conf/i386-pc.rmk: likewise
2885 * conf/powerpc-ieee1275.rmk: likewise
2886 * conf/sparc64-ieee1275.rmk: likewise
2887 * conf/x86_64-ieee1275.rmk: likewise
2888
05aaebfb 28892009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2890
2891 Support for mtime and further expandability of dir command
2892
2893 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2894 * include/grub/datetime.h: ... moved here and added
05aaebfb 2895 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2896 * include/grub/fs.h: new syntax for dir and mtime functions in
2897 struct grub_fs
05aaebfb 2898 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2899 and GRUB_FSHELP_FLAGS_MASK
2900 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2901 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2902 (grub_ext2_mtime): new function
2903 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2904 (grub_hfsplus_mtime): new function
2905 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2906 (GRUB_UFS_ATTR_FILE): likewise
2907 (GRUB_UFS_ATTR_LNK): likewise
2908 (struct grub_ufs_sblock): new fields mtime
2909 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2910 all users updated
2911 (grub_ufs_dir): mtime support
2912 (grub_ufs_mtime): new function
2913 * fs/affs.c (grub_affs_dir): use new dir syntax
2914 * fs/afs.c (grub_afs_dir): likewise
2915 * fs/cpio.c (grub_cpio_dir): likewise
2916 * fs/fat.c (grub_fat_find_dir): likewise
2917 * fs/hfs.c (grub_hfs_dir): likewise
2918 * fs/iso9660.c (grub_iso9660_dir): likewise
2919 * fs/jfs.c (grub_jfs_dir): likewise
2920 * fs/minix.c (grub_minix_dir): likewise
2921 * fs/ntfs.c (grub_ntfs_dir): likewise
2922 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2923 * fs/sfs.c (grub_sfs_dir): likewise
2924 * fs/xfs.c (grub_xfs_dir): likewise
2925 * util/hostfs.c (grub_hostfs_dir): likewise
2926 * lib/datetime.c: moved to ...
2927 * normal/datetime.c: ... moved here
2928 (grub_unixtime2datetime): new function
2929 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2930 * normal/completion.c (iterate_dir): use new dir syntax
2931 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2932 last modification time of a volume
7dd4a573 2933 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2934 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2935 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2936 (normal_mod_SOURCES): likewise
2937 (datetime_mod_SOURCES): Removed lib/datetime.c
2938 * conf/i386-efi.rmk: likewise
7dd4a573 2939 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2940 * conf/i386-pc.rmk: likewise
2941 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2942 * conf/sparc64-ieee1275.rmk: likewise
2943 * conf/x86_64-efi.rmk: likewise
05aaebfb 2944
8a7e1a14 29452009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2946
2947 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2948
2949 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2950 on grub_fat_find_dir
2951 (grub_fat_find_dir): use grub_fat_iterate_dir
2952 (grub_fat_label): likewise
2953
04186a9c 29542009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2955
7dd4a573 2956 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2957 and command.h
2958 remove extraneous kernel_elf_HEADERS
2959
da4c0bb6 29602009-04-04 Bean <bean123ch@gnail.com>
2961
2962 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2963
2964 * util/misc.c: Likewise.
2965
54ad9555 29662009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2967
2968 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2969 instead of grub_printf.
2970
7a6bf9f2 29712009-04-03 Robert Millan <rmh@aybabtu.com>
2972
2973 * loader/i386/linux.c (grub_linux_setup_video): Fill
2974 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2975 values from `mode info' structure instead of hardcoded
2976 values.
2977
3fcc2083 29782009-04-01 Pavel Roskin <proski@gnu.org>
2979
2980 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2981 unused now.
2982 * genmk.rb: Likewise.
2983 * configure.ac: Likewise.
2984
5ec9740b 29852009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2986
2987 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2988 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2989
5270cec8 29902009-04-01 David S. Miller <davem@davemloft.net>
2991
2992 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2993 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2994 (grub_setjmp): Mark with 'returns_twice' attribute.
2995 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2996 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2997 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2998
9c3dd854 29992009-04-01 Robert Millan <rmh@aybabtu.com>
3000
3001 Reapply fix from 2008-07-28 which was accidentally reverted; also
3002 perform the same fix to a similar check in same function.
3003
3004 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3005 with the same number are found, just use issue a warning with
3006 grub_dprintf(), as this error has been reported to be non-fatal.
3007
0d818b7e 30082009-03-31 Pavel Roskin <proski@gnu.org>
3009
3010 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3011 for cross-compilation.
3012
95646d92 30132009-03-30 Robert Millan <rmh@aybabtu.com>
3014
3015 Fix i386-ieee1275 build.
3016
3017 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3018 Remove declaration.
3019
6a003ed1 30202009-03-30 Pavel Roskin <proski@gnu.org>
3021
3022 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3023 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3024 zero-terminated, rely only on the strlen value. Fix comparison
3025 of strings differing in length.
3026
92f33540 30272009-03-30 Robert Millan <rmh@aybabtu.com>
3028
3029 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3030 checking for abi version. Improve error messages on BIOS to notify
3031 user about `linux16' command.
3032
a8c48fd5 30332009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3034
f968172e 3035 Leak fixes
a8c48fd5 3036
f968172e 3037 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3038 in case of collision
3039 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 3040
9c323f09 30412009-03-29 Robert Millan <rmh@aybabtu.com>
3042
3043 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3044 set `vid_mode' accordingly.
3045 (grub_linux_boot): Process `vid_mode' and set video mode.
3046
ae68f423 30472009-03-29 Robert Millan <rmh@aybabtu.com>
3048
3049 * util/grub.d/10_linux.in (linux_entry): New function.
3050 Factorize generation of Linux boot entries.
3051
5709cfc4 30522009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3053
3054 Make the format of Environment Block plain text. The boot loader
3055 part is not tested well yet.
7dd4a573 3056
5709cfc4 3057 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3058 (buffer): Removed.
3059 (envblk): Likewise.
3060 (usage): Remove "info" and "clear". Add "unset". Update the
3061 description of "set", as this does not delete variables any
3062 longer.
3063 (create_envblk_file): Complete rewrite.
3064 (open_envblk_file): Likewise.
3065 (cmd_info): Removed.
3066 (cmd_list): Likewise.
3067 (cmd_set): Likewise.
3068 (cmd_clear): Likewise.
3069 (list_variables): New function.
3070 (write_envblk): Likewise.
3071 (set_variables): Likewise.
3072 (unset_variables): Likewise.
3073 (main): Complete rewrite.
3074
3075 * commands/loadenv.c (buffer): Removed.
3076 (envblk): Likewise.
3077 (open_envblk_file): New function.
3078 (read_envblk_file): Complete rewrite.
3079 (grub_cmd_load_env): Likewise.
3080 (grub_cmd_list_env): Likewise.
3081 (struct blocklist): New struct.
3082 (free_blocklists): New function.
3083 (check_blocklists): Likewise.
3084 (write_blocklists): Likewise.
3085 (grub_cmd_save_env): Complete rewrite.
3086
3087 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3088 a plain text signature.
3089 (GRUB_ENVBLK_MAXLEN): Removed.
3090 (struct grub_envblk): Complete rewrite.
3091 (grub_envblk_find): Removed.
3092 (grub_envblk_insert): Likewise.
3093 (grub_envblk_open): New prototype.
3094 (grub_envblk_set): Likewise.
3095 (grub_envblk_delete): Put const to VALUE.
3096 (grub_envblk_iterate): Put const to NAME and VALUE.
3097 (grub_envblk_close): New prototype.
3098 (grub_envblk_buffer): New inline function.
3099 (grub_envblk_size): Likewise.
3100
3101 * lib/envblk.c: Include grub/mm.h.
3102 (grub_env_find): Removed.
3103 (grub_envblk_open): New function.
3104 (grub_envblk_close): Likewise.
3105 (escaped_value_len): Likewise.
3106 (find_next_line): Likewise.
3107 (grub_envblk_insert): Removed.
3108 (grub_envblk_set): New function.
3109 (grub_envblk_delete): Complete rewrite.
3110 (grub_envblk_iterate): Likewise.
3111
a9368fd3 31122009-03-28 Robert Millan <rmh@aybabtu.com>
3113
3114 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3115 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3116 variables. Use 16-bit loader.
3117 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3118 loader.
3119 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3120 (grub_linux16_boot): ... this. Update all users.
3121 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3122 (grub_linux_boot): ... this. Update all users.
3123
3124 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3125 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3126 commands to `linux16' and `initrd16'.
3127 (GRUB_MOD_FINI(linux)): Rename to ...
3128 (GRUB_MOD_FINI(linux16)): ... this.
3129
e4dd5a7e 31302009-03-24 Pavel Roskin <proski@gnu.org>
3131
3132 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3133 not just for compilation.
3134
c04d6e05 31352009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3136
3137 Move multiboot helper out of kernel
3138
3139 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3140 `loader/i386/multiboot_helper.S'.
3141 * conf/i386-coreboot.rmk: Likewise
3142 * conf/i386-ieee1275.rmk: Likewise
3143
3144 * kern/i386/loader.S: Move multiboot helpers from here...
3145 * loader/i386/multiboot_helper.S: ...moved here
3146 * include/grub/i386/loader.h: Move declarations of multiboot
3147 helpers from here...
3148 * include/grub/i386/multiboot.h: ...moved here
3149 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3150
42a5b3fc 31512009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3152
3153 * kern/env.c (grub_env_context_open): Added an argument to specify
3154 whether a new context inherits exported variables from current
3155 one. This is useful when making a sandbox to interpret a config
3156 file.
3157 All callers updated.
3158
3159 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3160
b28bbc4e 31612009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3162
3163 * kern/env.c (grub_env_context_close): Fix memory leaks.
3164
f04f02e4 31652009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3166
3167 * normal/main.c (grub_normal_execute): Added an argument
3168 BATCH to specify if an interactive interface should be provided
3169 after reading a config file.
3170 All callers updated.
3171 (read_command_list): Prevent being executed twice.
3172 (read_fs_list): Likewise.
3173
42a5b3fc 3174 * include/grub/normal.h (grub_normal_execute): Updated the
3175 prototype.
f04f02e4 3176
41473ac2 31772009-03-22 Pavel Roskin <proski@gno.org>
3178
fbc00b0c 3179 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3180 _start.
3181 * kern/i386/pc/startup.S: Likewise.
3182 * kern/i386/efi/startup.S: Likewise.
3183 * kern/i386/ieee1275/startup.S: Likewise.
3184 * kern/i386/coreboot/startup.S: Likewise.
3185 * kern/x86_64/efi/startup.S: Likewise.
3186
41473ac2 3187 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3188 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3189 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3190
2274cc8f 31912009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3192
3193 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3194
3195 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3196 limit detection.
3197 Use vaddr of correct segment for entry_point.
3198
b1b797cb 31992009-03-21 Bean <bean123ch@gmail.com>
3200
3201 * commands/blocklist.c: Add include file <grub/command.h>, remove
3202 <grub/normal.h> and <grub/arg.h>.
3203 (grub_cmd_blocklist): Use the new command interface.
3204 (GRUB_MOD_INIT): Likewise.
3205 (GRUB_MOD_FINI): Likewise.
3206 * commands/boot.c: Likewise.
3207 * commands/cat.c: Likewise.
3208 * commands/cmp.c: Likewise.
3209 * commands/configfile.c: Likewise.
3210 * commands/crc.c: Likewise.
3211 * commands/echo.c: Likewise.
3212 * commands/halt.c: Likewise.
3213 * commands/handler.c: Likewise.
3214 * commands/hdparm.c: Likewise.
3215 * commands/help.c: Likewise.
3216 * commands/hexdump.c: Likewise.
3217 * commands/loadenv.c: Likewise.
3218 * commands/ls.c: Likewise.
3219 * commands/lsmmap.c: Likewise.
3220 * commands/lspci.c: Likewise.
3221 * commands/loadenv.c: Likewise.
3222 * commands/read.c: Likewise.
3223 * commands/reboot.c: Likewise.
3224 * commands/search.c: Likewise.
3225 * commands/sleep.c: Likewise.
3226 * commands/test.c: Likewise.
3227 * commands/usbtest.c: Likewise.
3228 * commands/videotest.c: Likewise.
3229 * commands/i386/cpuid.c: Likewise.
3230 * commands/i386/pc/halt.c: Likewise.
3231 * commands/i386/pc/play.c: Likewise.
3232 * commands/i386/pc/pxecmd.c: Likewise.
3233 * commands/i386/pc/vbeinfo.c: Likewise.
3234 * commands/i386/pc/vbetest.c: Likewise.
3235 * commands/ieee1275/suspend.c: Likewise.
3236 * disk/loopback.c: Likewise.
3237 * font/font_cmd.c: Likewise.
3238 * hello/hello.c: Likewise.
3239 * loader/efi/appleloader.c: Likewise.
3240 * loader/efi/chainloader.c: Likewise.
3241 * loader/i386/bsd.c: Likewise.
3242 * loader/i386/efi/linux.c: Likewise.
3243 * loader/i386/ieee1275/linux.c: Likewise.
3244 * loader/i386/linux.c: Likewise.
3245 * loader/i386/pc/chainloader.c: Likewise.
3246 * loader/i386/pc/linux.c: Likewise.
3247 * loader/powerpc/ieee1275/linux.c: Likewise.
3248 * loader/multiboot_loader.c: Likewise.
3249 * term/gfxterm.c: Likewise.
3250 * term/i386/pc/serial.c: Likewise.
3251 * term/terminfo.c: Likewise.
3252
3253 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3254 * term/i386/pc/vga.c: Likewise.
3255 * video/readers/jpeg.c: Likewise.
3256 * video/readers/png.c: Likewise.
3257 * video/readers/tga.c: Likewise.
3258
3259 * util/grub-fstest (cmd_loopback): Removed.
3260 (cmd_blocklist): Likewise.
3261 (cmd_ls): Likewise.
3262 (grub_register_command): Likewise.
3263 (grub_unregister_command): Likewise.
3264 (execute_command): Use grub_command_find to locate command and execute
3265 it.
3266
3267 * include/grub/efi/chainloader.h: Removed.
3268 * loader/efi/chainloader_normal.c: Likewise.
3269 * loader/i386/bsd_normal.c: Likewise.
3270 * loader/i386/pc/chainloader_normal.c: Likewise.
3271 * loader/i386/pc/multiboot_normal.c: Likewise.
3272 * loader/linux_normal.c: Likewise.
3273 * loader/multiboot_loader_normal.c: Likewise.
3274 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3275
3276 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3277 and grub_register_command_p1.
3278
3279 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3280 kern/command.c, lib/arg.c and commands/extcmd.c.
3281 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3282 (minicmd_mod_SOURCES): New variable.
3283 (minicmd_mod_CFLAGS): Likewise.
3284 (minicmd_mod_LDFLAGS): Likewise.
3285 (extcmd_mod_SOURCES): Likewise.
3286 (extcmd_mod_CFLAGS): Likewise.
3287 (extcmd_mod_LDFLAGS): Likewise.
3288 (boot_mod_SOURCES): Removed.
3289 (boot_mod_CFLAGS): Likewise.
3290 (boot_mod_LDFLAGS): Likewise.
3291
3292 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3293 kern/corecmd.c.
3294 (kernel_img_HEADERS): Add command.h.
3295 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3296 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3297 and lib/arg.c.
3298 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3299 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3300 remove the corresponding normal mode command.
3301 (normal_mod_SOURCES): Remove normal/arg.c.
3302 * conf/i386-coreboot.rmk: Likewise.
3303 * conf/i386-efi.rmk: Likewise.
3304 * conf/i386-ieee1275.rmk: Likewise.
3305 * conf/powerpc-ieee1275.rmk: Likewise.
3306 * conf/x86_64-efi.rmk: Likewise.
3307
3308 * include/grub/arg.h: Move from here ...
3309 * include/grub/lib/arg.h: ... to here.
3310
3311 * normal/arg.c: Move from here ...
3312 * lib/arg.c: ... to here.
3313
3314 * commands/extcmd.c: New file.
3315 * commands/minicmd.c: Likewise.
3316 * include/grub/command.h: Likewise.
3317 * include/grub/extcmd.h: Likewise.
3318 * kern/command.c: Likewise.
3319 * kern/corecmd.c: Likewise.
3320
3321 * kern/list.c (grub_list_iterate): Return int instead of void.
3322 (grub_list_insert): New function.
3323 (grub_prio_list_insert): Likewise.
3324
3325 * kern/rescue.c (grub_rescue_command): Removed.
3326 (grub_rescue_command_list): Likewise.
3327 (grub_rescue_register_command): Likewise.
3328 (grub_rescue_unregister_command): Likewise.
3329 (grub_rescue_cmd_boot): Move to minicmd.c
3330 (grub_rescue_cmd_help): Likewise.
3331 (grub_rescue_cmd_info): Likewise.
3332 (grub_rescue_cmd_boot): Likewise.
3333 (grub_rescue_cmd_testload): Likewise.
3334 (grub_rescue_cmd_dump): Likewise.
3335 (grub_rescue_cmd_rmmod): Likewise.
3336 (grub_rescue_cmd_lsmod): Likewise.
3337 (grub_rescue_cmd_exit): Likewise.
3338 (grub_rescue_print_devices): Moved to corecmd.c.
3339 (grub_rescue_print_files): Likewise.
3340 (grub_rescue_cmd_ls): Likewise.
3341 (grub_rescue_cmd_insmod): Likewise.
3342 (grub_rescue_cmd_set): Likewise.
3343 (grub_rescue_cmd_unset): Likewise.
7d074e3c 3344 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 3345 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 3346 commands, remove grub_rescue_register_command calls.
b1b797cb 3347
7d074e3c 3348 * normal/command.c (grub_register_command): Removed.
b1b797cb 3349 (grub_unregister_command): Likewise.
3350 (grub_command_find): Likewise.
3351 (grub_iterate_commands): Likewise.
3352 (rescue_command): Likewise.
3353 (export_command): Moved to corecmd.c.
3354 (set_command): Removed.
3355 (unset_command): Likewise.
3356 (insmod_command): Likewise.
3357 (rmmod_command): Likewise.
3358 (lsmod_command): Likewise.
3359 (grub_command_init): Likewise.
3360
3361 * normal/completion.c (iterate_command): Use cmd->prio to check for
3362 active command.
3363 (complete_arguments): Use grub_extcmd_t structure to find options.
3364 (grub_normal_do_completion): Change function grub_iterate_commands to
3365 grub_command_iterate.
3366
3367 * normal/execute.c (grub_script_execute_cmd): No need to parse
3368 argument here.
3369
3370 * normal/main.c (grub_dyncmd_dispatcher): New function.
3371 (read_command_list): Register unload commands as dyncmd.
3372 (grub_cmd_normal): Use new command interface, register rescue,
3373 unregister normal at entry, register normal, unregister rescue at exit.
3374
3375 * include/grub/list.h (grub_list_test_t): New type.
3376 (grub_list_iterate): Return int instead of void.
3377 (grub_list_insert): New function.
3378 (GRUB_AS_NAMED_LIST_P): New macro.
3379 (GRUB_AS_PRIO_LIST): Likewise.
3380 (GRUB_AS_PRIO_LIST_P): Likewise.
3381 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3382 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3383 (grub_prio_list): New structure.
3384 (grub_prio_list_insert): New function.
3385 (grub_prio_list_remove): New inline function.
3386
3387 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3388 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3389 (GRUB_COMMAND_FLAG_MENU): Likewise.
3390 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3391 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3392 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3393 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3394 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3395 (grub_command): Likewise.
3396 (grub_register_command): Likewise.
3397 (grub_command_find): Likewise.
3398 (grub_iterate_commands): Likewise.
3399 (grub_command_init): Likewise.
3400 (grub_arg_parse): Likewise.
3401 (grub_arg_show_help): Likewise.
3402
3403 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3404 (grub_rescue_unregister_command): Likewise.
3405
3406 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3407 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3408 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3409
3410 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3411 grub_rescue_cmd_initrd.
3412 * include/grub/i386/loader.h: Likewise.
3413 * include/grub/x86_64/loader.h: Likewise.
3414
3415 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3416
1f4147aa 34172009-03-21 Bean <bean123ch@gmail.com>
3418
3419 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3420 instead of stat in mingw environment.
3421
3422 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3423
3424 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3425
3426 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3427 AC_CONFIG_LINKS.
3428
2156d5ba 34292009-03-21 Bean <bean123ch@gmail.com>
3430
3431 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3432 out of range error.
3433
177b82ca 34342009-03-18 Michel Dänzer <michel@daenzer.net>
3435
3436 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3437 checking inode flags for EXT4_EXTENTS_FLAG.
3438
14aad807 34392009-03-18 Robert Millan <rmh@aybabtu.com>
3440
3441 * loader/i386/linux.c: Include `<grub/video.h>' and
3442 `<grub/i386/pc/vbe.h>'..
3443 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3444 (grub_linux32_boot): Attempt to configure video settings with
3445 grub_linux_setup_video().
3446 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3447 to avoid grub_console_fini() which would step out of graphical mode
3448 unconditionally.
3449
8cf83a27 34502009-03-14 Robert Millan <rmh@aybabtu.com>
3451
3452 Fix build on powerpc.
3453 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3454
40164e75 34552009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3456
3457 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3458 background image command.
3459
c58bc32a 34602009-03-12 Colin D Bennett <colin@gibibit.com>
3461
3462 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3463 (grub_gfxterm_putchar): Extract pairs of identical calls to
3464 draw_cursor out of conditional blocks.
3465
5415144a 34662009-03-11 Pavel Roskin <proski@gnu.org>
3467
3468 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3469 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3470
6394042e 34712009-03-11 Robert Millan <rmh@aybabtu.com>
3472
3473 * loader/i386/multiboot_elfxx.c
3474 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3475
b7b50e5f 34762009-03-11 Felix Zielcke <fzielcke@z-51.de>
3477
3478 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3479 `kern/handler.c'.
3480
1ca7fc96 34812009-03-11 Robert Millan <rmh@aybabtu.com>
3482
3483 * loader/i386/multiboot.c (code_size): New variable.
3484 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 3485 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 3486 4-byte alignment to MBI and others by increasing
7d074e3c 3487 `boot_loader_name_length' appropriately.
1ca7fc96 3488
3489 * loader/i386/multiboot_elfxx.c
3490 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3491
a83ea1d2 34922009-03-09 Felix Zielcke <fzielcke@z-51.de>
3493
3494 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3495 `fs/ext2.c'.
3496
aa9f3bff 34972009-03-08 Robert Millan <rmh@aybabtu.com>
3498
3499 Make loader/i386/linux.c usable on i386-pc again.
3500
3501 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3502 memory to heap.
3503 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3504 `#error' stanza.
3505
d8b3b60e 35062009-03-07 Bean <bean123ch@gmail.com>
3507
3508 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3509 allocation.
3510
b362c9e9 35112009-03-06 Robert Millan <rmh@aybabtu.com>
3512
3513 Fix display issue on terminals with screen size other than 80x25
3514 (e.g. gfxterm with resolution higher than 640x480).
3515
3516 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 3517 position relative to the center of the terminal instead of relying
b362c9e9 3518 on a hardcoded offset.
3519
9304eef1 35202009-03-04 Robert Millan <rmh@aybabtu.com>
3521
3522 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3523 installed.
3524
3525 * Makefile.in (host_kernel): New variable.
3526 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3527 scripts instead of just the windows one.
3528 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3529
eabc95fb 35302009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 3531
3532 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3533 `kern/handler.c'.
3534 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3535 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3536 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3538 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3539 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3540
ceb1223c 35412009-03-04 Felix Zielcke <fzielcke@z-51.de>
3542
3543 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3544 or if there's no space for the disk label and print the partition number on a
3545 invalid magic.
3546
4910684a 35472009-03-04 Felix Zielcke <fzielcke@z-51.de>
3548
3549 * util/misc.c: Include <time.h>.
3550 (grub_millisleep): New function.
3551
7e9ca17a 35522009-03-04 Bean <bean123ch@gmail.com>
3553
3554 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3555 another option -mno-red-zone.
3556
3557 * commands/handler.c: Change module description.
3558
3559 * kern/handler.c: Add missing space at the end of description line.
3560
3561 * kern/list.c: Likewise.
3562
f501677c 35632009-03-03 Robert Millan <rmh@aybabtu.com>
3564
3565 Move more components to the relocation area, and fix mbi pointer
3566 handling to use the destination rather than the origin (thanks to
3567 Vladimir Serbinenko for spotting).
3568
3569 * loader/i386/multiboot.c (mbi_dest): New variable.
3570 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3571 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3572 relocation area.
3573
9902d047 35742009-03-01 Bean <bean123ch@gmail.com>
3575
50fb7002 3576 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 3577 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3578 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3579 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3580
3581 * loader/i386/efi/linux.c (acpi_guid): New variable.
3582 (acpi_guid): Likewise.
3583 (EBDA_SEG_ADDR): New constant.
3584 (LOW_MEM_ADDR): Likewise.
3585 (FAKE_EBDA_SEG): Likewise.
3586 (fake_bios_data): New function.
3587 (grub_linux_boot): Call fake_bios_data.
3588
71b9f361 35892009-03-01 Bean <bean123ch@gmail.com>
3590
3591 * commands/terminal.c: Removed.
3592
3593 * commands/handler.c: New file.
3594
3595 * include/grub/list.h: Likewise.
3596
3597 * include/grub/handler.h: Likewise.
3598
3599 * kern/list.c: Likewise.
3600
3601 * kern/handler.c: Likewise.
3602
3603 * kern/term.h: Include header file <grub/handler.h>.
3604 (grub_term_input): Move next field to the beginning.
3605 (grub_term_output): Likewise.
3606 (grub_term_input_class): New variable.
3607 (grub_term_output_class): Likewise.
3608 (grub_term_register_input): Changed to inline function.
3609 (grub_term_register_output): Likewise.
3610 (grub_term_unregister_input): Likewise.
3611 (grub_term_unregister_output): Likewise.
3612 (grub_term_set_current_input): Likewise.
3613 (grub_term_set_current_output): Likewise.
3614 (grub_term_get_current_input): Likewise.
3615 (grub_term_get_current_output): Likewise.
3616 (grub_term_iterate_input): Removed.
3617 (grub_term_iterate_output): Likewise.
3618
3619 * kern/term.c (grub_term_list_input): Removed.
3620 (grub_term_list_output): Likewise.
3621 (grub_term_input_class): New variable.
3622 (grub_term_output_class): Likewise.
50fb7002 3623 (grub_cur_term_input): Change variable as macro.
71b9f361 3624 (grub_cur_term_output): Likewise.
3625 (grub_term_register_input): Removed.
3626 (grub_term_register_output): Likewise.
3627 (grub_term_unregister_input): Likewise.
3628 (grub_term_unregister_output): Likewise.
3629 (grub_term_set_current_input): Likewise.
3630 (grub_term_set_current_output): Likewise.
3631 (grub_term_iterate_input): Likewise.
3632 (grub_term_iterate_output): Likewise.
3633 (grub_term_get_current_input): Likewise.
3634 (grub_term_get_current_output): Likewise.
3635
3636 * util/grub-editenv.c: Include header file <grub/handler.h>.
3637 (grub_term_get_current_input): Removed.
3638 (grub_term_get_current_output): Likewise.
3639 (grub_term_input_class): New variable.
50fb7002 3640 (grub_term_output_class): Likewise.
71b9f361 3641
3642 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3643 (grub_term_get_current_output): Likewise.
3644 (grub_term_input_class): New variable.
50fb7002 3645 (grub_term_output_class): Likewise.
71b9f361 3646
3647 * util/grub-probe.c (grub_term_get_current_input): Removed.
3648 (grub_term_get_current_output): Likewise.
3649 (grub_term_input_class): New variable.
50fb7002 3650 (grub_term_output_class): Likewise.
71b9f361 3651
3652 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3653 (grub_term_get_current_output): Likewise.
3654 (grub_term_input_class): New variable.
50fb7002 3655 (grub_term_output_class): Likewise.
71b9f361 3656
3657 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3658 (terminal_mod_SOURCES): Likewise.
3659 (terminal_mod_CFLAGS): Likewise.
3660 (terminal_mod_LDFLAGS): Likewise.
3661
3662 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3663 handler.c.
3664 (kernel_img_SOURCES): Add list.c and handler.c.
3665 (kernel_img_HEADERS): Add list.h and handler.h.
3666
3667 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3668 handler.c.
3669 (kernel_mod_SOURCES): Add list.c and handler.c.
3670 (kernel_mod_HEADERS): Add list.h and handler.h.
3671
3672 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3673 handler.c.
3674 (kernel_elf_SOURCES): Add list.c and handler.c.
3675 (kernel_elf_HEADERS): Add list.h and handler.h.
3676
3677 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3678 handler.c.
3679 (kernel_elf_SOURCES): Add list.c and handler.c.
3680 (kernel_elf_HEADERS): Add list.h and handler.h.
3681
3682 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3683 handler.c.
3684 (kernel_mod_SOURCES): Add list.c and handler.c.
3685 (kernel_mod_HEADERS): Add list.h and handler.h.
3686
3687 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3688 handler.c.
3689 (kernel_elf_SOURCES): Add list.c and handler.c.
3690 (kernel_elf_HEADERS): Add list.h and handler.h.
3691
8a31787f 36922009-02-27 Robert Millan <rmh@aybabtu.com>
3693
3694 Factorize elf32 / elf64 code in Multiboot loader. This will
3695 prevent it from getting out of sync again.
3696
3697 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3698 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3699 grub_multiboot_load_elf64): Move from here ...
3700 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3701 grub_multiboot_load_elf): ... to here (new file).
3702
51cd3dfc 37032009-02-27 Robert Millan <rmh@aybabtu.com>
3704
3705 * util/grub.d/10_linux.in: Rename "single-user mode" to
3706 "recovery mode".
3707
6e8c9c3a 37082009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3709
3710 Don't leak in SCSI code.
3711 * disk/scsi.c (grub_scsi_close): free `scsi'.
3712
4b6bf4f9 37132009-02-27 Robert Millan <rmh@aybabtu.com>
3714
3715 * loader/i386/pc/multiboot.c: Move from here ...
3716 * loader/i386/multiboot.c: ... to here. Update all users.
3717
b9413424 37182009-02-27 Robert Millan <rmh@aybabtu.com>
3719
3720 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3721 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3722
50fb7002 37232009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 3724
3725 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3726 b-tree.
3727
8cc50345 37282009-02-27 Robert Millan <rmh@aybabtu.com>
3729
3730 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3731 `0x' qualifier as 0 when base is specified as parameter).
3732
6e09b8b7 37332009-02-24 Bean <bean123ch@gmail.com>
3734
3735 * configure.ac: Check for -mcmodel=large in x86_64 target.
3736
3737 * include/grub/efi/api.h (efi_call_10): New macro.
3738 (efi_wrap_10): New function.
3739
3740 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3741 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3742 (GRUB_PE32_REL_BASED_LOW): Likewise.
3743 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3744 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3745 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3746 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3747 (GRUB_PE32_REL_BASED_REL): Likewise.
3748 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3749 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3750 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3751
3752 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3753 issue.
3754
3755 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3756 (efi_wrap_10): New function.
3757
3758 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3759
3760 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3761 MB/MBP model (NV chipset).
3762 (devdata_devs): Add devpath_5 to the list.
3763
3764 * load/i386/efi/linux.c (video_base): Remove variable.
3765 (RGB_MASK): New macro.
3766 (RGB_MAGIC): Likewise.
3767 (LINE_MIN): Likewise.
3768 (LINE_MAX): Likewise.
3769 (FBTEST_STEP): Likewise.
3770 (FBTEST_COUNT): Likewise.
3771 (fb_list): New variable.
3772 (grub_find_video_card): Remove function.
3773 (find_framebuf): New function.
3774 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3775 line length.
3776
3777 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3778 problem for x86_64.
3779
74b21bee 37802009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3781
3782 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3783
3784 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3785 coding tool name.
3786
a455f472 37872009-02-22 Robert Millan <rmh@aybabtu.com>
3788
3789 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3790 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3791 in our relocation, instead of using it directly from heap. Also
3792 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3793
6374daf3 37942009-02-21 Robert Millan <rmh@aybabtu.com>
3795
3796 Implement USB keyboard support (based on patch by Marco Gerards)
3797
3798 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3799 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3800 (usb_keyboard_mod_LDFLAGS): New variables.
3801
3802 * term/usb_keyboard.c: New file.
3803
8fa4ea70 38042009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3805
3806 Corrected wrong declaration
3807
3808 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3809
353976ac 38102009-02-14 Christian Franke <franke@computer.org>
3811
3812 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3813 (grub_lspci_iter): Print class code and programming interface byte.
3814
6aa1169b 38152009-02-14 Christian Franke <franke@computer.org>
3816
3817 * gendistlist.sh: Ignore `.svn' directories.
3818
265372ca 38192009-02-14 Felix Zielcke <fzielcke@z-51.de>
3820
3821 * fs/fat.c: Add 2009 to Copyright line.
3822
9ff516f3 38232009-02-14 Christian Franke <franke@computer.org>
3824
3825 * commands/hdparm.c: New file. Provides `hdparm' command
3826 which sends ATA commands via grub_disk_ata_pass_through ().
3827
3828 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3829
3830 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3831 and <grub/cpu/io.h> to include/grub/ata.h.
3832 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3833 (GRUB_CDROM_SECTOR_SIZE): Remove.
3834 (GRUB_ATA_*): Move to include/grub/ata.h.
3835 (GRUB_ATAPI_*): Likewise.
3836 (enum grub_ata_commands): Likewise.
3837 (enum grub_ata_timeout_milliseconds): Likewise.
3838 (struct grub_ata_device): Likewise.
3839 (grub_ata_regset): Likewise.
3840 (grub_ata_regget): Likewise.
3841 (grub_ata_regset2): Likewise.
3842 (grub_ata_regget2): Likewise.
3843 (grub_ata_check_ready): Likewise.
3844 (grub_ata_wait_not_busy): Remove static, exported in
3845 include/grub/ata.h.
3846 (grub_ata_wait_drq): Likewise.
3847 (grub_ata_pio_read): Likewise.
3848
3849 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3850 function for hdparm.mod.
3851
3852 * include/grub/ata.h: New file, contains declarations from
3853 disk/ata.c.
3854 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3855
3856 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3857 (grub_disk_ata_pass_through): New exported variable.
3858
3859 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3860
772e23da 38612009-02-13 Colin D Bennett <colin@gibibit.com>
3862
3863 Support multiple fallback entries, and provide an API to support
3864 executing default+fallback menu entries. Renamed the `terminal' menu
3865 viewer to `text'.
3866
3867 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3868 variable declaration.
3869 (grub_menu_execute_callback): New structure declaration.
3870 (grub_menu_execute_callback_t): New typedef.
3871 (grub_menu_execute_with_fallback): New function declaration.
3872 (grub_menu_get_entry): Likewise.
3873 (grub_menu_get_timeout): Likewise.
3874 (grub_menu_set_timeout): Likewise.
3875
3876 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3877
3878 * normal/menu.c (grub_wait_after_message): Moved to
3879 `normal/menu_text.c'.
3880 (draw_border): Likewise.
3881 (print_message): Likewise.
3882 (print_entry): Likewise.
3883 (print_entries): Likewise.
3884 (grub_menu_init_page): Likewise.
3885 (get_entry_number): Likewise.
3886 (print_timeout): Likewise.
3887 (run_menu): Likewise.
3888 (grub_menu_execute_entry): Likewise.
3889 (show_text_menu): Likewise.
3890 (get_and_remove_first_entry_number): New function.
3891 (grub_menu_execute_with_fallback): Likewise.
3892 (get_entry): Renamed to ...
3893 (grub_menu_get_entry): .. this and made it global.
3894 (get_timeout): Renamed to ...
3895 (grub_menu_get_timeout): ... this and made it global.
3896 (set_timeout): Renamed to ...
3897 (grub_menu_set_timeout): ... this and made it global.
3898 (grub_normal_terminal_menu_viewer): Renamed to ...
3899 (grub_normal_text_menu_viewer): ... this.
3900
3901 * normal/menu_text.c: New file. Extracted text-menu-specific code
3902 from normal/menu.c.
3903
3904 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3905 (normal_mod_SOURCES): Likewise.
3906
3907 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3908 (normal_mod_SOURCES): Likewise.
3909
3910 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3911 (normal_mod_SOURCES): Likewise.
3912
3913 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3914 (normal_mod_SOURCES): Likewise.
3915
3916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3917 (normal_mod_SOURCES): Likewise.
3918
3919 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3920 (normal_mod_SOURCES): Likewise.
3921
3922 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3923 (normal_mod_SOURCES): Likewise.
3924
16ac430e 39252009-02-11 Robert Millan <rmh@aybabtu.com>
3926
3927 * util/grub.d/00_header.in: Update old reference to `font' command.
3928
06ff20fc 39292009-02-10 Felix Zielcke <fzielcke@z-51.de>
3930
3931 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3932
3933 Based on patch from Javier Martín.
3934
96da9407 39352009-02-09 Felix Zielcke <fzielcke@z-51.de>
3936
3937 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3938 to avoid false positives with FAT.
96da9407 3939 (grub_fstest_SOURCES): Likewise.
3940 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3941 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3942 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3943 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3944 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3945 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3946
6dca6fe4 39472009-02-09 Felix Zielcke <fzielcke@z-51.de>
3948
06ff20fc 3949 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3950 bpb.version_specific.fat12_or_fat16.fstype and
3951 bpb.version_specific.fat32.fstype.
3952
2550c62f 39532009-02-08 Robert Millan <rmh@aybabtu.com>
3954
be110b30 3955 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3956
56978920 39572009-02-08 Robert Millan <rmh@aybabtu.com>
3958
3959 * Makefile.in (host_os, host_cpu): New variables.
3960 (target_os): Remove. Update all users.
3961
d64399b5 39622009-02-08 Marco Gerards <marco@gnu.org>
3963
3964 * Makefile.in (enable_grub_emu_usb): New variable.
3965 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3966 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3967 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3968 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3969 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3970 `usbtest.mod' and `usbms.mod'.
3971 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3972 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3973 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3974 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3975 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3976 variables.
3977
3978 * disk/usbms.c: New file.
3979
3980 * include/grub/usb.h: Likewise.
3981
3982 * include/grub/usbtrans.h: Likewise.
3983
3984 * include/grub/usbdesc.h: Likewise.
3985
3986 * bus/usb/usbtrans.c: Likewise.
3987
3988 * bus/usb/ohci.c: Likewise.
3989
3990 * bus/usb/uhci.c: Likewise.
3991
3992 * bus/usb/usbhub.c: Likewise.
3993
3994 * bus/usb/usb.c: Likewise.
3995
3996 * commands/usbtest.c: Likewise.
3997
3998 * util/usb.c: Likewise.
50fb7002 3999
d64399b5 4000 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4001
4002 * configure.ac: Test for libusb presence.
50fb7002 4003
d64399b5 4004 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4005
2b40d6bb 40062009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4007
4008 * kern/mm.c: Add more comments.
4009
73a4ce81 40102009-02-08 Robert Millan <rmh@aybabtu.com>
4011
4012 Patch from Javier Martín.
4013 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4014 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4015
f821ce59 40162009-02-08 Robert Millan <rmh@aybabtu.com>
4017
4018 * fs/cpio.c: Split tar functionality to ...
4019 * fs/tar.c: ... here (new file). Update all users.
4020
aebfc4b0 40212009-02-07 Robert Millan <rmh@aybabtu.com>
4022
4023 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4024 backward-incompatible features.
4025
4026 Based on patch from Javier Martín, with some adjustments.
4027
50fb7002 40282009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 4029
4030 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4031
0bb5115e 40322009-02-07 Robert Millan <rmh@aybabtu.com>
4033
4034 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4035 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4036 after the RAID stuff.
4037
38a0f8e7 40382009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4039
50fb7002 4040 Fixes problem when running vbetest command as reported by
38a0f8e7 4041 Vladimir Serbinenko <phcoder@gmail.com>.
4042
4043 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4044
3143cc1c 40452009-02-04 Felix Zielcke <fzielcke@z-51.de>
4046
4047 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4048 /dev/md/NpN style mdraid devices.
4049
9cba6fce 40502009-02-03 Felix Zielcke <fzielcke@z-51.de>
4051
4052 * util/unifont2pff.rb: Remove.
4053
e507a2c1 40542009-02-03 Felix Zielcke <fzielcke@z-51.de>
4055
4056 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4057 `#'.
4058
d2c2b4cd 40592009-02-03 Felix Zielcke <fzielcke@z-51.de>
4060
4061 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4062 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4063 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4064 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4066 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4067 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4068
b4315fb0 40692009-02-02 Christian Franke <franke@computer.org>
4070
4071 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4072
de3aa260 40732009-02-01 Felix Zielcke <fzielcke@z-51.de>
4074
7c3ff286 4075 * INSTALL: Note that we now require at least autoconf 2.59 and
4076 that LZO is optional.
de3aa260 4077
825a182b 40782009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4079
4080 Base on patch on bug #24154 created by Tomas Tintera
4081 <trosos@seznam.cz>.
4082
4083 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4084
a69ef770 40852009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4086
7c3ff286 4087 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 4088 <bero@arklinux.org>.
4089
4090 * normal/parser.y (script_init): Add missing semicolon.
4091
6fa42fa6 40922009-01-31 Colin D Bennett <colin@gibibit.com>
4093
7c3ff286 4094 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 4095 (free_menu_entry_classes): Added.
4096 (grub_normal_menu_addentry): Added class property handling.
4097 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4098 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4099
4100 * normal/menu_viewer.c: New file.
4101
4102 * normal/menu.c (run_menu_entry): Renamed to ...
4103 (grub_menu_execute_entry): ... this and made it as global.
4104 (grub_menu_run): Renamed to ...
4105 (show_text_menu): ... this and made it local.
4106 (show_text_menu): Adapt to new function names.
4107 (grub_normal_terminal_menu_viewer): New global variable.
4108
4109 * include/grub/menu.h: New file.
4110
4111 * include/grub/menu_viewer.h: New file.
4112
4113 * include/grub/normal.h: Added include to grub/menu.h.
4114 (grub_menu_entry): Moved to include/grub/menu.h.
4115 (grub_menu_entry_t): Likewise.
4116 (grub_menu): Likewise.
4117 (grub_menu_t): Likewise.
4118 (grub_normal_terminal_menu_viewer): Added.
4119 (grub_menu_execute_entry): Likewise.
4120 (grub_menu_run): Removed.
4121
4122 * DISTLIST: Added include/grub/menu.h.
4123 Added include/grub/menu_viewer.h.
4124 Added normal/menu_viewer.c.
4125
41262009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4127
4128 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4129 arglist for menutitle arguments.
4130
4131 * normal/main.c (grub_normal_menu_addentry): Likewise.
4132
4133 * normal/parser.y (menuentry): Likewise.
4134
4135 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4136
4137 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4138 (grub_script_create_cmdmenu): Likewise.
4139
4140 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4141
4142 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4143 changes.
4144
4145 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4146
4147 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4148
4149 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4150
4151 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4152
4153 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4154
4155 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4156
56192c23 41572009-01-30 Christian Franke <franke@computer.org>
4158
4159 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4160 in option help text.
4161
d72521b3 41622009-01-27 Pavel Roskin <proski@gnu.org>
4163
4164 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4165
994b5e84 41662009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4167
4168 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4169
4170 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4171
4172 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4173 unregister function.
4174
6a7eab2c 41752009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4176
4177 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4178
4179 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4180
4181 * util/grub-mkfont.c (usage): Fix typo.
4182
4183 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4184
1806b56e 41852009-01-26 Daniel Mierswa <impulze@impulze.org>
4186
3fb18f09 4187 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4188
336e1fb9 4189 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4190
1806b56e 4191 * kern/misc.c (grub_strcasecmp): New function.
4192 (grub_strcasecmp): Use grub_size_t instead of int for length.
4193 Fix return value.
4194 * include/grub/misc.h: Update function prototypes.
4195
580b2a0f 41962009-01-26 Robert Millan <rmh@aybabtu.com>
4197
4198 * configure.ac: Fix cross-compilation check.
ef257b36 4199
d31c24f1 42002009-01-22 Christian Franke <franke@computer.org>
4201
4202 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4203 (precision) digit string. Allow `.format2' without `format1' (width).
4204 Limit input chars for `%s' output to `format2' if specified. This is
4205 compatible with standard printf ().
4206
3138b44c 42072009-01-22 Christian Franke <franke@computer.org>
4208
4209 * disk/ata.c (grub_ata_wait_status): Replace by ...
4210 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4211 other status bits may be invalid while BSY is asserted.
4212 (grub_ata_check_ready): New function.
4213 (grub_ata_cmd): Removed.
4214 (grub_ata_wait_drq): New function.
4215 (grub_ata_strncpy): Remove inline.
4216 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4217 and error check now done by grub_ata_wait_drq ().
4218 (grub_ata_pio_write): Likewise.
4219 (grub_atapi_identify): Set DEV before check for !BSY. Use
4220 grub_ata_wait_drq () to wait for data.
4221 (grub_ata_device_initialize): Add status register check to
4222 detect missing SATA slave devices. Add debug messages.
4223 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4224 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4225 transfer loop by grub_ata_pio_write ().
4226 (grub_ata_identify): Set DEV before check for !BSY. Use
4227 grub_ata_wait_drq () to wait for data.
ef257b36 4228 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 4229 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4230 read/write in one loop. Fix invalid command on write. Fix incomplete
4231 command on (size % batch) == 0. Add missing error check after write of
4232 last block. Add debug messages.
4233 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4234
59a64ef6 42352009-01-19 Christian Franke <franke@computer.org>
4236
4237 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4238 (GRUB_ATAPI_IREASON_*): Likewise.
4239 (grub_ata_pio_write): Fix timeout error return.
4240 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4241 (grub_atapi_wait_drq): New function.
4242 (grub_atapi_packet): New parameter `size'.
4243 Use grub_atapi_wait_drq () and direct write instead of
4244 grub_ata_pio_write ().
4245 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4246 reads the number of bytes requested by the device for each DRQ
4247 assertion.
4248 (grub_atapi_write): Remove old implementation, return not
4249 implemented instead.
4250
1cfe20b3 42512009-01-19 Christian Franke <franke@computer.org>
4252
4253 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4254 of 512 to calculate data size.
4255 (grub_scsi_read12): Likewise.
4256 (grub_scsi_write10): Likewise.
4257 (grub_scsi_write12): Likewise.
4258 (grub_scsi_read): Adjust size according to blocksize.
4259 Add checks for invalid blocksize and unaligned transfer.
4260
bee5fe5d 42612009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4262
4263 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4264
ef257b36 4265 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 4266 width glyphs.
4267
3e643f8c 42682009-01-19 Robert Millan <rmh@aybabtu.com>
4269
4270 * config.guess: Update to latest version from config git.
4271 * config.sub: Likewise.
4272
4fa80998 42732009-01-17 Felix Zielcke <fzielcke@z-51.de>
4274
4275 * Makefile.in: Change font compilation to use new grub-mkfont instead
4276 of java version.
4277
4278 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4279 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4280 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4281 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4282 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4283 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4284 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4285 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4286 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4287
7086085b 42882009-01-16 Christian Franke <franke@computer.org>
4289
4290 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4291 (enum grub_ata_timeout_milliseconds): New enum.
4292 (grub_ata_wait_status): Add parameter milliseconds.
4293 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4294 recovery from timed-out commands.
4295 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4296 return grub_errno instead of REG_ERROR.
4297 (grub_ata_pio_write): Add parameter milliseconds.
4298 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4299 Pass milliseconds to grub_ata_wait_status () and
4300 grub_ata_pio_read ().
4301 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4302 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4303 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4304 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4305 It is not suitable for device detection, because DEV bit is ignored,
4306 the command may run too long, and not all devices set the signature
4307 properly.
4308 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4309 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4310 Fix device selection, DEV bit must be set first to address the registers
4311 of the correct device.
4312 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4313 grub_ata_pio_read/write ().
4314 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4315 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4316
4a412913 43172009-01-13 Carles Pina i Estany <carles@pina.cat>
4318
4319 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4320
7795c55e 43212009-01-13 Bean <bean123ch@gmail.com>
d913988c 4322
4323 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4324
7795c55e 43252009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 4326
4327 * Makefile.in: (enable_grub_mkfont): New variable.
4328 (freetype_cflags): Likewise.
4329 (freetype_libs): Likewise.
4330
4331 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4332 (grub_mkfont_SOURCES): New variable.
4333 (grub_mkfont_CFLAGS): Likewise.
4334 (grub_mkfont_LDFLAGS): Likewise.
4335
4336 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4337 library if `--enable-grub-mkfont' is requested.
4338 (enable_grub_mkfont): New variable.
4339 (freetype_cflags): Likewise.
4340 (freetype_libs): Likewise.
4341
4342 * util/grub-mkfont.c: New file.
4343
093af1fe 43442009-01-12 Christian Franke <franke@computer.org>
4345
4346 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4347 mode check. Fix setting of compat_use[].
4348
f36cc108 43492009-01-10 Robert Millan <rmh@aybabtu.com>
4350
4351 Update a few copyright years which we forgot to do in 2008 (only for
4352 files whose changes made in 2008 were copyright-significant)
4353
4354 * Makefile.in: Add 2008 to Copyright line.
4355 * disk/ieee1275/ofdisk.c: Likewise.
4356 * disk/efi/efidisk.c: Likewise.
4357 * kern/dl.c: Likewise.
4358 * kern/sparc64/ieee1275/init.c: Likewise.
4359 * kern/mm.c: Likewise.
4360 * kern/efi/mm.c: Likewise.
4361 * boot/i386/pc/boot.S: Likewise.
4362 * genfslist.sh: Likewise.
4363 * fs/iso9660.c: Likewise.
4364 * fs/hfs.c: Likewise.
4365 * fs/jfs.c: Likewise.
4366 * fs/minix.c: Likewise.
4367 * fs/ufs.c: Likewise.
4368 * gensymlist.sh.in: Likewise.
4369 * genkernsyms.sh.in: Likewise.
4370 * include/grub/misc.h: Likewise.
4371 * include/grub/types.h: Likewise.
4372 * include/grub/symbol.h: Likewise.
4373 * include/grub/elf.h: Likewise.
4374 * include/grub/kernel.h: Likewise.
4375 * include/grub/disk.h: Likewise.
4376 * include/grub/dl.h: Likewise.
4377 * include/grub/i386/linux.h: Likewise.
4378 * include/grub/i386/pc/biosdisk.h: Likewise.
4379 * include/grub/efi/api.h: Likewise.
4380 * include/grub/efi/pe32.h: Likewise.
4381 * include/grub/util/misc.h: Likewise.
4382 * normal/execute.c: Likewise.
4383 * normal/arg.c: Likewise.
4384 * normal/completion.c: Likewise.
4385 * normal/lexer.c: Likewise.
4386 * normal/parser.y: Likewise.
4387 * normal/misc.c: Likewise.
4388 * commands/i386/pc/vbeinfo.c: Likewise.
4389 * commands/hexdump.c: Likewise.
4390 * commands/terminal.c: Likewise.
4391 * commands/ls.c: Likewise.
4392 * commands/help.c: Likewise.
4393 * partmap/pc.c: Likewise.
4394 * loader/efi/chainloader.c: Likewise.
4395 * loader/multiboot_loader.c: Likewise.
4396 * loader/i386/pc/multiboot2.c: Likewise.
4397 * term/efi/console.c: Likewise.
4398 * term/i386/pc/serial.c: Likewise.
4399 * util/lvm.c: Likewise.
4400 * util/console.c: Likewise.
4401 * util/i386/efi/grub-mkimage.c: Likewise.
4402 * util/raid.c: Likewise.
4403
7f02114b 44042009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4405
4406 * commands/videotest.c: Removed include to grub/machine/memory.h.
4407
4408 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4409 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4410 (video_mod_SOURCES): Removed.
4411 (video_mod_CFLAGS): Likewise.
4412 (video_mod_LDFLAGS): Likewise.
4413 (gfxterm_mod_SOURCES): Likewise.
4414 (gfxterm_mod_CFLAGS): Likewise.
4415 (gfxterm_mod_LDFLAGS): Likewise.
4416 (videotest_mod_SOURCES): Likewise.
4417 (videotest_mod_CFLAGS): Likewise.
4418 (videotest_mod_LDFLAGS): Likewise.
4419 (bitmap_mod_SOURCES): Likewise.
4420 (bitmap_mod_CFLAGS): Likewise.
4421 (bitmap_mod_LDFLAGS): Likewise.
4422 (tga_mod_SOURCES): Likewise.
4423 (tga_mod_CFLAGS): Likewise.
4424 (tga_mod_LDFLAGS): Likewise.
4425 (jpeg_mod_SOURCES): Likewise.
4426 (jpeg_mod_CFLAGS): Likewise.
4427 (jpeg_mod_LDFLAGS): Likewise.
4428 (png_mod_SOURCES): Likewise.
4429 (png_mod_CFLAGS): Likewise.
4430 (png_mod_LDFLAGS): Likewise.
4431
4432 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4433 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4434 (video_mod_SOURCES): Added.
4435 (video_mod_CFLAGS): Likewise.
4436 (video_mod_LDFLAGS): Likewise.
4437 (videotest_mod_SOURCES): Likewise.
4438 (videotest_mod_CFLAGS): Likewise.
4439 (videotest_mod_LDFLAGS): Likewise.
4440 (bitmap_mod_SOURCES): Likewise.
4441 (bitmap_mod_CFLAGS): Likewise.
4442 (bitmap_mod_LDFLAGS): Likewise.
4443 (tga_mod_SOURCES): Likewise.
4444 (tga_mod_CFLAGS): Likewise.
4445 (tga_mod_LDFLAGS): Likewise.
4446 (jpeg_mod_SOURCES): Likewise.
4447 (jpeg_mod_CFLAGS): Likewise.
4448 (jpeg_mod_LDFLAGS): Likewise.
4449 (png_mod_SOURCES): Likewise.
4450 (png_mod_CFLAGS): Likewise.
4451 (png_mod_LDFLAGS): Likewise.
4452 (gfxterm_mod_SOURCES): Likewise.
4453 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 4454 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 4455
4456 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4457 grub/machine/console.h.
4458
644fff97 44592009-01-04 Jerone Young <jerone@gmail.com>
4460
4461 Make on screen instructions clearer
4462
4463 Based on patch created by Jidanni <jidanni@jidanni.org>
4464
4465 * normal/menu.c: print clearer instructions on the screen
4466
1e901a75 44672009-01-02 Colin D Bennett <colin@gibibit.com>
4468
4469 New font engine.
34c44600 4470
1e901a75 4471 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4472 build system and fixed gfxterm.c to work with different sized fonts.
4473
4474 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 4475
1e901a75 4476 * configure: Re-generated.
34c44600 4477
1e901a75 4478 * DISTLIST: Removed font/manager.c.
4479 Added font/font.c.
4480 Added font/font_cmd.c.
34c44600 4481
1e901a75 4482 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4483 compilation.
34c44600 4484
1e901a75 4485 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 4486
4487 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 4488
4489 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 4490
1e901a75 4491 * normal/menu.c: Likewise.
34c44600 4492
1e901a75 4493 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4494 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 4495
1e901a75 4496 * include/grub/font.h: Replaced with new file.
34c44600 4497
1e901a75 4498 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4499 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4500 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4501 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4502 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 4503 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 4504 fg_red, fg_green, fg_blue, fg_alpha.
4505 (grub_video_adapter): Removed blit_glyph.
34c44600 4506 (grub_video_blit_glyph): Removed.
4507
1e901a75 4508 * font/manager.c: Removed file.
34c44600 4509
4510 * font/font.c: New file.
4511
1e901a75 4512 * font/font_cmd.c: Likewise.
34c44600 4513
1e901a75 4514 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 4515
1e901a75 4516 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4517 (grub_video_vbe_map_rgba): Likewise.
4518 (grub_video_vbe_unmap_color_int): Likewise.
4519 (grub_video_vbe_blit_glyph): Removed.
4520 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 4521
1e901a75 4522 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4523 (get_pixel): Likewise.
34c44600 4524 (set_pixel): Likewise.
4525
1e901a75 4526 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 4527
1e901a75 4528 * term/gfxterm.c: Adapted to new font engine.
34c44600 4529
1e901a75 4530 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 4531
1e901a75 4532 * term/i386/pc/vga.c: Likewise.
34c44600 4533
1e901a75 4534 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 4535
1e901a75 4536 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 4537
1e901a75 4538 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4539
1e901a75 4540 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4541
1e901a75 4542 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 4543
1e901a75 4544 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 4545
1e901a75 4546 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 4547
1e901a75 4548 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 4549
1e901a75 4550 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4551
4552 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 4553
1e901a75 4554 * util/grub-mkconfig_lib.in: Changed font extension.
4555
278922e8 45562008-12-28 Felix Zielcke <fzielcke@z-51.de>
4557
4558 * util/getroot.c (grub_util_get_grub_dev): Add support for
4559 /dev/md/dNNpNN style partitionable mdraid devices.
4560
3ced05cf 45612008-12-12 Alex Smith <alex@alex-smith.me.uk>
4562
4563 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4564 at a time limit of the PXE TFTP API correctly.
4565 (grub_pxefs_close): Likewise.
4566
7fd0ee30 45672008-11-29 Robert Millan <rmh@aybabtu.com>
4568
34c44600 4569 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 4570 grub_ata_device_initialize() calls.
4571
34c44600 45722008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 4573
4574 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4575 iteration failed.
4576 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4577
89313780 45782008-11-28 Robert Millan <rmh@aybabtu.com>
4579
4580 Fix build on powerpc-ieee1275. Based on patch created by
4581 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4582 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4583 `kern/ieee1275/mmap.c'.
4584 * include/grub/powerpc/ieee1275/memory.h: New file.
4585
15257703 4586 Provide grub-install on coreboot.
4587 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4588 (grub_install_SOURCES): New variable.
4589 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4590 usable on coreboot.
4591
9fc5388a 45922008-11-25 Felix Zielcke <fzielcke@z-51.de>
4593
4594 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4595 to `grub_term_input_t'.
4596 (grub_term_get_current_output): Change return type to
4597 `grub_term_output_t'.
4598
bc3a2f31 45992008-11-22 Robert Millan <rmh@aybabtu.com>
4600
34c44600 4601 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 4602 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4603 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4604 grub_vga_text_cls().
4605
80fc88f2 4606 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 4607 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 4608
cbf36fd3 4609 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4610 to 0x200000 (avoids trouble with some OFW implementations, and matches
4611 with the one in Yaboot).
4612 Reported by Manoel Abranches
4613
73e8e268 46142008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 4615
4616 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4617 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4618
73e8e268 4619 * util/grub-mkconfig_lib.in (grub_warn): New function.
4620 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4621 warnings, to obtain consistent formatting.
4622 * util/grub.d/00_header.in: Likewise.
4623 * util/update-grub_lib.in: Likewise.
4624
e94045a1 4625 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 4626 Move comment text to `#error' stanza.
e94045a1 4627
79d29fd7 4628 Harmonize ieee1275's grub_available_iterate() with the generic
4629 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4630 build problem on i386-ieee1275):
4631 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4632 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4633 parameter `type'. Update all users of this function.
4634 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4635 `kern/ieee1275/mmap.c'.
4636 * kern/ieee1275/init.c
4637 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4638 with ...
4639 (grub_machine_mmap_iterate): ... this.
4640 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4641 return type to `grub_err_t'. Update all implementations of this
4642 function prototype.
4643 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4644 Likewise.
4645
60d6b16e 4646 Add `lsmmap' command (lists firmware-provided memory map):
4647 * commands/lsmmap.c: New file.
4648 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4649 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4650 variables.
4651 * conf/powerpc-ieee1275.rmk: Likewise.
4652 * conf/i386-coreboot.rmk: Likewise.
4653 * conf/i386-ieee1275.rmk: Likewise.
4654
ebaaf49b 46552008-11-19 Robert Millan <rmh@aybabtu.com>
4656
4657 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 4658 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4659 constraints to initrd allocation (based on code from
4660 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4661 for Linux to find it.
ebaaf49b 4662
dfab719f 46632008-11-14 Robert Millan <rmh@aybabtu.com>
4664
4665 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4666 order to cope with duplicate slashes.
4667
10fc3eb9 46682008-11-14 Robert Millan <rmh@aybabtu.com>
4669
4670 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4671 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4672 don't want to mess with lower memory, because it is used in the Linux
4673 loader.
4674
4675 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 4676 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 4677 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4678 is in our heap (probably as a result of it being corrupted during
2f2a3442 4679 decompression). Add #error instance with comment to explain why this
4680 loader isn't currently usable on PC/BIOS.
10fc3eb9 4681
e2e07847 46822008-11-14 Robert Millan <rmh@aybabtu.com>
4683
4684 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 4685 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 4686
fe8e8d69 46872008-11-12 Robert Millan <rmh@aybabtu.com>
4688
4689 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4690
4691 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4692 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4693 from here ...
4694 * include/grub/i386/pc/memory.h: ... to here.
4695
976b07d0 46962008-11-12 Robert Millan <rmh@aybabtu.com>
4697
4698 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4699 split).
4700
4701 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4702 (grub_console_cur_color, grub_console_real_putchar)
4703 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4704 (grub_console_setcolorstate, grub_console_setcolor)
4705 (grub_console_getcolor): Move from here ...
4706 * include/grub/i386/vga_common.h: ... to here (new file).
4707
4708 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4709 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4710 `<grub/i386/io.h>'.
4711 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4712 `<grub/i386/vga_common.h>'.
4713
76679cd3 47142008-11-12 Robert Millan <rmh@aybabtu.com>
4715
4716 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4717 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4718 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4719 variables.
4720 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4721 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4722
4723 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4724 grub_console_init() with call to grub_vga_text_init().
4725 (grub_machine_fini): Replace call to
4726 grub_console_fini() with call to grub_vga_text_fini() and
4727 grub_at_keyboard_fini().
4728
4729 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4730 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4731 (grub_console_setcolorstate, grub_console_setcolor)
4732 (grub_console_getcolor): New function prototypes.
4733
4734 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4735 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4736 (grub_vga_text_setcursor): Static-ize.
4737 (grub_vga_text_term): New structure.
4738 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4739
4740 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4741 (grub_console_cur_color, grub_console_standard_color)
4742 (grub_console_normal_color, grub_console_highlight_color)
4743 (map_char, grub_console_putchar, grub_console_getcharwidth)
4744 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4745 (grub_console_getcolor): Move from here ...
4746 * term/i386/vga_common.c: ... to here (same function names).
4747
95b841d3 47482008-11-12 Robert Millan <rmh@aybabtu.com>
4749
4750 Use newly-added Multiboot support in coreboot.
4751
4752 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4753 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4754
4755 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4756 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4757 (codestart): Store the MBI in `startup_multiboot_info' when we're
4758 being loaded using Multiboot.
4759
4760 * kern/i386/coreboot/init.c (grub_machine_init): Move
4761 grub_at_keyboard_init() call to beginning of function (useful for
4762 debugging). Call grub_machine_mmap_init() before attempting to use
4763 grub_machine_mmap_iterate().
4764 (grub_lower_mem, grub_upper_mem): Move from here ...
4765 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4766 here (new file).
4767
4768 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4769 function prototype.
4770
761ca975 47712008-11-12 Robert Millan <rmh@aybabtu.com>
4772
4773 Fix a regression introduced by the at_keyboard.mod split. Because
4774 some terminals are default on some platforms and non-default on
4775 others, the first terminal being registered determines which is
4776 going to be default.
4777
4778 * kern/term.c (grub_term_register_input): If this is the first
4779 terminal being registered, set it as the current one.
4780 (grub_term_register_output): Likewise.
4781
4782 * term/efi/console.c (grub_console_init): Do not call
4783 grub_term_set_current_output() or grub_term_set_current_input().
4784 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4785 * term/i386/pc/console.c (grub_console_init): Likewise.
4786 (grub_console_fini): Do not call grub_term_set_current_input()
4787 (but leave grub_term_set_current_output() to restore text mode).
4788
6c529df7 47892008-11-10 Robert Millan <rmh@aybabtu.com>
4790
4791 * util/grub.d/00_header.in: Add backward compatibility check for
4792 versions of terminal.mod that don't understand `terminal_input' or
4793 `terminal_output'.
4794
132e4113 47952008-11-09 Robert Millan <rmh@aybabtu.com>
4796
4797 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4798 `terminal_input' / `terminal_output', not `terminal'.
4799
ac293d50 48002008-11-08 Robert Millan <rmh@aybabtu.com>
4801
4802 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 4803 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 4804
0025933a 48052008-11-08 Robert Millan <rmh@aybabtu.com>
4806
4807 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 4808 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 4809 members. Update all users.
4810 * util/console.c (grub_ncurses_term): Split in ...
4811 (grub_ncurses_term_input): ... this, and ...
4812 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 4813 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 4814
37c86336 48152008-11-08 Robert Millan <rmh@aybabtu.com>
4816
4817 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4818 (PKGDATA): Add $(pkgdata_SRCDIR).
4819 (pkglib_BUILDDIR): New variable.
4820 (pkgdata_SRCDIR): New variable.
4821 (build_env.mk): New target.
4822 (include_DATA): New variable.
4823 (install-local): Install $(include_DATA) files in $(includedir).
4824
b6c15a2d 48252008-11-07 Pavel Roskin <proski@gnu.org>
4826
d99d46f1 4827 * gendistlist.sh: Use C locale for sorting to ensure consistent
4828 output on all systems.
4829
b6c15a2d 4830 * util/grub.d/00_header.in: Remove incorrect space before
4831 "serial".
4832
c32ee8c9 48332008-11-07 Robert Millan <rmh@aybabtu.com>
4834
4835 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4836 per specification.
4837 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4838 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4839 (based on find_multi_boot1_header).
4840 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4841 using find_multi_boot2_header(), and abort if neither Multiboot or
4842 Multiboot headers were found.
4843
651c29b7 48442008-11-07 Robert Millan <rmh@aybabtu.com>
4845
4846 Modularize at_keyboard.mod:
4847
4848 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4849 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4850 (at_keyboard_mod_LDFLAGS): New variables.
4851
4852 Actual terminal split:
4853
4854 * include/grub/term.h (struct grub_term): Split in ...
4855 (struct grub_term_input): ... this, and ...
4856 (struct grub_term_output): ... this. Update all users.
4857 (grub_term_set_current): Split in ...
4858 (grub_term_set_current_input): ... this, and ...
4859 (grub_term_set_current_output): ... this.
4860 (grub_term_get_current): Split in ...
4861 (grub_term_get_current_input): ... this, and ...
4862 (grub_term_get_current_output): ... this.
4863 (grub_term_register): Split in ...
4864 (grub_term_register_input): ... this, and ...
4865 (grub_term_register_output): ... this.
4866 (grub_term_unregister): Split in ...
4867 (grub_term_unregister_input): ... this, and ...
4868 (grub_term_unregister_output): ... this.
4869 (grub_term_iterate): Split in ...
4870 (grub_term_iterate_input): ... this, and ...
4871 (grub_term_iterate_output): ... this.
4872
4873 * kern/term.c (grub_term_list): Split in ...
4874 (grub_term_list_input): ... this, and ...
4875 (grub_term_list_output): ... this. Update all users.
4876 (grub_cur_term): Split in ...
4877 (grub_cur_term_input): ... this, and ...
4878 (grub_cur_term_output): ... this. Update all users.
4879 (grub_term_set_current): Split in ...
4880 (grub_term_set_current_input): ... this, and ...
4881 (grub_term_set_current_output): ... this.
4882 (grub_term_get_current): Split in ...
4883 (grub_term_get_current_input): ... this, and ...
4884 (grub_term_get_current_output): ... this.
4885 (grub_term_register): Split in ...
4886 (grub_term_register_input): ... this, and ...
4887 (grub_term_register_output): ... this.
4888 (grub_term_unregister): Split in ...
4889 (grub_term_unregister_input): ... this, and ...
4890 (grub_term_unregister_output): ... this.
4891 (grub_term_iterate): Split in ...
4892 (grub_term_iterate_input): ... this, and ...
4893 (grub_term_iterate_output): ... this.
4894
4895 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4896 a check for input and one for output (and only attempt to get keys
4897 from user when input works).
4898
4899 * util/grub-probe.c (grub_term_get_current): Split in ...
4900 (grub_term_get_current_input): ... this, and ...
4901 (grub_term_get_current_output): ... this.
4902 * util/grub-fstest.c: Likewise.
4903 * util/i386/pc/grub-setup.c: Likewise.
4904 * util/grub-editenv.c: Likewise.
4905
4906 Portability adjustments:
4907
4908 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4909 `term/i386/pc/at_keyboard.c'.
4910 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4911 grub_keyboard_controller_init() (now handled by terminal .init).
4912 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4913 grub_at_keyboard_init().
4914 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4915 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4916 at_keyboard.mod via input terminal interface).
4917 * include/grub/i386/coreboot/console.h: Convert into a stub for
4918 `<grub/i386/pc/console.h>'.
4919
4920 Migrate full terminals to new API:
4921
4922 * term/efi/console.c (grub_console_term): Split into ...
4923 (grub_console_term_input): ... this, and ...
4924 (grub_console_term_output): ... this. Update all users.
4925 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4926 (grub_ofconsole_init): Split into ...
4927 (grub_ofconsole_init_input): ... this, and ...
4928 (grub_ofconsole_init_output): ... this.
4929 (grub_ofconsole_term): Split into ...
4930 (grub_ofconsole_term_input): ... this, and ...
4931 (grub_ofconsole_term_output): ... this. Update all users.
4932 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4933 (grub_serial_term_input): ... this, and ...
4934 (grub_serial_term_output): ... this. Update all users.
4935 * term/i386/pc/console.c (grub_console_term): Split into ...
4936 (grub_console_term_input): ... this, and ...
4937 (grub_console_term_output): ... this. Update all users.
4938 (grub_console_term_input): Only enable it on PC/BIOS platform.
4939 (grub_console_init): Remove grub_keyboard_controller_init() call.
4940
4941 Migrate input terminals to new API:
4942
4943 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4944 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4945 i386-specific anyway).
4946 (grub_console_checkkey): Rename to ...
4947 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4948 users.
4949 (grub_keyboard_controller_orig): New variable.
4950 (grub_console_getkey): Rename to ...
4951 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4952 users.
4953 (grub_keyboard_controller_init): Static-ize. Save original
4954 controller value so that it can be restored ...
4955 (grub_keyboard_controller_fini): ... here (new function).
4956 (grub_at_keyboard_term): New structure.
4957 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4958 functions.
4959
4960 Migrate output terminals to new API:
4961
4962 * term/i386/pc/vga.c (grub_vga_term): Change type to
4963 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4964 members. Update all users.
4965 * term/gfxterm.c (grub_video_term): Change type to
4966 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4967 members. Update all users.
4968 * include/grub/i386/pc/console.h (grub_console_checkkey)
4969 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4970 etc).
4971
4972 Migrate `terminal' command and userland tools to new API:
4973
4974 * commands/terminal.c (grub_cmd_terminal): Split into ...
4975 (grub_cmd_terminal_input): ... this, and ...
4976 (grub_cmd_terminal_output): ... this.
4977 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4978 `terminal_input' and `terminal_output'.
4979 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4980 `terminal_input' / `terminal_output' API.
4981 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4982 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4983 provided ${GRUB_TERMINAL}, convert it).
4984
96e5d876 49852008-11-04 Robert Millan <rmh@aybabtu.com>
4986
4987 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4988 for FreeBSD.
4989 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4990
556f3775 49912008-11-03 Bean <bean123ch@gmail.com>
4992
4993 * kern/elf.c (grub_elf32_load): Revert to previous code.
4994 (grub_elf64_load): Likewise.
4995
4996 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4997
926b9823 49982008-11-01 Robert Millan <rmh@aybabtu.com>
4999
5000 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5001 (TARGET_CPPFLAGS): Likewise.
5002 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5003
1432e958 50042008-11-01 Carles Pina i Estany <carles@pina.cat>
5005
5006 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5007
dba3f844 50082008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 5009
5010 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5011 addition of objects until the code is not going to be able to fail.
5012
dba3f844 50132008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 5014
5015 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5016 (add a missing NULL check, and correct them by moving the pointer
5017 operations after the actual check).
5018
7ab28c21 50192008-10-29 Robert Millan <rmh@aybabtu.com>
5020
5021 * util/i386/pc/grub-install.in: Handle empty string as output from
5022 make_system_path_relative_to_its_root().
5023
1b7748eb 50242008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5025
5026 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5027 circular metadata worst case scenario. If the metadata is circular
5028 then copy the wrap in place.
5029 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5030 project lib/format_text/layout.h
5031 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5032
c9618ab2 50332008-10-03 Felix Zielcke <fzielcke@z-51.de>
5034
7a36edca 5035 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 5036
bf981c62 50372008-10-03 Felix Zielcke <fzielcke@z-51.de>
5038
5039 * util/update-grub_lib.in: Mention filename in warning message.
5040
6d994591 50412008-09-29 Felix Zielcke <fzielcke@z-51.de>
5042
5043 * NEWS: Update for rename of update-grub to grub-mkconfig.
5044
18ade780 50452008-09-29 Felix Zielcke <fzielcke@z-51.de>
5046
5047 * util/update-grub_lib.in: Copy to ...
5048 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 5049 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 5050 * util/update-grub.in: Rename to ...
5051 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5052 option. Add `--output' option to allow users to specify the generated
5053 configuration file. Default to stdout.
5054 (update_grub_dir): Rename to ...
5055 (grub_mkconfig_dir): ... this.
5056 (grub_cfg): Default to an empty string.
5057 * conf/common.rmk (update-grub): Rename to ...
5058 (grub-mkconfig): ... this.
5059 (update-grub_lib): Copy to ...
5060 (grub-mkconfig_lib): ... this.
5061 (update-grub_SCRIPTS): Copy to ...
5062 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5063 (update-grub_DATA): Rename to ...
5064 (grub-mkconfig_DATA): ... this.
5065
556ce6ac 50662008-09-28 Robert Millan <rmh@aybabtu.com>
5067
5068 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5069 to `modified'. Add the real `created' field.
5070 (grub_iso9660_uuid): Use `modified' rather than `created' for
5071 constructing the UUID.
5072
50732008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 5074
5075 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5076 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5077
92274e85 50782008-09-28 Bean <bean123ch@gmail.com>
5079
5080 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5081 Thanks to Christian Franke for finding this bug.
5082
add6f17a 50832008-09-25 Robert Millan <rmh@aybabtu.com>
5084
5085 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5086 instances of grub_util_get_disk_name() (see previous commit).
5087
d2a367b8 50882008-09-25 Robert Millan <rmh@aybabtu.com>
5089
5090 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5091 `util/i386/get_disk_name.c'.
5092 * conf/i386-efi.rmk: Likewise.
5093 * conf/x86_64-efi.rmk: Likewise.
5094 * conf/i386-coreboot.rmk: Likewise.
5095 * conf/i386-ieee1275.rmk: Likewise.
5096 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5097 `util/ieee1275/get_disk_name.c'.
5098 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5099 * util/ieee1275/get_disk_name.c: Remove file.
5100 * util/i386/get_disk_name.c: Remove file.
5101 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5102 "hd%d" for device.map entries, rather than using
5103 grub_util_get_disk_name().
5104
81a06771 51052008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 5106
5107 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5108 warning.
5109 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5110
5a004279 51112008-09-24 Carles Pina i Estany <carles@pina.cat>
5112
5113 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5114 Changed to 0x5100.
5115 (GRUB_TERM_PPAGE): Changed to 0x4900.
5116
397093d3 51172008-09-24 Robert Millan <rmh@aybabtu.com>
5118
5119 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5120 macros (they were i386-pc specific).
5121 * include/grub/sparc64/ieee1275/console.h: Likewise.
5122 * include/grub/efi/console.h: Likewise.
5123
a91b6c7c 51242008-09-22 Bean <bean123ch@gmail.com>
5125
5126 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5127 resident and in attribute list.
5128
5129 * include/grub/ntfs.h (BMP_LEN): Removed.
5130
c40fd116 51312008-09-22 Bean <bean123ch@gmail.com>
5132
81a06771 5133 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 5134 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5135
5136 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5137 error occurs, as grub_disk_open will call grub_disk_close, which will
5138 call p->close (scsi).
5139
81a06771 51402008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 5141
5142 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5143 (AC_PREREQ): Bumped to 2.59.
5144 (AC_TRY_COMPILE): Replace obsolete macro with ...
5145 (AC_COMPILE_IFELSE): ... this.
5146 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5147 (AC_LINK_IFELSE): ... this.
5148
5dc43410 51492008-09-21 Felix Zielcke <fzielcke@z-51.de>
5150
5151 * autogen.sh: Add a call to `gendistlist.sh'.
5152
9035dce4 51532008-09-19 Christian Franke <franke@computer.org>
5154
5155 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5156 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5157 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5158 Export __enable_execute_stack() to modules.
5159 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5160 New function.
5161
7fd75377 51622008-09-09 Felix Zielcke <fzielcke@z-51.de>
5163
040030b3 5164 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5165 Sort the list.
5166
51672008-09-09 Felix Zielcke <fzielcke@z-51.de>
5168
5169 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 5170 #include <grub/util/hostdisk.h>.
5171
89d5ffcf 51722008-09-08 Robert Millan <rmh@aybabtu.com>
5173
5174 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5175 segments when their filesz is zero (grub_file_read() interprets
81a06771 5176 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 5177 Use `lowest_segment' rather than 0 for calculating the current
5178 segment load address.
5179
40da438f 51802008-09-08 Robert Millan <rmh@aybabtu.com>
5181
5182 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5183 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5184 clobbered useful information.
5185
ddbf5556 51862008-09-08 Robert Millan <rmh@aybabtu.com>
5187
5188 * include/grub/util/biosdisk.h: Move to ...
5189 * include/grub/util/hostdisk.h: ... here. Update all users.
5190 * util/biosdisk.c: Move to ...
5191 * util/hostdisk.c: ... here. Update all users.
5192
783d0f48 51932008-09-07 Robert Millan <rmh@aybabtu.com>
5194
5195 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5196 variables.
5197 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5198 and length can be stored directly in the `mbi->mmap_addr' and
5199 `mbi->mmap_length' struct fields.
5200
548e2ea5 52012008-09-07 Robert Millan <rmh@aybabtu.com>
5202
5203 * conf/i386.rmk: New file. Provides declaration for building
5204 `cpuid.mod'.
5205 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5206 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5207 variables.
5208 Include `conf/i386.mk'.
5209 * conf/i386-efi.rmk: Likewise.
5210 * conf/x86_64-efi.rmk: Likewise.
5211 * conf/i386-coreboot.rmk: Likewise.
5212 * conf/i386-ieee1275.rmk: Likewise.
5213
0ea85a37 52142008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5215
5216 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5217 Adds optimization support for BGR based modes.
5218
5219 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5220 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5221 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5222 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5223 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5224 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5225 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5226 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5227 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5228 (grub_video_i386_vbeblit_index_index): Likewise.
5229 (grub_video_i386_vbeblit_replace_directN): Added.
5230 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5231 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5232 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5233 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5234 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5235 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 5236 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 5237 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5238 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5239 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5240 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5241 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5242 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5243
5244 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5245 (grub_video_i386_vbefill_R8G8B8): Likewise.
5246 (grub_video_i386_vbefill_index): Likewise.
5247 (grub_video_i386_vbefill_direct32): Added.
5248 (grub_video_i386_vbefill_direct24): Likewise.
5249 (grub_video_i386_vbefill_direct16): Likewise.
5250 (grub_video_i386_vbefill_direct8): Likewise.
5251
81a06771 5252 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 5253 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5254 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5255 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5256 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5257 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 5258
0ea85a37 5259 * video/video.c (grub_video_get_blit_format): Updated to use new
5260 blit formats. Added handling for 16 bit color modes.
81a06771 5261
5262 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 5263 fillers.
5264 (common_blitter): Updated to use new blitters.
5265
5266 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5267 Removed.
5268 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5269 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5270 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5271 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5272 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5273 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5274 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5275 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5276 (grub_video_i386_vbeblit_index_index): Likewise.
5277 (grub_video_i386_vbeblit_replace_directN): Added.
5278 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5279 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5280 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5281 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5282 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5283 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5284 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5285 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5286 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5287 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5288 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5289 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5290 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 5291
0ea85a37 5292 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5293 (grub_video_i386_vbefill_R8G8B8): Likewise.
5294 (grub_video_i386_vbefill_index): Likewise.
5295 (grub_video_i386_vbefill_direct32): Added.
5296 (grub_video_i386_vbefill_direct24): Likewise.
5297 (grub_video_i386_vbefill_direct16): Likewise.
5298 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 5299
0ea85a37 5300 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5301 types.
81a06771 5302
0ea85a37 5303 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5304 types.
81a06771 5305
0ea85a37 5306 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5307 blitter types.
81a06771 5308
0ea85a37 5309 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5310 types.
5311
e8a83df6 53122008-09-06 Felix Zielcke <fzielcke@z-51.de>
5313
5314 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5315 RAID level 1.
5316
6bcd8ee5 53172008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 5318
6bcd8ee5 5319 * fs/iso9660.c (grub_iso9660_date): New structure.
5320 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5321 (grub_iso9660_uuid): New function.
c375ae58 5322
59261157 53232008-09-05 Bean <bean123ch@gmail.com>
5324
5325 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5326
5327 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5328 insensitive bit for names in Win32 and Win32 & DOS namespace.
5329
5330 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5331
5332 * include/grub/types.h (LONG_MAX): Likewise.
5333
58b6645a 53342008-09-04 Felix Zielcke <fzielcke@z-51.de>
5335
4ee55921 5336 * util/getroot.c: Include <config.h>.
5337 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5338 add support for /dev/md/N devices and handle LVM double dash escaping.
5339
53402008-09-04 Felix Zielcke <fzielcke@z-51.de>
5341
5342 * config.guess: Update to latest version from config git.
5343 * config.sub: Likewise.
58b6645a 5344
9124f65d 53452008-09-03 Robert Millan <rmh@aybabtu.com>
5346
5347 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5348 `disk->total_sectors'.
5349
81a06771 53502008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 5351
5352 * include/grub/normal.h: Fixed incorrect comment for
5353 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5354
81a06771 53552008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 5356
5357 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5358 values with defines.
5359
5360 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5361 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5362 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5363 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5364 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5365 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5366 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5367 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5368 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5369 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5370 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5371 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5372 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5373 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5374 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5375 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5376 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5377 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5378 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5379
93d5cbf8 53802008-08-31 Robert Millan <rmh@aybabtu.com>
5381
5382 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5383 declaration.
5384 (grub_multiboot): Fix a few warnings.
5385
21751d50 53862008-08-31 Robert Millan <rmh@aybabtu.com>
5387
5388 * loader/i386/pc/multiboot.c: Update comment not to say that
5389 boot_device support is unimplemented.
5390
e27a75c5 53912008-08-31 Robert Millan <rmh@aybabtu.com>
5392
5393 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5394 or memory map support are unimplemented.
5395
81a06771 53962008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 5397
5398 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5399
81a06771 54002008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 5401
5402 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5403 total video memory in 'vbeinfo' output; show color format details for
5404 each video mode.
5405
7c5d8d95 54062008-08-30 Pavel Roskin <proski@gnu.org>
5407
5408 * util/genmoddep.c: Remove for real this time.
5409 * DISTLIST: Remove util/genmoddep.c.
5410
4cebd25a 54112008-08-30 Robert Millan <rmh@aybabtu.com>
5412
5413 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5414 as required by Multiboot spec (it was already 4-byte aligned, but
5415 only by chance).
5416
b497a269 54172008-08-29 Pavel Roskin <proski@gnu.org>
5418
e3925185 5419 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5420 * kern/powerpc/ieee1275/startup.S: ... this.
5421 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5422 * DISTLIST: Likewise.
5423
b497a269 5424 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5425 grub/cpu/kernel.h. Add start label for consistency with other
5426 platforms. Add grub_prefix immediately after start. Add jump
5427 to the code after grub_prefix.
5428 * include/grub/powerpc/kernel.h: Provide valid values for
5429 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5430
6e5a42fe 54312008-08-29 Bean <bean123ch@gmail.com>
5432
5433 * configure.ac: Change host_os to cygwin for mingw.
5434 (asprintf): New check for function.
5435
5436 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5437 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5438
5439 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 5440 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 5441 sync, sleep and grub_util_get_disk_size for mingw.
5442
5443 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5444 to get size in mingw.
5445 (open_device): Use flag O_BINARY if it's defined.
5446 (find_root_device): Add dummy code for mingw.
5447
5448 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5449 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5450 (get_scsi_disk_name): Return 0 for mingw.
5451
5452 * util/hostfs.c: #include <grub/util/misc.h>.
5453 (grub_hostfs_open): Use "rb" flag to open file, use
5454 grub_util_get_disk_size to get disk size for mingw.
5455
5456 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5457 (asprintf): New function if HAVE_ASPRINTF is not set.
5458 (sync): New function for mingw.
5459 (sleep): Likewise.
5460 (grub_util_get_disk_size): Likewise.
5461
ab3f2673 54622008-08-28 Pavel Roskin <proski@gnu.org>
5463
5464 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5465 kern/time.c.
5466
1c282483 54672008-08-28 Robert Millan <rmh@aybabtu.com>
5468
5469 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5470
678e849c 54712008-08-28 Robert Millan <rmh@aybabtu.com>
5472
5473 Change find_grub_drive() syntax so it doesn't prevent it from
5474 detecting NULL names as errors.
5475
5476 * util/biosdisk.c (find_grub_drive): Move free slot search code
5477 from here ...
5478 (find_free_slot): ... to here.
5479 (read_device_map): Use find_free_slot() to search for free slots.
5480
965c75ca 54812008-08-27 Marco Gerards <marco@gnu.org>
5482
5483 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5484 (scsi_mod_SOURCES): New variable.
5485 (scsi_mod_CFLAGS): Likewise
5486 (scsi_mod_LDFLAGS): Likewise.
5487
5488 * disk/scsi.c: New file.
5489
5490 * include/grub/scsi.h: Likewise.
5491
5492 * include/grub/scsicmd.h: Likewise.
5493
5494 * disk/ata.c: Include <grub/scsi.h>.
5495 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5496 instead.
5497 (grub_ata_iterate): Skip ATAPI devices.
5498 (grub_ata_open): Only handle ATAPI devices.
5499 (struct grub_atapi_read): Removed.
5500 (grub_atapi_readsector): Likewise.
5501 (grub_ata_read): No longer handle ATAPI devices.
5502 (grub_ata_write): Likewise.
5503 (grub_atapi_iterate): New function.
5504 (grub_atapi_read): Likewise.
5505 (grub_atapi_write): Likewise.
5506 (grub_atapi_open): Likewise.
5507 (grub_atapi_close): Likewise.
5508 (grub_atapi_dev): New variable.
5509 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5510 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5511
5512 * include/grub/disk.h (enum grub_disk_dev_id): Add
5513 `GRUB_DISK_DEVICE_SCSI_ID'.
5514
c07ae501 55152008-08-26 Robert Millan <rmh@aybabtu.com>
5516
5517 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5518 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5519 descriptive.
5520
5ed20adc 55212008-08-23 Bean <bean123ch@gmail.com>
5522
5523 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5524 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5525 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5526 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5527 dm_nv.mod.
5528 (raid5rec_mod_SOURCES): New macro.
5529 (raid5rec_mod_CFLAGS): Likewise.
5530 (raid5rec_mod_LDFLAGS): Likewise.
5531 (raid6rec_mod_SOURCES): Likewise.
5532 (raid6rec_mod_CFLAGS): Likewise.
5533 (raid6rec_mod_LDFLAGS): Likewise.
5534 (mdraid_mod_SOURCES): Likewise.
5535 (mdraid_mod_CFLAGS): Likewise.
5536 (mdraid_mod_LDFLAGS): Likewise.
5537 (dm_nv_mod_SOURCES): Likewise.
5538 (dm_nv_mod_CFLAGS): Likewise.
5539 (dm_nv_mod_LDFLAGS): Likewise.
5540
5541 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5542 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5543 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5544
5545 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5546 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5547
5548 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5549
5550 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5551
5552 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5553
5554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5555
5556 * disk/raid5_recover.c: New file.
5557
5558 * disk/raid6_recover.c: Likewise.
5559
5560 * disk/mdraid_linux.c: Likewise.
5561
5562 * disk/dmraid_nvidia.c: Likewise.
5563
5564 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5565 ULONG_MAX.
5566
5567 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5568 calculate the size of raid device.
5569 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5570 different layout of raid5.
5571 (grub_raid_scan_device): Remove code specific to mdraid.
5572 (grub_raid_list): New variable.
5573 (free_array): New function.
5574 (grub_raid_register): Likewise.
5575 (grub_raid_unregister): Likewise.
5576 (grub_raid_rescan): Likewise.
5577 (GRUB_MOD_INIT): Don't iterate device here.
5578 (GRUB_MOD_FINI): Use free_array to release resource.
5579
5580 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5581 (grub_raid5_recover_func_t): New function variable type.
5582 (grub_raid6_recover_func_t): Likewise.
5583 (grub_raid5_recover_func): New variable.
5584 (grub_raid6_recover_func): Likewise.
5585 (grub_raid_register): New function.
5586 (grub_raid_unregister): Likewise.
5587 (grub_raid_rescan): Likewise.
5588 (grub_raid_block_xor): Likewise.
5589
5590 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5591 (CMD_CRC): New macro.
5592 (part): Removed.
5593 (read_file): Handle device as well as file.
5594 (cmd_crc): New function.
5595 (fstest): Handle multiple disks.
5596 (options): Remove part, raw and long, add root and diskcount.
5597 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 5598 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 5599 add handling for the new options, support multiple disks.
5600
5601 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5602
29c18915 56032008-08-23 Bean <bean123ch@gmail.com>
5604
5605 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5606
5607 * genfslist.sh: Ignore kernel.mod.
5608
5609 * genpartmaplist.sh: Likewise.
5610
8415f261 56112008-08-23 Robert Millan <rmh@aybabtu.com>
5612
5613 * util/getroot.c (find_root_device): Skip anything that starts with
5614 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5615
d5a7dc5b 56162008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 5617
d5a7dc5b 5618 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5619 * util/grub.d/00_header.in: Allow the administrator to change default
5620 gfxmode via ${GRUB_GFXMODE}.
5621
380cfbb4 56222008-08-21 Felix Zielcke <fzielcke@z-51.de>
5623
5624 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5625
c9baafe7 56262008-08-21 Robert Millan <rmh@aybabtu.com>
5627
5628 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5629 loader.
5630 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5631 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5632
e290bef2 56332008-08-20 Carles Pina i Estany <carles@pina.cat>
5634
5635 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5636 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5637
f9dbfc96 56382008-08-19 Robert Millan <rmh@aybabtu.com>
5639
5640 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5641 (struct grub_virtual_screen): Remove `cursor_color'.
5642 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5643 initialization.
5644 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5645
dd6bd6ab 56462008-08-18 Robert Millan <rmh@aybabtu.com>
5647
5648 Unify (identical) linux_normal.c files.
5649 * loader/i386/efi/linux_normal.c: Move from here ...
5650 * loader/linux_normal.c: ... to here. Update all users.
5651 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5652 * loader/i386/ieee1275/linux_normal.c: Likewise.
5653
7f42f83e 56542008-08-18 Robert Millan <rmh@aybabtu.com>
5655
5656 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5657 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5658 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5659 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5660 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5661 New macros.
5662 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5663 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5664 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5665 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5666 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5667 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5668 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5669 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5670 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5671 portably using grub_getxy().
5672 Replace `-EFI' with `-bzImage' in boot message.
5673
38487ddb 56742008-08-17 Robert Millan <rmh@aybabtu.com>
5675
5676 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5677
deceb3ec 56782008-08-17 Robert Millan <rmh@aybabtu.com>
5679
5680 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5681
5682 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5683 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5684 (grub_machine_mmap_iterate): New function declaration.
5685 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5686 structure.
5687 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5688 macros.
5689
5690 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5691 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5692 Move e820 parsing from here ...
5693 * kern/i386/pc/mmap.c: New file.
5694 (grub_machine_mmap_iterate): ... to here.
5695
5696 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5697 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5698 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5699 (grub_available_iterate): Redeclare to return `void', and redeclare
5700 its hook to use grub_uint64_t as addr and size parameters, and rename
5701 to ...
5702 (grub_machine_mmap_iterate): ... this. Update all users.
5703
5704 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5705 to make it more readable. Rename to ...
5706 (grub_machine_mmap_iterate): ... this.
5707
5708 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5709 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5710 (grub_multiboot): Allocate an extra region after the payload, and fill
5711 it with a Multiboot memory map. Adjust a.out loader to calculate size
5712 with the extra space.
5713 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5714 with the extra space.
5715
f8aa0f43 57162008-08-17 Carles Pina i Estany <carles@pina.cat>
5717
9807deb9 5718 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 5719
605f5bb6 57202008-08-17 Felix Zielcke <fzielcke@z-51.de>
5721
5722 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5723 mdate-sh to the list `find' searches for.
5724 * DISTLIST: Regenerated.
5725
210db6c6 57262008-08-16 Felix Zielcke <fzielcke@z-51.de>
5727
5728 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5729 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 5730 genmoddep.awk, gensymlist.sh.in.
5731 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 5732 * DISTLIST: Regenerated.
48cdbfd4 5733 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 5734
1082b929 57352008-08-16 Robert Millan <rmh@aybabtu.com>
5736
5737 * disk/raid.c (grub_raid_init): Handle/report errors set by
5738 grub_device_iterate().
5739 * disk/lvm.c (grub_lvm_init): Likewise.
5740
42ce5170 57412008-08-15 Bean <bean123ch@gmail.com>
5742
5743 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5744 and datehook.mod.
5745 (datetime_mod_SOURCES): New macro.
5746 (datetime_mod_CFLAGS): Likewise.
5747 (datetime_mod_LDFLAGS): Likewise.
5748 (date_mod_SOURCES): Likewise.
5749 (date_mod_CFLAGS): Likewise.
5750 (date_mod_LDFLAGS): Likewise.
5751 (datehook_mod_SOURCES): Likewise.
5752 (datehook_mod_CFLAGS): Likewise.
5753 (datehook_mod_LDFLAGS): Likewise.
5754
5755 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5756 and datehook.mod.
5757 (datetime_mod_SOURCES): New macro.
5758 (datetime_mod_CFLAGS): Likewise.
5759 (datetime_mod_LDFLAGS): Likewise.
5760 (date_mod_SOURCES): Likewise.
5761 (date_mod_CFLAGS): Likewise.
5762 (date_mod_LDFLAGS): Likewise.
5763 (datehook_mod_SOURCES): Likewise.
5764 (datehook_mod_CFLAGS): Likewise.
5765 (datehook_mod_LDFLAGS): Likewise.
5766
5767 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5768 and datehook.mod.
5769 (datetime_mod_SOURCES): New macro.
5770 (datetime_mod_CFLAGS): Likewise.
5771 (datetime_mod_LDFLAGS): Likewise.
5772 (date_mod_SOURCES): Likewise.
5773 (date_mod_CFLAGS): Likewise.
5774 (date_mod_LDFLAGS): Likewise.
5775 (datehook_mod_SOURCES): Likewise.
5776 (datehook_mod_CFLAGS): Likewise.
5777 (datehook_mod_LDFLAGS): Likewise.
5778
5779 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5780 and datehook.mod.
5781 (datetime_mod_SOURCES): New macro.
5782 (datetime_mod_CFLAGS): Likewise.
5783 (datetime_mod_LDFLAGS): Likewise.
5784 (date_mod_SOURCES): Likewise.
5785 (date_mod_CFLAGS): Likewise.
5786 (date_mod_LDFLAGS): Likewise.
5787 (datehook_mod_SOURCES): Likewise.
5788 (datehook_mod_CFLAGS): Likewise.
5789 (datehook_mod_LDFLAGS): Likewise.
5790
5791 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5792 and datehook.mod.
5793 (datetime_mod_SOURCES): New macro.
5794 (datetime_mod_CFLAGS): Likewise.
5795 (datetime_mod_LDFLAGS): Likewise.
5796 (date_mod_SOURCES): Likewise.
5797 (date_mod_CFLAGS): Likewise.
5798 (date_mod_LDFLAGS): Likewise.
5799 (datehook_mod_SOURCES): Likewise.
5800 (datehook_mod_CFLAGS): Likewise.
5801 (datehook_mod_LDFLAGS): Likewise.
5802
5803 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5804
5805 * commands/date.c: New file.
5806
5807 * hook/datehook.c: Likewise.
5808
5809 * include/grub/lib/datetime.h: Likewise.
5810
5811 * include/grub/i386/cmos.h: Likewise.
5812
5813 * lib/datetime.c: Likewise.
5814
5815 * lib/i386/datetime.c: Likewise.
5816
5817 * lib/efi/datetime.c: Likewise.
5818
0e9242da 58192008-08-14 Robert Millan <rmh@aybabtu.com>
5820
5821 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5822 (grub_mkelfimage_SOURCES): New variable.
5823 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5824
5825 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5826 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5827 * conf/powerpc-ieee1275.rmk: Likewise.
5828 * conf/i386-ieee1275.rmk: Likewise.
5829
5830 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5831 * kern/i386/coreboot/init.c: Likewise.
5832
5833 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5834 with `<grub/cpu/kernel.h>'.
5835 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5836 to ...
5837 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5838 * kern/i386/coreboot/startup.S: Likewise.
5839
5840 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5841 (GRUB_MOD_GAP): Remove.
5842 * include/grub/powerpc/kernel.h: New file.
5843 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5844 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5845 * include/grub/i386/kernel.h: New file.
5846 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5847 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5848 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5849
5850 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5851 `grub-mkelfimage'.
5852 Use --directory when invoking grub_mkimage.
5853
5854 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5855 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5856 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5857 and GRUB_KERNEL_CPU_PREFIX.
5858
b86408f8 58592008-08-14 Felix Zielcke <fzielcke@z-51.de>
5860
d5e619ca 5861 * include/grub/err.h (grub_err_printf): New function prototype.
5862 * util/misc.c (grub_err_printf): New function.
5863 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5864 grub_printf.
5865 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5866
7161f0e0 58672008-08-13 Robert Millan <rmh@aybabtu.com>
5868
5869 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5870
a1967522 58712008-08-13 Robert Millan <rmh@aybabtu.com>
5872
5873 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5874 boot entry.
5875
371458b5 58762008-08-12 Robert Millan <rmh@aybabtu.com>
5877
5878 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5879 of the relocation code from here ...
5880 (grub_multiboot): ... to here.
5881 (forward_relocator, backward_relocator): Move from here ...
5882 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5883 (grub_multiboot_backward_relocator): ... to here.
5884 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5885 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5886 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5887 (grub_multiboot_forward_relocator_end)
5888 (grub_multiboot_backward_relocator)
5889 (grub_multiboot_backward_relocator_end): New variables.
5890
05f9452b 58912008-08-12 Bean <bean123ch@gmail.com>
5892
5893 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5894
20024ab0 58952008-08-11 Robert Millan <rmh@aybabtu.com>
5896
5897 * kern/i386/linuxbios/startup.S: Move from here ...
5898 * kern/i386/coreboot/startup.S: ... to here.
5899
5900 * kern/i386/linuxbios/init.c: Move from here ...
5901 * kern/i386/coreboot/init.c: ... to here.
5902
5903 * kern/i386/linuxbios/table.c: Move from here ...
5904 * kern/i386/coreboot/mmap.c: ... to here.
5905
5906 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5907
e352e9cd 59082008-08-11 Robert Millan <rmh@aybabtu.com>
5909
5910 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5911 errors. Leave it to the upper layer to handle them.
5912
2d05bc6a 59132008-08-09 Christian Franke <franke@computer.org>
5914
5915 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5916 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5917 Install `grub.d/10_windows' only on Cygwin.
5918 * configure.ac: Add subst of `target_os'.
5919 Check `target_os' also before setting TARGET_OBJ2ELF.
5920 Add `--enable-grub-pe2elf'.
5921
042bd419 59222008-08-08 Robert Millan <rmh@aybabtu.com>
5923
5924 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5925 (grub_last_time): Change type to grub_uint64_t.
5926 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5927 (grub_disk_close): Likewise.
5928
5929 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5930 (run_menu): Migrate code from to using grub_get_time_ms().
5931
5932 * util/misc.c (grub_get_time_ms): New function.
5933
7f280db5 59342008-08-08 Marco Gerards <marco@gnu.org>
5935
5936 * disk/ata.c (grub_ata_regget): Change return type to
5937 `grub_uint8_t'.
5938 (grub_ata_regget2): Likewise.
5939 (grub_ata_wait_status): New function.
5940 (grub_ata_wait_busy): Removed function, updated all users to use
5941 `grub_ata_wait_status'.
5942 (grub_ata_wait_drq): Likewise.
5943 (grub_ata_cmd): New function.
5944 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5945 error handling.
5946 (grub_ata_pio_write): Add error handling.
5947 (grub_atapi_identify): Likewise.
5948 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5949 handling.
5950 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5951 handling. Actually use the detected registers. Reorder the
5952 detection logic such that it is easier to read.
5953 (grub_ata_pciinit): Do not assign the same ID to each controller.
5954 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5955 handling.
5956 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5957
5958 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5959
1fbc5e66 59602008-08-08 Marco Gerards <marco@gnu.org>
5961
5962 * NEWS: Update.
5963
819ce6c0 59642008-08-07 Bean <bean123ch@gmail.com>
5965
5966 * include/grub/x86_64/pci.h: New file.
5967
5c41d44d 59682008-08-07 Christian Franke <franke@computer.org>
5969
5970 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5971 (TIMER2_GATE): Likewise.
5972 (grub_pit_wait): Add enable/disable of the timer2 gate
5973 bit of port 0x61. This fixes a possible infinite loop.
5974
5ebc275d 59752008-08-07 Bean <bean123ch@gmail.com>
5976
5977 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5978 kern/i386/tsc.c and kern/i386/pit.c.
5979
5980 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5981 x86_64 platform.
5982
5983 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5984 <grub/i386/tsc.h>.
5985
5986 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5987
e383b3d0 59882008-08-07 Bean <bean123ch@gmail.com>
5989
5990 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5991
5992 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5993
5994 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5995 multiple inclusion. Add #include <grub/types.h>.
5996
1cbb58ac 59972008-08-06 Christian Franke <franke@computer.org>
5998
5999 * conf/common.rmk: Build and install `10_windows'.
6000 * util/grub.d/10_windows.in: New script.
6001
337f5a1e 60022008-08-06 Pavel Roskin <proski@gnu.org>
6003
6004 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6005
057bc4ac 60062008-08-06 Robert Millan <rmh@aybabtu.com>
6007
6008 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6009 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6010
2b99f123 60112008-08-06 Bean <bean123ch@gmail.com>
6012
6013 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6014 (grub_pxefs_fs_int): Remove dummy definition.
6015 (grub_pxefs_open): Use data->block_size to store the current block
6016 size setting.
6017 (grub_pxefs_read): Use block size stored in data->block_size. As the
6018 value of grub_pxe_blksize can be changed after the file is opened.
6019
9f0234cb 60202008-08-06 Bean <bean123ch@gmail.com>
6021
6022 * fs/i386/pc/pxe.c (curr_file): new variable.
6023 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6024 require the dummy internal file system anymore.
6025 (grub_pxefs_read): Removed.
6026 (grub_pxefs_close): Likewise.
6027 (grub_pxefs_fs_int): Likewise.
6028 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6029 connection when we switch file.
6030 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6031
a55d42e0 60322008-08-06 Robert Millan <rmh@aybabtu.com>
6033
6034 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6035 `halt.mod'.
6036 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6037 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6038
6039 * kern/i386/halt.c: New file.
6040 * kern/i386/reboot.c: Likewise.
6041 * include/grub/i386/reboot.h: Likewise.
6042 * include/grub/i386/halt.h: Likewise.
6043
6044 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6045 Include `<grub/cpu/halt.h>'.
6046 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6047 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6048
6049 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6050 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6051 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6052 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6053 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6054 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6055 from here ...
6056 * include/grub/i386/at_keyboard.h: ... to here.
6057
24371d26 60582008-08-05 Robert Millan <rmh@aybabtu.com>
6059
6060 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6061 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6062 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6063 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6064 `kern/generic/millisleep.c'.
6065
6066 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6067 instead of grub_get_rtc().
6068 (grub_tsc_init): Initialize `tsc_boot_time'.
6069
6070 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6071 (grub_machine_init): Use grub_tsc_init() rather than
6072 installing an RTC-based handler via grub_install_get_time_ms().
6073
6074 * kern/i386/pit.c: New file.
6075 * include/grub/i386/pit.h: Likewise.
6076
9e7007b3 60772008-08-05 Bean <bean123ch@gmail.com>
6078
6079 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6080
6081 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6082 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6083 (pxe_mod_SOURCES): New macro.
6084 (pxe_mod_CFLAGS): Likewise.
6085 (pxe_mod_LDFLAGS): Likewise.
6086 (pxecmd_mod_SOURCES): Likewise.
6087 (pxecmd_mod_CFLAGS): Likewise.
6088 (pxecmd_mod_LDFLAGS): Likewise.
6089
6090 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6091 (grub_pxe_call): Likewise.
6092
6093 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6094
6095 * commands/i386/pc/pxecmd.c: New file.
6096
9f0234cb 6097 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 6098
6099 * include/grub/i386/pc/pxe.h: Likewise.
6100
6977d49f 61012008-08-05 Bean <bean123ch@gmail.com>
6102
6103 * util/console.c (grub_console_cur_color): New variable.
6104 (grub_console_standard_color): Likewise.
6105 (grub_console_normal_color): Likewise.
6106 (grub_console_highlight_color): Likewise.
6107 (color_map): Likewise.
6108 (use_color): Likewise.
6109 (NUM_COLORS): New macro.
6110 (grub_ncurses_setcolorstate): Handle color properly.
6111 (grub_ncurses_setcolor): Don't change color here, just remember the
6112 settings, color will be set in grub_ncurses_setcolorstate.
6113 (grub_ncurses_getcolor): New function.
6114 (grub_ncurses_init): Initialize color pairs.
6115 (grub_ncurses_term): New member grub_ncurses_getcolor.
6116
9c2ff3ee 61172008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 6118
9c2ff3ee 6119 High resolution timer support. Implemented for x86 CPUs using TSC.
6120 Extracted generic grub_millisleep() so it's linked in only as needed.
6121 This requires a Pentium compatible CPU; if the RDTSC instruction is
6122 not supported, then it falls back on the generic grub_get_time_ms()
6123 implementation that uses the machine's RTC.
6124
6125 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6126 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6127 `kern/generic/millisleep.c'.
6128
6129 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6130 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6131
6132 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6133 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6134
6135 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6136
6137 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6138 `kern/generic/millisleep.c'.
6139
6140 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6141
6142 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6143
6144 * kern/generic/rtc_get_time_ms.c: New file.
6145
6146 * kern/generic/millisleep.c: New file.
337f5a1e 6147
9c2ff3ee 6148 * kern/misc.c: Don't include
6149 <kern/time.h> anymore.
6150 (grub_millisleep_generic): Removed.
6151
6152 * commands/sleep.c (grub_interruptible_millisleep): Uses
6153 grub_get_time_ms() instead of grub_get_rtc().
6154
6155 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6156 function.
6157 (grub_cpu_is_cpuid_supported): New inline function.
6158 (grub_cpu_is_tsc_supported): New inline function.
6159 (grub_tsc_init): New function prototype.
6160 (grub_tsc_get_time_ms): New function prototype.
6161
6162 * kern/i386/tsc.c (grub_get_time_ms): New file.
6163
6164 * include/grub/time.h: Include <grub/types.h.
6165 (grub_millisleep_generic): Removed.
6166 (grub_get_time_ms): New prototype.
6167 (grub_install_get_time_ms): New prototype.
6168 (grub_rtc_get_time_ms): New prototype.
6169
6170 * kern/time.c (grub_get_time_ms): New function.
6171 (grub_install_get_time_ms): New function.
6172
6173 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6174 <grub/time.h> anymore.
6175 (grub_millisleep): Removed.
6176 (grub_machine_init): Call grub_tsc_init.
6177
6178 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6179 get_time_ms() implementation.
6180
6181 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6182 (ieee1275_get_time_ms): New function.
6183 (grub_machine_init): Install get_time_ms() implementation.
6184
6185 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6186 (grub_machine_init): Call grub_tsc_init().
6187 (grub_millisleep): Removed.
bf06a93f 6188
9c2ff3ee 6189 * kern/ieee1275/init.c (grub_millisleep): Removed.
6190 (grub_machine_init): Install ieee1275_get_time_ms()
6191 implementation.
6192 (ieee1275_get_time_ms): New function.
6193 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6194 real work.
6195
9ec92aaf 61962008-08-05 Marco Gerards <marco@gnu.org>
6197
6198 * disk/ata.c: Include <grub/pci.h>.
6199 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6200 (grub_ata_initialize): Rewritten.
6201 (grub_ata_device_initialize): New function.
6202
8d23f507 62032008-08-04 Pavel Roskin <proski@gnu.org>
6204
6205 * kern/main.c: Include grub/mm.h.
6206
5e15ee3d 62072008-08-04 Robert Millan <rmh@aybabtu.com>
6208
6209 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6210 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6211 corruption problem).
6212
a9053f8f 62132008-08-04 Robert Millan <rmh@aybabtu.com>
6214
6215 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6216 warnings introduced in my last commit.
6217
dd19c7d7 62182008-08-03 Robert Millan <rmh@aybabtu.com>
6219
6220 Make PCI available on all i386 architectures.
6221
6222 * include/grub/i386/pc/pci.h: Move from here ...
6223 * include/grub/i386/pci.h: ... to here.
6224
6225 * include/grub/i386/pc/pci.h: Remove.
6226 * include/grub/i386/efi/pci.h: Remove.
6227 * include/grub/x86_64/efi/pci.h: Remove.
6228
6229 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6230 `<grub/cpu/pci.h>'.
6231
6232 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6233 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6234 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6235
6236 * conf/i386-ieee1275.rmk: Likewise.
6237
e14a6184 62382008-08-03 Robert Millan <rmh@aybabtu.com>
6239
6240 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6241 (grub_console_setcursor): Make it possible to set cursor off.
6242
52768e37 62432008-08-03 Robert Millan <rmh@aybabtu.com>
6244
6245 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6246 of modules instead of assuming which platform provides what.
6247 * util/update-grub.in: Likewise.
6248
2d52f57f 62492008-08-03 Robert Millan <rmh@aybabtu.com>
6250
6251 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6252 instead of `grub_install_dos_part' to determine whether a drive needs
6253 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 6254 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 6255
2a5cd121 62562008-08-02 Robert Millan <rmh@aybabtu.com>
6257
6258 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6259
93808428 62602008-08-02 Robert Millan <rmh@aybabtu.com>
6261
6262 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6263 of informational grub_dprintf() calls.
6264
3bd0a12a 62652008-08-02 Robert Millan <rmh@aybabtu.com>
6266
6267 * disk/memdisk.c (memdisk_size): Don't initialize.
6268 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6269
6270 * include/grub/i386/pc/kernel.h
6271 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6272 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6273 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6274 (grub_arch_memdisk_size): Remove.
6275
6276 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6277 field (was only used to transfer a constant). Add `type' field to
6278 support multiple module types.
6279 (grub_module_iterate): New function.
6280
6281 * kern/device.c (grub_device_open): Do not hide error messages
6282 when grub_disk_open() fails. Use grub_print_error() instead.
6283
6284 * kern/i386/pc/init.c (grub_arch_modules_addr)
6285 (grub_arch_memdisk_size): Remove functions.
6286 (grub_arch_modules_addr): Return the module address in high memory
6287 (now that it isn't copied anymore).
6288
6289 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6290 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6291 decompression routine (grub_total_module_size already includes that
6292 now). Don't copy modules back to low memory.
6293
6294 * kern/main.c: Include `<grub/mm.h>'.
6295 (grub_load_modules): Split out (and use) ...
6296 (grub_module_iterate): ... this function, which iterates through
6297 module objects and runs a hook.
6298 Comment out grub_mm_init_region() call, as it would cause non-ELF
6299 modules to be overwritten.
6300
6301 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6302 the memdisk image in its own region, make it part of the module list.
6303 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6304 (main): Parse --memdisk|-m option, and pass user-provided path as
6305 parameter to generate_image().
6306 (add_segments): Pass `memdisk_path' down to load_modules().
6307 (load_modules): Embed memdisk image in module section when requested.
6308 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6309 `header.type' instead of `header.offset'.
6310
6311 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6312 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6313 (memdisk_mod_LDFLAGS): New variables.
6314 * conf/i386-coreboot.rmk: Likewise.
6315 * conf/i386-ieee1275.rmk: Likewise.
6316
a927cc73 63172008-08-02 Robert Millan <rmh@aybabtu.com>
6318
6319 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6320 (backward_relocator): New variables. Used to allocate and relocate
6321 the payload, respectively.
6322 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 6323 address, install the appropriate relocator code in each bound of
a927cc73 6324 the payload, and set the entry point such that
6325 grub_multiboot_real_boot() will jump to one of them.
6326
6327 * kern/i386/loader.S (grub_multiboot_payload_size)
6328 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6329 (grub_multiboot_payload_entry_offset): New variables.
6330 (grub_multiboot_real_boot): Set cpu context to what the relocator
6331 expects, and jump to the relocator instead of the payload.
6332
6333 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6334 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6335 (grub_multiboot_payload_entry_offset): Export.
6336
b15d8a0c 63372008-08-01 Bean <bean123ch@gmail.com>
6338
6339 * normal/menu_entry.c (editor_getline): Don't return the original
6340 string as result, as it will be released by lexer once it has done
6341 using it.
6342
cdfb3d22 63432008-08-01 Robert Millan <rmh@aybabtu.com>
6344
6345 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6346 within menuentries, not before them.
6347 util/grub.d/10_hurd.in: Likewise.
6348
9175e93d 63492008-08-01 Bean <bean123ch@gmail.com>
6350
6351 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6352 (bufio_mod_SOURCES): New macro.
6353 (bufio_mod_CFLAGS): Likewise.
6354 (bufio_mod_LDFLAGS): Likewise.
6355
6356 * include/grub/bufio.h: New file.
6357
6358 * io/bufio.c: Likewise.
6359
6360 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6361 (grub_video_reader_png): Use grub_buffile_open to open file.
6362
6363 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6364 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6365
6366 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6367 (grub_video_reader_tga): Use grub_buffile_open to open file.
6368
6369 * font/manager.c: Include <grub/bufio.h>.
6370 (add_font): Use grub_buffile_open to open file.
6371
3d8383e7 63722008-07-31 Robert Millan <rmh@aybabtu.com>
6373
6374 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6375 ELF segments, use a macro for arbitrarily accessing any of them instead
6376 of preparing a pointer that allows access to one at a time.
6377 (grub_multiboot_load_elf64): Likewise.
6378
16e641b6 63792008-07-31 Bean <bean123ch@gmail.com>
6380
6381 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6382 GRUB_KERNEL_MACHINE_DATA_END.
6383
59198b72 63842008-07-30 Robert Millan <rmh@aybabtu.com>
6385
6386 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6387 Increase from 0x50 to 0x60.
6388 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6389 use UUIDs to identify the root drive for them. If that's not
6390 possible, abort.
6391 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6392 check, for cross-disk installs.
6393
ae88bca3 63942008-07-30 Robert Millan <rmh@aybabtu.com>
6395
6396 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6397 is non-empty, use it to set the `prefix' environment variable instead
6398 of the usual approach.
6399 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6400 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6401 environment variable instead of dummy make_install_device().
6402
6403 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6404 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 6405 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 6406
6407 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6408 New variable reference.
6409 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6410 New macro. Defines offset of `grub_prefix' within startup.S (relative
6411 to `start').
6412 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6413 section within startup.S (relative to `start').
6414 * include/grub/i386/coreboot/kernel.h: Likewise.
6415
6416 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6417 Overwrite grub_prefix with its contents, at the beginning of the
6418 first segment.
6419 (main): Understand -p|--prefix.
6420
14f41dd1 64212008-07-30 Robert Millan <rmh@aybabtu.com>
6422
6423 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6424
4ca049a3 64252008-07-30 Robert Millan <rmh@aybabtu.com>
6426
6427 * term/i386/pc/vga_text.c (grub_console_cls): Use
6428 grub_console_gotoxy() to go back to beginning of the screen.
6429 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6430
2921d337 64312008-07-29 Christian Franke <franke@computer.org>
6432
6433 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6434 Add conversion of emulated mount points on Cygwin.
6435
b609876d 64362008-07-29 Christian Franke <franke@computer.org>
6437
6438 * util/update-grub.in: Add a check for admin
6439 group on Cygwin.
6440 Remove old `grub.cfg.new' before creation.
6441 Add `-f' to `mv' to handle the different filesystem
6442 semantics of Windows.
6443
e93e4679 64442008-07-29 Bean <bean123ch@gmail.com>
6445
6446 * normal/main.c (get_line): Fix buffer overflow bug.
6447
41694fd0 64482008-07-28 Robert Millan <rmh@aybabtu.com>
6449
6450 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6451 (struct grub_apple_header): New struct. Describes the layout of
6452 the partmap header.
6453 (apple_partition_map_iterate): Check the header magic as well as the
6454 partition magic (which was already being checked).
6455
cfd0b4e6 64562008-07-28 Pavel Roskin <proski@gnu.org>
6457
6458 * genmk.rb: Add a warning to the beginning of the output that
6459 it's a generated file and should not be edited.
6460
93cce016 64612008-07-28 Robert Millan <rmh@aybabtu.com>
6462
6463 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6464 with the same number are found, just use issue a warning with
6465 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 6466
cd1df915 64672008-07-27 Robert Millan <rmh@aybabtu.com>
6468
6469 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6470 information.
6471
b70a8427 64722008-07-27 Bean <bean123ch@gmail.com>
6473
6474 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6475 (grub_fat_find_dir): Ignore case when comparing filename.
6476
8f5e379f 64772008-07-27 Bean <bean123ch@gmail.com>
6478
6479 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6480 smallino, as it's more descriptive, and i8count can be confused with
6481 the other field count.
6482 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6483 inode type.
6484
a85cd5a0 64852008-07-27 Bean <bean123ch@gmail.com>
6486
6487 * commands/crc.c: New file.
6488
6489 * lib/crc.c: Likewise.
6490
6491 * include/grub/lib/crc.h: Likewise.
6492
6493 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6494
6495 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6496 (hexdump): Move this function to ...
6497
6498 * lib/hexdump.c: ... here.
6499
6500 * include/grub/hexdump.h: Renamed to ...
6501
6502 * include/grub/lib/hexdump.h: ... this.
6503
6504 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6505
6506 * util/grub-editenv.c: Likewise.
6507
6508 * include/envblk.h: Renamed to ...
6509
6510 * include/lib/envblk.h: ... this.
6511
6512 * util/envblk.c: Renamed to ...
6513
6514 * lib/envblk.c: ... this.
6515
6516 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6517 lib/hexdump.c.
6518 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6519 (pkglib_MODULES): Add crc.mod.
6520 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6521 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6522 (crc_mod_SOURCES): New macro.
6523 (crc_mod_CFLAGS): Likewise.
6524 (crc_mod_LDFLAGS): Likewise.
6525
6526 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6527
6528 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6529
6530 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6531
6532 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6533
6534 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6535
c298def0 65362008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 6537
6538 * commands/help.c: Include <grub/term.h>.
6539 (TERM_WIDTH): Removed. Updated all users.
6540
cc349fb3 65412008-07-27 Pavel Roskin <proski@gnu.org>
6542
6543 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6544 spurious warnings about a comment within a comment.
6545
9051607e 65462008-07-25 Robert Millan <rmh@aybabtu.com>
6547
6548 * util/getroot.c (find_root_device): Skip devices that match
6549 /dev/dm-[0-9]. This lets the real device be found for any type of
6550 abstraction (LVM, EVMS, RAID..).
6551 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6552 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6553 device is found first, find_root_device() will now skip it.
6554
01453bfc 65552008-07-24 Pavel Roskin <proski@gnu.org>
6556
6557 * include/grub/types.h: Use __builtin_bswap32() and
6558 __builtin_bswap64() with gcc 4.3 and newer.
6559
6af9849f 65602008-07-24 Christian Franke <franke@computer.org>
6561
3a0fa256 6562 * util/i386/pc/grub-install.in: If `--debug' is specified,
6563 pass `--verbose' to grub-setup.
6564 Abort script if make_system_path_relative_to_its_root() fails.
6565
7810e747 65662008-07-24 Bean <bean123ch@gmail.com>
6567
6568 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6569 variable `target_platform' should be `platform'.
6570
42290e17 65712008-07-24 Bean <bean123ch@gmail.com>
6572
51cc5193 6573 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 6574 (grub_png_init_fixed_block): New function.
6575 (grub_png_decode_image_data): Handle fixed huffman code compression.
6576
2a8a80e4 65772008-07-24 Bean <bean123ch@gmail.com>
6578
6579 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6580 (grub_pe2elf_SOURCES): New macro.
6581 (CLEANFILES): Add grub-pe2elf.
6582
6583 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6584 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6585 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6586 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6587 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6588 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6589 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6590 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6591 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6592 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6593 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6594 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6595 (GRUB_PE32_DT_FUNCTION): Likewise.
6596 (GRUB_PE32_REL_I386_DIR32): Likewise.
6597 (GRUB_PE32_REL_I386_REL32): Likewise.
6598 (grub_pe32_symbol): New structure.
6599 (grub_pe32_reloc): Likewise.
6600
6601 * util/grub-pe2elf.c: New file.
6602
6603 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6604 start symbol in non pc platform.
6605
6606 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6607
6608 The following patches are from Christian Franke.
6609
6610 * include/grub/dl.h: Remove .previous, gas supports this only
6611 for ELF format.
6612
6613 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6614 Remove .type, gas supports this only for ELF format.
6615
6616 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6617 nullbytes in symbol table. This fixes an infinite loop if table is
6618 zero filled.
6619
6620 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6621 TARGET_IMG_LDFLAGS and EXEEXT.
6622
6623 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6624 TARGET_IMG_LDFLAGS_AC.
6625 (grub_CHECK_STACK_ARG_PROBE): New function.
6626
6627 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6628
6629 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6630
6631 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6632 to set TARGET_IMG_LD* accordingly.
6633 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6634 Add call to grub_CHECK_STACK_ARG_PROBE.
6635 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6636
6637 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6638
6639 * genmk.rb: Add EXEEXT to CLEANFILES.
6640
12ccdb75 66412008-07-23 Robert Millan <rmh@aybabtu.com>
6642
6643 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6644 define the codes for arrows and lines used for the menu).
6645 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6646 as well.
6647
6648 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6649 fonts, because the latter are too slow.
6650
18eeaf04 66512008-07-21 Bean <bean123ch@gmail.com>
6652
6653 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6654 a20. Run keyboard test last, as it will cause macbook to halt.
6655
b095e2ad 66562008-07-18 Pavel Roskin <proski@gnu.org>
6657
6658 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6659 load foreign architecture modules correctly anyway. Keep
6660 support for loading host architecture modules, whether we
6661 compile them or not.
6662
737feb35 66632008-07-17 Pavel Roskin <proski@gnu.org>
6664
3f4ce737 6665 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6666 change target_cpu. The compiler default can mismatch target_cpu
6667 in any case.
6668
4ad2d049 6669 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6670 * kern/efi/efi.c: Likewise.
6671
f6130a12 6672 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6673 target compiler is functional.
6674 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6675 are set up.
6676
58393a2d 6677 * configure.ac: Default to efi platform for x86_64-apple. Allow
6678 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6679 adjustments from the rest, only do them if target is not
6680 explicitly given. Merge other adjustments with the final sanity
6681 check. Remove an extraneous check for supported CPU. Be
6682 specific which CPU and which platform is not supported.
6683
737feb35 6684 * configure.ac: Default to pc platform for x86_64.
6685
546f966a 66862008-07-17 Robert Millan <rmh@aybabtu.com>
6687
6688 Partial LinuxBIOS -> Coreboot rename.
6689
6690 * conf/i386-linuxbios.rmk: Renamed to ...
6691 * conf/i386-coreboot.rmk: ... this.
6692 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6693 * configure.ac: Accept "coreboot" as input platform (but maintain
6694 compatibility with "linuxbios").
6695 * include/grub/i386/linuxbios: Renamed to ...
6696 * include/grub/i386/coreboot: ... this.
6697
20011694 66982008-07-17 Bean <bean123ch@gmail.com>
6699
6700 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 6701 (appleldr_mod_SOURCE): New variable.
20011694 6702 (appleldr_mod_CFLAGS): Likewise.
6703 (appleldr_mod_LDFLAGS): Likewise.
6704 (pci_mod_SOURCES): Likewise.
6705 (pci_mod_CFLAGS): Likewise.
6706 (pci_mod_LDFLAGS): Likewise.
6707 (lspci_mod_SOURCES): Likewise.
6708 (lspci_mod_CFLAGS): Likewise.
6709 (lspci_mod_LDFLAGS): Likewise.
6710
6711 * conf/x86_64-efi.rmk: New file.
6712
6713 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6714 macro.
6715 (grub_efidisk_write): Likewise.
6716
6717 * include/efi/api.h (efi_call_0): New macro.
6718 (efi_call_1): Likewise.
6719 (efi_call_2): Likewise.
6720 (efi_call_3): Likewise.
6721 (efi_call_4): Likewise.
6722 (efi_call_5): Likewise.
6723 (efi_call_6): Likewise.
6724
6725 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6726 grub_rescue_cmd_chainloader.
6727
6728 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6729 (grub_pe32_optional_header): Change some fields based on i386 or
6730 x86_64 platform.
6731 (GRUB_PE32_PE32_MAGIC): Likewise.
6732
6733 * include/grub/efi/uga_draw.h: New file.
6734
6735 * include/grub/elf.h (STN_ABS): New constant.
6736 (R_X86_64_NONE): Relocation constant for x86_64.
6737 (R_X86_64_64): Likewise.
6738 (R_X86_64_PC32): Likewise.
6739 (R_X86_64_GOT32): Likewise.
6740 (R_X86_64_PLT32): Likewise.
6741 (R_X86_64_COPY): Likewise.
6742 (R_X86_64_GLOB_DAT): Likewise.
6743 (R_X86_64_JUMP_SLOT): Likewise.
6744 (R_X86_64_RELATIVE): Likewise.
6745 (R_X86_64_GOTPCREL): Likewise.
6746 (R_X86_64_32): Likewise.
6747 (R_X86_64_32S): Likewise.
6748 (R_X86_64_16): Likewise.
6749 (R_X86_64_PC16): Likewise.
6750 (R_X86_64_8): Likewise.
6751 (R_X86_64_PC8): Likewise.
6752
6753 * include/grub/i386/efi/pci.h: New file.
6754
6755 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6756 Change it value based on platform.
6757 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6758 (GRUB_E820_RAM): Likewise.
6759 (GRUB_E820_RESERVED): Likewise.
6760 (GRUB_E820_ACPI): Likewise.
6761 (GRUB_E820_NVS): Likewise.
6762 (GRUB_E820_EXEC_CODE): Likewise.
6763 (GRUB_E820_MAX_ENTRY): Likewise.
6764 (grub_e820_mmap): New structure.
6765 (linux_kernel_header): Change the efi field according to different
6766 kernel version, also field from linux_kernel_header.
6767
6768 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6769
6770 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6771 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6772 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6773 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6774 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6775 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6776 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6777 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6778 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6779 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6780
6781 * include/grub/x86_64/efi/kernel.h: New file.
6782
6783 * include/grub/x86_64/efi/loader.h: Likewise.
6784
6785 * include/grub/x86_64/efi/machine.h: Likewise.
6786
6787 * include/grub/x86_64/efi/pci.h: Likewise.
6788
6789 * include/grub/x86_64/efi/time.h: Likewise.
6790
6791 * include/grub/x86_64/linux.h: Likewise.
6792
6793 * include/grub/x86_64/setjmp.h: Likewise.
6794
6795 * include/grub/x86_64/time.h: Likewise.
6796
6797 * include/grub/x86_64/types.h: Likewise.
6798
6799 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6800 GRUB_TARGET_SIZEOF_VOID_P.
6801
6802 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6803 (grub_efi_locate_handle): Likewise.
6804 (grub_efi_open_protocol): Likewise.
6805 (grub_efi_set_text_mode): Likewise.
6806 (grub_efi_stall): Likewise.
6807 (grub_exit): Likewise.
6808 (grub_reboot): Likewise.
6809 (grub_halt): Likewise.
6810 (grub_efi_exit_boot_services): Likewise.
6811 (grub_get_rtc): Likewise.
6812
6813 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6814 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6815 (grub_efi_allocate_pages): Wrap efi calls.
6816 (grub_efi_free_pages): Wrap efi calls.
6817 (grub_efi_get_memory_map): Wrap efi calls.
6818
6819 * kern/x86_64/dl.c: New file.
6820
6821 * kern/x86_64/efi/callwrap.S: Likewise.
6822
6823 * kern/x86_64/efi/startup.S: Likewise.
6824
6825 * loader/efi/appleloader.c: Likewise.
6826
6827 * loader/efi/chainloader.c (cmdline): New variable.
6828 (grub_chainloader_unload): Wrap efi calls.
6829 (grub_chainloader_boot): Likewise.
6830 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6831 command line.
6832
6833 * loader/efi/chainloader_normal.c (chainloader_command):
6834 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6835 command line.
6836
6837 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6838 method.
6839 (grub_e820_add_region): New function.
6840 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6841 booting.
6842 (grub_find_video_card): New function.
6843 (grub_linux_setup_video): New function.
6844 (grub_rescue_cmd_linux): Probe for video information.
6845
6846 * normal/x86_64/setjmp.S: New file.
6847
6848 * term/efi/console.c (map_char): New function.
6849 (grub_console_putchar): Map unicode char.
6850 (grub_console_checkkey): Wrap efi calls.
6851 (grub_console_getkey): Likewise.
6852 (grub_console_getwh): Likewise.
6853 (grub_console_gotoxy): Likewise.
6854 (grub_console_cls): Likewise.
6855 (grub_console_setcolorstate): Likewise.
6856 (grub_console_setcursor): Likewise.
6857
6858 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6859
59652a20 68602008-07-16 Pavel Roskin <proski@gnu.org>
6861
ef294055 6862 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6863 format strings.
6864
59652a20 6865 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6866 pointer, not an integer. This fixes a warning and prevents
6867 precision loss on 64-bit systems.
6868 (relocate_addresses): Remove unneeded cast.
6869
afc3b5d7 68702008-07-15 Pavel Roskin <proski@gnu.org>
6871
506b2b3e 6872 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6873
62ead89c 6874 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6875
c4cd51d7 6876 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6877 Fix comparison between signed and unsigned.
6878
0d3d8f28 6879 * include/grub/i386/ieee1275/console.h: Declare
6880 grub_console_init() and grub_console_fini().
6881
8804b286 6882 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6883 It's empty and unused.
6884
ee01cf35 6885 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6886 beginning to avoid warnings with some compilers.
6887
afc3b5d7 6888 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6889 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6890
e4e8eaa5 68912008-07-14 Pavel Roskin <proski@gnu.org>
6892
407aceb4 6893 * kern/env.c (grub_register_variable_hook): Don't copy empty
6894 string, it leaks memory. Pass "" to grub_env_set(), it should
6895 handle constant strings.
6896
e4e8eaa5 6897 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6898 * commands/cmp.c (grub_cmd_cmp): Likewise.
6899 * kern/dl.c (grub_dl_flush_cache): Likewise.
6900 (grub_dl_load_core): Likewise.
6901 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6902 (grub_elf64_load_phdrs): Likewise.
6903
d4e2dad3 69042008-07-13 Pavel Roskin <proski@gnu.org>
6905
6906 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6907 between signed and unsigned.
6908 (LzmaEnc_Finish): Fix warning about an unused parameter.
6909
aa24b516 69102008-07-13 Bean <bean123ch@gmail.com>
6911
6912 * Makefile.in (enable_lzo): New rule.
6913
6914 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6915
6916 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6917
6918 * boot/i386/pc/lnxboot.S: #include <config.h>.
6919
6920 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6921 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6922
6923 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6924 compression algorithm according to configure macro.
6925
6926 * kern/i386/pc/startup.S (codestart): Likewise.
6927
6928 * kern/i386/pc/lzma_decode.S: New file.
6929
6930 * include/grub/lib/LzFind.h: Likewise.
6931
6932 * include/grub/lib/LzHash.h: Likewise.
6933
6934 * include/grub/lib/LzmaDec.h: Likewise.
6935
6936 * include/grub/lib/LzmaEnc.h: Likewise.
6937
6938 * include/grub/lib/LzmaTypes.h: Likewise.
6939
6940 * lib/LzFind.c: Likewise.
6941
6942 * lib/LzmaDec.c: Likewise.
6943
6944 * lib/LzmaEnc.c: Likewise.
6945
4ae821ac 69462008-07-13 Bean <bean123ch@gmail.com>
6947
6948 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6949 (grub_ext4_extent_header): New structure.
6950 (grub_ext4_extent): Likewise.
6951 (grub_ext4_extent_idx): Likewise.
6952 (grub_ext4_find_leaf): New function.
6953 (grub_ext2_read_block): Handle extents.
6954
9a745147 69552008-07-12 Robert Millan <rmh@aybabtu.com>
6956
6957 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6958
d49a4cf6 69592008-07-11 Robert Millan <rmh@aybabtu.com>
6960
6961 * util/grub.d/40_custom.in: New file. Example on how to add custom
6962 entries to /etc/grub.d.
6963 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6964 40_custom (implicitly, by merging all the grub.d rules).
6965
947414b4 69662008-07-11 Pavel Roskin <proski@gnu.org>
6967
0059cf6f 6968 * commands/read.c (grub_getline): Fix invalid memory access.
6969 Don't add newline to the variable value.
6970
947414b4 6971 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6972 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6973 (serial_hw_get_port): Check validity of the port number.
6974 (grub_cmd_serial): Check return value of serial_hw_get_port().
6975
62a02d00 69762008-07-07 Pavel Roskin <proski@gnu.org>
6977
6978 * boot/i386/pc/diskboot.S (notification_string): Replace
6979 "Loading kernel" with just "loading". This is shorter, less
6980 confusing and saves a few bytes for possible future changes.
6981
3e5581b0 69822008-07-05 Pavel Roskin <proski@gnu.org>
6983
ea387a48 6984 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6985 size for ATAPI devices, they are undefined. Output sector
6986 number in decimal form.
6987
3e5581b0 6988 * disk/ata.c: Use named constants for status bits.
6989
fdecb8fd 69902008-07-04 Pavel Roskin <proski@gnu.org>
6991
bcd35b90 6992 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6993 grub_addr_t before casting it to the void pointer to fix a
6994 warning. Non-addressable regions are discarded earlier.
6995 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6996 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6997 (check_signature): Don't shadow table_header.
6998 (grub_linuxbios_table_iterate): Cast numeric constants to
6999 grub_linuxbios_table_header_t.
7000 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7001 grub_stop().
7002
af58ab3d 7003 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7004 prevent warnings.
7005
1759aa57 7006 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7007 pointer, which can cause warnings. Support 64-bit addresses.
7008
fdecb8fd 7009 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7010 of sizeof(long). This fixes PowerPC image generation on x86_64.
7011
8516d2a8 70122008-07-04 Robert Millan <rmh@aybabtu.com>
7013
7014 This fixes a performance issue when pc & gpt partmap iterators
7015 didn't abort iteration even after our hook found what it was
fe987087 7016 looking for (often causing expensive probes of non-existent drives).
8516d2a8 7017
7018 Some callers relied on previous buggy behaviour, since they would
34c44600 7019 raise an error when their own hooks caused early abortion of its
8516d2a8 7020 iteration.
7021
7022 * kern/device.c (grub_device_open): Improve error message.
7023 * disk/lvm.c (grub_lvm_open): Likewise.
7024 * disk/raid.c (grub_raid_open): Likewise.
7025
7026 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7027 when hook requests it, independently of grub_errno.
7028 (pc_partition_map_probe): Do not fail when find_func() caused
7029 early abortion of pc_partition_map_iterate().
7030
7031 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7032 when hook requests it, independently of grub_errno.
7033 (gpt_partition_map_probe): Do not fail when find_func() caused
7034 early abortion of gpt_partition_map_iterate().
7035
7036 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7037 when hook requests it, independently of grub_errno. Do not fail when
7038 part_map_iterate_hook() caused early abortion of p->iterate().
7039
7040 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7041 when grub_partition_iterate() returned with non-zero.
7042
277d0de9 70432008-07-03 Pavel Roskin <proski@gnu.org>
7044
7045 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7046 like we do in grub_ata_pio_read().
7047 (grub_ata_readwrite): Always write individual sectors. Fix the
7048 sector count for the remainder.
7049 (grub_ata_write): Enable writing to ATA devices. Correctly
7050 report error for ATAPI devices.
7051
d4c9b428 70522008-07-02 Pavel Roskin <proski@gnu.org>
7053
e43fc690 7054 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7055 warning.
7056
f707af42 7057 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7058 for every read sector, we already increment it for the whole
7059 batch. This fixes reading more than 256 sectors at once.
7060
11e16b15 7061 * util/grub-editenv.c (cmd_info): Cast argument to long
7062 explicitly. ptrdiff_t reduces to int on i386.
7063
cbabfdd4 7064 * util/grub-editenv.c (main): Be specific which parameter is
7065 missing.
7066
b8fbce0a 7067 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7068 (memdisk): Make memdisk_orig_addr a pointer.
7069
c9c8e606 7070 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7071 for file offsets, use grub_off_t instead. Fix printf format
7072 warnings.
7073
ca62e598 7074 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7075 there. Real unexpected warnings should not drown in the noise
7076 about known problems.
7077
ce8d1766 7078 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7079 grub_disk_addr_t for memory addresses.
7080
00c7a56a 7081 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7082 explicitly to fix a warning.
7083
08d3ef09 7084 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7085
cb71ba20 7086 * Makefile.in (MODULE_LDFLAGS): New variable.
7087 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7088 the linker accepts --build-id=none.
7089 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7090 MODULE_LDFLAGS.
7091 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7092
d4c9b428 7093 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7094 those in Linux XFS code. Provide a way to access 64-bit parent
7095 inode.
7096 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7097 the end of struct grub_xfs_dir_header.
7098
d4156eee 70992008-07-02 Bean <bean123ch@gmail.com>
7100
7101 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7102 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7103 and GRUB_IEEE1275_FLAG_NO_ANSI.
7104
7105 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7106 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7107 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7108
7109 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7110 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7111
7112 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7113 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7114
7115 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7116 esc sequence on non ANSI terminal.
7117 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7118
7119 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7120 beginning of file.
7121
2270f77b 71222008-07-02 Bean <bean123ch@gmail.com>
7123
7124 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7125 (grub_editenv_SOURCES): New variable.
7126 (pkglib_MODULES): Add loadenv.mod.
7127 (loadenv_mod_SOURCES): New variable.
7128 (loadenv_mod_CFLAGS): Likewise.
7129 (loadenv_mod_LDFLAGS): Likewise.
7130
7131 * include/grub/envblk.h: New file.
7132
7133 * util/envblk.c: New file.
7134
7135 * util/grub-editenv.c: New file.
7136
7137 * commands/loadenv.c: New file.
7138
0e9e51ec 71392008-07-01 Pavel Roskin <proski@gnu.org>
7140
d89b7634 7141 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7142 not unsigned char. This fixes warnings and is consistent with
7143 other tags.
7144
bf1835b1 7145 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7146
8222a04b 7147 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7148
6a42d99d 7149 * term/tparm.c (analyze): Always set *popcount.
7150
10b159d1 7151 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7152 cast to fix a warning.
7153
b8789f6c 7154 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7155 cast to suppress a warning.
7156
29d7e38a 7157 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7158 grub_fshelp_read_file() expects.
7159
f341f669 7160 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7161 write uuid as a 32-bit value in CPU byte order, so declare and
7162 use it as such.
7163
0e9e51ec 7164 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7165 long if the format specifier expects it.
7166 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7167 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7168 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7169 long to fix a warning.
7170 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7171 grub_dprintf() arguments to fix warnings.
7172
3aefa857 71732008-06-30 Pavel Roskin <proski@gnu.org>
7174
56c7668b 7175 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7176 install_bsd_part immediately before core.img is embedded or
7177 modified on disk. This fixes core.img verification if core.img
7178 cannot be embedded.
7179
3aefa857 7180 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7181 core_path to calculate the blocklist.
7182 Patch from Javier Martín <lordhabbit@gmail.com>
7183
5444088d 71842008-06-29 Robert Millan <rmh@aybabtu.com>
7185
7186 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7187 block to disk block.
7188 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7189 Patch from Niels Böhm <bitbucket@arcor.de>
7190
674835c8 71912008-06-29 Robert Millan <rmh@aybabtu.com>
7192
7193 * util/update-grub_lib.in (font_path): Search for fonts in
7194 /boot/grub first, which is more likely to be readable (we aren't
7195 deciding where fonts live, just looking for them).
7196
f527dbc8 71972008-06-26 Pavel Roskin <proski@gnu.org>
7198
6c2d8df6 7199 * util/biosdisk.c (read_device_map): Don't leave dead map
7200 entries for devices failing stat() check.
7201
f527dbc8 7202 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7203 core_path_dev for the core.img path on the target device.
7204
aebe3d13 72052008-06-26 Robert Millan <rmh@aybabtu.com>
7206
7207 * disk/fs_uuid.c: New file.
7208 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7209 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7210 (fs_uuid_mod_LDFLAGS): New variables.
7211 * include/grub/disk.h (grub_disk_dev_id): Add
7212 `GRUB_DISK_DEVICE_UUID_ID'.
7213 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7214 implement iterate().
7215
37aaf354 72162008-06-26 Robert Millan <rmh@aybabtu.com>
7217
7218 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7219 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7220 Linux image includes no initrd.
7221
25ff262a 72222008-06-21 Javier Martín <lordhabbit@gmail.com>
7223
7224 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7225 call to resolve the core image location that effectively appended the
7226 name twice.
7227
76a2bd44 72282008-06-21 Robert Millan <rmh@aybabtu.com>
7229
7230 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7231 call from here ...
7232
7233 * util/grub.d/10_hurd.in: ... to here ...
7234 * util/grub.d/10_linux.in: ... and here.
7235
650e1c79 72362008-06-19 Robert Millan <rmh@aybabtu.com>
7237
fe987087 7238 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 7239 after it has been set by grub_machine_set_prefix().
7240
6ce63911 72412008-06-19 Robert Millan <rmh@aybabtu.com>
7242
7243 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7244 search result when not saving to variable, not the other way around.
7245 When saving to variable, abort iteration as soon as a match is found.
7246
73940cec 72472008-06-19 Robert Millan <rmh@aybabtu.com>
7248
7249 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7250 check for partition that provides /boot/grub. Its logic is flawed,
7251 as it prevents prepare_grub_to_access_device() from being called
7252 multiple times.
7253
3c62a39d 72542008-06-19 Robert Millan <rmh@aybabtu.com>
7255
7256 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7257 "insmod" command directly when abstraction modules are needed,
fe987087 7258 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 7259 since it had already been processed).
7260
47395a42 72612008-06-19 Pavel Roskin <proski@gnu.org>
7262
7263 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7264 changed. This is needed in case GRUB_LIBDIR changes.
7265 * conf/i386-ieee1275.rmk: Likewise.
7266 * conf/i386-linuxbios.rmk: Likewise.
7267 * conf/i386-pc.rmk: Likewise.
7268 * conf/powerpc-ieee1275.rmk: Likewise.
7269
a145ac2d 72702008-06-18 Pavel Roskin <proski@gnu.org>
7271
7272 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7273 kernel_elf_symlist.c to symlist.c for consistency with other
7274 architectures. Update all users.
7275 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7276
7847c51e 72772008-06-18 Robert Millan <rmh@aybabtu.com>
7278
7279 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7280 it in prefix.
7281
7282 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7283 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7284 a RAID device, run setup() for all members independently on whether
7285 LVM abstraction is being used.
7286 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7287 If grub-mkimage has set `*install_dos_part == -2', don't override this
7288 value.
7289 Perform *install_dos_part adjustments independently on whether
7290 we're embedding or not.
7291 Clarify error message when image is too big for embedding.
7292 Remove duplicate *install_dos_part stanza.
7293
b23e5644 72942008-06-17 Robert Millan <rmh@aybabtu.com>
7295
7296 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7297 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7298 variables.
7299 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7300 values in grub_ofconsole_normal_color and
7301 grub_ofconsole_highlight_color (they're not directly related to
7302 background and foreground).
7303 (grub_ofconsole_setcolorstate): Extract background and foreground
7304 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7305
0aac2f79 73062008-06-17 Robert Millan <rmh@aybabtu.com>
7307
7308 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7309 /boot/grub for the check in last commit, not /boot (they could be
7310 different partitions).
7311
3cca7ef3 73122008-06-16 Robert Millan <rmh@aybabtu.com>
7313
7314 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7315 asked to setup access for the same partition that provides /boot,
7316 don't bother using UUIDs since our root already has the value we
7317 want.
7318
347396d8 73192008-06-16 Robert Millan <rmh@aybabtu.com>
7320
7321 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7322 I2O devices.
7323 Patch from Sven Mueller <sven@debian.org>.
7324
991477f8 73252008-06-16 Robert Millan <rmh@aybabtu.com>
7326
7327 * util/update-grub.in: Check for $EUID instead of $UID.
7328 Reported by Vincent Zweije.
7329
d31a32a1 73302008-06-16 Bean <bean123ch@gmail.com>
7331
fe987087 7332 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 7333 (grub_ext2_read_block): Likewise.
7334 (grub_ext2_read_inode): Likewise.
7335 (grub_ext2_mount): Likewise.
7336 (grub_ext2_close): Likewise.
7337 (grub_ext3_get_journal): Removed.
7338
fe987087 7339 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 7340 (grub_reiserfs_read_symlink): Likewise.
7341 (grub_reiserfs_mount): Likewise.
7342 (grub_reiserfs_open): Likewise.
7343 (grub_reiserfs_read): Likewise.
7344 (grub_reiserfs_close): Likewise.
7345 (grub_reiserfs_get_journal): Removed.
7346
7347 * fs/fshelp.c (grub_fshelp_read): Removed.
7348 (grub_fshelp_map_block): Likewise.
7349
7350 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7351 (grub_fshelp_journal): Likewise.
7352 (grub_fshelp_read): Likewise.
7353 (grub_fshelp_map_block): Likewise.
7354
3540a760 73552008-06-16 Pavel Roskin <proski@gnu.org>
7356
7357 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7358 floating point anymore.
7359 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7360
95614c84 73612008-06-15 Pavel Roskin <proski@gnu.org>
7362
7363 * commands/ls.c (grub_ls_list_files): Use integer calculations
7364 for human readable format, avoid floating point use.
7365 * kern/misc.c (grub_ftoa): Remove.
7366 (grub_vsprintf): Remove floating point support.
7367
50465dd6 73682008-06-15 Robert Millan <rmh@aybabtu.com>
7369
fe6b695a 7370 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 7371 devices.
7372 Reported by Max Vozeler.
7373
a9207284 73742008-06-15 Robert Millan <rmh@aybabtu.com>
7375
7376 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7377 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7378 skipped later.
7379 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7380 the beginning of the prefix.
7381
7382 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7383 It is assumed that if we have a memdisk, grub-mkimage has set
7384 grub_prefix to include the "(memdisk)" drive in it.
7385
a7cbd45a 73862008-06-15 Robert Millan <rmh@aybabtu.com>
7387
7388 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7389 Initialize keyboard controller after registering the terminal, so that
7390 grub_printf() can be called from grub_keyboard_controller_init().
7391
21cf716a 73922008-06-15 Robert Millan <rmh@aybabtu.com>
7393
7394 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7395 extent-btree which is written as big endian on disk.
7396 Reported by Alain Greppin <al@chilibi.org>.
7397
23a64d8e 73982008-06-14 Robert Millan <rmh@aybabtu.com>
7399
7400 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7401 * util/i386/pc/grub-install.in (modules): Likewise.
7402
d687651c 74032008-06-13 Pavel Roskin <proski@gnu.org>
7404
7405 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7406
dfe9ddd4 74072008-06-13 Bean <bean123ch@gmail.com>
7408
7409 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7410
7411 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7412
7413 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7414 to indicate sparse block.
7415
16ae7781 74162008-06-12 Pavel Roskin <proski@gnu.org>
7417
e6d1a308 7418 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7419 number, grub_fshelp_read() does it for us.
7420
16ae7781 7421 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7422 linear disk read with journal translation.
7423 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7424 * include/grub/fshelp.h: Declare grub_fshelp_read().
7425
40fd3a2b 74262008-06-09 Pavel Roskin <proski@gnu.org>
7427
7428 * fs/minix.c (grub_minix_mount): Handle error reading
7429 superblock.
7430
f5679726 74312008-06-08 Robert Millan <rmh@aybabtu.com>
7432
7433 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7434 don't append the RAID prefix afterwards.
7435 Reported by Clint Adams.
7436
ce525529 74372008-06-08 Robert Millan <rmh@aybabtu.com>
7438
7439 Based on description from Pavel:
7440 * kern/disk.c (grub_disk_check_range): Rename to ...
7441 (grub_disk_adjust_range): ... this. Add a comment explaining the
7442 tasks performed by this function.
7443
ad4936a0 74442008-06-08 Robert Millan <rmh@aybabtu.com>
7445
7446 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7447 `num_serial' (for consistency with other variables).
7448 (struct grub_ntfs_data): Add `uuid' member.
7449 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7450 (grub_ntfs_uuid): New function.
7451 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7452
dc20b0f9 74532008-06-07 Pavel Roskin <proski@gnu.org>
7454
7455 * util/biosdisk.c (open_device): Revert last change to the
7456 function, it broke installation. The sector needs to be
7457 different dependent on which device is opened.
7458
c5e3cfba 74592008-06-06 Robert Millan <rmh@aybabtu.com>
7460
7461 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7462 rest of GRUB, and breakage doesn't happen if its value were modified.
7463
7464 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7465 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7466 a constant (same value).
7467 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7468 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7469
26a1f8c4 74702008-06-06 Robert Millan <rmh@aybabtu.com>
7471
7472 * util/biosdisk.c (open_device): Do not modify sector offset when
7473 accessing a partition. kern/disk.c already handles this for us.
7474
25d6b327 74752008-06-06 Robert Millan <rmh@aybabtu.com>
7476
7477 * util/grub-emu.c (grub_machine_init): Move code in this function from
7478 here ...
7479 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7480 segfault in case grub_printf() is called).
7481
7482 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7483 grub_probe. Update all users not to explicitly add it again.
7484 (grub_device): New variable; contains corresponding device for grubdir.
7485 (fs_module, partmap_module, devabstraction_module): Pass
7486 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7487 every time.
7488
9ece62fb 74892008-06-05 Robert Millan <rmh@aybabtu.com>
7490
7491 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7492 is found, print it (same layout as with labels).
7493
1ad36d37 74942008-06-04 Robert Millan <rmh@aybabtu.com>
7495
7496 * util/biosdisk.c (get_drive): Rename to ...
7497 (find_grub_drive): ... this. Update all users.
7498
7499 (get_os_disk): Rename to ...
7500 (convert_system_partition_to_system_disk): ... this. Update all users.
7501
7502 (find_drive): Rename to ...
7503 (find_system_device): ... this. Update all users.
7504
e6a30859 75052008-06-04 Robert Millan <rmh@aybabtu.com>
7506
7507 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7508 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7509 (make_device_map): Likewise.
7510
00c108a4 75112008-06-01 Robert Millan <rmh@aybabtu.com>
7512
7513 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7514 before dereferencing it.
7515
7516 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7517 union with fat12/fat16-specific ones. Add some new fields, including
7518 `num_serial' for both versions.
7519 (struct grub_fat_data): Add `uuid' member.
7520 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7521 names. Initialize `data->uuid' using `num_serial'.
7522 (grub_fat_uuid): New function.
7523 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7524
7525 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7526 (grub_reiserfs_uuid): New function.
7527 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7528 member.
7529
7530 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7531 (grub_xfs_uuid): New function.
7532 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7533
1385c5bb 75342008-06-01 Robert Millan <rmh@aybabtu.com>
7535
7536 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7537 code that is backward compatible with pre-uuid search command.
7538
c682dfd7 75392008-05-31 Robert Millan <rmh@aybabtu.com>
7540
7541 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7542 floppies after everything else, to ensure floppy drive isn't accessed
7543 unnecessarily (patch from Bean).
7544
b7db5d47 75452008-05-31 Robert Millan <rmh@aybabtu.com>
7546
7547 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7548 not print device names when we were asked to set a variable.
7549
6e037aa9 75502008-05-31 Robert Millan <rmh@aybabtu.com>
7551
7552 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7553 using "cursor-on" and "cursor-off" commands (understood at least by
7554 the Open Firmware flavour on OLPC).
7555
41305bc8 75562008-05-31 Michael Gorven <michael@gorven.za.net>
7557
7558 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7559 on and off sequences.
7560
69ba137e 75612008-05-31 Robert Millan <rmh@aybabtu.com>
7562
7563 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7564 * util/update-grub.in: Likewise.
7565
520ae21b 75662008-05-30 Pavel Roskin <proski@gnu.org>
7567
7568 * util/biosdisk.c (linux_find_partition): Simplify logic and
7569 make the code more universal. Keep special processing for
7570 devfs, but use a simple rule for all other devices. If the
7571 device ends with a number, append 'p' and the partition number.
7572 Otherwise, append only the partition number.
7573
5786569b 75742008-05-30 Robert Millan <rmh@aybabtu.com>
7575
7576 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7577 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7578 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7579 the `root' parameter to Linux.
7580
51500452 75812008-05-30 Robert Millan <rmh@aybabtu.com>
7582
7583 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7584 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7585 --fs_uuid with --fs-uuid.
7586 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7587 all filesystems support them).
7588
811d3878 75892008-05-30 Robert Millan <rmh@aybabtu.com>
7590
7591 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 7592 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 7593
cab63c95 75942008-05-30 Robert Millan <rmh@aybabtu.com>
7595
7596 * util/grub.d/00_header.in: Remove obsolete comment referencing
7597 convert_system_path_to_grub_path().
7598 * util/update-grub.in: Likewise.
7599 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7600 (convert_system_path_to_grub_path): Add a warning message explaining
7601 that this function is deprecated. Rely on is_path_readable_by_grub()
7602 for the readability checks.
7603 (font_path): Use is_path_readable_by_grub() for the readability
7604 check rather than convert_system_path_to_grub_path().
7605
972e2f7a 76062008-05-30 Robert Millan <rmh@aybabtu.com>
7607
7608 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7609 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7610 converting it first.
7611 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7612 grub.cfg for access to font file, and afterwards call it again to set
7613 the root device.
7614
62191274 76152008-05-30 Robert Millan <rmh@aybabtu.com>
7616
7617 * commands/search.c (options): Add --fs_uuid option.
7618 (search_fs_uuid): New function.
7619 (grub_cmd_search): Fix --set argument passing.
7620 Use search_fs_uuid() when requested via --fs_uuid.
7621 (grub_search_init): Update help message.
7622 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7623 and redeclare it as an array of 16-bit words.
7624 (grub_ext2_uuid): New function.
7625 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7626 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7627 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7628 (GRUB_DEVICE_BOOT_UUID): New variables.
7629 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7630 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7631 whenever possible.
7632 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7633 just assume `root' variable has the right value.
7634 * util/grub.d/10_linux.in: Likewise.
7635 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7636 via PRINT_FS_UUID.
7637 (main): Recognise `-t fs_uuid' argument.
7638
01b73ec8 76392008-05-30 Robert Millan <rmh@aybabtu.com>
7640
7641 * util/biosdisk.c (map): Redefine structure to hold information
7642 about GRUB drive name.
fe6b695a 7643 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 7644 drive names.
7645 (call_hook): Remove.
7646 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7647 member. Assume drive has partitions.
7648 (grub_util_biosdisk_open): Access device names via `.device' struct
7649 member.
7650 (open_device): Likewise.
7651 (find_drive): Likewise.
7652 (read_device_map): Adjust map[] usage to match the new struct
7653 definition. Don't check for duplicates (still possible, but not cheap
7654 anymore).
7655 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7656 (make_device_name): Remove assumption of BIOS-like drive names.
7657
22f16596 76582008-05-30 Pavel Roskin <proski@gnu.org>
7659
7660 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7661 compiling execute.c doesn't need grub_script.tab.h anymore.
7662 (normal/command.c_DEPENDENCIES): Likewise.
7663 (normal/function.c_DEPENDENCIES): Likewise.
7664 * conf/i386-ieee1275.rmk: Likewise.
7665 * conf/i386-linuxbios.rmk: Likewise.
7666 * conf/i386-pc.rmk: Likewise.
7667 * conf/powerpc-ieee1275.rmk: Likewise.
7668 * conf/sparc64-ieee1275.rmk: Likewise.
7669
528ad8f2 76702008-05-29 Pavel Roskin <proski@gnu.org>
7671
d1dff95d 7672 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7673 when scanning metadata for volume group name.
7674
528ad8f2 7675 * include/grub/script.h: Don't include grub_script.tab.h. It's
7676 a generated file, which may only be included from the files with
7677 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7678 use union YYSTYPE, as the later allows forward declaration.
7679 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7680
47248e08 76812008-05-29 Robert Millan <rmh@aybabtu.com>
7682
7683 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7684 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7685 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7686 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7687 scan codes.
7688
ee632529 76892008-05-29 Robert Millan <rmh@aybabtu.com>
7690
7691 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7692 control key combinations.
7693
eee96e08 76942008-05-29 Robert Millan <rmh@aybabtu.com>
7695
7696 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7697 * util/ieee1275/grub-install.in: ... to here.
7698 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7699 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7700 (grub_install_SOURCES): Likewise.
7701
da9a6a94 77022008-05-29 Robert Millan <rmh@aybabtu.com>
7703
7704 * fs/affs.c: Update copyright year.
7705 * fs/ext2.c: Likewise.
7706 * fs/fshelp.c: Likewise.
7707 * fs/hfsplus.c: Likewise.
7708 * fs/ntfs.c: Likewise.
7709 * fs/xfs.c: Likewise.
7710 * include/grub/fshelp.h: Likewise.
7711 * util/grub-mkdevicemap.c: Likewise.
7712
12e65f3a 77132008-05-28 Robert Millan <rmh@aybabtu.com>
7714
7715 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7716 might need to be fatfs to support some firmware implementations
7717 (e.g. OFW or EFI).
7718
23023641 77192008-05-28 Robert Millan <rmh@aybabtu.com>
7720
7721 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7722 devices.
7723 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7724 (make_device_map): Likewise.
7725
887d2619 77262008-05-20 Bean <bean123ch@gmail.com>
7727
7728 * fs/fshelp.c (grub_fshelp_map_block): New function.
7729 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7730 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7731
7732 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7733 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7734 (grub_fshelp_journal): New structure.
7735 (grub_fshelp_map_block): New function prototype.
7736 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7737 (grub_fshelp_map_block): Likewise.
7738
7739 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7740 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7741 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7742 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7743 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7744 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7745 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7746 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7747 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7748 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7749 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7750 (grub_ext2_sblock): New members for journal support.
7751 (grub_ext3_journal_header): New structure.
7752 (grub_ext3_journal_revoke_header): Likewise.
7753 (grub_ext3_journal_block_tag): Likewise.
7754 (grub_ext3_journal_sblock): Likewise.
7755 (grub_fshelp_node): New members logfile and journal.
7756 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7757 grub_fshelp_map_block to get real block number.
7758 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7759 number.
7760 (grub_ext2_read_inode): Likewise.
7761 (grub_ext3_get_journal): New function.
7762 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7763 (grub_ext2_close): Release memory used by journal.
7764
7765 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7766 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7767 (grub_reiserfs_transaction_header): Renamed to
7768 grub_reiserfs_description_block, replace field data with real_blocks.
7769 (grub_reiserfs_commit_block): New structure.
7770 (grub_reiserfs_data): New member journal.
7771 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7772 number.
7773 (grub_reiserfs_read_symlink): Likewise.
7774 (grub_reiserfs_iterate_dir): Likewise.
7775 (grub_reiserfs_open): Likewise.
7776 (grub_reiserfs_read): Likewise.
7777 (grub_reiserfs_get_journal): New function.
7778 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7779 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7780 using grub_reiserfs_get_journal.
7781 (grub_reiserfs_close): Release memory used by journal.
7782
7783 * fs/affs.c (grub_affs_read_block): Change block type to
7784 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7785
7786 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7787
7788 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7789
7790 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7791
7792 * fs/udf.c (grub_udf_read_block): Change block type to
7793 grub_disk_addr_t. Use type cast to avoid warning.
7794
7795 * fs/xfs.c (grub_xfs_read_block): Likewise.
7796
b7c6bed5 77972008-05-16 Christian Franke <franke@computer.org>
7798
7799 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7800 to ensure that break with ESC will always work.
7801 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7802 Remove ESC from keyboard queue.
7803
eedf167f 78042008-05-16 Christian Franke <franke@computer.org>
7805
7806 * util/biosdisk.c: [__CYGWIN__] Add includes.
7807 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7808 (get_os_disk): Move variable declarations to OS specific
7809 parts to avoid warning.
7810 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7811 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7812 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7813 Cygwin.
7814 * util/getroot.c: [__CYGWIN__] Add includes.
7815 (strip_extra_slashes): Fix "/" case.
7816 [__CYGWIN__] (get_win32_path): New function.
7817 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7818 [__CYGWIN__] (find_root_device): Disable.
7819 [__CYGWIN__] (get_bootsec_serial): New function.
7820 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7821 [__linux__] (grub_guess_root_device): Add early returns to simplify
7822 structure.
7823 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7824 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7825 check for Linux only.
7826
a079699e 78272008-05-15 Bean <bean123ch@gmail.com>
7828
7829 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7830 keyboard hang problem in apple's intel mac.
7831
1cf4059a 78322008-05-09 Robert Millan <rmh@aybabtu.com>
7833
7834 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7835 devices.
7836 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7837 (make_device_map): Likewise.
7838 Reported by Aurelien Jarno <aurel32@debian.org>
7839
ed759390 78402008-05-07 Ian Campbell <ijc@hellion.org.uk>
7841
7842 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7843 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7844 (make_device_map): Output entries for xvd type disks.
7845
b56c4eaa 78462008-05-07 Robert Millan <rmh@aybabtu.com>
7847
7848 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7849 devices.
7850 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7851 (make_device_map): Likewise.
7852 Reported by Roland Dreier <rdreier@cisco.com>
7853
7f8866ed 78542008-05-07 Robert Millan <rmh@aybabtu.com>
7855
7856 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7857 grub_strstr() call. Correct a few mistakes in failure path handling.
7858
b0346e0f 78592008-05-06 Robert Millan <rmh@aybabtu.com>
7860
7861 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7862 Do not print a trailing slash (therefore, the root directory is an
7863 empty string).
7864 (convert_system_path_to_grub_path): Do not remove trailing slash
7865 from make_system_path_relative_to_its_root() output.
7866
7867 * util/i386/pc/grub-install.in: Add trailing slash to output from
7868 make_system_path_relative_to_its_root().
7869
6cf12cbd 78702008-05-06 Robert Millan <rmh@aybabtu.com>
7871
7872 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7873 ensures that output lines aren't intermangled with those sent to
7874 stderr (via grub_util_info()).
7875 * util/grub-probe.c (grub_refresh): Likewise.
7876 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7877
0fbb3117 78782008-05-05 Christian Franke <franke@computer.org>
7879
7880 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7881 Add Cygwin device names.
7882 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7883 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7884 (check_device): Return error instead of success on empty name.
7885 (make_device_map): Move label inside linux specific code to
7886 prevent compiler warning.
7887
8124cdb7 78882008-04-30 Robert Millan <rmh@aybabtu.com>
7889
7890 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7891 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7892 first boot option.
7893 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7894
094c01d0 78952008-04-29 Robert Millan <rmh@aybabtu.com>
7896
7897 * docs/grub.cfg: New file (example GRUB configuration).
7898
f4b1fc02 78992008-04-26 Robert Millan <rmh@aybabtu.com>
7900
329ce2a5 7901 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7902 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7903 and `disk/ieee1275/nand.c'.
f4b1fc02 7904
25f16ec1 79052008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7906
25f16ec1 7907 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7908 i386-linuxbios.
7909
7910 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7911 change the buffer size to 4096 for cdrom device.
7912
7913 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7914 and nand.mod.
7915 (_linux_mod_SOURCES): New variable.
7916 (_linux_mod_CFLAGS): Likewise.
7917 (_linux_mod_LDFLAGS): Likewise.
7918 (linux_mod_SOURCES): Likewise.
7919 (linux_mod_CFLAGS): Likewise.
7920 (linux_mod_LDFLAGS): Likewise.
7921 (nand_mod_SOURCES): Likewise.
7922 (nand_mod_CFLAGS): Likewise.
7923 (nand_mod_LDFLAGS): Likewise.
7924
7925 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7926 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7927 type property. (nand device in olpc don't have this property)
7928
7929 * include/grub/disk.h (grub_disk_dev_id): New macro
7930 GRUB_DISK_DEVICE_NAND_ID.
7931
7932 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7933 function prototype.
7934 (grub_rescue_cmd_initrd): Likewise.
7935
7936 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7937 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7938 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7939
25f16ec1 7940 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7941 GRUB_MACHINE_IEEE1275 is defined.
7942
7943 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7944 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7945
7946 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7947 on nested function heap_init.
7948 (grub_upper_mem): New variable for i386-ieee1275.
7949 (grub_get_extended_memory): New function for i386-ieee1275.
7950 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7951
7952 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7953 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7954 property.
f19dbdb7 7955
25f16ec1 7956 * loader/i386/ieee1275/linux.c: New file.
7957
7958 * loader/i386/ieee1275/linux_normal.c: New file.
7959
7960 * disk/ieee1275/nand.c: New file.
7961
e89d61e9 79622008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7963
7964 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7965 value.
7966 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7967
602566f6 79682008-04-18 Robert Millan <rmh@aybabtu.com>
7969
7970 Restructures early code path on ieee1275 to unify grub_main() as
7971 the first C function that is executed in every platform.
7972
7973 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7974 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7975 cmain().
7976 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7977 * kern/ieee1275/cmain.c (cmain): Rename to ...
7978 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7979 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7980 at the beginning.
7981
57490c2b 79822008-04-18 Robert Millan <rmh@aybabtu.com>
7983
7984 * util/update-grub.in: Fix syntax error when setting
7985 `GRUB_PRELOAD_MODULES'.
7986 Reported by Stephane Chazelas <stephane@artesyncp.com>
7987
1977517d 79882008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7989
7990 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7991 section into account, newer toolchains generate unique build ids
7992 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7993 we want build ids to be preserved
1977517d 7994 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7995 far from other sections don't cause the raw binary images grow
7996 size
7997
bfb1f1a2 79982008-04-15 Robert Millan <rmh@aybabtu.com>
7999
8000 * disk/lvm.c: Update copyright year.
8001 * kern/misc.c: Likewise.
8002
01979850 80032008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8004
8005 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 8006 there is no memory left for physical volume name.
01979850 8007
0a1150e2 80082008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8009
8010 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8011 volume name mapping to support bigger than 9 character names properly.
8012
82ead3fe 80132008-04-13 Robert Millan <rmh@aybabtu.com>
8014
8015 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8016 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8017
e54a72f5 80182008-04-13 Christian Franke <franke@computer.org>
8019
8020 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8021 to create a floppy emulation boot CD when non emulation mode
8022 does not work.
8023 Enable Joliet CD filesystem extension.
8024
9fe86034 80252008-04-13 Robert Millan <rmh@aybabtu.com>
8026
8027 * kern/misc.c (grub_strncat): Fix off-by-one error.
8028 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8029
8030 * kern/env.c (grub_env_context_close): Clear current context, not
8031 previous one.
8032 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8033
8034 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8035
7ceeee39 80362008-04-13 Robert Millan <rmh@aybabtu.com>
8037
8038 Improve robustness when handling LVM.
8039
8040 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 8041 (and leave `*p' unmodified).
7ceeee39 8042 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8043 through it.
8044 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8045 iterating through it.
8046 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8047 through it.
fe6b695a 8048 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 8049 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8050 Don't assume `vg->pvs != NULL' when iterating through it.
8051
58cd3d85 80522008-04-13 Robert Millan <rmh@aybabtu.com>
8053
8054 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8055 * genmk.rb (partmap): New variable.
8056 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8057 (#{partmap}): New target rule.
8058 * genpartmaplist.sh: New file.
8059 * Makefile.in (pkglib_DATA): Add partmap.lst.
8060 (partmap.lst): New target rule.
8061 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8062 modules (including all partition maps), instead of preloading them.
8063
78b51059 80642007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8065
8066 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8067 `linux-boot-prober' (if installed) to detect other operating
8068 systems which are installed on the computer and add them to
8069 the boot menu.
8070 * conf/common.rmk: Build and install 30_os-prober.
8071
a91627b4 80722008-04-12 Robert Millan <rmh@aybabtu.com>
8073
8074 * kern/powerpc/ieee1275/init.c: Move from here ...
8075 * kern/ieee1275/init.c: ... to here. Update all users.
8076
8077 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8078 * kern/ieee1275/cmain.c: ... to here. Update all users.
8079
8080 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8081 * kern/ieee1275/openfw.c: ... to here. Update all users.
8082
8083 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8084 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8085
322562ea 80862008-04-10 Pavel Roskin <proski@gnu.org>
8087
8088 * configure.ac: Always use "_cv_" in cache variables for
8089 compatibility with Autoconf 2.62.
8090
a02a73c5 80912008-04-07 Robert Millan <rmh@aybabtu.com>
8092
8093 Revert grub/machine/init.h addition by Pavel (since it breaks on
8094 i386-ieee1275 and others):
8095 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8096 * util/powerpc/ieee1275/misc.c: Likewise.
8097
25c024b1 80982008-04-07 Robert Millan <rmh@aybabtu.com>
8099
8100 * util/grub-probe.c (probe): Improve error message.
8101
3cbd2f98 81022008-04-07 Robert Millan <rmh@aybabtu.com>
8103
8104 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8105 (this prevents the presence of a bogus entry from ruining the whole
8106 thing).
8107
87a297bf 81082008-04-06 Pavel Roskin <proski@gnu.org>
8109
36747a62 8110 * util/biosdisk.c: Include grub/util/biosdisk.h.
8111 * util/grub-fstest.c (execute_command): Make static.
8112 * util/grub-mkdevicemap.c (check_device): Likewise.
8113 * util/i386/pc/misc.c: Include grub/machine/init.h.
8114 * util/powerpc/ieee1275/misc.c: Likewise.
8115 * util/lvm.c: Include grub/util/lvm.h.
8116 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8117 grub/cache.h.
8118 * util/raid.c: Include grub/util/raid.h.
8119 (grub_util_getdiskname): Make static.
8120
87a297bf 8121 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8122 grub_hostfs_fini(), as they are called from grub_init_all() and
8123 grub_fini_all() respectively. This fixes an infinite loop in
8124 grub-fstest due to double registration of hostfs.
8125 Reported by Christian Franke <Christian.Franke@t-online.de>
8126
f6ce7629 81272008-04-05 Pavel Roskin <proski@gnu.org>
8128
8129 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8130 all 8 functions. Otherwise, probe function 0 only.
8131
070e49e4 81322008-04-04 Pavel Roskin <proski@gnu.org>
8133
8b088a4c 8134 * commands/lspci.c (grub_lspci_iter): Print the bus number
8135 correctly.
8136
4f657021 8137 * commands/lspci.c (grub_pci_classes): Fix typos.
8138 (grub_lspci_iter): Don't print func twice. Print vendor ID
8139 before device ID, as it's normally done.
8140
070e49e4 8141 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8142 Fix signedness warnings.
8143 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8144 Likewise.
8145 * util/ieee1275/get_disk_name.c: Include config.h so that
8146 _GNU_SOURCE is defined and getline() is declared. Mark an
8147 unused argument as such. Fix a signedness warning.
8148
ba7328dc 81492008-04-02 Pavel Roskin <proski@gnu.org>
8150
26887f22 8151 * genkernsyms.sh.in: Use more robust assignments for CC and
8152 srcdir. Quote srcdir.
8153 * gensymlist.sh.in: Likewise. Assert at the compile time that
8154 the symbol table is not empty.
8155
ba7328dc 8156 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8157 * fs/cpio.c (grub_cpio_read): Likewise.
8158
0f582c6b 81592008-04-01 Pavel Roskin <proski@gnu.org>
8160
4b6e1995 8161 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8162 * disk/host.c (grub_host_open): Likewise.
8163 * disk/loopback.c (grub_loopback_open): Likewise.
8164 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8165 disk->id as in disk/host.c, not a multi-character constant.
8166
828a2768 8167 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8168 later is obsolete, potentially dangerous and sets a bad example.
8169 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8170 * util/misc.c (grub_util_get_image_size): Likewise.
8171
2bb4fb47 8172 * disk/loopback.c (options): Improve help for "--partitions".
8173
0f582c6b 8174 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8175 options to align them with the short options, e.g. "echo -e".
8176
a33224e0 81772008-03-31 Bean <bean123ch@gmail.com>
8178
8179 * video/reader/png.c (grub_png_data): New member is_16bit and
8180 image_data.
8181 (grub_png_decode_image_header): Detect 16 bit png image.
8182 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8183 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8184 (grub_video_reader_png): Release memory occupied by image_data.
8185
8186 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8187 4096 bytes.
8188 (grub_nfs_mount): Skip the test for sector per cluster.
8189
8190 * include/grub/ntfs.h (MAX_SPC): Removed.
8191
86cb4f54 81922008-03-31 Bean <bean123ch@gmail.com>
8193
8194 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8195 (grub_probe_SOURCES): Add fs/afs.c.
8196 (grub_fstest_SOURCES): Likewise.
8197 (afs_mod_SOURCES): New variable.
8198 (afs_mod_CFLAGS): Likewise.
8199 (afs_mod_LDFLAGS): Likewise.
8200
8201 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8202 (grub_emu_SOURCES): Likewise.
8203
8204 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8205
8206 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8207
8208 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8209
8210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8211
8212 * fs/afs.c: New file.
8213
17c74c21 82142008-03-30 Pavel Roskin <proski@gnu.org>
8215
4cb68e89 8216 * disk/host.c: Include grub/misc.h to fix a warning.
8217 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8218 warnings about implicit declarations.
8219
8790bb04 8220 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8221 variable.
8222 * include/grub/i386/loader.h: Change declaration of
8223 grub_linux_boot() to match what grub_loader_set() expects.
8224 * util/getroot.c (grub_guess_root_device): Return const char* to
8225 fix a warning.
8226 * util/grub-probe.c (probe): Fix a warning about uninitialized
8227 abstraction_name variable.
8228 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8229 second argument as unused to fix a warning.
8230
9a3f3296 8231 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8232 missing grub_error() call.
8233
0ecef90d 8234 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8235 2.60 and newer uses it to define datadir.
8236
0bf6d401 8237 * commands/sleep.c: Fix warning about implicit declaration.
8238 * disk/memdisk.c: Likewise.
8239 * loader/aout.c: Likewise.
8240 * loader/i386/bsd_normal.c: Likewise.
8241 * util/grub-probe.c: Likewise.
8242
7cdacf97 8243 * commands/i386/cpuid.c (has_longmode): Make static.
8244 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8245 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8246
17c74c21 8247 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8248 GDT. This is more robust, as %ds can change.
8249 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8250 calling real_to_prot().
8251 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8252
80a3e68b 82532008-03-28 Pavel Roskin <proski@gnu.org>
8254
8255 * kern/i386/pc/startup.S: Assert that uncompressed functions
8256 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8257 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8258 code, as they push parts of the code (error handlers) beyond
8259 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8260 code as correctness and size.
8261
77bcd272 82622008-03-28 Pavel Roskin <proski@gnu.org>
8263
8264 * kern/i386/pc/startup.S
8265 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8266 data block address to the real mode, keep offset minimal. This
8267 works around a bug in AWARD BIOS on old Athlon systems, which
8268 makes CD detection hang.
8269
c5dfd43b 82702008-03-26 Pavel Roskin <proski@gnu.org>
8271
8272 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8273 const.
8274 * include/grub/normal.h: Add grub_parse_color_name_pair()
8275 declaration.
8276
bf962df2 82772008-03-24 Bean <bean123ch@gmail.com>
8278
8279 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8280 (cd_count): Removed.
8281 (cd_drive): New variable.
8282 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8283 (grub_biosdisk_call_hook): Likewise.
8284 (grub_biosdisk_iterate): Change cdrom detection method.
8285 (grub_biosdisk_open): Replace cd_start with cd_drive.
8286 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8287 detect cdrom device.
8288
8289 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8290 Removed.
8291 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8292 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8293 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8294 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8295 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8296 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8297 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8298 (grub_biosdisk_cdrp): New structure.
8299 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8300
8301 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8302
8303 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8304 device.
8305
8306 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8307 New function.
8308
68e7fc7a 83092008-03-20 Robert Millan <rmh@aybabtu.com>
8310
8311 Remove 2 TiB limit in ata.mod.
8312 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8313 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8314 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8315 grub_uint64_t instead of grub_uint32_t.
8316
38ad2cf5 83172008-03-05 Bean <bean123ch@gmail.com>
8318
8319 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8320 (grub_multiboot): Set boot device.
8321
8322 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8323
2b89344e 83242008-03-02 Bean <bean123ch@gmail.com>
8325
8326 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8327 symlink_buffer.
8328
87a95d1f 83292008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8330
8331 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8332 texinfo.tex.
8333
8334 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8335 modified.
8336
8337 * docs/fdl.texi: New file.
f19dbdb7 8338
87a95d1f 8339 * docs/mdate-sh: New file. Copied from gnulib.
8340 * docs/texinfo.tex: Likewise.
8341
8342 * config.guess: Updated from gnulib.
8343 * install-sh: Likewise.
8344
7dc15d8e 83452008-02-28 Robert Millan <rmh@aybabtu.com>
8346
8347 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8348 (aout_mod_SOURCES): New variable.
8349 (aout_mod_CFLAGS): Likewise.
8350 (aout_mod_LDFLAGS): Likewise.
8351
8352 * conf/i386-ieee1275.rmk: Likewise.
8353
b00ab696 83542008-02-28 Robert Millan <rmh@aybabtu.com>
8355
8356 * util/update-grub.in: Reorganise terminal validity check. Accept
8357 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8358 Based on suggestion by Franklin PIAT.
8359
79ca2d78 83602008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8361
8362 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8363 function.
8364 * util/getroot.c (grub_util_check_block_device): New function that
8365 returns the given argument if it is a block device and returns NULL else.
8366 * util/grub-probe.c (argument_is_device): New variable.
8367 (probe): Promote device_name from a variable to an argument. Receive
8368 device_name from grub_util_check_block_device() if path is NULL and from
8369 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 8370 (options): Introduce new parameter '-d, --device'.
79ca2d78 8371 (main): Add description of the new parameter to the help screen.
8372 Rename path variable to argument. Set argument_is_device if the '-d'
8373 option is given. Pass argument to probe() depending on
8374 argument_is_device.
8375
0d16e571 83762008-02-24 Bean <bean123ch@gmail.com>
8377
8378 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8379 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8380 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8381 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8382 (GRUB_ISO9660_VOLDESC_END): Likewise.
8383 (grub_iso9660_primary_voldesc): New member escape.
8384 (grub_iso9660_data): New member joliet.
8385 (grub_iso9660_convert_string): New function.
8386 (grub_iso9660_mount): Detect joliet extension.
8387 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8388 (grub_iso9660_iso9660_label): Likewise.
8389
8390 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8391 (grub_setup_SOURCES): Add fs/udf.c.
8392 (grub_fstest_SOURCES): Likewise.
8393 (udf_mod_SOURCES): New variable.
8394 (udf_mod_CFLAGS): Likewise.
8395 (udf_mod_LDFLAGS): Likewise.
8396
8397 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8398 (grub_emu_SOURCES): Likewise.
8399
8400 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8401
8402 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8403
8404 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8405
8406 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8407
8408 * fs/udf.c: New file.
8409
8a594a17 84102008-02-24 Robert Millan <rmh@aybabtu.com>
8411
8412 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8413 (normal/lexer.c_DEPENDENCIES): New variables.
8414 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8415 (normal/lexer.c_DEPENDENCIES): Likewise.
8416 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8417 (normal/lexer.c_DEPENDENCIES): Likewise.
8418 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8419 (normal/lexer.c_DEPENDENCIES): Likewise.
8420 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8421 (normal/lexer.c_DEPENDENCIES): Likewise.
8422 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8423 (normal/lexer.c_DEPENDENCIES): Likewise.
8424
2dc33c03 84252008-02-23 Robert Millan <rmh@aybabtu.com>
8426
8427 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8428 since they were intended to be in hex. This didn't break previously
8429 because of a bug in gpt_partition_map_iterate() (see below).
8430
8431 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8432 when checking the validity of GPT header.
8433 Remove `partno', since it always provides the same information as `i'.
8434
f6f4cfb0 84352008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8436
8437 * include/grub/efi/time.h: Fix a wrong comment.
8438
79ff665f 84392008-02-19 Pavel Roskin <proski@gnu.org>
8440
8441 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8442 message.
8443
d38e24c2 84442008-02-19 Bean <bean123ch@gmail.com>
8445
8446 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8447 (aout_mod_SOURCES): New variable.
8448 (aout_mod_CFLAGS): Likewise.
8449 (aout_mod_LDFLAGS): Likewise.
8450 (_bsd_mod_SOURCES): New variable.
8451 (_bsd_mod_CFLAGS): Likewise.
8452 (_bsd_mod_LDFLAGS): Likewise.
8453 (bsd_mod_SOURCES): New variable.
8454 (bsd_mod_CFLAGS): Likewise.
8455 (bsd_mod_LDFLAGS): Likewise.
8456
8457 * include/grub/aout.h: New file.
8458
8459 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8460
8461 * include/grub/i386/bsd.h: New file.
8462
8463 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8464 to make it public.
8465
8466 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8467 function is called, so that it's possible to change it inside the hook.
8468 (grub_elf64_load): Likewise.
8469 (grub_elf_file): Don't close the file if elf header is not found.
8470 (grub_elf_close): Close the file if grub_elf_file fails (The new
8471 grub_elf_file won't close it).
8472 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8473 (grub_elf64_size): Likewise.
8474
8475 * kern/i386/loader.S (grub_unix_real_boot): New function.
8476
8477 * loader/aout.c: New file.
8478
8479 * loader/i386/bsd.c: New file.
8480
8481 * loader/i386/bsd_normal.c: New file.
8482
8483 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8484
8485 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 8486 can test other formats.
d38e24c2 8487
b93bdb0f 84882008-02-19 Robert Millan <rmh@aybabtu.com>
8489
8490 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8491 (grub_gpt_partition_type_empty): Redefine with macro from
8492 `<grub/gpt_partition.h>'.
8493 (gpt_partition_map_iterate): Adjust partition type comparison.
8494
8495 Export `entry' as partmap-specific `part.data' struct.
8496 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8497
8498 * include/grub/gpt_partition.h (grub_gpt_header)
8499 (grub_gpt_partentry): ... to here (new file).
8500
8501 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8502
8503 (grub_gpt_partition_type_bios_boot): New const variable, defined
8504 with macro from `<grub/gpt_partition.h>'.
8505
8506 (setup): Replace `first_start' with `embed_region', which keeps
8507 track of the embed region (and is partmap-agnostic).
8508
8509 Replace find_first_partition_start() with find_usable_region(),
8510 which finds a usable region for embedding using partmap-specific
8511 knowledge (supports PC/MSDOS and GPT).
8512
8513 Fix all assumptions that the embed region start at sector 1, using
8514 `embed_region.start' from now on. Similarly, use `embed_region.end'
8515 rather than `first_start' to calculate available size.
8516
8517 In grub_util_info() message, replace "into after the MBR" with an
8518 indication of the specific sector our embed region starts at.
8519
66cb40f6 85202008-02-19 Robert Millan <rmh@aybabtu.com>
8521
8522 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8523 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8524 `commands/reboot.c'.
8525 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8526 (halt_mod_SOURCES): Likewise.
8527 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8528 (halt_mod_SOURCES): Likewise.
8529
b7202015 85302008-02-17 Christian Franke <franke@computer.org>
8531
8532 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8533
32b0fc49 85342008-02-17 Robert Millan <rmh@aybabtu.com>
8535
8536 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8537 set `first_start' to 0 for non-PC/MSDOS partition maps.
8538
aca63502 85392008-02-16 Robert Millan <rmh@aybabtu.com>
8540
8541 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8542 do not assume partition map is PC/MSDOS before performing checks that
8543 are specific to that layout.
8544
0de8be86 85452008-02-13 Robert Millan <rmh@aybabtu.com>
8546
8547 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8548 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8549 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8550
c3db8364 85512008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8552
8553 * configure.ac: Only a cosmetic change on the handling of
8554 -fno-stack-protector.
8555
f714229e 85562008-02-12 Alexandre Boeglin <alex@boeglin.org>
8557
c3db8364 8558 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8559 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8560 reboot.c.
f714229e 8561 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8562 (halt_mod_SOURCES): New variable.
8563 (halt_mod_CFLAGS): Likewise.
8564 (halt_mod_LDFLAGS): Likewise.
8565 (reboot_mod_SOURCES): Likewise.
8566 (reboot_mod_CFLAGS): Likewise.
8567 (reboot_mod_LDFLAGS): Likewise.
8568
c3db8364 8569 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8570 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8571 reboot.c.
f714229e 8572 (halt_mod_SOURCES): Likewise.
8573 (reboot_mod_SOURCES): Likewise.
8574
c3db8364 8575 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8576 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 8577 (reboot_mod_SOURCES): Likewise.
8578
8579 * commands/i386/pc/reboot.c: merge this file ...
8580
8581 * commands/ieee1275/reboot.c: ... and this file ...
8582
8583 * commands/reboot.c: ... to this file.
c3db8364 8584 Add some precompiler directive to include the correct header for
8585 each machine.
f714229e 8586
8587 * commands/ieee1275/halt.c: move this file ...
8588
8589 * commands/halt.c: ... to here.
c3db8364 8590 Add some precompiler directive to include the correct header for
8591 each machine.
f714229e 8592
8593 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8594 (grub_halt): Likewise.
8595
8596 * kern/efi/efi.c (grub_reboot): New function.
8597 (grub_halt): Likewise.
8598
c74493e0 85992008-02-12 Robert Millan <rmh@aybabtu.com>
8600
8601 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8602 /dev (like it is done for /dev/mapper). This doesn't provide support
8603 for EVMS, but at least it is now easy to identify the problem when it
8604 arises.
8605
d0db4b04 86062008-02-11 Robert Millan <rmh@aybabtu.com>
8607
8608 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8609 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8610 comparing it with -1, not 0.
8611
bf748642 86122008-02-10 Robert Millan <rmh@aybabtu.com>
8613
8614 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8615 `disk/lvm.c'.
8616 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8617 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8618
8619 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8620 `disk/lvm.c' to the end of the list.
8621 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8622 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8623
b5db202a 86242008-02-10 Robert Millan <rmh@aybabtu.com>
8625
8626 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8627 grub_print_error() instead. This will let user know why we're entering
8628 rescue mode.
8629 Based on suggestions from Sam Morris.
8630
83abee31 86312008-02-10 Alexandre Boeglin <alex@boeglin.org>
8632
8633 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8634 on remaining N args, instead of "--" arg N times.
8635
78d5a08b 86362008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8637
8638 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8639 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8640 pattern for unknown glyphs.
8641
68807e5f 86422008-02-09 Robert Millan <rmh@aybabtu.com>
8643
8644 * configure.ac: Probe for `help2man'.
8645 * Makefile.in (builddir): New variable.
8646 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8647 or otherwise add a few flags/options to it.
8648 (install-local): For every executable utility or script that is
8649 installed, invoke $(HELP2MAN) to install a manpage based on --help
8650 output.
8651
8652 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8653 that it doesn't prevent --help from working in build tree.
8654
8655 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8656 with `bug-grub@gnu.org'.
8657 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8658 * util/update-grub.in (usage): New function.
8659 Implement proper argument check, with support for --help and --version
8660 (as well as existing -y).
8661
86622008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 8663
8664 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8665 avoid overwriting previous output.
8666 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8667
c1962162 86682008-02-09 Robert Millan <rmh@aybabtu.com>
8669
8670 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8671 drawing the menu.
8672
3dac2e3f 86732008-02-09 Robert Millan <rmh@aybabtu.com>
8674
8675 * commands/sleep.c: New file.
8676 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8677 (sleep_mod_SOURCES): New variable.
8678 (sleep_mod_CFLAGS): Likewise.
8679 (sleep_mod_LDFLAGS): Likewise.
8680
7a634e08 86812008-02-09 Robert Millan <rmh@aybabtu.com>
8682
8683 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8684 situations in which we can deduce the RAID size and the superblock
8685 doesn't match it.
8686
b92f0c18 86872008-02-09 Robert Millan <rmh@aybabtu.com>
8688
8689 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8690 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8691 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8692
8693 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8694 and return a grub_diskmemberlist_t composed of physical array members.
8695 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8696
8697 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8698 prototype.
8699 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8700 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8701 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8702
8703 * util/grub-probe.c (probe): Move partmap probing code from here ...
8704 (probe_partmap): ... to here.
8705 (probe): Use probe_partmap() once for the disk we're probing, and
8706 additionally, when such disk contains a memberlist() struct member,
8707 once for each disk that is contained in the structure returned by
8708 memberlist().
8709
91a4bf68 87102008-02-09 Robert Millan <rmh@aybabtu.com>
8711
8712 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8713 environment variable to 'all' in order to obtain debug output from
8714 non-util/ code.
8715 * util/i386/pc/grub-setup.c (main): Likewise.
8716
a96f9caa 87172008-02-08 Robert Millan <rmh@aybabtu.com>
8718
8719 * disk/raid.c (grub_raid_scan_device): Check for
8720 `array->device[sb.this_disk.number]' rather than for
8721 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 8722 guaranteed to be accessible.
a96f9caa 8723
b37a9222 87242008-02-08 Robert Millan <rmh@aybabtu.com>
8725
8726 * disk/raid.c: Update copyright.
8727 * fs/cpio.c: Likewise.
8728 * include/grub/raid.h: Likewise.
8729 * loader/i386/pc/multiboot.c: Likewise.
8730 * util/hostfs.c: Likewise.
8731
5626aee1 87322008-02-08 Robert Millan <rmh@aybabtu.com>
8733
8734 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8735 to a grub_disk_t array.
8736 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8737 `device[x]'.
8738 (grub_raid_scan_device): Replace `device[x].name' accesses with
8739 `device[x]->name'. Simplify initialization of `array->device[x]'.
8740
554f0187 87412008-02-08 Robert Millan <rmh@aybabtu.com>
8742
8743 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8744 grub_dprintf() calls.
8745 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8746 error message.
8747
1ec8425d 87482008-02-07 Christian Franke <franke@computer.org>
8749
8750 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8751 instead of fseek and ftell to support large files.
8752 (grub_hostfs_read): Likewise.
8753
f2156fda 87542008-02-07 Robert Millan <rmh@aybabtu.com>
8755
8756 Patch from Jeroen Dekkers.
8757 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 8758 failure, since successfully reading all array members might not be
f2156fda 8759 required.
8760
9216e0e7 87612008-02-06 Robert Millan <rmh@aybabtu.com>
8762
8763 * util/grub-probe.c (probe): Simplify partmap probing (with the
8764 assumption that the first word up to the underscore equals to
8765 the module name).
8766
b0dfd29a 87672008-02-06 Christian Franke <franke@computer.org>
8768
8769 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8770 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8771 last block of a cpio or tar stream.
8772 Check for "TRAILER!!!" instead of any empty data
8773 block to detect last block of a cpio stream.
8774 (grub_cpio_dir): Fix constness of variable np.
8775 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8776 cpio or tar trailer is detected. This fixes a crash
8777 on open of a non existing file.
8778
c32865bf 87792008-02-05 Bean <bean123ch@gmail.com>
8780
8781 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8782 address of entry.
8783 (grub_multiboot_load_elf64): Likewise.
8784 (grub_multiboot): Initialize mbi structure.
8785
8786 * util/grub-fstest.c: Don't include unused header file script.h.
8787
fe6b695a 8788 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 8789 of file.
8790 (grub_fstest_SOURCES): Likewise.
8791
409480b7 87922008-02-05 Robert Millan <rmh@aybabtu.com>
8793
8794 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8795 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8796 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8797 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8798
8799 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8800 (translation_table): Replace hardcoded values with macros
8801 provided by `<grub/term.h>'.
8802
8803 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8804 (keyboard_map): Correct/add a few values, with macros provided
8805 by `<grub/term.h>'.
8806 (keyboard_map_shift): Zero values that don't differ from their
8807 `keyboard_map' equivalents.
8808 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8809 Discard the second scan code that is always sent by Caps lock.
8810 Only use `keyboard_map_shift' when it provides a non-zero value,
8811 otherwise fallback to `keyboard_map'.
8812
99fadbaa 88132008-02-04 Bean <bean123ch@gmail.com>
8814
8815 * Makefile.in (enable_grub_fstest): New variable.
8816
8817 * conf/common.rmk (grub_fstest_init.lst): New rule.
8818 (grub_fstest_init.h): Likewise.
8819 (grub_fstest_init.c): Likewise.
8820 (util/grub-fstest.c_DEPENDENCIES): New variable.
8821 (grub_fstest_SOURCES): Likewise.
8822
8823 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8824
8825 * util/grub-fstest.c: New file.
8826
bf567c50 88272008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8828
8829 Make grub-setup handle a separate root device.
f19dbdb7 8830
bf567c50 8831 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8832 so that the root device can be compared with the destination
8833 device.
8834 When embedding the core image, if the root and destination devices
8835 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8836 0xFF.
8837 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8838
9be6b98b 88392008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8840
8841 Add support for having a grub directory in a different drive. This
8842 is still only the data handling part.
f19dbdb7 8843
9be6b98b 8844 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8845 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8846 (grub_root_drive): New variable.
8847
8848 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8849 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8850 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8851 as it was.
8852
8853 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8854
8855 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8856 macro.
8857 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8858
8859 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8860 is bogus, because PXE booting does not specify any drive
8861 correctly.
8862
8863 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8864 am not sure if this is really correct.
8865
8866 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8867 is always identical to the boot drive when booting from a CD.
8868
8869 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8870 longer.
8871 (root_drive): New variable.
8872 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8873 (setup_sectors): Push %dx right after popping it, because %dh will
8874 be modified later.
8875 (copy_buffer): Restore %dx.
8876
e0ca0677 88772008-02-03 Robert Millan <rmh@aybabtu.com>
8878
8879 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8880 use `cdboot.img' for cdrom images.
8881
3b3f6629 88822008-02-03 Robert Millan <rmh@aybabtu.com>
8883
8884 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8885 only setup gfxterm when `font' command has succeeded.
8886
d42b3672 88872008-02-03 Robert Millan <rmh@aybabtu.com>
8888
8889 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8890 (grub_rescue_cmd_multiboot_loader)
8891 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8892
fa370ea6 88932008-02-03 Pavel Roskin <proski@gnu.org>
8894
e0c5dacb 8895 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8896 %edx and %esi from stack only after grub_gate_a20() is called.
8897 grub_gate_a20() clobbers %edx.
8898
f2a76e1d 88992008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8900
8901 * configure.ac (AC_INIT): Bumped to 1.96.
8902
8903 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8904 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8905 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8906 video/readers/png.c.
8907
90fd32d1 89082008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8909
8910 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8911 (cdboot_img_SOURCES): New variable.
8912 (cdboot_img_ASFLAGS): New variable.
8913 (cdboot_img_LDFLAGS): New variable.
8914
8915 * boot/i386/pc/cdboot.S: New file.
8916
8917 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8918 (cd_count): Likewise.
8919 (grub_biosdisk_get_drive): Add support for cd device.
8920 (grub_biosdisk_call_hook): Likewise.
8921 (grub_biosdisk_iterate): Likewise.
8922 (grub_biosdisk_open): Likewise.
8923 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8924 (grub_biosdisk_rw): Support reading from cd device.
8925 (GRUB_MOD_INIT): Iterate cd devices.
8926
8927 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8928 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8929 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8930
8931 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8932
4020aa53 89332008-02-02 Robert Millan <rmh@aybabtu.com>
8934
8935 * commands/read.c: New file.
8936 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8937 (read_mod_SOURCES): New variable.
8938 (read_mod_CFLAGS): Likewise.
8939 (read_mod_LDFLAGS): Likewise.
8940
e03a1132 89412008-02-02 Robert Millan <rmh@aybabtu.com>
8942
8943 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8944 determining whether menu has to be displayed.
8945
58c69220 89462008-02-02 Marco Gerards <marco@gnu.org>
8947
8948 * bus/pci.c: New file.
8949
8950 * include/grub/pci.h: Likewise.
8951
8952 * include/grub/i386/pc/pci.h: Likewise.
8953
8954 * commands/lspci.c: Likewise.
8955
8956 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8957 `lspci.mod'.
8958 (pci_mod_SOURCES): New variable.
8959 (pci_mod_CFLAGS): Likewise.
8960 (pci_mod_LDFLAGS): Likewise.
8961 (lspci_mod_SOURCES): Likewise.
8962 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8963 (lspci_mod_LDFLAGS): Likewise.
58c69220 8964
c004e1b4 89652008-02-02 Bean <bean123ch@gmail.com>
8966
8967 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8968 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8969
8970 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8971 (grub_xfs_btree_node): New structure.
8972 (grub_xfs_btree_root): New structure.
8973 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8974 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8975 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8976 (GRUB_XFS_EXTENT_SIZE): Likewise.
8977 (grub_xfs_read_block): Support btree format type.
8978 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8979 Use directory block as basic unit.
8980
8981 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8982
8983 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8984 __attribute__ ((__regparm__ (1))).
8985
f95562bf 89862008-02-01 Robert Millan <rmh@aybabtu.com>
8987
8988 Correct a mistake in previous commit.
8989
8990 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8991 top.
8992 (normal/command.c_DEPENDENCIES): New variable.
8993
7d31f41f 89942008-02-01 Robert Millan <rmh@aybabtu.com>
8995
8996 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8997 top.
8998 (normal/command.c_DEPENDENCIES): New variable.
8999 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9000 * conf/i386-ieee1275.rmk: Likewise.
9001 * conf/i386-linuxbios.rmk: Likewise.
9002 * conf/i386-pc.rmk: Likewise.
9003 * conf/sparc64-ieee1275.rmk: Likewise.
9004 * conf/powerpc-ieee1275.rmk: Likewise.
9005 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9006
9007 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9008
60b6be74 90092008-02-01 Robert Millan <rmh@aybabtu.com>
9010
9011 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9012 call at beginning of function.
9013
078522ab 90142008-01-31 Pavel Roskin <proski@gnu.org>
9015
9016 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 9017 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9018 (grub_mkrescue_SOURCES): Likewise.
078522ab 9019 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9020
ccaa8a5f 90212008-01-30 Robert Millan <rmh@aybabtu.com>
9022
9023 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9024 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9025 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9026 (grub_probe_SOURCES): ... to here.
9027
9028 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9029 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9030 * conf/i386-ieee1275.rmk: Likewise.
9031 * conf/i386-linuxbios.rmk: Likewise.
9032 * conf/powerpc-ieee1275.rmk: Likewise.
9033
ae5a9cd7 90342008-01-30 Tristan Gingold <gingold@free.fr>
9035
9036 * kern/rescue.c: Silently accept empty lines.
9037
70bc2ef2 90382008-01-29 Bean <bean123ch@gmail.com>
9039
9040 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9041 (real_code_2): Code cleanup and change comment style.
9042 (move_memory): Avoid using 32-bit address mode.
9043
6a4d50ea 90442008-01-29 Bean <bean123ch@gmail.com>
9045
9046 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9047 (png_mod_SOURCES): New variable.
9048 (png_mod_CFLAGS): Likewise.
9049 (png_mod_LDFLAGS): Likewise.
9050
9051 * video/readers/png.c: New file.
9052
11cc30ac 90532008-01-28 Robert Millan <rmh@aybabtu.com>
9054
9055 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9056 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9057 `ifndef GRUB_MOD_GAP' hack.
9058 * util/elf/grub-mkimage.c (add_segments): Likewise.
9059
3abc589f 90602008-01-27 Robert Millan <rmh@aybabtu.com>
9061
9062 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9063 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 9064 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 9065
e1907778 90662008-01-27 Robert Millan <rmh@aybabtu.com>
9067
9068 Get grub-emu to build again (including parallel builds).
9069
9070 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9071 Split into ...
9072 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9073 (normal/execute.c_DEPENDENCIES): ... this, ...
9074 (grub-emu_DEPENDENCIES): ... and this.
9075
9076 * conf/i386-efi.rmk: Likewise.
9077 * conf/i386-linuxbios.rmk: Likewise.
9078 * conf/i386-ieee1275.rmk: Likewise.
9079 * conf/powerpc-ieee1275.rmk: Likewise.
9080 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9081
2216b101 90822008-01-27 Robert Millan <rmh@aybabtu.com>
9083
9084 * NEWS: Add a few items.
9085
f75172d9 90862008-01-27 Robert Millan <rmh@aybabtu.com>
9087
9088 Fix parallel builds with grub-emu. Based on earlier commit for
9089 grub-probe and grub-setup.
9090
9091 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9092 (util/grub-emu.c_DEPENDENCIES): ... this.
9093 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9094 (util/grub-emu.c_DEPENDENCIES): ... this.
9095 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9096 (util/grub-emu.c_DEPENDENCIES): ... this.
9097 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9098 (util/grub-emu.c_DEPENDENCIES): ... this.
9099 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9100 (util/grub-emu.c_DEPENDENCIES): ... this.
9101
3f51de77 91022008-01-27 Pavel Roskin <proski@gnu.org>
9103
9104 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9105 to create a gap between _end and the modules added to the image
9106 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9107 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9108 * util/elf/grub-mkimage.c (add_segments): Likewise.
9109
2033f53e 91102008-01-26 Pavel Roskin <proski@gnu.org>
9111
9112 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9113 just return an error.
9114
22da1f6f 91152008-01-26 Bean <bean123ch@gmail.com>
9116
9117 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9118 (grub_reiserfs_get_item): Save offset of the next item.
9119 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9120
2a9525e6 91212008-01-25 Robert Millan <rmh@aybabtu.com>
9122
9123 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9124 make all filesystem sources appear together (possibly fixing omissions
9125 while at it).
9126 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9127 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9128 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9129 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9130
9131 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9132 add `kern/file.c'.
9133 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9134 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9135 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9136 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9137
9138 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9139 (probe): Add a sanity check to make sure of our ability to read
9140 requested files when probing for filesystem type.
9141
9142 * genmk.rb: Update copyright year (2007).
9143
9144 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9145 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9146 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9147 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9148 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9149 : Remove function prototypes.
9150
b95f71b5 91512008-01-25 Robert Millan <rmh@aybabtu.com>
9152
9153 Revert my previous commits (based on wrong assumption of how grub_errno
9154 works).
9155
fe6b695a 9156 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 9157 * kern/file.c (grub_file_open): Likewise.
9158
d08bbb49 91592008-01-24 Pavel Roskin <proski@gnu.org>
9160
9161 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9162 that hang if GRUB tries to setup colors.
9163 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9164 colors for firmwares that don't support it.
9165 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9166 Recognize Open Hack'Ware, set flags to work around its
9167 limitations.
9168
605e36ed 91692008-01-24 Robert Millan <rmh@aybabtu.com>
9170
9171 * kern/file.c (grub_file_open): Do not account previous failures of
9172 unrelated functions when grub_errno is checked for.
9173 Reported by Oleg Strikov.
9174
bac332a1 91752008-01-24 Bean <bean123ch@gmail.com>
9176
9177 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9178 (grub_ufs_sblock): New member volume name.
9179 (grub_ufs_find_file): Fix string copy bug.
9180 (grub_ufs_label): Implement this function properly.
9181
9182 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9183 (grub_hfs_iterate_records): Use the correct file number for extents
9184 and catalog file. Fix problem in next index calculation.
9185 (grub_hfs_find_node): Replace recursive function call with loop.
9186 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9187
15c80c09 91882008-01-23 Robert Millan <rmh@aybabtu.com>
9189
9190 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9191 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9192 (grub_multiboot2_real_boot): New function prototype.
9193
9194 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9195 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9196
9197 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9198 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9199
305338fd 92002008-01-23 Robert Millan <rmh@aybabtu.com>
9201
9202 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9203 #ifdef'ed out grub_printf().
9204
3ea52685 92052008-01-23 Robert Millan <rmh@aybabtu.com>
9206
9207 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9208 grub_dprintf calls, since they make "debug=all" mode unusable.
9209 (grub_console_checkkey): Likewise.
9210
5882ae4b 92112008-01-23 Robert Millan <rmh@aybabtu.com>
9212
9213 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9214 `term/i386/pc/at_keyboard.c'.
9215 (pkglib_MODULES): Add `serial.mod'.
9216 (serial_mod_SOURCES): New variable.
9217 (serial_mod_CFLAGS): Likewise.
9218 (serial_mod_LDFLAGS): Likewise.
9219
9220 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9221 `<grub/powerpc/ieee1275/console.h>'.
9222 (grub_keyboard_controller_init): New function prototype.
9223 (grub_console_checkkey): Likewise.
9224 (grub_console_getkey): Likewise.
9225
9226 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9227 keyboard on i386.
9228
9229 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9230 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9231
06ab5303 92322008-01-23 Robert Millan <rmh@aybabtu.com>
9233
9234 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9235 present, "(memdisk)/boot/grub" becomes the default prefix.
9236
9237 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9238 a memdisk tarball with all the modules. Add --overlay=DIR option that
9239 allows users to overlay additional files into the image.
9240
dbb475a4 92412008-01-23 Robert Millan <rmh@aybabtu.com>
9242
9243 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9244 and `machine/memory.h'.
9245 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9246 (_multiboot_mod_SOURCES): New variable.
9247 (_multiboot_mod_CFLAGS): Likewise.
9248 (_multiboot_mod_LDFLAGS): Likewise.
9249 (multiboot_mod_SOURCES): Likewise.
9250 (multiboot_mod_CFLAGS): Likewise.
9251 (multiboot_mod_LDFLAGS): Likewise.
9252
9253 * include/grub/i386/ieee1275/loader.h: New file.
9254
9255 * include/grub/i386/ieee1275/machine.h: Likewise.
9256
9257 * include/grub/i386/ieee1275/memory.h: Likewise.
9258
9259 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9260 variable declaration.
9261 (grub_os_area_size): Likewise.
9262
9263 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9264 (grub_lower_mem, grub_upper_mem): New variables.
9265 (grub_stop_floppy): New function (just to make
9266 grub_multiboot2_real_boot() happy).
9267
9268 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9269 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9270 (grub_stop): New function.
9271 Include `"../realmode.S"' and `"../loader.S"'.
9272
9273 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9274 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9275
9276 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9277 rely on grub_multiboot2_real_boot() for final boot.
9278
25638629 92792008-01-22 Robert Millan <rmh@aybabtu.com>
9280
9281 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9282 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9283 device that doesn't look like an SD card.
9284 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9285 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9286 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9287 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9288 found.
9289
9dad816d 92902008-01-22 Robert Millan <rmh@aybabtu.com>
9291
9292 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9293 avoid claiming over our own code.
9294
34842f2d 92952008-01-22 Bean <bean123ch@gmail.com>
9296
9297 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9298 (jpeg_mod_SOURCES): New variable.
9299 (jpeg_mod_CFLAGS): Likewise.
9300 (jpeg_mod_LDFLAGS): Likewise.
9301
9302 * video/readers/jpeg.c : New file.
9303
44023a28 93042008-01-22 Bean <bean123ch@gmail.com>
9305
9306 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9307 there are no more items.
9308
bc2d8ac6 93092008-01-21 Robert Millan <rmh@aybabtu.com>
9310
9311 * kern/mm.c (grub_mm_init_region): Improve debug message.
9312
261bd4bc 93132008-01-21 Robert Millan <rmh@aybabtu.com>
9314
9315 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9316 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9317 address.
9318 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9319 a C macro.
9320 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9321 Indicates start of upper memory.
9322 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9323 (generate_image): Abort when image size is big enough to corrupt
9324 upper memory.
9325
9326 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9327 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9328 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9329 instead of hardcoding 0xA0000.
9330 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9331 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9332 instead of hardcoding 0xA0000.
9333
f970b55e 93342008-01-21 Robert Millan <rmh@aybabtu.com>
9335
9336 * disk/memdisk.c (memdisk_size): New variable.
9337 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9338 `memdisk_size'.
9339 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9340 image to dynamic memory.
9341 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9342 `memdisk_size'. Free memdisk block.
9343
1a8b0526 93442008-01-21 Robert Millan <rmh@aybabtu.com>
9345
9346 Fix detection of very small filesystems (like tar).
9347
9348 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9349 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9350 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9351 a problem with this disk).
9352
6e9b4aab 93532008-01-21 Robert Millan <rmh@aybabtu.com>
9354
9355 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9356 on grub_biosdisk_rw_standard() error.
9357
0d8837b2 93582008-01-21 Robert Millan <rmh@aybabtu.com>
9359
9360 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9361 recent changes.
9362 * kern/elf.c: Likewise.
9363 * kern/ieee1275/ieee1275.c: Likewise.
9364 * kern/powerpc/ieee1275/openfw.c: Likewise.
9365 * term/ieee1275/ofconsole.c: Likewise.
9366
ffd36e34 93672008-01-21 Robert Millan <rmh@aybabtu.com>
9368
9369 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9370
3f0093d0 9371 * include/grub/kernel.h (grub_arch_memdisk_addr)
9372 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 9373
3f0093d0 9374 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9375 (grub_arch_memdisk_size): ... to here.
ffd36e34 9376
6c391b21 93772008-01-21 Robert Millan <rmh@aybabtu.com>
9378
9379 Mostly based on bugfix from Bean.
9380
9381 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9382 attribute with hook() parameter.
9383 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9384 declaration.
9385 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9386 attribute with hook() parameter.
9387 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9388 declaration.
9389
55a581dc 93902008-01-21 Robert Millan <rmh@aybabtu.com>
9391
9392 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9393 (pkglib_MODULES): Add `memdisk.mod'.
9394 (memdisk_mod_SOURCES): New variable.
9395 (memdisk_mod_CFLAGS): Likewise.
9396 (memdisk_mod_LDFLAGS): Likewise.
9397
9398 * disk/memdisk.c: New file.
9399
9400 * include/grub/disk.h (grub_disk_dev_id): Add
9401 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9402
9403 * include/grub/i386/pc/kernel.h
9404 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9405 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9406 (grub_kernel_image_size): New variable declaration.
9407 (grub_total_module_size): Likewise.
9408 (grub_memdisk_image_size): Likewise.
9409
9410 * include/grub/i386/pc/memory.h
9411 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9412
9413 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9414 (grub_arch_memdisk_addr): New variable declaration.
9415 (grub_arch_memdisk_size): Likewise.
9416
9417 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9418 (grub_arch_memdisk_size): Likewise.
9419
9420 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9421 (codestart): Replace hardcoded `0x100000' with
9422 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9423
9424 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9425 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9426 not NULL, append the contents of the file it refers to, at the end of
9427 the compressed kernel image. Initialize `grub_memdisk_image_size'
9428 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9429 (options): Add "memdisk"|'m' option.
9430 (main): Parse --memdisk|-m option, and pass user-provided path as
9431 parameter to generate_image().
9432
3d7f54c9 94332008-01-20 Robert Millan <rmh@aybabtu.com>
9434
9435 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9436 grub_dprintf() calls from here ...
9437 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9438
0bf74728 94392008-01-20 Robert Millan <rmh@aybabtu.com>
9440
9441 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9442
9443 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9444 declaration.
9445 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9446 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9447 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 9448 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 9449 property).
9450 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9451 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9452
33bf70a7 94532008-01-19 Robert Millan <rmh@aybabtu.com>
9454
fe6b695a 9455 Get rid of confusing function (superseded by
33bf70a7 9456 `grub_ieee1275_get_integer_property')
9457 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9458 prototype.
9459 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9460 function.
9461 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9462 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 9463 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 9464
e2da7d26 94652008-01-19 Robert Millan <rmh@aybabtu.com>
9466
9467 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9468 command after "shut-down", since implementations differ on which
9469 the command for halt is.
9470
59f1fd8d 94712008-01-19 Robert Millan <rmh@aybabtu.com>
9472
9473 * include/grub/i386/linuxbios/console.h: Add header protection.
9474 (grub_keyboard_controller_init): New function prototype.
9475 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9476 (KEYBOARD_COMMAND_READ): Likewise.
9477 (KEYBOARD_COMMAND_WRITE): Likewise.
9478 (KEYBOARD_SCANCODE_SET1): Likewise.
9479 (grub_keyboard_controller_write): New function.
9480 (grub_keyboard_controller_read): Likewise.
9481 (grub_keyboard_controller_init): Likewise.
9482
9483 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9484 (grub_console_init): On coreboot/LinuxBIOS, call
9485 grub_keyboard_controller_init().
9486
5f5a7c15 94872008-01-19 Robert Millan <rmh@aybabtu.com>
9488
9489 PowerPC changes provided by Pavel Roskin.
9490
9491 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9492 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9493 don't rely on cmain() doing it.
9494 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9495 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9496
1210e168 94972008-01-16 Robert Millan <rmh@aybabtu.com>
9498
9499 * include/grub/i386/linuxbios/memory.h
9500 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9501 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9502 receive `table_header' as argument. Instead, probe for it in the
9503 known memory ranges where it can be present.
9504 (grub_available_iterate): Do not pass a fixed `table_header' address
9505 to grub_linuxbios_table_iterate().
9506
3d04eab8 95072008-01-15 Robert Millan <rmh@aybabtu.com>
9508
9509 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9510 * conf/i386-ieee1275.rmk: New file.
9511 * include/grub/i386/ieee1275/console.h: Likewise.
9512 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9513 * include/grub/i386/ieee1275/kernel.h: Likewise.
9514 * include/grub/i386/ieee1275/time.h: Likewise.
9515 * kern/i386/ieee1275/init.c: Likewise.
9516 * kern/i386/ieee1275/startup.S: Likewise.
9517
d1bc1b73 95182008-01-15 Robert Millan <rmh@aybabtu.com>
9519
9520 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9521 when pointers are 32-bit (but still do set it to one when they are
9522 64-bit).
9523
66a65807 95242008-01-15 Robert Millan <rmh@aybabtu.com>
9525
9526 * include/grub/ieee1275/ieee1275.h
9527 (grub_ieee1275_get_integer_property): New function prototype.
9528
9529 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9530 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 9531 grub_ieee1275_get_property() to handle endianness.
66a65807 9532
9533 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9534 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 9535 where appropriate.
66a65807 9536 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9537 (grub_map): Likewise.
9538 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9539
a83ccafd 95402008-01-15 Bean <bean123ch@gmail.com>
9541
9542 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9543 (grub_script_execute_cmdline): Reset grub_errno.
9544
9545 * normal/main.c (read_config_file): Reset grub_errno.
9546
9547 * normal/parse.y (script_init): New.
9548 (script): Move function and menuentry here.
9549 (delimiter): New.
9550 (command): Add delimiter at the end of command.
9551 (commands): Adjust to match the new command.
9552 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 9553 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 9554 (if): Use the new commands.
9555
9556 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9557
df6ecfc6 95582008-01-15 Robert Millan <rmh@aybabtu.com>
9559
9560 * normal/menu.c (run_menu): Move timeout message from here ...
9561 (print_timeout): ... to here.
9562 (run_menu): Use print_timeout() once during initial draw to print
9563 the whole message, and again in every clock tick to update only
9564 the number of seconds.
9565
87ae25eb 95662008-01-15 Robert Millan <rmh@aybabtu.com>
9567
9568 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9569 actual size of `available' from grub_ieee1275_get_property(), and
9570 restrict parsing to that bound.
9571
47bf09a4 95722008-01-15 Christian Franke <franke@computer.org>
9573
9574 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9575 (argp_program_version): Remove variable.
9576 (argp_program_bug_address): Likewise.
9577 (options): Convert from struct argp_option to struct option.
9578 (struct arguments): Remove.
9579 (parse_opt): Remove.
9580 (usage): New function.
9581 (main): Replace struct args members by simple variables.
9582 Replace argp_parse() by getopt_long().
9583 Add switch to evaluate options.
9584 Add missing "(...)" around root_dev in prefix string.
9585
c86f1469 95862008-01-14 Robert Millan <rmh@aybabtu.com>
9587
9588 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9589 for grub_ieee1275_exit(), in order to improve portability.
9590
e622c559 95912008-01-14 Robert Millan <rmh@aybabtu.com>
9592
9593 * util/grub.d/10_linux.in (prefix): Define.
9594 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9595
44cb1ec8 95962008-01-13 Pavel Roskin <proski@gnu.org>
9597
9598 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9599 grub_errno if no errors have been detected.
9600
1eb8c802 96012008-01-12 Robert Millan <rmh@aybabtu.com>
9602
9603 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9604 (grub_util_get_dev_abstraction): New function prototype.
9605
9606 * util/getroot.c: Include `<grub/util/getroot.h>'
9607 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9608 (grub_util_get_dev_abstraction): ... here (new function).
9609
9610 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9611 `PRINT_ABSTRACTION'.
9612 (probe): Probe for abstraction type when requested.
9613 (main): Understand `--target=abstraction'.
9614
9615 * util/i386/efi/grub-install.in: Add abstraction module to core
9616 image when it is found to be necessary.
9617 * util/i386/pc/grub-install.in: Likewise.
9618 * util/powerpc/ieee1275/grub-install.in: Likewise.
9619
9620 * util/update-grub_lib.in (font_path): Return system path without
9621 converting to GRUB path.
9622 * util/update-grub.in: Convert system path returned by font_path()
9623 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9624 abstraction module is needed for loading fonts (if any). Export
9625 that as `GRUB_PRELOAD_MODULES'.
9626 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9627 insmod commands).
9628
52bd3de9 96292008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9630
9631 Remove some unused code from reiserfs.
f19dbdb7 9632
52bd3de9 9633 * fs/reiserfs.c (struct grub_reiserfs_key)
9634 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9635 (struct grub_reiserfs_node_body): Removed.
9636 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9637 Likewise.
9638 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9639 Likewise.
9640 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9641 Likewise.
9642 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9643 Likewise.
9644 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9645 Likewise.
9646 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9647 Likewise.
9648 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9649 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9650 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9651
2f80039d 96522008-01-10 Robert Millan <rmh@aybabtu.com>
9653
9654 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9655 Determines if a file is garbage left by packaging systems, etc.
9656 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9657 for processing /etc/grub.d scripts.
9658 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9659 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9660 as a condition for processing Linux images.
9661
87888032 96622008-01-10 Pavel Roskin <proski@gnu.org>
9663
9664 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9665 to compile reiserfs.c on PowerPC.
9666
7e54fced 96672008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 9668
9669 * kern/device.c (grub_device_iterate): Do not abort device iteration
9670 when one of the devices cannot be opened.
9671 * kern/disk.c (grub_disk_open): Do not account previous failures of
9672 unrelated functions when grub_errno is checked for.
9673
5aa541e6 96742008-01-08 Robert Millan <rmh@aybabtu.com>
9675
9676 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9677 `! grub_linux_is_bzimage', change order of address comparison to make
9678 it more intuitive, and improve "too big zImage" error message.
9679
7076340d 96802008-01-08 Robert Millan <rmh@aybabtu.com>
9681
9682 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9683 `$(update-grub_DATA)'.
9684 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9685 targets.
9686
9ca70333 96872008-01-07 Robert Millan <rmh@aybabtu.com>
9688
9689 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9690 which instruction is modified by grub-setup during installation
9691 (since it wasn't obvious by only looking at this file).
9692
38ccf575 96932008-01-07 Robert Millan <rmh@aybabtu.com>
9694
9695 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9696 listing actual TODO items.
9697
f5db4291 96982008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9699
868967cf 9700 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9701 correctly.
9702 (grub_reiserfs_get_key_offset): Likewise.
9703 (grub_reiserfs_set_key_offset): Likewise.
9704 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 9705 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 9706
9707 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9708 better to remove the bitfield version completely.
f19dbdb7 9709
868967cf 97102008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9711
f5db4291 9712 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9713 allocated from the heap, due to the fshelp implementation.
9714 (grub_reiserfs_dir): Free NODE, due to the same reason.
9715
492e6d9d 97162008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9717
9718 Mostly from Vincent Pelletier:
f19dbdb7 9719
492e6d9d 9720 * fs/reiserfs.c: New file.
f19dbdb7 9721
492e6d9d 9722 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9723 (reiserfs_mod_SOURCES): New variable.
9724 (reiserfs_mod_CFLAGS): Likewise.
9725 (reiserfs_mod_LDFLAGS): Likewise.
9726
9727 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9728 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9729 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9730 normal/color.c.
9731
9ce3e7c1 97322008-01-06 Robert Millan <rmh@aybabtu.com>
9733
9734 * normal/color.c: Remove `<grub/env.h>'.
9735
f3b58148 97362008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9737
9738 * include/grub/normal.h: Include <grub/env.h>.
9739
7ac3bcfa 97402008-01-05 Robert Millan <rmh@aybabtu.com>
9741
9742 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9743 usage example with `(hd0,1)'.
fb358190 9744 Reported by Samuel Thibault.
7ac3bcfa 9745
c8ee99d7 97462008-01-05 Robert Millan <rmh@aybabtu.com>
9747
9748 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9749 (grub_linux_boot_zimage): Rename to ...
9750 (grub_linux_boot): ... this.
9751 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9752 (grub_linux_boot_zimage): Conditionalize zImage copy.
9753
9754 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9755 (grub_linux_boot_bzimage): Remove prototype.
9756 (grub_linux_boot_zimage): Rename to ...
9757 (grub_linux_boot): ... this.
9758
9759 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9760 (grub_linux_boot): Remove function.
9761
0ece25b1 97622008-01-05 Robert Millan <rmh@aybabtu.com>
9763
9764 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9765 (grub_env_write_color_highlight): Likewise.
9766 (grub_wait_after_message): Likewise.
9767
9768 * normal/color.c: New file.
9769
9770 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9771 (normal_mod_DEPENDENCIES): Likewise.
9772
9773 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9774 (normal_mod_DEPENDENCIES): Likewise.
9775
9776 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9777 (normal_mod_DEPENDENCIES): Likewise.
9778
9779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9780 (normal_mod_DEPENDENCIES): Likewise.
9781
9782 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9783 for waiting after a message is printed.
9784 * normal/main.c (read_config_file): Likewise.
9785 (grub_normal_init): Register grub_env_write_color_normal() and
9786 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9787 `color_highlight' variables as global.
9788
9789 * normal/menu.c (grub_wait_after_message): New function.
9790 (grub_color_menu_normal): New variable. Replaces ...
9791 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9792 (grub_color_menu_highlight): New variable. Replaces ...
9793 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9794 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9795 `GRUB_TERM_COLOR_STANDARD'.
9796 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9797 `normal_code' and `highlight_code' to `old_color_normal' and
9798 `old_color_highlight', respectively.
9799 (grub_menu_init_page): Update colors when drawing the menu, based on
9800 `menu_color_normal' and `menu_color_highlight' variables.
9801 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9802 a message is printed.
9803
182dd4e5 98042008-01-05 Robert Millan <rmh@aybabtu.com>
9805
9806 * kern/env.c (grub_env_context_open): Propagate hooks for global
9807 variables to new context.
9808
9809 * kern/main.c (grub_set_root_dev): Export `root' variable.
9810
ddf8f6ad 98112008-01-05 Robert Millan <rmh@aybabtu.com>
9812
9813 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 9814 discs unconditionally, since udev and others have options to provide
ddf8f6ad 9815 them.
9816
d8b43d9b 98172008-01-05 Robert Millan <rmh@aybabtu.com>
9818
9819 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9820
2bff2de3 98212008-01-04 Christian Franke <franke@computer.org>
9822
9823 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9824 of eisa_mmap.
9825
97eab917 98262008-01-03 Pavel Roskin <proski@gnu.org>
9827
9828 * kern/i386/linuxbios/init.c: Put "void" to all function
9829 declarations with no arguments.
9830 * kern/powerpc/ieee1275/init.c: Likewise.
9831 * term/i386/pc/at_keyboard.c: Likewise.
9832 * term/i386/pc/vga_text.c: Likewise.
9833 * util/grub-mkdevicemap.c: Likewise.
9834
b9416d00 98352008-01-02 Robert Millan <rmh@aybabtu.com>
9836
9837 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9838 message when loaded image is out of bounds.
9839 (grub_multiboot_load_elf64): Likewise.
9840
92695df9 98412008-01-02 Pavel Roskin <proski@gnu.org>
9842
9843 * util/grub.d/10_linux.in: Try version without ".old" when
9844 looking for initrd. It's better to use initrd from the newer
9845 kernel of the same version than no initrd at all.
9846
d98d9cad 98472008-01-01 Robert Millan <rmh@aybabtu.com>
9848
9849 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9850
dbfdce36 98512008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9852
f19dbdb7 9853 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9854 grub_video_get_active_render_target.
9855 (grub_video_adapter): Added unmap_color and get_active_render_target.
9856
f19dbdb7 9857 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9858 grub_video_get_active_render_target.
9859 (grub_video_get_info): Changed method to accept NULL pointer as an
9860 argument to allow detection of active video adapter.
9861
9862 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9863 grub_video_vbe_unmap_color_int.
9864 Added grub_video_vbe_unmap_color and
9865 grub_video_vbe_get_active_render_target.
9866 (grub_video_vbe_adapter): Added unmap_color and
9867 get_active_render_target.
9868
f19dbdb7 9869 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9870 with grub_video_vbe_unmap_color_int.
9871
9872 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9873 (DEFAULT_NORMAL_COLOR): Likewise.
9874 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9875 (DEFAULT_FG_COLOR): Removed.
9876 (DEFAULT_BG_COLOR): Likewise.
9877 (DEFAULT_CURSOR_COLOR): Changed value.
9878 (grub_virtual_screen): Added standard_color_setting,
9879 normal_color_setting, highlight_color_setting and term_color.
9880 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9881 (bitmap_width): Added.
9882 (bitmap_height): Likewise.
9883 (bitmap): Likewise.
9884 (set_term_color): Likewise.
9885 (grub_virtual_screen_setup): Changed to use new terminal coloring
9886 settings.
9887 (grub_gfxterm_init): Added init for bitmap.
9888 (grub_gfxterm_fini): Added destroy for bitmap.
9889 (redraw_screen_rect): Updated to use background bitmap and new
9890 terminal coloring.
9891 (scroll_up): Added optimization for case when there is no bitmap.
9892 (grub_gfxterm_cls): Fixed to use correct background color.
9893 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9894 coloring.
9895 (grub_virtual_screen_setcolor): Likewise.
9896 (grub_virtual_screen_getcolor): Added.
9897 (grub_gfxterm_background_image_cmd): Likewise.
9898 (grub_video_term): Added setcolor and getcolor.
9899 (MOD_INIT): Added registration of background_image command.
9900 (MOD_TERM): Added unregistration for background_image command.
9901
c3c20931 99022007-12-30 Pavel Roskin <proski@gnu.org>
9903
9904 * loader/multiboot_loader.c: Fix multiboot command
9905 unregistration. Fix all typos in the word "multiboot".
9906
df266716 99072007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9908
9909 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9910 support for initrd names used in Fedora.
9911
fc6e896c 99122007-12-26 Bean <bean123ch@gmail.com>
9913
9914 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9915 (cpio_mod_SOURCES): New variable.
9916 (cpio_mod_CFLAGS): Likewise.
9917 (cpio_mod_LDFLAGS): Likewise.
9918
9919 * fs/cpio.c: New file.
9920
9921 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9922
9923 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9924
9925 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9926
9927 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9928
533110ad 99292007-12-25 Robert Millan <rmh@aybabtu.com>
9930
9931 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9932 (grub_getcolor): New function.
9933
9934 * kern/term.c (grub_getcolor): New function.
9935 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9936 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9937 (print_entry): Set normal and highlight colors to
9938 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9939 respectively, before printing and restore them to old
9940 values afterwards.
9941 (grub_menu_init_page): Likewise. Fill an additional colored space
9942 that would otherwise be left blank.
9943
9944 * term/efi/console.c (grub_console_getcolor): New function.
9945 (struct grub_console_term.getcolor): New variable.
9946 * term/i386/pc/console.c (grub_console_getcolor): New function.
9947 (struct grub_console_term.getcolor): New variable.
9948 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9949 (struct grub_console_term.getcolor): New variable.
9950
9951 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9952 (struct grub_console_term.setcolor): Remove variable.
9953 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9954 (struct grub_console_term.setcolor): Remove variable.
9955 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9956 (struct grub_console_term.setcolor): Remove variable.
9957 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9958 (struct grub_console_term.setcolor): Remove variable.
9959
4931827f 99602007-12-25 Robert Millan <rmh@aybabtu.com>
9961
9962 * configure.ac: Search for possible unifont.hex locations, and
9963 define UNIFONT_HEX if found.
9964
9965 * Makefile.in (UNIFONT_HEX): Define variable.
9966 (DATA): Rename to ...
9967 (PKGLIB): ... this. Update all users.
9968 (PKGDATA): New variable.
9969 (pkgdata_IMAGES): Rename to ...
9970 (pkglib_IMAGES): ... this. Update all users.
9971 (pkgdata_MODULES): Rename to ...
9972 (pkglib_MODULES): ... this. Update all users.
9973 (pkgdata_PROGRAMS): Rename to ...
9974 (pkglib_PROGRAMS): ... this. Update all users.
9975 (pkgdata_DATA): Rename to ...
9976 (pkglib_DATA): ... this. Update all users.
9977 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9978 (unicode.pff, ascii.pff): New rules.
9979 (all-local): Add `$(PKGDATA)' dependency.
9980 (install-local): Process `$(PKGDATA)'.
9981
9982 * util/update-grub_lib.in (font_path): Search for *.pff files in
9983 a few more locations, including `${pkgdata}'.
9984
57e57e31 99852007-12-23 Robert Millan <rmh@aybabtu.com>
9986
9987 Patch from Bean <bean123ch@gmail.com>:
9988 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9989 `size'.
9990
4bc72aa9 99912007-12-21 Bean <bean123ch@gmail.com>
9992
9993 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9994 (ntfscomp_mod_SOURCES): New variable.
9995 (ntfscomp_mod_CFLAGS): Likewise.
9996 (ntfscomp_mod_LDFLAGS): Likewise.
9997
9998 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9999 (grub_probe_SOURCES): Likewise.
10000 (grub_emu_SOURCES): Likewise.
10001
10002 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10003 (grub_emu_SOURCES): Likewise.
10004
10005 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10006 (grub_emu_SOURCES): Likewise.
10007
10008 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10009 (grub_emu_SOURCES): Likewise.
10010
10011 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10012 (read_run_list): Renamed to grub_ntfs_read_run_list.
10013 (decomp_nextvcn): Moved to ntfscomp.c.
10014 (decomp_getch): Likewise.
10015 (decomp_get16): Likewise.
10016 (decomp_block): Likewise.
10017 (read_block): Likewise.
10018 (read_data): Partially moved to ntfscomp.c.
10019 (fixup): Change unsigned to grub_uint16_t.
10020 (read_mft): Change unsigned long to grub_uint32_t.
10021 (read_attr): Likewise.
10022 (read_data): Likewise.
10023 (read_run_data): Likewise.
10024 (read_run_list): Likewise.
10025 (read_mft): Likewise.
10026
10027 * fs/ntfscomp.c: New file.
10028
10029 * include/grub/ntfs.h: New file.
10030
af680a87 100312007-12-16 Robert Millan <rmh@aybabtu.com>
10032
10033 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10034 IDE disk check, since Linux is known to support 20 IDE disks.
10035 Reported by Colin Watson.
10036
84be7599 100372007-12-15 Bean <bean123ch@gmail.com>
10038
10039 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10040 (lnxboot_img_SOURCES): New variable.
10041 (lnxboot_img_ASFLAGS): Likewise.
10042 (lnxboot_img_LDFLAGS): Likewise.
10043
10044 * boot/i386/pc/lnxboot.S: New file.
10045
6af9db01 100462007-11-24 Pavel Roskin <proski@gnu.org>
10047
10048 * configure.ac: Test if '--build-id=none' is supported by the
10049 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10050 objcopy to generate incorrect binary files (binutils
10051 2.17.50.0.18-1 as shipped by Fedora 8).
10052 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10053 linking, so that build ID doesn't break the test.
10054
7361cfe6 100552007-11-24 Pavel Roskin <proski@gnu.org>
10056
10057 * include/grub/i386/time.h: use "void" in the argument list
10058 of grub_cpu_idle().
10059 * include/grub/powerpc/time.h: Likewise.
10060 * include/grub/sparc64/time.h: Likewise.
10061
1593e10c 100622007-11-18 Christian Franke <franke@computer.org>
10063
10064 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10065 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10066 This fixes the problem that function keys did not work in grub-emu.
10067
3b8db1a8 100682007-11-18 Christian Franke <franke@computer.org>
10069
10070 * disk/host.c (grub_host_open): Remove attribute unused from
10071 name parameter. Add check for "host". This fixes the problem
10072 that grub-emu does not find partitions.
10073
2e29408d 100742007-11-18 Christian Franke <franke@computer.org>
10075
10076 * util/hostfs.c (is_dir): New function.
10077 (grub_hostfs_dir): Handle missing dirent.d_type case.
10078 (grub_hostfs_read): Add missing fseek().
10079 (grub_hostfs_label): Clear label pointer. This fixes a crash
10080 of grub-emu on "ls (host)".
10081
398cd047 100822007-11-18 Christian Franke <franke@computer.org>
10083
10084 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10085 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10086 to 64 bit boundary by default.
10087
c405c391 100882007-11-18 Bean <bean123ch@gmail.com>
10089
10090 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10091 (hexdump_mod_SOURCES): New variable.
10092 (hexdump_mod_CFLAGS): Likewise.
10093 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 10094
c405c391 10095 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10096
10097 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10098
10099 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10100
10101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10102
10103 * include/grub/hexdump.h: New file.
10104
10105 * commands/hexdump.c: New file.
10106
5cced7fd 101072007-11-10 Robert Millan <rmh@aybabtu.com>
10108
10109 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10110 in grub_outb() calls.
10111 (beep_on): Likewise.
10112
8b714eb0 101132007-11-10 Christian Franke <franke@computer.org>
10114
10115 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10116 (grub_menu_run): Likewise.
10117
ce0f1839 101182007-11-10 Robert Millan <rmh@aybabtu.com>
10119
10120 * include/grub/i386/efi/machine.h: New file.
10121 * include/grub/i386/linuxbios/machine.h: Likewise.
10122 * include/grub/i386/pc/machine.h: Likewise.
10123 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10124 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10125
10126 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10127 (serial_hw_io_addr): New variable.
10128 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10129 instead of `(unsigned short *) 0x400'.
10130
270c237d 101312007-11-10 Bean <bean123ch@gmail.com>
10132
10133 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10134
a87783bf 101352007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10136
10137 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10138 (vga_mod_SOURCES): Added.
10139 (vga_mod_CFLAGS): Likewise.
10140 (vga_mod_LDFLAGS): Likewise.
10141
10142 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10143 grub_outb() calls.
10144 (set_map_mask): Likewise.
10145 (set_read_map): Likewise.
10146 (set_read_address): Likewise.
10147 (vga_font): Removed variable.
10148 (get_vga_glyph): Removed function.
10149 (invalidate_char): Likewise.
10150 (write_char): Changed to use grub_font_get_glyph() for font
10151 information.
10152 (grub_vga_putchar): Likewise.
10153 (grub_vga_getcharwidth): Likewise.
10154
6433b448 101552007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10156
10157 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10158 flags.
10159 (pxeboot_img_LDFLAGS): Likewise.
10160 (diskboot_img_LDFLAGS): Likewise.
10161 (kernel_img_LDFLAGS): Likewise.
10162
49178511 101632007-11-06 Robert Millan <rmh@aybabtu.com>
10164
10165 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10166 in grub_outb() calls.
10167 (serial_hw_init): Likewise.
10168
53b052de 101692007-11-05 Robert Millan <rmh@aybabtu.com>
10170
10171 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10172 spaces. Skip non-regular files.
10173
5ab33bba 101742007-11-05 Robert Millan <rmh@aybabtu.com>
10175
10176 * kern/disk.c (grub_disk_firmware_fini)
10177 (grub_disk_firmware_is_tainted): New variables.
10178
10179 * include/grub/disk.h (grub_disk_firmware_fini)
10180 (grub_disk_firmware_is_tainted): Likewise.
10181
10182 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10183 (grub_disk_biosdisk_fini): ... to here.
10184 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10185 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10186 is set. Register grub_disk_biosdisk_fini() in
10187 `grub_disk_firmware_fini'.
10188
10189 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10190 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10191 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10192 to finish existing firmware disk interface.
10193
10194 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10195 (ata_mod_SOURCES): New variable.
10196 (ata_mod_CFLAGS): Likewise.
10197 (ata_mod_LDFLAGS): Likewise.
10198
0149ab7c 101992007-11-05 Robert Millan <rmh@aybabtu.com>
10200
10201 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10202 (grub_ata_wait): Reimplement using grub_millisleep().
10203
10204 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10205 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10206
be7ac41e 102072007-11-03 Marco Gerards <marco@gnu.org>
10208
10209 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10210 (CRTC_ADDR_PORT): New macro.
10211 (CRTC_DATA_PORT): Likewise.
10212 (CRTC_CURSOR): Likewise.
10213 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10214 (CRTC_CURSOR_ADDR_LOW): Likewise.
10215 (update_cursor): New function.
10216 (grub_console_real_putchar): Call `update_cursor'.
10217 (grub_console_gotoxy): Likewise.
10218 (grub_console_cls): Set the default color when clearing the
10219 screen.
10220 (grub_console_setcursor): Implemented.
10221
bb06ab2e 102222007-11-03 Marco Gerards <marco@gnu.org>
10223
10224 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10225 become activate.
10226 (grub_ata_pio_write): Likewise.
10227
10228 (grub_atapi_identify): Wait after issuing an ATA command.
10229 (grub_atapi_packet): Likewise.
10230 (grub_ata_identify): Likewise.
10231 (grub_ata_readwrite): Likewise.
10232
cf8f780b 102332007-11-03 Marco Gerards <marco@gnu.org>
10234
10235 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10236 (grub_ata_pio_write): Likewise.
10237 (grub_ata_readwrite): Use `grub_error', instead of
10238 returning `grub_errno'.
10239
ed649e54 102402007-11-03 Marco Gerards <marco@gnu.org>
10241
10242 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10243 grub_ata_pio_write once for every single sector, instead of for
10244 multiple sectors.
10245
ca25d8f0 102462007-10-31 Robert Millan <rmh@aybabtu.com>
10247
10248 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10249
10250 * conf/i386-linuxbios.rmk: New file.
10251
10252 * kern/i386/pc/hardware.c: Likewise.
10253 * term/i386/pc/at_keyboard.c: Likewise.
10254 * term/i386/pc/vga_text.c: Likewise.
10255
10256 * include/grub/i386/linuxbios/boot.h: Likewise.
10257 * include/grub/i386/linuxbios/console.h: Likewise.
10258 * include/grub/i386/linuxbios/init.h: Likewise.
10259 * include/grub/i386/linuxbios/kernel.h: Likewise.
10260 * include/grub/i386/linuxbios/loader.h: Likewise.
10261 * include/grub/i386/linuxbios/memory.h: Likewise.
10262 * include/grub/i386/linuxbios/serial.h: Likewise.
10263 * include/grub/i386/linuxbios/time.h: Likewise.
10264
10265 * kern/i386/linuxbios/init.c: Likewise.
10266 * kern/i386/linuxbios/startup.S: Likewise.
10267 * kern/i386/linuxbios/table.c: Likewise.
10268
e911ecc1 102692007-10-31 Marco Gerards <marco@gnu.org>
10270
10271 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10272 (ata_mod_SOURCES): New variable.
10273 (ata_mod_CFLAGS): Likewise.
10274 (ata_mod_LDFLAGS): Likewise.
10275
10276 * disk/ata.c: New file.
10277
10278 * include/grub/disk.h (grub_disk_dev_id): Add
10279 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 10280
7f66d0e0 102812007-10-31 Robert Millan <rmh@aybabtu.com>
10282
10283 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10284 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10285
10286 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10287 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10288
10289 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10290 `<grub/types.h>'.
10291
10292 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10293
5cd7dd46 102942007-10-27 Robert Millan <rmh@aybabtu.com>
10295
3236ca65 10296 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 10297
2ebfc90f 102982007-10-22 Robert Millan <rmh@aybabtu.com>
10299
10300 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10301 `"../realmode.S"'.
10302 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10303
73fcb0f3 103042007-10-22 Robert Millan <rmh@aybabtu.com>
10305
10306 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10307 (pkgdata_MODULES): Add `biosdisk.mod'.
10308 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10309 variables.
10310
10311 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10312 (grub_biosdisk_init): Replace with ...
10313 (GRUB_MOD_INIT(biosdisk)): ... this.
10314 (grub_biosdisk_fini): Replace with ...
10315 (GRUB_MOD_FINI(biosdisk)): ... this.
10316
10317 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10318 (grub_machine_init): Remove call to grub_biosdisk_init().
10319 (grub_machine_fini): Remove call to grub_machine_fini().
10320
10321 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10322
3381d274 103232007-10-22 Robert Millan <rmh@aybabtu.com>
10324
10325 * include/grub/time.h: New file.
10326 * include/grub/i386/time.h: Likewise.
10327 * include/grub/powerpc/time.h: Likewise.
10328 * include/grub/sparc64/time.h: Likewise.
10329
10330 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10331 instances to ...
10332 (KERNEL_MACHINE_TIME_HEADER): ... this.
10333 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10334 instances to ...
10335 (KERNEL_MACHINE_TIME_HEADER): ... this.
10336 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10337 instances to ...
10338 (KERNEL_MACHINE_TIME_HEADER): ... this.
10339
10340 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10341 (grub_millisleep): New function.
10342 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10343 (grub_millisleep): New function.
10344 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10345 Remove `grub/machine/time.h' include.
10346 (grub_millisleep): New function.
10347 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10348 Remove `grub/machine/time.h' include.
10349 (grub_millisleep): New function.
10350
10351 * include/grub/misc.h (grub_div_roundup): New function.
10352
10353 * kern/misc.c: Include `<grub/time.h>'.
10354 (grub_millisleep_generic): New function.
10355
10356 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10357 Add `time.h'.
10358 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10359 Add `time.h'.
10360 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10361 `machine/time.h'. Add `time.h'.
10362 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10363
a39a0312 103642007-10-21 Robert Millan <rmh@aybabtu.com>
10365
10366 * include/grub/misc.h (grub_max): New function.
10367
2aad70e2 103682007-10-21 Robert Millan <rmh@aybabtu.com>
10369
10370 * util/misc.c (grub_util_info): Call fflush() before returning.
10371
54b71c4b 103722007-10-20 Robert Millan <rmh@aybabtu.com>
10373
10374 * genmk.rb (Image): Copy `extra_flags' from here ...
10375 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10376
10377 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10378 to `argc' and `args' arguments.
10379
a979f513 103802007-10-17 Robert Millan <rmh@aybabtu.com>
10381
10382 * kern/i386/loader.S: New file.
10383
10384 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10385 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10386 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10387 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10388 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10389 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10390 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10391 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10392 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10393 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10394 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10395 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10396 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10397 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10398
10399 * kern/i386/realmode.S: New file.
10400
10401 * kern/i386/pc/startup.S (protstack): Moved from here ...
10402 * kern/i386/realmode.S (protstack)... to here.
10403 * kern/i386/pc/startup.S (gdt): Moved from here ...
10404 * kern/i386/realmode.S (gdt)... to here.
10405 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10406 * kern/i386/realmode.S (prot_to_real)... to here.
10407
10408 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10409 `kern/i386/realmode.S'.
10410
825fc8fd 104112007-10-17 Robert Millan <rmh@aybabtu.com>
10412
10413 * include/grub/i386/loader.h: New file.
10414
10415 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10416 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10417 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10418 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10419 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10420 * include/grub/i386/loader.h (grub_linux_prot_size)
10421 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10422 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10423 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10424 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10425
10426 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10427
e179b2f4 104282007-10-15 Robert Millan <rmh@aybabtu.com>
10429
10430 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10431 filesystem when dev->disk is unset.
10432 Do probe for filesystem even when dev->disk->has_partitions is set.
10433 In case a filesystem is found, always report it.
10434 In case it isn't, if dev->disk->has_partitions is set, report that
10435 a partition table was found instead of reporting that no filesystem
10436 could be identified.
10437
5db82af6 104382007-10-12 Robert Millan <rmh@aybabtu.com>
10439
10440 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10441 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10442
68f6ac74 10443 * include/grub/types.h (grub_host_to_target16): New macro.
10444 (grub_host_to_target32): Likewise.
10445 (grub_host_to_target64): Likewise.
10446 (grub_target_to_host16): Likewise.
10447 (grub_target_to_host32): Likewise.
10448 (grub_target_to_host64): Likewise.
5db82af6 10449
10450 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10451 Renamed from to ...
10452 (GRUB_MOD_ALIGN): ...this. Update all users.
10453
68f6ac74 10454 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10455 grub_host_to_target32.
10456 Replace grub_be_to_cpu32 with grub_target_to_host32.
10457 (load_modules): Likewise.
10458 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10459 Replace grub_be_to_cpu32 with grub_target_to_host32.
10460 Replace grub_cpu_to_be16 with grub_host_to_target16.
10461 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 10462
3cf497cc 104632007-10-12 Robert Millan <rmh@aybabtu.com>
10464
10465 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10466 * util/elf/grub-mkimage.c: ... here.
10467
10468 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10469 `util/powerpc/ieee1275/grub-mkimage.c'.
10470
c8cc3692 104712007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 10472
c8cc3692 10473 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10474 and make it easier to figure out.
10475 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10476 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10477 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10478 leave us with less than HEAP_MIN_SIZE total heap.
10479 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 10480
5c58b791 104812007-10-03 Robert Millan <rmh@aybabtu.com>
10482
10483 * include/grub/i386/io.h: New file.
10484 * commands/i386/pc/play.c (inb): Removed.
10485 (outb): Removed.
10486 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10487 with grub_outb().
afcd2ef8 10488 * term/i386/pc/serial.c (inb): Removed.
10489 (outb): Removed.
10490 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10491 with grub_outb().
10492 * term/i386/pc/vga.c (inb): Removed.
10493 (outb): Removed.
10494 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10495 with grub_outb().
5c58b791 10496
1a477ed6 104972007-10-02 Robert Millan <rmh@aybabtu.com>
10498
10499 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10501 Reported by Marcin Kurek.
10502
6b5d80fa 105032007-09-07 Robert Millan <rmh@aybabtu.com>
10504
10505 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10506 SmartFirmware version updates (as released by Sven Luther), and avoid
10507 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10508 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10509 known broken.
10510
5618afbf 105112007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10512
10513 From Hitoshi Ozeki:
10514 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10515 when merging two regions.
10516
6139dcd9 105172007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10518
508e39ee 10519 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10520 * normal/completion.c (grub_normal_do_completion): Likewise.
10521 Reported by Hitoshi Ozeki.
10522
105232007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10524
6139dcd9 10525 Do not use devices at boot in chainloading.
f19dbdb7 10526
6139dcd9 10527 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10528 (boot_part_addr): Likewise.
10529 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10530 with BOOT_DRIVE and BOOT_PART_ADDR.
10531 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10532 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10533
38da6516 105342007-08-29 Robert Millan <rmh@aybabtu.com>
10535
10536 Patch from Simon Peter <dn.tlp@gmx.net>:
10537 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10538 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10539 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10540 util/i386/pc/grub-setup.c_DEPENDENCIES.
10541 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10542 util/grub-probe.c_DEPENDENCIES.
10543 * conf/powerpc-ieee1275.rmk: Likewise.
10544
29d0928c 105452007-08-28 Robert Millan <rmh@aybabtu.com>
10546
10547 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10548 to tell grub-mkdevicemap how to name devices.
10549 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10550 feature).
10551
10552 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10553 util/i386/get_disk_name.c.
10554 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10555 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10556 util/ieee1275/get_disk_name.c.
10557
10558 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10559
10560 * DISTLIST: Add util/i386/get_disk_name.c and
10561 util/ieee1275/get_disk_name.c.
10562
10563 * util/grub-mkdevicemap.c: Replace device naming logic with
10564 grub_util_get_disk_name() calls.
10565
5a0d3cca 105662007-08-20 Robert Millan <rmh@aybabtu.com>
10567
10568 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10569 (so that it works for both plural and singular quantities).
10570
8b72db2f 105712007-08-05 Robert Millan <rmh@aybabtu.com>
10572
10573 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10574 so that [xz] isn't taken into account when determining order.
10575
352466bf 105762007-08-02 Marco Gerards <marco@gnu.org>
10577
10578 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10579 `include/multiboot2.h', `include/grub/elfload.h',
10580 `include/multiboot.h', `include/grub/multiboot.h',
10581 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10582 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10583 `kern/elf.c', `loader/multiboot_loader.c',
10584 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10585 `loader/i386/pc/multiboot2.c',
10586 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10587 `util/i386/pc/grub-mkrescue.in'. Remove
10588 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10589 `include/grub/i386/pc/util/biosdisk.h' and
10590 `include/grub/powerpc/ieee1275/multiboot.h'.
10591
8f096014 105922007-08-02 Bean <bean123ch@gmail.com>
10593
10594 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10595 (ntfs_mod_SOURCES): New variable.
10596 (ntfs_mod_CFLAGS): Likewise.
10597 (ntfs_mod_LDFLAGS): Likewise.
10598
10599 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10600 (grub_probe_SOURCES): Likewise.
10601 (grub_emu_SOURCES): Likewise.
10602
10603 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10604 (grub_emu_SOURCES): Likewise.
10605
10606 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10607 (grub_emu_SOURCES): Likewise.
f19dbdb7 10608
8f096014 10609 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10610
10611 * fs/ntfs.c: New file.
10612
9959f7db 106132007-08-02 Bean <bean123ch@gmail.com>
10614
10615 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10616
10617 * file.h (grub_file): Likewise.
10618
10619 * fshelp.h (grub_fshelp_read_file): Likewise.
10620
10621 * util/i386/pc/grub-setup.c (setup): Likewise.
10622 (save_first_sector): Likewise.
10623 (save_blocklists): Likewise.
f19dbdb7 10624
9959f7db 10625 * fs/affs.c (grub_affs_read_file): Likewise.
10626
10627 * fs/ext2.c (grub_ext2_read_file): Likewise.
10628
10629 * fs/fat.c (grub_fat_read_data): Likewise.
10630
10631 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10632
10633 * fs/hfs.c (grub_hfs_read_file): Likewise.
10634
10635 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10636
10637 * fs/jfs.c (grub_jfs_read_file): Likewise.
10638
10639 * fs/minix.c (grub_minix_read_file): Likewise.
10640
10641 * fs/sfs.c (grub_sfs_read_file): Likewise.
10642
10643 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 10644
9959f7db 10645 * fs/xfs.c (grub_xfs_read_file): Likewise.
10646
10647 * command/blocklist.c (read_blocklist): Likewise.
10648 (print_blocklist): Likewise.
10649
0a203f83 106502007-08-02 Marco Gerards <marco@gnu.org>
10651
10652 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10653 `util/hostfs.c'.
10654
10655 * disk/host.c: New file.
10656
10657 * util/hostfs.c: Likewise.
10658
10659 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10660 return `GRUB_ERR_BAD_FS'.
10661 * fs/sfs.c (grub_sfs_mount): Likewise.
10662 * fs/xfs.c (grub_xfs_mount): Likewise.
10663
10664 * include/grub/disk.h (enum grub_disk_dev_id): Add
10665 `GRUB_DISK_DEVICE_HOST_ID'.
10666
10667 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10668
e5dfe777 106692007-07-24 Jerone Young <jerone@gmail.com>
10670
f19dbdb7 10671 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 10672 modules for compilation.
10673 * conf/powerpc-ieee1275.rmk: Likewise.
10674
10675 * include/multiboot.h: Move multiboot definitions to one file. Rename
10676 many definitions to not get grub specific.
10677 * include/multiboot2.h: Create header with multiboot 2 definitions.
10678 * include/grub/multiboot.h: Header for grub specific function
10679 prototypes and definitions.
10680 * include/grub/multiboot2.h: Likewise.
10681 * include/grub/multiboot_loader.h: Likewise.
10682 * include/grub/i386/pc/multiboot.h: Removed.
10683 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10684
10685 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10686 and 2 to allow for one multiboot and module commands.
10687 * loader/multiboot2.c: Add multiboot2 functionality.
10688 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10689 and definition names.
10690 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10691 2 functions.
10692 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10693 ieee1275 specific multiboot2 code.
10694
10695 * kern/i386/pc/startup.S: Change headers and definition names for
10696 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10697
daf0f0ba 106982007-07-22 Robert Millan <rmh@aybabtu.com>
10699
10700 * geninitheader.sh: Process file specified in first parameter rather
10701 than hardcoding grub_modules_init.lst.
fe6b695a 10702 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 10703 than hardcoding grub_modules_init.h.
10704
10705 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10706 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10707 grub_probe_init.[ch] and grub_setup_init.[ch].
10708
10709 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10710 grub_modules_init.h with grub_emu_init.h.
10711 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10712 grub_probe_init.[ch] files.
10713 * conf/i386-efi.rmk: Likewise.
10714 * conf/i386-pc.rmk: Likewise.
10715 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10716 grub_setup_init.[ch] files.
10717
10718 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10719 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10720 to initialize modules rather than a list of hardcoded functions.
10721 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10722 grub_init_all() to initialize modules rather than a list of hardcoded
10723 functions.
10724
54cdc1cc 107252007-07-22 Robert Millan <rmh@aybabtu.com>
10726
10727 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10728 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10729
ad0686cc 107302007-07-22 Robert Millan <rmh@aybabtu.com>
10731
10732 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10733 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10734 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10735 flag when running on SmartFirmware.
10736 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10737 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10738 was set.
10739
10740 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10741 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10742 rather than decreasing it.
10743
10744 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10745 there's not enough space to do it, fail in the same way as when it
10746 can't be done because there are no partitions.
10747
10748 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10749 when nvsetenv failed.
10750
969c02ec 107512007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10752
10753 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10754 because this rule is automatically generated.
10755 (grub-mkrescue): Removed for the same reason as above.
10756
5a79f472 107572007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10758
10759 Migrate to GNU General Public License Version 3.
f19dbdb7 10760
5a79f472 10761 * COPYING: Replaced with the plain text version of GPLv3.
10762
10763 * config.guess: Updated from gnulib.
10764 * config.sub: Likewise.
10765
10766 * geninit.sh: Output a GPLv3 copyright notice.
10767 * geninitheader.sh: Likewise.
10768 * genmodsrc.sh: Likewise.
10769 * gensymlist.sh.in: Likewise.
10770
10771 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10772 * boot/i386/pc/diskboot.S: Likewise.
10773 * boot/i386/pc/pxeboot.S: Likewise.
10774 * commands/blocklist.c: Likewise.
10775 * commands/boot.c: Likewise.
10776 * commands/cat.c: Likewise.
10777 * commands/cmp.c: Likewise.
10778 * commands/configfile.c: Likewise.
10779 * commands/echo.c: Likewise.
10780 * commands/help.c: Likewise.
10781 * commands/ls.c: Likewise.
10782 * commands/search.c: Likewise.
10783 * commands/terminal.c: Likewise.
10784 * commands/test.c: Likewise.
10785 * commands/videotest.c: Likewise.
10786 * commands/i386/cpuid.c: Likewise.
10787 * commands/i386/pc/halt.c: Likewise.
10788 * commands/i386/pc/play.c: Likewise.
10789 * commands/i386/pc/reboot.c: Likewise.
10790 * commands/i386/pc/vbeinfo.c: Likewise.
10791 * commands/i386/pc/vbetest.c: Likewise.
10792 * commands/ieee1275/halt.c: Likewise.
10793 * commands/ieee1275/reboot.c: Likewise.
10794 * commands/ieee1275/suspend.c: Likewise.
10795 * disk/loopback.c: Likewise.
10796 * disk/lvm.c: Likewise.
10797 * disk/raid.c: Likewise.
10798 * disk/efi/efidisk.c: Likewise.
10799 * disk/i386/pc/biosdisk.c: Likewise.
10800 * disk/ieee1275/ofdisk.c: Likewise.
10801 * font/manager.c: Likewise.
10802 * fs/affs.c: Likewise.
10803 * fs/ext2.c: Likewise.
10804 * fs/fat.c: Likewise.
10805 * fs/fshelp.c: Likewise.
10806 * fs/hfs.c: Likewise.
10807 * fs/hfsplus.c: Likewise.
10808 * fs/iso9660.c: Likewise.
10809 * fs/jfs.c: Likewise.
10810 * fs/minix.c: Likewise.
10811 * fs/sfs.c: Likewise.
10812 * fs/ufs.c: Likewise.
10813 * fs/xfs.c: Likewise.
10814 * hello/hello.c: Likewise.
10815 * include/grub/acorn_filecore.h: Likewise.
10816 * include/grub/arg.h: Likewise.
10817 * include/grub/bitmap.h: Likewise.
10818 * include/grub/boot.h: Likewise.
10819 * include/grub/cache.h: Likewise.
10820 * include/grub/device.h: Likewise.
10821 * include/grub/disk.h: Likewise.
10822 * include/grub/dl.h: Likewise.
10823 * include/grub/elfload.h: Likewise.
10824 * include/grub/env.h: Likewise.
10825 * include/grub/err.h: Likewise.
10826 * include/grub/file.h: Likewise.
10827 * include/grub/font.h: Likewise.
10828 * include/grub/fs.h: Likewise.
10829 * include/grub/fshelp.h: Likewise.
10830 * include/grub/gzio.h: Likewise.
10831 * include/grub/hfs.h: Likewise.
10832 * include/grub/kernel.h: Likewise.
10833 * include/grub/loader.h: Likewise.
10834 * include/grub/lvm.h: Likewise.
10835 * include/grub/misc.h: Likewise.
10836 * include/grub/mm.h: Likewise.
10837 * include/grub/net.h: Likewise.
10838 * include/grub/normal.h: Likewise.
10839 * include/grub/parser.h: Likewise.
10840 * include/grub/partition.h: Likewise.
10841 * include/grub/pc_partition.h: Likewise.
10842 * include/grub/raid.h: Likewise.
10843 * include/grub/rescue.h: Likewise.
10844 * include/grub/script.h: Likewise.
10845 * include/grub/setjmp.h: Likewise.
10846 * include/grub/symbol.h: Likewise.
10847 * include/grub/term.h: Likewise.
10848 * include/grub/terminfo.h: Likewise.
10849 * include/grub/tparm.h: Likewise.
10850 * include/grub/types.h: Likewise.
10851 * include/grub/video.h: Likewise.
10852 * include/grub/efi/api.h: Likewise.
10853 * include/grub/efi/chainloader.h: Likewise.
10854 * include/grub/efi/console.h: Likewise.
10855 * include/grub/efi/console_control.h: Likewise.
10856 * include/grub/efi/disk.h: Likewise.
10857 * include/grub/efi/efi.h: Likewise.
10858 * include/grub/efi/pe32.h: Likewise.
10859 * include/grub/efi/time.h: Likewise.
10860 * include/grub/i386/linux.h: Likewise.
10861 * include/grub/i386/setjmp.h: Likewise.
10862 * include/grub/i386/types.h: Likewise.
10863 * include/grub/i386/efi/kernel.h: Likewise.
10864 * include/grub/i386/efi/loader.h: Likewise.
10865 * include/grub/i386/efi/time.h: Likewise.
10866 * include/grub/i386/pc/biosdisk.h: Likewise.
10867 * include/grub/i386/pc/boot.h: Likewise.
10868 * include/grub/i386/pc/chainloader.h: Likewise.
10869 * include/grub/i386/pc/console.h: Likewise.
10870 * include/grub/i386/pc/init.h: Likewise.
10871 * include/grub/i386/pc/kernel.h: Likewise.
10872 * include/grub/i386/pc/loader.h: Likewise.
10873 * include/grub/i386/pc/memory.h: Likewise.
10874 * include/grub/i386/pc/multiboot.h: Likewise.
10875 * include/grub/i386/pc/serial.h: Likewise.
10876 * include/grub/i386/pc/time.h: Likewise.
10877 * include/grub/i386/pc/vbe.h: Likewise.
10878 * include/grub/i386/pc/vbeblit.h: Likewise.
10879 * include/grub/i386/pc/vbefill.h: Likewise.
10880 * include/grub/i386/pc/vbeutil.h: Likewise.
10881 * include/grub/i386/pc/vga.h: Likewise.
10882 * include/grub/ieee1275/ieee1275.h: Likewise.
10883 * include/grub/ieee1275/ofdisk.h: Likewise.
10884 * include/grub/powerpc/libgcc.h: Likewise.
10885 * include/grub/powerpc/setjmp.h: Likewise.
10886 * include/grub/powerpc/types.h: Likewise.
10887 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10888 * include/grub/powerpc/ieee1275/console.h: Likewise.
10889 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10890 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10891 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10892 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10893 * include/grub/powerpc/ieee1275/time.h: Likewise.
10894 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10895 * include/grub/sparc64/libgcc.h: Likewise.
10896 * include/grub/sparc64/setjmp.h: Likewise.
10897 * include/grub/sparc64/types.h: Likewise.
10898 * include/grub/sparc64/ieee1275/console.h: Likewise.
10899 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10900 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10901 * include/grub/sparc64/ieee1275/time.h: Likewise.
10902 * include/grub/util/biosdisk.h: Likewise.
10903 * include/grub/util/getroot.h: Likewise.
10904 * include/grub/util/lvm.h: Likewise.
10905 * include/grub/util/misc.h: Likewise.
10906 * include/grub/util/raid.h: Likewise.
10907 * include/grub/util/resolve.h: Likewise.
10908 * io/gzio.c: Likewise.
10909 * kern/device.c: Likewise.
10910 * kern/disk.c: Likewise.
10911 * kern/dl.c: Likewise.
10912 * kern/elf.c: Likewise.
10913 * kern/env.c: Likewise.
10914 * kern/err.c: Likewise.
10915 * kern/file.c: Likewise.
10916 * kern/fs.c: Likewise.
10917 * kern/loader.c: Likewise.
10918 * kern/main.c: Likewise.
10919 * kern/misc.c: Likewise.
10920 * kern/mm.c: Likewise.
10921 * kern/parser.c: Likewise.
10922 * kern/partition.c: Likewise.
10923 * kern/rescue.c: Likewise.
10924 * kern/term.c: Likewise.
10925 * kern/efi/efi.c: Likewise.
10926 * kern/efi/init.c: Likewise.
10927 * kern/efi/mm.c: Likewise.
10928 * kern/i386/dl.c: Likewise.
10929 * kern/i386/efi/init.c: Likewise.
10930 * kern/i386/efi/startup.S: Likewise.
10931 * kern/i386/pc/init.c: Likewise.
10932 * kern/i386/pc/lzo1x.S: Likewise.
10933 * kern/i386/pc/startup.S: Likewise.
10934 * kern/ieee1275/ieee1275.c: Likewise.
10935 * kern/powerpc/cache.S: Likewise.
10936 * kern/powerpc/dl.c: Likewise.
10937 * kern/powerpc/ieee1275/cmain.c: Likewise.
10938 * kern/powerpc/ieee1275/crt0.S: Likewise.
10939 * kern/powerpc/ieee1275/init.c: Likewise.
10940 * kern/powerpc/ieee1275/openfw.c: Likewise.
10941 * kern/sparc64/cache.S: Likewise.
10942 * kern/sparc64/dl.c: Likewise.
10943 * kern/sparc64/ieee1275/init.c: Likewise.
10944 * kern/sparc64/ieee1275/openfw.c: Likewise.
10945 * loader/efi/chainloader.c: Likewise.
10946 * loader/efi/chainloader_normal.c: Likewise.
10947 * loader/i386/efi/linux.c: Likewise.
10948 * loader/i386/efi/linux_normal.c: Likewise.
10949 * loader/i386/pc/chainloader.c: Likewise.
10950 * loader/i386/pc/chainloader_normal.c: Likewise.
10951 * loader/i386/pc/linux.c: Likewise.
10952 * loader/i386/pc/linux_normal.c: Likewise.
10953 * loader/i386/pc/multiboot.c: Likewise.
10954 * loader/i386/pc/multiboot_normal.c: Likewise.
10955 * loader/powerpc/ieee1275/linux.c: Likewise.
10956 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10957 * normal/arg.c: Likewise.
10958 * normal/cmdline.c: Likewise.
10959 * normal/command.c: Likewise.
10960 * normal/completion.c: Likewise.
10961 * normal/execute.c: Likewise.
10962 * normal/function.c: Likewise.
10963 * normal/lexer.c: Likewise.
10964 * normal/main.c: Likewise.
10965 * normal/menu.c: Likewise.
10966 * normal/menu_entry.c: Likewise.
10967 * normal/misc.c: Likewise.
10968 * normal/parser.y: Likewise.
10969 * normal/script.c: Likewise.
10970 * normal/i386/setjmp.S: Likewise.
10971 * normal/powerpc/setjmp.S: Likewise.
10972 * normal/sparc64/setjmp.S: Likewise.
10973 * partmap/acorn.c: Likewise.
10974 * partmap/amiga.c: Likewise.
10975 * partmap/apple.c: Likewise.
10976 * partmap/gpt.c: Likewise.
10977 * partmap/pc.c: Likewise.
10978 * partmap/sun.c: Likewise.
10979 * term/gfxterm.c: Likewise.
10980 * term/terminfo.c: Likewise.
10981 * term/efi/console.c: Likewise.
10982 * term/i386/pc/console.c: Likewise.
10983 * term/i386/pc/serial.c: Likewise.
10984 * term/i386/pc/vesafb.c: Likewise.
10985 * term/i386/pc/vga.c: Likewise.
10986 * term/ieee1275/ofconsole.c: Likewise.
10987 * util/biosdisk.c: Likewise.
10988 * util/console.c: Likewise.
10989 * util/genmoddep.c: Likewise.
10990 * util/getroot.c: Likewise.
10991 * util/grub-emu.c: Likewise.
10992 * util/grub-mkdevicemap.c: Likewise.
10993 * util/grub-probe.c: Likewise.
10994 * util/lvm.c: Likewise.
10995 * util/misc.c: Likewise.
10996 * util/raid.c: Likewise.
10997 * util/resolve.c: Likewise.
10998 * util/update-grub.in: Likewise.
10999 * util/update-grub_lib.in: Likewise.
11000 * util/grub.d/00_header.in: Likewise.
11001 * util/grub.d/10_hurd.in: Likewise.
11002 * util/grub.d/10_linux.in: Likewise.
11003 * util/i386/efi/grub-install.in: Likewise.
11004 * util/i386/efi/grub-mkimage.c: Likewise.
11005 * util/i386/pc/grub-install.in: Likewise.
11006 * util/i386/pc/grub-mkimage.c: Likewise.
11007 * util/i386/pc/grub-mkrescue.in: Likewise.
11008 * util/i386/pc/grub-setup.c: Likewise.
11009 * util/i386/pc/misc.c: Likewise.
11010 * util/powerpc/ieee1275/grub-install.in: Likewise.
11011 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11012 * util/powerpc/ieee1275/misc.c: Likewise.
11013 * video/bitmap.c: Likewise.
11014 * video/video.c: Likewise.
11015 * video/i386/pc/vbe.c: Likewise.
11016 * video/i386/pc/vbeblit.c: Likewise.
11017 * video/i386/pc/vbefill.c: Likewise.
11018 * video/i386/pc/vbeutil.c: Likewise.
11019 * video/readers/tga.c: Likewise.
11020
3572d015 110212007-07-02 Robert Millan <rmh@aybabtu.com>
11022
11023 * conf/i386-efi.rmk: Replace obsolete reference to
11024 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11025 with util/getroot.c.
11026 * conf/powerpc-ieee1275.rmk: Likewise.
11027 * conf/sparc64-ieee1275.rmk: Likewise.
11028
11029 * util/grub-emu.c (main): Fix unchecked pointer handling.
11030
2c2a681b 110312007-07-02 Robert Millan <rmh@aybabtu.com>
11032
11033 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11034 invocation to fail, in order to support partition-less media.
11035
11036 * util/i386/pc/grub-install.in: Likewise.
11037
11038 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11039 which fs or partmap modules are needed (akin to its sister scripts).
11040
11041 Also use grub-probe to get rid of unportable /proc/mounts check.
11042
11043 Print the same informational message that the other scripts do, before
fe6b695a 11044 exiting.
2c2a681b 11045
6193defe 110462007-06-23 Robert Millan <rmh@aybabtu.com>
11047
fe6b695a 11048 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 11049 a font file can be found and, if so, echo the GRUB path to it.
11050
11051 * util/update-grub.in: Handle multiple terminals depending on user
11052 input, platform availability and font file presence. Propagate
11053 variables of our findings to /etc/grub.d/ children.
11054
11055 * util/grub.d/00_header.in: Handle multiple terminals, based on
11056 environment setup by update-grub.
11057
eface1dc 110582007-06-23 Robert Millan <rmh@aybabtu.com>
11059
ba50d28f 11060 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 11061
bf697e28 110622007-06-21 Robert Millan <rmh@aybabtu.com>
11063
11064 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11065 indicate end of data section in kernel image.
11066 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11067 GRUB_KERNEL_MACHINE_DATA_END.
11068
11069 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11070 space for it.
11071 * kern/i386/efi/startup.S: Likewise.
11072
11073 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11074 during image generation. Implement --prefix option to override this
11075 patch.
11076 * util/i386/efi/grub-mkimage.c: Likewise.
11077
11078 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11079 code to make path relative to its root into a separate function.
11080
11081 * util/i386/pc/grub-install.in: Use newly provided
11082 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11083 pass the result to grub-install --prefix.
11084
baa574b4 110852007-06-13 Robert Millan <rmh@aybabtu.com>
11086
11087 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11088 DEFAULT_DEVICE_MAP.
11089 * util/grub-emu.c: Use above definitions from misc.h instead of
11090 defining them.
11091 * util/grub-mkdevicemap.c: Likewise.
11092 * util/i386/pc/grub-setup.c: Likewise.
11093 * util/grub-probe.c: Likewise.
11094 (probe): Abort with grub_util_error() when either
11095 grub_guess_root_device or grub_util_get_grub_dev fails.
11096
0215dcbf 110972007-06-12 Robert Millan <rmh@aybabtu.com>
11098
11099 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11100 "pager" assignment.
11101 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11102 "pcdata".
11103 * util/grub-probe.c (probe): Likewise for "drive_name".
11104
8af2ab7b 111052007-06-11 Robert Millan <rmh@aybabtu.com>
11106
11107 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11108 not just the cdrom one.
11109
59d31694 111102007-06-11 Robert Millan <rmh@aybabtu.com>
11111
11112 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11113 Add --pkglibdir=DIR option to override pkglibdir.
11114 Mention --image-type=TYPE in help output.
11115 Fix --grub-mkimage (it was a no-op).
fe6b695a 11116 Abort gracefully when no parameter is given.
59d31694 11117
7ee367e4 111182007-06-11 Robert Millan <rmh@aybabtu.com>
11119
11120 * util/i386/pc/grub-mkrescue.in: New file.
11121 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11122 * Makefile.in: Handle bin_SCRIPTS.
11123
29b0ed46 111242007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11125
11126 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11127 list of video modes.
11128
c0f90770 111292007-06-06 Robert Millan <rmh@aybabtu.com>
11130
11131 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11132 file doesn't exist, or if it is in a filesystem grub can't read.
11133
11134 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11135 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11136 header comment to fit in 80 columns when the variables are resolved.
11137
11138 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11139 could be identified by update-grub. Remove redundant check for
fe6b695a 11140 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 11141 handles that).
11142
fb36dc26 111432007-06-04 Robert Millan <rmh@aybabtu.com>
11144
11145 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11146
11147 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11148
11149 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11150
0c68c93e 111512007-06-04 Robert Millan <rmh@aybabtu.com>
11152
11153 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11154
11155 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11156 grub_apple_partition_map_fini.
11157
11158 * util/biosdisk.c
11159 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11160 to access >2 TiB disks).
11161
11162 Print disk->total_sectors with %llu instead of %lu, since this
11163 variable is always 64-bit (prevents wrong disk size from being displayed
11164 on either >2 TiB disk or big-endian CPU).
11165
11166 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11167 into a generic case that supports all (sane) partition maps.
11168
11169 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11170 breaks big-endian.
11171
11172 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11173 and grub_apple_partition_map_fini() after that.
11174
0f23eb74 111752007-06-01 Robert Millan <rmh@aybabtu.com>
11176
11177 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11178
11179 * util/grub.d/00_header.in: Only enable gfxterm when
11180 convert_system_path_to_grub_path() succeeds.
11181
42c71976 111822007-05-20 Robert Millan <rmh@aybabtu.com>
11183
11184 * util/update-grub_lib.in: New file.
11185 * DISTLIST: Add update-grub_lib.in.
11186 * conf/common.rmk: Generate update-grub_lib and install it in
11187 $(lib_DATA).
11188 * Makefile.in: Add install routine for $(lib_DATA).
11189
11190 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11191 function provided by update-grub_lib to support arbitrary paths of
11192 unifont.pff.
11193 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11194 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11195
5beb2291 111962007-05-19 Robert Millan <rmh@aybabtu.com>
11197
11198 * commands/i386/cpuid.c: New module.
11199 * DISTLIST: Add it.
11200 * conf/i386-efi.rmk: Enable cpuid.mod.
11201 * conf/i386-pc.rmk: Likewise.
11202
7262eca1 112032007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11204
11205 * kern/disk.c (grub_disk_read): Check return value of
11206 grub_realloc().
11207
260ba823 112082007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11209
11210 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11211 arrays.
11212 * disk/raid.c (grub_raid_open): Likewise.
11213
1ecb6cf2 112142007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11215
11216 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11217 stack instead of on the heap.
11218
11219 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11220 before doing a read on it.
11221
11222 * configure.ac: Only use -fno-stack-protector for the target
11223 environment.
f19dbdb7 11224
21c8cbb1 112252007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11226
11227 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11228 __attribute_ ((unused)) to mode_type argument.
11229
11230 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 11231
21c8cbb1 11232 * kern/misc.c (memcmp): Fix prototype.
11233
11234 * include/grub/partition.h [GRUB_UTIL]
11235 (grub_gpt_partition_map_init): Add prototype.
11236 (grub_gpt_partition_map_fini): Likewise.
11237
11238 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11239 at the right place.
11240
11241 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11242 (grub_fat_read_data): Likewise.
11243 (grub_fat_find_dir): Likewise.
11244
11245 * font/manager.c (find_glyph): Make table a const.
11246 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 11247
849d55d3 112482007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11249
11250 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11251 code, first search for device in /dev/mapper, then in /dev.
11252 (grub_util_get_grub_dev): New function.
11253 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11254 prototype.
11255 * util/grub-probe.c (probe): Remove check for RAID, call
11256 grub_util_get_grub_dev() instead of
11257 grub_util_biosdisk_get_grub_dev().
11258 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11259 grub_util_biosdisk_get_grub_dev().
11260 * util/i386/pc/grub-setup.c (main): Likewise.
11261
8fff7c2f 112622007-05-16 Robert Millan <rmh@aybabtu.com>
11263
11264 * DISTLIST: Update for the latest changes.
11265 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11266 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11267 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11268 grub/util/biosdisk.h.
11269 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11270 grub/util/biosdisk.h.
11271
48e12b52 112722007-05-16 Robert Millan <rmh@aybabtu.com>
11273
11274 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11275
46b9d128 112762007-05-16 Robert Millan <rmh@aybabtu.com>
11277
11278 * util/i386/efi/grub-install.in: New.
11279 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11280 newly added grub-install.
11281 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11282 include.
11283 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11284 grub/util/biosdisk.h.
11285 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11286 grub/util/biosdisk.h.
11287
2d1a40a9 112882007-05-16 Robert Millan <rmh@aybabtu.com>
11289
11290 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11291 * include/grub/util/biosdisk.h: ... here.
11292 * util/i386/pc/biosdisk.c: Moved to ...
11293 * util/biosdisk.c: ... here.
11294 * util/i386/pc/getroot.c: Moved to ...
11295 * util/getroot.c: ... here.
11296 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11297 * util/grub-mkdevicemap.c: ... here.
11298 * util/i386/pc/grub-probe.c: Moved to ...
11299 * util/grub-probe.c: ... here.
11300
9e26e3bc 113012007-05-15 Robert Millan <rmh@aybabtu.com>
11302
11303 * util/update-grub.in: Remove duplicated line in grub.cfg header
11304 message.
11305
57f96397 113062007-05-13 Robert Millan <rmh@aybabtu.com>
11307
11308 * util/update-grub.in: Fix a few assumptions about the devices holding
11309 /, /boot and /boot/grub being the same.
11310 * util/grub.d/00_header.in: Likewise.
11311 * util/grub.d/10_hurd.in: Likewise.
11312 * util/grub.d/10_linux.in: Likewise.
11313
11314 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11315 patterns. Use that to define the `.old' suffix as older than `'.
11316
11317 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11318
11319 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11320 the grub.cfg header message.
11321
2e610d62 113222007-05-11 Robert Millan <rmh@aybabtu.com>
11323
11324 * util/update-grub.in: Create device.map if it doesn't already exist,
11325 before attempting to run grub-probe.
11326 Check for grub-probe and grub-mkdevicemap with the same code
11327 grub-install is using.
11328 Remove test mode.
11329
3f6a10ef 113302007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11331
11332 * Makefile.in: Add the datarootdir autoconf variable.
11333
02e7b75e 113342007-05-09 Robert Millan <rmh@aybabtu.com>
11335
11336 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 11337 fail gracefully if dev->disk->partition == NULL.
02e7b75e 11338
75f396cc 113392007-05-07 Robert Millan <rmh@aybabtu.com>
11340
11341 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11342 determine partition map module.
11343 * util/i386/pc/grub-install.in: Use this feature to decide which
11344 partition module to load, instead of hardcoding pc and gpt.
11345
da65cb36 113462007-05-07 Robert Millan <rmh@aybabtu.com>
11347
11348 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11349 source directory differs from build directory.
11350
b57d6a91 113512007-05-05 Robert Millan <rmh@aybabtu.com>
11352
11353 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11354 initialisation.
11355
509d00f1 113562007-05-05 Robert Millan <rmh@aybabtu.com>
11357
11358 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11359
c48f23ef 113602007-05-05 Robert Millan <rmh@aybabtu.com>
11361
11362 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11363 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11364
20b97658 113652007-05-05 Robert Millan <rmh@aybabtu.com>
11366
11367 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11368 (grub_probe_SOURCES): Likewise.
11369 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11370 GPT and initialize dos_part and bsd_part accordingly.
11371 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11372 install_bsd_part.
11373 (main): Activate gpt module for use during partition identification,
11374 and deactivate it afterwards.
11375 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11376 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11377 partition identification, and deactivate it afterwards.
11378
99123174 113792007-05-05 Robert Millan <rmh@aybabtu.com>
11380
11381 * term/i386/pc/console.c (grub_console_fini): Call
11382 grub_term_set_current() before grub_term_unregister().
11383
ebd97f6e 113842007-05-04 Robert Millan <rmh@aybabtu.com>
11385
11386 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11387 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11388 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11389 and update-grub_DATA.
11390 * conf/common.rmk: Build and install update-grub components.
11391 * conf/common.mk: Regenerate.
11392 * util/update-grub.in: New. Core of update-grub.
11393 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11394 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11395 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11396 * util/grub.d/README: New. Document grub.d directory layout.
11397
b06a264d 113982007-05-01 Robert Millan <rmh@aybabtu.com>
11399
11400 * util/grub-emu.c: Move initialization functions
11401 grub_util_biosdisk_init() and grub_init_all() before
11402 grub_util_biosdisk_get_grub_dev(), which relies on them.
11403
41f0050e 114042007-04-19 Robert Millan <rmh@aybabtu.com>
11405
11406 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11407 it is used later.
11408
04582bb3 114092007-04-18 Jerone Young <jerone@gmail.com>
11410
f19dbdb7 11411 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 11412 stanza.
11413
08db4632 114142007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 11415
08db4632 11416 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11417 continue on and look for device node with real device name.
11418
801b76be 114192007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 11420
fe6b695a 11421 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 11422 ability.
11423 * Makefile.in: Add autoconf package transformation code.
11424 * util/i386/pc/grub-install.in: Likewise.
11425 * util/powerpc/ieee1275/grub-install.in: Likewise.
11426
6795c4e1 114272007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11428
11429 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11430 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11431 (EXT2_REVISION): Likewise.
11432 (EXT2_INODE_SIZE): Likewise.
11433 (struct grub_ext2_block_group): Added a missing member
11434 "used_dirs".
11435 (grub_ext2_read_inode): Divide by the inode size in a superblock
11436 instead of 128 to obtain INODES_PER_BLOCK.
11437 Use the macro EXT2_INODE_SIZE instead of directly using
11438 SBLOCK->INODE_SIZE.
11439
d70af616 114402007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11441
11442 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11443 superblock instead of the structure size to compute an
11444 offset. This fixes the problem that GRUB could not read a
11445 filesystem when inode size is different from 128-byte.
11446
3b801603 114472007-03-05 Marco Gerards <marco@gnu.org>
11448
11449 * normal/main.c (read_config_file): When "menu" is not set, create
11450 an initial context.
11451
4785bfe4 114522007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11453
11454 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11455 (HEAP_LIMIT): New macro.
11456 (grub_claim_heap): Claim memory up to `heaplimit'.
11457
a0cbb023 114582007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11459
11460 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11461 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11462 (_start): Likewise.
11463 (grub_arch_modules_addr): Return address after `_end'.
11464 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11465 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11466 (add_segments): Calculate `_end' from phdr size and location.
11467 (ALIGN_UP): Moved to ...
11468 * include/grub/misc.h: here.
11469 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11470 New macro.
11471 (GRUB_IEEE1275_MODULE_BASE): Removed.
11472
fd7d8eba 114732007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11474
11475 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11476 loop boundary.
11477
9b09e6fc 114782007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11479
11480 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11481 All users updated.
11482 (grub_elf64_load_hook_t): Likewise.
11483 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11484 debug output.
11485
3ce27299 114862007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11487
11488 * kern/mm.c: Update copyright.
11489 (grub_mm_debug): Correct syntax error.
11490 (grub_mm_dump_free): New function.
11491 (grub_debug_free): Call `grub_free'.
11492 * include/grub/mm.h: Update copyright.
11493 (grub_mm_dump_free): Add declaration.
11494
077d5fee 114952007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11496
11497 * include/grub/ieee1275/ieee1275.h: Update copyright.
11498 * kern/powerpc/ieee1275/init.c: Likewise.
11499 * kern/powerpc/ieee1275/openfw.c: Likewise.
11500
11501 * loader/powerpc/ieee1275/linux.c: Likewise.
11502 * include/grub/elfload.h: Likewise.
11503 * kern/elf.c: Likewise.
11504 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11505 callers.
11506 (grub_elf64_load): Likewise.
11507 (grub_elf32_load_segment): Move to a nested function.
11508 (grub_elf64_load_segment): Likewise.
11509
dc946850 115102007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11511
11512 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11513 prototype.
11514 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11515 (grub_heap_len): Likewise.
11516 (HEAP_SIZE): New macro.
11517 (grub_claim_heap): New function.
11518 (grub_machine_init): Don't claim heap directly. Call
11519 `grub_claim_heap'.
11520 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11521 (grub_available_iterate): New function.
11522
baa2a121 115232007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11524
11525 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11526 * configure.ac: Use it for testing the HOST and TARGET compilers.
11527
4fe9862e 115282006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11529
11530 * Makefile.in (enable_grub_emu): New variable.
11531 * configure.ac (--enable-grub-emu): New option.
11532 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11533 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11534 * conf/i386-pc.rmk: Likewise.
11535 * conf/powerpc-ieee1275.rmk: Likewise.
11536 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11537
a8aa5762 115382006-12-12 Marco Gerards <marco@gnu.org>
11539
11540 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11541
11542 * kern/env.c (grub_env_unset): Don't free the member `value' when
11543 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11544 pointer.
11545
11546 * normal/main.c (current_menu): Removed.
11547 (free_menu): Unset the `menu' environment variable.
11548 (grub_normal_menu_addentry): Make use of the environment variable
11549 `menu', instead of using the global `current_menu'. Allocate
11550 memory for the sourcecode of this entry.
11551 (read_config_file): New argument `nested', changed all callers.
11552 Only in the case of a new context, initialize a new menu. Set the
11553 `menu' environment variable.
11554 (grub_normal_execute): Don't set and unset the environment
11555 variable `menu' here anymore. Only free the menu when leaving the
11556 context.
11557
11558 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11559 leak.
11560
957b3a3e 115612006-12-11 Marco Gerards <marco@gnu.org>
11562
11563 * normal/menu_entry.c (run): Fix off by one bug so the last line
11564 is executed. Move the loader check to outside the loop.
11565
ef875714 115662006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11567
11568 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11569
4e739985 115702006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11571
11572 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11573 the number of sectors. Reported by Andrey Shuvikov
11574 <mr_hyro@yahoo.com>.
f19dbdb7 11575
790707f2 115762006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11577
11578 * kern/disk.c (grub_disk_read): When there is a read error, always
11579 try to read only the necessary data.
f19dbdb7 11580
790707f2 11581 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11582 disk/raid.c.
11583 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11584 prototype.
11585 [GRUB_UTIL] (grub_raid_fini): Likewise.
11586 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 11587 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 11588 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11589 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11590 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11591 and grub_raid_fini().
f19dbdb7 11592
03e58196 115932006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11594
11595 * include/grub/types.h (__unused): Rename to UNUSED.
11596 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11597 (grub_elf64_size): Likewise.
f19dbdb7 11598
ae4f23bf 115992006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11600
11601 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11602 grub_error_push and grub_error_pop in the error-handling path.
11603 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11604 length.
11605
2166cc83 116062006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11607
11608 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11609 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11611 (kernel_elf_SOURCES): Likewise.
11612 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11613 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11614 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11615 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11616 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11617 (elf_mod_SOURCES): New variable.
11618 (elf_mod_CFLAGS): Likewise.
11619 (elf_mod_LDFLAGS): Likewise.
11620 * include/grub/types.h (__unused): New macro.
11621 * include/grub/elfload.h: New file.
11622 * kern/elf.c: Likewise.
11623 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11624 (ELF32_LOADMASK): New macro.
11625 (ELF64_LOADMASK): Likewise.
11626 (vmlinux): Removed.
11627 (grub_linux_load32): New function.
11628 (grub_linux_load64): Likewise.
11629 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11630 Use grub_elf_t instead of grub_file_t.
11631
a09d5aa5 116322006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11633
11634 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11635 `catch_result' to struct set_color_args.
11636
d976fc51 116372006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11638
11639 * normal/menu.c: Include grub/script.h.
11640 * normal/menu_entry.c: Likewise.
11641 * include/grub/normal.h: Do not include grub/script.h.
11642
67507549 116432006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11644
11645 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11646
69203a99 116472006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11648
11649 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11650 disk.
11651 (grub_disk_close): Print debug messages when closing a disk.
11652 (grub_disk_read): Print debug messages when disk read fails.
11653 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11654 filesystem type.
11655 * kern/partition.c: Include misc.h.
11656 (grub_partition_iterate): Print debug messages when detecting
11657 partition type.
11658
e2b8278c 116592006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11660
11661 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11662 is negative.
11663 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11664
97b2f2ff 116652006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11666
11667 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11668 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11669
6555d655 116702006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11671
11672 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11673 instead of sizeof(lv). Patch by Michael Guntsche.
11674
4d42b77f 116752006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11676
11677 * disk/lvm.c: Rename VGS to VG_LIST.
11678 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11679 (grub_lvm_open): Likewise.
11680 Thanks to Michael Guntsche for finding this bug.
11681
5d74d927 116822006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11683
11684 * configure.ac (AC_INIT): Bumped to 1.95.
11685
a1bb27e4 116862006-10-14 Robert Millan <rmh@aybabtu.com>
11687
11688 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11689 with "/dev/.static/dev/md".
11690
e0994b8b 116912006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11692
11693 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11694 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11695 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11696 DRIVE_NAME are always freed.
11697
11698 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11699 DOS_PART, as a DOS partition is counted from one instead of zero
11700 now. Reported by Robert Millan.
11701
ddd5cee9 117022006-10-14 Robert Millan <rmh@aybabtu.com>
11703
11704 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11705 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11706 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11707 string returned by grub_guess_root_device.
11708 * util/i386/pc/grub-setup.c: Likewise.
11709 * util/i386/pc/grub-probefs.c: Likewise.
11710
11711 * util/i386/pc/grub-probefs.c: Rename to ...
11712 * util/i386/pc/grub-probe.c: ... this.
11713 * DISTLIST: Remove grub-probefs, add grub-probe.
11714 * conf/i386-efi.rmk: Likewise.
11715 * conf/i386-pc.rmk: Likewise.
11716 * util/i386/pc/grub-install.in: Likewise.
11717
11718 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11719 choose which information we want to print.
11720
2b002173 117212006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11722
11723 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11724 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11725 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11726 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11727 video/readers/tga.c and video/i386/pc/vbeutil.c.
11728
117292006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11730
11731 Added support for RAID and LVM.
f19dbdb7 11732
2b002173 11733 * disk/lvm.c: New file.
11734 * disk/raid.c: Likewise.
11735 * include/grub/lvm.h: Likewise.
f19dbdb7 11736 * include/grub/raid.h: Likewise.
2b002173 11737 * include/grub/util/lvm.h: Likewise.
11738 * include/grub/util/raid.h: Likewise.
11739 * util/lvm.c: Likewise.
11740 * util/raid.c: Likewise.
11741
11742 * include/grub/disk.h (grub_disk_dev_id): Add
11743 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11744 (grub_disk_get_size): New prototype.
11745 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11746 returns a partition.
11747 (grub_disk_get_size): New function.
f19dbdb7 11748
2b002173 11749 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11750 verbatim if grub_install_dos_part is -2.
11751
11752 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11753 and LVM devices.
11754
11755 * util/i386/pc/grub-setup.c (setup): New argument
11756 MUST_EMBED. Force embedding of GRUB when the argument is
11757 true. Close FILE before returning.
11758 (main): Add support for RAID and LVM.
f19dbdb7 11759
2b002173 11760 * conf/common.rmk: Add RAID and LVM modules.
11761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11762 util/lvm.c.
11763 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11764
11765 * kern/misc.c (grub_strstr): New function.
11766 * include/grub/misc.h (grub_strstr): New prototype.
11767
050548d0 117682006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11769
11770 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11771
da849d2d 117722006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11773
11774 * kern/misc.c (grub_strtoull): Guess the base only if not
11775 specified.
11776
97b2f2ff 117772006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 11778
11779 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11780 PowerMac support.
11781
97b2f2ff 117822006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 11783
11784 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11785
11786 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11787 Remove `flags' argument. All callers changed.
11788 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11789 (IEEE1275_IHANDLE_INVALID): New variable.
11790 (IEEE1275_CELL_INVALID): New variable.
11791 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11792 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11793 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11794 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11795 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11796 codes from Open Firmware. All callers updated.
11797 (grub_ieee1275_next_property): Directly return Open Firmware return
11798 code.
11799 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11800 Standardize error checking from `grub_ieee1275_get_property'.
11801 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11802 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11803
97b2f2ff 118042006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 11805
11806 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11807 `instance_to_package_args' to `instance_to_path_args'.
11808
11809 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11810 `grub_ieee1275_chosen'.
11811
11812 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11813 `grub_ieee1275_interpret'.
11814
97b2f2ff 118152006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 11816
11817 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11818
97b2f2ff 118192006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 11820
11821 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11822 (__cmpdi): Likewise.
11823
11824 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11825 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11826 `grub_ssize_t'.
11827
02bb8acc 11828 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 11829
11830 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11831 to type `grub_ssize_t'.
11832 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11833
7f9a8531 118342006-09-22 Marco Gerards <marco@gnu.org>
11835
11836 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11837 newlines.
11838
b5ef1102 118392006-09-22 Marco Gerards <marco@gnu.org>
11840
11841 * commands/echo.c: New file.
11842
11843 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11844
11845 * conf/common.rmk (echo_mod_SOURCES): New variable.
11846 (echo_mod_CFLAGS): Likewise.
11847 (echo_mod_LDFLAGS): Likewise.
11848
2cff3677 118492006-09-22 Marco Gerards <marco@gnu.org>
11850
11851 * normal/main.c (get_line): Malloc memory instead of using
11852 preallocated memory. Removed the arguments `cmdline' and
11853 `max_len'. Updated all callers.
11854
6ba4688b 118552006-09-22 Marco Gerards <marco@gnu.org>
11856
11857 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11858 (normal_mod_DEPENDENCIES): Likewise.
11859
11860 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11861 (normal_mod_DEPENDENCIES): Likewise.
11862
11863 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11864
e02ac02c 118652006-09-22 Johan Rydberg <jrydberg@gnu.org>
11866
11867 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11868 programs.
11869 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11870 (normal_mod_DEPENDENCIES): Likewise.
11871 * conf/i386-pc.mk: Regenerate.
11872 * conf/i386-efi.mk: Likewise
11873 * conf/common.mk: Likewise.
11874 * conf/powerpc-ieee1275.mk: Likewise.
11875 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11876
8d252e44 118772006-09-22 Robert Millan <rmh@aybabtu.com>
11878
11879 Sync with i386 version.
11880 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11881 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11882
209bf7ac 118832006-09-21 Robert Millan <rmh@aybabtu.com>
11884
11885 Import from GRUB Legacy (lib/device.c):
11886 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11887 (init_device_map) [__linux__]: Add support for I2O devices.
11888
6b146090 118892006-09-14 Marco Gerards <marco@gnu.org>
11890
11891 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11892 `-melf_i386'.
11893
e38600a8 118942006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11895
11896 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11897 /boot/grub/*.lst.
78fa1790 11898
2952da5d 11899 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11900
2952da5d 11901 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11902 before adding it to device.map.
11903
01b82a64 119042006-08-15 Johan Rydberg <jrydberg@gnu.org>
11905
fe6b695a 11906 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11907 compiles a file; using the -MD option.
11908 * conf/common.mk: Regenerate.
11909 * conf/i386-pc.mk: Likewise.
11910 * conf/i386-efi.mk: Likewise.
11911 * conf/powerpc-ieee1275.mk: Likewise.
11912 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11913
1064790d 119142006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11915
11916 Move the prototypes of grub_setjmp and grub_longjmp to
11917 cpu/setjmp.h, so that each architecture may specify different
11918 attributes.
f19dbdb7 11919
1064790d 11920 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11921 (grub_longjmp): Likewise.
11922 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11923 (grub_longjmp): Likewise.
11924 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11925 (grub_longjmp): Likewise.
11926
11927 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11928 [!GRUB_UTIL] (grub_longjmp): Removed.
11929
29dda3ed 119302006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11931
11932 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11933 "color!" method does not return any value.
11934
ad2a06ed 119352006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11936
11937 * include/grub/bitmap.h: New file.
11938
11939 * include/grub/i386/pc/vbeutil.h: Likewise.
11940
11941 * video/bitmap.c: Likewise.
11942
11943 * video/readers/tga.c: Likewise.
11944
11945 * video/i386/pc/vbeutil.c: Likewise.
11946
11947 * commands/videotest.c: Code cleanup and updated to reflect to new
11948 video API.
11949
11950 * term/gfxterm.c: Likewise.
11951
11952 * video/video.c: Likewise.
11953
11954 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11955 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11956 (bitmap_mod_SOURCES): New entry.
11957 (bitmap_mod_CFLAGS): Likewise.
11958 (bitmap_mod_LDFLAGS): Likewise.
11959 (tga_mod_SOURCES): Likewise.
11960 (tga_mod_CFLAGS): Likewise.
11961 (tga_mod_LDFLAGS): Likewise.
11962
11963 * include/grub/video.h (grub_video_blit_operators): New enum type.
11964 (grub_video_render_target): Changed as forward declaration and moved
11965 actual definition to be video driver specific.
11966 (grub_video_adapter.blit_bitmap): Added blitting operator.
11967 (grub_video_adapter.blit_render_target): Likewise.
11968 (grub_video_blit_bitmap): Likewise.
11969 (grub_video_blit_render_target): Likewise.
11970
11971 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11972 driver specific render target definition.
11973 (grub_video_vbe_map_rgba): Added driver internal helper.
11974 (grub_video_vbe_unmap_color): Updated to use
11975 grub_video_i386_vbeblit_info.
11976 (grub_video_vbe_get_video_ptr): Likewise.
11977
11978 * include/grub/i386/pc/vbeblit.h
11979 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11980 grub_video_i386_vbeblit_info.
11981 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11982 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11983 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11984 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11985 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11986 (grub_video_i386_vbeblit_index_index): Likewise.
11987 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11988 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11989 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11990 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11991 operator.
11992 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11993 operator.
11994
11995 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11996 include/grub/i386/pc/vbeblit.h.
11997
11998 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11999 Updated to use grub_video_i386_vbeblit_info.
12000 (grub_video_i386_vbefill_R8G8B8): Likewise.
12001 (grub_video_i386_vbefill_index): Likewise.
12002 (grub_video_i386_vbefill): Added generic filler.
12003
12004 * video/i386/pc/vbefill.c: Updated to reflect changes on
12005 include/grub/i386/pc/vbefill.h.
12006
12007 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12008 grub_video_i386_vbeblit_info.
12009 (grub_video_vbe_unmap_color): Likewise.
12010 (grub_video_vbe_blit_glyph): Likewise.
12011 (grub_video_vbe_scroll): Likewise.
12012 (grub_video_vbe_draw_pixel): Removed function.
12013 (grub_video_vbe_get_pixel): Likewise.
12014 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12015 updated code to use it.
12016 (common_blitter): Added common blitter for render target and bitmap.
12017 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12018 (grub_video_vbe_blit_render_target): Likewise.
12019
bc8c036d 120202006-07-30 Johan Rydberg <jrydberg@gnu.org>
12021
12022 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12023 is in text mode if there is no console control protocol instance
12024 available.
12025
684a8eff 120262006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12027
12028 * include/grub/video.h: Code cleanup.
12029
12030 * include/grub/i386/pc/vbe.h: Likewise.
12031
12032 * video/i386/pc/vbe.c: Likewise.
12033
12034 * video/i386/pc/vbeblit.c: Likewise.
12035
12036 * video/i386/pc/vbefill.c: Likewise.
12037
12038 * video/video.c: Likewise. Also added more comments.
12039
5915059b 120402006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12041
12042 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12043 (struct grub_biosdisk_dap): Likewise.
12044
12045 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12046 linkage settings for all functions.
12047
90ce5d56 120482006-07-12 Marco Gerards <marco@gnu.org>
12049
12050 * configure.ac (--enable-mm-debug): Fix typo.
12051
12052 * genkernsyms.sh.in: Use proper quoting for `CC'.
12053
43e7f879 120542006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12055
12056 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12057 (normal_mod_ASFLAGS): Remove "-m32".
12058
4889bdec 120592006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12060
12061 * util/misc.c: Include config.h.
12062 [!HAVE_MEMALIGN]: Do not include malloc.h.
12063 (grub_memalign): Use posix_memalign, if present. Then, use
12064 memalign, if present. Otherwise, emit an error.
12065
12066 * util/grub-emu.c: Do not include malloc.h.
12067
12068 * include/grub/util/misc.h: Include unistd.h. This is required for
12069 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12070 D. Eades III <hde@foobar-qux.org>.
12071
12072 * configure.ac (AC_GNU_SOURCE): Added.
12073 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12074 type.
12075
fd39d4da 120762006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12077
12078 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12079 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12080
b786f3b5 120812006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12082
12083 * include/grub/types.h (grub_host_addr_t): Rename to
12084 grub_target_addr_t.
12085 (grub_host_off_t): Rename to grub_target_off_t.
12086 (grub_host_size_t): Rename to grub_target_size_t.
12087 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12088 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12089
12090 * include/grub/kernel.h (struct grub_module_header): Change type
12091 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12092 (grub_module_info): Likewise.
f19dbdb7 12093
051988bb 120942006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12095
12096 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12097 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12098 Velazquez <jesus.velazquez@gmail.com>.
12099
deae281b 121002006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12101
12102 Count partitions from 1 instead of 0 in the string representation
12103 of partitions. Still use 0-based internally.
f19dbdb7 12104
deae281b 12105 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12106 (sun_partition_map_iterate): Use grub_partition_t instead of
12107 struct grub_partition *. Cast DESC->START_CYLINDER to
12108 grub_uint64_t after converting the endian.
12109 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12110 (sun_partition_map_get_name): Add 1 to P->INDEX.
12111
12112 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12113 PCDATA->DOS_PART.
12114 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12115
12116 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12117 zero instead of one.
12118 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12119 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12120
12121 * partmap/apple.c (apple_partition_map_iterate): Change the type
12122 of POS to unsigned.
12123 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12124 (apple_partition_map_get_name): Add 1 into P->INDEX.
12125
12126 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12127 of POS to unsigned.
12128 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12129 calculate the offset of a partition.
12130 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12131 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12132
12133 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12134 SECTOR to grub_disk_addr_t.
12135 (acorn_partition_map_iterate): Likewise.
12136 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12137 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12138 top.
12139 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12140
12141 * kern/i386/pc/init.c (make_install_device): Add 1 into
12142 GRUB_INSTALL_DOS_PART.
12143
12144 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12145 conditional.
12146
524a1e6a 121472006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12148
12149 Clean up the code to support 64-bit addressing in disks and
12150 files. This change is not enough for filesystems yet.
f19dbdb7 12151
524a1e6a 12152 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12153 type of "start" to grub_uint64_t.
12154 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12155 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12156 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12157 convert addresses.
12158
12159 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12160 to grub_disk_addr_t.
12161
12162 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12163 string.
12164
12165 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12166
12167 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12168 to char *.
12169
12170 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12171
12172 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12173
12174 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12175
12176 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12177 to grub_off_t, to detect an error from grub_file_seek.
12178 (grub_multiboot_load_elf32): Likewise.
12179
12180 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12181 maximum unsigned long value when an overflow is detected.
12182 (grub_strtoull): New function.
12183 (grub_divmod64): Likewise.
12184 (grub_lltoa): use grub_divmod64.
12185
12186 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12187 grub_disk_addr_t.
12188 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12189 the pointer to next character. Use grub_strtoull instead of
12190 grub_strtoul.
12191 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12192 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12193 respectively.
12194
fe6b695a 12195 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 12196 return value is signed.
12197 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12198 test if OFFSET is less than zero, as OFFSET is unsigned now.
12199
12200 * kern/disk.c (struct grub_disk_cache): Change the type of
12201 "sector" to grub_disk_addr_t.
12202 (grub_disk_cache_get_index): Change the type of SECTOR to
12203 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12204 unsigned after shifting.
12205 (grub_disk_cache_invalidate): Change the type of SECTOR to
12206 grub_disk_addr_t.
12207 (grub_disk_cache_unlock): Likewise.
12208 (grub_disk_cache_store): Likewise.
12209 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12210 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12211 grub_disk_addr_t and grub_uint64_t, respectively.
12212 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12213 body, as the value of OFFSET is tweaked by
12214 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12215 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12216 respectively.
12217 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12218 body, as the value of OFFSET is tweaked by
12219 grub_disk_check_range. Change the types of LEN and N to
12220 grub_size_t.
12221
12222 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12223 and "saved_offset" to grub_off_t.
12224 (test_header): Cast BUF to char *.
12225 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12226 to char *.
12227 (grub_gzio_read): Change the types of OFFSET and SIZE to
12228 grub_off_t and grub_size_t, respectively.
12229
12230 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12231 Removed.
12232 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12233 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12234 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12235 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12236 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12237
12238 * include/grub/types.h (grub_off_t): Unconditionally set to
12239 grub_uint64_t.
12240 (grub_disk_addr_t): Changed to grub_uint64_t.
12241
12242 * include/grub/partition.h (struct grub_partition): Change the
12243 types of "start", "len" and "offset" to grub_disk_addr_t,
12244 grub_uint64_t and grub_disk_addr_t, respectively.
12245 (grub_partition_get_start): Return grub_disk_addr_t.
12246 (grub_partition_get_len): Return grub_uint64_t.
12247
12248 * include/grub/misc.h (grub_strtoull): New prototype.
12249 (grub_divmod64): Likewise.
12250
12251 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12252 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12253 grub_off_t, respectively.
12254 All callers and references changed.
12255
12256 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12257 grub_size_t in "read".
12258 All callers and references changed.
12259
12260 * include/grub/file.h (struct grub_file): Change the types of
12261 "offset" and "size" to grub_off_t and grub_off_t,
12262 respectively. Change the type of SECTOR to grub_disk_addr_t in
12263 "read_hook".
12264 (grub_file_read): Change the type of LEN to grub_size_t.
12265 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12266 grub_off_t.
12267 (grub_file_size): Return grub_off_t.
12268 (grub_file_tell): Likewise.
12269 All callers and references changed.
12270
12271 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12272 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12273 "write".
12274 (struct grub_disk): Change the type of "total_sectors" to
12275 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 12276 "read_hook".
524a1e6a 12277 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12278 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12279 (grub_disk_write): Likewise.
12280 All callers and references changed.
12281
12282 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12283 char * for grub_strncmp to silence gcc.
12284 (grub_iso9660_mount): Likewise.
12285 (grub_iso9660_mount): Likewise.
12286 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12287 return statement.
12288 (grub_iso9660_iterate_dir): Likewise.
12289 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12290
12291 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12292 LEN to grub_disk_addr_t and grub_size_t, respectively.
12293
12294 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12295
12296 * fs/jfs.c (grub_jfs_read_file): Likewise.
12297
12298 * fs/minix.c (grub_jfs_read_file): Likewise.
12299
12300 * fs/sfs.c (grub_jfs_read_file): Likewise.
12301
12302 * fs/ufs.c (grub_jfs_read_file): Likewise.
12303
12304 * fs/xfs.c (grub_jfs_read_file): Likewise.
12305
12306 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12307 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12308 respectively.
12309
12310 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12311 BLKNR to -1 instead of returning GRUB_ERRNO.
12312 (grub_ext2_read_file): Change the types of SECTOR and
12313 LEN to grub_disk_addr_t and grub_size_t, respectively.
12314
12315 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12316 LEN to grub_disk_addr_t and grub_size_t, respectively.
12317
12318 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12319 grub_file_read.
12320
12321 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12322 string. Do not cast SECTOR explicitly.
12323
12324 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12325 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12326 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12327 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12328 over 2TB and LBA mode is not supported, raise an error.
12329 (get_safe_sectors): New function.
12330 (grub_biosdisk_read): Use get_safe_sectors.
12331 (grub_biosdisk_write): Likewise.
12332
12333 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12334 (grub_efidisk_write): Likewise.
12335
12336 * disk/loopback.c (delete_loopback): Cosmetic changes.
12337 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12338 correctly.
12339 (grub_loopback_open): Likewise.
12340 (grub_loopback_read): Likewise. Also, change the type of POS to
12341 grub_off_t, and fix the usage of grub_memset.
12342
12343 * commands/i386/pc/play.c: Include grub/machine/time.h.
12344
12345 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12346 print FILE->SIZE.
12347
12348 * commands/configfile.c: Include grub/env.h.
12349
12350 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12351 GRUB_ERRNO directly instead. Change the type of POS to
12352 grub_off_t. Follow the coding standard.
12353
12354 * commands/blocklist.c: Include grub/partition.h.
12355 (grub_cmd_blocklist): Return an error if the underlying device is
12356 not a disk. Take the starting sector of a partition into account,
12357 if a partition is used.
12358
12359 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12360 a length field.
12361 (lba_mode): Support 64-bit addresses.
12362 (chs_mode): Likewise.
12363 (copy_buffer): Adapted to the new offsets of a length field and a
12364 segment field.
12365 (blocklist_default_start): Allocate 64-bit space.
12366
12367 * boot/i386/pc/boot.S (force_lba): Removed.
12368 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 12369 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 12370 space.
12371 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12372 is useless.
12373 (lba_mode): Refactored to support a 64-bit address. More size
12374 optimization.
12375 (setup_sectors): Likewise.
12376
53af98ad 123772006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12378
12379 * DISTLIST: Added include/grub/i386/linux.h. Removed
12380 include/grub/i386/pc/linux.h
12381
12382 * configure.ac (AC_INIT): Bumped to 1.94.
12383
12384 * config.guess: Updated from gnulib.
12385 * config.sub: Likewise.
12386 * install-sh: Likewise.
12387 * mkinstalldirs: Likewise.
12388
b4c1940a 123892006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12390
12391 * conf/common.rmk (grub_modules_init.lst): Depended on
12392 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12393 MODSRCFILES.
12394
12395 * genmk.rb (PModule::rule): Reverted the previous change.
12396
cfca1cfd 123972006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12398
12399 * conf/common.rmk (grub_modules_init.lst): Depends on
12400 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12401 that the target does not exist before producing.
12402 (grub_modules_init.h): Remove the target before generating.
12403 (grub_emu_init.c): Likewise.
12404
12405 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12406
aa6d7826 124072006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12408
12409 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12410 for the target-specific tests. Make sure that we also have the
12411 up-to-date target variables for those tests.
12412
26c607b9 124132006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12414
12415 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12416 (PModule::rule): Likewise.
12417
0162321a 124182006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12419
12420 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12421 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12422 target-specific flags should be prefixed.
12423 (PModule::rule): Likewise.
12424
6c826348 124252006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12426
12427 * configure.ac (CMP): Check if cmp is available explicitly.
12428
b977bf01 124292006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12430
12431 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12432 (target_cpu): New variable.
12433 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 12434
b977bf01 12435 * util/i386/pc/grub-install.in (host_cpu): Removed.
12436 (target_cpu): New variable.
12437 (pkglibdir): Use target_cpu instead of host_cpu.
12438
12439 * util/genmoddep.c: Removed.
f19dbdb7 12440
b977bf01 12441 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12442 instead of GRUB_HOST_SIZEOF_VOID_P.
12443 * kern/dl.c: Likewise.
12444
12445 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12446 ...
12447 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12448 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12449 (GRUB_TARGET_SIZEOF_LONG): ... this.
12450 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12451 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12452 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12453 to ...
12454 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12455 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12456 (GRUB_TARGET_SIZEOF_LONG): ... this.
12457 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12458 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12459 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12460 to ...
12461 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12462 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12463 (GRUB_TARGET_SIZEOF_LONG): ... this.
12464 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12465 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12466
12467 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12468 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12469 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12470 instead of GRUB_HOST_SIZEOF_LONG.
12471 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12472 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12473 GRUB_CPU_WORDS_BIGENDIAN.
12474 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12475 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12476 grub_host_ssize_t.
12477
12478 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12479 (genmoddep_SOURCES): Likewise.
12480 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12481 (genmoddep_SOURCES): Likewise.
12482 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12483 (genmoddep_SOURCES): Likewise.
12484 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12485 Likewise.
12486 (genmoddep_SOURCES): Likewise.
12487
12488 * genmoddep.awk: New file.
12489
12490 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12491 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12492 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12493 (PModule::rule): Likewise.
12494 (Program::rule): Likewise.
12495 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12496 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12497 respectively.
12498
12499 * configure.ac: Rewritten intensively to use host and target
12500 instead of build and host, respectively.
12501
12502 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12503 (host_cpu): Removed.
12504 (target_cpu): New variable.
12505 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12506 (BUILD_CC): Removed.
12507 (BUILD_CFLAGS): Likewise.
12508 (BUILD_CPPFLAGS): Likewise.
12509 (TARGET_CC): New variable.
12510 (TARGET_CFLAGS): Likewise.
12511 (TARGET_CPPFLAGS): Likewise.
12512 (TARGET_LDFLAGS): Likewise.
12513 (AWK): Likewise.
12514 (include): Use target_cpu instead of host_cpu.
12515 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 12516
b977bf01 12517 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12518
f09771a1 125192006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12520
12521 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12522 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12523 field 'false' to 'exec_on_false'.
12524 (grub_script_create_cmdif): Renamed argument names to reflect above
12525 changes.
12526
12527 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12528
12529 * normal/script.c (grub_script_create_cmdif): Likewise.
12530
118f4fb3 125312006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12532
12533 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12534 top.
12535 (grub_hfsplus_btree_recptr): Likewise.
12536 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12537 FILEBLOCK both to pass a block number and store next block
12538 number.
12539 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12540 overflow file correctly. Specify errors appropriately, because
12541 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12542 grub_hfsplus_btree_recptr to get the pointer to a found key.
12543 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12544 is found.
12545
12546 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12547 linux.mod.
12548 (_linux_mod_SOURCES): New variable.
12549 (_linux_mod_CFLAGS): Likewise.
12550 (_linux_mod_LDFLAGS): Likewise.
12551 (linux_mod_SOURCES): Likewise.
12552 (linux_mod_CFLAGS): Likewise.
12553 (linux_mod_LDFLAGS): Likewise.
12554
12555 * DISTLIST: Added loader/i386/efi/linux.c,
12556 loader/i386/efi/linux_normal.c and
12557 include/grub/i386/efi/loader.h.
12558
12559 * loader/i386/efi/linux.c: New file.
12560 * loader/i386/efi/linux_normal.c: Likewise.
12561 * include/grub/i386/efi/loader.h: Likewise.
12562
89a7d726 125632006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12564
12565 * commands/blocklist.c: New file.
12566
12567 * DISTLIST: Added commands/blocklist.c.
12568
12569 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 12570 color for the background, and a darker color for the foreground.
89a7d726 12571 (grub_console_checkkey): Return READ_KEY.
12572 (grub_console_cls): Set the background to
12573 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12574
12575 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12576
12577 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12578 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12579
12580 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12581 prototype.
12582
12583 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12584 BG. The spec is wrong again.
12585
12586 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12587 prototype.
12588 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12589
12590 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12591 commands/blocklist.c.
12592 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 12593
89a7d726 12594 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12595 (blocklist_mod_SOURCES): New variable.
12596 (blocklist_mod_CFLAGS): Likewise.
12597 (blocklist_mod_LDFLAGS): Likewise.
12598
75c8f258 125992006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12600
12601 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12602 duplication.
12603 (lba_mode): Use %eax more intensively to reduce the code size.
12604
da2eb181 126052006-05-20 Marco Gerards <marco@gnu.org>
12606
12607 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12608
12609 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12610 for `menuentry'.
12611 (script): Accept leading newlines.
12612 (newlines): New rule to describe 0 or more newlines.
12613 (commands): Accept `command' with trailing newline. Fixed the
12614 order in which arguments were passed to `grub_script_add_cmd'.
12615 Accept commands separated by newlines.
12616 (function): Changed to accept newlines.
12617 (menuentry) Rewritten.
12618
12619 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12620 front of the list, instead of to the end.
12621
577b4050 126222006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12623
12624 * util/i386/pc/grub-install.in (bindir): New variable.
12625 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12626 Shaver <lbgwjl@gmail.com>.
12627
0d6e1189 126282006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12629
12630 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12631 grub/machine/linux.h
12632 * loader/i386/pc/linux.c: Likewise.
12633
12634 * include/grub/i386/pc/linux.h: Moved to ...
12635 * include/grub/i386/linux.h: ... here.
12636
12637 * include/grub/i386/linux.h (struct linux_kernel_params): New
12638 struct.
f19dbdb7 12639
31b86e9f 126402006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12641
12642 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12643 checking.
12644 (grub_video_vbe_blit_glyph): Likewise.
12645 (grub_video_vbe_blit_bitmap): Likewise.
12646 (grub_video_vbe_blit_render_target): Likewise.
12647
83b984de 126482006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12649
12650 * configure.ac (--with-platform): Properly quote the square
12651 brackets.
12652
5f0413bd 126532006-05-08 Marco Gerards <marco@gnu.org>
12654
12655 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12656 this...
12657 (kernel_elf_HEADERS): ...to this. Updated all users.
12658 (grubof_symlist.c): Renamed from this...
12659 (kernel_elf_symlist.c): ...to this. Updated all users.
12660 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12661 (grubof_SOURCES): Renamed from this...
12662 (kernel_elf_SOURCES): ...to this.
12663 (grubof_HEADERS): Renamed from this...
12664 (kernel_elf_HEADERS): ...to this.
12665 (grubof_CFLAGS): Renamed from this...
12666 (kernel_elf_CFLAGS): ...to this.
12667 (grubof_ASFLAGS): Renamed from this...
12668 (kernel_elf_ASFLAGS): ...to this.
12669 (grubof_LDFLAGS): Renamed from this...
12670 (kernel_elf_LDFLAGS): ...to this.
12671
12672 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12673 this...
12674 (kernel_elf_HEADERS): ...to this. Updated all users.
12675 (grubof_symlist.c): Renamed from this...
12676 (kernel_elf_symlist.c): ...to this. Updated all users.
12677 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12678 (grubof_SOURCES): Renamed from this...
12679 (kernel_elf_SOURCES): ...to this.
12680 (grubof_HEADERS): Renamed from this...
12681 (kernel_elf_HEADERS): ...to this.
12682 (grubof_CFLAGS): Renamed from this...
12683 (kernel_elf_CFLAGS): ...to this.
12684 (grubof_ASFLAGS): Renamed from this...
12685 (kernel_elf_ASFLAGS): ...to this.
12686 (grubof_LDFLAGS): Renamed from this...
12687 (kernel_elf_LDFLAGS): ...to this.
12688
12689 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12690 `kernel.elf' instead of `grubof'.
12691
05568c2e 126922006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12693
12694 Add --with-platform to configure. Use pkglibdir instead of
12695 pkgdatadir. This is reported by Roger Leigh.
12696
12697 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12698 (host_vendor): Likewise.
12699 (host_os): Likewise.
12700 (pkgdatadir): Likewise.
12701 (platform): New variable.
12702 (pkglibdir): Likewise.
12703 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 12704
05568c2e 12705 * util/i386/pc/grub-install.in (datadir): Removed.
12706 (host_vendor): Likewise.
12707 (host_os): Likewise.
12708 (pkgdatadir): Likewise.
12709 (platform): New variable.
12710 (pkglibdir): Likewise.
12711 Use PKGLIBDIR instead of PKGDATADIR.
12712
12713 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12714 instead of GRUB_DATADIR.
12715 (main): Likewise.
12716 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12717 (main): Likewise.
12718 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12719 (main): Likewise.
12720
12721 * configure.ac (--with-platform): New option.
12722 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12723
12724 * Makefile.in: Include a makefile based on PLATFORM instead of
12725 HOST_VENDOR.
12726 (pkgdatadir): Not appended by the machine type.
12727 (pkglibdir): Appended by the machine type.
12728 (host_vendor): Removed.
12729 (platform): New variable.
12730 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12731 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12732 (uninstall): Likewise.
12733
4e93851c 127342006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12735
12736 Use the environment context in the menu. Remove the commands
12737 "default" and "timeout", and use variables instead.
f19dbdb7 12738
4e93851c 12739 * normal/menu.c: Include grub/env.h.
12740 (print_entry): Cast TITLE to silence gcc.
12741 (get_timeout): New function.
12742 (set_timeout): Likewise.
12743 (get_entry_number): Likewise.
12744 (run_menu): Use a default entry, a fallback entry and a timeout
12745 in the environment variables "default", "fallback" and
12746 "timeout". Also, tweak the default entry if it is not within the
12747 current menu entries.
12748 (grub_menu_run): Use a fallback entry in the environment variable
12749 "fallback".
12750
12751 * normal/main.c (read_config_file): Do not initialize
12752 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12753 NEWMENU->TIMEOUT.
12754 (grub_normal_execute): Use a data slot to store the menu.
12755
12756 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12757 fallback_entry and timeout.
12758 (struct grub_menu_list): Removed.
12759 (grub_menu_list_t): Likewise.
12760 (struct grub_context): Likewise.
12761 (grub_context_t): Likewise.
12762 (grub_context_get): Likewise.
12763 (grub_context_get_current_menu): Likewise.
12764 (grub_context_push_menu): Likewise.
12765 (grub_context_pop_menu): Likewise.
12766 (grub_default_init): Likewise.
12767 (grub_default_fini): Likewise.
12768 (grub_timeout_init): Likewise.
12769 (grub_timeout_fini): Likewise.
12770
12771 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12772 and timeout.mod.
12773 (normal_mod_SOURCES): Removed normal/context.c.
12774
12775 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12776 commands/default.c, commands/timeout.c and normal/context.c.
12777 (normal_mod_SOURCES): Removed normal/context.c.
12778
12779 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12780 commands/timeout.c and normal/context.c.
12781 (normal_mod_SOURCES): Removed normal/context.c.
12782
12783 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12784 commands/default.c, commands/timeout.c and normal/context.c.
12785 (normal_mod_SOURCES): Removed normal/context.c.
12786
12787 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12788 timeout.mod.
12789 (default_mod_SOURCES): Removed.
12790 (default_mod_CFLAGS): Likewise.
12791 (default_mod_LDFLAGS): Likewise.
12792 (timeout_mod_SOURCES): Removed.
12793 (timeout_mod_CFLAGS): Likewise.
12794 (timeout_mod_LDFLAGS): Likewise.
12795
12796 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12797 normal/context.c.
12798
12799 * commands/default.c: Removed.
12800 * commands/timeout.c: Likewise.
12801 * normal/context.c: Likewise.
12802
1eb9cc1d 128032006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12804
12805 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12806
385bd9c1 128072006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12808
12809 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12810 "next" to "prev" for readability.
12811 (struct grub_env_sorted_var): New struct.
12812 (grub_env_context): Renamed to ...
12813 (initial_context): ... this.
12814 (grub_env_var_context): Renamed to ...
12815 (current_context): ... this.
12816 (grub_env_find): Look only at CURRENT_CONTEXT.
12817 (grub_env_context_open): Rewritten to copy exported variables from
12818 previous context.
12819 (grub_env_context_close): Rewritten according to the new
12820 scheme. Also, add an assertion to prevent the initial context from
12821 removed.
12822 (grub_env_insert): Removed the code for the sorted list.
12823 (grub_env_remove): Likewise.
12824 (grub_env_export): Simply mark the variable with
12825 GRUB_ENV_VAR_GLOBAL.
12826 (grub_env_set): A cosmetic change for naming consistency.
12827 (grub_env_get): Likewise.
12828 (grub_env_unset): Likewise.
12829 (grub_env_iterate): Rewritten to sort variables within this
12830 function.
12831 (grub_register_variable_hook): Fixed for naming consistency. Call
12832 grub_env_find again, only if NAME is not found at the first time.
12833 (mangle_data_slot_name): New function.
12834 (grub_env_set_data_slot): Likewise.
12835 (grub_env_get_data_slot): Likewise.
12836 (grub_env_unset_data_slot): Likewise.
12837
12838 * include/grub/env.h (grub_env_var_type): New enum.
12839 (GRUB_ENV_VAR_LOCAL): New constant.
12840 (GRUB_ENV_VAR_GLOBAL): Likewise.
12841 (GRUB_ENV_VAR_DATA): Likewise.
12842 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12843 "type".
12844 (grub_env_set): Replace VAR with NAME for consistency.
12845 (grub_register_variable_hook): Likewise.
12846 (grub_env_export): Specify the name of the argument.
12847 (grub_env_set_data_slot): New prototype.
12848 (grub_env_get_data_slot): Likewise.
12849 (grub_env_unset_data_slot): Likewise.
12850
7f362539 128512006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12852
12853 Extend the loader so that GRUB can accept a loader which comes
12854 back to GRUB when a loaded image exits. Also, this change adds
12855 support for a chainloader on EFI.
f19dbdb7 12856
7f362539 12857 * term/efi/console.c: Include grub/misc.h.
12858 (grub_console_checkkey): Display a scan code on the top for
12859 debugging. This will be removed once the EFI port gets stable.
12860 Correct the scan code mapping.
12861
12862 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12863 allocate memory from larger regions, in order to reduce the number
12864 of allocated regions. Otherwise, the MacOSX loader panics.
12865 (filter_memory_map): Avoid less than 1MB for compatibility with
12866 other loaders.
12867 (add_memory_regions): Allocate from the tail of a region, if
12868 possible, to avoid allocating a region near to 1MB, for the MacOSX
12869 loader.
12870
12871 * kern/efi/init.c (grub_efi_set_prefix): Specify
12872 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12873
12874 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12875 argument IMAGE_HANDLE and specify it to get a loaded image.
12876 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12877 grub_efi_get_loaded_image.
fe6b695a 12878 (grub_efi_get_filename): Divide the length by the size of
7f362539 12879 grub_efi_char16_t.
12880 (grub_efi_get_device_path): New function.
12881 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12882 the length by the size of grub_efi_char16_t for a file path device
12883 path node.
12884
12885 * kern/loader.c (grub_loader_noreturn): New variable.
12886 (grub_loader_set): Accept a new argument NORETURN. Set
12887 GRUB_LOADER_NORETURN to NORETURN.
12888 All callers changed.
12889 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12890 grub_machine_fini.
12891
12892 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12893 prototype.
12894 (grub_efi_get_loaded_image): Take an argument to specify an image
12895 handle.
12896
12897 * include/grub/loader.h (grub_loader_set): Added one more argument
12898 NORETURN.
12899
12900 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12901 instead of grub_efi_open_protocol.
12902 (grub_efidisk_get_device_name): Likewise.
12903 (grub_efidisk_close): Print a newline.
12904 (grub_efidisk_get_device_handle): Fixed to use
12905 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12906 GRUB_EFI_DEVICE_PATH_TYPE.
12907
12908 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12909 * kern/efi/efi.c (device_path_guid): ... here.
12910
12911 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12912 chain.mod.
12913 (kernel_mod_HEADERS): Added efi/disk.h.
12914 (_chain_mod_SOURCES): New variable.
12915 (_chain_mod_CFLAGS): Likewise.
12916 (_chain_mod_LDFLAGS): Likewise.
12917 (chain_mod_SOURCES): Likewise.
12918 (chain_mod_CFLAGS): Likewise.
12919 (chain_mod_LDFLAGS): Likewise.
12920
12921 * DISTLIST: Added include/grub/efi/chainloader.h,
12922 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12923
12924 * include/grub/efi/chainloader.h: New file.
12925 * loader/efi/chainloader.c: Likewise.
12926 * loader/efi/chainloader_normal.c: Likewise.
12927
c0111d6e 129282006-04-30 Marco Gerards <marco@gnu.org>
12929
12930 * commands/configfile.c (grub_cmd_source): New function.
12931 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12932 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12933
df5341da 129342006-04-30 Marco Gerards <marco@gnu.org>
12935
12936 * normal/execute.c (grub_script_execute_cmd): Change the return
12937 type to `grub_err_t'. Correctly return the error.
12938 (grub_script_execute_cmdline): In case a command line is not a
12939 command or a function, try to interpret it as an assignment.
12940
f85934bd 129412006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12942
12943 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12944 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12945 skip a node whose name is obviously invalid as UTF-16,
12946 i.e. contains a NUL character. Stop the iteration when the last
12947 directory entry is found. Instead of using the return value of
12948 grub_hfsplus_btree_iterate_node, store the value in RET and use
12949 it, because the iterator can be stopped by the last directory
12950 entry.
12951
8f8a2cf8 129522006-04-30 Marco Gerards <marco@gnu.org>
12953
12954 * include/grub/env.h (grub_env_export): New prototype. Reported
12955 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12956
a27e84ce 129572006-04-30 Marco Gerards <marco@gnu.org>
12958
12959 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12960 size of the extents in a catalog file record.
12961
eaef0553 129622006-04-29 Marco Gerards <marco@gnu.org>
12963
12964 * commands/configfile.c (grub_cmd_configfile): Execute the
12965 configfile within its own context.
12966
12967 * include/grub/env.h (grub_env_context_open): New prototype.
12968 (grub_env_context_close): Likewise.
12969
12970 * kern/env.c (grub_env): Removed.
12971 (grub_env_sorted): Likewise.
12972 (grub_env_context): New variable.
12973 (grub_env_var_context): Likewise.
12974 (grub_env_find): Search both the active context and the global
12975 context.
12976 (grub_env_context_open): New function.
12977 (grub_env_context_close): Likewise.
12978 (grub_env_insert): Likewise.
12979 (grub_env_remove): Likewise.
12980 (grub_env_export): Likewise.
12981 (grub_env_set): Changed to use helper functions to avoid code
12982 duplication.
12983 (grub_env_iterate): Rewritten so both the current context and the
12984 global context are being used.
12985
12986 * normal/command.c (export_command): New function.
12987 (grub_command_init): Register the `export' function.
12988
7b455f4d 129892006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12990
12991 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12992 explicitly to suppress gcc's warnings.
12993 * fs/fat.c (grub_fat_find_dir): Likewise.
12994 (grub_fat_label): Likewise.
12995 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12996 (grub_xfs_mount): Likewise.
12997 (grub_xfs_label): Likewise.
12998 * fs/affs.c (grub_affs_mount): Likewise.
12999 (grub_affs_label): Likewise.
13000 (grub_affs_iterate_dir): Likewise.
13001 * fs/sfs.c (grub_sfs_mount): Likewise.
13002 (grub_sfs_iterate_dir): Likewise.
13003 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13004 * fs/hfs.c (grub_hfs_mount): Likewise.
13005 (grub_hfs_cmp_catkeys): Likewise.
13006 (grub_hfs_find_dir): Likewise.
13007 (grub_hfs_dir): Likewise.
13008 (grub_hfs_label): Likewise.
13009 * fs/jfs.c (grub_jfs_mount): Likewise.
13010 (grub_jfs_opendir): Likewise.
13011 (grub_jfs_getent): Likewise.
13012 (grub_jfs_lookup_symlink): Likewise.
13013 (grub_jfs_label): Likewise.
13014 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13015 (grub_hfsplus_iterate_dir): Likewise.
13016 (grub_hfsplus_btree_iterate_node): Made static.
13017
13018 * util/grub-emu.c (prefix): New variable.
13019 (grub_machine_set_prefix): New function.
13020 (main): Do not set the environment variable "prefix" here. Only
13021 set PREFIX, which is used later by grub_machine_set_prefix.
13022
13023 * include/grub/video.h: Do not include grub/symbol.h.
13024 (grub_video_register): Not exported. This symbol is not defined in
13025 the kernel.
13026 (grub_video_unregister): Likewise.
13027 (grub_video_iterate): Likewise.
13028 (grub_video_setup): Likewise.
13029 (grub_video_restore): Likewise.
13030 (grub_video_get_info): Likewise.
13031 (grub_video_get_blit_format): Likewise.
13032 (grub_video_set_palette): Likewise.
13033 (grub_video_get_palette): Likewise.
13034 (grub_video_set_viewport): Likewise.
13035 (grub_video_get_viewport): Likewise.
13036 (grub_video_map_color): Likewise.
13037 (grub_video_map_rgb): Likewise.
13038 (grub_video_map_rgba): Likewise.
13039 (grub_video_fill_rect): Likewise.
13040 (grub_video_blit_glyph): Likewise.
13041 (grub_video_blit_bitmap): Likewise.
13042 (grub_video_blit_render_target): Likewise.
13043 (grub_video_scroll): Likewise.
13044 (grub_video_swap_buffers): Likewise.
13045 (grub_video_create_render_target): Likewise.
13046 (grub_video_delete_render_target): Likewise.
13047 (grub_video_set_active_render_target): Likewise.
13048
13049 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13050 Undefined.
13051 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13052
13053 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13054 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13055 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13056 instead of $(srcdir)/genkernsyms.sh.
13057
13058 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13059 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13060 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13061 instead of $(srcdir)/genkernsyms.sh.
13062
13063 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13064 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13065 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13066 instead of $(srcdir)/genkernsyms.sh.
13067
13068 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13069 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13070 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13071 instead of $(srcdir)/genkernsyms.sh.
13072
13073 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13074 genkernsyms.sh.
13075
13076 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13077 genkernsyms.sh.
13078 (gensymlist.sh): New target.
13079 (genkernsyms.sh): Likewise.
13080
13081 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13082 genkernsyms.sh.in and gensymlist.sh.in.
13083
13084 * genkernsyms.sh: Removed.
13085 * gensymlist.sh: Likewise.
f19dbdb7 13086
7b455f4d 13087 * genkernsyms.sh.in: New file.
13088 * gensymlist.sh.in: Likewise.
13089
1885bb27 130902006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13091
13092 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13093 clobber "prefix", since we may have already set it manually.
13094
71538dff 130952006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13096
13097 * kern/misc.c (abort): New alias for grub_abort.
13098
2965c7cc 130992006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13100
13101 A new machine-specific function "grub_machine_set_prefix" is
13102 defined. This is called after loading modules, so that a prefix
13103 initialization can use modules. Also, this change adds an
13104 intensive debugging feature for the memory manager via the
13105 configure option "--enable-mm-debug".
f19dbdb7 13106
2965c7cc 13107 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13108 PART.LEN.
13109
13110 * kern/sparc64/ieee1275/init.c (abort): Removed.
13111 (grub_stop): Likewise.
13112 (grub_exit): New function.
13113 (grub_set_prefix): Renamed to ...
13114 (grub_machine_set_prefix): ... this.
13115 (grub_machine_init): Do not call grub_set_prefix.
13116
13117 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13118 (grub_machine_set_prefix): ... this.
13119 (grub_machine_init): Do not call grub_set_prefix.
13120
13121 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13122 (grub_machine_init): Do not set the prefix here.
13123
13124 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13125
13126 * kern/efi/init.c: Include grub/mm.h.
13127 (grub_efi_set_prefix): New function.
13128
13129 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13130 (grub_efi_get_filename): New function.
13131 (grub_print_device_path): Renamed to ...
13132 (grub_efi_print_device_path): ... this.
13133
13134 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13135 [MM_DEBUG] (grub_realloc): Likewise.
13136 [MM_DEBUG] (grub_free): Likewise.
13137 [MM_DEBUG] (grub_memalign): Likewise.
13138 [MM_DEBUG] (grub_mm_debug): New variable.
13139 [MM_DEBUG] (grub_debug_malloc): New function.
13140 [MM_DEBUG] (grub_debug_free): New function.
13141 [MM_DEBUG] (grub_debug_realloc): New function.
13142 [MM_DEBUG] (grub_debug_memalign): New function.
13143
13144 * kern/misc.c (grub_abort): Print a newline to distinguish
13145 the message.
13146
13147 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13148 grub_set_root_dev after loading modules. This is necessary when
13149 setting a prefix depends on modules.
13150
13151 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13152 (grub_efi_print_device_path): ... this.
13153 (grub_efi_get_filename): New prototype.
13154 (grub_efi_set_prefix): Likewise.
13155
13156 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13157 and grub/disk.h.
13158 (grub_efidisk_get_device_handle): New prototype.
13159 (grub_efidisk_get_device_name): Likewise.
13160
13161 * include/grub/mm.h: Include config.h.
13162 (MM_DEBUG): Removed.
13163 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13164 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13165 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13166 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13167 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13168 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13169 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13170 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13171 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13172
13173 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13174
13175 * disk/efi/efidisk.c: Include grub/partition.h.
13176 (iterate_child_devices): New function.
13177 (add_device): First, compare only last device path nodes, so that
13178 devices are sorted by the types.
13179 (grub_efidisk_get_device_handle): New function.
13180 (grub_efidisk_get_device_name): Likewise.
13181
13182 * configure.ac (--enable-mm-debug): New option to enable the
13183 memory manager debugging feature. This makes the binary much
13184 bigger, so is disabled by default.
13185
9cacaa17 131862006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13187
13188 Use grub_abort instead of grub_stop, and grub_exit must be
13189 define in each architecture now. Also, this change adds support
13190 for EFI disks.
f19dbdb7 13191
9cacaa17 13192 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13193 (grub_getkey): New function.
13194 (grub_term_get_current): Likewise.
13195
13196 * util/i386/pc/grub-setup.c: Include grub/term.h.
13197 (grub_getkey): New function.
13198 (grub_term_get_current): Likewise.
13199
13200 * util/misc.c (grub_stop): Renamed to ...
13201 (grub_exit): ... this.
13202
13203 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13204 (grub_exit): ... this.
13205 (grub_machine_init): Use grub_abort instead of abort.
13206 (grub_stop): Removed.
13207
13208 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13209 abort.
13210
13211 * kern/i386/pc/startup.S (grub_exit): New function.
13212 (cold_reboot): New label.
13213
13214 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13215 (grub_efi_init): Call grub_efidisk_init.
13216 (grub_efi_fini): Call grub_efidisk_fini.
13217
13218 * kern/efi/efi.c: Include grub/mm.h.
13219 (grub_efi_console_control_guid): Renamed to ...
13220 (console_control_guid): ... this.
13221 (grub_efi_loaded_image_guid): Renamed to ...
13222 (loaded_image_guid): ... this.
13223 (grub_efi_locate_handle): New function.
13224 (grub_efi_open_protocol): Likewise.
13225 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13226 GRUB_EFI_CONSOLE_CONTROL_GUID.
13227 (grub_efi_exit): Removed.
13228 (grub_stop): Likewise.
13229 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13230 (grub_exit): New function.
13231 (grub_print_device_path): Likewise.
13232
13233 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13234 (grub_enter_rescue_mode): Register "exit".
13235
13236 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13237 (grub_abort): New function.
13238
13239 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13240
13241 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13242
13243 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13244
13245 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13246 (grub_print_device_path): New prototype.
13247 (grub_efi_locate_handle): Likewise.
13248 (grub_efi_open_protocol): Likewise.
13249
13250 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13251 * disk/efi/efidisk.c: Likewise.
13252
13253 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13254
13255 * include/grub/efi/console_control.h
13256 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13257
13258 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13259 last 8 bytes as an array.
13260 (GRUB_EFI_DISK_IO_GUID): New macro.
13261 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13262 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13263 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13264 grub_uint8_t.
13265 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13266 (struct grub_efi_device_path): Rename the member "sub_type" to
13267 "subtype".
13268 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13269 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13270 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13271 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13272 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13273 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13274 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13275 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13276 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13277 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13278 (struct grub_efi_pci_device_path): New structure.
13279 (grub_efi_pci_device_path_t): New type.
13280 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13281 (struct grub_efi_pccard_device_path): New structure.
13282 (grub_efi_pccard_device_path_t): New type.
13283 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13284 (struct grub_efi_memory_mapped_device_path): New structure.
13285 (grub_efi_memory_mapped_device_path_t): New type.
13286 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13287 (struct grub_efi_vendor_device_path): New structure.
13288 (grub_efi_vendor_device_path_t): New type.
13289 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13290 (struct grub_efi_controller_device_path): New structure.
13291 (grub_efi_controller_device_path_t): New type.
13292 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13293 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13294 (struct grub_efi_acpi_device_path): New structure.
13295 (grub_efi_acpi_device_path_t): New type.
13296 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13297 (struct grub_efi_expanded_acpi_device_path): New structure.
13298 (grub_efi_expanded_acpi_device_path_t): New type.
13299 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13300 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13301 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13302 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13303 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13304 (struct grub_efi_atapi_device_path): New structure.
13305 (grub_efi_atapi_device_path_t): New type.
13306 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13307 (struct grub_efi_fibre_channel_device_path): New structure.
13308 (grub_efi_fibre_channel_device_path_t): New type.
13309 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13310 (struct grub_efi_1394_device_path): New structure.
13311 (grub_efi_1394_device_path_t): New type.
13312 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13313 (struct grub_efi_usb_device_path): New structure.
13314 (grub_efi_usb_device_path_t): New type.
13315 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13316 (struct grub_efi_usb_class_device_path): New structure.
13317 (grub_efi_usb_class_device_path_t): New type.
13318 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13319 (struct grub_efi_i2o_device_path): New structure.
13320 (grub_efi_i2o_device_path_t): New type.
13321 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13322 (struct grub_efi_mac_address_device_path): New structure.
13323 (grub_efi_mac_address_device_path_t): New type.
13324 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13325 (struct grub_efi_ipv4_device_path): New structure.
13326 (grub_efi_ipv4_device_path_t): New type.
13327 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13328 (struct grub_efi_ipv6_device_path): New structure.
13329 (grub_efi_ipv6_device_path_t): New type.
13330 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13331 (struct grub_efi_infiniband_device_path): New structure.
13332 (grub_efi_infiniband_device_path_t): New type.
13333 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13334 (struct grub_efi_uart_device_path): New structure.
13335 (grub_efi_uart_device_path_t): New type.
13336 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13337 (struct grub_efi_vendor_messaging_device_path): New structure.
13338 (grub_efi_vendor_messaging_device_path_t): New type.
13339 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13340 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13341 (struct grub_efi_hard_drive_device_path): New structure.
13342 (grub_efi_hard_drive_device_path_t): New type.
13343 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13344 (struct grub_efi_cdrom_device_path): New structure.
13345 (grub_efi_cdrom_device_path_t): New type.
13346 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13347 (struct grub_efi_vendor_media_device_path): New structure.
13348 (grub_efi_vendor_media_device_path_t): New type.
13349 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13350 (struct grub_efi_file_path_device_path): New structure.
13351 (grub_efi_file_path_device_path_t): New type.
13352 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13353 (struct grub_efi_protocol_device_path): New structure.
13354 (grub_efi_protocol_device_path_t): New type.
13355 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13356 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13357 (struct grub_efi_bios_device_path): New structure.
13358 (grub_efi_bios_device_path_t): New type.
13359 (struct grub_efi_disk_io): New structure.
13360 (grub_efi_disk_io_t): New type.
13361 (struct grub_efi_block_io_media): New structure.
13362 (grub_efi_block_io_media_t): New type.
13363 (struct grub_efi_block_io): New structure.
13364 (grub_efi_block_io_t): New type.
13365
13366 * include/grub/misc.h (grub_stop): Removed.
13367 (grub_exit): New prototype.
13368 (grub_abort): Likewise.
13369
13370 * include/grub/disk.h (enum grub_disk_dev_id): Added
13371 GRUB_DISK_DEVICE_EFIDISK_ID.
13372
13373 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13374 disk/efi/efidisk.c.
13375 (kernel_syms.lst): Remove the target if an error occurs.
13376
49986a9f 133772006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13378
13379 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13380 as it was simply too buggy.
13381
970d3b8a 133822006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13383
13384 * kern/misc.c (grub_lltoa): New function.
13385 (grub_vsprintf): Added support for the long long suffix,
13386 i.e. "ll".
13387
ff04ec24 133882006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13389
13390 * Makefile.in (LDFLAGS): Add variable.
13391 (LD): Remove variable.
13392 * configure.ac: Add -m32 to LDFLAGS.
13393 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13394 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13395 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13396 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13397 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13398 variables.
13399 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13400 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13401 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13402
37e5e1a4 134032006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13404
13405 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13406 length for unknown glyph.
13407
c352d8dd 134082006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13409
2eab1c0d 13410 Add support for pre-loaded modules into the EFI port.
f19dbdb7 13411
2eab1c0d 13412 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13413 completely. Accept one more argument DIR. The caller has changed.
13414
13415 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13416
13417 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13418 (grub_efi_loaded_image_guid): New variable.
13419 (grub_efi_get_loaded_image): New function.
13420 (grub_arch_modules_addr): Likewise.
13421
13422 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13423 prototype.
13424
13425 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13426 (struct grub_efi_loaded_image): New structure.
13427 (grub_efi_loaded_image_t): New type.
13428
134292006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13430
c352d8dd 13431 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13432 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13433 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13434
6d01d6b4 134352006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13436
13437 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13438
976a4ea0 134392006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13440
13441 * DISTLIST: Added include/grub/efi/console.h,
13442 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13443 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13444
13445 * include/grub/efi/console.h: New file.
13446 * include/grub/efi/time.h: Likewise.
13447 * include/grub/i386/efi/kernel.h: Likewise.
13448 * kern/efi/init.c: Likewise.
13449 * kern/efi/mm.c: Likewise.
13450 * term/efi/console.c: Likewise.
f19dbdb7 13451
976a4ea0 13452 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13453 (grub_stop): Removed.
13454 (grub_get_rtc): Likewise.
13455 (grub_machine_init): Simply call grub_efi_init.
13456 (grub_machine_fini): Call grub_efi_fini.
13457
13458 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13459 (grub_efi_output_string): Removed.
13460 (grub_efi_stall): New function.
13461 (grub_stop): Likewise.
13462 (grub_get_rtc): Likewise.
13463
13464 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13465 (grub_efi_stall): New prototype.
13466 (grub_efi_allocate_pages): Likewise.
13467 (grub_efi_free_pages): Likewise.
13468 (grub_efi_get_memory_map): Likewise.
13469 (grub_efi_mm_init): Likewise.
13470 (grub_efi_mm_fini): Likewise.
13471 (grub_efi_init): Likewise.
13472 (grub_efi_fini): Likewise.
13473
13474 * include/grub/i386/efi/time.h: Do not include
13475 grub/symbol.h. Include grub/efi/time.h.
13476 (GRUB_TICKS_PER_SECOND): Removed.
13477 (grub_get_rtc): Likewise.
13478
13479 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13480 Added padding. The EFI spec is buggy.
13481 (GRUB_EFI_BLACK): New macro.
13482 (GRUB_EFI_BLUE): Likewise.
13483 (GRUB_EFI_GREEN): Likewise.
13484 (GRUB_EFI_CYAN): Likewise.
13485 (GRUB_EFI_RED): Likewise.
13486 (GRUB_EFI_MAGENTA): Likewise.
13487 (GRUB_EFI_BROWN): Likewise.
13488 (GRUB_EFI_LIGHTGRAY): Likewise.
13489 (GRUB_EFI_BRIGHT): Likewise.
13490 (GRUB_EFI_DARKGRAY): Likewise.
13491 (GRUB_EFI_LIGHTBLUE): Likewise.
13492 (GRUB_EFI_LIGHTGREEN): Likewise.
13493 (GRUB_EFI_LIGHTCYAN): Likewise.
13494 (GRUB_EFI_LIGHTRED): Likewise.
13495 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13496 (GRUB_EFI_YELLOW): Likewise.
13497 (GRUB_EFI_WHITE): Likewise.
13498 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13499 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13500 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13501 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13502 (GRUB_EFI_BACKGROUND_RED): Likewise.
13503 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13504 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13505 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13506 (GRUB_EFI_TEXT_ATTR): Likewise.
13507
13508 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13509 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13510 (kernel_mod_HEADERS): Added efi/time.h.
13511
83709125 135122006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13513
13514 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13515 include/grub/efi/api.h, include/grub/efi/console_control.h,
13516 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13517 include/grub/i386/efi/time.h, kern/efi/efi.c,
13518 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13519 and util/i386/efi/grub-mkimage.c.
13520
13521 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13522
13523 * genmk.rb (PModule#rule): Do not export symbols if
13524 #{prefix}_EXPORTS is set to "no".
13525
13526 * conf/i386-efi.mk: New file.
13527 * conf/i386-efi.rmk: Likewise.
13528 * include/grub/efi/api.h: Likewise.
13529 * include/grub/efi/console_control.h: Likewise.
13530 * include/grub/efi/efi.h: Likewise.
13531 * include/grub/efi/pe32.h: Likewise.
13532 * include/grub/i386/efi/time.h: Likewise.
13533 * kern/efi/efi.c: Likewise.
13534 * kern/i386/efi/init.c: Likewise.
13535 * kern/i386/efi/startup.S: Likewise.
13536 * util/i386/efi/grub-mkimage.c: Likewise.
13537
135382006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 13539
13540 * include/grub/script.h: Include <grub/parser.h> and
13541 "grub_script.tab.h".
13542 (struct grub_lexer_param): New struct.
13543 (struct grub_parser_param): Likewise.
13544 (grub_script_create_arglist): Pass the state in an argument.
13545 (grub_script_add_arglist): Likewise.
13546 (grub_script_create_cmdline): Likewise.
13547 (grub_script_create_cmdblock): Likewise.
13548 (grub_script_create_cmdif): Likewise.
13549 (grub_script_create_cmdmenu): Likewise.
13550 (grub_script_add_cmd): Likewise.
13551 (grub_script_arg_add): Likewise.
13552 (grub_script_lexer_ref): Likewise.
13553 (grub_script_lexer_deref): Likewise.
13554 (grub_script_lexer_record_start): Likewise.
13555 (grub_script_lexer_record_stop): Likewise.
13556 (grub_script_mem_record): Likewise.
13557 (grub_script_mem_record_stop): Likewise.
13558 (grub_script_malloc): Likewise.
13559 (grub_script_yylex): Likewise.
13560 (grub_script_yyparse): Likewise.
13561 (grub_script_yyerror): Likewise.
13562 (grub_script_yylex): Likewise.
13563 (grub_script_lexer_init): Return the state.
13564
13565 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13566 (grub_script_lexer_done): Likewise.
13567 (grub_script_lexer_getline): Likewise.
13568 (grub_script_lexer_refs): Likewise.
13569 (script): Likewise.
13570 (newscript): Likewise.
13571 (record): Likewise.
13572 (recording): Likewise.
13573 (recordpos): Likewise.
13574 (recordlen): Likewise.
13575 (grub_script_lexer_init): Return the state instead of setting
13576 global variables.
13577 (grub_script_lexer_ref): Use the newly added argument for state
13578 instead of globals.
13579 (grub_script_lexer_deref): Likewise.
13580 (grub_script_lexer_record_start): Likewise.
13581 (grub_script_lexer_record_stop): Likewise.
13582 (recordchar): Likewise.
13583 (nextchar): Likewise.
13584 (grub_script_yylex2): Likewise.
13585 (grub_script_yylex): Likewise.
13586 (grub_script_yyerror): Likewise.
13587
13588 * normal/parser.y (func_mem): Removed variable.
13589 (menu_entry): Likewise.
13590 (err): Likewise.
13591 (%lex-param): New parser option.
13592 (%parse-param): Likewise.
13593 (script): Always return the AST.
13594 (argument): Pass the state around.
13595 (arguments): Likewise.
13596 (grubcmd): Likewise.
13597 (commands): Likewise.
13598 (function): Likewise.
13599 (menuentry): Likewise.
13600 (if_statement): Likewise.
13601 (if): Likewise.
13602
13603 * normal/script.c (grub_script_memused): Removed variable.
13604 (grub_script_parsed): Likewise.
13605 (grub_script_malloc): Added a state argument. Use that instead of
13606 global variables.
13607 (grub_script_mem_record): Likewise.
13608 (grub_script_mem_record_stop): Likewise.
13609 (grub_script_arg_add): Likewise.
13610 (grub_script_add_arglist): Likewise.
13611 (grub_script_create_cmdline): Likewise.
13612 (grub_script_create_cmdif): Likewise.
13613 (grub_script_create_cmdmenu): Likewise.
13614 (grub_script_add_cmd): Likewise.
13615 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 13616
e2a8c904 136172006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 13618
13619 * normal/command.c (grub_command_init): Remove the title command.
13620
13621 * normal/lexer.c (grub_script_yylex): Renamed from this...
13622 (grub_script_yylex2): ... to this.
13623 (grub_script_yylex): New function. Temporary
13624 introduced to filter some tokens.
13625 (grub_script_yyerror): Print a newline.
13626
13627 * normal/main.c (read_config_file): Output information about the
13628 lines that contain errors. Wait for a key after all lines have
13629 been processed. Don't return an empty menu.
13630
13631 * normal/parser.y (func_mem): Don't initialize.
13632 (menu_entry): Likewise.
13633 (err): New variable.
13634 (script): Don't return anything when an error was encountered.
13635 (ws, returns): Removed rules.
13636 (argument): Disabled concatenated variable support.
13637 (arguments): Remove explicit separators.
13638 (grubcmd): Likewise.
13639 (function): Likewise.
13640 (menuentry): Likewise.
13641 (if): Likewise.
13642 (commands): Likewise. Add error handling.
13643
13644 * normal/script.c (grub_script_create_cmdline): If
13645 `grub_script_parsed' is 0, assume the parser encountered an error.
13646
c9a86192 136472006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13648
13649 * configure.ac: Add support for EFI. Fix the typo
13650 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13651
70f3b243 136522006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13653
13654 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13655 foreign multibyte characters should be shown correctly.
13656
65f201ad 136572006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13658
13659 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13660 calculation.
13661 (read_config_file): Made it to close file before returning.
13662
b4b93674 136632006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13664
13665 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13666 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13667 video/i386/pc/vbefill.c.
13668
13669 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13670 video/i386/pc/vbefill.c.
13671
13672 * include/grub/video.h (grub_video_blit_format): New enum.
13673 (grub_video_mode_info): Added new member blit_format.
13674 (grub_video_get_blit_format): New function prototype.
13675
13676 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13677 function prototype.
13678 (grub_video_vbe_map_rgb): Likewise.
13679 (grub_video_vbe_unmap_color): Likewise.
13680
13681 * include/grub/i386/pc/vbeblit.h: New file.
13682
13683 * include/grub/i386/pc/vbefill.h: New file.
13684
13685 * video/video.c (grub_video_get_blit_format): New function.
13686 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13687 (grub_video_vbe_map_rgb): Likewise.
13688 (grub_video_vbe_unmap_color): Likewise.
13689
13690 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13691 optimized fills.
13692 (grub_video_vbe_blit_render_target): Changed to use more optimized
13693 blits.
13694 (grub_video_vbe_setup): Added detection for optimized settings.
13695 (grub_video_vbe_create_render_target): Likewise.
13696
13697 * video/i386/pc/vbeblit.c: New file.
13698
13699 * video/i386/pc/vbefill.c: New file.
13700
c2379b9c 137012006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13702
13703 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13704 here...
13705
13706 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13707 parsing to support both hex and dec ranges. If filename was missing
13708 show usage information.
13709
bd0d7896 137102006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13711
13712 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13713 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13714
13715 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13716 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13717 (video_mod_SOURCES): Added.
13718 (video_mod_CFLAGS): Likewise.
13719 (video_mod_LDFLAGS): Likewise.
13720 (gfxterm_mod_SOURCES): Likewise.
13721 (gfxterm_mod_CFLAGS): Likewise.
13722 (gfxterm_mod_LDFLAGS): Likewise.
13723 (videotest_mod_SOURCES): Likewise.
13724 (videotest_mod_CFLAGS): Likewise.
13725 (videotest_mod_LDFLAGS): Likewise.
13726 (vesafb_mod_SOURCES): Removed.
13727 (vesafb_mod_CFLAGS): Likewise.
13728 (vesafb_mod_LDFLAGS): Likewise.
13729 (vga_mod_SOURCES): Likewise.
13730 (vga_mod_CFLAGS): Likewise.
13731 (vga_mod_LDFLAGS): Likewise.
13732
13733 * commands/videotest.c: New file.
13734
13735 * font/manager.c (fill_with_default_glyph): Modified to use
13736 grub_font_glyph.
13737 (grub_font_get_glyph): Likewise.
13738 (fontmanager): Renamed from this...
13739 (font_manager): ... to this.
13740
13741 * include/grub/font.h (grub_font_glyph): Added new structure.
13742 (grub_font_get_glyph): Modified to use grub_font_glyph.
13743
13744 * include/grub/misc.h (grub_abs): Added as inline function.
13745
13746 * include/grub/video.h: New file.
13747
13748 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13749 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13750 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13751 (grub_vbe_get_controller_info): Renamed from this...
13752 (grub_vbe_bios_get_controller_info): ... to this.
13753 (grub_vbe_get_mode_info): Renamed from this...
13754 (grub_vbe_bios_get_mode_info): ... to this.
13755 (grub_vbe_set_mode): Renamed from this...
13756 (grub_vbe_bios_set_mode): ... to this.
13757 (grub_vbe_get_mode): Renamed from this...
13758 (grub_vbe_bios_get_mode): ... to this.
13759 (grub_vbe_set_memory_window): Renamed from this...
13760 (grub_vbe_bios_set_memory_window): ... to this.
13761 (grub_vbe_get_memory_window): Renamed from this...
13762 (grub_vbe_bios_get_memory_window): ... to this.
13763 (grub_vbe_set_scanline_length): Renamed from this...
13764 (grub_vbe_set_scanline_length): ... to this.
13765 (grub_vbe_get_scanline_length): Renamed from this...
13766 (grub_vbe_bios_get_scanline_length): ... to this.
13767 (grub_vbe_set_display_start): Renamed from this...
13768 (grub_vbe_bios_set_display_start): ... to this.
13769 (grub_vbe_get_display_start): Renamed from this...
13770 (grub_vbe_bios_get_display_start): ... to this.
13771 (grub_vbe_set_palette_data): Renamed from this...
13772 (grub_vbe_bios_set_palette_data): ... to this.
13773 (grub_vbe_set_pixel_rgb): Removed.
13774 (grub_vbe_set_pixel_index): Likewise.
13775
13776 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13777 from this...
13778 (grub_vbe_bios_get_controller_info): ... to this.
13779 (grub_vbe_get_mode_info): Renamed from this...
13780 (grub_vbe_bios_get_mode_info): ... to this.
13781 (grub_vbe_set_mode): Renamed from this...
13782 (grub_vbe_bios_set_mode): ... to this.
13783 (grub_vbe_get_mode): Renamed from this...
13784 (grub_vbe_bios_get_mode): ... to this.
13785 (grub_vbe_set_memory_window): Renamed from this...
13786 (grub_vbe_bios_set_memory_window): ... to this.
13787 (grub_vbe_get_memory_window): Renamed from this...
13788 (grub_vbe_bios_get_memory_window): ... to this.
13789 (grub_vbe_set_scanline_length): Renamed from this...
13790 (grub_vbe_set_scanline_length): ... to this.
13791 (grub_vbe_get_scanline_length): Renamed from this...
13792 (grub_vbe_bios_get_scanline_length): ... to this.
13793 (grub_vbe_set_display_start): Renamed from this...
13794 (grub_vbe_bios_set_display_start): ... to this.
13795 (grub_vbe_get_display_start): Renamed from this...
13796 (grub_vbe_bios_get_display_start): ... to this.
13797 (grub_vbe_set_palette_data): Renamed from this...
13798 (grub_vbe_bios_set_palette_data): ... to this.
13799 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13800 getting corrupted after calling it. Added more pushes and pops.
13801 (grub_vbe_bios_set_mode): Likewise.
13802 (grub_vbe_bios_get_mode): Likewise.
13803 (grub_vbe_bios_get_memory_window): Likewise.
13804 (grub_vbe_bios_set_scanline_length): Likewise.
13805 (grub_vbe_bios_get_scanline_length): Likewise.
13806 (grub_vbe_bios_get_display_start): Likewise.
13807 (grub_vbe_bios_set_palette_data): Likewise.
13808
13809 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13810 (cl_insert): Likewise.
13811 (cl_delete): Likewise.
13812
13813 * term/gfxterm.c: New file.
13814
13815 * term/i386/pc/vesafb.c: Removed file.
13816
13817 * video/video.c: New file.
13818
13819 * video/i386/pc/vbe.c (real2pm): Added new function.
13820 (grub_video_vbe_draw_pixel): Likewise.
13821 (grub_video_vbe_get_video_ptr): Likewise.
13822 (grub_video_vbe_get_pixel): Likewise
13823 (grub_video_vbe_init): Likewise.
13824 (grub_video_vbe_fini): Likewise.
13825 (grub_video_vbe_setup): Likewise.
13826 (grub_video_vbe_get_info): Likewise.
13827 (grub_video_vbe_set_palette): Likewise.
13828 (grub_video_vbe_get_palette): Likewise.
13829 (grub_video_vbe_set_viewport): Likewise.
13830 (grub_video_vbe_get_viewport): Likewise.
13831 (grub_video_vbe_map_color): Likewise.
13832 (grub_video_vbe_map_rgb): Likewise.
13833 (grub_video_vbe_map_rgba): Likewise.
13834 (grub_video_vbe_unmap_color): Likewise.
13835 (grub_video_vbe_fill_rect): Likewise.
13836 (grub_video_vbe_blit_glyph): Likewise.
13837 (grub_video_vbe_blit_bitmap): Likewise.
13838 (grub_video_vbe_blit_render_target): Likewise.
13839 (grub_video_vbe_scroll): Likewise.
13840 (grub_video_vbe_swap_buffers): Likewise.
13841 (grub_video_vbe_create_render_target): Likewise.
13842 (grub_video_vbe_delete_render_target): Likewise.
13843 (grub_video_vbe_set_active_render_target): Likewise.
13844 (grub_vbe_set_pixel_rgb): Remove function.
13845 (grub_vbe_set_pixel_index): Likewise.
13846 (index_color_mode): Remove static variable.
13847 (active_mode): Likewise.
13848 (framebuffer): Likewise.
13849 (bytes_per_scan_line): Likewise.
13850 (grub_video_vbe_adapter): Added new static variable.
13851 (framebuffer): Likewise.
13852 (render_target): Likewise.
13853 (initial_mode): Likewise.
13854 (mode_in_use): Likewise.
13855 (mode_list): Likewise.
13856
5f97350b 138572006-03-10 Marco Gerards <marco@gnu.org>
13858
13859 * configure.ac (AC_INIT): Bumped to 1.93.
13860
13861 * DISTLIST: Added `include/grub/hfs.h'.
13862
a3c5c6f8 138632006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13864
13865 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13866 18H, which might help the BIOS falling back to next boot media.
13867
6de53d26 138682006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13869
13870 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13871 Poe Chen <poe.poechen@gmail.com>.
13872
77c4a393 138732006-01-17 Marco Gerards <marco@gnu.org>
13874
13875 * include/grub/normal.h: Include <grub/script.h>.
13876 (grub_command_list): Removed struct.
13877 (grub_command_list_t): Removed type.
13878 (grub_menu_entry): Remove members `num' and `command_list'. Add
13879 members `commands' and `sourcecode'.
13880 * include/grub/script.h: Add inclusion guards.
13881 (grub_script_cmd_menuentry): New struct.
13882 (grub_script_execute_menuentry): New prototype.
13883 (grub_script_lexer_record_start): Likewise.
13884 (grub_script_lexer_record_stop): Likewise.
13885 * normal/execute.c (grub_script_execute_menuentry): New function.
13886 * normal/lexer.c (record, recording, recordpos, recordlen): New
13887 variables.
13888 (grub_script_lexer_record_start): New function.
13889 (grub_script_lexer_record_stop): Likewise.
13890 (recordchar): Likewise.
13891 (nextchar): Likewise.
13892 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13893 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13894 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13895 (current_menu): New variable.
13896 (free_menu): Mainly rewritten.
13897 (grub_normal_menu_addentry): New function.
13898 (read_config_file): Rewritten.
13899 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13900 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13901 the menu entry.
13902 (run): Mainly rewritten.
13903 * normal/parser.y (menu_entry): New variable.
13904 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13905 (menuentry): New rule.
13906 (command): Add `menuentry'.
13907 (if_statement): Allow additional returns before `fi'.
13908 * normal/script.c (grub_script_create_cmdmenu): New function.
13909
144f1f98 139102006-01-03 Marco Gerards <marco@gnu.org>
13911
13912 * INSTALL: GNU Bison is required.
13913 * configure.ac: Rewritten the test to detect Bison.
13914 * Makefile.in (YACC): New variable. Reported by Xun Sun
13915 <xun.sun.cn@gmail.com>.
13916
af4b2d89 139172006-01-03 Marco Gerards <marco@gnu.org>
13918
13919 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13920 the HFS+ filesystem to filesystem blocks.
13921 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13922 GCC warning is silenced.
13923
15643b71 139242006-01-03 Marco Gerards <marco@gnu.org>
13925
13926 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13927 read from disk from big endian to host byte order.
13928
00905879 139292006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13930
13931 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13932 documentation.
13933 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13934 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13935 embedded HFS+ filesystem.
13936 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13937 (grub_hfs_sblock): Move from here...
13938 * include/grub/hfs.h: To here... New file.
13939 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13940 documentation.
13941 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13942 New macros.
13943 (grub_hfsplus_volheader): Change type of member `magic' to
13944 `grub_uint16_t'.
13945 (grub_hfsplus_data): Add new member `embedded_offset'.
13946 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13947 returned block.
13948 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13949 Calculate the offset.
13950
8899bc3e 139512005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13952
13953 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13954 Removed.
13955 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13956
ae8c0277 139572005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13958
13959 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13960 ENV->NAME is NULL after allocating ENV->VALUE.
13961
07084456 139622005-12-25 Marco Gerards <marco@gnu.org>
13963
13964 * kern/env.c (grub_env_set): Rewritten the error handling code.
13965
4750f5f1 139662005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13967
13968 * geninit.sh: Made more robust, and more portable.
13969
50214199 139702005-12-25 Marco Gerards <marco@gnu.org>
13971
13972 Add support for Apple HFS+ filesystems.
f19dbdb7 13973
50214199 13974 * fs/hfsplus.c: New file.
13975
13976 * DISTLIST: Added `fs/hfsplus.c'.
13977
13978 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13979 (hfsplus_mod_SOURCES): New variable.
13980 (hfsplus_mod_CFLAGS): Likewise.
13981 (hfsplus_mod_LDFLAGS): Likewise.
13982 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13983 (grub_setup_SOURCES): Likewise.
13984 (grub_mkdevicemap_SOURCES): Likewise.
13985 (grub_emu_SOURCES): Likewise.
13986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13987
13988 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13989
13990 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13991
befaed6c 139922005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13993
13994 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13995 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13996 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13997 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13998 normal/lexer.c, normal/parser.y, normal/script.c, and
13999 partmap/gpt.c.
14000 Removed kern/sparc64/cache.c.
14001
14002 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14003 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14004 grub_emu_init.c.
14005
14006 * configure.ac (AC_INIT): Bumped to 1.92.
14007
6a124103 140082005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14009
14010 * kern/err.c (grub_error_push): Added new function to support error
14011 stacks.
14012 (grub_error_pop): Likewise.
14013 (grub_error_stack_items): New local variable to support error stacks.
14014 (grub_error_stack_pos): Likewise.
14015 (grub_error_stack_assert): Likewise.
14016 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14017 stack depth.
14018 (grub_print_error): Added support to print errors from error stack.
14019
14020 * include/grub/err.h (grub_error_push): Added function prototype.
14021 (grub_error_pop): Likewise.
14022
be973c1b 140232005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14024
14025 * configure.ac: Accept `powerpc64' as host_cpu.
14026 (amd64): Rename to `biarch32'.
14027
14028 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14029 non-cacheline-aligned addresses.
14030
14031 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14032 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14033 if `size' is non-zero.
14034
b04216ab 140352005-12-03 Marco Gerards <mgerards@xs4all.nl>
14036
14037 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14038 and `cd' to make sure the filename is not prefixed with a
14039 directory name.
14040 (pkgdata_MODULES): Add `gpt.mod'.
14041 (gpt_mod_SOURCES): New variable.
14042 (gpt_mod_CFLAGS): Likewise.
14043 (gpt_mod_LDFLAGS): Likewise.
14044
14045 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14046
14047 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14048 New macro.
14049
14050 * partmap/gpt.c: New file.
14051
14052 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14053 GPT partition map is detected.
14054
41730ed9 140552005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14056
14057 * commands/i386/pc/play.c: New file.
14058 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14059 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14060 macros.
f19dbdb7 14061
95dc3643 140622005-11-27 Marco Gerards <mgerards@xs4all.nl>
14063
14064 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14065 ((unused))' to silence gcc warning.
14066
1569ec51 140672005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14068
14069 * configure.ac: Correct `AC_PROG_YACC' test.
14070
9abde152 140712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14072
14073 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14074 check before installing files.
14075
44b83271 140762005-11-22 Mike Small <smallm@panix.com>
14077
14078 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14079 number regex so multidigit numbers are recognized correctly.
14080
140812005-11-22 Mike Small <smallm@panix.com>
14082
14083 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14084 debugging message before attempting to claim memory.
14085 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14086 multiple addresses in case of failure.
14087
9c12956b 140882005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14089
14090 * term/tparm.c (get_space): Remove empty `if' statement.
14091
14092 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14093
14094 * kern/parser.c (check_varstate): Rename `state' to 's'.
14095
aeaf81d9 140962005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14097
14098 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14099 variable definitions to the beginning of each function. Sort stack
14100 variables by size.
14101 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14102 `buf' argument to `char *'.
14103
79bbb63f 141042005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14105
14106 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14107 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14108 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 14109 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14110 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14111 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14112 configfile.mod, search.mod, gzio.mod and test.mod.
14113 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14114 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14115 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14116 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14117 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14118 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14119 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14120 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14121 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14122 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14123 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14124 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14125 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14126 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14127 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14128 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14129 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14130 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14131 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14132 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14133 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14134 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14135 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14136
14137 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14138 `grep --include'.
14139 (pkgdata_MODULES): Add test.mod.
14140
233b1628 141412005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14142
14143 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14144 appending to variables with "+=".
14145 (PModule): Use full pathname to generate *.lst filenames.
14146
14147 * Makefile.in: Fixed list rules moved from genmk.rb.
14148 (.DELETE_ON_ERROR): New special target.
14149 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14150
14151 * conf/i386-pc.rmk: Include conf/common.mk.
14152 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14153 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 14154 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14155 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14156 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14157 configfile.mod, search.mod, gzio.mod and test.mod.
14158 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14159 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14160 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14161 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14162 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14163 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14164 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14165 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14166 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14167 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14168 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14169 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14170 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14171 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14172 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14173 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14174 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14175 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14176 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14177 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14178 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14179 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14180 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14181 here...
14182 * conf/common.rmk: ... to here. New file.
14183
14184 * conf/common.mk: New file.
14185
16f820c8 141862005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14187
14188 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14189 (grub_script.tab.c): ... here.
14190
14191 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14192 (grub_script.tab.c): ... here.
14193
14194 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14195 (grub_script.tab.c): ... here.
14196
14197 * normal/command.c (grub_command_find): Fixed a memory leak of
14198 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14199
63ba1554 142002005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14201
14202 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14203 "@" which marks the start of a comment on ARM.
14204 (VARIABLE): Likewise.
14205
7f67dc13 142062005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14207
79bbb63f 14208 Add support for Linux/ADFS partition tables.
7f67dc13 14209
14210 * partmap/acorn.c: New file.
14211
14212 * include/grub/acorn_filecore.h: Likewise.
14213
14214 * DISTLIST: Added `partmap/acorn.c' and
14215 `include/grub/acorn_filecore.h'.
f19dbdb7 14216
7f67dc13 14217 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14218 `partmap/acorn.c'.
14219 (pkgdata_MODULES): Add `acorn.mod'.
14220 (acorn_mod_SOURCES): New variable.
14221 (acorn_mod_CFLAGS): Likewise.
14222
14223 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14224 `partmap/acorn.c'.
14225 (pkgdata_MODULES): Add `acorn.mod'.
14226 (acorn_mod_SOURCES): New variable.
14227 (acorn_mod_CFLAGS): Likewise.
14228
14229 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14230 (pkgdata_MODULES): Add `acorn.mod'.
14231 (acorn_mod_SOURCES): New variable.
14232 (acorn_mod_CFLAGS): Likewise.
14233 (acorn_mod_LDFLAGS): Likewise.
14234
14235 * include/types.h (grub_disk_addr_t): New typedef.
14236
6d099807 142372005-11-13 Marco Gerards <mgerards@xs4all.nl>
14238
14239 * geninit.sh: New file.
14240
14241 * geninitheader.sh: Likewise.
14242
14243 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14244 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14245 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14246 * commands/configfile.c (grub_configfile_init)
14247 (grub_configfile_fini): Likewise.
14248 * commands/default.c (grub_default_init, grub_default_fini):
14249 Likewise.
14250 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14251 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14252 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14253 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14254 Likewise.
14255 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14256 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14257 Likewise.
14258 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 14259 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 14260 Likewise.
14261 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14262 Likewise.
fe6b695a 14263 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 14264 Likewise.
14265 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14266 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14267 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14268 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14269 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14270 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14271 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14272 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14273 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14274 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14275 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14276 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14277 * partmap/amiga.c (grub_amiga_partition_map_init)
14278 (grub_amiga_partition_map_fini): Likewise.
14279 * partmap/apple.c (grub_apple_partition_map_init)
14280 (grub_apple_partition_map_fini): Likewise.
14281 * partmap/pc.c (grub_pc_partition_map_init)
14282 (grub_pc_partition_map_fini): Likewise.
14283 * partmap/sun.c (grub_sun_partition_map_init,
14284 grub_sun_partition_map_fini): Likewise.
14285 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14286 Likewise.
14287
14288 * util/grub-emu.c: Include <grub_modules_init.h>.
14289 (main): Don't initialize and de-initialize any modules directly,
14290 use `grub_init_all' and `grub_fini_all' instead.
14291
14292 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14293 `grub_vesafb_mod_init'.
14294 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14295 all users.
14296 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14297 `grub_vga_mod_init'. Updated all users.
14298 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 14299
6d099807 14300 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14301 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14302 rules.
14303
14304 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14305 Generate a function to initialize the module in utilities.
14306 Updated all callers.
14307 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14308 initialize the module in utilities. Updated all callers.
14309
9046bcf0 143102005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14311
14312 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14313 escape sequence and a literal ^L to clear the screen.
14314
14315 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14316 when returning from Open Firmware.
14317
d13ea639 143182005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14319
14320 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14321 (grub_ofconsole_height): Likewise.
14322 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14323 manually insert a '\n'.
14324 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14325 `grub_ofconsole_height'. Return early if these are already set.
14326
a8fcf206 143272005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14328
14329 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14330 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14331 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14332 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14333 and `normal/script.c'.
14334 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14335 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14336 (test_mod_SOURCES): New variable.
14337 (test_mod_CFLAGS): Likewise.
14338 (test_mod_LDFLAGS): Likewise.
14339 (pkgdata_MODULES): Add `test.mod'.
14340 (grub_script.tab.c): New rule.
14341 (grub_script.tab.h): Likewise.
14342
b6b32745 143432005-11-07 Marco Gerards <mgerards@xs4all.nl>
14344
14345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14346 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14347 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14348 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14349 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14350 (test_mod_SOURCES): New variable.
14351 (test_mod_CFLAGS): Likewise.
14352 (pkgdata_MODULES): Add `test.mod'.
14353 (grub_script.tab.c): New rule.
14354 (grub_script.tab.h): Likewise.
14355
daac212a 143562005-11-06 Marco Gerards <mgerards@xs4all.nl>
14357
14358 Add initial scripting support.
14359
14360 * commands/test.c: New file.
14361 * include/grub/script.h: Likewise.
14362 * normal/execute.c: Likewise.
14363 * normal/function.c: Likewise.
14364 * normal/lexer.c: Likewise.
14365 * normal/parser.y: Likewise.
14366 * normal/script.c: Likewise.
14367
14368 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 14369
daac212a 14370 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14371 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14372 `normal/function.c' and `normal/script.c'.
14373 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14374 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 14375 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14376 variables.
daac212a 14377 (pkgdata_MODULES): Add `test.mod'.
14378 (grub_script.tab.c): New rule.
14379 (grub_script.tab.h): Likewise.
14380
14381 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14382
14383 * include/grub/normal.h (grub_test_init): New prototype.
14384 (grub_test_fini): Likewise.
f19dbdb7 14385
daac212a 14386 * normal/command.c: Include <grub/script.h>.
14387 (grub_command_execute): Rewritten.
f19dbdb7 14388
daac212a 14389 * util/grub-emu.c (main): Call `grub_test_init' and
14390 `grub_test_fini'.
14391
77500b2b 143922005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14393
14394 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14395 to 0.
14396 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14397 there are no pending characters.
14398
e45deb9e 143992005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14400
14401 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14402 `grub_strndup' to drop device arguments. Replace unnecessary
14403 `grub_strndup' with `grub_strdup'.
14404
4ce32619 144052005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14406
14407 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14408 `debug' environment variable has been set.
14409
144102005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14411
4ce32619 14412 * Makefile.in (install-local): Use $(DATA).
14413 (uninstall): Likewise.
14414 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14415 (sbin_UTILITIES): ... to here.
14416 (sbin_SCRIPTS): New variable.
14417 (grub_install_SOURCES): New variable.
14418 * util/powerpc/ieee1275/grub-install.in: New file.
14419 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14420 variable.
14421 (add_segments): Call `grub_util_get_path'.
14422
25fe6f03 144232005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14424
14425 From Timothy Baldwin:
14426 * commands/ls.c (grub_ls_list_files): Close FILE with
14427 grub_file_close.
14428 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14429
04ccf3ec 144302005-10-24 Marco Gerards <mgerards@xs4all.nl>
14431
14432 * include/grub/parser.h: New file.
14433
14434 * kern/parser.c: Likewise.
14435
14436 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14437 (grub_setup_SOURCES): Likewise.
14438 (grub_probefs_SOURCES): Likewise.
14439 (grub_emu_SOURCES): Likewise.
14440 (kernel_img_HEADERS): Add `parser.h'.
14441
14442 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14443 (grub_emu_SOURCES): Add `kern/parser.c'.
14444 (grubof_SOURCES): Likewise.
14445
14446 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14447 (grubof_SOURCES): Add `kern/parser.c'.
14448
14449 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14450
14451 * kern/misc.c (grub_split_cmdline): Removed function.
14452
14453 * kern/rescue.c: Include <grub/parser.h>.
14454 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14455 of `grub_split_cmdline'.
14456
14457 * normal/command.c: Include <grub/parser.h>.
14458 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14459 of `grub_split_cmdline'.
14460
14461 * normal/completion.c: Include <grub/parser.h>.
14462 (cmdline_state): New variable.
14463 (iterate_dir): End the filename with a quote depending on the
14464 command line state.
14465 (get_state): new function.
14466 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14467 split the arguments and determine the current argument. When the
14468 argument string is not quoted, escape all spaces.
14469
6d8f4b0e 144702005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14471
14472 * normal/sparc64/setjmp.S: New file.
14473
15cf03ed 144742005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14475
14476 * include/grub/sparc64/libgcc.h: New file.
14477 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14478 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14479 normal/sparc64/setjmp.c.
14480
03e8661a 144812005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14482
14483 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14484 * kern/sparc64/cache.S: New file.
14485 * kern/sparc64/cache.c: Removed.
14486 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14487 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14488 -mtune=ultrasparc.
14489 (COMMON_LDFLAGS): Add -melf64_sparc.
14490 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14491 (grubof_SOURCES): Use cache.S instead of cache.c.
14492 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14493 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14494 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14495 commented though.
14496 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14497 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14498 (linux_mod_CFLAGS): Commented out.
14499 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14500 out because module isn't built.
14501 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14502 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14503 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14504 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14505 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14506 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14507 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14508 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14509 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14510 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14511 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14512 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14513 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14514 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14515
34eeec8a 145162005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14517
14518 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14519 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14520 longer, because HFS should not be used on PC.
14521
708367a3 145222005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14523
14524 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14525 consistently within the loop.
14526
6fa1251a 145272005-10-15 Marco Gerards <mgerards@xs4all.nl>
14528
14529 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14530 directory can not be read.
14531
4801580b 145322005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14533
14534 * configure.ac (AC_INIT): Increase the version number to 1.91.
14535
14536 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14537 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14538 term/i386/pc/serial.c.
14539
219ad426 145402005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14541
14542 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14543 file size must be permitted.
14544
14545 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14546 between %ah and %al.
14547
688e5699 145482005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14549
14550 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14551 grub_uint64_t.
14552 Call the hook with a NUL-terminated filename.
14553 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14554 grub_cpu_to_be32.
14555
14556 * kern/term.c (cursor_state): New variable.
14557 (grub_term_set_current): Reset the cursor state on a new
14558 terminal.
14559 (grub_setcursor): Rewritten to use CURSOR_STATE.
14560 (grub_getcursor): New function.
14561
14562 * include/grub/term.h (grub_getcursor): New prototype.
14563
14564 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14565 integers on ARM. Reported by Timothy Baldwin
14566 <T.E.Baldwin99@members.leeds.ac.uk>.
14567
bb34586c 145682005-10-11 Marco Gerards <mgerards@xs4all.nl>
14569
14570 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14571 allocated.
14572 (grub_sfs_dir): Likewise.
14573
9a909877 145742005-10-09 Marco Gerards <mgerards@xs4all.nl>
14575
14576 Add support for the SFS filesystem.
14577
14578 * fs/sfs.c: New file.
14579
14580 * DISTLIST: Added `fs/sfs.c'.
14581
14582 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14583 (grub_probefs_SOURCES): Likewise.
14584 (grub_emu_SOURCES): Likewise.
14585 (pkgdata_MODULES): Add `sfs.mod'.
14586 (sfs_mod_SOURCES): New variable.
14587 (sfs_mod_CFLAGS): Likewise.
14588 (sfs_mod_LDFLAGS): Likewise.
14589
14590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14591 (pkgdata_MODULES): Add `sfs.mod'.
14592 (sfs_mod_SOURCES): New variable.
14593 (sfs_mod_CFLAGS): Likewise.
14594
14595 * util/grub-emu.c (main): Call `grub_sfs_init' and
14596 `grub_sfs_fini'.
14597
14598 * include/grub/fs.h (grub_sfs_init): New prototype.
14599 (grub_sfs_fini): Likewise.
14600
57bdbde3 146012005-10-07 Marco Gerards <mgerards@xs4all.nl>
14602
14603 Add support for the AFFS filesystem.
14604
14605 * fs/affs.c: New file.
14606
14607 * DISTLIST: Added `fs/affs.c'.
14608
14609 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14610 (grub_probefs_SOURCES): Likewise.
14611 (grub_emu_SOURCES): Likewise.
14612 (pkgdata_MODULES): Add `affs.mod'.
14613 (affs_mod_SOURCES): New variable.
14614 (affs_mod_CFLAGS): Likewise.
14615 (affs_mod_LDFLAGS): Likewise.
14616
14617 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14618 (pkgdata_MODULES): Add `affs.mod'.
14619 (affs_mod_SOURCES): New variable.
14620 (affs_mod_CFLAGS): Likewise.
14621
14622 * util/grub-emu.c (main): Call `grub_affs_init' and
14623 `grub_affs_fini'.
14624
14625 * include/grub/fs.h (grub_affs_init): New prototype.
14626 (grub_affs_fini): Likewise.
14627
047b67e0 146282005-10-01 Marco Gerards <mgerards@xs4all.nl>
14629
14630 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14631
59b8208a 146322005-10-01 Marco Gerards <mgerards@xs4all.nl>
14633
14634 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14635 `-m32' to CFLAGS.
14636
14637 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14638 linking.
f19dbdb7 14639
59b8208a 14640 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14641 (COMMON_LDFLAGS): New variable.
14642 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14643 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14644 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14645 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14646 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14647 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14648 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14649 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14650 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14651 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14652 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14653 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14654 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14655 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14656 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14657 variables.
14658 (normal_mod_ASFLAGS): Add `-m32'.
14659
14660 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14661 (grub_host_size_t, grub_host_ssize_t): New types.
14662 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 14663 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 14664 `GRUB_HOST_SIZEOF_VOID_P'.
14665
14666 * include/grub/kernel.h (struct grub_module_header): Type of
14667 member offset changed to `grub_host_off_t'. Type of member size
14668 changed to `grub_host_size_t'.
14669 (struct grub_module_info): Type of member offset changed to
14670 `grub_host_off_t'. Type of member size changed to
14671 `grub_host_size_t'.
14672
b4093103 146732005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14674
14675 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 14676
b4093103 14677 * kern/i386/pc/startup.S (multiboot_header): New label.
14678 (multiboot_entry): Likewise.
14679 (multiboot_trampoline): Likewise.
14680
14681 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14682 Increased to 0x4A0.
14683
14684 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14685 put parentheses after a question mark.
14686 [!GRUB_UTIL] (my_mod): New variable.
14687
14688 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14689
b2499b29 146902005-09-28 Marco Gerards <mgerards@xs4all.nl>
14691
14692 Adds support for the XFS filesystem. Btrees are not supported
14693 yet.
14694
14695 * fs/xfs.c: New file.
14696
14697 * DISTLIST: Added `fs/xfs.c'.
14698
14699 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14700 (grub_probefs_SOURCES): Likewise.
14701 (grub_emu_SOURCES): Likewise.
14702 (pkgdata_MODULES): Add `xfs.mod'.
14703 (xfs_mod_SOURCES): New variable.
14704 (xfs_mod_CFLAGS): Likewise.
14705
14706 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14707 (pkgdata_MODULES): Add `xfs.mod'.
14708 (xfs_mod_SOURCES): New variable.
14709 (xfs_mod_CFLAGS): Likewise.
14710
14711 * util/grub-emu.c (main): Call `grub_xfs_init' and
14712 `grub_xfs_fini'.
14713
14714 * include/grub/fs.h (grub_xfs_init): New prototype.
14715 (grub_xfs_fini): Likewise.
14716
f19dbdb7 14717
83d37a62 147182005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14719
14720 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14721 color modes, allow greater than 16 colors to be configured as
14722 a default palette.
14723
47d2d65e 147242005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14725
14726 * normal/completion.c (complete_arguments): Add the qualifier
14727 const into OPTIONS.
14728
14729 From Omniflux <omniflux+lists@omniflux.com>:
14730 * include/grub/terminfo.h: New file.
14731 * include/grub/tparm.h: Likewise.
14732 * include/grub/i386/pc/serial.h: Likewise.
14733 * term/terminfo.c: Likewise.
14734 * term/tparm.c: Likewise.
14735 * term/i386/pc/serial.c: Likewise.
14736 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14737 serial.mod.
14738 (terminfo_mod_SOURCES): New variable.
14739 (terminfo_mod_CFLAGS): Likewise.
14740 (serial_mod_SOURCES): Likewise.
14741 (serial_mod_CFLAGS): Likewise.
14742
48b671ff 147432005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14744
14745 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14746 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14747 and kern/powerpc/ieee1275/cmain.c, respectively.
14748
14749 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14750 * kern/powerpc/ieee1275/crt0.S: ... here.
14751
14752 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14753 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 14754
48b671ff 14755 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14756 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14757 instead of boot/powerpc/ieee1275/crt0.S and
14758 boot/powerpc/ieee1275/cmain.c, respectively.
14759
14760 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14761 sectors. It was not used anyway.
14762
09fc77a7 147632005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14764
14765 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14766 `unused parameter' warning.
14767
003789c7 147682005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14769
14770 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14771 function.
14772 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14773 getcharwidth.
14774
67f44c86 147752005-08-28 Marco Gerards <metgerards@student.han.nl>
14776
14777 * include/grub/normal.h (enum grub_completion_type): Added
14778 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14779
14780 * normal/cmdline.c (print_completion): Handle
14781 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14782 * normal/menu_entry.c (store_completion): Likewise.
14783
14784 * normal/completion.c (complete_arguments): New function.
14785 (grub_normal_do_completion): Call `complete_arguments' when the
14786 current words start with a dash.
14787
0b5abe02 147882005-08-27 Marco Gerards <metgerards@student.han.nl>
14789
14790 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14791 `gzio.mod' instead of `io.mod').
14792
d9864ee1 147932005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14794
14795 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14796 (DISTDIRS): Added io and video.
14797 Rewrite the search routine to make an output consistently.
14798
14799 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14800 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14801 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14802 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14803 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14804 util/powerpc/ieee1275/misc.c.
f19dbdb7 14805
d9864ee1 14806 * include/grub/gzio.h: New file.
14807 * io/gzio.c: Likewise.
f19dbdb7 14808
d9864ee1 14809 * kern/file.c (grub_file_close): Call grub_device_close only if
14810 FILE->DEVICE is not NULL.
14811
14812 * include/grub/mm.h [!NULL] (NULL): New macro.
14813
14814 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14815
14816 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14817 (pkgdata_MODULES): Added gzio.mod.
14818 (gzio_mod_SOURCES): New variable.
14819 (gzio_mod_CFLAGS): Likewise.
14820
14821 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14822 (pkgdata_MODULES): Added gzio.mod.
14823 (gzio_mod_SOURCES): New variable.
14824 (gzio_mod_CFLAGS): Likewise.
14825
14826 * commands/cat.c: Include grub/gzio.h.
14827 (grub_cmd_cat): Use grub_gzfile_open instead of
14828 grub_file_open.
f19dbdb7 14829
d9864ee1 14830 * commands/cmp.c: Include grub/gzio.h.
14831 (grub_cmd_cmp): Use grub_gzfile_open instead of
14832 grub_file_open.
14833
14834 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14835 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14836 grub_file_open.
14837 (grub_rescue_cmd_module): Likewise.
14838
fa46f4b5 148392005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14840
14841 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14842 kern/sparc64/ieee1275/init.c because it contains _start.
14843 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14844
e9211b5d 148452005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14846
14847 * configure.ac: Add support for sparc64 host with ieee1275
14848 firmware.
14849 * configure: Generated from configure.ac.
14850 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14851 instead of int.
14852 (grub_ofdisk_read): Likewise.
14853 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14854 pointers as (void *) to remove a warning.
14855 (grub_ofdisk_close): Likewise.
14856 (grub_ofdisk_read): Likewise.
14857 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14858 returns, so make it return void to remove a warning.
14859 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14860 Corresponding prototype change.
14861 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14862 values, and cast the pointers as (void *) to remove a warning.
14863 (grub_mm_dump): Likewise.
14864 * conf/sparc64-ieee1275.mk: New file.
14865 * conf/sparc64-ieee1275.rmk: Likewise.
14866 * include/grub/sparc64/setjmp.h: Likewise.
14867 * include/grub/sparc64/types.h: Likewise.
14868 * include/grub/sparc64/ieee1275/console.h: Likewise.
14869 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14870 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14871 * include/grub/sparc64/ieee1275/time.h: Likewise.
14872 * kern/sparc64/cache.c: Likewise.
14873 * kern/sparc64/dl.c: Likewise.
14874 * kern/sparc64/ieee1275/init.c: Likewise.
14875 * kern/sparc64/ieee1275/openfw.c: Likewise.
14876
385c6a92 148772005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14878
14879 * util/console.c (grub_ncurses_putchar): If C is greater than
14880 0x7f, set C to a question mark.
14881 (grub_ncurses_getcharwidth): New function.
14882 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14883 getcharwidth.
14884
14885 * normal/menu.c (print_entry): Made aware of Unicode. First,
14886 convert TITLE to UCS-4, and predict the cursor position by
14887 grub_getcharwidth.
14888
14889 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14890 const to SRC.
14891 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14892
16ccb8b1 148932005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14894
14895 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14896 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14897 grub_strcat.
14898
14899 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14900 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14901 grub_strcpy and grub_strlen. Take it into account that a space
14902 character is inserted as a delimiter.
14903
6a85ce79 149042005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14905
14906 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14907 invalid magic in the error.
6a85ce79 14908
14909 * commands/search.c: New file.
f19dbdb7 14910
6a85ce79 14911 * util/grub-emu.c (main): Call grub_search_init and
14912 grub_search_fini.
14913
14914 * kern/rescue.c (grub_rescue_print_disks): Removed.
14915 (grub_rescue_print_devices): New function.
14916 (grub_rescue_cmd_ls): Use grub_device_iterate with
14917 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14918 grub_rescue_print_disks.
14919
14920 * kern/partition.c (grub_partition_iterate): Return the result of
14921 PARTMAP->ITERATE instead of GRUB_ERRNO.
14922
14923 * kern/device.c: Include grub/partition.h.
14924 (grub_device_iterate): New function.
14925
14926 * include/grub/partition.h (grub_partition_iterate): Return int
14927 instead of grub_err_t.
14928
14929 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14930 prototype.
14931 [GRUB_UTIL] (grub_search_fini): Likewise.
14932
14933 * include/grub/device.h (grub_device_iterate): New prototype.
14934
14935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14936 commands/search.c.
14937 (pkgdata_MODULES): Added search.mod.
14938 (search_mod_SOURCES): New variable.
14939 (search_mod_CFLAGS): Likewise.
14940
14941 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14942 (pkgdata_MODULES): Added search.mod.
14943 (search_mod_SOURCES): New variable.
14944 (search_mod_CFLAGS): Likewise.
14945
14946 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14947 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14948 All callers changed.
14949
14950 * DISTLIST: Added commands/search.c.
14951
ef095434 149522005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14953
14954 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14955 conversion.
14956 (grub_getcharwidth): New function.
14957
14958 * kern/misc.c (grub_utf8_to_ucs4): New function.
14959
14960 * include/grub/term.h (struct grub_term): Added a new member
14961 "getcharwidth".
14962 (grub_getcharwidth): New prototype.
14963
14964 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14965
14966 * term/i386/pc/console.c (map_char): New function. Segregated from
14967 grub_console_putchar.
14968 (grub_console_putchar): Use map_char.
14969 (grub_console_getcharwidth): New function.
14970 (grub_console_term): Specified grub_console_getcharwidth as
14971 getcharwidth.
14972
14973 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14974 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14975
14976 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14977 GRUB_ERRNO.
14978 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14979 on grub_strtoul completely.
14980 (write_char): Declare local variables in the beginning of the
14981 function.
14982 (grub_vesafb_getcharwidth): New function.
14983 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14984 getcharwidth.
14985
1f0a95e4 149862005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14987
14988 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14989 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14990 commands/i386/pc/vbetest.c.
14991
14992 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14993 call grub_vbe_get_controller_info again, because the returned
14994 information is volatile.
14995 (grub_vbe_set_video_mode): Mostly rewritten.
14996 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14997 grub_vbe_status_t correctly.
14998 (grub_vbe_get_video_mode_info): Likewise.
14999 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15000 several if statements.
15001
15002 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15003 * commands/i386/pc/vbeinfo.c: ... this.
15004
15005 * commands/i386/pc/vbe_test.c: Renamed to ...
15006 * commands/i386/pc/vbetest.c: ... this.
15007
15008 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15009 ...
15010 (grub_cmd_vbeinfo): ... this. Save video modes before
15011 iterating. Skip a video mode, if it is not available, not enough
15012 information is given or it is monochrome. Show the memory
15013 model. Leave the interpretation of MODEVAR to grub_strtoul
15014 completely.
15015 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15016 (GRUB_MOD_FINI): Likewise.
15017
15018 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15019 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15020 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15021 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15022 grub_strtoul completely.
15023 (real2pm): Removed.
15024 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15025 (GRUB_MOD_FINI): Likewise.
15026
15027 * normal/misc.c: Include grub/mm.h.
15028
15029 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15030 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15031 (vbe_list_modes_mod_SOURCES): Removed.
15032 (vbe_list_modes_mod_CFLAGS): Likewise.
15033 (vbe_test_mod_SOURCES): Likewise.
15034 (vbe_test_mod_CFLAGS): Likewise.
15035 (vbeinfo_mod_SOURCES): New variable.
15036 (vbeinfo_mod_CFLAGS): Likewise.
15037 (vbetest_mod_SOURCES): Likewise.
15038 (vbetest_mod_CFLAGS): Likewise.
15039
992ffbbe 150402005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15041
15042 * normal/misc.c: New file.
15043
15044 * DISTLIST: Added normal/misc.c.
f19dbdb7 15045
992ffbbe 15046 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15047 DISK to HOOK. Call HOOK with DISK.
15048 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15049 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15050 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15051
15052 * normal/menu_entry.c (struct screen): Added a new member
15053 "completion_shown".
15054 (completion_buffer): New global variable.
15055 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15056 (store_completion): New function.
15057 (complete): Likewise.
15058 (clear_completions): Likewise.
15059 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15060 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15061 a tab, call complete.
15062
15063 * normal/completion.c (disk_dev): Removed.
15064 (print_simple_completion): Likewise.
15065 (print_partition_completion): Likewise.
15066 (print_func): New global variable.
15067 (add_completion): Do not take the arguments WHAT or PRINT any
15068 longer. Added a new argument TYPE. Instead of printing directly,
15069 call PRINT_FUNC if not NULL.
15070 All callers changed.
15071 (complete_device): Use a local variable DEV instead of
15072 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15073 (grub_normal_do_completion): Take a new argument HOOK. Do not
15074 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15075 empty string, return NULL instead.
15076 All callers changed.
15077
15078 * normal/cmdline.c (print_completion): New function.
15079
15080 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15081 to HOOK.
15082 All callers changed.
15083
15084 * kern/disk.c (grub_print_partinfo): Removed.
15085
15086 * include/grub/partition.h (struct grub_partition_map): Add a new
15087 argument DISK into HOOK of ITERATE.
15088 (grub_partition_iterate): Add a new argument DISK to HOOK.
15089
15090 * include/grub/normal.h (enum grub_completion_type): New enum.
15091 (grub_completion_type_t): New type.
15092 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15093 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15094 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15095 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15096 (grub_normal_do_completion): Added a new argument HOOK.
15097 (grub_normal_print_device_info): New prototype.
15098
15099 * include/grub/disk.h (grub_print_partinfo): Removed.
15100
15101 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15102 (normal_mod_SOURCES): Likewise.
15103 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15104 (normal_mod_SOURCES): Likewise.
15105
15106 * commands/ls.c (grub_ls_list_disks): Use
15107 grub_normal_print_device_info instead of grub_print_partinfo. Free
15108 PNAME.
15109 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15110 duplicating the code.
15111
0bd41162 151122005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15113
15114 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 15115 follow GCS more precisely.
15116 * commands/i386/pc/vbe_test.c: Likewise.
15117 * include/grub/i386/pc/vbe.h: Likewise.
15118 * term/i386/pc/vesafb.c: Likewise.
15119 * video/i386/pc/vbe.c: Likewise.
0bd41162 15120
6323696a 151212005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15122
15123 * DISTLIST: Added term/i386/pc/vesafb.c
15124 DISTLIST: Added video/i386/pc/vbe.c
15125 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15126 DISTLIST: Added commands/i386/pc/vbe_test.c.
15127 * commands/i386/pc/vbe_list_modes.c: New file.
15128 * commands/i386/pc/vbe_test.c: Likewise.
15129 * term/i386/pc/vesafb.c: Likewise.
15130 * video/i386/pc/vbe.c: Likewise.
15131 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15132 (grub_vbe_probe) Added prototype.
15133 (grub_vbe_set_video_mode) Likewise.
15134 (grub_vbe_get_video_mode) Likewise.
15135 (grub_vbe_get_video_mode_info) Likewise.
15136 (grub_vbe_set_pixel_rgb) Likewise.
15137 (grub_vbe_set_pixel_index) Likewise.
15138 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15139 (pkgdata_MODULES): Added vesafb.mod.
15140 (pkgdata_MODULES): Added vbe_list_modes.mod.
15141 (pkgdata_MODULES): Added vbe_test.mod.
15142 (vbe_mod_SOURCES): Added.
15143 (vbe_mod_CFLAGS): Likewise.
15144 (vesafb_mod_SOURCES): Likewise.
15145 (vesafb_mod_CFLAGS): Likewise.
15146 (vbe_list_modes_mod_SOURCES): Likewise.
15147 (vbe_list_modes_mod_CFLAGS): Likewise.
15148 (vbe_test_mod_SOURCES): Likewise.
15149 (vbe_test_mod_CFLAGS): Likewise.
15150
0a74e62f 151512005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15152
0a74e62f 15153 * normal/command.c (grub_command_execute): If INTERACTIVE is
15154 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15155 CMDLINE. Disable the pager if INTERACTIVE is true.
15156 All callers are changed.
15157
15158 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15159 before reading a config file.
15160 * normal/main.c (read_config_file): Even if a command is not
15161 found, register it if it is within an entry.
15162
15163 * util/grub-emu.c: Include sys/types.h and unistd.h.
15164 (options): Added --hold.
15165 (struct arguments): Added a new member "hold".
15166 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15167 missing.
15168 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15169 cleared by a debugger, if it is not zero.
15170
15171 * include/grub/normal.h (grub_command_execute): Add an argument
15172 INTERACTIVE.
15173
e51f85ae 151742005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15175
15176 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15177
e9c6f39b 151782005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15179
15180 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15181 program with another one, because the old one didn't detect a bug
15182 in gcc-3.4. Always use regparm 2, because the new test is still
15183 not enough for gcc-4.0. Someone must investigate a simple test
15184 case which detects a bug in gcc-4.0.
15185
8de3495c 151862005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15187
15188 * DISTLIST: Added normal/completion.c.
15189
15190 * normal/completion.c: New file.
f19dbdb7 15191
8de3495c 15192 * term/i386/pc/console.c (grub_console_getwh): New function.
15193 (grub_console_term): Assign grub_console_getwh to getwh.
15194
15195 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15196 function is defined in normal/completion.c as
15197 grub_normal_do_completion.
15198 (grub_cmdline_get): Use grub_normal_do_completion instead of
15199 grub_tab_complete.
15200
15201 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15202 returns non-zero, otherwise return 0.
15203 (grub_partition_iterate): First, probe the partition map. Then,
15204 call ITERATE only for this partition map.
15205
15206 * kern/misc.c (grub_strncmp): Rewritten.
15207
15208 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15209 returns non-zero. Otherwise return 0.
15210
15211 * include/grub/partition.h (grub_partition_map_iterate): Return
15212 int instead of void.
15213
15214 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15215
15216 * include/grub/misc.h (grub_strncmp): Change the type of N to
15217 grub_size_t.
15218
15219 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15220 of void.
15221
15222 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 15223 unsigned explicitly before comparing it with I.
8de3495c 15224
15225 * kern/main.c (grub_env_write_root): Add the attribute unused into
15226 VAR.
15227
15228 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15229 normal/completion.c.
15230 (normal_mod_SOURCES): Likewise.
15231 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15232 (normal_mod_SOURCES): Likewise.
15233
15234 * normal/command.c (grub_iterate_commands): If ITERATE returns
15235 non-zero, return one immediately.
15236
e85e144b 152372005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15238
15239 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15240 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15241 descriptions.
15242 (grub_vbe_get_controller_info): New function.
15243 (grub_vbe_get_mode_info): Likewise.
15244 (grub_vbe_set_mode): Likewise.
15245 (grub_vbe_get_mode): Likewise.
15246 (grub_vbe_set_memory_window): Likewise.
15247 (grub_vbe_get_memory_window): Likewise.
15248 (grub_vbe_set_scanline_length): Likewise.
15249 (grub_vbe_get_scanline_length): Likewise.
15250 (grub_vbe_set_display_start): Likewise.
15251 (grub_vbe_get_display_start): Likewise.
15252 (grub_vbe_set_palette_data): Likewise.
15253 * include/grub/i386/pc/vbe.h: New file.
15254
c46153d2 152552005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15256
15257 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15258 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15259 * DISTLIST: Likewise.
15260 * kern/ieee1275/of.c: Moved to ...
15261 * kern/ieee1275/ieee1275.c: ... here.
15262
0cb90c45 152632005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15264
15265 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15266 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15267 Pass 0 as `end' parameter to grub_strtoul().
15268
a19fb360 152692005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15270
15271 * include/grub/powerpc/ieee1275/console.h: Do not include
15272 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15273 ifdef.
15274 (grub_console_cur_color): Remove i386-specific prototype.
15275 (grub_console_real_putchar): Likewise.
15276 (grub_console_checkkey): Likewise.
15277 (grub_console_getkey): Likewise.
15278 (grub_console_getxy): Likewise.
15279 (grub_console_gotoxy): Likewise.
15280 (grub_console_cls): Likewise.
15281 (grub_console_setcursor): Likewise.
15282 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15283 Include <grub/machine/console.h>.
15284 * term/ieee1275/ofconsole.c: Likewise.
15285
4ac9bd04 152862005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15287
15288 * Makefile.in (LIBLZO): New variable.
15289
15290 * configure.ac: Check for LZO version 2.
15291
15292 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15293 lzo/lzo1x.h instead of lzo1x.h.
15294
15295 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15296 of -llzo.
15297
15298 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15299 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15300
15301 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15302 copying the data from PARTITION to P.
15303
f4917dfd 153042005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15305
15306 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15307 negative, unload the module.
15308
15309 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15310 map is "pc_partition_map" but not "pc".
15311 (usage): Fix the description. The options are --boot-image and
15312 --core-image but not --boot-file or --core-file.
15313 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15314 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15315 DEFAULT_DIRECTORY.
15316
15317 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15318 --core-file. Specify INSTALL_DEVICE as an argument.
15319
15320 * util/console.c: Include config.h.
15321 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15322 [HAVE_NCURSES_H]: Include ncurses.h.
15323 [HAVE_CURSES_H]: Include curses.h.
15324 [!A_NORMAL] (A_NORMAL): Defined as zero.
15325 [!A_STANDOUT] (A_STANDOUT): Likewise.
15326
15327 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15328 -lncurses.
15329 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15330
15331 * configure.ac: Check for curses libraries and headers.
15332
15333 * Makefile.in (LIBCURSES): New variable.
15334
15335 * genmk.rb (Script::rule): Set the executable bits.
15336
15337 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15338 name of the PC partition map is "pc_partition_map" but not "pc".
15339
0e143073 153402005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15341
15342 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15343 (modules): Likewise.
15344 (usage): Added descriptions for --modules and --grub-probefs.
15345 Handle --modules and --grub-probefs. Save the arguments in MODULES
15346 and GRUB_PROBEFS, respectively.
15347 Auto-detect a filesystem module against GRUBDIR. If the result is
15348 empty and modules are not specified explicitly, abort the
15349 installation. Add the result to MODULES.
15350
15351 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15352 disk/powerpc/ieee1275/ofdisk.c,
15353 include/grub/powerpc/ieee1275/init.h and
15354 term/powerpc/ieee1275/ofconsole.c.
15355 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15356 term/ieee1275/ofconsole.c.
15357
15358 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15359
15360 * COPYING: Upgraded to the latest version. Only the address of the
15361 FSF office has changed.
f19dbdb7 15362
efd6e6d5 153632005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15364
15365 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15366 kern/ieee1275.c with kern/ieee1275/of.c.
15367
15368 * kern/ieee1275.c: Moved to ...
15369 * kern/ieee1275/of.c: ... here.
15370
8ceafda2 153712005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15372
15373 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 15374 readability.
8ceafda2 15375
15376 * config.guess: Updated to the latest version from gnulib.
15377 * config.sub: Likewise.
15378 * install.sh: Likewise.
15379 * mkinstalldirs: Likewise.
15380
15381 * include/grub/console.h: Removed. This file is arch-specific. Do
15382 not put this in include/grub.
15383
15384 * include/grub/i386/pc/console.h: Resurrected.
15385
15386 * util/console.c: Include grub/machine/console.h instead of
15387 grub/console.h.
15388 * util/grub-emu.c: Likewise.
15389
267f6cd9 153902005-08-04 Marco Gerards <metgerards@student.han.nl>
15391
15392 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15393 hardcoded value.
f19dbdb7 15394
267f6cd9 15395 From Vincent Pelletier <subdino2004@yahoo.fr>
15396 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15397 Redefined to use grub_getwh.
15398 (grub_term): New member named getwh.
15399 (grub_getwh): New prototype.
15400 * kern/term.c (grub_getwh): New function.
15401 * term/i386/pc/console.c (grub_console_getwh): New function.
15402 (grub_console_term): New member `getwh'.
15403 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15404 (grub_vga_term): New member `getwh'.
0b5abe02 15405 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 15406 grub_ssize_t.
15407 (grub_ofconsole_getw): New function.
15408 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15409 (grub_ofconsole_term): New field named getwh and new initial
15410 value.
15411
3be7266d 154122005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15413
15414 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15415 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15416 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15417 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15418 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15419 of <grub/machine/ieee1275.h>.
15420 * commands/ieee1275/reboot.c: Likewise.
15421 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15422 * kern/ieee1275.c: ... to here. All users updated. Change all
15423 parameter structs to use new type `grub_ieee1275_cell_t'.
15424 * term/powerpc/ieee1275/ofconsole.c: Move ...
15425 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15426 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15427 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15428 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15429 to return int.
15430 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15431 Remove unused prototypes. All users updated.
15432 * include/grub/powerpc/ieee1275/console.h: Removed.
15433 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15434 `grub_ieee1275_cell_t'.
15435 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15436 Cast comparisons with -1 to the correct type.
15437 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15438 type to match `grub_ieee1275_entry_fn'.
15439
8b5f3938 154402005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15441
15442 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15443
15444 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15445 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15446 partmap/sun.c.
15447 (grub_probefs_SOURCES): New variable.
15448
15449 * util/i386/pc/grub-probefs.c: New file.
15450
15451 * util/i386/pc/grub-setup.c (main): Call
15452 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15453 grub_hfs_init and grub_jfs_init to initialize the system. Call
15454 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15455 grub_pc_partition_map_fini to finish the system.
15456
ea409713 154572005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15458
15459 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15460 function.
15461 (grub_multiboot_load_elf32): Likewise.
15462 (grub_multiboot_is_elf64): Likewise.
15463 (grub_multiboot_load_elf64): Likewise.
15464 (grub_multiboot_load_elf): Likewise.
15465 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15466 an ELF32 or ELF64 file.
15467 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15468
15469 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15470 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15471 NULL before calling FS->LABEL.
15472 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15473 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15474 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15475 before calling FS->LABEL.
15476
141a288b 154772005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15478
15479 * util/i386/pc/grub-install.in (datadir): New variable.
15480 (libdir): Removed.
15481 (pkgdatadir): New variable.
15482 (pkglibdir): Removed.
15483
0d5f8a54 154842005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15485
15486 * DISTLIST: Added util/i386/pc/grub-install.in.
15487
15488 * util/i386/pc/grub-install.in: New file.
15489
15490 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15491 (grub_install_SOURCES): Likewise.
15492
15493 * genmk.rb: Added support for scripts.
15494 (Script): New class.
15495 (scripts): New variable.
15496
15497 * Makefile.in (install-local): Install sbin_SCRIPTS by
15498 INSTALL_SCRIPT.
15499 (uninstall): Remove sbin_SCRIPTS.
15500
15501 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15502 device, try to get a GRUB device by
15503 grub_util_biosdisk_get_grub_dev.
15504 Free DEST_DEV.
15505
15506 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15507 description for --device-map.
15508
5f968e1e 155092005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15510
15511 Change the semantics of variable hooks. They now return strings
15512 instead of error values.
f19dbdb7 15513
5f968e1e 15514 * util/i386/pc/grub-setup.c: Include grub/env.h.
15515 (setup): Use grub_device_set_root instead of grub_env_set.
15516
15517 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15518 grub_env_get instead of grub_device_set_root and
15519 grub_device_get_root, respectively.
15520
15521 * kern/main.c (grub_env_write_root): New function.
15522 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15523 grub_env_set instead of grub_device_set_root.
15524
15525 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15526 many variables.
15527 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15528 rather than calling ENV->WRITE_HOOK afterwards.
15529 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15530 passing a pointer of a pointer.
15531 (grub_register_variable_hook): Change the types of "read_hook" and
15532 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15533 respectively.
15534 Allocate the default empty string on the heap, because this string
15535 may be freed later.
15536
15537 * kern/device.c: Include grub/env.h.
15538 (grub_device_set_root): Removed.
15539 (grub_device_get_root): Likewise.
15540 (grub_device_open): Use grub_env_get instead of
15541 grub_device_get_root.
15542
15543 * include/grub/env.h (grub_env_read_hook_t): New type.
15544 (grub_env_write_hook_t): Likewise.
15545 (grub_env_var): Change the types of "read_hook" and "write_hook"
15546 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15547 (grub_register_variable_hook): Likewise.
15548
15549 * include/grub/device.h (grub_device_set_root): Removed.
15550 (grub_device_set_root): Likewise.
15551
15552 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15553 make sure that DIRNAME terminates with '/', so that
15554 grub_fat_find_dir will fail if PATH is not a directory.
15555
15556 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15557 from DIRNAME.
15558 Use the qualifier auto for print_files and print_files_long.
15559 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15560 as a regular file.
15561 Put a newline only if there is no error.
15562 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15563 used.
15564
896f0afd 155652005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15566
15567 * kern/partition.c (grub_partition_probe): Initialize PART to
15568 NULL. Otherwise, when no partition map is registered, this returns
15569 a garbage.
15570
b28b81b2 155712005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15572
15573 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15574 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15575 valid.
15576
5f3607e0 155772005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15578
15579 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15580 information on each device, if it does not have partitions. Print
15581 "Device" instead of "Disk", because this function is not specific
15582 to disk devices.
15583
15584 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15585 static to ensure that it is put on the memory rather than a
15586 register.
15587
502c87e8 155882005-07-17 Yoshinori Okuji <okuji@enbug.org>
15589
15590 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15591 (grub_cat_init): Likewise.
15592 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15593 (options): Likewise.
15594 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15595 (grub_configfile_init): Likewise.
15596 * font/manager.c (GRUB_MOD_INIT): Likewise.
15597 * commands/help.c (GRUB_MOD_INIT): Likewise.
15598 (grub_help_init): Likewise.
15599 * normal/command.c (grub_command_init): Likewise.
15600 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15601 * disk/loopback.c (grub_loop_init): Likewise.
15602 (GRUB_MOD_INIT): Likewise.
15603 * commands/ls.c (grub_ls_init): Likewise.
15604 (GRUB_MOD_INIT): Likewise.
15605 (options): Likewise.
15606 * commands/boot.c (grub_boot_init): Likewise.
15607 (GRUB_MOD_INIT): Likewise.
15608 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15609 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15610 (GRUB_MOD_INIT): Likewise.
15611 * commands/cmp.c (grub_cmp_init): Likewise.
15612 (GRUB_MOD_INIT): Likewise.
15613
15614 * normal/arg.c: Use <> instead of "" to include header files.
15615 (SHORT_ARG_HELP): New macro.
15616 (SHORT_ARG_USAGE): Likewise.
15617 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15618 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15619 descriptions.
15620 (find_short): Check if C is 'h' or 'u' explicitly.
15621 (grub_arg_show_help): Use space characters instead of tabs. Treat
15622 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15623 are shown with --help and --usage only if they are not used for
15624 the command itself.
15625 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15626 'h' and 'u'.
15627
15628 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15629 const into "longarg". Change the type of "shortarg" to int.
15630
f806d18e 156312005-07-17 Yoshinori Okuji <okuji@enbug.org>
15632
15633 * boot/i386/pc/boot.S (boot_drive_check): New label.
15634
15635 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15636 macro.
15637
15638 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15639 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15640
e293232b 156412005-07-17 Yoshinori Okuji <okuji@enbug.org>
15642
15643 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15644 When turning off Gate A20, skip the check and return immediately,
15645 because this is not fatal usually.
15646
ebedfd00 156472005-07-17 Yoshinori Okuji <okuji@enbug.org>
15648
15649 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15650 be 0x7C00 instead of 0x8000.
15651
15652 * boot/i386/pc/pxeboot.S: Rewritten.
15653
15654 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15655 EXT_C.
15656 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15657 result.
15658
654fc59f 156592005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15660
15661 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15662 robustness. This routine now supports a BIOS call and System
15663 Control Port A to modify the gate A20.
15664
15665 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15666 Increased to 0x440.
15667
09f9923f 156682005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15669
15670 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15671 device path and resulting ihandle.
15672 (grub_ofdisk_close): dprintf the ihandle being closed.
15673 (grub_ofdisk_read): dprintf function parameters.
15674 * kern/mm.c (grub_mm_init_region): Likewise.
15675 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15676 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15677 size, and boot arguments.
15678 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15679 before loading into memory.
15680 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15681 before loading into memory.
15682
7ef504d8 156832005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15684
15685 * kern/mm.c: Added much documentation.
15686 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15687 8, set to 5 instead of 8.
15688
e0f050c2 156892005-07-10 Yoshinori Okuji <okuji@enbug.org>
15690
15691 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15692
15693 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15694 (grub_mkdevicemap_SOURCES): New variable.
15695
15696 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15697 lib/device.c of GRUB Legacy.
15698
7224189a 156992005-07-10 Yoshinori Okuji <okuji@enbug.org>
15700
15701 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15702 instead of PATH is NULL.
15703
68c864eb 157042005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15705
15706 * commands/cmp.c (BUFFER_SIZE): New macro.
15707 (grub_cmd_cmp): Close the right file at the right time. Compare
15708 only data just read. Don't report files of different size as
15709 identical. Dynamically allocate buffers. Move variable
15710 declarations at the beginning of function.
15711
e6f3e614 157122005-07-09 Yoshinori Okuji <okuji@enbug.org>
15713
15714 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15715 reverse.
15716
f8f1559a 157172004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15718
15719 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15720 when backspace is pressed at beginning of line.
15721
39c9d41d 157222005-07-03 Yoshinori Okuji <okuji@enbug.org>
15723
15724 * DISTLIST: Added genfslist.sh.
15725
15726 * normal/main.c (fs_module_list): New variable.
15727 (autoload_fs_module): New function.
15728 (read_fs_list): Likewise.
15729 (grub_normal_execute): Call read_fs_list.
15730
15731 * kern/fs.c (grub_fs_autoload_hook): New variable.
15732 (grub_fs_probe): Added support for auto-loading.
15733
15734 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15735 (grub_fs_module_list_t): New type.
15736
15737 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15738 (grub_fs_autoload_hook): New prototype.
15739
15740 * genfslist.sh: New file.
f19dbdb7 15741
39c9d41d 15742 * genmk.rb: Added a rule to generate a filesystem list.
15743
121c1d83 157442005-06-30 Marco Gerards <metgerards@student.han.nl>
15745
15746 * configure.ac: Fix the test for cross-compiling.
15747
15748 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15749 define GRUB_UTIL anymore.
15750
15751 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15752 so this function works on other systems than just big endian.
15753 (load_modules): Likewise.
15754 (add_segments): Likewise.
15755
e75d76e1 157562005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15757
15758 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15759 contains `l' modifier, get a long from va_arg().
15760
50b5a0a7 157612005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15762
15763 * kern/mm.c (grub_free): If the next free block which is being
15764 merged is the first free block, set the first block to the block
15765 being freed.
15766 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15767
89371b20 157682005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15769
15770 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15771 `grub_ieee1275_chosen'.
15772
168d6e58 157732005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15774
15775 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15776 (grub_ieee1275_chosen): New variable.
15777 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15778 `chosen'.
15779 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15780 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15781 Rename first argument to `phandle' for consistency.
15782 (grub_ieee1275_get_property_length): Likewise.
15783 (grub_ieee1275_next_property): Likewise. Change type of first argument
15784 to grub_ieee1275_phandle_t.
15785 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15786 Move export next to declaration.
15787 (grub_ieee1275_chosen): New variable.
15788 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15789 Correct cosmetic typo.
15790 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15791 `grub_ieee1275_chosen'.
15792 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15793 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15794 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15795 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15796 `grub_ieee1275_chosen'.
15797
ca5baa3f 157982005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15799
15800 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15801 /chosen/bootargs.
15802 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15803 /chosen/bootargs as "variable=value" pairs.
15804
708b345f 158052005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15806
15807 * include/grub/misc.h (grub_dprintf): New macro.
15808 (grub_real_dprintf): New prototype.
15809 (grub_strword): Likewise.
15810 (grub_iswordseparator): Likewise.
15811 * kern/misc.c (grub_real_dprintf): New function.
15812 (grub_strword): Likewise.
15813 (grub_iswordseparator): Likewise.
15814
f4c5e67c 158152005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15816
15817 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15818 (roundup): Remove macro.
15819 (grub_ieee1275_flags): Make static.
15820 (grub_ieee1275_realmode): Remove.
15821 (grub_ieee1275_test_flag): New function.
15822 (grub_ieee1275_set_flag): Likewise.
15823 (find_options): Rename to `grub_ieee1275_find_options'; update
15824 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15825 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15826 (cmain): New prototype.
15827 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15828 `grub_ieee1275_flags' directly.
15829 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15830 machine/biosdisk.h.
15831 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15832 Don't include grub/machine/init.h.
15833 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15834 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15835 Remove prototype.
15836 (grub_ieee1275_realmode): Likewise.
15837 (grub_ieee1275_flag): New enum.
15838 (grub_ieee1275_test_flag): New prototype.
15839 (grub_ieee1275_set_flag): New prototype.
15840 * include/grub/powerpc/ieee1275/init.h: Remove file.
15841 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15842 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15843 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15844 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15845 comment.
15846 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15847 `grub_ieee1275_test_flag'.
15848 (grub_ieee1275_encode_devname): Likewise.
15849
ed16607e 158502005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15851
15852 * include/grub/powerpc/ieee1275/ieee1275.h
15853 (grub_ieee1275_encode_devname): New prototype.
15854 (grub_ieee1275_get_filename): Likewise.
15855 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15856 function.
15857 (grub_set_prefix): Likewise.
15858 (grub_machine_init): Call grub_set_prefix.
15859 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15860 (grub_parse_type): New enum.
15861 (grub_ieee1275_get_devargs): New function.
15862 (grub_ieee1275_get_devname): Likewise.
15863 (grub_ieee1275_parse_args): Likewise.
15864 (grub_ieee1275_get_filename): Likewise.
15865 (grub_ieee1275_encode_devname): Likewise.
15866
be369920 158672005-03-30 Marco Gerards <metgerards@student.han.nl>
15868
15869 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15870 `grub_loader_unset'.
15871
a5ce3a4a 158722005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15873
15874 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15875 instead of grub_ieee1275_interpret.
15876 (grub_halt_init): New function.
15877 (grub_halt_fini): Likewise.
15878 (GRUB_MOD_INIT): Correct message grammar.
15879 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15880 instead of grub_ieee1275_interpret.
15881 (grub_reboot_init): New function.
15882 (grub_reboot_fini): Likewise.
15883 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15884 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15885 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15886 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15887 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15888 function.
15889 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15890 Add prototype.
15891 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15892 prototype.
15893 (grub_halt): Likewise.
15894 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15895 (cmain): Remove __attribute__((unused)).
15896 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15897 (grub_heap_len): Likewise.
15898 (grub_machine_fini): New function.
15899 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15900 (grub_halt): Likewise.
15901 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15902 function.
15903 * util/powerpc/ieee1275/misc.c: New file.
15904
0058f771 159052005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15906
15907 * DISTLIST: New file.
15908 * gendistlist.sh: Likewise.
f19dbdb7 15909
0058f771 15910 * Makefile.in (COMMON_DISTFILES): Removed.
15911 (BOOT_DISTFILES): Likewise.
15912 (CONF_DISTFILES): Likewise.
15913 (DISK_DISTFILES): Likewise.
15914 (FS_DISTFILES): Likewise.
15915 (INCLUDE_DISTFILES): Likewise.
15916 (KERN_DISTFILES): Likewise.
15917 (LOADER_DISTFILES): Likewise.
15918 (TERM_DISTFILES): Likewise.
15919 (UTIL_DISTFILES): Likewise.
15920 (DISTFILES): Likewise.
15921 (uninstall): Uninstall files in $(pkgdata_DATA).
15922 (DISTLIST): New target.
15923 (distdir): Use the contents of the file DISTLIST to get a list of
15924 distributed files.
15925
46b3b8a5 159262005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15927
15928 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15929 descriptor. This is ported from GRUB Legacy.
15930
15931 * gencmdlist.sh: Added an extra semicolon to make it work with
15932 old sed versions. Reported by Robert Bihlmeyer
15933 <robbe@orcus.priv.at>.
15934
5822ff87 159352005-03-08 Yoshinori Okuji <okuji@enbug.org>
15936
15937 Automatic loading of commands is supported.
f19dbdb7 15938
5822ff87 15939 * normal/main.c (read_command_list): New function.
15940 (grub_normal_execute): Call read_command_list.
15941
15942 * normal/command.c (grub_register_command): Return zero or CMD.
15943 Allocate CMD->NAME from the heap.
15944 Initialize CMD->MODULE_NAME to zero.
15945 Find the same name as well. If the same command is found and it is
15946 a dummy command, overwrite members. If it is not a dummy command,
15947 return zero.
15948 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15949 (grub_command_find): If a dummy command is found, load a module
15950 and retry to find a command only once.
15951
15952 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15953 make sure that each command is loaded.
15954
15955 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15956 macro.
15957 (struct grub_command): Remove const from the member `name'.
15958 Add a new member `module_name'.
15959 (grub_register_command): Return grub_command_t.
15960
15961 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15962 sure that each command is loaded.
15963
15964 * genmk.rb (PModule::rule): Specify a module name without the
15965 suffix ".mod" to gencmdlist.sh.
15966
7b1f4b57 159672005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15968
15969 * gencmdlist.sh: New file.
f19dbdb7 15970
7b1f4b57 15971 * genmk.rb (PModule::rule): Generate a rule for a command list.
15972 Clean command.lst.
15973 Generate command.lst from $(COMMANDFILES).
15974
15975 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15976 (DATA): Added $(pkgdata_DATA).
15977 (install-local): Install files in $(pkgdata_DATA).
15978
062aaf39 159792005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15980
15981 * term/i386/pc/vga.c (debug_command): Removed.
15982 (GRUB_MOD_INIT): Do not register the command "debug".
15983
15984 From Hollis Blanchard:
15985 * commands/configfile.c: New file.
15986 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15987 commands/configfile.c.
15988 (pkgdata_MODULES): Added configfile.mod.
15989 (configfile_mod_SOURCES): New variable.
15990 (configfile_mod_CFLAGS): Likewise.
15991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15992 commands/configfile.c.
15993 (pkgdata_MODULES): Added configfile.mod.
15994 (configfile_mod_SOURCES): New variable.
15995 (configfile_mod_CFLAGS): Likewise.
15996 * util/grub-emu.c (main): Call grub_configfile_init and
15997 grub_configfile_fini.
15998 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15999 prototype.
16000 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 16001
cee01aa6 160022005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16003
16004 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16005 address.
16006
16007 * commands/help.c (grub_cmd_help): Do not print newlines after
16008 the last command in print_command_help.
16009
93f3a1d8 160102005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16011
16012 * commands/default.h: New file.
16013 * commands/timeout.h: Likewise.
16014 * normal/context.c: Likewise.
f19dbdb7 16015
93f3a1d8 16016 * util/misc.c: Do not include sys/times.h.
16017 Include sys/time.h and grub/machine/time.h.
16018 (grub_get_rtc): Rewritten with gettimeofday.
16019
16020 * util/grub-emu.c (main): Call grub_default_init and
16021 grub_timeout_init before grub_normal_init, and call
16022 grub_timeout_fini and grub_default_fini after grub_main.
16023
16024 * util/console.c (grub_ncurses_checkkey): Return the read
16025 character or -1.
16026
16027 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16028 timeouts.
16029
16030 * normal/main.c (read_config_file): Push MENU. If this fails,
16031 print an error and wait for a user input.
16032 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16033 If a menu is empty or an error occurs, pop MENU.
16034 (grub_normal_execute): Pop and free MENU after grub_menu_run
16035 returns.
16036
16037 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16038
16039 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16040 include time.h.
16041 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16042 without GRUB_UTIL.
16043 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16044 time.h.
16045 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16046 without GRUB_UTIL.
16047
16048 * include/grub/normal.h (struct grub_menu_list): New struct.
16049 (grub_menu_list_t): New type.
16050 (struct grub_context): New struct.
16051 (grub_context_t): New type.
16052 (grub_register_command): Got rid of EXPORT_FUNC.
16053 (grub_unregister_command): Likewise.
16054 (grub_context_get): New prototype.
16055 (grub_context_get_current_menu): Likewise.
16056 (grub_context_push_menu): Likewise.
16057 (grub_context_pop_menu): Likewise.
16058 [GRUB_UTIL] (grub_default_init): Likewise.
16059 [GRUB_UTIL] (grub_default_fini): Likewise.
16060 [GRUB_UTIL] (grub_timeout_init): Likewise.
16061 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16062
16063 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16064 commands/timeout.c and normal/context.c.
16065 (pkgdata_MODULES): Added default.mod and timeout.mod.
16066 (normal_mod_SOURCES): Added normal/context.c.
16067 (default_mod_SOURCES): New variable.
16068 (default_mod_CFLAGS): Likewise.
16069 (timeout_mod_SOURCES): Likewise.
16070 (timeout_mod_CFLAGS): Likewise.
16071 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16072 conf/i386-pc.rmk.
16073 (pkgdata_MODULES): Added default.mod and timeout.mod.
16074 (normal_mod_SOURCES): Added normal/context.c.
16075 (default_mod_SOURCES): New variable.
16076 (default_mod_CFLAGS): Likewise.
16077 (timeout_mod_SOURCES): Likewise.
16078 (timeout_mod_CFLAGS): Likewise.
16079
16080 * Makefile.in (all-local): Added $(MKFILES).
16081
4ed2e1dd 160822005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16083
16084 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16085 (grub_emu_SOURCES): Likewise.
16086 (pkgdata_MODULES): Add `sun.mod'.
16087 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16088 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16089 `partmap/sun.c'.
16090 (pkgdata_MODULES): Add `sun.mod'.
16091 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16092 * include/grub/partition.h (grub_sun_partition_map_init): New
16093 prototype.
16094 (grub_sun_partition_map_fini): Likewise.
16095 * partmap/sun.c: New file.
16096 * util/grub-emu.c (main): Initialize and de-initialize the sun
16097 partitionmap support.
16098
4d4e372e 160992005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16100
16101 This implements an Emacs-like menu entry editor.
f19dbdb7 16102
4d4e372e 16103 * normal/menu_entry.c: New file.
f19dbdb7 16104
4d4e372e 16105 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16106 characters to ASCII.
16107 (saved_char): New variable.
16108 (grub_ncurses_checkkey): Rewritten completely.
16109 (grub_ncurses_getkey): Likewise.
16110 (grub_ncurses_init): Call raw instead of cbreak.
16111
16112 * normal/menu.c (print_entry): Do not put a space.
16113 (init_page): Renamed to ...
16114 (grub_menu_init_page): ... this. All callers changed.
16115 (edit_menu_entry): Removed.
16116 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16117
16118 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16119
16120 * kern/misc.c (grub_vprintf): Call grub_refresh.
16121
16122 * normal/menu.c (DISP_LEFT): Renamed to ...
16123 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16124 * normal/menu.c (DISP_UP): Renamed to ...
16125 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16126 * normal/menu.c (DISP_RIGHT): Renamed to ...
16127 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16128 * normal/menu.c (DISP_DOWN): Renamed to ...
16129 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16130 * normal/menu.c (DISP_HLINE): Renamed to ...
16131 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16132 * normal/menu.c (DISP_VLINE): Renamed to ...
16133 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16134 * normal/menu.c (DISP_UL): Renamed to ...
16135 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16136 * normal/menu.c (DISP_UR): Renamed to ...
16137 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16138 * normal/menu.c (DISP_LL): Renamed to ...
16139 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16140 * normal/menu.c (DISP_LR): Renamed to ...
16141 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16142 * normal/menu.c (TERM_WIDTH): Renamed to ...
16143 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16144 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16145 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16146 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16147 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16148 * normal/menu.c (TERM_MARGIN): Renamed to ...
16149 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16150 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16151 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16152 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16153 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16154 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16155 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16156 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16157 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16158 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16159 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16160 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16161 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16162 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16163 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16164 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16165 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16166 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16167 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16168 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16169 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16170 All callers changed.
16171
16172 * include/grub/normal.h: New prototype.
16173
16174 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16175 normal/menu_entry.c.
16176 (normal_mod_SOURCES): Likewise.
16177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16178 (normal_mod_SOURCES): Likewise.
16179
e6b92c8a 161802005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16181
16182 * include/grub/normal.h (grub_halt_init): New prototype.
16183 (grub_halt_fini): Likewise.
16184 (grub_reboot_init): Likewise.
16185 (grub_reboot_fini): Likewise.
16186
16187 * util/grub-emu.c: Include signal.h.
16188 (main_env): New global variable.
16189 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16190 catch C-c.
16191 (grub_machine_fini): New function.
16192 (main): Call grub_halt_init and grub_reboot_init before
16193 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16194 Call setjmp with MAIN_ENV to go back afterwards.
16195 Call grub_machine_fini right before return.
16196
16197 * include/grub/util/misc.h: Include setjmp.h.
16198 (main_env): New prototype.
16199
16200 * include/grub/kernel.h (grub_machine_fini): New prototype.
16201 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16202 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16203
16204 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16205 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16206 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 16207
e6b92c8a 16208 * util/i386/pc/misc.c: New file.
f19dbdb7 16209
e6b92c8a 16210 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16211 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16212 commands/i386/pc/reboot.c.
16213
c642636f 162142005-02-14 Guillem Jover <guillem@hadrons.org>
16215
16216 * include/grub/dl.h (grub_dl_check_header): New prototype.
16217 (grub_arch_dl_check_header): Change return type to grub_err_t,
16218 remove size parameter and export function. Update all callers.
16219 * kern/dl.c (grub_dl_check_header): New function.
16220 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16221 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16222 are inside the core.
16223 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16224 independent ELF header checks.
16225 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16226 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16227 `grub_dl_check_header' instead of explicit checks. Check for the
16228 ELF type.
16229 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16230 `grub_dl_check_header' instead of explicit checks. Remove arch
16231 specific ELF header checks.
16232
e6b92c8a 16233 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16234 argument SIZE.
16235
5eabe94b 162362005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16237
16238 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16239 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16240
1b14a681 162412005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16242
16243 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 16244 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 16245 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 16246 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 16247 * partmap/amiga.c (amiga_partition_map_iterate): Return
16248 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16249 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16250
aca108aa 162512005-02-01 Guillem Jover <guillem@hadrons.org>
16252
16253 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16254 help info.
16255
c9f9c556 162562005-01-31 Marco Gerards <metgerards@student.han.nl>
16257
16258 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16259 Removed prototype.
16260 (grub_rescue_cmd_linux): New prototype.
16261 (grub_rescue_cmd_initrd): Likewise.
16262 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16263 `bi_rec'.
16264 (grub_linux_release_mem): Release the memory for the initrd.
16265 (grub_load_linux): Renamed from this...
16266 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16267 Changed `entry' not to be static. Loop over memory regions to
16268 find another one when the default fails.
16269 (grub_rescue_cmd_initrd): New function.
16270 (grub_linux_init): Remove function.
16271 (grub_linux_fini): Likewise.
16272 (GRUB_MOD_INIT): Register `initrd'.
16273 (GRUB_MOD_FINI): Unregister `initrd'.
16274 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16275 Function removed.
16276 (grub_linux_normal_fini): Likewise.
16277 (GRUB_MOD_INIT): Register `initrd'.
16278 (GRUB_MOD_FINI): Unregister `initrd'.
16279
990cf3aa 162802005-01-31 Marco Gerards <metgerards@student.han.nl>
16281
16282 * commands/help.c: New file.
16283 * normal/arg.c (show_help): Renamed to...
16284 (grub_arg_show_help): ... this.
16285 * commands/i386/pc/halt.c: New file.
16286 * commands/i386/pc/reboot.c: Likewise.
16287 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16288 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16289 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16290 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16291 variables.
16292 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16293 `commands/help.c'.
16294 (pkgdata_MODULES): Add `help.mod'.
16295 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16296 * grub/i386/pc/init.h (grub_reboot): New prototype.
16297 (grub_halt): Likewise.
16298 * include/grub/normal.h (grub_arg_show_help): New prototype.
16299 (grub_help_init): Likewise.
16300 (grub_help_fini): Likewise.
16301 * util/grub-emu.c (main): Initialize and deinitialize the help
16302 command.
16303
16304 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16305
16306 * normal/command.c (grub_command_init): Fixed the description of
16307 the `set' and `unset' commands.
16308
163092005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 16310
16311 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16312 function.
16313 * commands/ieee1275/halt.c: New file.
16314 * commands/ieee1275/reboot.c: Likewise.
16315 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16316 `__attribute__ ((unused))'. Some GCS related fixed.
16317 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16318 (grub_suspend_fini): Likewise.
16319 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16320 and `halt.mod'.
16321 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16322 (halt_mod_CFLAGS): New variables.
16323 * include/grub/powerpc/ieee1275/ieee1275.h
16324 (grub_ieee1275_interpret): New prototype.
16325
1ab09cc7 163262005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16327
16328 * include/grub/misc.h (memmove): New prototype.
16329 (memcpy): Likewise.
16330
8b8cbdb2 163312005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16332
16333 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16334 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16335
e3741a27 163362005-01-22 Marco Gerards <metgerards@student.han.nl>
16337
16338 * kern/misc.c (grub_strndup): Function rewritten.
16339
776bd780 163402005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16341
16342 * normal/menu.c (TERM_WIDTH): Macro redefined.
16343 (TERM_TOP_BORDER_Y): Likewise.
16344 (draw_border): Replaced while-loop by a for-loop. Make the number
16345 of lines consistent with the number of lines displayed in
16346 print_entries. Added a margin below the rectangle.
16347 (print_entry): Make the entry fit in the rectangle.
16348 (print_entries): Display the scroll arrows next to the right
16349 border.
16350
78026bce 163512005-01-21 Marco Gerards <metgerards@student.han.nl>
16352
16353 * fs/minix.c (grub_minix_find_file): Reserve more space for
16354 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16355 `grub_strncpy' to copy `path' into it.
16356
67bbaf0f 163572005-01-21 Marco Gerards <metgerards@student.han.nl>
16358
16359 Add the loopback device, a device via which files can be accessed
16360 as devices.
f19dbdb7 16361
67bbaf0f 16362 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16363 (pkgdata_MODULES): Add loopback.mod.
16364 (loopback_mod_SOURCES): New variable.
16365 (loopback_mod_CFLAGS): Likewise.
16366 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16367 `disk/loopback.c'.
16368 (pkgdata_MODULES): Add loopback.mod.
16369 (loopback_mod_SOURCES): New variable.
16370 (loopback_mod_CFLAGS): Likewise.
16371 * disk/loopback.c: new file.
16372 * include/grub/normal.h (grub_loop_init): New prototype.
16373 (grub_loop_fini): New prototype.
16374 * util/grub-emu.c (main): Initialize and de-initialize loopback
16375 support.
16376 * include/grub/disk.h (grub_disk_dev_id): Add
16377 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16378
6f1c18bd 163792005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16380
16381 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16382 function.
16383 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16384 (suspend_mod_SOURCES): New variable.
16385 (suspend_mod_CFLAGS): Likewise.
16386 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16387 New prototype.
16388 * commands/ieee1275/suspend.c: New file.
16389
b38551da 163902005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16391
16392 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 16393 ((unused))' to `__attribute__ ((used))'.
b38551da 16394 (GRUB_MOD_FINI): Likewise.
16395 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16396 * genmk.rb (PModule): Assign space to common symbols when linking
16397 modules.
16398
777aff39 163992005-01-20 Marco Gerards <metgerards@student.han.nl>
16400
16401 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16402 `unsigned' arguments to `grub_size_t'.
16403 (grub_malloc): Likewise.
16404 (grub_realloc): Likewise.
16405 (grub_memalign): Likewise.
16406 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16407 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16408 * util/misc.c (grub_malloc): Likewise.
16409 (grub_realloc): Likewise.
16410 * kern/mm.c (get_header_from_pointer): Change the casts to
16411 `unsigned' into a cast to `grub_size_t'.
16412
16413 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16414 point to `currnode' when `currnode' is changed.
16415
16416 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16417 Schottelius <nico-linux@schottelius.org>.
16418
d0ff18e1 164192005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16420
16421 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16422 (note_path): Remove variable.
16423 (GRUB_IEEE1275_NOTE_NAME): New macro.
16424 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16425 (grub_ieee1275_note_hdr): New structure.
16426 (grub_ieee1275_note_desc): Likewise.
16427 (grub_ieee1275_note): Likewise.
16428 (load_note): Remove `dir' argument. All callers updated. Remove
16429 `note_img' and `path'. Do not load a file from `note_path'.
16430 Initialize a struct grub_ieee1275_note and write that to `out'.
16431 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16432
4ca7004c 164332005-01-05 Marco Gerards <metgerards@student.han.nl>
16434
16435 * util/misc.c (grub_util_read_image): Revert last change. It
16436 called `grub_util_read_at', which seeks from the beginning of the
16437 file.
16438
0b412211 164392005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16440
16441 * TODO: Add note about endianness in grub-mkimage.
16442 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16443 section.
16444 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16445 (grub_mkimage_SOURCES): New target.
16446 * include/grub/kernel.h (grub_start_addr): Remove variable.
16447 (grub_end_addr): Likewise.
16448 (grub_total_module_size): Likewise.
16449 (grub_kernel_image_size): Likewise.
16450 (GRUB_MODULE_MAGIC): New constant.
16451 (grub_module_info): New structure.
16452 (grub_arch_modules_addr): New prototype.
16453 (grub_get_end_addr): Remove prototype.
16454 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16455 * include/grub/powerpc/ieee1275/kernel.h: New file.
16456 * include/grub/util/misc.h (grub_util_get_fp_size): New
16457 prototype.
16458 (grub_util_read_at): Likewise.
16459 (grub_util_write_image_at): Likewise.
16460 * kern/main.c (grub_get_end_addr): Remove function.
16461 (grub_load_modules): Call grub_arch_modules_addr instead of using
16462 grub_end_addr. Look for a grub_module_info struct in memory. Use
16463 the grub_module_info fields instead of calling grub_get_end_addr
16464 as loop conditions. Move grub_add_unused_region code here.
16465 (grub_add_unused_region): Remove function.
16466 * kern/i386/pc/init.c: Include grub/cache.h.
16467 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16468 one call to add_mem_region.
16469 (grub_arch_modules_addr): New function.
16470 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16471 (grub_total_module_size): Likewise.
16472 Include grub/machine/kernel.h.
16473 (grub_arch_modules_addr): New function.
16474 * util/grub-emu.c (grub_end_addr): Remove variable.
16475 (grub_total_module_size): Likewise.
16476 (grub_arch_modules_addr): New function.
16477 * util/misc.c: Include unistd.h.
16478 (grub_util_get_fp_size): New function.
16479 (grub_util_read_at): Likewise.
16480 (grub_util_write_image_at): Likewise.
16481 (grub_util_read_image): Call grub_util_read_at.
16482 (grub_util_write_image): Call grub_util_write_image_at.
16483 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16484 additional memory in kernel_img for a struct grub_module_info.
16485 Fill in that grub_module_info.
16486 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16487
458786f8 164882005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16489
16490 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16491 New function.
16492 * include/grub/powerpc/ieee1275/ieee1275.h
16493 (grub_ieee1275_milliseconds): New prototype.
16494 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16495 Change to 1000.
16496 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16497 grub_ieee1275_milliseconds.
16498
ac507d1b 164992005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16500
16501 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16502 variable.
16503 (find_options): New function.
16504 (cmain): Call find_options.
16505 * include/grub/powerpc/ieee1275/ieee1275.h
16506 (grub_ieee1275_realmode): New extern variable.
16507 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16508 grub_map if grub_ieee1275_realmode is false.
16509
6b8fd1c4 165102004-12-29 Marco Gerards <metgerards@student.han.nl>
16511
16512 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16513 lines are inserted and make it work like readline. Reported by
16514 Vincent Pelletier <subdino2004@yahoo.fr>.
16515
8514a1e0 165162004-12-28 Marco Gerards <metgerards@student.han.nl>
16517
16518 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16519
16520 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16521 `kern/powerpc/cache.S'.
16522
924b6140 165232004-12-27 Marco Gerards <metgerards@student.han.nl>
16524
16525 * genmk.rb: Handle the `Program' class in the main loop. Written
16526 by Johan Rydberg <jrydberg@gnu.org>.
16527 (Program): New class.
16528 (programs): New variable.
16529 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16530 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16531 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16532 (help_arch): Function removed.
16533 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16534 `powerpc/libgcc.h' and `loader.h'.
16535 (pkgdata_PROGRAMS): New variable.
16536 (sbin_UTILITIES): Variable removed.
16537 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16538 (grubof_SOURCES): Variable re-defined so it only includes the
16539 core functionality.
16540 (grubof_CFLAGS): Remove `-DGRUBOF'.
16541 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16542 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16543 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16544 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16545 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16546 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16547 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16548 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16549 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16550 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16551 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16552 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16553 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16554 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16555 (pc_mod_CFLAGS): New variables.
16556 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16557 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16558 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16559 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16560 Moved from here...
16561 * include/grub/i386/pc/init.h (grub_os_area_addr)
16562 (rub_os_area_size): ... to here.
16563 * include/grub/powerpc/ieee1275/ieee1275.h
16564 (grub_ieee1275_entry_fn): Export symbol.
16565 * include/grub/powerpc/ieee1275/init.h: New file.
16566 * include/grub/powerpc/libgcc.h: Likewise.
16567 * include/grub/cache.h: Likewise.
16568 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16569 <hollis@penguinppc.org>.
16570 * kern/dl.c: Include <grub/cache.h>.
16571 (grub_dl_flush_cache): New function.
16572 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16573 for this module.
16574 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16575 (grub_console_init): Removed prototypes.
16576 (grub_machine_init): Don't initialize the modules anymore.
16577 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16578 static.
16579 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16580 Macro undef removed.
16581 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16582 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16583 relocation `R_PPC_REL32'. Return an error when the relocation is
16584 unknown.
16585 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16586 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16587 * util/misc.c (grub_arch_sync_caches): Likewise.
16588
e4b47e0c 165892004-12-19 Marco Gerards <metgerards@student.han.nl>
16590
16591 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16592 `symlist.c', add `grubof_symlist.c'.
16593 (symlist.c): Variable removed.
16594 (grubof_HEADERS): Variable added.
16595 (grubof_symlist.c): New target.
16596 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16597 `kernel_img_HEADERS'.
16598 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16599 * kern/powerpc/dl.c: New file.
16600 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16601 Function removed.
16602 (grub_arch_dl_relocate_symbols): Likewise.
16603 (grub_register_exported_symbols): Likewise.
16604
4ceb3636 166052004-12-13 Marco Gerards <metgerards@student.han.nl>
16606
16607 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16608 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16609 to fail instead. Reported by Vincent Pelletier
16610 <subdino2004@yahoo.fr>.
16611
16612 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16613 it is not allocated. Reported by Vincent Pelletier
16614 <subdino2004@yahoo.fr>.
16615
16616 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16617 output so the output looks better.
f19dbdb7 16618
3f1578fe 166192004-12-04 Marco Gerards <metgerards@student.han.nl>
16620
16621 Modulize the partition map support and add support for the amiga
16622 partition map.
f19dbdb7 16623
3f1578fe 16624 * commands/ls.c: Include <grub/partition.h> instead of
16625 <grub/machine/partition.h>.
16626 * kern/disk.c: Likewise.
16627 * kern/rescue.c: Likewise.
16628 * loader/i386/pc/chainloader.c: Likewise.
16629 * normal/cmdline.c: Likewise.
16630 * kern/powerpc/ieee1275/init.c: Likewise.
16631 (grub_machine_init): Call `grub_pc_partition_map_init',
16632 `grub_amiga_partition_map_init' and
16633 `grub_apple_partition_map_init'.
16634 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16635 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16636 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16637 `partition.h' and `pc_partition.h'.
16638 (grub_setup_SOURCES): Remove
16639 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16640 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16641 (grub_emu_SOURCES): Likewise.
16642 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16643 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16644 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16645 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16646 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16647 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16648 (grubof_SOURCES): Likewise.
16649 * disk/i386/pc/partition.c: File removed.
16650 * disk/powerpc/ieee1275/partition.c: Likewise.
16651 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16652 * include/grub/i386/pc/partition.h: Likewise.
16653 * kern/partition.c: New file.
16654 * partmap/amiga.c: Likewise.
16655 * partmap/apple.c: Likewise.
16656 * partmap/pc.c: Likewise.
16657 * include/grub/partition.h: Likewise..
16658 * include/grub/pc_partition.h: Likewise.
16659 * util/grub-emu.c: Include <grub/partition.h> instead of
16660 <grub/machine/partition.h>.
16661 (main): Call `grub_pc_partition_map_init',
16662 `grub_amiga_partition_map_init' and
16663 `grub_apple_partition_map_init' and deinitialize afterwards.
16664 * util/i386/pc/biosdisk.c: Include `#include
16665 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16666 `<grub/machine/partition.h>'.
16667 * util/i386/pc/grub-setup.c: Likewise.
16668 * util/i386/pc/biosdisk.c: Likewise.
16669 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16670 partition information in case of a PC partition.
16671 * util/i386/pc/grub-setup.c: Include `#include
16672 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16673 `<grub/machine/partition.h>'.
16674 (setup): Only access the PC specific partition information in case
16675 of a PC partition.
16676
0ef4ced9 166772004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 16678
0ef4ced9 16679 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16680 (grub_longjmp): Likewise.
16681 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16682 20.
16683 * normal/powerpc/setjmp.S: New file.
16684 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16685 `normal/powerpc/setjmp.S'.
16686 (grubof_CFLAGS): Add `-DGRUBOF'.
16687 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16688 [GRUB_UTIL && !GRUBOF].
f19dbdb7 16689
19950e29 166902004-11-16 Marco Gerards <metgerards@student.han.nl>
16691
16692 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16693 property named `name'. Correctly handle the error returned by
16694 `grub_ieee1275_finddevice' if a device can not be opened.
16695
a2fea427 166962004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16697
16698 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16699 `actual' for negativity.
16700 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16701 kern/fshelp.c.
16702
41ea0ea3 167032004-11-01 Marco Gerards <metgerards@student.han.nl>
16704
16705 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16706 (PAGE_OFFSET): New macro.
16707 (CRTC_ADDR_PORT): Likewise.
16708 (CRTC_DATA_PORT): Likewise.
16709 (START_ADDR_HIGH_REGISTER): Likewise.
16710 (START_ADDR_LOW_REGISTER): Likewise.
16711 (GRAPHICS_ADDR_PORT): Likewise.
16712 (GRAPHICS_DATA_PORT): Likewise.
16713 (READ_MAP_REGISTER): Likewise.
16714 (INPUT_STATUS1_REGISTER): Likewise.
16715 (INPUT_STATUS1_VERTR_BIT): Likewise.
16716 (page): New variable.
16717 (wait_vretrace): New function.
16718 (set_read_map): Likewise.
16719 (set_start_address): Likewise.
16720 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16721 the right page.
16722 (check_vga_mem): Take the page into account.
16723 (write_char): Likewise.
16724 (write_cursor): Likewise.
16725 (scroll_up): Likewise. Copy the page to the page that is not
16726 shown and switch between both pages.
16727 (grub_vga_putchar): Fix off by one error.
16728 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16729 account.
16730
ad0bd20b 167312004-11-01 Marco Gerards <metgerards@student.han.nl>
16732
16733 Add support for iso9660 (including rockridge).
f19dbdb7 16734
ad0bd20b 16735 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16736 (iso9660_mod_SOURCES): New variable.
16737 (iso9660_mod_CFLAGS): Likewise.
16738 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16739 * include/grub/fs.h (grub_iso9660_init): New prototype.
16740 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16741 * fs/iso9660.c: New file.
16742
16743 * include/grub/misc.h (grub_strncat): New prototype.
16744 * kern/misc.c (grub_strncat): New function.
f19dbdb7 16745
ad0bd20b 16746 * fs/hfs.c (grub_hfs_mount): Translate the error
16747 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16748 * fs/jfs.c (grub_jfs_mount): Likewise.
16749 * fs/ufs.c (grub_ufs_mount): Likewise.
16750
a5477a59 167512004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16752
16753 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16754 which initialized BAT registers.
16755 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16756 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16757 Move from here...
16758 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16759 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16760 ... to here.
16761 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16762 (grub_mapclaim): Likewise.
16763 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16764 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16765 hand.
16766
9304c1f8 167672004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16768
16769 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16770 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16771 -ffreestanding and -msoft-float.
16772
86f4ae25 167732004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16774
16775 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16776 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16777 set in grub_ieee1275_flags.
16778
38912228 167792004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16780
16781 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16782 prototype.
16783 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16784 grub_console_init first.
16785 Change the memory range used for grub_ieee1275_claim and
16786 grub_mm_init_region.
16787 Print an error message if the claim fails.
16788 Include <grub/misc.h>.
16789
d1923dc8 167902004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16791
16792 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16793 Call grub_children_iterate for device nodes of type `scsi',
16794 `ide', or `ata'.
16795 (grub_ofdisk_open): Remove manual device alias resolution.
16796 Fix memory leak when device cannot be opened.
f19dbdb7 16797 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 16798 (grub_children_iterate): New prototype.
16799 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16800 New function.
16801 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16802 Return -1 if args.size was -1.
16803
4512e4f3 168042004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16805
16806 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16807 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16808 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16809 Open Firmware's memory for it; claim memory from _start to _end.
16810 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16811 (_end): New extern.
16812 (_start): Zero BSS from __bss_start to _end.
16813 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16814 New extern.
16815 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16816
4d61feb0 168172004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16818
ad0bd20b 16819 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16820 -1 if args.base was -1.
4d61feb0 16821
026fa2f9 168222004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16823
16824 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16825 escape sequence instead of a literal ^L. Also call
16826 grub_ofconsole_gotoxy.
16827
9f2220ef 168282004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16829
16830 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16831 void * arguments to grub_addr_t. All callers updated. Also make
16832 the `result' argument optional.
16833 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16834 All callers updated.
16835
8a572cd7 168362004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16837
16838 * commands/ls.c (grub_ls_list_files): Use the string following the
16839 initial ')', if present, as the filesystem path.
16840 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16841
16842 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16843
18aa81f2 168442004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16845
16846 Make the source code of the menu interface more readable.
f19dbdb7 16847
18aa81f2 16848 * normal/menu.c: Include grub/mm.h.
16849 (TERM_WIDTH): New macro.
16850 (TERM_HEIGHT): Likewise.
16851 (TERM_INFO_HEIGHT): Likewise.
16852 (TERM_MARGIN): Likewise.
16853 (TERM_SCROLL_WIDTH): Likewise.
16854 (TERM_TOP_BORDER_Y): Likewise.
16855 (TERM_LEFT_BORDER_X): Likewise.
16856 (TERM_BORDER_WIDTH): Likewise.
16857 (TERM_MESSAGE_HEIGHT): Likewise.
16858 (TERM_BORDER_HEIGHT): Likewise.
16859 (TERM_NUM_ENTRIES): Likewise.
16860 (TERM_FIRST_ENTRY_Y): Likewise.
16861 (TERM_ENTRY_WIDTH): Likewise.
16862 (TERM_CURSOR_X): Likewise.
16863 (draw_border): Use macros instead of magic numbers.
16864 (print_entry): Likewise.
16865 (print_entries): Likewise.
16866 (run_menu): Likewise. Also, handle the key 'e'.
16867 (run_menu_entry): Ignore empty command lines.
16868 (print_message): Added a new argument EDIT. If EDIT is true,
16869 print a different message.
16870 (init_page): Likewise.
16871 (edit_menu_entry): New function. Not implemented yet.
16872
b47efe30 168732004-09-17 Marco Gerards <metgerards@student.han.nl>
16874
16875 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16876 can be loaded from normal mode.
f19dbdb7 16877
b47efe30 16878 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16879 `multiboot.mod'.
16880 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16881 (multiboot_mod_CFLAGS): New variables.
16882 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16883 * loader/i386/pc/multiboot_normal.c: Likewise.
16884
b47efe30 16885 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16886 attribute `unused'.
f19dbdb7 16887
b47efe30 16888 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16889 `fdiro' to read the mode information from instead of `diro'.
16890
16891 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16892 looking up a symlink.
16893
16894 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16895 macro.
16896 * normal/command.c (grub_command_execute): Don't parse the
16897 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16898 flags of the command.
16899
16900 * normal/menu.c (grub_menu_run): Fix typo.
16901
da75ac71 169022004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16903
16904 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16905
16906 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16907 `y + 1' instead of `y - 1'.
16908
16909 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16910
062b24c2 169112004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16912
16913 From Hollis Blanchard <hollis@penguinppc.org>:
16914 * kern/misc.c (memmove): New alias for grub_memmove.
16915 (memcmp): New alias for grub_memcmp.
16916 (memset): New alias for grub_memset.
f19dbdb7 16917 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16918 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16919 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16920 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16921
8ddad845 169222004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16923
16924 Added normal mode command `chainloader' as module chain.mod, which
16925 depends on normal.mod and _chain.mod.
f19dbdb7 16926
8ddad845 16927 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16928 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16929 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16930 Deleted prototype.
16931 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16932 but arguments parsing moved to ...
16933 (grub_chainloader_cmd): ... here. New function.
16934 * include/grub/i386/pc/chainloader.h: New file.
16935 * loader/i386/pc/chainloader_normal.c: Likewise.
16936
2c1f4ce3 169372004-09-11 Marco Gerards <metgerards@student.han.nl>
16938
16939 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16940 (grub_mkimage_LDFLAGS): Likewise.
16941 (grub_emu_SOURCES): Likewise.
16942 (kernel_img_HEADERS): Added fshelp.h.
16943 * fs/ext2.c: Include <grub/fshelp.h>.
16944 (FILETYPE_REG): New macro.
16945 (FILETYPE_INO_REG): Likewise.
16946 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16947 Changed all users.
16948 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16949 all users.
16950 (grub_fshelp_node): New struct.
16951 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16952 to a pointer.
16953 (grub_ext2_get_file_block): Removed function.
16954 (grub_ext2_read_block): New function.
16955 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16956 This function was written.
16957 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16958 (grub_ext2_find_file): Removed function.
16959 (grub_ext2_read_symlink): New function.
16960 (grub_ext2_iterate_dir): Likewise.
16961 (grub_ext2_open): Rewritten.
16962 (grub_ext2_dir): Rewritten.
16963 * include/grub/fshelp.h: New file.
16964 * fs/fshelp.c: Likewise.
16965
3c52136a 169662004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16967
16968 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16969 (print_message): Add a missing newline.
16970 (run_menu): Added timeout support.
16971 (run_menu_entry): New local function.
16972 (grub_menu_run): Added support for booting.
16973
16974 * kern/loader.c (grub_loader_is_loaded): New function.
16975
16976 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16977 (grub_get_rtc): Exported.
16978
16979 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16980 (grub_get_rtc): Exported.
16981
16982 * include/grub/normal.h (struct grub_command_list): Remove
16983 constant from the member `command'.
16984
16985 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16986
16987 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16988
16989 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16990
aa033560 169912004-08-28 Marco Gerards <metgerards@student.han.nl>
16992
16993 Add support for the JFS filesystem.
16994
16995 * fs/jfs.c: New file.
16996 * include/grub/fs.h (grub_jfs_init): New prototype.
16997 (grub_jfs_fini): New prototype.
16998 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16999 (grub_emu_SOURCES): Likewise.
17000 (pkgdata_MODULES): Add jfs.mod.
17001 (jfs_mod_SOURCES): New variable.
17002 (jfs_mod_CFLAGS): Likewise.
17003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17004 (grubof_SOURCES): Likewise.
17005 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17006
17007 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17008 endian to the host endian.
17009 (grub_fat_utf16_to_utf8): Move function from there...
17010 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 17011 the endianness of the source string anymore.
aa033560 17012 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17013
94bc45af 170142004-08-24 Marco Gerards <metgerards@student.han.nl>
17015
17016 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17017 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17018 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17019 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 17020
94bc45af 17021 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17022 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17023 for `node_found' and `it_dir'.
17024 (grub_hfs_dir): Add prototype for `dir_hook'.
17025
17026 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17027 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17028 and `indir32' to silence a gcc warning.
17029
17030 * include/grub/fs.h (grub_hfs_init): New prototype.
17031 (grub_hfs_fini): Likewise.
f19dbdb7 17032
17033
97543f08 170342004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17035
17036 Each disk device has its own id now. This is useful to make use
17037 of multiple disk devices.
f19dbdb7 17038
97543f08 17039 * include/grub/disk.h (grub_disk_dev_id): New enum.
17040 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17041 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17042
17043 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17044 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17045
17046 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17047 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17048
17049 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17050 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17051
17052 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17053 "id" which is used by the cache manager.
17054
17055 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17056 of just "GRUB".
17057
64372eb4 170582004-08-18 Marco Gerards <metgerards@student.han.nl>
17059
17060 * fs/hfs.c: New file.
17061 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17062 (grub_emu_SOURCES): Likewise.
17063 (pkgdata_MODULES): Add hfs.mod.
17064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17065 (grubof_SOURCES): Likewise.
17066 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17067
17068 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17069 * kern/misc.c (grub_strncasecmp): Add function.
17070
cc61b58f 170712004-08-14 Marco Gerards <metgerards@student.han.nl>
17072
17073 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17074 with parentheses.
17075
17076 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17077 (grub_ext2_dir): In case the directory entry type is unknown, read
17078 it from the inode.
17079
0ef123f6 170802004-08-02 Peter Bruin <pjbruin@dds.nl>
17081
17082 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17083 grub_load_linux instead of grub_rescue_cmd_linux as second
17084 argument of grub_rescue_register_command.
17085
17086 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17087
a447c5df 170882004-07-27 Marco Gerards <metgerards@student.han.nl>
17089
17090 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17091 function.
17092 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17093 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17094 `loader/powerpc/ieee1275/linux.c',
17095 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17096 * include/grub/powerpc/ieee1275/ieee1275.h
17097 (grub_ieee1275_release): New prototype.
17098 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17099 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17100 normal, boot, linux and linux_normal.
17101 * loader/powerpc/ieee1275/linux.c: New file.
17102 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17103
5a9e3546 171042004-07-12 Marco Gerards <metgerards@student.han.nl>
17105
17106 * normal/arg.c (grub_arg_parse): Correct error handling after
17107 reallocating the argumentlist (check if `argl' is not null instead
17108 of checking if `args' is not null).
17109 * kern/mm.c (grub_realloc): Return the same pointer when using the
17110 same region, instead of returning the header address.
17111
e15199cb 171122004-07-11 Marco Gerards <metgerards@student.han.nl>
17113
17114 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17115 one block instead of two when looking for the initial partition.
17116 (grub_partition_probe): Initialize the local variable `p' with 0.
17117 Use base 10 for the grub_strtoul call.
17118 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17119 need for one local variable.
17120 (grub_strtoul): Don't add the new value to `num', instead of that
17121 just assign it.
17122
020616c2 171232004-07-11 Marco Gerards <metgerards@student.han.nl>
17124
17125 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17126 (pxeboot_img_SOURCES): New variable.
17127 (pxeboot_img_ASFLAGS): Likewise.
17128 (pxeboot_img_LDFLAGS): Likewise.
17129 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17130 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17131 <lode_leroy@hotmail.com>.
17132
6c51eb64 171332004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17134
17135 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17136 there was no input.
17137
cfb12aff 171382004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17139
17140 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17141 the history buffer logic.
17142
6eabba74 171432004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17144
17145 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17146 (FILETYPE_INO_SYMLINK): New macros.
17147 (grub_ext2_find_file): Check if the node is a directory using the
17148 inode stat information instead of using the filetype in the
17149 dirent. Exclude the first character of an absolute symlink.
17150 (grub_ext2_dir): Mask out the filetype part of the mode member of
17151 the inode.
17152
66e19ef8 171532004-05-24 Marco Gerards <metgerards@student.han.nl>
17154
17155 Add support for UFS version 1 and 2. Add support for the minix
17156 filesystem version 1 and 2, both the variants with 14 and 30 long
17157 filenames.
f19dbdb7 17158
66e19ef8 17159 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17160 fs/minix.c.
17161 (grub_emu_SOURCES): Likewise.
17162 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17163 (ufs_mod_SOURCES): New variable.
17164 (ufs_mod_CFLAGS): Likewise.
17165 (minix_mod_SOURCES): Likewise.
17166 (minix_mod_CFLAGS): Likewise.
17167 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17168 fs/minix.c.
17169 (grubof_SOURCES): Likewise.
17170 * fs/ufs.c: New file.
17171 * fs/minix.c: New file.
17172 * include/grub/fs.h (grub_ufs_init): New prototype.
17173 (grub_ufs_fini): Likewise.
17174 (grub_minix_init): Likewise.
17175 (grub_minix_fini): Likewise.
17176 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17177 minix fs.
17178
cc2e748a 171792004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17180
17181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17182 commands/ls.c, commands/terminal.c, commands/boot.c,
17183 commands/cmp.c and commands/cat.c.
17184 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17185
17186 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17187 "env.h"
17188
4b13b216 171892004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17190
17191 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17192 and grub_, respectively. Because the conversion is trivial and
17193 mechanical, I omit the details here. Please refer to the CVS
17194 if you need more information.
17195
6a142551 171962004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17197
17198 * include/pupa: Renamed to ...
17199 * include/grub: ... this.
17200 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17201 * util/i386/pc/grub-mkimage.c: ... this.
17202 * util/i386/pc/pupa-setup.c: Renamed to ...
17203 * util/i386/pc/grub-setup.c: ... this.
17204 * util/pupa-emu.c: Renamed to ...
17205 * util/grub-emu.c: ... this.
17206
e56cdf21 172072004-03-29 Marco Gerards <metgerards@student.han.nl>
17208
17209 Add support for the newworld apple macintosh (PPC). This has been
17210 tested on the powerbook 2000 only. It only adds support for
17211 generic ieee1275 functions, console and disk support. This should
17212 be easy to port to other architectures with support for Open
17213 Firmware.
f19dbdb7 17214
e56cdf21 17215 * configure.ac: Accept the powerpc as host_cpu. In the case of
17216 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17217 specific tests are only executed while building for the i386.
17218 Inverse test for crosscompile.
17219 * genmk.rb (Utility): Allow assembler files.
17220 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17221 * conf/powerpc-ieee1275.rmk: New file.
17222 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17223 * disk/powerpc/ieee1275/partition.c: Likewise.
17224 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17225 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17226 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17227 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17228 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17229 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17230 * include/pupa/powerpc/ieee1275/loader.h
17231 * include/pupa/powerpc/setjmp.h: Likewise.
17232 * include/pupa/powerpc/types.h: Likewise.
17233 * kern/powerpc/ieee1275/init.c: Likewise.
17234 * kern/powerpc/ieee1275/openfw.c: Likewise.
17235 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17236
17237 These files were written by Johan Rydberg
17238 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 17239
e56cdf21 17240 * boot/powerpc/ieee1275/cmain.c: New file.
17241 * boot/powerpc/ieee1275/crt0.S: Likewise.
17242 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17243 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17244
8c8cc205 172452004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17246
17247 * Makefile.in: Update copyright.
17248 * genmodsrc.sh: Likewise.
17249 * gensymlist.sh: Likewise.
17250 * term/i386/pc/vga.c: Indent correctly.
17251
17252 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17253 bugreporting address.
17254 * util/i386/pc/pupa-setup.c (usage): Likewise,
17255 (main): Call pupa_ext2_init and pupa_ext2_fini.
17256
f19dbdb7 17257 * fs/fat.c (log2): Renamed to ...
8c8cc205 17258 (fat_log2): ... this.
17259 All callers changed.
17260 * kern/misc.c (memcpy): Alias to pupa_memmove.
17261 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17262 lvalue cast.
17263 * util/console.c (pupa_ncurses_fini): Return 0.
17264
17265 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17266 Move fail label here.
17267 [__GNU__]: Don't warn when using stat.
17268 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17269 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17270 long int. Use strtol instead of strtoul.
f19dbdb7 17271
db1771cf 172722004-03-14 Marco Gerards <metgerards@student.han.nl>
17273
17274 * commands/boot.c: New file.
17275 * commands/cat.c: Likewise.
17276 * commands/cmp.c: Likewise.
17277 * commands/ls.c: Likewise.
17278 * commands/terminal.c: Likewise.
17279 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17280 (pupa_register_command): Changed interface to match the new
17281 argument parser.
17282 (pupa_command_execute): Changed (almost rewritten) so it uses
17283 pupa_split_command. Added support for setting variables using the
17284 syntax `foo=bar'.
17285 (rescue_command): Changed to work with the new argument parser.
17286 (terminal_command): Moved from here to commands/terminal.c.
17287 (set_command): New function.
17288 (unset_command): New function.
17289 (insmod_command): New function.
17290 (rmmod_command): New function.
17291 (lsmod_command): New function.
17292 (pupa_command_init): Don't initialize the command terminal
17293 anymore. Initialize the commands set, unset, insmod, rmmod and
17294 lsmod.
17295 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17296 (kernel_img_HEADERS): Add arg.h and env.h.
17297 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17298 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17299 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17300 normal/arg.c.
17301 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17302 terminal.mod.
17303 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17304 (boot_mod_SOURCES): New variable.
17305 (terminal_mod_SOURCES): Likewise.
17306 (ls_mod_SOURCES): Likewise.
17307 (cmp_mod_SOURCES): Likewise.
17308 (cat_mod_SOURCES): Likewise.
17309
17310 * normal/arg.c: New file.
17311 * kern/env.c: Likewise.
17312 * include/pupa/arg.h: Likewise.
17313 * include/pupa/env.h: Likewise.
17314 * font/manager.c (font_command): Changed to match argument parsing
17315 interface changes.
17316 (PUPA_MOD_INIT): Likewise.
17317 * hello/hello.c (pupa_cmd_hello): Likewise.
17318 (PUPA_MOD_INIT): Likewise.
17319 * include/pupa/disk.h: Include <pupa/device.h>.
17320 (pupa_print_partinfo): New prototype.
17321 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17322 (pupa_dl_get_prefix): Likewise.
17323 * include/pupa/misc.h: Include <pupa/err.h>.
17324 (pupa_isgraph): New prototype.
17325 (pupa_isdigit): Likewise.
17326 (pupa_split_cmdline): Likewise.
17327 * include/pupa/normal.h: Include <pupa/arg.h>.
17328 (pupa_command): Changed the prototype of the member `func' to
17329 match the argument parsing interface. Added member `options'.
17330 (pupa_register_command): Updated to match function.
17331 (pupa_arg_parse): New prototype.
17332 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17333 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17334 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17335 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17336 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17337 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17338 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17339 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17340 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17341 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17342 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17343 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17344 * kern/disk.c: Include <pupa/file.h>.
17345 (pupa_print_partinfo): New function.
17346 * kern/dl.c: Include <pupa/env.h>.
17347 (pupa_dl_dir): Variable removed.
17348 (pupa_dl_load): Use the environment variable `prefix' instead of
17349 the variable pupa_dl_dir.
17350 (pupa_dl_set_prefix): Function removed.
17351 (pupa_dl_get_prefix): Likewise.
17352 * kern/i386/pc/init.c: Include <pupa/env.h>.
17353 (pupa_machine_init): Use the environment variable `prefix' instead of
17354 using pupa_dl_set_prefix to set the prefix.
17355 * kern/main.c: Include <pupa/env.h>.
17356 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17357 using pupa_dl_get_prefix to get the prefix.
17358 * kern/misc.c: Include <pupa/env.h>.
17359 (pupa_isdigit): New function.
17360 (pupa_isgraph): Likewise.
17361 (pupa_ftoa): Likewise.
17362 (pupa_vsprintf): Added support for printing values of the type
17363 `double'. Make it possible to format variable output when using
17364 formatting like `%1.2%f'.
17365 (pupa_split_cmdline): New function.
17366 * kern/rescue.c: Include <pupa/env.h>.
17367 (next_word): Removed function.
17368 (pupa_rescue_cmd_prefix): Likewise.
17369 (pupa_rescue_cmd_set): New function.
17370 (pupa_rescue_cmd_unset): New function.
17371 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17372 split the command line instead of splitting it here. Added
17373 support for setting variables using the syntax `foo=bar'. Don't
17374 initialize the prefix command anymore. Initialized the set and
17375 unset commands.
17376 * normal/cmdline.c: Include <pupa/env.h>.
17377 (pupa_tab_complete): Added prototypes for print_simple_completion,
17378 print_partition_completion, add_completion, iterate_commands,
17379 iterate_dev, iterate_part and iterate_dir. Moved code to print
17380 partition information from here to kern/disk.c.
fe6b695a 17381 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 17382 * normal/main.c: Include <pupa/env.h>.
17383 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17384 instead of using pupa_dl_get_prefix to get the prefix.
17385 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17386 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17387 warning.
17388 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17389 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17390 ((unused))' to silence a gcc warning.
17391 (pupa_vga_setcolor): Likewise.
17392 (debug_command): Changed to match argument parsing
17393 interface changes.
17394 * util/pupa-emu.c: Include <pupa/env.h>.
17395 (options): Added 0's for unused fields to silence a gcc warning.
17396 (argp): Likewise.
17397 (main): Use the environment variable `prefix' instead of using
17398 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17399 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17400 and terminal.
17401
17402 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17403 * util/misc.c: Include <malloc.h>.
17404 (pupa_malloc): Rewritten so errors are correctly reported.
17405 (pupa_realloc): Likewise.
17406 (pupa_memalign): Likewise.
17407 (pupa_mm_init_region): Declare unused variables with
17408 `__attribute__ ((unused))' to silence a gcc warning.
17409 * normal/i386/setjmp.S: Remove tab at the end of the file to
17410 silence a gcc warning.
17411 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17412 variables with `__attribute__ ((unused))' to silence a gcc
17413 warning.
17414 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17415 local variable i unsigned to silence a gcc warning.
17416
17417 * kern/term.c: Include <pupa/misc.h>.
17418 (pupa_more_lines): New variable.
17419 (pupa_more): Likewise.
17420 (pupa_putcode): When the pager is active pause at the end of every
17421 screen.
17422 (pupa_set_more): New function.
17423 * include/pupa/term.h (pupa_set_more): New prototype.
17424
17425
3b1139cb 174262004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17427
17428 Now this project is GRUB 2 rather than PUPA. The location of
17429 the CVS repository was moved to GRUB's.
f19dbdb7 17430
3b1139cb 17431 * configure.ac: Use bug-grub as the reporting address.
17432 Use GRUB instead of PUPA.
17433 Change the version number to 1.90.
17434
8367695c 174352004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17436
17437 * genkernsyms.sh: Updated copyright information.
17438 * genmk.rb: Likewise.
17439 * genmodsrc.sh: Likewise.
17440 * gensymlist.sh: Likewise.
17441 * boot/i386/pc/boot.S: Likewise.
17442 * boot/i386/pc/diskboot.S: Likewise.
17443 * disk/i386/pc/biosdisk.c: Likewise.
17444 * disk/i386/pc/partition.c: Likewise.
17445 * font/manager.c: Likewise.
17446 * fs/ext2.c: Likewise.
17447 * fs/fat.c: Likewise.
17448 * include/pupa/boot.h: Likewise.
17449 * include/pupa/device.h: Likewise.
17450 * include/pupa/disk.h: Likewise.
17451 * include/pupa/dl.h: Likewise.
17452 * include/pupa/elf.h: Likewise.
17453 * include/pupa/err.h: Likewise.
17454 * include/pupa/file.h: Likewise.
17455 * include/pupa/font.h: Likewise.
17456 * include/pupa/fs.h: Likewise.
17457 * include/pupa/kernel.h: Likewise.
17458 * include/pupa/loader.h: Likewise.
17459 * include/pupa/misc.h: Likewise.
17460 * include/pupa/mm.h: Likewise.
17461 * include/pupa/net.h: Likewise.
17462 * include/pupa/normal.h: Likewise.
17463 * include/pupa/rescue.h: Likewise.
17464 * include/pupa/setjmp.h: Likewise.
17465 * include/pupa/symbol.h: Likewise.
17466 * include/pupa/term.h: Likewise.
17467 * include/pupa/types.h: Likewise.
17468 * include/pupa/i386/setjmp.h: Likewise.
17469 * include/pupa/i386/types.h: Likewise.
17470 * include/pupa/i386/pc/biosdisk.h: Likewise.
17471 * include/pupa/i386/pc/boot.h: Likewise.
17472 * include/pupa/i386/pc/console.h: Likewise.
17473 * include/pupa/i386/pc/init.h: Likewise.
17474 * include/pupa/i386/pc/kernel.h: Likewise.
17475 * include/pupa/i386/pc/linux.h: Likewise.
17476 * include/pupa/i386/pc/loader.h: Likewise.
17477 * include/pupa/i386/pc/memory.h: Likewise.
17478 * include/pupa/i386/pc/multiboot.h: Likewise.
17479 * include/pupa/i386/pc/partition.h: Likewise.
17480 * include/pupa/i386/pc/time.h: Likewise.
17481 * include/pupa/i386/pc/vga.h: Likewise.
17482 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17483 * include/pupa/util/getroot.h: Likewise.
17484 * include/pupa/util/misc.h: Likewise.
17485 * include/pupa/util/resolve.h: Likewise.
17486 * kern/device.c: Likewise.
17487 * kern/disk.c: Likewise.
17488 * kern/dl.c: Likewise.
17489 * kern/err.c: Likewise.
17490 * kern/file.c: Likewise.
17491 * kern/fs.c: Likewise.
17492 * kern/loader.c: Likewise.
17493 * kern/main.c: Likewise.
17494 * kern/misc.c: Likewise.
17495 * kern/mm.c: Likewise.
17496 * kern/rescue.c: Likewise.
17497 * kern/term.c: Likewise.
17498 * kern/i386/dl.c: Likewise.
17499 * kern/i386/pc/init.c: Likewise.
17500 * kern/i386/pc/lzo1x.S: Likewise.
17501 * kern/i386/pc/startup.S: Likewise.
17502 * loader/i386/pc/chainloader.c: Likewise.
17503 * loader/i386/pc/linux.c: Likewise.
17504 * loader/i386/pc/multiboot.c: Likewise.
17505 * normal/cmdline.c: Likewise.
17506 * normal/command.c: Likewise.
17507 * normal/main.c: Likewise.
17508 * normal/menu.c: Likewise.
17509 * normal/i386/setjmp.S: Likewise.
17510 * term/i386/pc/console.c: Likewise.
17511 * term/i386/pc/vga.c: Likewise.
17512 * util/console.c: Likewise.
17513 * util/genmoddep.c: Likewise.
17514 * util/misc.c: Likewise.
17515 * util/pupa-emu.c: Likewise.
17516 * util/resolve.c: Likewise.
17517 * util/unifont2pff.rb: Likewise.
17518 * util/i386/pc/biosdisk.c: Likewise.
17519 * util/i386/pc/getroot.c: Likewise.
17520 * util/i386/pc/pupa-mkimage.c: Likewise.
17521 * util/i386/pc/pupa-setup.c: Likewise.
17522
e6eced71 175232004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17524
17525 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17526 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17527 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17528 reading and reset it after reading.
17529 (pupa_ext2_close): Return PUPA_ERR_NONE.
17530
17531 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17532 Correct value.
17533 (struct linux_kernel_header): Add kernel_version and
17534 initrd_addr_max.
17535 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17536 pupa_file_read succeeds.
17537 (pupa_rescue_cmd_initrd): Implement.
17538
5aded270 175392003-12-03 Marco Gerards <metgerards@student.han.nl>
17540
17541 * fs/ext2.c (pupa_ext2_label): New function.
17542 (pupa_ext2_fs): Added label.
17543 * fs/fat.c (pupa_fat_label): New function.
17544 (pupa_fat_fs): Added label.
17545 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17546
17547 * kern/misc.c (pupa_strndup): New function.
17548 * include/pupa/misc.h (pupa_strndup): New prototype.
17549
17550 * include/pupa/normal.h: Include <pupa/err.h>.
17551 (pupa_set_history): New prototype.
17552 (pupa_iterate_commands): New prototype.
17553 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17554 <pupa/disk.h>, <pupa/file.h>.
17555 (hist_size): New variable.
17556 (hist_lines): Likewise.
17557 (hist_end): Likewise.
17558 (hist_used): Likewise.
17559 (pupa_set_history): New function.
17560 (pupa_history_get): Likewise.
17561 (pupa_history_add): Likewise.
17562 (pupa_history_replace): Likewise.
17563 (pupa_tab_complete): Likewise.
17564 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17565 completion shows partitionnames while completing partitions, this
17566 feature was suggested by Jeff Bailey.
17567 * normal/command.c (pupa_iterate_commands): New function.
17568 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17569 (pupa_normal_init): Initialize history buffer.
17570 (PUPA_MOD_INIT): Likewise.
17571 (pupa_normal_fini): Free the history buffer.
17572 (PUPA_MOD_FINI): Likewise.
17573
17574 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17575 key.
17576
17577 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17578 * configure.ac [i386]: Check for regparam bug.
17579 (NESTED_FUNC_ATTR) [! i386]: Defined.
17580
1f7315a3 175812003-11-17 Marco Gerards <metgerards@student.han.nl>
17582
17583 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17584 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17585 (pupa_emu_SOURCES): New variable.
17586 (pupa_emu_LDFLAGS): Likewise.
17587 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17588 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17589 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17590 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17591 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17592 (pupa_jmp_buf): New typedef.
17593 (pupa_setjmp) [PUPA_UTIL]: New macro.
17594 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17595 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17596 (pupa_refresh): New prototype.
17597 * include/pupa/util/getroot.h: New file.
17598 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17599 it.
17600 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17601 (pupa_rescue_cmd_cat): Likewise.
17602 (pupa_rescue_cmd_ls): Likewise.
17603 (pupa_rescue_cmd_testload): Likewise.
17604 (pupa_rescue_cmd_lsmod): Likewise.
17605 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17606 * normal/menu.c (run_menu): Likewise.
17607 * kern/term.c (pupa_cls): Likewise.
17608 (pupa_refresh): New function.
17609 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17610 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17611 * util/console.c: New file.
f19dbdb7 17612
1f7315a3 17613 * util/i386/pc/getroot.c: New file.
17614 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17615 (pupa_putchar): New function.
17616 (pupa_refresh): Likewise.
17617 (xgetcwd): Function moved to ...
17618 (strip_extra_slashes): Likewise.
17619 (get_prefix): Likewise.
f19dbdb7 17620 * util/i386/pc/getroot.c: ... here.
1f7315a3 17621 (find_root_device): Function moved and renamed to...
17622 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17623 Changed all callers.
17624 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17625 and renamed to...
17626 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17627 Changed all callers.
17628 * util/misc.c (pupa_memalign): New function.
17629 (pupa_mm_init_region): Likewise.
17630 (pupa_register_exported_symbols): Likewise.
17631 (pupa_putchar): Function removed.
17632 * util/pupa-emu.c: New file.
17633
9a5c1ade 176342003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17635
17636 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17637 (_multiboot_mod_SOURCES): New variable.
17638 (_multiboot_mod_CFLAGS): Likewise.
17639 * loader/i386/pc/multiboot.c: New file.
17640 * include/pupa/i386/pc/multiboot.h: Likewise.
17641 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17642 (pupa_multiboot_real_boot): New function.
17643 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17644 (pupa_multiboot_real_boot): New prototype.
17645 (pupa_rescue_cmd_multiboot): Likewise
17646 (pupa_rescue_cmd_module): Likewise.
17647
17648 * kern/loader.c (pupa_loader_set): Continue when
17649 pupa_loader_unload_func() fails.
17650 (pupa_loader_unset): New function.
17651 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17652
17653 * kern/misc.c (pupa_stpcpy): New function.
17654 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17655
8e72a9c0 176562003-11-12 Marco Gerards <metgerards@student.han.nl>
17657
17658 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17659 for available extensions.
17660
17661 * include/pupa/i386/pc/time.h: New file.
17662 * kern/disk.c: Include <pupa/machine/time.h>.
17663 (PUPA_CACHE_TIMEOUT): New macro.
17664 (pupa_last_time): New variable.
17665 (pupa_disk_open): Flush the cache when there was a timeout.
17666 (pupa_disk_close): Reset the timer.
17667 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17668 pupa_currticks.
17669 * util/misc.c: Include <sys/times.h>
17670 (pupa_get_rtc): New function.
17671
c4adbd32 176722003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17673
17674 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17675 as blocks.
17676 (pupa_ext2_get_file_block): Use blocks member.
17677
17678 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17679 first block. Return -1 instead of pupa_errno on error.
17680
bfd30f06 176812003-10-27 Marco Gerards <metgerards@student.han.nl>
17682
17683 * README: In the pupa-mkimage example use _chain instead of chain
17684 and ext2 instead of fat.
17685 * TODO: Replace ext2fs with jfs as an example. Add an item for
17686 adding journal playback for ext2fs.
17687 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17688 (pkgdata_MODULES): Added ext2.mod.
17689 (ext2_mod_SOURCES): New variable.
17690 (ext2_mod_CFLAGS): Likewise.
17691 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17692 * include/pupa/misc.h (pupa_strncpy): New prototype.
17693 (pupa_strcat): Likewise.
17694 (pupa_strncmp): Likewise.
17695 * kern/misc.c (pupa_strcat): Enable function.
17696 (pupa_strncpy): New function.
17697 (pupa_strncmp): Likewise.
17698 * fs/ext2.c: New file.
f19dbdb7 17699
bfd30f06 17700 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17701 when the read failed before retrying.
17702 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17703 (_FILE_OFFSET_BITS): Likewise.
17704 * configure.ac: Added AC_SYS_LARGEFILE.
17705
98d15063 177062003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17707
17708 * genmk.rb (PModule#rule): Make sure to get only symbol names
17709 from the output of nm.
17710 Reported by Robert Millan <zeratul2@wanadoo.es>.
17711
18d9c7cd 177122003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17713
17714 I forgot to check in these changes for a long time. This adds
17715 incomplete support for VGA console, and this is still very
17716 buggy. Also, a lot of consideration is required for I18N,
17717 UNICODE, and VGA font issues. Therefore, assume that this is
17718 such that "better than nothing".
f19dbdb7 17719
18d9c7cd 17720 * font/manager.c: New file.
17721 * include/pupa/font.h: Likewise.
17722 * include/pupa/i386/pc/vga.h: Likewise.
17723 * term/i386/pc/vga.c: Likewise.
17724 * util/unifont2pff.rb: Likewise.
17725
17726 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17727 (pkgdata_MODULES): Added vga.mod and font.mod.
17728 (vga_mod_SOURCES): New variables.
17729 (vga_mod_CFLAGS): Likewise.
17730 (font_mod_SOURCES): Likewise.
17731 (font_mod_CFLAGS): Likewise.
17732
17733 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17734
17735 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 17736 (struct pupa_term): Added init and fini.
18d9c7cd 17737 Changed the argument of putchar to pupa_uint32_t.
17738
17739 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17740 (pupa_console_real_putchar): New prototype.
17741 (pupa_console_putchar): Removed.
17742 (pupa_console_checkkey): Exported.
17743 (pupa_console_getkey): Likewise.
17744
17745 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17746 characters.
17747
17748 * kern/term.c (pupa_term_set_current): Rewritten.
17749 (pupa_putchar): Likewise.
17750 (pupa_putcode): New function.
17751
17752 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17753 (pupa_console_real_putchar): ... this.
17754 (pupa_vga_set_mode): New function.
17755 (pupa_vga_get_font): Likewise.
17756
17757 * normal/command.c: Include pupa/term.h.
17758 (terminal_command): New function.
17759 (pupa_command_init): Register the command "terminal".
17760
17761 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17762 (DISP_UP): Likewise.
17763 (DISP_RIGHT): Likewise.
17764 (DISP_DOWN): Likewise.
17765 (DISP_HLINE): Likewise.
17766 (DISP_VLINE): Likewise.
17767 (DISP_UL): Likewise.
17768 (DISP_UR): Likewise.
17769 (DISP_LL): Likewise.
17770 (DISP_LR): Likewise.
17771
17772 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 17773
977329f5 177742003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17775
17776 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17777 FIX. Reverse the path_list.
17778
17779 * include/pupa/normal.h: Export pupa_register_command and
17780 pupa_unregister_command.
17781
17782 * hello/hello.c (pupa_cmd_hello): New module.
17783 * conf/i386-pc.rmk: Added hello.mod.
17784
1f5ab428 177852003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17786
17787 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 17788
1f5ab428 17789 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17790 (compress_kernel): New variable.
17791 (generate_image): Heavily modified to support compressing a
17792 large part of the core image.
17793
17794 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17795 leak.
17796 (pupa_util_load_image): New function.
17797
17798 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17799 (pupa_compressed_size): New variable.
17800 (codestart): Enable Gate A20 here.
17801 Decompress the compressed part of the core image.
17802 Rearrange the code to put functions and variables which are
17803 required for initialization in the non-compressed part.
17804 Include lzo1x.S.
17805
17806 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17807 here.
17808
17809 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17810
f19dbdb7 17811 * include/pupa/i386/pc/kernel.h
1f5ab428 17812 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17813 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17814 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17815 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17816 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17817
17818 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17819
17820 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17821 (Utility#rule): Likewise.
17822
17823 * configure.ac: Check if LZO is available.
17824
ce5bf700 178252003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17826
17827 * include/pupa/normal.h: New file.
17828 * include/pupa/setjmp.h: Likewise.
17829 * include/pupa/i386/setjmp.h: Likewise.
17830 * normal/cmdline.c: Likewise.
17831 * normal/command.c: Likewise.
17832 * normal/main.c: Likewise.
17833 * normal/menu.c: Likewise.
17834 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17835
ce5bf700 17836 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17837 (pupa_rescue_cmd_initrd): Likewise.
17838
17839 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17840 Likewise.
17841
17842 * kern/i386/pc/startup.S (translation_table): New variable.
17843 (translate_keycode): New function.
17844 (pupa_console_getkey): Call translate_keycode.
17845
17846 * kern/rescue.c (attempt_normal_mode): New function.
17847 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17848 it failed, print a message.
17849
17850 * kern/mm.c (pupa_real_malloc): Print more information when a
17851 free magic is broken.
17852 (pupa_free): If the first free header is not free actually, set
17853 it to P.
17854
17855 * kern/main.c (pupa_load_normal_mode): Just load the module
17856 "normal".
17857 (pupa_main): Don't print the message
17858 "Entering into rescue mode..." here.
17859
17860 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17861 Declared.
17862 (pupa_rescue_cmd_initrd): Likewise.
17863 (pupa_rescue_cmd_initrd): Likewise.
17864
17865 * include/pupa/symbol.h (FUNCTION): Specify the type.
17866 (VARIABLE): Likewise.
17867
17868 * include/pupa/err.h (pupa_err_t): Added
17869 PUPA_ERR_UNKNOWN_COMMAND.
17870
17871 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17872 (pupa_dl_get_prefix): Likewise.
17873
17874 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17875 Added _chain.mod and _linux.mod instead of chain.mod and
17876 linux.mod.
17877 (chain_mod_SOURCES): Renamed to ...
17878 (_chain_mod_SOURCES): ... this.
17879 (chain_mod_CFLAGS): Renamed to ...
17880 (_chain_mod_CFLAGS): ... this.
17881 (linux_mod_SOURCES): Renamed to ...
17882 (_linux_mod_SOURCES): ... this.
17883 (linux_mod_CFLAGS): Renamed to ...
17884 (_linux_mod_CFLAGS): ... this.
17885 (normal_mod_SOURCES): New variable.
17886 (normal_mod_CFLAGS): Likewise.
17887 (normal_mod_ASFLAGS): Likewise.
17888
178892003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17890
17891 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17892 possible.
17893
fe6b695a 17894 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17895 recursively.
17896 (pupa_dl_unref): Unrefer depending modules recursively.
17897 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17898 a module is unloaded before one depending on that module is
17899 unloaded.
17900 (pupa_dl_unload): Unload depending modules explicitly,
17901 if possible.
17902
c04da074 179032003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17904
17905 * include/pupa/i386/pc/linux.h: New file.
17906 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17907
c04da074 17908 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17909 Removed.
17910 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17911 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17912 of PUPA_CHAINLOADER_BOOT_SECTOR.
17913
17914 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17915 (pupa_linux_prot_size): New variable.
17916 (pupa_linux_tmp_addr): Likewise.
17917 (pupa_linux_real_addr): Likewise.
17918 (pupa_linux_boot_zimage): New function.
17919 (pupa_linux_boot_bzimage): Likewise.
17920
17921 * kern/i386/pc/init.c (struct mem_region): New structure.
17922 (MAX_REGIONS): New macro.
17923 (mem_regions): New variable.
17924 (num_regions): Likewise.
17925 (pupa_os_area_addr): Likewise.
17926 (pupa_os_area_size): Likewise.
17927 (pupa_lower_mem): Likewise.
17928 (pupa_upper_mem): Likewise.
17929 (add_mem_region): New function.
17930 (compact_mem_regions): Likewise.
17931 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17932 the size of the conventional memory and that of so-called upper
17933 memory (before the first memory hole).
17934 Instead of adding each found region to free memory, use
17935 add_mem_region and add them after removing overlaps.
17936 Also, add only 1/4 of the upper memory to free memory. The rest
17937 is used for loading OS images. Maybe this is ad hoc, but this
17938 makes it much easier to relocate OS images when booting.
17939
17940 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17941 (pupa_enter_rescue_mode): Don't register initrd and module.
17942
17943 * kern/mm.c: Include pupa/dl.h.
17944
17945 * kern/main.c: Include pupa/file.h and pupa/device.h.
17946
17947 * kern/loader.c (pupa_loader_load_module_func): Removed.
17948 (pupa_loader_load_module): Likewise.
17949
17950 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17951 ``.o''.
17952
17953 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17954 (pupa_linux_tmp_addr): Likewise.
17955 (pupa_linux_real_addr): Likewise.
17956 (pupa_linux_boot_zimage): Likewise.
17957 (pupa_linux_boot_bzimage): Likewise.
17958
17959 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17960 (pupa_upper_mem): Likewise.
17961 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17962 module is too dangerous.
17963
17964 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17965 (pupa_os_area_size): Likewise.
17966 (pupa_loader_set): Remove the first argument. Loader doesn't
17967 manage modules or initrd any longer.
17968 (pupa_loader_load_module): Removed.
17969
17970 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17971 (linux_mod_SOURCES): New variable.
17972 (linux_mod_CFLAGS): Likewise.
17973
a13f9237 179742003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17975
17976 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17977 the length of a blocklist correctly.
17978
17979 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17980 Use ioctl only if the OS file is a block device.
17981 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17982 not very useful for normal files.
17983
17984 * kern/main.c (pupa_set_root_dev): New function.
17985 (pupa_load_normal_mode): Likewise.
17986 (pupa_main): Call those above.
17987
17988 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17989 pupa_uint16_t.
17990
17991 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17992
a5ffe966 179932003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17994
17995 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17996 (setup): Configure the installed partition information and the
17997 dl prefix.
17998
17999 * loader/i386/pc/chainloader.c (my_mod): New variable.
18000 (pupa_chainloader_unload): New function.
18001 (pupa_rescue_cmd_chainloader): Refer itself.
18002 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18003
18004 * kern/i386/pc/startup.S (install_partition): Removed.
18005 (version_string): Likewise.
18006 (config_file): Likewise.
18007 (pupa_install_dos_part): New variable.
18008 (pupa_install_bsd_part): Likewise.
18009 (pupa_prefix): Likewise.
18010 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18011
18012 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18013 and pupa/misc.h.
18014 (make_install_device): New function.
18015 (pupa_machine_init): Set the dl prefix.
18016
18017 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18018 (buf): Renamed to ...
18019 (linebuf): ... this.
18020 (pupa_rescue_cmd_prefix): New function.
18021 (pupa_rescue_cmd_insmod): Likewise.
18022 (pupa_rescue_cmd_rmmod): Likewise.
18023 (pupa_rescue_cmd_lsmod): Likewise.
18024 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18025 rmmod and lsmod.
18026
18027 * kern/mm.c (pupa_memalign): If failed even after invalidating
18028 disk caches, unload unneeded modules and retry.
18029
18030 * kern/misc.c (pupa_memmove): New function.
18031 (pupa_memcpy): Removed.
18032 (pupa_strcpy): New function.
18033 (pupa_itoa): Made static.
18034
18035 * kern/dl.c (pupa_dl_iterate): New function.
18036 (pupa_dl_ref): Likewise.
18037 (pupa_dl_unref): Likewise.
18038 (pupa_dl_unload): Return if succeeded or not.
18039 (pupa_dl_unload_unneeded): New function.
18040 (pupa_dl_unload_all): Likewise.
18041 (pupa_dl_init): Renamed to ...
18042 (pupa_dl_set_prefix): ... this.
18043 (pupa_dl_get_prefix): New function.
18044
18045 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18046 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18047 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18048 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18049 (pupa_install_dos_part): Declared.
18050 (pupa_install_bsd_part): Likewise.
18051 (pupa_prefix): Likewise.
18052 (pupa_boot_drive): Likewise.
18053
18054 * include/pupa/types.h: Fix a typo.
18055
18056 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18057 pupa_memmove.
18058 (pupa_memmove): Declared.
18059 (pupa_strcpy): Likewise.
18060
18061 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18062 pupa_mod_init takes one argument, its own module.
18063 (pupa_dl_unload_unneeded): Declared.
18064 (pupa_dl_unload_all): Likewise.
18065 (pupa_dl_ref): Likewise.
18066 (pupa_dl_unref): Likewise.
18067 (pupa_dl_iterate): Likewise.
18068 (pupa_dl_init): Renamed to ...
18069 (pupa_dl_set_prefix): ... this.
18070 (pupa_dl_get_prefix): Declared.
18071
18072 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 18073 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 18074 unloaded.
18075 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18076 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18077
18078 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18079 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18080
012d7999 180812003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18082
18083 * util/i386/pc/pupa-setup.c (setup): Define the internal
18084 function find_first_partition_start at the top level, because GCC
18085 3.0.x cannot compile internal functions in deeper scopes
18086 correctly.
18087 (find_root_device): Use lstat instead of stat.
18088 Don't follow symbolic links.
18089 Fix the path-constructing code.
18090
18091 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18092 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18093 by a BLKGETSIZE ioctl first, because block devices don't fill
18094 the member st_mode of the structure stat on Linux.
18095 [__linux__] (linux_find_partition): Use a temporary buffer
18096 REAL_DEV for the working space. Copy it to DEV before returning.
18097 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18098 buffer cache consistent.
18099 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18100 strncmp. The previous value was merely wrong.
18101 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18102
18103 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18104 FAT size is 12. The previous value was merely wrong.
18105
18106 * kern/main.c (pupa_main): Don't split the starting message from
18107 newlines.
18108
18109 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18110 LF, because BIOS goes crazy about character attributes in this
18111 case.
18112
1cc73a62 181132003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18114
18115 * include/i386/pc/util/biosdisk.h: New file.
18116 * util/i386/pc/biosdisk.c: Likewise.
18117 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 18118
1cc73a62 18119 * Makefile.in (INCLUDE_DISTFILES): Added
18120 include/pupa/i386/pc/util/biosdisk.h.
18121 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18122 directory util/i386/pc.
18123 (install-local): Added a rule for sbin_UTILITIES.
18124 (uninstall): Likewise.
18125
18126 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18127
18128 * util/misc.c (xrealloc): New function.
18129 (pupa_malloc): Likewise.
18130 (pupa_free): Likewise.
18131 (pupa_realloc): Likewise.
18132 (pupa_stop): Likewise.
18133 (pupa_putchar): Likewise.
18134
18135 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18136
18137 * include/pupa/util/misc.h (xrealloc): Declared.
18138
18139 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18140 macro.
18141 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18142 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18143
18144 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18145 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18146
18147 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18148 way should be implemented.
18149 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18150
18151 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18152 the size of NAME for safety.
18153 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18154 0x88.
18155
18156 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18157 (pupa_setup_SOURCES): Likewise.
18158
18159 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18160
08b70fe8 181612002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18162
18163 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18164 bunch of pushl's from pusha, because this destroys the return
18165 value.
18166
62ddcc8f 181672002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18168
18169 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18170 This means that any missing prototypes could be fatal. Also, you
18171 must take care when writing assembly code. See the comments at
18172 the beginning of startup.S, for more details.
f19dbdb7 18173
62ddcc8f 18174 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18175 compilation mechanism.
18176 (pupa_chainloader_real_boot): Likewise.
18177 (pupa_biosdisk_rw_int13_extensions): Likewise.
18178 (pupa_biosdisk_rw_standard): Likewise.
18179 (pupa_biosdisk_check_int13_extensions): Likewise.
18180 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18181 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18182 (pupa_get_memsize): Likewise.
18183 (pupa_get_mmap_entry): Likewise.
18184 (pupa_console_putchar): Likewise.
18185 (pupa_console_setcursor): Likewise.
18186 (pupa_getrtsecs): Use pushl instead of push.
18187
18188 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18189 memory instead of the stack for a mmap entry, because some
18190 BIOSes may ignore the maximum size and overflow.
18191
18192 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18193
18194 * genmk.rb (PModule#rule): Compile automatically generated
18195 sources with module-specific CFLAGS as well as other sources.
18196
9962ed99 181972002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18198
18199 * configure.ac: Check ld.
18200 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18201 respectively, before checking endianness and sizes.
18202
18203 * Makefile.in (LD): New variable.
f19dbdb7 18204
abdfc3c5 182052002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18206
18207 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18208
6a161fa9 182092002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18210
18211 * Changelog: New file.
18212