]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-07-07 Pavel Roskin <proski@gnu.org>
[grub2.git] / ChangeLog
CommitLineData
8279cade 12009-07-07 Pavel Roskin <proski@gnu.org>
2
25f9a05a 3 * include/grub/util/console.h: New file.
4 * util/console.c: Use it instead of grub/machine/console.h.
5 * util/grub-emu.c: Likewise.
6
8279cade 7 * lib/arg.c (find_long_option): Remove.
8 (find_long): Add `len' argument, make `s' const char *.
9 (grub_arg_parse): Parse long options in place, not in a
10 temporary buffer.
11
4a11b60f 122009-07-06 Pavel Roskin <proski@gnu.org>
13
99f68041 14 * commands/search.c (search_fs): Fix potential NULL pointer
15 dereference.
16
4a11b60f 17 * commands/search.c (search_fs): Replace QUID macro with quid_fn
18 function pointer.
19
e110f4de 202009-07-06 Daniel Mierswa <impulze@impulze.org>
21
22 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
23 comparison.
24
46eeb6a2 252009-07-05 Pavel Roskin <proski@gnu.org>
26
bab74958 27 * include/grub/i386/linux.h (struct linux_kernel_params):
28 Restore padding3, it's still needed.
29
46eeb6a2 30 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
31 FreeBSD.
32 * util/osdetect.lua: Likewise.
33
b4a1dc79 342009-07-05 Bean <bean123ch@gmail.com>
35
36 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
37
38 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
39 (grub_lua_getenv): Likewise.
40 (grub_lua_setenv): Likewise.
41 (save_errno): New function.
42 (push_result): Likewise.
43 (grub_lua_enum_device): Likewise.
44 (grub_lua_enum_file): Likewise.
45 (grub_lua_file_open): Likewise.
46 (grub_lua_file_close): Likewise.
47 (grub_lua_file_seek): Likewise.
48 (grub_lua_file_read): Likewise.
49 (grub_lua_file_getline): Likewise.
50 (grub_lua_file_getsize): Likewise.
51 (grub_lua_file_getpos): Likewise.
52 (grub_lua_file_eof): Likewise.
53 (grub_lua_file_exist): Likewise.
54 (grub_lua_add_menu): Likewise.
55
56 * script/lua/grub_lua.h (isupper): New inline function.
57 (islower): Likewise.
58 (ispunct): Likewise.
59 (isxdigit): Likewise.
60 (strcspn): Change to normal function.
61 (strpbkr): New function declaration.
62 (memchr): Likewise.
63
64 * script/lua/grub_main.c (scan_str): New function.
65 (strcspn): Likewise.
66 (strpbrk): Likewise.
67 (memchr): Likewise.
68
69 * script/lua/linit.c (lualibs): Enable the string library.
70
71 * util/osdetect.lua: New file.
72
2da92295 732009-07-04 Robert Millan <rmh.grub@aybabtu.com>
74
75 * include/grub/i386/linux.h (struct linux_kernel_params): Add
76 `capabilities' member.
77
b2582ec9 782009-07-02 Pavel Roskin <proski@gnu.org>
79
80 * genparttoollist.sh: Add missing newline at the end.
81
32622956 822009-07-01 Pavel Roskin <proski@gnu.org>
83
87a7339e 84 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
85
d23af54e 86 * util/hostdisk.c (open_device): Remove `const' from
87 `sysctl_size', as sysctlbyname() can change it (in this case it
88 doesn't actually happen).
89
c94b18a9 90 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
91 using signed long int constants.
92
c6cd3ef0 93 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
94 constant to avoid a warning on FreeBSD.
95
0df63420 96 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
97 where it's needed.
98
999577f1 99 * Makefile.in: Install include/grub/machine symlink.
100
6f41557f 101 * Makefile.in: When installing symlinks, use "cp -fR", which
102 works on FreeBSD and MacOSX.
103 From Yves Blusseau <cl7m42e02@sneakemail.com>
104
c8d22988 105 * kern/dl.c (grub_dl_resolve_symbol): Make static.
106 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
107
1b96e952 108 * util/misc.c: Move grub_reboot() and grub_halt() ...
109 * util/grub-emu.c: ... here. Make main_env static.
110 * include/grub/util/misc.h: Remove main_env.
111
2ef0084d 112 * kern/mm.c: Use correct format to print size_t.
113
32622956 114 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
115 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
116 * kern/powerpc/dl.c: Likewise.
117 * kern/sparc64/dl.c: Likewise.
118 * kern/x86_64/dl.c: Likewise.
119
3f7f0cd0 1202009-07-01 Robert Millan <rmh.grub@aybabtu.com>
121
122 Fix grub-emu build on sparc64-ieee1275.
123
124 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
126
211d06b5 1272009-07-01 Robert Millan <rmh.grub@aybabtu.com>
128
129 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
130 (grub_reboot, grub_halt): New functions.
131
132 * util/i386/pc/misc.c: Delete. Update all users.
133 * util/sparc64/ieee1275/misc.c: Likewise.
134 * util/powerpc/ieee1275/misc.c: Likewise.
135
aaf53e3c 1362009-07-01 Robert Millan <rmh.grub@aybabtu.com>
137
138 * conf/i386.rmk (setjmp_mod_SOURCES)
139 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
140 * conf/common.rmk (setjmp_mod_SOURCES)
141 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
142 to use $(target_cpu).
143 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
144 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
145 * conf/powerpc-ieee1275.rmk: Likewise.
146 * conf/sparc64-ieee1275.rmk: Likewise.
147
148 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
149 $(target_cpu) for kern/$(target_cpu)/dl.c.
150 * conf/i386-efi.rmk: Likewise.
151 * conf/i386-ieee1275.rmk: Likewise.
152 * conf/x86_64-efi.rmk: Likewise.
153 * conf/i386-coreboot.rmk: Likewise.
154 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
155 $(target_cpu) for kern/$(target_cpu)/dl.c and for
156 kern/$(target_cpu)/cache.S.
157 * conf/sparc64-ieee1275.rmk: Likewise.
158
a337130b 1592009-07-01 Robert Millan <rmh.grub@aybabtu.com>
160
161 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
162 type to `grub_uint8_t', and adjust `padding9' accordingly.
163
c6fe4d53 1642009-06-29 Robert Millan <rmh.grub@aybabtu.com>
165
b09db61d 166 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
167
c6fe4d53 168 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
169 assembly in final jump, using register constraints.
170
b09db61d 171 (grub_linux_boot): For text mode, initialize `have_vga' using
172 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
173
174 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
175 right before the final jump.
176
177 Set `video_mode' to 0x3.
178
179 Document initialization of `video_page', `video_mode' and
180 `video_ega_bx'.
181
28333ad0 1822009-06-29 Robert Millan <rmh.grub@aybabtu.com>
183
184 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
185 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
186 and set GRUB_LINUX_FLAG_QUIET appropiately.
187
02164e1b 1882009-06-29 Robert Millan <rmh.grub@aybabtu.com>
189
190 Fix build on Debian / sparc.
191
192 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
193
18b6c557 1942009-06-28 Pavel Roskin <proski@gnu.org>
195
85f2aab6 196 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
197 fix a warning.
198
18b6c557 199 * util/grub.d/10_linux.in: Match SUSE style initrd names.
200
ad760f81 2012009-06-27 Robert Millan <rmh.grub@aybabtu.com>
202
203 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
204 `err'.
205
87a4623b 2062009-06-27 Robert Millan <rmh.grub@aybabtu.com>
207
208 Revert r2338.
209
210 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
211 file can't be opened. grub_file_open() is already supposed to set
212 grub_errno / grub_errmsg appropiately.
213 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
214
8231fb77 2152009-06-27 Pavel Roskin <proski@gnu.org>
2162009-06-27 Robert Millan <rmh.grub@aybabtu.com>
217
218 * include/grub/dl.h: Include grub/elf.h.
219 (struct grub_dl): Add symtab field.
220 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
221 GRUB_MODULES_MACHINE_READONLY.
222 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
223 of the header for read-only modules.
224 (grub_dl_unload): Free mod->symtab for read-only modules.
225 * kern/i386/dl.c: Use mod->symtab.
226 * kern/powerpc/dl.c: Likewise.
227 * kern/sparc64/dl.c: Likewise.
228 * kern/x86_64/dl.c: Likewise.
229
230 * conf/i386-qemu.rmk: New file.
231 * kern/i386/qemu/startup.S: Likewise.
232 * kern/i386/qemu/mmap.c: Likewise.
233 * boot/i386/qemu/boot.S: Likewise.
234 * include/grub/i386/qemu/time.h: Likewise.
235 * include/grub/i386/qemu/serial.h: Likewise.
236 * include/grub/i386/qemu/kernel.h: Likewise.
237 * include/grub/i386/qemu/console.h: Likewise.
238 * include/grub/i386/qemu/boot.h: Likewise.
239 * include/grub/i386/qemu/init.h: Likewise.
240 * include/grub/i386/qemu/machine.h: Likewise.
241 * include/grub/i386/qemu/loader.h: Likewise.
242 * include/grub/i386/qemu/memory.h: Likewise.
243
244 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
245 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
246 [qemu] (pkglib_IMAGES): Add `boot.img'.
247 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
248 [qemu] (boot_img_FORMAT): New variables.
249 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
250 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
251 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
252 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
253 [qemu] (kernel_img_FORMAT): New variables.
254
255 * configure.ac: Recognise `i386-qemu'.
256
257 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
258 (for no compression).
259 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
260 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
261 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
262 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
263 ifdefs).
264
97fe384e 2652009-06-27 Pavel Roskin <proski@gnu.org>
266
267 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
268 read.
269 * efiemu/prepare32.c: Likewise.
270 * efiemu/prepare64.c: Likewise.
271
c402ab17 2722009-06-26 Pavel Roskin <proski@gnu.org>
273
274 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
275 * include/grub/elf.h: Define symbols without "32" or "64" based
276 on GRUB_TARGET_WORDSIZE.
277 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
278 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
279 ELF definitions.
280 * efiemu/loadcore64.c: Likewise.
281 * loader/i386/bsd32.c: Likewise.
282 * loader/i386/bsd64.c: Likewise.
283 * kern/dl.c: Remove own ELF definitions.
284 * util/i386/efi/grub-mkimage.c: Likewise.
285
9bbdfd4d 2862009-06-23 Robert Millan <rmh.grub@aybabtu.com>
287
288 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
289 segment 0x0 unconditionally, because the reference generated by
290 GAS is an absolute address.
291
a42ce6e9 2922009-06-22 Robert Millan <rmh.grub@aybabtu.com>
293
294 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
295 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
296
c952cf92 2972009-06-22 Robert Millan <rmh.grub@aybabtu.com>
298
299 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
300 indexes. Check for -f explicitly.
cc3752ad 301 (search_file): Improve error message.
302 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 303
132a0a59 3042009-06-22 Robert Millan <rmh.grub@aybabtu.com>
305
306 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
307 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
308
387a140c 3092009-06-22 Robert Millan <rmh.grub@aybabtu.com>
310
311 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
312 * conf/i386-ieee1275.rmk: Likewise.
313 * conf/i386-coreboot.rmk: Likewise.
314
315 * kern/i386/pc/startup.S (grub_stop): Remove function.
316 * kern/i386/ieee1275/startup.S: Likewise.
317 * kern/i386/coreboot/startup.S: Likewise.
318 * kern/i386/misc.S (grub_stop): New function.
319
41da9665 3202009-06-22 Robert Millan <rmh.grub@aybabtu.com>
321
322 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
323 * kern/i386/realmode.S (real_to_prot): ... to here.
324
bf337234 3252009-06-22 Robert Millan <rmh.grub@aybabtu.com>
326
327 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
328 with `kernel.img'.
329 (kernel_elf_SOURCES): Rename to ...
330 (kernel_img_SOURCES): ... this.
331 (kernel_elf_HEADERS): Rename to ...
332 (kernel_img_HEADERS): ... this. Update all users.
333 (kernel_elf_ASFLAGS): Rename to ...
334 (kernel_img_ASFLAGS): ... this.
335 (kernel_elf_CFLAGS): Rename to ...
336 (kernel_img_CFLAGS): ... this.
337 (kernel_elf_LDFLAGS): Rename to ...
338 (kernel_img_LDFLAGS): ... this.
339 * conf/i386-coreboot.rmk: Likewise.
340 * conf/powerpc-ieee1275.rmk: Likewise.
341
342 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
343 with "kernel.img".
344
f52196ff 3452009-06-21 Pavel Roskin <proski@gnu.org>
346
c3cee413 347 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
348 to match nested functions.
349 * loader/sparc64/ieee1275/linux.c: Likewise.
350
f52196ff 351 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
352
58750afc 3532009-06-21 Robert Millan <rmh.grub@aybabtu.com>
354
355 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
356 all i386 platforms.
357
15355c7d 3582009-06-21 Robert Millan <rmh.grub@aybabtu.com>
359
360 Fix asm file handling on ELF, and remove workarounds.
361
362 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
363 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
364 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
365 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
366
3f3ec72b 3672009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
368
369 Load BSD ELF modules
370
371 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
372 and loader/i386/bsd64.c
373 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
374 (FREEBSD_MODTYPE_ELF_MODULE): New definition
375 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
376 (grub_freebsd_load_elfmodule32): New declaration
377 (grub_freebsd_load_elfmoduleobj64): Likewise
378 (grub_freebsd_load_elf_meta32): Likewise
379 (grub_freebsd_load_elf_meta64): Likewise
380 (grub_freebsd_add_meta): Likewise
381 (grub_freebsd_add_meta_module): Likewise
382 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
383 (grub_freebsd_add_meta_module): Likewise and move module-specific
384 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
385 (grub_cmd_freebsd): Add elf-kernel specific parts
386 based on grub_freebsd_add_meta_module
387 (grub_cmd_freebsd_module): Add type parsing moved from
388 grub_freebsd_add_meta_module
389 (grub_cmd_freebsd_module_elf): New function
390 (cmd_freebsd_module_elf): New variable
391 (GRUB_MOD_INIT): Register freebsd_module_elf
392 * loader/i386/bsd32.c: New file
393 * loader/i386/bsd64.c: Likewise
394 * loader/i386/bsdXX.c: Likewise
395 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
396 (grub_elf64_load): Likewise
397 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
398 All users updated
399 (grub_elf64_load_hook_t): Likewise
400
0db15301 4012009-06-21 Colin Watson <cjwatson@ubuntu.com>
402
403 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
404 variable.
405 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
406 don't write a menu entry for recovery mode.
407
546796c1 4082009-06-20 Robert Millan <rmh.grub@aybabtu.com>
409
410 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
411 after it's no longer needed.
412
cd7310d5 4132009-06-20 Robert Millan <rmh.grub@aybabtu.com>
414
415 * include/grub/i386/loader.h (grub_linux_prot_size)
416 (grub_linux_tmp_addr, grub_linux_real_addr)
417 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
418 GRUB_MACHINE_PCBIOS.
419 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
420 common grub_util_info() call to ...
421 (generate_image): ... here.
422 Fix use of uninitialized memory, comparison of signed with
423 unsigned integers and memory leak.
424 Remove bogus module address message.
425
ab32d3b5 4262009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
427
428 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
429 grub_raid_register
430 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
431
024ef597 4322009-06-19 Pavel Roskin <proski@gnu.org>
433
434 * configure.ac: Remove stray AC_MSG_CHECKING.
435
3ac72b51 4362009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
437
438 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 439
e14cd814 4402009-06-18 Pavel Roskin <proski@gnu.org>
441
442 * conf/common.rmk: Add fs_file.mod.
443 * disk/fs_file.c: New file.
444 * include/grub/disk.h (enum grub_disk_dev_id): Add
445 GRUB_DISK_DEVICE_FILE_ID.
446
26586d98 4472009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
448
449 Fix build with Apple's toolchain. Part 2
450
451 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
452 a fake start
453
26de2bcd 4542009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
455
456 Fix build with Apple's toolchain. Part 1
457
458 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
459 for long calls
460 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 461 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 462 Apple's toolchain
463
09b3490b 4642009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
465
466 Fix warnings
467
468 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
469 (decomp_block): initialize ch
470 use grub_memcpy instead of memcpy
471
c22a006a 4722009-06-17 Pavel Roskin <proski@gnu.org>
473
d3638678 474 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
475 version, use declarations needed to use vga_text as the startup
476 console.
477
c22a006a 478 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
479 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
480 the kernel.
481 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
482 and grub_at_keyboard_fini(), it's done on module load and
483 unload.
484
05b129e0 4852009-06-17 Felix Zielcke <fzielcke@z-51.de>
486
487 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
488 file can't be found.
489 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
490
cf24ed9e 4912009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
492
493 Fix newline handling
494
495 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 496 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 497 (grub_script_yylex): don't segfault on unterminated script
498 newline terminates command and variable
499
74aa8e4b 5002009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
501
502 avoid double grub_adjust_range call. Bug reported by David Simner
503
504 * kern/disk.c (grub_disk_write): change to raw disk access before
505 calling disk_read
506
1bd265f3 5072009-06-17 Colin Watson <cjwatson@ubuntu.com>
508
509 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
510 spaces, for the benefit of help2man.
511 * util/i386/efi/grub-mkimage.c (usage): Likewise.
512
a2d08c06 5132009-06-16 Pavel Roskin <proski@gnu.org>
514
515 * kern/i386/halt.c: Include grub/machine/init.h.
516 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
517
b97bcb19 5182009-06-16 Felix Zielcke <fzielcke@z-51.de>
519
520 * util/grub.d/30_os-prober.in: Use ${root} in the generated
521 drivemap menuentry.
522
0644f96c 5232009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
524
525 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
526 `echo' command.
527
3ef17a2e 5282009-06-16 Pavel Roskin <proski@gnu.org>
529
530 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
531 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
532 save %dx, we only need %dl and we never change it.
533 * boot/i386/pc/cdboot.S: Don't set the root drive.
534 * boot/i386/pc/pxeboot.S: Likewise.
535 * include/grub/i386/pc/boot.h: Remove
536 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
537 GRUB_BOOT_MACHINE_DRIVE_CHECK.
538 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
539 * kern/i386/pc/init.c (make_install_device): Remove references
540 to grub_root_drive.
541 * kern/i386/pc/startup.S: Likewise.
542 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
543
693fe637 5442009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
545
546 xnu_uuid command
547
548 * commands/xnu_uuid.c: new file
549 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
550 (xnu_uuid_mod_SOURCES): new variable
551 (xnu_uuid_mod_CFLAGS): likewise
552 (xnu_uuid_mod_LDFLAGS): likewise
553 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
554 * conf/i386-ieee1275.rmk: likewise
555 * conf/i386-pc.rmk: likewise
556 * conf/powerpc-ieee1275.rmk: likewise
557 * conf/sparc64-ieee1275.rmk: likewise
558 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
559
c9da87d0 5602009-06-16 Pavel Roskin <proski@gnu.org>
561
562 * configure.ac: Avoid '==' in test command, it's not portable.
563
9c6f4596 5642009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
565
566 Probe command
567
568 * commands/probe.c: new file
569 * conf/common.rmk (pkglib_MODULES): add probe.mod
570 (probe_mod_SOURCES): new variable
571 (probe_mod_CFLAGS): likewise
572 (probe_mod_LDFLAGS): likewise
573 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
574 * conf/i386-ieee1275.rmk: likewise
575 * conf/i386-pc.rmk: likewise
576 * conf/powerpc-ieee1275.rmk: likewise
577 * conf/sparc64-ieee1275.rmk: likewise
578
70b7f9fd 5792009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
580
581 Fix handling of string like \"hello\" and "a
582 b"
583
584 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
585 (grub_script_yylex): fix parsing of quoting, escaping and newline
586
71c79a6b 5872009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
588
dd74360c 589 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 590 handling
dd74360c 591
0644f96c 5922009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 593
594 * util/grub-mkconfig.in: Fix parsing of --output option.
595
e40893c3 5962009-06-12 Pavel Roskin <proski@gnu.org>
597
598 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
599 genmk.rb don't need to be generated or installed.
600
3a1acfe2 6012009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
602
603 * commands/i386/pc/drivemap_int13h.S: add more comments
604
3a4575d4 6052009-06-11 Pavel Roskin <proski@gnu.org>
606
0658e928 607 * Makefile.in (uninstall): Uninstall manuals.
608
ca0388f0 609 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
610 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
611 and update-grub_lib in two places.
612 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
613
e3b27c39 614 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
615 a compiler warning.
616
3a4575d4 617 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
618 `entry_lo' to fix variable shadowing.
619
af1f4f55 6202009-06-11 Christian Franke <franke@computer.org>
621
622 * kern/misc.c (__enable_execute_stack): Add missing return type
623 to prevent gcc warning.
624
5225e649 6252009-06-11 Felix Zielcke <fzielcke@z-51.de>
626
627 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
628
7d83bd47 6292009-06-11 Pavel Roskin <proski@gnu.org>
630
c1cb63ba 631 * Makefile.in: Don't rely on any scripts being executable.
632 Always use $(SHELL) to run shell scripts.
633
7d83bd47 634 * configure.ac: Always define ___main if using -nostdlib. This
635 fixes tests on Cygwin.
636
948f48e7 6372009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
638
639 UDF fix
640
7d83bd47 641 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 642 is in bytes and not in blocks
7d83bd47 643
8ada9bc1 6442009-06-11 Pavel Roskin <proski@gnu.org>
645
646 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
647 warning.
648
25ad2323 6492009-06-11 Felix Zielcke <fzielcke@z-51.de>
650
651 * util/grub.d/30_os-prober.in: Fix a comment. Source
652 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
653 to set the root device. Place drivemap command in the generated
654 chain entry.
655
e65acb0c 6562009-06-11 Pavel Roskin <proski@gnu.org>
657
658 * configure.ac: Remove host_m32. Issues with 64-bit utilities
659 have long been resolved.
660
f285fe2d 6612009-06-11 Colin Watson <cjwatson@ubuntu.com>
662
bd47b0b5 663 * util/grub.d/10_linux.in: Capitalise "Linux".
664
f285fe2d 665 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
666
a0c62e4e 6672009-06-11 Pavel Roskin <proski@gnu.org>
668
b6783cb2 669 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
670 fix a gcc warning and ensure that the function won't ever exit.
671
dde032e8 672 * kern/i386/ieee1275/init.c: Add missing prototype for
673 grub_stop_floppy().
674
22cd079d 675 * loader/ieee1275/multiboot2.c [__i386__]: Include
676 grub/cpu/multiboot.h.
677
a0c62e4e 678 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
679 casts to short - they are not portable and cause warnings. Fix
680 use of uninitialized values in input_buf. Use ARRAY_SIZE.
681
63963d17 6822009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
683
684 Drivemap fixes
685
686 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
687 new function
688 (grub_get_root_biosnumber_saved): new variable
689 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
690 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 691 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 692 %dx after the call if necessary
693 * conf/common.rmk (pkglib_MODULES): remove boot.mod
694 (boot_mod_SOURCES): remove
695 (boot_mod_CFLAGS): remove
696 (boot_mod_LDFLAGS): remove
697 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
698 (boot_mod_SOURCES): new variable
699 (boot_mod_CFLAGS): likewise
700 (boot_mod_LDFLAGS): likewise
701 * conf/i386-efi.rmk: likewise
702 * conf/i386-ieee1275.rmk: likewise
703 * conf/i386-pc.rmk: likewise
704 * conf/powerpc-ieee1275.rmk: likewise
705 * conf/sparc64-ieee1275.rmk: likewise
706 * conf/x86_64-efi.rmk: likewise
707 * include/grub/i386/pc/biosnum.h: new file
708 * lib/i386/pc/biosnum.c: likewise
709 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
710 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
711 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 712
33abf7ae 7132009-06-10 Pavel Roskin <proski@gnu.org>
714
5ac35b35 715 * io/gzio.c (test_header): Don't reuse one buffer for all data.
716 Use separate variables. Read only the file size at the end, but
717 not the checksum that we don't use.
718
5c5215d5 719 * kern/file.c (grub_file_read): Use void pointer for the buffer.
720 Adjust all callers.
721
27d5fef7 722 * kern/ieee1275/openfw.c: Remove libc includes.
723 * kern/ieee1275/cmain.c: Likewise.
724 * include/grub/ieee1275/ieee1275.h: Likewise.
725
33abf7ae 726 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
727 compiler warnings.
728
d2d49665 7292009-06-10 Felix Zielcke <fzielcke@z-51.de>
730
731 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
732 `genparttoollist.sh'.
733 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
734 Add `*.sh' to the list find searches for and change `mdate.sh'
735 to `mdate-sh'.
736
fe052e37 7372009-06-10 Pavel Roskin <proski@gnu.org>
738
2763ac18 739 * include/grub/multiboot2.h: Provide compatibility defines for
740 multiboot2.h.
741 * include/multiboot2.h: Include stdint.h only if needed, using
742 angle brackets.
743 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
744 grub/multiboot2.h.
745 * loader/ieee1275/multiboot2.c: Likewise.
746 * loader/multiboot2.c: Likewise.
747 * loader/multiboot_loader.c: Likewise.
748
437e6adc 749 * configure.ac: Use -nostdlib when probing for the target. It
750 should not be required to have libc for the target.
751
06a6836c 752 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
753 they fail without libc headers for the target.
754 * include/grub/powerpc/libgcc.h: Use weak attribute for all
755 exports.
756 * include/grub/sparc64/libgcc.h: Likewise. Don't use
757 preprocessor conditionals.
758
fe052e37 759 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
760 build system doesn't need to be aware of the tar.c internals.
761
afd22553 7622009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 763
afd22553 764 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 765
6b787c4f 7662009-06-09 Robert Millan <rmh.grub@aybabtu.com>
767
768 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
769 disk limit to 26 for IDE, Virtio, Xen and SCSI.
770
7712009-06-09 Felix Zielcke <fzielcke@z-51.de>
772
773 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 774 aren't available if ata.mod gets used.
6b787c4f 775
473d1e45 7762009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 777
473d1e45 778 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 779 initialising controller.
473d1e45 780 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 781
255a27d4 7822009-06-08 Felix Zielcke <fzielcke@z-51.de>
783
784 * util/i386/pc/grub-install.in: Add a parameter --disk-module
785 to choose between ata and biosdisk module on i386-pc.
786
473d1e45 7872009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 788
d55842d8 789 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
790 Subclass and Programming Interface fields in terms of the 3 byte
791 Class Code register.
792 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
793
fa5db0b1 794 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
795 interface is OHCI. Add grub_dprintf for symmetry with
796 bus/usb/uhci.c.
797 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
798 interface is UHCI. Add interf variable for programming
799 interface. Print interface with class/subclass.
800
c0947beb 801 * bus/usb/ohci.c: Set interf with correct field.
802
69da8877 803 * bus/usb/uhci.c: Remove unneeded doubled lines.
804 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
805 Remove whitespace inside comment.
806
9e172e30 8072009-06-08 Robert Millan <rmh.grub@aybabtu.com>
808
809 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
810 as fallback an equivalent option without depth.
811
de65ee2b 8122009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
813
814 Not fail if unable to retrieve C/H/S on LBA disks
815
473d1e45 816 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 817 if unable to retrieve C/H/S on LBA disks
818
b57ea2c9 8192009-06-08 Pavel Roskin <proski@gnu.org>
820
821 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
822 about aliasing.
823
af361263 8242009-06-08 Felix Zielcke <fzielcke@z-51.de>
825
826 * Makefile.in (uninstall): Remove all $lib_DATA files.
827
4c9ec6b3 8282009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
829
830 Bugfix: install on partitionless device
831
832 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
833 is a whole disk
834
e76fc924 8352009-06-08 Felix Zielcke <fzielcke@z-51.de>
836
837 * Makefile.in (uninstall): Remove all $include_DATA files.
838
ba5a0d05 8392009-06-08 Felix Zielcke <fzielcke@z-51.de>
840
841 * commands/true.c: New file. Implement the true and false commands.
842 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
843 (true_mod_SOURCES): New variable.
844 (true_mod_CFLAGS): Likewise.
845 (true_mod_LDFLAGS): Likewise.
846
c8048e32 8472009-06-05 Colin D Bennett <colin@gibibit.com>
848
849 Optimized font character lookup using binary search instead of linear
850 search. Fonts now are required to have the character index ordered by
851 code point.
852
853 * font/font.c (load_font_index): Verify that fonts have ordered
854 character indices.
855 (find_glyph): Use binary search instead of linear search to find a
856 character in a font.
857
408305be 8582009-06-05 Michael Scherer <misc@mandriva.org>
859
860 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
861 uses case sensitive btree.
862 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
863 only for case insensitive filesystems.
864
8ee1e0d9 8652009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
866
867 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
868 * conf/common.rmk (search_mod_CFLAGS): likewise
869
a9966eb1 8702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
871
473d1e45 872 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 873 compensate a compiler bug
874
9e7100fb 8752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
876
473d1e45 877 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 878 instead of '\b'
473d1e45 879
ede21d71 8802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
881
882 Definitions for creating asm symbols with Apple's CC
883
884 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
885 [APPLE_CC] (VARIABLE): likewise
886
9dbf7653 8872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
888
889 Disable lnxboot.img when compiled
890 with Apple's CC
891
892 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
893 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
894 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
895 [! APPLE_CC] (CODE_LENG): skip
896 [! APPLE_CC] (setup_sects): likewise
897 [! APPLE_CC]: skip filling
473d1e45 898
e93cdc3d 8992009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
900
901 Address in trampolines based on 32-bit registers when compiled
902 with Apple's CC
903
473d1e45 904 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 905 for addresses
906 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
907
6c688477 9082009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
909
910 Avoid aliases when compiling with Apple's CC for PCBIOS machine
911
912 * kern/misc.c [APPLE_CC] (memcpy): new function
913 [APPLE_CC] (memmove): likewise
914 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 915 (memcpy): define alias conditionally on !APPLE_CC
6c688477 916 (memset): likewise
917 (abort): likewise
918 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
919 APPLE_CC are defined
920 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
921 (grub_assert_fail): make prototype conditional
922
e37ffc5c 9232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
924
925 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
926
473d1e45 927 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
928 grub-macho2img
e37ffc5c 929 (CLEANFILES): add grub-macho2img
930 (grub_macho2img_SOURCES): new variable
931 * kern/i386/pc/startup.S (bss_start): new variable
932 (bss_end): likewise
933 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
934 * util/grub-macho2img.c: new file
935
cf00df31 9362009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
937
938 Use objconv when compiling with Apple's CC
939
940 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
941 (efiemu64.o): likewise
942 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
943 when compiling with Apple's CC
944 (efiemu64_s.o): likewise
945 * configure.ac: check for objconv when compiling with Apple's CC
946 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 947
d119a20c 9482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
949
950 Define segment as well as section when compiling with
951 Apple's CC
952
953 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
954 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
955 (efiemu_convert_pointer): likewise
956 (efiemu_set_virtual_address_map): likewise
957 (efiemu_convert_pointer): likewise
958 (efiemu_getcrc32): likewise
959 (init_crc32_table): likewise
960 (reflect): likewise
961 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
962 (GRUB_MOD_DEP): likewise
473d1e45 963
c8600122 9642009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
965
966 Allow a compilation without -mcmodel=large
967
968 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
969 when compiled without -mcmodel=large
473d1e45 970 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 971 without -mcmodel=large
473d1e45 972 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 973 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 974
e8df1d4e 9752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
976
977 Remove nested functions in efiemu core
978
979 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 980
cc6c3ac1 9812009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
982
983 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
984
985 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
986 temporary storage
473d1e45 987 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
988 using Apple's CC
cc6c3ac1 989 (grub_cpu_is_tsc_supported): likewise
990 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 991
3e325901 9922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
993
994 Absolute addressing through constant with Apple's cc
995
996 * kern/i386/pc/startup.S: Define necessary constants
997 and address through it when using ABS with Apple's CC
998 * boot/i386/pc/diskboot.S: likewise
999 * boot/i386/pc/boot.S: likewise
1000 * boot/i386/pc/lnxboot.S: likewise
1001 * boot/i386/pc/cdboot.S: likewise
1002 * mmap/i386/pc/mmap_helper.S: likewise
1003 * commands/i386/pc/drivemap_int13h.S: likewise
1004
2b167a72 10052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1006
1007 Check if compiler is apple cc
1008
1009 * Makefile.in (ASFLAGS): new variable
1010 (TARGET_ASFLAGS): likewise
1011 (TARGET_MODULE_FORMAT): likewise
1012 (TARGET_APPLE_CC): likewise
1013 (OBJCONV): likewise
1014 (TARGET_IMG_CFLAGS): likewise
1015 (TARGET_CPPFLAGS): add includedir
1016 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1017 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1018 Check for linker script only if compiler isn't Apple's CC
1019 (TARGET_MODULE_FORMAT): set
1020 (TARGET_APPLE_CC): likewise
1021 (TARGET_ASFLAGS): likewise
1022 (ASFLAGS): likewise
1023 Check for objcopy only if compiler isn't Apple's CC
1024 Check for BSS symbol only if compiler isn't Apple's CC
1025 * genmk.rb: adapt nm options if we use Apple's utils
1026 * aclocal.m4 (grub_apple_cc): new test
1027 (grub_apple_target_cc): likewise
473d1e45 1028
fb14123e 10292009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1030
1031 Simplify sed expressions and improve awk
1032
1033 * Makefile.in (install-local): simplify sed expression
1034 * gencmdlist.sh: likewise
1035 * genmoddep.awk: avoid adding module as a dependency of itself
1036
5b889789 10372009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1038
1039 Add missing start symbols
1040
1041 * boot/i386/pc/boot.S: add start
fb14123e 1042 * boot/i386/pc/pxeboot.S: likewise
473d1e45 1043
fd2bf2e3 10442009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1045
1046 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 1047
1048 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 1049 (relocate_addresses): consider both r_addend and value at offset
1050 (make_mods_section): zerofill modinfo and header
1051 (convert_elf): write prefix here
473d1e45 1052
5389763d 10532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1054
1055 Use .asciz instead of .string
1056
1057 * i386/pc/diskboot.S: use .asciz instead of .string
1058 * i386/pc/boot.S: likewise
1059 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1060 (GRUB_MOD_NAME): likewise
473d1e45 1061
3eb5ed4e 10622009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1063
1064 gfxpayload support
1065
1066 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1067 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1068 (grub_video_setup): remove
1069 (grub_video_set_mode): new prototype
1070 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1071 (vid_mode): remove
1072 (linux_vesafb_res): compile only on PCBIOS
1073 (grub_linux_boot): support gfxpayload
1074 * loader/i386/pc/xnu.c (video_hook): new function
1075 (grub_xnu_set_video): support gfxpayload
1076 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1077 (DEFAULT_VIDEO_HEIGHT): likewise
1078 (DEFAULT_VIDEO_FLAGS): likewise
1079 (DEFAULT_VIDEO_MODE): new definition
1080 (video_hook): new function
1081 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 1082 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 1083 loading xnu
1084 * video/video.c (grub_video_setup): removed
473d1e45 1085 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 1086 grub_video_setup
1087
4b0e1143 10882009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1089
1090 Avoid calling biosdisk in drivemap
1091
1092 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1093 (revparse_biosdisk): likewise
1094 (list_mappings): derive name from id directly
1095 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 1096
fda6cb98 10972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1098
1099 Script fixes
1100
1101 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1102 (grub_lexer_param): add tokenonhold
1103 (grub_script_create_cmdline): remove cmdline. All callers updated
1104 (grub_script_function_create): make functionname
1105 grub_script_arg. All callers updated
1106 (grub_script_execute_argument_to_string): new prototype
1107 * kern/parser.c (state_transitions): reorder
1108 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 1109 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 1110 make global
1111 (grub_script_execute_cmdline): use new format
1112 * script/sh/function.c (grub_script_function_create): make functionname
1113 grub_script_arg. All callers updated
473d1e45 1114 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 1115 (grub_script_yylex): remove
1116 (grub_script_yylex2): renamed to ...
1117 (grub_script_yylex): ...renamed
1118 parse the expressions like a${b}c
1119 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1120 (GRUB_PARSER_TOKEN_VAR): remove
1121 (GRUB_PARSER_TOKEN_NAME): likewise
1122 ("if"): declare as typeless
1123 ("while"): likewise
1124 ("function"): likewise
1125 ("else"): likewise
1126 ("then"): likewise
1127 ("fi"): likewise
1128 (text): remove
1129 (argument): likewise
1130 (script): accept empty scripts and make exit on error
1131 (arguments): use GRUB_PARSER_TOKEN_ARG
1132 (function): likewise
1133 (command): move error handling to script
1134 (menuentry): move grub_script_lexer_ref before
473d1e45 1135 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 1136 argument. All callers updated
1137
f4448a07 11382009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1139
1140 Prevent GRUB from probing floppies during boot.
1141
1142 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1143 * commands/search.c (options): Add --no-floppy.
1144 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1145 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1146 --no-floppy when searching for UUIDs.
1147
2bf5885a 11482009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1149
1150 Simplify the code duplication in commands/search.c.
1151
1152 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1153 (search_fs): ... this. Update all users.
1154
f6fd460a 11552009-06-03 Felix Zielcke <fzielcke@z-51.de>
1156
1157 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1158
cbb3c83e 11592009-05-28 Pavel Roskin <proski@gnu.org>
1160
57788cfd 1161 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1162 Remove the original symlink explicitly.
1163
cbb3c83e 1164 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1165 just one slash. That's how grub_fshelp_find_file() does it.
1166
cd0d5e30 11672009-05-26 Pavel Roskin <proski@gnu.org>
1168
f0f8bbe2 1169 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1170 to `str'.
1171
cd0d5e30 1172 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1173 possibly unused.
1174
8c2cab51 11752009-05-25 Christian Franke <franke@computer.org>
1176
1177 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1178 register.
1179 (grub_atapi_identify): Add wait after drive select.
1180 (grub_ata_identify): Do more strict status register check before
1181 calling grub_atapi_identify (). Suppress error message if status
1182 register is 0x00 after command failure. Add status register
1183 check after PIO read to avoid bogus identify due to stuck DRQ.
1184 Thanks to Pavel Roskin for testing.
1185 (grub_device_initialize): Remove unsafe status register check.
1186 Thanks to 'phcoder' for problem report and patch.
1187 Prevent sign extension in debug message.
1188
230c0ad6 11892009-05-23 Colin D Bennett <colin@gibibit.com>
1190
1191 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1192 definition file, and functions defined in `normal/menu.c' have had
1193 their prototypes moved to `include/grub/menu.h' for consistency.
1194
1195 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1196 from normal.h.
1197 (grub_menu_get_entry): Likewise.
1198 (grub_menu_get_timeout): Likewise.
1199 (grub_menu_set_timeout): Likewise.
1200 (grub_menu_execute_entry): Likewise.
1201 (grub_menu_execute_with_fallback): Likewise.
1202 (grub_menu_entry_run): Likewise.
1203
1204 * include/grub/normal.h: Re-ordered and grouped function
1205 prototypes by file that the function is defined in.
1206 (grub_menu_execute_callback): Removed; moved to menu.h.
1207 (grub_menu_get_entry): Likewise.
1208 (grub_menu_get_timeout): Likewise.
1209 (grub_menu_set_timeout): Likewise.
1210 (grub_menu_execute_entry): Likewise.
1211 (grub_menu_execute_with_fallback): Likewise.
1212 (grub_menu_entry_run): Likewise.
1213 (grub_menu_addentry): Renamed from this ...
1214 (grub_normal_add_menu_entry): ... to this.
1215
1216 * normal/main.c (grub_menu_addentry): Renamed from this ...
1217 (grub_normal_add_menu_entry): ... to this.
1218
1219 * script/sh/execute.c (grub_script_execute_menuentry): Update
1220 reference to renamed grub_menu_addentry function.
1221
861f03a5 12222009-05-23 Felix Zielcke <fzielcke@z-51.de>
1223
1224 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1225
96b1619a 12262009-05-22 Pavel Roskin <proski@gnu.org>
1227
bf6a5fb2 1228 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1229 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1230 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1231 compiling for the i386 targets, but not for the utilities.
1232
96b1619a 1233 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1234 to grub_uint8_t.
1235 (grub_root_drive): Likewise.
1236 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1237 remove alignment.
1238 (grub_root_drive): Change size to byte.
1239 (grub_start_addr): Remove.
1240 (grub_end_addr): Likewise.
1241 (grub_apm_bios_info): Likewise.
1242
b729776b 12432009-05-21 Felix Zielcke <fzielcke@z-51.de>
1244
1245 * normal/i386: Remove.
1246 * normal/powerpc: Likewise.
1247 * normal/sparc64: Likewise.
1248 * normal/x86_64: Likewise.
1249
0a15ce80 12502009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1251
1252 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 1253 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 1254 * loader/i386/xnu_helper.S: Likewise
d6da58e6 1255
33db9015 12562009-05-18 Colin D Bennett <colin@gibibit.com>
1257
d6da58e6 1258 Display error messages when parsing a Lua statement fails.
1259 Previously, executing a syntactically invalid statement like
1260 ")foo" or "bar;" would silently fail.
33db9015 1261
1262 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 1263 (grub_lua_parse_line): Improved reporting of Lua parser and
1264 execution errors.
33db9015 1265
46422c89 12662009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1267
1268 Remove -Werror which causes build to fail on some systems
1269
1270 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1271 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1272 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 1273
22f53a96 12742009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1275
1276 trampoline for linux on 64-bit platform
1277
18f547ad 1278 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1279 loader/i386/efi/linux_trampoline.S
1280 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 1281 declaration
d6da58e6 1282 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1283 here
22f53a96 1284 * loader/i386/linux_trampoline.S: moved here
d6da58e6 1285 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1286 trampoline
22f53a96 1287 (jumpvector): removed
1288 (grub_linux_trampoline_start): new declaration
1289 (grub_linux_trampoline_end): likewise
1290 (grub_linux_boot): use trampoline when on 64-bit platform
1291 * loader/i386/linux.c: likewise
1292
cb5a0f40 12932009-05-16 Pavel Roskin <proski@gnu.org>
1294
1295 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1296 const to avoid a warning.
1297 (grub_lua_setenv): Likewise.
1298 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1299 lmsg to fix a warning.
1300
334f2c28 13012009-05-16 Felix Zielcke <fzielcke@z-51.de>
1302
1303 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 1304 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1305 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1306 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1307 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1308 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1309 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1310 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 1311
59e5d3ec 13122009-05-16 Felix Zielcke <fzielcke@z-51.de>
1313
1314 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1315
9d87a1ba 13162009-05-16 Bean <bean123ch@gmail.com>
1317
1318 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1319 (lua_mod_SOURCES): New variable.
1320 (lua_mod_CFLAGS): Likewise.
1321 (lua_mod_LDFLAGS): Likewise.
1322
1323 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1324 (setjmp_mod_SOURCES): New variable.
1325 (setjmp_mod_CFLAGS): Likewise.
1326 (setjmp_LDFLAGS): Likewise.
1327
1328 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1329 (setjmp_mod_SOURCES): New variable.
1330 (setjmp_mod_CFLAGS): Likewise.
1331 (setjmp_LDFLAGS): Likewise.
1332
1333 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1334 (setjmp_mod_SOURCES): New variable.
1335 (setjmp_mod_CFLAGS): Likewise.
1336 (setjmp_LDFLAGS): Likewise.
1337
1338 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1339 (setjmp_mod_SOURCES): New variable.
1340 (setjmp_mod_CFLAGS): Likewise.
1341 (setjmp_LDFLAGS): Likewise.
1342
1343 * normal/i386/setjmp.S: Moved from here ...
1344 * lib/i386/setjmp.S: ... Moved here
1345 * normal/x86_64/setjmp.S: Moved from here ...
1346 * lib/x86_64/setjmp.S: ... Moved here
1347 * normal/powerpc/setjmp.S: Moved from here ...
1348 * lib/powerpc/setjmp.S: ... Moved here
1349 * normal/sparc64/setjmp.S: Moved from here ...
1350 * lib/sparc64/setjmp.S: ... Moved here
1351
1352 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1353 returns_twice in mingw.
1354
1355 * script/lua/grub_lib.c: New file.
1356 * script/lua/grub_lib.h: Likewise.
1357 * script/lua/grub_lua.h: Likewise.
1358 * script/lua/grub_main.c: Likewise.
1359 * script/lua/lapi.c: Likewise.
1360 * script/lua/lapi.h: Likewise.
1361 * script/lua/lauxlib.c: Likewise.
1362 * script/lua/lauxlib.h: Likewise.
1363 * script/lua/lbaselib.c: Likewise.
1364 * script/lua/lcode.c: Likewise.
1365 * script/lua/lcode.h: Likewise.
1366 * script/lua/ldblib.c: Likewise.
1367 * script/lua/ldebug.c: Likewise.
1368 * script/lua/ldebug.h: Likewise.
1369 * script/lua/ldo.c: Likewise.
1370 * script/lua/ldo.h: Likewise.
1371 * script/lua/ldump.c: Likewise.
1372 * script/lua/lfunc.c: Likewise.
1373 * script/lua/lfunc.h: Likewise.
1374 * script/lua/lgc.c: Likewise.
1375 * script/lua/lgc.h: Likewise.
1376 * script/lua/linit.c: Likewise.
1377 * script/lua/liolib.c: Likewise.
1378 * script/lua/llex.c: Likewise.
1379 * script/lua/llex.h: Likewise.
1380 * script/lua/llimits.h: Likewise.
1381 * script/lua/lmathlib.c: Likewise.
1382 * script/lua/lmem.c: Likewise.
1383 * script/lua/lmem.h: Likewise.
1384 * script/lua/loadlib.c: Likewise.
1385 * script/lua/lobject.c: Likewise.
1386 * script/lua/lobject.h: Likewise.
1387 * script/lua/lopcodes.c: Likewise.
1388 * script/lua/lopcodes.h: Likewise.
1389 * script/lua/loslib.c: Likewise.
1390 * script/lua/lparser.c: Likewise.
1391 * script/lua/lparser.h: Likewise.
1392 * script/lua/lstate.c: Likewise.
1393 * script/lua/lstate.h: Likewise.
1394 * script/lua/lstring.c: Likewise.
1395 * script/lua/lstring.h: Likewise.
1396 * script/lua/lstrlib.c: Likewise.
1397 * script/lua/ltable.c: Likewise.
1398 * script/lua/ltable.h: Likewise.
1399 * script/lua/ltablib.c: Likewise.
1400 * script/lua/ltm.c: Likewise.
1401 * script/lua/ltm.h: Likewise.
1402 * script/lua/lua.h: Likewise.
1403 * script/lua/luaconf.h: Likewise.
1404 * script/lua/lualib.h: Likewise.
1405 * script/lua/lundump.c: Likewise.
1406 * script/lua/lundump.h: Likewise.
1407 * script/lua/lvm.c: Likewise.
1408 * script/lua/lvm.h: Likewise.
1409 * script/lua/lzio.c: Likewise.
1410 * script/lua/lzio.h: Likewise.
1411
5e898c9d 14122009-05-16 Bean <bean123ch@gmail.com>
1413
1414 * include/grub/kernel.h (grub_module_header_types): Add type
1415 OBJ_TYPE_CONFIG.
1416
1417 * kern/main.c (grub_load_config): New function.
1418 (grub_main): Call grub_load_config to read boot config.
1419
1420 * grub-mkimage (generate_image): New parameter config_path.
1421 (options): New option --config.
1422 (main): Parse --config option, and pass it to generate_image.
1423
cf353a47 14242009-05-14 Christian Franke <franke@computer.org>
1425
1426 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1427 This fixes build on Cygwin.
1428
3834887f 14292009-05-14 Pavel Roskin <proski@gnu.org>
1430
1431 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1432 jump. This saves two bytes, so the typical case of 2 swapped
1433 drives would fit 32 bytes.
1434
8090fc01 14352009-05-13 Pavel Roskin <proski@gnu.org>
1436
ac963883 1437 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1438 grub_uint32_t to avoid a warning.
1439
8090fc01 1440 * loader/i386/linux.c (allocate_pages): When assigning
1441 real_mode_mem, cast through grub_size_t to fix a warning. The
1442 code already makes sure that the value would fit a pointer.
1443 (grub_linux_setup_video): Cast render_target->data to
1444 grub_size_t to fix a warning.
1445
18f547ad 14462009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 1447
1448 * commands/i386/pc/drivemap.c: New file - implement drivemap
1449 command.
1450 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1451 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1452
6f6a8b28 14532009-05-13 Pavel Roskin <proski@gnu.org>
1454
1455 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1456 embedding_area_exists.
1457
15fbf4c4 14582009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1459
1460 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1461 it easier to understand / work with.
59978c8a 1462 Improve warning messages for cases where there's no embedding area,
1463 or when it is too small (or core.img too large).
15fbf4c4 1464
238e871f 14652009-05-13 Pavel Roskin <proski@gnu.org>
1466
0ab3a9a4 1467 * loader/i386/pc/multiboot2.c: Add necessary includes for
1468 grub_multiboot2_real_boot().
1469
a2c8c5f8 1470 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1471 PX record is always little-endian. We only need the lower 2
1472 bytes of the mode.
1473
faec96af 1474 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1475 facilitate code reuse.
1476 (grub_cpio_mount): Use "struct head", not a char buffer. This
1477 fixes a warning reported by gcc 4.4.
1478
238e871f 1479 * kernel/disk.c (grub_disk_read): Use void pointer for the
1480 buffer.
1481 (grub_disk_write): Use const void pointer for the buffer.
1482 Adjust all callers. Remove unnecessary casts.
1483
901d2f0c 14842009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1485
1486 * util/i386/pc/grub-install.in: Update copyright year.
1487
18f547ad 14882009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 1489
1490 gptsync
1491
1492 * commands/gptsync.c: new file
1493 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1494 (gptsync_mod_SOURCES): new variable
1495 (gptsync_mod_CFLAGS): likewise
1496 (gptsync_mod_LDFLAGS): likewise
18f547ad 1497 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 1498 new definition
1499 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1500 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1501 * conf/i386-ieee1275.rmk: likewise
1502 * conf/i386-pc.rmk: likewise
1503 * conf/powerpc-ieee1275.rmk: likewise
1504
b4ba690a 15052009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1506
1507 Fixed grub-emu
1508
1509 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1510 (grub_dl_ref): likewise
1511
317e1a44 15122009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1513
1514 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1515 split in two functions (one for msdos and one for gpt).
1516
041b8094 15172009-05-08 Pavel Roskin <proski@gnu.org>
1518
752473c2 1519 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1520 not modified.
1521
041b8094 1522 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1523 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1524 Initialize them with -1. Add sanity check for bad1. Eliminate
1525 nerr variable.
1526
172800ce 15272009-05-08 David S. Miller <davem@davemloft.net>
1528
1529 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1530
29aa5e81 15312009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1532
1533 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 1534 existence.
29aa5e81 1535
96613b62 15362009-05-05 Felix Zielcke <fzielcke@z-51.de>
1537
1538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 1539 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 1540
eef73c8a 15412009-05-05 David S. Miller <davem@davemloft.net>
1542
1543 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1544
119494b5 15452009-05-05 Pavel Roskin <proski@gnu.org>
1546
1547 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1548 of grub_dl_ref() and grub_dl_unref().
1549 * commands/parttool.c: Remove preprocessor conditionals around
1550 grub_dl_ref() and grub_dl_unref().
1551 * fs/affs.c: Likewise.
1552 * fs/afs.c: Likewise.
1553 * fs/cpio.c: Likewise.
1554 * fs/ext2.c: Likewise.
1555 * fs/fat.c: Likewise.
1556 * fs/hfs.c: Likewise.
1557 * fs/hfsplus.c: Likewise.
1558 * fs/iso9660.c: Likewise.
1559 * fs/jfs.c: Likewise.
1560 * fs/minix.c: Likewise.
1561 * fs/ntfs.c: Likewise.
1562 * fs/reiserfs.c: Likewise.
1563 * fs/sfs.c: Likewise.
1564 * fs/udf.c: Likewise.
1565 * fs/ufs.c: Likewise.
1566 * fs/xfs.c: Likewise.
1567 * include/grub/dl.h: Likewise.
1568 * loader/xnu.c: Likewise.
1569
de5fd76e 15702009-05-04 Pavel Roskin <proski@gnu.org>
1571
1572 * commands/acpi.c: Remove unused variable my_mod.
1573 * partmap/amiga.c: Likewise.
1574 * partmap/apple.c: Likewise.
1575 * partmap/gpt.c: Likewise.
1576 * partmap/pc.c: Likewise.
1577 * partmap/sun.c: Likewise.
1578 * term/gfxterm.c: Likewise.
1579 * term/i386/pc/vesafb.c: Likewise.
1580 * term/i386/pc/vga.c: Likewise.
1581
983598ad 15822009-05-04 David S. Miller <davem@davemloft.net>
1583
1584 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1585 pointer args to grub_ieee1275_get_property().
1586
8aadec43 1587 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1588
9554b15e 1589 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1590 devices, and do not traverse down under controller nodes.
1591
67e23c90 1592 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1593 (grub_ofdisk_open): Use it to un-escape "," characters.
1594 * kern/disk.c (find_part_sep): New.
1595 (grub_disk_open): Use it to find the first non-escaped ','
1596 character in the disk name.
1597 * util/ieee1275/devicemap.c (escape_of_path): New.
1598 (grub_util_emit_devicemap_entry): Use it.
1599 * util/sparc64/ieee1275/grub-install.in: Update script to
1600 strip partition specifiers properly by not triggering on
1601 '\' escaped ',' characters.
1602
74bfdd2f 16032009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1604
1605 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1606 to 0x300.
1607 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1608 resolutions.
1609 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1610 on documentation from Wikipedia).
1611
4241d2b1 16122009-05-04 Pavel Roskin <proski@gnu.org>
1613
1614 * disk/ata.c: Spelling fixes.
1615 * disk/raid.c: Likewise.
1616 * disk/usbms.c: Likewise.
1617 * disk/dmraid_nvidia.c: Likewise.
1618 * kern/ieee1275/openfw.c: Likewise.
1619 * kern/ieee1275/init.c: Likewise.
1620 * kern/ieee1275/cmain.c: Likewise.
1621 * boot/i386/pc/cdboot.S: Likewise.
1622 * video/readers/png.c: Likewise.
1623 * video/i386/pc/vbe.c: Likewise.
1624 * fs/udf.c: Likewise.
1625 * fs/hfs.c: Likewise.
1626 * fs/reiserfs.c: Likewise.
1627 * efiemu/runtime/efiemu.c: Likewise.
1628 * efiemu/main.c: Likewise.
1629 * efiemu/mm.c: Likewise.
1630 * include/grub/elf.h: Likewise.
1631 * include/grub/xnu.h: Likewise.
1632 * include/grub/usbdesc.h: Likewise.
1633 * include/grub/usb.h: Likewise.
1634 * include/grub/script_sh.h: Likewise.
1635 * include/grub/lib/LzmaEnc.h: Likewise.
1636 * include/grub/efiemu/efiemu.h: Likewise.
1637 * include/grub/command.h: Likewise.
1638 * normal/menu.c: Likewise.
1639 * normal/main.c: Likewise.
1640 * normal/datetime.c: Likewise.
1641 * bus/usb/uhci.c: Likewise.
1642 * mmap/i386/uppermem.c: Likewise.
1643 * mmap/mmap.c: Likewise.
1644 * commands/acpi.c: Likewise.
1645 * commands/test.c: Likewise.
1646 * partmap/apple.c: Likewise.
1647 * font/font.c: Likewise.
1648 * loader/sparc64/ieee1275/linux.c: Likewise.
1649 * loader/macho.c: Likewise.
1650 * loader/i386/bsd_trampoline.S: Likewise.
1651 * loader/i386/bsd.c: Likewise.
1652 * loader/xnu.c: Likewise.
1653 * term/i386/pc/vesafb.c: Likewise.
1654 * term/usb_keyboard.c: Likewise.
1655 * util/resolve.c: Likewise.
1656 * util/getroot.c: Likewise.
1657
0cfc0083 16582009-05-04 Felix Zielcke <fzielcke@z-51.de>
1659
1660 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1661
7c1d00cd 16622009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1663
1664 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1665 build error.
1666
b01f0548 16672009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1668
1669 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1670 parameter only available on BIOS.
1671
ecc3eb22 16722009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1673
1674 Removed wrong semicolon in declaration
1675
1676 * grub/misc.h (grub_dprintf): remove semicolon
1677
112972a9 16782009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1679
1680 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1681 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1682 is done by grub_cmd_linux() now).
1683 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1684 restore video to text mode.
1685 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1686 indicates lack of "vga=" parameter. "vga=0" is mapped to
1687 `GRUB_LINUX_VID_MODE_NORMAL'.
1688
afd5c115 16892009-05-04 Felix Zielcke <fzielcke@z-51.de>
1690
1691 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1692 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1693 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 1694 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 1695 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1696 `grub_script.tab.c'.
1697
1698 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1699 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1700 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1701 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1702 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1703
faa517ce 1704 * Makefile.in: Remove duplicated 2008 in Copyright line.
1705
ae0c0bdc 17062009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1707
473d1e45 1708 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 1709 unconditionally.
1710 * include/grub/util/misc.h (grub_util_warn): New declaration.
1711
1712 * util/i386/pc/grub-install.in: Understand --force and pass it down
1713 to grub-setup.
1714
1715 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1716 down to setup().
1717 (setup): Improve error messages and add warnings when requested to
1718 install in odd layouts. Refuse to install using blocklists unless
1719 --force was set.
1720
18f547ad 17212009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 1722
1723 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1724
6d260daa 17252009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1726
1727 Updated copyright year
1728
1729 * fs/hfsplus.c: updated copyright year
18f547ad 1730
69f853f8 17312009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1732
1733 HFS+ UUID
1734
18f547ad 1735 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 1736 in the space previously used by unused3
1737 (grub_hfsplus_uuid): new function
1738 (grub_hfsplus_fs): added uuid field
1739
4c402e73 17402009-05-03 Pavel Roskin <proski@gnu.org>
1741
1742 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1743 suppress warnings. It's no longer needed.
1744 * disk/host.c: Likewise.
1745 * disk/ata_pthru.c: Likewise.
1746 * disk/loopback.c: Likewise.
1747 * hook/datehook.c: Likewise.
1748 * parttool/pcpart.c: Likewise.
1749 * fs/i386/pc/pxe.c: Likewise.
1750 * fs/ntfscomp.c: Likewise.
1751 * efiemu/main.c: Likewise.
1752 * mmap/mmap.c: Likewise.
1753 * commands/crc.c: Likewise.
1754 * commands/hexdump.c: Likewise.
1755 * commands/hdparm.c: Likewise.
1756 * commands/acpi.c: Likewise.
1757 * commands/echo.c: Likewise.
1758 * commands/minicmd.c: Likewise.
1759 * commands/blocklist.c: Likewise.
1760 * commands/memrw.c: Likewise.
1761 * commands/loadenv.c: Likewise.
1762 * commands/usbtest.c: Likewise.
1763 * commands/lsmmap.c: Likewise.
1764 * commands/boot.c: Likewise.
1765 * commands/parttool.c: Likewise.
1766 * commands/configfile.c: Likewise.
1767 * commands/search.c: Likewise.
1768 * commands/ieee1275/suspend.c: Likewise.
1769 * commands/cat.c: Likewise.
1770 * commands/i386/pc/pxecmd.c: Likewise.
1771 * commands/i386/pc/play.c: Likewise.
1772 * commands/i386/pc/halt.c: Likewise.
1773 * commands/i386/pc/vbeinfo.c: Likewise.
1774 * commands/i386/pc/vbetest.c: Likewise.
1775 * commands/lspci.c: Likewise.
1776 * commands/date.c: Likewise.
1777 * commands/handler.c: Likewise.
1778 * commands/ls.c: Likewise.
1779 * commands/test.c: Likewise.
1780 * commands/cmp.c: Likewise.
1781 * commands/efi/loadbios.c: Likewise.
1782 * commands/efi/fixvideo.c: Likewise.
1783 * commands/halt.c: Likewise.
1784 * commands/help.c: Likewise.
1785 * commands/reboot.c: Likewise.
1786 * hello/hello.c: Likewise.
1787 * script/sh/main.c: Likewise.
1788 * loader/xnu.c: Likewise.
1789 * term/terminfo.c: Likewise.
1790 * term/i386/pc/serial.c: Likewise.
1791 * term/usb_keyboard.c: Likewise.
1792
515b5079 17932009-05-03 David S. Miller <davem@davemloft.net>
1794
1795 * normal/menu.c: Include grub/parser.h
1796
dfc31a22 17972009-05-03 Pavel Roskin <proski@gnu.org>
1798
2fee74f1 1799 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1800 not char*.
1801 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1802 Suggested by Javier Martín <lordhabbit@gmail.com>
1803
dfc31a22 1804 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1805 efiemu??.o doesn't exist.
1806 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1807 copying.
1808
18f547ad 18092009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1810
1811 FreeBSD 64-bit support
1812
18f547ad 1813 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1814 and loader/i386/bsd_trampoline.S
1815 (bsd_mod_ASFLAGS): new variable
1816 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1817 (FREEBSD_MODTYPE_KERNEL64): likewise
1818 (grub_bsd64_trampoline_start): likewise
1819 (grub_bsd64_trampoline_end): likewise
1820 (grub_bsd64_trampoline_selfjump): likewise
1821 (grub_bsd64_trampoline_gdt): likewise
1822 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1823 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1824 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1825 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1826 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1827 of "attrib" member
1828 * loader/i386/bsd_pagetable.c: new file
1829 * loader/i386/bsd_trampoline.S: likewise
1830 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1831 (ALIGN_VAR): likewise
1832 (entry_hi): new variable
1833 (kern_end_mdofs): likewise
1834 (is_64bit): likewise
1835 (grub_freebsd_add_meta): use ALIGN_VAR
1836 (grub_e820_mmap): new declaration
1837 (grub_freebsd_add_mmap): new function
1838 (grub_freebsd_add_meta_module): support 64 bit kernels
1839 (grub_freebsd_list_modules): use ALIGN_VAR
1840 (gdt_descriptor): new declaration
1841 (grub_freebsd_boot): support 64 bit kernels
1842 (grub_bsd_elf64_hook): new function
1843 (grub_bsd_load_elf): support elf64
1844
038c5720 18452009-05-03 Bean <bean123ch@gmail.com>
1846
1847 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1848 after we get the result of if statement.
1849
fc45fb58 18502009-05-03 Bean <bean123ch@gmail.com>
1851
1852 * Makefile.in (enable_efiemu): New variable.
1853
1854 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1855 set.
1856 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1857 path.
1858 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1859 path, add -mno-red-zone option.
1860 (efiemu64_s.o): Likewise.
1861 (efiemu64.o): Use macro $^ for source file.
1862
1863 * configure.ac (--enable-efiemu): New option.
1864
bbee0f2b 18652009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1866
1867 xnu support
1868
1869 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1870 (pkglib_MODULES): add xnu.mod
1871 (xnu_mod_SOURCES): new variable
1872 (xnu_mod_CFLAGS): likewise
1873 (xnu_mod_LDFLAGS): likewise
1874 (xnu_mod_ASFLAGS): likewise
1875 * conf/i386-pc.rmk: likewise
1876 * conf/x86_64-efi.rmk: likewise
7dd4a573 1877 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1878 new declaration
1879 * include/grub/i386/macho.h: new file
1880 * include/grub/i386/xnu.h: likewise
1881 * include/grub/macho.h: likewise
1882 * include/grub/machoload.h: likewise
1883 * include/grub/x86_64/macho.h: likewise
1884 * include/grub/x86_64/xnu.h: likewise
1885 * include/grub/xnu.h: likewise
1886 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1887 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1888 * loader/i386/efi/xnu.c: new file
1889 * loader/i386/pc/xnu.c: likewise
1890 * loader/i386/xnu.c: likewise
1891 * loader/i386/xnu_helper.S: likewise
1892 * loader/macho.c: likewise
1893 * loader/xnu.c: likewise
1894 * loader/xnu_resume.c: likewise
1895 * util/grub-dumpdevtree: likewise
1896 * include/grub/i386/pit.h: include grub/err.h
1897 (grub_pit_wait): export
1898 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1899
5caf964d 19002009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1901
1902 Efiemu
7dd4a573 1903
5caf964d 1904 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1905 _linux_efi, linux_efi.
1906 new files in grub-emu
5caf964d 1907 new targets efiemu32.o and efiemu64.o
1908 * loader/linux_normal_efiemu.c: likewise
1909 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1910 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1911 files to copy
1912 * include/grub/autoefi.h: new file
7dd4a573 1913 * include/grub/i386/efiemu.h: likewise
5caf964d 1914 * include/grub/i386/pc/efiemu.h: likewise
1915 * include/grub/efi/api.h: add LL suffix when necessary
1916 new definitions relating to tables
1917 * include/grub/efiemu/efiemu.h: new file
1918 * include/grub/efiemu/runtime.h: likewise
1919 * efiemu/prepare.c: likewise
1920 * efiemu/loadcore_common.c: likewise
1921 * efiemu/loadcore64.c: likewise
1922 * efiemu/runtime/efiemu.sh: likewise
1923 * efiemu/runtime/efiemu.S: likewise
1924 * efiemu/runtime/efiemu.c: likewise
1925 * efiemu/runtime/config.h: likewise
1926 * efiemu/prepare32.c: likewise
1927 * efiemu/main.c: likewise
1928 * efiemu/modules/pnvram.c: likewise
1929 * efiemu/modules/i386: likewise
1930 * efiemu/modules/i386/pc: likewise
1931 * efiemu/modules/acpi.c: likewise
1932 * efiemu/i386/pc/cfgtables.c: likewise
1933 * efiemu/i386/loadcore64.c: likewise
1934 * efiemu/i386/loadcore32.c: likewise
1935 * efiemu/prepare64.c: likewise
1936 * efiemu/loadcore.c: likewise
1937 * efiemu/symbols.c: likewise
1938 * efiemu/mm.c: likewise
1939 * efiemu/loadcore32.c: likewise
7dd4a573 1940
19412009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1942
1943 ACPI spoofing
1944
1945 * commands/acpi.c: new file
1946 * commands/i386/pc/acpi.c: likewise
1947 * commands/efi/acpi.c: likewise
1948 * include/grub/acpi.h: likewise
1949 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1950 (acpi_mod_SOURCES): new variable
1951 (acpi_mod_CFLAGS): likewise
1952 (acpi_mod_LDFLAGS): likewise
1953 * conf/i386-efi.rmk: likewise
1954 * conf/x86_64-efi.rmk: likewise
1955
7dd4a573 19562009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1957
1958 Missing part from mmap patch
1959
1960 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1961 (grub_mmap_unregister)
1962 (grub_mmap_free_and_unregister): use grub_mmap_register
1963
7dd4a573 19642009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1965
1966 Mmap services
1967
1968 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1969 * loader/i386/linux.c (find_mmap_size): likewise
1970 (allocate_pages): likewise
1971 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1972 (grub_fill_multiboot_mmap): likewise
1973 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1974 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1975 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1976 (OPENBSD_MMAP_RESERVED): likewise
1977 * include/grub/i386/pc/memory.h: include grub/memory.h
1978 (grub_lower_mem): removed
1979 (grub_upper_mem): likewise
1980 (GRUB_MACHINE_MEMORY_ACPI): new definition
1981 (GRUB_MACHINE_MEMORY_NVS): likewise
1982 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1983 (GRUB_MACHINE_MEMORY_HOLE): likewise
1984 (grub_machine_mmap_register): likewise
1985 (grub_machine_mmap_unregister): likewise
1986 (grub_machine_get_upper): likewise
1987 (grub_machine_get_lower): likewise
1988 (grub_machine_get_post64): likewise
1989 * include/grub/i386/efi/memory.h: new file
1990 * include/grub/x86_64/efi/memory.h: likewise
1991 * include/grub/efi/memory.h: likewise
1992 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1993 (mmap_mod_SOURCES): new variable
1994 (mmap_mod_LDFLAGS): likewise
1995 (mmap_mod_ASFLAGS): likewise
1996 * conf/i386-coreboot.rmk: likewise
1997 * conf/i386-ieee1275.rmk: likewise
1998 * conf/i386-efi.rmk: likewise
1999 * conf/x86_64-efi.rmk: likewise
2000 * include/grub/types.h (UINT_TO_PTR): new macro
2001 (PTR_TO_UINT32): likewise
2002 (PTR_TO_UINT64): likewise
2003 * include/grub/memory.h: new file
2004 * mmap/i386/pc/mmap.c: likewise
2005 * mmap/i386/pc/mmap_helper.S: likewise
2006 * mmap/i386/uppermem.c: likewise
2007 * mmap/mmap.c: likewise
2008 * mmap/efi/mmap.c: likewise
7dd4a573 2009 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 2010 grub_upper_mem
2011 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2012 (grub_upper_mem): likewise
2013 (grub_machine_init): don't use grub_upper_mem,
2014 make grub_lower_mem local
2015 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2016 grub_mmap_iterate and grub_mmap_get_upper
2017 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2018
d558e6b5 20192009-05-02 Bean <bean123ch@gmail.com>
2020
2021 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2022 script/sh/parser.y.
2023 (pkglib_MODULES): Add normal.mod and sh.mod.
2024 (normal_SOURCES): New variable.
2025 (normal_mod_CFLAGS): Likewise.
2026 (normal_mod_LDFLAGS): Likewise.
2027 (sh_mod_SOURCES): Likewise.
2028 (sh_mod_CFLAGS): Likewise.
2029 (sh_mod_LDFLAGS): Likewise.
2030
2031 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2032 script/sh/lexer.c_DEPENDENCIES.
2033 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2034 kern/rescue_reader.c and kern/rescue_parser.c.
2035 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2036 (grub_emu_SOURCES): Change source files.
2037 (pkglib_MODULES): Remove normal.mod.
2038 (normal_SOURCES): Removed.
2039 (normal_mod_CFLAGS): Likewise.
2040 (normal_mod_LDFLAGS): Likewise.
2041 * conf/i386-coreboot.rmk: Likewise.
2042 * conf/i386-efi.rmk: Likewise.
2043 * conf/i386-ieee1276.rmk: Likewise.
2044 * conf/powerpc-ieee1275.rmk: Likewise.
2045 * conf/sparc64-ieee1275.rmk: Likewise.
2046 * conf/x86_64-efi.rmk: Likewise.
2047
2048 * include/grub/command.h (grub_command_execute): New inline function.
2049
2050 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2051
2052 * include/grub/normal.h: Remove <grub/setjmp.h>.
2053 (grub_fs_module_list): Moved to normal/autofs.c.
2054 (grub_exit_env): Removed.
2055 (grub_command_execute): Likewise.
2056 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2057 parameter script.
2058 (read_command_list): New function declaration.
2059 (read_fs_list): Likewise.
2060
2061 * include/parser.h: Include <grub/reader.h>.
2062 (grub_parser_split_cmdline): Change type of getline parameter.
2063 (grub_parser): New structure.
2064 (grub_parser_class): New variable.
2065 (grub_parser_execute): New function declaration.
2066 (grub_register_rescue_parser): Likewise.
2067 (grub_parser_register): New inline function.
2068 (grub_parser_unregister): Likewise.
2069 (grub_parser_get_current): Likewise.
2070 (grub_parser_set_current): Likewise.
2071
2072 * include/grub/reader.h: New file.
2073 * kern/reader.c: Likewise.
2074 * kern/rescue_parser.c: Likewise.
2075 * kern/rescue_reader.c: Likewise.
2076 * normal/autofs.c: Likewise.
2077 * normal/dyncmd.c: Likewise.
2078
2079 * include/grub/rescue.h: Removed.
2080 * normal/command.h: Likewise.
2081
2082 * include/grub/script.h: Moved to ...
2083 * include/grub/script_sh.h: ... Moved here.
2084 * normal/execute.c: Moved to ...
2085 * script/sh/execute.c: ... Moved here.
2086 * normal/function.c: Moved to ...
2087 * script/sh/function.c: ... Moved here.
2088 * normal/lexer.c: Moved to ...
2089 * script/sh/lexer.c: ... Moved here.
2090 * normal/parser.y: Moved to ...
2091 * script/sh/parser.y: ... Moved here.
2092 * normal/script.c: Moved to ...
2093 * script/sh/script.c: ... Moved here.
2094
2095 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2096 <grub/reader.h>.
2097 (grub_exit_env): Removed.
2098 (fs_module_list): Moved to normal/autofs.c.
2099 (grub_file_getline): Don't handle comment here.
2100 (free_menu): Skip removed field entry->commands.
2101 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2102 script parameter.
2103 (read_config_file): Removed nested parameter, change getline function.
2104 (grub_enter_normal_mode): Removed.
2105 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2106 (read_command_list): Likewise.
2107 (autoload_fs_module): Moved to normal/autofs.c.
2108 (read_fs_list): Likewise.
2109 (reader_nested): New variable.
2110 (grub_normal_execute): Run parser.sh to switch to sh parser.
2111 (grub_cmd_rescue): Removed.
2112 (cmd_normal): Removed.
2113 (grub_cmd_normal): Unregister itself at the beginning. Don't register
2114 rescue command.
2115 (grub_cmdline_run): New function.
2116 (grub_normal_reader_init): Likewise.
2117 (grub_normal_read_line): Likewise.
2118 (grub_env_write_pager): Likewise.
2119 (cmdline): New variable.
2120 (grub_normal_reader): Likewise.
2121 (GRUB_MOD_INIT): Register normal reader and set as current, register
2122 pager hook, register normal command with grub_register_command_prio,
2123 so that it won't show up in command.lst.
2124 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2125 grub_fs_autoload_hook.
2126
2127 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2128 (grub_menu_execute_entry): Replace grub_script_execute with
2129 grub_parser_execute, change parameter to grub_command_execute.
2130
2131 * normal/menu_text.c: Remove <grub/script.h>.
2132
2133 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2134 and <grub/parser.h>.
2135 (run): Change editor_getline to use new parser interface. Change
2136 parameter to grub_command_execute.
2137
2138 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2139 <grub/reader.h> and <grub/parser.h>.
2140 (grub_load_normal_mode): Execute normal command.
2141 (grub_main): Call grub_register_core_commands,
2142 grub_register_rescue_parser and grub_register_rescue_reader, use
2143 grub_reader_loop to enter input loop.
2144
7dd4a573 2145 * kern/parser.c (grub_parser_split_cmdline): Change type of
2146 getline parameter.
d558e6b5 2147 (grub_parser_class): New variable.
2148 (grub_parser_execute): New function.
2149
2150 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2151 * loader/multiboot2.c: Likewise.
2152 * loader/sparc64/ieee1275/linux.c: Likewise.
2153
2154 * util/grub-emu.c (read_command_list): New dummy function.
2155
18db813d 21562009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2157
2158 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2159 count to 16 for CCISS and IDA.
2160
6c67de15 21612009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2162
2163 * normal/menu_text.c (grub_wait_after_message): Print a newline
2164 after waiting for user input.
2165
2166 * loader/i386/linux.c: Include `<grub/normal.h>'.
2167 (grub_cmd_linux): Improve the error message about `ask' mode, by
2168 waiting for user input so it's not missed (we can do this, since
2169 user requested interaction).
2170
d9dc87b0 21712009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2172
2173 Added missing lst to grub-mkrescue
2174
2175 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2176 and ${input_dir}/parttool.lst
2177
ac8a2baa 21782009-04-30 David S. Miller <davem@davemloft.net>
2179
ad22a610 2180 * util/hostdisk.c (device_is_wholedisk): New function.
2181 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2182 zero only if device_is_wholedisk() returns true.
2183
6966215d 2184 * util/hostdisk.c (convert_system_partition_to_system_disk):
2185 Handle virtual disk devices named /dev/vdiskX as found on sparc
2186 and powerpc.
2187
ac8a2baa 2188 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2189 lettered partition specifier is found, convert to numbered.
2190
979b4fb4 21912009-04-29 David S. Miller <davem@davemloft.net>
2192
e2bf39b2 2193 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2194 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2195
3c64e104 2196 * normal/command.c: Add missing newline at end of file.
2197
979b4fb4 2198 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2199 warnings.
2200 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2201 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2202 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2203 ihandles have a 32-bit type but need to be stored in a "void *".
2204
136d9f82 22052009-04-28 Pavel Roskin <proski@gnu.org>
2206
9459c306 2207 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2208 not disk. Adjust all dependencies.
2e08a26a 2209 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 2210 grub_disk_close().
2211
136d9f82 2212 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2213 parent's partition, don't copy it by reference, as it gets freed
2214 on close.
2215
7dd4a573 22162009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 2217
2218 Preboot hooks support
2219
2220 * commands/boot.c (struct grub_preboot_t): new declaration
2221 (preboots_head): new variable
2222 (preboots_tail): likewise
2223 (grub_loader_register_preboot_hook): new function
2224 (grub_loader_unregister_preboot_hook): likewise
2225 (grub_loader_set): launch preboot hooks
2226 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2227 (grub_loader_register_preboot_hook): new declaration
2228 (grub_loader_unregister_preboot_hook): likewise
2229
5af922b5 22302009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2231
2232 Warning fix
2233
7dd4a573 2234 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 2235 calling grub_dprintf
2236
a5562c30 22372009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2238
2239 Bug and warning fixes
2240
7dd4a573 2241 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 2242 declaration
2243 * commands/test.c (test_parse): fixed bug with file tests and corrected
2244 declaration of find_file
2245
4006f85c 22462009-04-26 Pavel Roskin <proski@gnu.org>
2247
2248 * Makefile.in: Don't install empty manual pages if help2man is
2249 missing. Use help2man option for output, not shell redirection.
2250
5c77c3de 22512009-04-26 David S. Miller <davem@davemloft.net>
2252
2253 * util/grub-mkdevicemap.c (make_device_map): Add missing
2254 NESTED_FUNC_ATTR to process_device().
2255
033b10a8 22562009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2257
2258 Test command
2259
2260 * commands/test.c: rewritten to use bash-like test
2261
e4343593 22622009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2263
2264 Parttool autoloading and improvements
2265
7dd4a573 2266 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 2267 (parttool.lst): new target
2268 * genmk.rb: generate parttool-*
2269 (CLEANFILES): add #{parttool}
2270 (PARTTOOLFILES): new variable
2271 * genparttoollist.sh: new file
7dd4a573 2272 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 2273 (grub_pcpart_type): likewise
2274 * commands/parttool.c (helpmsg): new variable
2275 (grub_cmd_parttool): output help if not enough arguments are supplied
2276 autoload modules
2277 (GRUB_MOD_INIT(parttool)): use helpmsg
2278
0d312500 22792009-04-24 David S. Miller <davem@davemloft.net>
2280
7dd4a573 2281 Avoiding opening same device multiple times in device iterator.
0d312500 2282
2283 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 2284 and use it to build a list of partitions in iterate_disk() and
0d312500 2285 iterate_partition().
2286
ac20caff 2287 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2288 on disk->data.
2289
0dcf7495 2290 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2291 grub_devalias_iterate() result instead of unconditional 0.
2292 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2293 Also, capture hook return value, either directly or via
2294 grub_children_iterate(), and propagate to caller.
2295 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2296 grub_children_iterate): Return value is now 'int' instead of
2297 'grub_err_t'.
2298 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2299 like a proper iterator, stopping when hooks return non-zero.
2300 (grub_devalias_iterate): Likewise.
2301
c8c08833 23022009-04-23 David S. Miller <davem@davemloft.net>
2303
2304 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2305
f01005a8 23062009-04-22 David S. Miller <davem@davemloft.net>
2307
2308 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2309 is larger than address_cells, use that value for address_cells too.
2310
4e8269da 2311 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2312 IEEE1275_MAX_PATH_LEN): Define.
2313 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2314 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2315 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2316 'devtype'. Explicitly NULL terminate devalias expansion.
2317
a1447506 2318 * util/sparc64/ieee1275/misc.c: New file.
2319 * util/sparc64/ieee1275/grub-setup.c: New file.
2320 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2321 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2322 * util/sparc64/ieee1275/grub-install.in: New file.
2323 * util/ieee1275/ofpath.c: New file.
2324 * util/ieee1275/devicemap.c: New file.
2325 * util/devicemap.c: New file.
2326 * util/deviceiter.c: New file.
2327 * kern/sparc64/ieee1275/init.c: New file.
2328 * include/grub/util/ofpath.h: New file.
2329 * include/grub/util/deviceiter.h: New file.
2330 * util/grub-mkdevicemap.c: Include deviceiter.h.
2331 Implement using grub_util_emit_devicemap_entry and
2332 grub_util_iterate_devices.
2333 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2334 util/devicemap.c into grub-mkdevicemap
2335 * conf/i386-efi.rmk: Likewise.
2336 * conf/i386-ieee1275.rmk: Likewise.
2337 * conf/i386-pc.rmk: Likewise.
2338 * conf/powerpc-ieee1275.rmk: Likewise.
2339 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2340 images and installation utilities. Build kernel as image
2341 instead of as elf binary. Use common rules as much as possible.
2342
7dd4a573 23432009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 2344
2345 Correct GPT definition
2346
7dd4a573 2347 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 2348 of "attrib" member
2349
c6c5219f 23502009-04-19 Felix Zielcke <fzielcke@z-51.de>
2351
2352 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2353
0552ff9f 23542009-04-19 David S. Miller <davem@davemloft.net>
2355
2356 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2357 (grub_rescue_cmd_linux): Rename to...
2358 (grub_cmd_linux): and fix prototype.
2359 (grub_rescue_cmd_initrd): Rename to...
2360 (grub_cmd_initrd): and fix prototype.
2361 (cmd_linux, cmd_initrd): New.
2362 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2363 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2364
d1a282fc 23652009-04-17 Pavel Roskin <proski@gnu.org>
2366
07c5039f 2367 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2368 format.
2369 (grub_ohci_transfer): Likewise.
2370
b012002d 2371 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2372
1bc09c35 2373 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2374 return without a value. Fix inconsistent indentation.
2375
e0ff9126 2376 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2377 match struct grub_fs.
2378
d1a282fc 2379 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2380 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2381 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2382 * commands/lspci.c (grub_lspci_iter): Likewise.
2383
a96df3f2 23842009-04-16 Bean <bean123ch@gmail.com>
2385
2386 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2387 value.
2388
41bb0fe9 23892009-04-15 Pavel Roskin <proski@gnu.org>
2390
2391 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2392 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2393 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2394 definitions.
2395
596c6970 23962009-04-15 Felix Zielcke <fzielcke@z-51.de>
2397
2398 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 2399 that no multiple data or metadata areas are supported and `Unknown
596c6970 2400 metadata header'.
2401
7dd4a573 24022009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 2403
2404 Move loader out of the kernel
2405
2406 * kern/loader.c: moved to ...
2407 * commands/boot.c: ... moved here
2408 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2409 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2410 * include/grub/kernel.h (grub_machine_fini): export
2411 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2412 (grub_loader_set): likewise
2413 (grub_loader_unset): likewise
2414 (grub_loader_boot): likewise
2415 * conf/common.rmk: new module boot.mod
2416 (pkglib_MODULES): add boot.mod
2417 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2418 (grub_emu_SOURCES): likewise
2419 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2420 (grub_emu_SOURCES): likewise
2421 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2422 (grub_emu_SOURCES): likewise
2423 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2424 (grub_emu_SOURCES): likewise
2425 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2426 (grub_emu_SOURCES): likewise
7dd4a573 2427 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2428 (grub_emu_SOURCES): likewise
0d5d5653 2429 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 2430 (grub_emu_SOURCES): likewise
0d5d5653 2431
7dd4a573 24322009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 2433
2434 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 2435
5999d619 2436 * kern/misc.c (grub_itoa): Removed function
2437 (grub_ltoa): likewise
2438 (grub_vsprintf): use grub_lltoa
2439
7dd4a573 24402009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 2441
2442 Restore grub-emu
2443
2444 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2445 * conf/i386-coreboot.rmk: likewise
2446 * conf/i386-ieee1275.rmk: likewise
2447 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2448
20318222 24492009-04-15 Felix Zielcke <fzielcke@z-51.de>
2450
2451 * INSTALL: Add that `./autogen.sh' needs to be run before
2452 `./configure.'.
2453
d05f0df3 24542009-04-14 Bean <bean123ch@gmail.com>
2455
2456 * Makefile.in (pkglib_DATA): Add handler.lst.
2457 (handler.lst): New rule.
2458
2459 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2460 * conf/i386-coreboot.rmk: Likewise.
2461 * conf/i386-ieee1275.rmk: Likewise.
2462 * conf/i386-efi.rmk: Likewise.
2463 * conf/x86_64-efi.rmk: Likewise.
2464 * conf/powerpc-ieee1275.rmk: Likewise.
2465 * conf/sparc64-ieee1275.rmk: Likewise.
2466
2467 * genhandlerlist.sh: New file.
2468
2469 * genmk.rb: Add rules to generate handler.lst.
2470
2471 * include/grub/normal.h (grub_file_getline): New function definition.
2472 (read_handler_list): Likewise.
2473 (free_handler_list): Likewise.
2474
2475 * include/grub/term.h (grub_term_register_input): Add name parameter
2476 for auto generation of handler.lst.
2477 (grub_term_register_output): Likewise.
2478
2479 * normal/handler.c: New file.
2480
2481 * normal/main.c (get_line): Renamed to grub_file_getline.
2482 (read_config_file): Use the newly renamed grub_file_getline.
2483 (read_command_list): Likewise.
2484 (read_fs_list): Likewise.
2485 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2486 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2487
2488 * term/efi/console.c (grub_console_init): Add name parameter for auto
2489 generation of handler.lst.
2490 * term/gfxterm.c: Likewise.
2491 * term/i386/pc/at_keyboard.c: Likewise.
2492 * term/i386/pc/console.c: Likewise.
2493 * term/i386/pc/serial.c: Likewise.
2494 * term/i386/pc/vesafb.c: Likewise.
2495 * term/i386/pc/vga.c: Likewise.
2496 * term/i386/pc/vga_text.c: Likewise.
2497 * term/ieee1275/ofconsole.c: Likewise.
2498 * term/usb_keyboard.c: Likewise.
2499
33c846be 25002009-04-14 Bean <bean123ch@gmail.com>
2501
2502 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2503 properly with null character.
2504
4484e01e 25052009-04-14 Felix Zielcke <fzielcke@z-51.de>
2506
2507 * configure: Remove.
2508 * config.h.in: Likewise.
f93d668e 2509 * stamp-h.in: Likewise.
4484e01e 2510 * DISTLIST: Likewise.
2511 * conf/common.mk: Likewise.
2512 * conf/i386-coreboot.mk: Likewise.
2513 * conf/i386-efi.mk: Likewise.
2514 * conf/i386-ieee1275.mk: Likewise.
2515 * conf/i386.mk: Likewise.
2516 * conf/i386-pc.mk: Likewise.
2517 * conf/powerpc-ieee1275.mk: Likewise.
2518 * conf/sparc64-ieee1275.mk: Likewise.
2519 * conf/x86_64-efi.mk: Likewise.
2520
2521 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2522 develop on GRUB.
2523
7dd4a573 25242009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 2525 David S. Miller <davem@davemloft.net>
2526
2527 * util/hostdisk.c (make_device_name): Fix buffer length
2528 calculations.
2529
e25b5a8c 25302009-04-14 Felix Zielcke <fzielcke@z-51.de>
2531
2532 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2533 <sys/param.h> and <sys/sysctl.h>.
2534 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2535 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2536 opening the device and reset them afterwards.
2537
1f1f580c 25382009-04-13 Pavel Roskin <proski@gnu.org>
2539
2540 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2541 Reported by John Stanley <jpsinthemix@verizon.net>
2542
7ebc2d6b 25432009-04-13 Robert Millan <rmh@aybabtu.com>
2544
2545 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 2546 that name for menuentries when appropriate.
7ebc2d6b 2547
d8ba3667 25482009-04-13 Felix Zielcke <fzielcke@z-51.de>
2549
2550 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2551
cba416eb 25522009-04-13 Robert Millan <rmh@aybabtu.com>
2553
2554 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2555 to Linux, simply abort telling the user it's no longer supported.
2556
a547a745 25572009-04-13 Felix Zielcke <fzielcke@z-51.de>
2558
2559 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 2560 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 2561 `freebsd_loadenv' only when devices.hints exist.
2562
232a769c 25632009-04-13 Pavel Roskin <proski@gnu.org>
2564
2565 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2566
c3012039 25672009-04-13 Felix Zielcke <fzielcke@z-51.de>
2568
2569 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2570 partition number.
2571 (grub_drive): Likewise.
2572
234022fe 25732009-04-13 David S. Miller <davem@davemloft.net>
2574
2575 * kern/sparc64/ieee1275/ieee1275.c: New file.
2576 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2577 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2578 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2579 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2580 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2581 grub_ieee1275_alloc_physmem): Declare new exported functions.
2582
d8e1836c 2583 * include/grub/sparc64/ieee1275/loader.h: New file.
2584 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2585 * include/grub/sparc64/kernel.h: Likewise.
2586 * loader/sparc64/ieee1275/linux.c: Likewise.
2587
96bd81ec 2588 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2589 (grub_fstest_SOURCES): Likewise.
2590
6a4737e5 2591 * util/hostdisk.c (make_device_name): Do not make any assumptions
2592 about the length of drive names.
2593
1d7a72fd 2594 * kern/dl.c (grub_dl_load_file): Close file immediately when
2595 we are done using it.
2596
56bc2471 25972009-04-12 David S. Miller <davem@davemloft.net>
2598
2599 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2600 values. Noticed by Pavel Roskin.
2601
df38d0bb 2602 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2603 target compiler.
7dd4a573 2604
e382e93a 2605 * genmk.rb: Add more flexible image type specification, also
2606 pass --strip-unneeded to objcopy.
2607 * conf/i386-pc.rmk: Use *_FORMAT.
2608 * conf/i386-pc.mk: Rebuilt.
2609
f5dbbca9 2610 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2611 (OFDISK_HASH_SZ): Define.
2612 (ofdisk_hash): New hash table.
2613 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2614 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2615 instead of device phandle which is not unique.
2616
91c88b12 2617 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2618 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2619 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2620 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2621 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2622 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2623 GRUB_KERNEL_MACHINE_DATA_END): Define.
2624 (grub_kernel_image_size, grub_total_module_size): Declare.
2625
5b5d4aa5 26262009-04-12 Pavel Roskin <proski@gnu.org>
2627
7dd4a573 2628 * configure.ac: Change the logic when we check for target tools.
2629 Do it when the target is specified and it's different from the
2630 specified value of the host.
5b5d4aa5 2631
c91e1793 26322009-04-11 Felix Zielcke <fzielcke@z-51.de>
2633
2634 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2635 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2636 GNU/kFreeBSD. Check if a device is a character device. Use
2637 DIOCGMEDIASIZE to get the size.
2638 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2639 support for GNU/kFreeBSD.
2640 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2641 is a character device instead of a block device. Add support for
2642 FreeBSD device names.
2643
2644 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2645 is a character device instead of a block device.
2646
2647 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2648 is a character device instead of a block device.
2649
b1ac8644 26502009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2651
2652 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2653 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2654 FreeBSD. Check if a device is a character device. Use
2655 DIOCGMEDIASIZE to get the size.
2656 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2657 support for FreeBSD.
2658 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2659 is a character device instead of a block device. Add support for
2660 FreeBSD device names.
2661
2662 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2663 a character device instead of a block device.
2664 (grub_util_check_char_device): New function.
2665
2666 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2667 a character device instead of a block device.
2668
2669 * include/grub/util/getroot.h (grub_util_check_char_device): New
2670 prototype.
2671
a3f7515a 26722009-04-11 David S. Miller <davem@davemloft.net>
2673
2674 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2675 static libgcc.
2676 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2677 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2678 function, if present.
2679 (__bswapdi2): Likewise.
2680
0d44993d 2681 * include/grub/sparc64/ieee1275/boot.h: New file.
2682 * boot/sparc64/ieee1275/boot.S: Likewise.
2683 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2684
ed3d2bc2 2685 * kern/misc.c (grub_ltoa): New function.
2686 (grub_vsprintf): Use it to format 'long' integers.
2687
d3bfb59c 26882009-04-10 David S. Miller <davem@davemloft.net>
2689
2690 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2691 slots are of type grub_ieee1275_cell_t.
2692 (grub_nand_read): Likewise.
2693 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2694 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2695 macros are used to compare values in arg/ret block of the call.
2696 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2697 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2698 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2699 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2700 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2701 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2702 grub_ieee1275_close, grub_ieee1275_set_property,
2703 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2704 grub_ieee1275_cell_t.
2705 * kern/ieee1275/openfw.c (grub_map): Likewise.
2706 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2707 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2708
450e2238 2709 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2710 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2711 (grub_devalias_iterate): Likewise.
2712
7dd4a573 27132009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 2714
2715 UFS improvements
2716
2717 * fs/ufs.c (INODE_NBLOCKS): new definition
2718 (struct grub_ufs_dirent): added fields for non-BSD dirents
2719 (grub_ufs_get_file_block): fixed double indirect handling
2720 (grub_ufs_lookup_symlink): use more robust way to determine whether
2721 symlink is inline
2722 (grub_ufs_find_file): support for non-BSD dirents
2723 (grub_ufs_dir): support for non-BSD dirents
2724
e7e6862a 27252009-04-10 Bean <bean123ch@gnail.com>
2726
2727 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2728 attribute, otherwise the size would be wrong for i386 platform.
2729
2730 * include/grub/pci.h (grub_pci_read_word): New inline function.
2731 (grub_pci_read_byte): Likewise.
2732 (grub_pci_write): Likewise.
2733 (grub_pci_write_word): Likewise.
2734 (grub_pci_write_byte): Likewise.
2735
2736 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2737
2738 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2739 (find_framebuf): Scan pci to locate the frame buffer address.
2740
2741 * commands/efi/fixvideo.c: New file.
2742
2743 * commands/efi/loadbios.c: Likewise.
2744
2745 * commands/memrw.c: Likewise.
2746
2747 * util/grub-dumpbios.in: Likewise.
2748
2749 * conf/common.rmk (grub-dumpbios): New utility.
2750 (pkglib_MODULES): New module memrw.mod.
2751 (memrw_mod_SOURCE): New macro.
2752 (memrw_mod_CFLAGS): Likewise.
2753 (memrw_mod_LDFLAGS): Likewise.
2754
7dd4a573 2755 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2756 fixvideo.mod.
2757 (loadbios_mod_SOURCE): New macro.
2758 (loadbios_mod_CFLAGS): Likewise.
2759 (loadbios_mod_LDFLAGS): Likewise.
2760 (fixvideo_mod_SOURCE): Likewise.
2761 (fixvideo_mod_CFLAGS): Likewise.
2762 (fixvideo_mod_LDFLAGS): Likewise.
2763
7dd4a573 2764 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2765 fixvideo.mod.
2766 (loadbios_mod_SOURCE): New macro.
2767 (loadbios_mod_CFLAGS): Likewise.
2768 (loadbios_mod_LDFLAGS): Likewise.
2769 (fixvideo_mod_SOURCE): Likewise.
2770 (fixvideo_mod_CFLAGS): Likewise.
2771 (fixvideo_mod_LDFLAGS): Likewise.
2772
af63ada2 27732009-04-08 Felix Zielcke <fzielcke@z-51.de>
2774
2775 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2776
c2cdde70 27772009-04-07 David S. Miller <davem@davemloft.net>
2778
2779 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2780 support for R_SPARC_OLO10 relocations. Fix compile warning for
2781 R_SPARC_WDISP30 case.
ea3f72cf 2782 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2783
761319cf 27842009-04-06 Pavel Roskin <proski@gnu.org>
2785
1007d1f5 2786 * include/grub/misc.h (ARRAY_SIZE): New macro.
2787 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2788 New macro.
2789 * loader/i386/linux.c (allocate_pages): Use free_pages().
2790 (grub_linux_unload): Don't use free_pages().
2791 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2792 wrong index. Treat all other modes as text modes.
2793 (grub_cmd_linux): Initialize vid_mode unconditionally to
2794 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2795
761319cf 2796 * commands/help.c (print_command_help): Use cmd->prio, not
2797 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2798
ea761d40 27992009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2800
ea761d40 2801 Parttool
2802
2803 * parttool/pcpart.c: new file
2804 * commands/parttool.c: likewise
2805 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2806 (parttool_mod_SOURCES): new variable
2807 (parttool_mod_CFLAGS): likewise
2808 (parttool_mod_LDFLAGS): likewise
2809 (pcpart_mod_SOURCES): likewise
2810 (pcpart_mod_CFLAGS): likewise
2811 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2812 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2813 and parttool/pcpart.c
2814 * conf/i386-efi.rmk: likewise
2815 * conf/i386-ieee1275.rmk: likewise
2816 * conf/i386-pc.rmk: likewise
2817 * conf/powerpc-ieee1275.rmk: likewise
2818 * conf/sparc64-ieee1275.rmk: likewise
2819 * conf/x86_64-ieee1275.rmk: likewise
2820
05aaebfb 28212009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2822
2823 Support for mtime and further expandability of dir command
2824
2825 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2826 * include/grub/datetime.h: ... moved here and added
05aaebfb 2827 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2828 * include/grub/fs.h: new syntax for dir and mtime functions in
2829 struct grub_fs
05aaebfb 2830 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2831 and GRUB_FSHELP_FLAGS_MASK
2832 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2833 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2834 (grub_ext2_mtime): new function
2835 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2836 (grub_hfsplus_mtime): new function
2837 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2838 (GRUB_UFS_ATTR_FILE): likewise
2839 (GRUB_UFS_ATTR_LNK): likewise
2840 (struct grub_ufs_sblock): new fields mtime
2841 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2842 all users updated
2843 (grub_ufs_dir): mtime support
2844 (grub_ufs_mtime): new function
2845 * fs/affs.c (grub_affs_dir): use new dir syntax
2846 * fs/afs.c (grub_afs_dir): likewise
2847 * fs/cpio.c (grub_cpio_dir): likewise
2848 * fs/fat.c (grub_fat_find_dir): likewise
2849 * fs/hfs.c (grub_hfs_dir): likewise
2850 * fs/iso9660.c (grub_iso9660_dir): likewise
2851 * fs/jfs.c (grub_jfs_dir): likewise
2852 * fs/minix.c (grub_minix_dir): likewise
2853 * fs/ntfs.c (grub_ntfs_dir): likewise
2854 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2855 * fs/sfs.c (grub_sfs_dir): likewise
2856 * fs/xfs.c (grub_xfs_dir): likewise
2857 * util/hostfs.c (grub_hostfs_dir): likewise
2858 * lib/datetime.c: moved to ...
2859 * normal/datetime.c: ... moved here
2860 (grub_unixtime2datetime): new function
2861 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2862 * normal/completion.c (iterate_dir): use new dir syntax
2863 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2864 last modification time of a volume
7dd4a573 2865 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2866 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2867 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2868 (normal_mod_SOURCES): likewise
2869 (datetime_mod_SOURCES): Removed lib/datetime.c
2870 * conf/i386-efi.rmk: likewise
7dd4a573 2871 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2872 * conf/i386-pc.rmk: likewise
2873 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2874 * conf/sparc64-ieee1275.rmk: likewise
2875 * conf/x86_64-efi.rmk: likewise
05aaebfb 2876
8a7e1a14 28772009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2878
2879 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2880
2881 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2882 on grub_fat_find_dir
2883 (grub_fat_find_dir): use grub_fat_iterate_dir
2884 (grub_fat_label): likewise
2885
04186a9c 28862009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2887
7dd4a573 2888 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2889 and command.h
2890 remove extraneous kernel_elf_HEADERS
2891
da4c0bb6 28922009-04-04 Bean <bean123ch@gnail.com>
2893
2894 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2895
2896 * util/misc.c: Likewise.
2897
54ad9555 28982009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2899
2900 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2901 instead of grub_printf.
2902
7a6bf9f2 29032009-04-03 Robert Millan <rmh@aybabtu.com>
2904
2905 * loader/i386/linux.c (grub_linux_setup_video): Fill
2906 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2907 values from `mode info' structure instead of hardcoded
2908 values.
2909
3fcc2083 29102009-04-01 Pavel Roskin <proski@gnu.org>
2911
2912 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2913 unused now.
2914 * genmk.rb: Likewise.
2915 * configure.ac: Likewise.
2916
5ec9740b 29172009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2918
2919 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2920 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2921
5270cec8 29222009-04-01 David S. Miller <davem@davemloft.net>
2923
2924 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2925 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2926 (grub_setjmp): Mark with 'returns_twice' attribute.
2927 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2928 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2929 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2930
9c3dd854 29312009-04-01 Robert Millan <rmh@aybabtu.com>
2932
2933 Reapply fix from 2008-07-28 which was accidentally reverted; also
2934 perform the same fix to a similar check in same function.
2935
2936 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2937 with the same number are found, just use issue a warning with
2938 grub_dprintf(), as this error has been reported to be non-fatal.
2939
0d818b7e 29402009-03-31 Pavel Roskin <proski@gnu.org>
2941
2942 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2943 for cross-compilation.
2944
95646d92 29452009-03-30 Robert Millan <rmh@aybabtu.com>
2946
2947 Fix i386-ieee1275 build.
2948
2949 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2950 Remove declaration.
2951
6a003ed1 29522009-03-30 Pavel Roskin <proski@gnu.org>
2953
2954 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2955 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2956 zero-terminated, rely only on the strlen value. Fix comparison
2957 of strings differing in length.
2958
92f33540 29592009-03-30 Robert Millan <rmh@aybabtu.com>
2960
2961 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2962 checking for abi version. Improve error messages on BIOS to notify
2963 user about `linux16' command.
2964
a8c48fd5 29652009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2966
f968172e 2967 Leak fixes
a8c48fd5 2968
f968172e 2969 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2970 in case of collision
2971 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2972
9c323f09 29732009-03-29 Robert Millan <rmh@aybabtu.com>
2974
2975 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2976 set `vid_mode' accordingly.
2977 (grub_linux_boot): Process `vid_mode' and set video mode.
2978
ae68f423 29792009-03-29 Robert Millan <rmh@aybabtu.com>
2980
2981 * util/grub.d/10_linux.in (linux_entry): New function.
2982 Factorize generation of Linux boot entries.
2983
5709cfc4 29842009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2985
2986 Make the format of Environment Block plain text. The boot loader
2987 part is not tested well yet.
7dd4a573 2988
5709cfc4 2989 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2990 (buffer): Removed.
2991 (envblk): Likewise.
2992 (usage): Remove "info" and "clear". Add "unset". Update the
2993 description of "set", as this does not delete variables any
2994 longer.
2995 (create_envblk_file): Complete rewrite.
2996 (open_envblk_file): Likewise.
2997 (cmd_info): Removed.
2998 (cmd_list): Likewise.
2999 (cmd_set): Likewise.
3000 (cmd_clear): Likewise.
3001 (list_variables): New function.
3002 (write_envblk): Likewise.
3003 (set_variables): Likewise.
3004 (unset_variables): Likewise.
3005 (main): Complete rewrite.
3006
3007 * commands/loadenv.c (buffer): Removed.
3008 (envblk): Likewise.
3009 (open_envblk_file): New function.
3010 (read_envblk_file): Complete rewrite.
3011 (grub_cmd_load_env): Likewise.
3012 (grub_cmd_list_env): Likewise.
3013 (struct blocklist): New struct.
3014 (free_blocklists): New function.
3015 (check_blocklists): Likewise.
3016 (write_blocklists): Likewise.
3017 (grub_cmd_save_env): Complete rewrite.
3018
3019 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3020 a plain text signature.
3021 (GRUB_ENVBLK_MAXLEN): Removed.
3022 (struct grub_envblk): Complete rewrite.
3023 (grub_envblk_find): Removed.
3024 (grub_envblk_insert): Likewise.
3025 (grub_envblk_open): New prototype.
3026 (grub_envblk_set): Likewise.
3027 (grub_envblk_delete): Put const to VALUE.
3028 (grub_envblk_iterate): Put const to NAME and VALUE.
3029 (grub_envblk_close): New prototype.
3030 (grub_envblk_buffer): New inline function.
3031 (grub_envblk_size): Likewise.
3032
3033 * lib/envblk.c: Include grub/mm.h.
3034 (grub_env_find): Removed.
3035 (grub_envblk_open): New function.
3036 (grub_envblk_close): Likewise.
3037 (escaped_value_len): Likewise.
3038 (find_next_line): Likewise.
3039 (grub_envblk_insert): Removed.
3040 (grub_envblk_set): New function.
3041 (grub_envblk_delete): Complete rewrite.
3042 (grub_envblk_iterate): Likewise.
3043
a9368fd3 30442009-03-28 Robert Millan <rmh@aybabtu.com>
3045
3046 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3047 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3048 variables. Use 16-bit loader.
3049 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3050 loader.
3051 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3052 (grub_linux16_boot): ... this. Update all users.
3053 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3054 (grub_linux_boot): ... this. Update all users.
3055
3056 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3057 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3058 commands to `linux16' and `initrd16'.
3059 (GRUB_MOD_FINI(linux)): Rename to ...
3060 (GRUB_MOD_FINI(linux16)): ... this.
3061
e4dd5a7e 30622009-03-24 Pavel Roskin <proski@gnu.org>
3063
3064 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3065 not just for compilation.
3066
c04d6e05 30672009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3068
3069 Move multiboot helper out of kernel
3070
3071 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3072 `loader/i386/multiboot_helper.S'.
3073 * conf/i386-coreboot.rmk: Likewise
3074 * conf/i386-ieee1275.rmk: Likewise
3075
3076 * kern/i386/loader.S: Move multiboot helpers from here...
3077 * loader/i386/multiboot_helper.S: ...moved here
3078 * include/grub/i386/loader.h: Move declarations of multiboot
3079 helpers from here...
3080 * include/grub/i386/multiboot.h: ...moved here
3081 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3082
42a5b3fc 30832009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3084
3085 * kern/env.c (grub_env_context_open): Added an argument to specify
3086 whether a new context inherits exported variables from current
3087 one. This is useful when making a sandbox to interpret a config
3088 file.
3089 All callers updated.
3090
3091 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3092
b28bbc4e 30932009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3094
3095 * kern/env.c (grub_env_context_close): Fix memory leaks.
3096
f04f02e4 30972009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3098
3099 * normal/main.c (grub_normal_execute): Added an argument
3100 BATCH to specify if an interactive interface should be provided
3101 after reading a config file.
3102 All callers updated.
3103 (read_command_list): Prevent being executed twice.
3104 (read_fs_list): Likewise.
3105
42a5b3fc 3106 * include/grub/normal.h (grub_normal_execute): Updated the
3107 prototype.
f04f02e4 3108
41473ac2 31092009-03-22 Pavel Roskin <proski@gno.org>
3110
fbc00b0c 3111 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3112 _start.
3113 * kern/i386/pc/startup.S: Likewise.
3114 * kern/i386/efi/startup.S: Likewise.
3115 * kern/i386/ieee1275/startup.S: Likewise.
3116 * kern/i386/coreboot/startup.S: Likewise.
3117 * kern/x86_64/efi/startup.S: Likewise.
3118
41473ac2 3119 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3120 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3121 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3122
2274cc8f 31232009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
3124
3125 Bugfixes in multiboot for bugs uncovered by solaris kernel.
3126
3127 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3128 limit detection.
3129 Use vaddr of correct segment for entry_point.
3130
b1b797cb 31312009-03-21 Bean <bean123ch@gmail.com>
3132
3133 * commands/blocklist.c: Add include file <grub/command.h>, remove
3134 <grub/normal.h> and <grub/arg.h>.
3135 (grub_cmd_blocklist): Use the new command interface.
3136 (GRUB_MOD_INIT): Likewise.
3137 (GRUB_MOD_FINI): Likewise.
3138 * commands/boot.c: Likewise.
3139 * commands/cat.c: Likewise.
3140 * commands/cmp.c: Likewise.
3141 * commands/configfile.c: Likewise.
3142 * commands/crc.c: Likewise.
3143 * commands/echo.c: Likewise.
3144 * commands/halt.c: Likewise.
3145 * commands/handler.c: Likewise.
3146 * commands/hdparm.c: Likewise.
3147 * commands/help.c: Likewise.
3148 * commands/hexdump.c: Likewise.
3149 * commands/loadenv.c: Likewise.
3150 * commands/ls.c: Likewise.
3151 * commands/lsmmap.c: Likewise.
3152 * commands/lspci.c: Likewise.
3153 * commands/loadenv.c: Likewise.
3154 * commands/read.c: Likewise.
3155 * commands/reboot.c: Likewise.
3156 * commands/search.c: Likewise.
3157 * commands/sleep.c: Likewise.
3158 * commands/test.c: Likewise.
3159 * commands/usbtest.c: Likewise.
3160 * commands/videotest.c: Likewise.
3161 * commands/i386/cpuid.c: Likewise.
3162 * commands/i386/pc/halt.c: Likewise.
3163 * commands/i386/pc/play.c: Likewise.
3164 * commands/i386/pc/pxecmd.c: Likewise.
3165 * commands/i386/pc/vbeinfo.c: Likewise.
3166 * commands/i386/pc/vbetest.c: Likewise.
3167 * commands/ieee1275/suspend.c: Likewise.
3168 * disk/loopback.c: Likewise.
3169 * font/font_cmd.c: Likewise.
3170 * hello/hello.c: Likewise.
3171 * loader/efi/appleloader.c: Likewise.
3172 * loader/efi/chainloader.c: Likewise.
3173 * loader/i386/bsd.c: Likewise.
3174 * loader/i386/efi/linux.c: Likewise.
3175 * loader/i386/ieee1275/linux.c: Likewise.
3176 * loader/i386/linux.c: Likewise.
3177 * loader/i386/pc/chainloader.c: Likewise.
3178 * loader/i386/pc/linux.c: Likewise.
3179 * loader/powerpc/ieee1275/linux.c: Likewise.
3180 * loader/multiboot_loader.c: Likewise.
3181 * term/gfxterm.c: Likewise.
3182 * term/i386/pc/serial.c: Likewise.
3183 * term/terminfo.c: Likewise.
3184
3185 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3186 * term/i386/pc/vga.c: Likewise.
3187 * video/readers/jpeg.c: Likewise.
3188 * video/readers/png.c: Likewise.
3189 * video/readers/tga.c: Likewise.
3190
3191 * util/grub-fstest (cmd_loopback): Removed.
3192 (cmd_blocklist): Likewise.
3193 (cmd_ls): Likewise.
3194 (grub_register_command): Likewise.
3195 (grub_unregister_command): Likewise.
3196 (execute_command): Use grub_command_find to locate command and execute
3197 it.
3198
3199 * include/grub/efi/chainloader.h: Removed.
3200 * loader/efi/chainloader_normal.c: Likewise.
3201 * loader/i386/bsd_normal.c: Likewise.
3202 * loader/i386/pc/chainloader_normal.c: Likewise.
3203 * loader/i386/pc/multiboot_normal.c: Likewise.
3204 * loader/linux_normal.c: Likewise.
3205 * loader/multiboot_loader_normal.c: Likewise.
3206 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3207
3208 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3209 and grub_register_command_p1.
3210
3211 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3212 kern/command.c, lib/arg.c and commands/extcmd.c.
3213 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3214 (minicmd_mod_SOURCES): New variable.
3215 (minicmd_mod_CFLAGS): Likewise.
3216 (minicmd_mod_LDFLAGS): Likewise.
3217 (extcmd_mod_SOURCES): Likewise.
3218 (extcmd_mod_CFLAGS): Likewise.
3219 (extcmd_mod_LDFLAGS): Likewise.
3220 (boot_mod_SOURCES): Removed.
3221 (boot_mod_CFLAGS): Likewise.
3222 (boot_mod_LDFLAGS): Likewise.
3223
3224 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3225 kern/corecmd.c.
3226 (kernel_img_HEADERS): Add command.h.
3227 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3228 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3229 and lib/arg.c.
3230 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3231 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3232 remove the corresponding normal mode command.
3233 (normal_mod_SOURCES): Remove normal/arg.c.
3234 * conf/i386-coreboot.rmk: Likewise.
3235 * conf/i386-efi.rmk: Likewise.
3236 * conf/i386-ieee1275.rmk: Likewise.
3237 * conf/powerpc-ieee1275.rmk: Likewise.
3238 * conf/x86_64-efi.rmk: Likewise.
3239
3240 * include/grub/arg.h: Move from here ...
3241 * include/grub/lib/arg.h: ... to here.
3242
3243 * normal/arg.c: Move from here ...
3244 * lib/arg.c: ... to here.
3245
3246 * commands/extcmd.c: New file.
3247 * commands/minicmd.c: Likewise.
3248 * include/grub/command.h: Likewise.
3249 * include/grub/extcmd.h: Likewise.
3250 * kern/command.c: Likewise.
3251 * kern/corecmd.c: Likewise.
3252
3253 * kern/list.c (grub_list_iterate): Return int instead of void.
3254 (grub_list_insert): New function.
3255 (grub_prio_list_insert): Likewise.
3256
3257 * kern/rescue.c (grub_rescue_command): Removed.
3258 (grub_rescue_command_list): Likewise.
3259 (grub_rescue_register_command): Likewise.
3260 (grub_rescue_unregister_command): Likewise.
3261 (grub_rescue_cmd_boot): Move to minicmd.c
3262 (grub_rescue_cmd_help): Likewise.
3263 (grub_rescue_cmd_info): Likewise.
3264 (grub_rescue_cmd_boot): Likewise.
3265 (grub_rescue_cmd_testload): Likewise.
3266 (grub_rescue_cmd_dump): Likewise.
3267 (grub_rescue_cmd_rmmod): Likewise.
3268 (grub_rescue_cmd_lsmod): Likewise.
3269 (grub_rescue_cmd_exit): Likewise.
3270 (grub_rescue_print_devices): Moved to corecmd.c.
3271 (grub_rescue_print_files): Likewise.
3272 (grub_rescue_cmd_ls): Likewise.
3273 (grub_rescue_cmd_insmod): Likewise.
3274 (grub_rescue_cmd_set): Likewise.
3275 (grub_rescue_cmd_unset): Likewise.
7d074e3c 3276 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 3277 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 3278 commands, remove grub_rescue_register_command calls.
b1b797cb 3279
7d074e3c 3280 * normal/command.c (grub_register_command): Removed.
b1b797cb 3281 (grub_unregister_command): Likewise.
3282 (grub_command_find): Likewise.
3283 (grub_iterate_commands): Likewise.
3284 (rescue_command): Likewise.
3285 (export_command): Moved to corecmd.c.
3286 (set_command): Removed.
3287 (unset_command): Likewise.
3288 (insmod_command): Likewise.
3289 (rmmod_command): Likewise.
3290 (lsmod_command): Likewise.
3291 (grub_command_init): Likewise.
3292
3293 * normal/completion.c (iterate_command): Use cmd->prio to check for
3294 active command.
3295 (complete_arguments): Use grub_extcmd_t structure to find options.
3296 (grub_normal_do_completion): Change function grub_iterate_commands to
3297 grub_command_iterate.
3298
3299 * normal/execute.c (grub_script_execute_cmd): No need to parse
3300 argument here.
3301
3302 * normal/main.c (grub_dyncmd_dispatcher): New function.
3303 (read_command_list): Register unload commands as dyncmd.
3304 (grub_cmd_normal): Use new command interface, register rescue,
3305 unregister normal at entry, register normal, unregister rescue at exit.
3306
3307 * include/grub/list.h (grub_list_test_t): New type.
3308 (grub_list_iterate): Return int instead of void.
3309 (grub_list_insert): New function.
3310 (GRUB_AS_NAMED_LIST_P): New macro.
3311 (GRUB_AS_PRIO_LIST): Likewise.
3312 (GRUB_AS_PRIO_LIST_P): Likewise.
3313 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3314 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3315 (grub_prio_list): New structure.
3316 (grub_prio_list_insert): New function.
3317 (grub_prio_list_remove): New inline function.
3318
3319 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3320 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3321 (GRUB_COMMAND_FLAG_MENU): Likewise.
3322 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3323 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3324 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3325 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3326 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3327 (grub_command): Likewise.
3328 (grub_register_command): Likewise.
3329 (grub_command_find): Likewise.
3330 (grub_iterate_commands): Likewise.
3331 (grub_command_init): Likewise.
3332 (grub_arg_parse): Likewise.
3333 (grub_arg_show_help): Likewise.
3334
3335 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3336 (grub_rescue_unregister_command): Likewise.
3337
3338 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3339 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3340 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3341
3342 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3343 grub_rescue_cmd_initrd.
3344 * include/grub/i386/loader.h: Likewise.
3345 * include/grub/x86_64/loader.h: Likewise.
3346
3347 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3348
1f4147aa 33492009-03-21 Bean <bean123ch@gmail.com>
3350
3351 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3352 instead of stat in mingw environment.
3353
3354 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3355
3356 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3357
3358 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3359 AC_CONFIG_LINKS.
3360
2156d5ba 33612009-03-21 Bean <bean123ch@gmail.com>
3362
3363 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3364 out of range error.
3365
177b82ca 33662009-03-18 Michel Dänzer <michel@daenzer.net>
3367
3368 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3369 checking inode flags for EXT4_EXTENTS_FLAG.
3370
14aad807 33712009-03-18 Robert Millan <rmh@aybabtu.com>
3372
3373 * loader/i386/linux.c: Include `<grub/video.h>' and
3374 `<grub/i386/pc/vbe.h>'..
3375 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3376 (grub_linux32_boot): Attempt to configure video settings with
3377 grub_linux_setup_video().
3378 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3379 to avoid grub_console_fini() which would step out of graphical mode
3380 unconditionally.
3381
8cf83a27 33822009-03-14 Robert Millan <rmh@aybabtu.com>
3383
3384 Fix build on powerpc.
3385 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3386
40164e75 33872009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3388
3389 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3390 background image command.
3391
c58bc32a 33922009-03-12 Colin D Bennett <colin@gibibit.com>
3393
3394 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3395 (grub_gfxterm_putchar): Extract pairs of identical calls to
3396 draw_cursor out of conditional blocks.
3397
5415144a 33982009-03-11 Pavel Roskin <proski@gnu.org>
3399
3400 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3401 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3402
6394042e 34032009-03-11 Robert Millan <rmh@aybabtu.com>
3404
3405 * loader/i386/multiboot_elfxx.c
3406 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3407
b7b50e5f 34082009-03-11 Felix Zielcke <fzielcke@z-51.de>
3409
3410 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3411 `kern/handler.c'.
3412
1ca7fc96 34132009-03-11 Robert Millan <rmh@aybabtu.com>
3414
3415 * loader/i386/multiboot.c (code_size): New variable.
3416 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 3417 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 3418 4-byte alignment to MBI and others by increasing
7d074e3c 3419 `boot_loader_name_length' appropriately.
1ca7fc96 3420
3421 * loader/i386/multiboot_elfxx.c
3422 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3423
a83ea1d2 34242009-03-09 Felix Zielcke <fzielcke@z-51.de>
3425
3426 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3427 `fs/ext2.c'.
3428
aa9f3bff 34292009-03-08 Robert Millan <rmh@aybabtu.com>
3430
3431 Make loader/i386/linux.c usable on i386-pc again.
3432
3433 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3434 memory to heap.
3435 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3436 `#error' stanza.
3437
d8b3b60e 34382009-03-07 Bean <bean123ch@gmail.com>
3439
3440 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3441 allocation.
3442
b362c9e9 34432009-03-06 Robert Millan <rmh@aybabtu.com>
3444
3445 Fix display issue on terminals with screen size other than 80x25
3446 (e.g. gfxterm with resolution higher than 640x480).
3447
3448 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 3449 position relative to the center of the terminal instead of relying
b362c9e9 3450 on a hardcoded offset.
3451
9304eef1 34522009-03-04 Robert Millan <rmh@aybabtu.com>
3453
3454 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3455 installed.
3456
3457 * Makefile.in (host_kernel): New variable.
3458 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3459 scripts instead of just the windows one.
3460 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3461
eabc95fb 34622009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 3463
3464 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3465 `kern/handler.c'.
3466 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3467 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3468 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3469 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3470 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3471 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3472
ceb1223c 34732009-03-04 Felix Zielcke <fzielcke@z-51.de>
3474
3475 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3476 or if there's no space for the disk label and print the partition number on a
3477 invalid magic.
3478
4910684a 34792009-03-04 Felix Zielcke <fzielcke@z-51.de>
3480
3481 * util/misc.c: Include <time.h>.
3482 (grub_millisleep): New function.
3483
7e9ca17a 34842009-03-04 Bean <bean123ch@gmail.com>
3485
3486 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3487 another option -mno-red-zone.
3488
3489 * commands/handler.c: Change module description.
3490
3491 * kern/handler.c: Add missing space at the end of description line.
3492
3493 * kern/list.c: Likewise.
3494
f501677c 34952009-03-03 Robert Millan <rmh@aybabtu.com>
3496
3497 Move more components to the relocation area, and fix mbi pointer
3498 handling to use the destination rather than the origin (thanks to
3499 Vladimir Serbinenko for spotting).
3500
3501 * loader/i386/multiboot.c (mbi_dest): New variable.
3502 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3503 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3504 relocation area.
3505
9902d047 35062009-03-01 Bean <bean123ch@gmail.com>
3507
50fb7002 3508 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 3509 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3510 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3511 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3512
3513 * loader/i386/efi/linux.c (acpi_guid): New variable.
3514 (acpi_guid): Likewise.
3515 (EBDA_SEG_ADDR): New constant.
3516 (LOW_MEM_ADDR): Likewise.
3517 (FAKE_EBDA_SEG): Likewise.
3518 (fake_bios_data): New function.
3519 (grub_linux_boot): Call fake_bios_data.
3520
71b9f361 35212009-03-01 Bean <bean123ch@gmail.com>
3522
3523 * commands/terminal.c: Removed.
3524
3525 * commands/handler.c: New file.
3526
3527 * include/grub/list.h: Likewise.
3528
3529 * include/grub/handler.h: Likewise.
3530
3531 * kern/list.c: Likewise.
3532
3533 * kern/handler.c: Likewise.
3534
3535 * kern/term.h: Include header file <grub/handler.h>.
3536 (grub_term_input): Move next field to the beginning.
3537 (grub_term_output): Likewise.
3538 (grub_term_input_class): New variable.
3539 (grub_term_output_class): Likewise.
3540 (grub_term_register_input): Changed to inline function.
3541 (grub_term_register_output): Likewise.
3542 (grub_term_unregister_input): Likewise.
3543 (grub_term_unregister_output): Likewise.
3544 (grub_term_set_current_input): Likewise.
3545 (grub_term_set_current_output): Likewise.
3546 (grub_term_get_current_input): Likewise.
3547 (grub_term_get_current_output): Likewise.
3548 (grub_term_iterate_input): Removed.
3549 (grub_term_iterate_output): Likewise.
3550
3551 * kern/term.c (grub_term_list_input): Removed.
3552 (grub_term_list_output): Likewise.
3553 (grub_term_input_class): New variable.
3554 (grub_term_output_class): Likewise.
50fb7002 3555 (grub_cur_term_input): Change variable as macro.
71b9f361 3556 (grub_cur_term_output): Likewise.
3557 (grub_term_register_input): Removed.
3558 (grub_term_register_output): Likewise.
3559 (grub_term_unregister_input): Likewise.
3560 (grub_term_unregister_output): Likewise.
3561 (grub_term_set_current_input): Likewise.
3562 (grub_term_set_current_output): Likewise.
3563 (grub_term_iterate_input): Likewise.
3564 (grub_term_iterate_output): Likewise.
3565 (grub_term_get_current_input): Likewise.
3566 (grub_term_get_current_output): Likewise.
3567
3568 * util/grub-editenv.c: Include header file <grub/handler.h>.
3569 (grub_term_get_current_input): Removed.
3570 (grub_term_get_current_output): Likewise.
3571 (grub_term_input_class): New variable.
50fb7002 3572 (grub_term_output_class): Likewise.
71b9f361 3573
3574 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3575 (grub_term_get_current_output): Likewise.
3576 (grub_term_input_class): New variable.
50fb7002 3577 (grub_term_output_class): Likewise.
71b9f361 3578
3579 * util/grub-probe.c (grub_term_get_current_input): Removed.
3580 (grub_term_get_current_output): Likewise.
3581 (grub_term_input_class): New variable.
50fb7002 3582 (grub_term_output_class): Likewise.
71b9f361 3583
3584 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3585 (grub_term_get_current_output): Likewise.
3586 (grub_term_input_class): New variable.
50fb7002 3587 (grub_term_output_class): Likewise.
71b9f361 3588
3589 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3590 (terminal_mod_SOURCES): Likewise.
3591 (terminal_mod_CFLAGS): Likewise.
3592 (terminal_mod_LDFLAGS): Likewise.
3593
3594 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3595 handler.c.
3596 (kernel_img_SOURCES): Add list.c and handler.c.
3597 (kernel_img_HEADERS): Add list.h and handler.h.
3598
3599 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3600 handler.c.
3601 (kernel_mod_SOURCES): Add list.c and handler.c.
3602 (kernel_mod_HEADERS): Add list.h and handler.h.
3603
3604 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3605 handler.c.
3606 (kernel_elf_SOURCES): Add list.c and handler.c.
3607 (kernel_elf_HEADERS): Add list.h and handler.h.
3608
3609 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3610 handler.c.
3611 (kernel_elf_SOURCES): Add list.c and handler.c.
3612 (kernel_elf_HEADERS): Add list.h and handler.h.
3613
3614 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3615 handler.c.
3616 (kernel_mod_SOURCES): Add list.c and handler.c.
3617 (kernel_mod_HEADERS): Add list.h and handler.h.
3618
3619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3620 handler.c.
3621 (kernel_elf_SOURCES): Add list.c and handler.c.
3622 (kernel_elf_HEADERS): Add list.h and handler.h.
3623
8a31787f 36242009-02-27 Robert Millan <rmh@aybabtu.com>
3625
3626 Factorize elf32 / elf64 code in Multiboot loader. This will
3627 prevent it from getting out of sync again.
3628
3629 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3630 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3631 grub_multiboot_load_elf64): Move from here ...
3632 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3633 grub_multiboot_load_elf): ... to here (new file).
3634
51cd3dfc 36352009-02-27 Robert Millan <rmh@aybabtu.com>
3636
3637 * util/grub.d/10_linux.in: Rename "single-user mode" to
3638 "recovery mode".
3639
6e8c9c3a 36402009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3641
3642 Don't leak in SCSI code.
3643 * disk/scsi.c (grub_scsi_close): free `scsi'.
3644
4b6bf4f9 36452009-02-27 Robert Millan <rmh@aybabtu.com>
3646
3647 * loader/i386/pc/multiboot.c: Move from here ...
3648 * loader/i386/multiboot.c: ... to here. Update all users.
3649
b9413424 36502009-02-27 Robert Millan <rmh@aybabtu.com>
3651
3652 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3653 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3654
50fb7002 36552009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 3656
3657 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3658 b-tree.
3659
8cc50345 36602009-02-27 Robert Millan <rmh@aybabtu.com>
3661
3662 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3663 `0x' qualifier as 0 when base is specified as parameter).
3664
6e09b8b7 36652009-02-24 Bean <bean123ch@gmail.com>
3666
3667 * configure.ac: Check for -mcmodel=large in x86_64 target.
3668
3669 * include/grub/efi/api.h (efi_call_10): New macro.
3670 (efi_wrap_10): New function.
3671
3672 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3673 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3674 (GRUB_PE32_REL_BASED_LOW): Likewise.
3675 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3676 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3677 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3678 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3679 (GRUB_PE32_REL_BASED_REL): Likewise.
3680 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3681 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3682 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3683
3684 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3685 issue.
3686
3687 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3688 (efi_wrap_10): New function.
3689
3690 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3691
3692 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3693 MB/MBP model (NV chipset).
3694 (devdata_devs): Add devpath_5 to the list.
3695
3696 * load/i386/efi/linux.c (video_base): Remove variable.
3697 (RGB_MASK): New macro.
3698 (RGB_MAGIC): Likewise.
3699 (LINE_MIN): Likewise.
3700 (LINE_MAX): Likewise.
3701 (FBTEST_STEP): Likewise.
3702 (FBTEST_COUNT): Likewise.
3703 (fb_list): New variable.
3704 (grub_find_video_card): Remove function.
3705 (find_framebuf): New function.
3706 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3707 line length.
3708
3709 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3710 problem for x86_64.
3711
74b21bee 37122009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3713
3714 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3715
3716 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3717 coding tool name.
3718
a455f472 37192009-02-22 Robert Millan <rmh@aybabtu.com>
3720
3721 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3722 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3723 in our relocation, instead of using it directly from heap. Also
3724 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3725
6374daf3 37262009-02-21 Robert Millan <rmh@aybabtu.com>
3727
3728 Implement USB keyboard support (based on patch by Marco Gerards)
3729
3730 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3731 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3732 (usb_keyboard_mod_LDFLAGS): New variables.
3733
3734 * term/usb_keyboard.c: New file.
3735
8fa4ea70 37362009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3737
3738 Corrected wrong declaration
3739
3740 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3741
353976ac 37422009-02-14 Christian Franke <franke@computer.org>
3743
3744 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3745 (grub_lspci_iter): Print class code and programming interface byte.
3746
6aa1169b 37472009-02-14 Christian Franke <franke@computer.org>
3748
3749 * gendistlist.sh: Ignore `.svn' directories.
3750
265372ca 37512009-02-14 Felix Zielcke <fzielcke@z-51.de>
3752
3753 * fs/fat.c: Add 2009 to Copyright line.
3754
9ff516f3 37552009-02-14 Christian Franke <franke@computer.org>
3756
3757 * commands/hdparm.c: New file. Provides `hdparm' command
3758 which sends ATA commands via grub_disk_ata_pass_through ().
3759
3760 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3761
3762 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3763 and <grub/cpu/io.h> to include/grub/ata.h.
3764 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3765 (GRUB_CDROM_SECTOR_SIZE): Remove.
3766 (GRUB_ATA_*): Move to include/grub/ata.h.
3767 (GRUB_ATAPI_*): Likewise.
3768 (enum grub_ata_commands): Likewise.
3769 (enum grub_ata_timeout_milliseconds): Likewise.
3770 (struct grub_ata_device): Likewise.
3771 (grub_ata_regset): Likewise.
3772 (grub_ata_regget): Likewise.
3773 (grub_ata_regset2): Likewise.
3774 (grub_ata_regget2): Likewise.
3775 (grub_ata_check_ready): Likewise.
3776 (grub_ata_wait_not_busy): Remove static, exported in
3777 include/grub/ata.h.
3778 (grub_ata_wait_drq): Likewise.
3779 (grub_ata_pio_read): Likewise.
3780
3781 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3782 function for hdparm.mod.
3783
3784 * include/grub/ata.h: New file, contains declarations from
3785 disk/ata.c.
3786 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3787
3788 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3789 (grub_disk_ata_pass_through): New exported variable.
3790
3791 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3792
772e23da 37932009-02-13 Colin D Bennett <colin@gibibit.com>
3794
3795 Support multiple fallback entries, and provide an API to support
3796 executing default+fallback menu entries. Renamed the `terminal' menu
3797 viewer to `text'.
3798
3799 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3800 variable declaration.
3801 (grub_menu_execute_callback): New structure declaration.
3802 (grub_menu_execute_callback_t): New typedef.
3803 (grub_menu_execute_with_fallback): New function declaration.
3804 (grub_menu_get_entry): Likewise.
3805 (grub_menu_get_timeout): Likewise.
3806 (grub_menu_set_timeout): Likewise.
3807
3808 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3809
3810 * normal/menu.c (grub_wait_after_message): Moved to
3811 `normal/menu_text.c'.
3812 (draw_border): Likewise.
3813 (print_message): Likewise.
3814 (print_entry): Likewise.
3815 (print_entries): Likewise.
3816 (grub_menu_init_page): Likewise.
3817 (get_entry_number): Likewise.
3818 (print_timeout): Likewise.
3819 (run_menu): Likewise.
3820 (grub_menu_execute_entry): Likewise.
3821 (show_text_menu): Likewise.
3822 (get_and_remove_first_entry_number): New function.
3823 (grub_menu_execute_with_fallback): Likewise.
3824 (get_entry): Renamed to ...
3825 (grub_menu_get_entry): .. this and made it global.
3826 (get_timeout): Renamed to ...
3827 (grub_menu_get_timeout): ... this and made it global.
3828 (set_timeout): Renamed to ...
3829 (grub_menu_set_timeout): ... this and made it global.
3830 (grub_normal_terminal_menu_viewer): Renamed to ...
3831 (grub_normal_text_menu_viewer): ... this.
3832
3833 * normal/menu_text.c: New file. Extracted text-menu-specific code
3834 from normal/menu.c.
3835
3836 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3837 (normal_mod_SOURCES): Likewise.
3838
3839 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3840 (normal_mod_SOURCES): Likewise.
3841
3842 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3843 (normal_mod_SOURCES): Likewise.
3844
3845 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3846 (normal_mod_SOURCES): Likewise.
3847
3848 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3849 (normal_mod_SOURCES): Likewise.
3850
3851 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3852 (normal_mod_SOURCES): Likewise.
3853
3854 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3855 (normal_mod_SOURCES): Likewise.
3856
16ac430e 38572009-02-11 Robert Millan <rmh@aybabtu.com>
3858
3859 * util/grub.d/00_header.in: Update old reference to `font' command.
3860
06ff20fc 38612009-02-10 Felix Zielcke <fzielcke@z-51.de>
3862
3863 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3864
3865 Based on patch from Javier Martín.
3866
96da9407 38672009-02-09 Felix Zielcke <fzielcke@z-51.de>
3868
3869 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3870 to avoid false positives with FAT.
96da9407 3871 (grub_fstest_SOURCES): Likewise.
3872 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3873 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3874 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3875 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3876 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3877 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3878
6dca6fe4 38792009-02-09 Felix Zielcke <fzielcke@z-51.de>
3880
06ff20fc 3881 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3882 bpb.version_specific.fat12_or_fat16.fstype and
3883 bpb.version_specific.fat32.fstype.
3884
2550c62f 38852009-02-08 Robert Millan <rmh@aybabtu.com>
3886
be110b30 3887 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3888
56978920 38892009-02-08 Robert Millan <rmh@aybabtu.com>
3890
3891 * Makefile.in (host_os, host_cpu): New variables.
3892 (target_os): Remove. Update all users.
3893
d64399b5 38942009-02-08 Marco Gerards <marco@gnu.org>
3895
3896 * Makefile.in (enable_grub_emu_usb): New variable.
3897 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3898 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3899 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3900 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3901 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3902 `usbtest.mod' and `usbms.mod'.
3903 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3904 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3905 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3906 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3907 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3908 variables.
3909
3910 * disk/usbms.c: New file.
3911
3912 * include/grub/usb.h: Likewise.
3913
3914 * include/grub/usbtrans.h: Likewise.
3915
3916 * include/grub/usbdesc.h: Likewise.
3917
3918 * bus/usb/usbtrans.c: Likewise.
3919
3920 * bus/usb/ohci.c: Likewise.
3921
3922 * bus/usb/uhci.c: Likewise.
3923
3924 * bus/usb/usbhub.c: Likewise.
3925
3926 * bus/usb/usb.c: Likewise.
3927
3928 * commands/usbtest.c: Likewise.
3929
3930 * util/usb.c: Likewise.
50fb7002 3931
d64399b5 3932 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3933
3934 * configure.ac: Test for libusb presence.
50fb7002 3935
d64399b5 3936 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3937
2b40d6bb 39382009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3939
3940 * kern/mm.c: Add more comments.
3941
73a4ce81 39422009-02-08 Robert Millan <rmh@aybabtu.com>
3943
3944 Patch from Javier Martín.
3945 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3946 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3947
f821ce59 39482009-02-08 Robert Millan <rmh@aybabtu.com>
3949
3950 * fs/cpio.c: Split tar functionality to ...
3951 * fs/tar.c: ... here (new file). Update all users.
3952
aebfc4b0 39532009-02-07 Robert Millan <rmh@aybabtu.com>
3954
3955 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3956 backward-incompatible features.
3957
3958 Based on patch from Javier Martín, with some adjustments.
3959
50fb7002 39602009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3961
3962 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3963
0bb5115e 39642009-02-07 Robert Millan <rmh@aybabtu.com>
3965
3966 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3967 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3968 after the RAID stuff.
3969
38a0f8e7 39702009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3971
50fb7002 3972 Fixes problem when running vbetest command as reported by
38a0f8e7 3973 Vladimir Serbinenko <phcoder@gmail.com>.
3974
3975 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3976
3143cc1c 39772009-02-04 Felix Zielcke <fzielcke@z-51.de>
3978
3979 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3980 /dev/md/NpN style mdraid devices.
3981
9cba6fce 39822009-02-03 Felix Zielcke <fzielcke@z-51.de>
3983
3984 * util/unifont2pff.rb: Remove.
3985
e507a2c1 39862009-02-03 Felix Zielcke <fzielcke@z-51.de>
3987
3988 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3989 `#'.
3990
d2c2b4cd 39912009-02-03 Felix Zielcke <fzielcke@z-51.de>
3992
3993 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3994 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3995 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3996 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3997 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3998 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3999 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4000
b4315fb0 40012009-02-02 Christian Franke <franke@computer.org>
4002
4003 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4004
de3aa260 40052009-02-01 Felix Zielcke <fzielcke@z-51.de>
4006
7c3ff286 4007 * INSTALL: Note that we now require at least autoconf 2.59 and
4008 that LZO is optional.
de3aa260 4009
825a182b 40102009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4011
4012 Base on patch on bug #24154 created by Tomas Tintera
4013 <trosos@seznam.cz>.
4014
4015 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4016
a69ef770 40172009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4018
7c3ff286 4019 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 4020 <bero@arklinux.org>.
4021
4022 * normal/parser.y (script_init): Add missing semicolon.
4023
6fa42fa6 40242009-01-31 Colin D Bennett <colin@gibibit.com>
4025
7c3ff286 4026 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 4027 (free_menu_entry_classes): Added.
4028 (grub_normal_menu_addentry): Added class property handling.
4029 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4030 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4031
4032 * normal/menu_viewer.c: New file.
4033
4034 * normal/menu.c (run_menu_entry): Renamed to ...
4035 (grub_menu_execute_entry): ... this and made it as global.
4036 (grub_menu_run): Renamed to ...
4037 (show_text_menu): ... this and made it local.
4038 (show_text_menu): Adapt to new function names.
4039 (grub_normal_terminal_menu_viewer): New global variable.
4040
4041 * include/grub/menu.h: New file.
4042
4043 * include/grub/menu_viewer.h: New file.
4044
4045 * include/grub/normal.h: Added include to grub/menu.h.
4046 (grub_menu_entry): Moved to include/grub/menu.h.
4047 (grub_menu_entry_t): Likewise.
4048 (grub_menu): Likewise.
4049 (grub_menu_t): Likewise.
4050 (grub_normal_terminal_menu_viewer): Added.
4051 (grub_menu_execute_entry): Likewise.
4052 (grub_menu_run): Removed.
4053
4054 * DISTLIST: Added include/grub/menu.h.
4055 Added include/grub/menu_viewer.h.
4056 Added normal/menu_viewer.c.
4057
40582009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4059
4060 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4061 arglist for menutitle arguments.
4062
4063 * normal/main.c (grub_normal_menu_addentry): Likewise.
4064
4065 * normal/parser.y (menuentry): Likewise.
4066
4067 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4068
4069 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4070 (grub_script_create_cmdmenu): Likewise.
4071
4072 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4073
4074 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4075 changes.
4076
4077 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4078
4079 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4080
4081 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4082
4083 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4084
4085 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4086
4087 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4088
56192c23 40892009-01-30 Christian Franke <franke@computer.org>
4090
4091 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4092 in option help text.
4093
d72521b3 40942009-01-27 Pavel Roskin <proski@gnu.org>
4095
4096 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4097
994b5e84 40982009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4099
4100 * commands/lsmmap.c: Add include to grub/machine/memory.h.
4101
4102 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4103
4104 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4105 unregister function.
4106
6a7eab2c 41072009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4108
4109 * disk/scsi.c (grub_scsi_read): Fix sign problem.
4110
4111 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4112
4113 * util/grub-mkfont.c (usage): Fix typo.
4114
4115 * util/elf/grub-mkimage.c (load_modules): Fix warning.
4116
1806b56e 41172009-01-26 Daniel Mierswa <impulze@impulze.org>
4118
3fb18f09 4119 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4120
336e1fb9 4121 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4122
1806b56e 4123 * kern/misc.c (grub_strcasecmp): New function.
4124 (grub_strcasecmp): Use grub_size_t instead of int for length.
4125 Fix return value.
4126 * include/grub/misc.h: Update function prototypes.
4127
580b2a0f 41282009-01-26 Robert Millan <rmh@aybabtu.com>
4129
4130 * configure.ac: Fix cross-compilation check.
ef257b36 4131
d31c24f1 41322009-01-22 Christian Franke <franke@computer.org>
4133
4134 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4135 (precision) digit string. Allow `.format2' without `format1' (width).
4136 Limit input chars for `%s' output to `format2' if specified. This is
4137 compatible with standard printf ().
4138
3138b44c 41392009-01-22 Christian Franke <franke@computer.org>
4140
4141 * disk/ata.c (grub_ata_wait_status): Replace by ...
4142 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4143 other status bits may be invalid while BSY is asserted.
4144 (grub_ata_check_ready): New function.
4145 (grub_ata_cmd): Removed.
4146 (grub_ata_wait_drq): New function.
4147 (grub_ata_strncpy): Remove inline.
4148 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4149 and error check now done by grub_ata_wait_drq ().
4150 (grub_ata_pio_write): Likewise.
4151 (grub_atapi_identify): Set DEV before check for !BSY. Use
4152 grub_ata_wait_drq () to wait for data.
4153 (grub_ata_device_initialize): Add status register check to
4154 detect missing SATA slave devices. Add debug messages.
4155 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4156 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4157 transfer loop by grub_ata_pio_write ().
4158 (grub_ata_identify): Set DEV before check for !BSY. Use
4159 grub_ata_wait_drq () to wait for data.
ef257b36 4160 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 4161 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4162 read/write in one loop. Fix invalid command on write. Fix incomplete
4163 command on (size % batch) == 0. Add missing error check after write of
4164 last block. Add debug messages.
4165 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4166
59a64ef6 41672009-01-19 Christian Franke <franke@computer.org>
4168
4169 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4170 (GRUB_ATAPI_IREASON_*): Likewise.
4171 (grub_ata_pio_write): Fix timeout error return.
4172 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4173 (grub_atapi_wait_drq): New function.
4174 (grub_atapi_packet): New parameter `size'.
4175 Use grub_atapi_wait_drq () and direct write instead of
4176 grub_ata_pio_write ().
4177 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4178 reads the number of bytes requested by the device for each DRQ
4179 assertion.
4180 (grub_atapi_write): Remove old implementation, return not
4181 implemented instead.
4182
1cfe20b3 41832009-01-19 Christian Franke <franke@computer.org>
4184
4185 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4186 of 512 to calculate data size.
4187 (grub_scsi_read12): Likewise.
4188 (grub_scsi_write10): Likewise.
4189 (grub_scsi_write12): Likewise.
4190 (grub_scsi_read): Adjust size according to blocksize.
4191 Add checks for invalid blocksize and unaligned transfer.
4192
bee5fe5d 41932009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4194
4195 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4196
ef257b36 4197 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 4198 width glyphs.
4199
3e643f8c 42002009-01-19 Robert Millan <rmh@aybabtu.com>
4201
4202 * config.guess: Update to latest version from config git.
4203 * config.sub: Likewise.
4204
4fa80998 42052009-01-17 Felix Zielcke <fzielcke@z-51.de>
4206
4207 * Makefile.in: Change font compilation to use new grub-mkfont instead
4208 of java version.
4209
4210 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4211 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4212 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4213 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4214 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4215 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4216 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4217 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4218 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4219
7086085b 42202009-01-16 Christian Franke <franke@computer.org>
4221
4222 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4223 (enum grub_ata_timeout_milliseconds): New enum.
4224 (grub_ata_wait_status): Add parameter milliseconds.
4225 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4226 recovery from timed-out commands.
4227 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4228 return grub_errno instead of REG_ERROR.
4229 (grub_ata_pio_write): Add parameter milliseconds.
4230 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4231 Pass milliseconds to grub_ata_wait_status () and
4232 grub_ata_pio_read ().
4233 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4234 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4235 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4236 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4237 It is not suitable for device detection, because DEV bit is ignored,
4238 the command may run too long, and not all devices set the signature
4239 properly.
4240 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4241 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4242 Fix device selection, DEV bit must be set first to address the registers
4243 of the correct device.
4244 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4245 grub_ata_pio_read/write ().
4246 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4247 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4248
4a412913 42492009-01-13 Carles Pina i Estany <carles@pina.cat>
4250
4251 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4252
7795c55e 42532009-01-13 Bean <bean123ch@gmail.com>
d913988c 4254
4255 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4256
7795c55e 42572009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 4258
4259 * Makefile.in: (enable_grub_mkfont): New variable.
4260 (freetype_cflags): Likewise.
4261 (freetype_libs): Likewise.
4262
4263 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4264 (grub_mkfont_SOURCES): New variable.
4265 (grub_mkfont_CFLAGS): Likewise.
4266 (grub_mkfont_LDFLAGS): Likewise.
4267
4268 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4269 library if `--enable-grub-mkfont' is requested.
4270 (enable_grub_mkfont): New variable.
4271 (freetype_cflags): Likewise.
4272 (freetype_libs): Likewise.
4273
4274 * util/grub-mkfont.c: New file.
4275
093af1fe 42762009-01-12 Christian Franke <franke@computer.org>
4277
4278 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4279 mode check. Fix setting of compat_use[].
4280
f36cc108 42812009-01-10 Robert Millan <rmh@aybabtu.com>
4282
4283 Update a few copyright years which we forgot to do in 2008 (only for
4284 files whose changes made in 2008 were copyright-significant)
4285
4286 * Makefile.in: Add 2008 to Copyright line.
4287 * disk/ieee1275/ofdisk.c: Likewise.
4288 * disk/efi/efidisk.c: Likewise.
4289 * kern/dl.c: Likewise.
4290 * kern/sparc64/ieee1275/init.c: Likewise.
4291 * kern/mm.c: Likewise.
4292 * kern/efi/mm.c: Likewise.
4293 * boot/i386/pc/boot.S: Likewise.
4294 * genfslist.sh: Likewise.
4295 * fs/iso9660.c: Likewise.
4296 * fs/hfs.c: Likewise.
4297 * fs/jfs.c: Likewise.
4298 * fs/minix.c: Likewise.
4299 * fs/ufs.c: Likewise.
4300 * gensymlist.sh.in: Likewise.
4301 * genkernsyms.sh.in: Likewise.
4302 * include/grub/misc.h: Likewise.
4303 * include/grub/types.h: Likewise.
4304 * include/grub/symbol.h: Likewise.
4305 * include/grub/elf.h: Likewise.
4306 * include/grub/kernel.h: Likewise.
4307 * include/grub/disk.h: Likewise.
4308 * include/grub/dl.h: Likewise.
4309 * include/grub/i386/linux.h: Likewise.
4310 * include/grub/i386/pc/biosdisk.h: Likewise.
4311 * include/grub/efi/api.h: Likewise.
4312 * include/grub/efi/pe32.h: Likewise.
4313 * include/grub/util/misc.h: Likewise.
4314 * normal/execute.c: Likewise.
4315 * normal/arg.c: Likewise.
4316 * normal/completion.c: Likewise.
4317 * normal/lexer.c: Likewise.
4318 * normal/parser.y: Likewise.
4319 * normal/misc.c: Likewise.
4320 * commands/i386/pc/vbeinfo.c: Likewise.
4321 * commands/hexdump.c: Likewise.
4322 * commands/terminal.c: Likewise.
4323 * commands/ls.c: Likewise.
4324 * commands/help.c: Likewise.
4325 * partmap/pc.c: Likewise.
4326 * loader/efi/chainloader.c: Likewise.
4327 * loader/multiboot_loader.c: Likewise.
4328 * loader/i386/pc/multiboot2.c: Likewise.
4329 * term/efi/console.c: Likewise.
4330 * term/i386/pc/serial.c: Likewise.
4331 * util/lvm.c: Likewise.
4332 * util/console.c: Likewise.
4333 * util/i386/efi/grub-mkimage.c: Likewise.
4334 * util/raid.c: Likewise.
4335
7f02114b 43362009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4337
4338 * commands/videotest.c: Removed include to grub/machine/memory.h.
4339
4340 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4341 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4342 (video_mod_SOURCES): Removed.
4343 (video_mod_CFLAGS): Likewise.
4344 (video_mod_LDFLAGS): Likewise.
4345 (gfxterm_mod_SOURCES): Likewise.
4346 (gfxterm_mod_CFLAGS): Likewise.
4347 (gfxterm_mod_LDFLAGS): Likewise.
4348 (videotest_mod_SOURCES): Likewise.
4349 (videotest_mod_CFLAGS): Likewise.
4350 (videotest_mod_LDFLAGS): Likewise.
4351 (bitmap_mod_SOURCES): Likewise.
4352 (bitmap_mod_CFLAGS): Likewise.
4353 (bitmap_mod_LDFLAGS): Likewise.
4354 (tga_mod_SOURCES): Likewise.
4355 (tga_mod_CFLAGS): Likewise.
4356 (tga_mod_LDFLAGS): Likewise.
4357 (jpeg_mod_SOURCES): Likewise.
4358 (jpeg_mod_CFLAGS): Likewise.
4359 (jpeg_mod_LDFLAGS): Likewise.
4360 (png_mod_SOURCES): Likewise.
4361 (png_mod_CFLAGS): Likewise.
4362 (png_mod_LDFLAGS): Likewise.
4363
4364 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4365 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4366 (video_mod_SOURCES): Added.
4367 (video_mod_CFLAGS): Likewise.
4368 (video_mod_LDFLAGS): Likewise.
4369 (videotest_mod_SOURCES): Likewise.
4370 (videotest_mod_CFLAGS): Likewise.
4371 (videotest_mod_LDFLAGS): Likewise.
4372 (bitmap_mod_SOURCES): Likewise.
4373 (bitmap_mod_CFLAGS): Likewise.
4374 (bitmap_mod_LDFLAGS): Likewise.
4375 (tga_mod_SOURCES): Likewise.
4376 (tga_mod_CFLAGS): Likewise.
4377 (tga_mod_LDFLAGS): Likewise.
4378 (jpeg_mod_SOURCES): Likewise.
4379 (jpeg_mod_CFLAGS): Likewise.
4380 (jpeg_mod_LDFLAGS): Likewise.
4381 (png_mod_SOURCES): Likewise.
4382 (png_mod_CFLAGS): Likewise.
4383 (png_mod_LDFLAGS): Likewise.
4384 (gfxterm_mod_SOURCES): Likewise.
4385 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 4386 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 4387
4388 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4389 grub/machine/console.h.
4390
644fff97 43912009-01-04 Jerone Young <jerone@gmail.com>
4392
4393 Make on screen instructions clearer
4394
4395 Based on patch created by Jidanni <jidanni@jidanni.org>
4396
4397 * normal/menu.c: print clearer instructions on the screen
4398
1e901a75 43992009-01-02 Colin D Bennett <colin@gibibit.com>
4400
4401 New font engine.
34c44600 4402
1e901a75 4403 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4404 build system and fixed gfxterm.c to work with different sized fonts.
4405
4406 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 4407
1e901a75 4408 * configure: Re-generated.
34c44600 4409
1e901a75 4410 * DISTLIST: Removed font/manager.c.
4411 Added font/font.c.
4412 Added font/font_cmd.c.
34c44600 4413
1e901a75 4414 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4415 compilation.
34c44600 4416
1e901a75 4417 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 4418
4419 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 4420
4421 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 4422
1e901a75 4423 * normal/menu.c: Likewise.
34c44600 4424
1e901a75 4425 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4426 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 4427
1e901a75 4428 * include/grub/font.h: Replaced with new file.
34c44600 4429
1e901a75 4430 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4431 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4432 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4433 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4434 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 4435 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 4436 fg_red, fg_green, fg_blue, fg_alpha.
4437 (grub_video_adapter): Removed blit_glyph.
34c44600 4438 (grub_video_blit_glyph): Removed.
4439
1e901a75 4440 * font/manager.c: Removed file.
34c44600 4441
4442 * font/font.c: New file.
4443
1e901a75 4444 * font/font_cmd.c: Likewise.
34c44600 4445
1e901a75 4446 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 4447
1e901a75 4448 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4449 (grub_video_vbe_map_rgba): Likewise.
4450 (grub_video_vbe_unmap_color_int): Likewise.
4451 (grub_video_vbe_blit_glyph): Removed.
4452 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 4453
1e901a75 4454 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4455 (get_pixel): Likewise.
34c44600 4456 (set_pixel): Likewise.
4457
1e901a75 4458 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 4459
1e901a75 4460 * term/gfxterm.c: Adapted to new font engine.
34c44600 4461
1e901a75 4462 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 4463
1e901a75 4464 * term/i386/pc/vga.c: Likewise.
34c44600 4465
1e901a75 4466 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 4467
1e901a75 4468 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 4469
1e901a75 4470 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4471
1e901a75 4472 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4473
1e901a75 4474 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 4475
1e901a75 4476 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 4477
1e901a75 4478 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 4479
1e901a75 4480 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 4481
1e901a75 4482 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4483
4484 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 4485
1e901a75 4486 * util/grub-mkconfig_lib.in: Changed font extension.
4487
278922e8 44882008-12-28 Felix Zielcke <fzielcke@z-51.de>
4489
4490 * util/getroot.c (grub_util_get_grub_dev): Add support for
4491 /dev/md/dNNpNN style partitionable mdraid devices.
4492
3ced05cf 44932008-12-12 Alex Smith <alex@alex-smith.me.uk>
4494
4495 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4496 at a time limit of the PXE TFTP API correctly.
4497 (grub_pxefs_close): Likewise.
4498
7fd0ee30 44992008-11-29 Robert Millan <rmh@aybabtu.com>
4500
34c44600 4501 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 4502 grub_ata_device_initialize() calls.
4503
34c44600 45042008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 4505
4506 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4507 iteration failed.
4508 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4509
89313780 45102008-11-28 Robert Millan <rmh@aybabtu.com>
4511
4512 Fix build on powerpc-ieee1275. Based on patch created by
4513 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4514 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4515 `kern/ieee1275/mmap.c'.
4516 * include/grub/powerpc/ieee1275/memory.h: New file.
4517
15257703 4518 Provide grub-install on coreboot.
4519 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4520 (grub_install_SOURCES): New variable.
4521 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4522 usable on coreboot.
4523
9fc5388a 45242008-11-25 Felix Zielcke <fzielcke@z-51.de>
4525
4526 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4527 to `grub_term_input_t'.
4528 (grub_term_get_current_output): Change return type to
4529 `grub_term_output_t'.
4530
bc3a2f31 45312008-11-22 Robert Millan <rmh@aybabtu.com>
4532
34c44600 4533 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 4534 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4535 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4536 grub_vga_text_cls().
4537
80fc88f2 4538 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 4539 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 4540
cbf36fd3 4541 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4542 to 0x200000 (avoids trouble with some OFW implementations, and matches
4543 with the one in Yaboot).
4544 Reported by Manoel Abranches
4545
73e8e268 45462008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 4547
4548 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4549 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4550
73e8e268 4551 * util/grub-mkconfig_lib.in (grub_warn): New function.
4552 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4553 warnings, to obtain consistent formatting.
4554 * util/grub.d/00_header.in: Likewise.
4555 * util/update-grub_lib.in: Likewise.
4556
e94045a1 4557 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 4558 Move comment text to `#error' stanza.
e94045a1 4559
79d29fd7 4560 Harmonize ieee1275's grub_available_iterate() with the generic
4561 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4562 build problem on i386-ieee1275):
4563 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4564 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4565 parameter `type'. Update all users of this function.
4566 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4567 `kern/ieee1275/mmap.c'.
4568 * kern/ieee1275/init.c
4569 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4570 with ...
4571 (grub_machine_mmap_iterate): ... this.
4572 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4573 return type to `grub_err_t'. Update all implementations of this
4574 function prototype.
4575 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4576 Likewise.
4577
60d6b16e 4578 Add `lsmmap' command (lists firmware-provided memory map):
4579 * commands/lsmmap.c: New file.
4580 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4581 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4582 variables.
4583 * conf/powerpc-ieee1275.rmk: Likewise.
4584 * conf/i386-coreboot.rmk: Likewise.
4585 * conf/i386-ieee1275.rmk: Likewise.
4586
ebaaf49b 45872008-11-19 Robert Millan <rmh@aybabtu.com>
4588
4589 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 4590 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4591 constraints to initrd allocation (based on code from
4592 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4593 for Linux to find it.
ebaaf49b 4594
dfab719f 45952008-11-14 Robert Millan <rmh@aybabtu.com>
4596
4597 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4598 order to cope with duplicate slashes.
4599
10fc3eb9 46002008-11-14 Robert Millan <rmh@aybabtu.com>
4601
4602 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4603 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4604 don't want to mess with lower memory, because it is used in the Linux
4605 loader.
4606
4607 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 4608 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 4609 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4610 is in our heap (probably as a result of it being corrupted during
2f2a3442 4611 decompression). Add #error instance with comment to explain why this
4612 loader isn't currently usable on PC/BIOS.
10fc3eb9 4613
e2e07847 46142008-11-14 Robert Millan <rmh@aybabtu.com>
4615
4616 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 4617 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 4618
fe8e8d69 46192008-11-12 Robert Millan <rmh@aybabtu.com>
4620
4621 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4622
4623 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4624 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4625 from here ...
4626 * include/grub/i386/pc/memory.h: ... to here.
4627
976b07d0 46282008-11-12 Robert Millan <rmh@aybabtu.com>
4629
4630 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4631 split).
4632
4633 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4634 (grub_console_cur_color, grub_console_real_putchar)
4635 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4636 (grub_console_setcolorstate, grub_console_setcolor)
4637 (grub_console_getcolor): Move from here ...
4638 * include/grub/i386/vga_common.h: ... to here (new file).
4639
4640 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4641 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4642 `<grub/i386/io.h>'.
4643 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4644 `<grub/i386/vga_common.h>'.
4645
76679cd3 46462008-11-12 Robert Millan <rmh@aybabtu.com>
4647
4648 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4649 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4650 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4651 variables.
4652 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4653 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4654
4655 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4656 grub_console_init() with call to grub_vga_text_init().
4657 (grub_machine_fini): Replace call to
4658 grub_console_fini() with call to grub_vga_text_fini() and
4659 grub_at_keyboard_fini().
4660
4661 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4662 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4663 (grub_console_setcolorstate, grub_console_setcolor)
4664 (grub_console_getcolor): New function prototypes.
4665
4666 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4667 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4668 (grub_vga_text_setcursor): Static-ize.
4669 (grub_vga_text_term): New structure.
4670 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4671
4672 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4673 (grub_console_cur_color, grub_console_standard_color)
4674 (grub_console_normal_color, grub_console_highlight_color)
4675 (map_char, grub_console_putchar, grub_console_getcharwidth)
4676 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4677 (grub_console_getcolor): Move from here ...
4678 * term/i386/vga_common.c: ... to here (same function names).
4679
95b841d3 46802008-11-12 Robert Millan <rmh@aybabtu.com>
4681
4682 Use newly-added Multiboot support in coreboot.
4683
4684 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4685 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4686
4687 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4688 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4689 (codestart): Store the MBI in `startup_multiboot_info' when we're
4690 being loaded using Multiboot.
4691
4692 * kern/i386/coreboot/init.c (grub_machine_init): Move
4693 grub_at_keyboard_init() call to beginning of function (useful for
4694 debugging). Call grub_machine_mmap_init() before attempting to use
4695 grub_machine_mmap_iterate().
4696 (grub_lower_mem, grub_upper_mem): Move from here ...
4697 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4698 here (new file).
4699
4700 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4701 function prototype.
4702
761ca975 47032008-11-12 Robert Millan <rmh@aybabtu.com>
4704
4705 Fix a regression introduced by the at_keyboard.mod split. Because
4706 some terminals are default on some platforms and non-default on
4707 others, the first terminal being registered determines which is
4708 going to be default.
4709
4710 * kern/term.c (grub_term_register_input): If this is the first
4711 terminal being registered, set it as the current one.
4712 (grub_term_register_output): Likewise.
4713
4714 * term/efi/console.c (grub_console_init): Do not call
4715 grub_term_set_current_output() or grub_term_set_current_input().
4716 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4717 * term/i386/pc/console.c (grub_console_init): Likewise.
4718 (grub_console_fini): Do not call grub_term_set_current_input()
4719 (but leave grub_term_set_current_output() to restore text mode).
4720
6c529df7 47212008-11-10 Robert Millan <rmh@aybabtu.com>
4722
4723 * util/grub.d/00_header.in: Add backward compatibility check for
4724 versions of terminal.mod that don't understand `terminal_input' or
4725 `terminal_output'.
4726
132e4113 47272008-11-09 Robert Millan <rmh@aybabtu.com>
4728
4729 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4730 `terminal_input' / `terminal_output', not `terminal'.
4731
ac293d50 47322008-11-08 Robert Millan <rmh@aybabtu.com>
4733
4734 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 4735 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 4736
0025933a 47372008-11-08 Robert Millan <rmh@aybabtu.com>
4738
4739 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 4740 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 4741 members. Update all users.
4742 * util/console.c (grub_ncurses_term): Split in ...
4743 (grub_ncurses_term_input): ... this, and ...
4744 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 4745 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 4746
37c86336 47472008-11-08 Robert Millan <rmh@aybabtu.com>
4748
4749 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4750 (PKGDATA): Add $(pkgdata_SRCDIR).
4751 (pkglib_BUILDDIR): New variable.
4752 (pkgdata_SRCDIR): New variable.
4753 (build_env.mk): New target.
4754 (include_DATA): New variable.
4755 (install-local): Install $(include_DATA) files in $(includedir).
4756
b6c15a2d 47572008-11-07 Pavel Roskin <proski@gnu.org>
4758
d99d46f1 4759 * gendistlist.sh: Use C locale for sorting to ensure consistent
4760 output on all systems.
4761
b6c15a2d 4762 * util/grub.d/00_header.in: Remove incorrect space before
4763 "serial".
4764
c32ee8c9 47652008-11-07 Robert Millan <rmh@aybabtu.com>
4766
4767 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4768 per specification.
4769 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4770 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4771 (based on find_multi_boot1_header).
4772 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4773 using find_multi_boot2_header(), and abort if neither Multiboot or
4774 Multiboot headers were found.
4775
651c29b7 47762008-11-07 Robert Millan <rmh@aybabtu.com>
4777
4778 Modularize at_keyboard.mod:
4779
4780 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4781 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4782 (at_keyboard_mod_LDFLAGS): New variables.
4783
4784 Actual terminal split:
4785
4786 * include/grub/term.h (struct grub_term): Split in ...
4787 (struct grub_term_input): ... this, and ...
4788 (struct grub_term_output): ... this. Update all users.
4789 (grub_term_set_current): Split in ...
4790 (grub_term_set_current_input): ... this, and ...
4791 (grub_term_set_current_output): ... this.
4792 (grub_term_get_current): Split in ...
4793 (grub_term_get_current_input): ... this, and ...
4794 (grub_term_get_current_output): ... this.
4795 (grub_term_register): Split in ...
4796 (grub_term_register_input): ... this, and ...
4797 (grub_term_register_output): ... this.
4798 (grub_term_unregister): Split in ...
4799 (grub_term_unregister_input): ... this, and ...
4800 (grub_term_unregister_output): ... this.
4801 (grub_term_iterate): Split in ...
4802 (grub_term_iterate_input): ... this, and ...
4803 (grub_term_iterate_output): ... this.
4804
4805 * kern/term.c (grub_term_list): Split in ...
4806 (grub_term_list_input): ... this, and ...
4807 (grub_term_list_output): ... this. Update all users.
4808 (grub_cur_term): Split in ...
4809 (grub_cur_term_input): ... this, and ...
4810 (grub_cur_term_output): ... this. Update all users.
4811 (grub_term_set_current): Split in ...
4812 (grub_term_set_current_input): ... this, and ...
4813 (grub_term_set_current_output): ... this.
4814 (grub_term_get_current): Split in ...
4815 (grub_term_get_current_input): ... this, and ...
4816 (grub_term_get_current_output): ... this.
4817 (grub_term_register): Split in ...
4818 (grub_term_register_input): ... this, and ...
4819 (grub_term_register_output): ... this.
4820 (grub_term_unregister): Split in ...
4821 (grub_term_unregister_input): ... this, and ...
4822 (grub_term_unregister_output): ... this.
4823 (grub_term_iterate): Split in ...
4824 (grub_term_iterate_input): ... this, and ...
4825 (grub_term_iterate_output): ... this.
4826
4827 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4828 a check for input and one for output (and only attempt to get keys
4829 from user when input works).
4830
4831 * util/grub-probe.c (grub_term_get_current): Split in ...
4832 (grub_term_get_current_input): ... this, and ...
4833 (grub_term_get_current_output): ... this.
4834 * util/grub-fstest.c: Likewise.
4835 * util/i386/pc/grub-setup.c: Likewise.
4836 * util/grub-editenv.c: Likewise.
4837
4838 Portability adjustments:
4839
4840 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4841 `term/i386/pc/at_keyboard.c'.
4842 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4843 grub_keyboard_controller_init() (now handled by terminal .init).
4844 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4845 grub_at_keyboard_init().
4846 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4847 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4848 at_keyboard.mod via input terminal interface).
4849 * include/grub/i386/coreboot/console.h: Convert into a stub for
4850 `<grub/i386/pc/console.h>'.
4851
4852 Migrate full terminals to new API:
4853
4854 * term/efi/console.c (grub_console_term): Split into ...
4855 (grub_console_term_input): ... this, and ...
4856 (grub_console_term_output): ... this. Update all users.
4857 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4858 (grub_ofconsole_init): Split into ...
4859 (grub_ofconsole_init_input): ... this, and ...
4860 (grub_ofconsole_init_output): ... this.
4861 (grub_ofconsole_term): Split into ...
4862 (grub_ofconsole_term_input): ... this, and ...
4863 (grub_ofconsole_term_output): ... this. Update all users.
4864 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4865 (grub_serial_term_input): ... this, and ...
4866 (grub_serial_term_output): ... this. Update all users.
4867 * term/i386/pc/console.c (grub_console_term): Split into ...
4868 (grub_console_term_input): ... this, and ...
4869 (grub_console_term_output): ... this. Update all users.
4870 (grub_console_term_input): Only enable it on PC/BIOS platform.
4871 (grub_console_init): Remove grub_keyboard_controller_init() call.
4872
4873 Migrate input terminals to new API:
4874
4875 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4876 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4877 i386-specific anyway).
4878 (grub_console_checkkey): Rename to ...
4879 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4880 users.
4881 (grub_keyboard_controller_orig): New variable.
4882 (grub_console_getkey): Rename to ...
4883 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4884 users.
4885 (grub_keyboard_controller_init): Static-ize. Save original
4886 controller value so that it can be restored ...
4887 (grub_keyboard_controller_fini): ... here (new function).
4888 (grub_at_keyboard_term): New structure.
4889 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4890 functions.
4891
4892 Migrate output terminals to new API:
4893
4894 * term/i386/pc/vga.c (grub_vga_term): Change type to
4895 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4896 members. Update all users.
4897 * term/gfxterm.c (grub_video_term): Change type to
4898 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4899 members. Update all users.
4900 * include/grub/i386/pc/console.h (grub_console_checkkey)
4901 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4902 etc).
4903
4904 Migrate `terminal' command and userland tools to new API:
4905
4906 * commands/terminal.c (grub_cmd_terminal): Split into ...
4907 (grub_cmd_terminal_input): ... this, and ...
4908 (grub_cmd_terminal_output): ... this.
4909 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4910 `terminal_input' and `terminal_output'.
4911 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4912 `terminal_input' / `terminal_output' API.
4913 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4914 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4915 provided ${GRUB_TERMINAL}, convert it).
4916
96e5d876 49172008-11-04 Robert Millan <rmh@aybabtu.com>
4918
4919 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4920 for FreeBSD.
4921 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4922
556f3775 49232008-11-03 Bean <bean123ch@gmail.com>
4924
4925 * kern/elf.c (grub_elf32_load): Revert to previous code.
4926 (grub_elf64_load): Likewise.
4927
4928 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4929
926b9823 49302008-11-01 Robert Millan <rmh@aybabtu.com>
4931
4932 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4933 (TARGET_CPPFLAGS): Likewise.
4934 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4935
1432e958 49362008-11-01 Carles Pina i Estany <carles@pina.cat>
4937
4938 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4939
dba3f844 49402008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4941
4942 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4943 addition of objects until the code is not going to be able to fail.
4944
dba3f844 49452008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4946
4947 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4948 (add a missing NULL check, and correct them by moving the pointer
4949 operations after the actual check).
4950
7ab28c21 49512008-10-29 Robert Millan <rmh@aybabtu.com>
4952
4953 * util/i386/pc/grub-install.in: Handle empty string as output from
4954 make_system_path_relative_to_its_root().
4955
1b7748eb 49562008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4957
4958 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4959 circular metadata worst case scenario. If the metadata is circular
4960 then copy the wrap in place.
4961 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4962 project lib/format_text/layout.h
4963 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4964
c9618ab2 49652008-10-03 Felix Zielcke <fzielcke@z-51.de>
4966
7a36edca 4967 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4968
bf981c62 49692008-10-03 Felix Zielcke <fzielcke@z-51.de>
4970
4971 * util/update-grub_lib.in: Mention filename in warning message.
4972
6d994591 49732008-09-29 Felix Zielcke <fzielcke@z-51.de>
4974
4975 * NEWS: Update for rename of update-grub to grub-mkconfig.
4976
18ade780 49772008-09-29 Felix Zielcke <fzielcke@z-51.de>
4978
4979 * util/update-grub_lib.in: Copy to ...
4980 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4981 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4982 * util/update-grub.in: Rename to ...
4983 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4984 option. Add `--output' option to allow users to specify the generated
4985 configuration file. Default to stdout.
4986 (update_grub_dir): Rename to ...
4987 (grub_mkconfig_dir): ... this.
4988 (grub_cfg): Default to an empty string.
4989 * conf/common.rmk (update-grub): Rename to ...
4990 (grub-mkconfig): ... this.
4991 (update-grub_lib): Copy to ...
4992 (grub-mkconfig_lib): ... this.
4993 (update-grub_SCRIPTS): Copy to ...
4994 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4995 (update-grub_DATA): Rename to ...
4996 (grub-mkconfig_DATA): ... this.
4997
556ce6ac 49982008-09-28 Robert Millan <rmh@aybabtu.com>
4999
5000 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5001 to `modified'. Add the real `created' field.
5002 (grub_iso9660_uuid): Use `modified' rather than `created' for
5003 constructing the UUID.
5004
50052008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 5006
5007 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5008 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5009
92274e85 50102008-09-28 Bean <bean123ch@gmail.com>
5011
5012 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5013 Thanks to Christian Franke for finding this bug.
5014
add6f17a 50152008-09-25 Robert Millan <rmh@aybabtu.com>
5016
5017 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5018 instances of grub_util_get_disk_name() (see previous commit).
5019
d2a367b8 50202008-09-25 Robert Millan <rmh@aybabtu.com>
5021
5022 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5023 `util/i386/get_disk_name.c'.
5024 * conf/i386-efi.rmk: Likewise.
5025 * conf/x86_64-efi.rmk: Likewise.
5026 * conf/i386-coreboot.rmk: Likewise.
5027 * conf/i386-ieee1275.rmk: Likewise.
5028 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5029 `util/ieee1275/get_disk_name.c'.
5030 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5031 * util/ieee1275/get_disk_name.c: Remove file.
5032 * util/i386/get_disk_name.c: Remove file.
5033 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5034 "hd%d" for device.map entries, rather than using
5035 grub_util_get_disk_name().
5036
81a06771 50372008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 5038
5039 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5040 warning.
5041 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5042
5a004279 50432008-09-24 Carles Pina i Estany <carles@pina.cat>
5044
5045 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5046 Changed to 0x5100.
5047 (GRUB_TERM_PPAGE): Changed to 0x4900.
5048
397093d3 50492008-09-24 Robert Millan <rmh@aybabtu.com>
5050
5051 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5052 macros (they were i386-pc specific).
5053 * include/grub/sparc64/ieee1275/console.h: Likewise.
5054 * include/grub/efi/console.h: Likewise.
5055
a91b6c7c 50562008-09-22 Bean <bean123ch@gmail.com>
5057
5058 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5059 resident and in attribute list.
5060
5061 * include/grub/ntfs.h (BMP_LEN): Removed.
5062
c40fd116 50632008-09-22 Bean <bean123ch@gmail.com>
5064
81a06771 5065 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 5066 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5067
5068 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5069 error occurs, as grub_disk_open will call grub_disk_close, which will
5070 call p->close (scsi).
5071
81a06771 50722008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 5073
5074 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5075 (AC_PREREQ): Bumped to 2.59.
5076 (AC_TRY_COMPILE): Replace obsolete macro with ...
5077 (AC_COMPILE_IFELSE): ... this.
5078 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5079 (AC_LINK_IFELSE): ... this.
5080
5dc43410 50812008-09-21 Felix Zielcke <fzielcke@z-51.de>
5082
5083 * autogen.sh: Add a call to `gendistlist.sh'.
5084
9035dce4 50852008-09-19 Christian Franke <franke@computer.org>
5086
5087 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5088 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5089 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5090 Export __enable_execute_stack() to modules.
5091 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5092 New function.
5093
7fd75377 50942008-09-09 Felix Zielcke <fzielcke@z-51.de>
5095
040030b3 5096 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5097 Sort the list.
5098
50992008-09-09 Felix Zielcke <fzielcke@z-51.de>
5100
5101 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 5102 #include <grub/util/hostdisk.h>.
5103
89d5ffcf 51042008-09-08 Robert Millan <rmh@aybabtu.com>
5105
5106 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5107 segments when their filesz is zero (grub_file_read() interprets
81a06771 5108 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 5109 Use `lowest_segment' rather than 0 for calculating the current
5110 segment load address.
5111
40da438f 51122008-09-08 Robert Millan <rmh@aybabtu.com>
5113
5114 * util/hostdisk.c (open_device): Replace a grub_util_info() call
5115 with grub_dprintf("hostdisk", ...), as it was so verbose that it
5116 clobbered useful information.
5117
ddbf5556 51182008-09-08 Robert Millan <rmh@aybabtu.com>
5119
5120 * include/grub/util/biosdisk.h: Move to ...
5121 * include/grub/util/hostdisk.h: ... here. Update all users.
5122 * util/biosdisk.c: Move to ...
5123 * util/hostdisk.c: ... here. Update all users.
5124
783d0f48 51252008-09-07 Robert Millan <rmh@aybabtu.com>
5126
5127 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5128 variables.
5129 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5130 and length can be stored directly in the `mbi->mmap_addr' and
5131 `mbi->mmap_length' struct fields.
5132
548e2ea5 51332008-09-07 Robert Millan <rmh@aybabtu.com>
5134
5135 * conf/i386.rmk: New file. Provides declaration for building
5136 `cpuid.mod'.
5137 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5138 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5139 variables.
5140 Include `conf/i386.mk'.
5141 * conf/i386-efi.rmk: Likewise.
5142 * conf/x86_64-efi.rmk: Likewise.
5143 * conf/i386-coreboot.rmk: Likewise.
5144 * conf/i386-ieee1275.rmk: Likewise.
5145
0ea85a37 51462008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5147
5148 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5149 Adds optimization support for BGR based modes.
5150
5151 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5152 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5153 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5154 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5155 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5156 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5157 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5158 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5159 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5160 (grub_video_i386_vbeblit_index_index): Likewise.
5161 (grub_video_i386_vbeblit_replace_directN): Added.
5162 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5163 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5164 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5165 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5166 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5167 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 5168 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 5169 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5170 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5171 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5172 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5173 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5174 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5175
5176 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5177 (grub_video_i386_vbefill_R8G8B8): Likewise.
5178 (grub_video_i386_vbefill_index): Likewise.
5179 (grub_video_i386_vbefill_direct32): Added.
5180 (grub_video_i386_vbefill_direct24): Likewise.
5181 (grub_video_i386_vbefill_direct16): Likewise.
5182 (grub_video_i386_vbefill_direct8): Likewise.
5183
81a06771 5184 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 5185 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5186 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5187 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5188 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5189 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 5190
0ea85a37 5191 * video/video.c (grub_video_get_blit_format): Updated to use new
5192 blit formats. Added handling for 16 bit color modes.
81a06771 5193
5194 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 5195 fillers.
5196 (common_blitter): Updated to use new blitters.
5197
5198 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5199 Removed.
5200 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5201 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5202 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5203 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5204 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5205 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5206 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5207 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5208 (grub_video_i386_vbeblit_index_index): Likewise.
5209 (grub_video_i386_vbeblit_replace_directN): Added.
5210 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5211 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5212 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5213 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5214 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5215 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5216 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5217 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5218 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5219 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5220 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5221 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5222 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 5223
0ea85a37 5224 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5225 (grub_video_i386_vbefill_R8G8B8): Likewise.
5226 (grub_video_i386_vbefill_index): Likewise.
5227 (grub_video_i386_vbefill_direct32): Added.
5228 (grub_video_i386_vbefill_direct24): Likewise.
5229 (grub_video_i386_vbefill_direct16): Likewise.
5230 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 5231
0ea85a37 5232 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5233 types.
81a06771 5234
0ea85a37 5235 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5236 types.
81a06771 5237
0ea85a37 5238 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5239 blitter types.
81a06771 5240
0ea85a37 5241 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5242 types.
5243
e8a83df6 52442008-09-06 Felix Zielcke <fzielcke@z-51.de>
5245
5246 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5247 RAID level 1.
5248
6bcd8ee5 52492008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 5250
6bcd8ee5 5251 * fs/iso9660.c (grub_iso9660_date): New structure.
5252 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5253 (grub_iso9660_uuid): New function.
c375ae58 5254
59261157 52552008-09-05 Bean <bean123ch@gmail.com>
5256
5257 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5258
5259 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5260 insensitive bit for names in Win32 and Win32 & DOS namespace.
5261
5262 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5263
5264 * include/grub/types.h (LONG_MAX): Likewise.
5265
58b6645a 52662008-09-04 Felix Zielcke <fzielcke@z-51.de>
5267
4ee55921 5268 * util/getroot.c: Include <config.h>.
5269 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5270 add support for /dev/md/N devices and handle LVM double dash escaping.
5271
52722008-09-04 Felix Zielcke <fzielcke@z-51.de>
5273
5274 * config.guess: Update to latest version from config git.
5275 * config.sub: Likewise.
58b6645a 5276
9124f65d 52772008-09-03 Robert Millan <rmh@aybabtu.com>
5278
5279 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5280 `disk->total_sectors'.
5281
81a06771 52822008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 5283
5284 * include/grub/normal.h: Fixed incorrect comment for
5285 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5286
81a06771 52872008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 5288
5289 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5290 values with defines.
5291
5292 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5293 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5294 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5295 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5296 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5297 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5298 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5299 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5300 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5301 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5302 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5303 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5304 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5305 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5306 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5307 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5308 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5309 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5310 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5311
93d5cbf8 53122008-08-31 Robert Millan <rmh@aybabtu.com>
5313
5314 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5315 declaration.
5316 (grub_multiboot): Fix a few warnings.
5317
21751d50 53182008-08-31 Robert Millan <rmh@aybabtu.com>
5319
5320 * loader/i386/pc/multiboot.c: Update comment not to say that
5321 boot_device support is unimplemented.
5322
e27a75c5 53232008-08-31 Robert Millan <rmh@aybabtu.com>
5324
5325 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5326 or memory map support are unimplemented.
5327
81a06771 53282008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 5329
5330 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5331
81a06771 53322008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 5333
5334 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5335 total video memory in 'vbeinfo' output; show color format details for
5336 each video mode.
5337
7c5d8d95 53382008-08-30 Pavel Roskin <proski@gnu.org>
5339
5340 * util/genmoddep.c: Remove for real this time.
5341 * DISTLIST: Remove util/genmoddep.c.
5342
4cebd25a 53432008-08-30 Robert Millan <rmh@aybabtu.com>
5344
5345 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5346 as required by Multiboot spec (it was already 4-byte aligned, but
5347 only by chance).
5348
b497a269 53492008-08-29 Pavel Roskin <proski@gnu.org>
5350
e3925185 5351 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5352 * kern/powerpc/ieee1275/startup.S: ... this.
5353 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5354 * DISTLIST: Likewise.
5355
b497a269 5356 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5357 grub/cpu/kernel.h. Add start label for consistency with other
5358 platforms. Add grub_prefix immediately after start. Add jump
5359 to the code after grub_prefix.
5360 * include/grub/powerpc/kernel.h: Provide valid values for
5361 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5362
6e5a42fe 53632008-08-29 Bean <bean123ch@gmail.com>
5364
5365 * configure.ac: Change host_os to cygwin for mingw.
5366 (asprintf): New check for function.
5367
5368 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5369 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5370
5371 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 5372 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 5373 sync, sleep and grub_util_get_disk_size for mingw.
5374
5375 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5376 to get size in mingw.
5377 (open_device): Use flag O_BINARY if it's defined.
5378 (find_root_device): Add dummy code for mingw.
5379
5380 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5381 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5382 (get_scsi_disk_name): Return 0 for mingw.
5383
5384 * util/hostfs.c: #include <grub/util/misc.h>.
5385 (grub_hostfs_open): Use "rb" flag to open file, use
5386 grub_util_get_disk_size to get disk size for mingw.
5387
5388 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5389 (asprintf): New function if HAVE_ASPRINTF is not set.
5390 (sync): New function for mingw.
5391 (sleep): Likewise.
5392 (grub_util_get_disk_size): Likewise.
5393
ab3f2673 53942008-08-28 Pavel Roskin <proski@gnu.org>
5395
5396 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5397 kern/time.c.
5398
1c282483 53992008-08-28 Robert Millan <rmh@aybabtu.com>
5400
5401 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5402
678e849c 54032008-08-28 Robert Millan <rmh@aybabtu.com>
5404
5405 Change find_grub_drive() syntax so it doesn't prevent it from
5406 detecting NULL names as errors.
5407
5408 * util/biosdisk.c (find_grub_drive): Move free slot search code
5409 from here ...
5410 (find_free_slot): ... to here.
5411 (read_device_map): Use find_free_slot() to search for free slots.
5412
965c75ca 54132008-08-27 Marco Gerards <marco@gnu.org>
5414
5415 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5416 (scsi_mod_SOURCES): New variable.
5417 (scsi_mod_CFLAGS): Likewise
5418 (scsi_mod_LDFLAGS): Likewise.
5419
5420 * disk/scsi.c: New file.
5421
5422 * include/grub/scsi.h: Likewise.
5423
5424 * include/grub/scsicmd.h: Likewise.
5425
5426 * disk/ata.c: Include <grub/scsi.h>.
5427 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5428 instead.
5429 (grub_ata_iterate): Skip ATAPI devices.
5430 (grub_ata_open): Only handle ATAPI devices.
5431 (struct grub_atapi_read): Removed.
5432 (grub_atapi_readsector): Likewise.
5433 (grub_ata_read): No longer handle ATAPI devices.
5434 (grub_ata_write): Likewise.
5435 (grub_atapi_iterate): New function.
5436 (grub_atapi_read): Likewise.
5437 (grub_atapi_write): Likewise.
5438 (grub_atapi_open): Likewise.
5439 (grub_atapi_close): Likewise.
5440 (grub_atapi_dev): New variable.
5441 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5442 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5443
5444 * include/grub/disk.h (enum grub_disk_dev_id): Add
5445 `GRUB_DISK_DEVICE_SCSI_ID'.
5446
c07ae501 54472008-08-26 Robert Millan <rmh@aybabtu.com>
5448
5449 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5450 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5451 descriptive.
5452
5ed20adc 54532008-08-23 Bean <bean123ch@gmail.com>
5454
5455 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5456 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5457 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5458 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5459 dm_nv.mod.
5460 (raid5rec_mod_SOURCES): New macro.
5461 (raid5rec_mod_CFLAGS): Likewise.
5462 (raid5rec_mod_LDFLAGS): Likewise.
5463 (raid6rec_mod_SOURCES): Likewise.
5464 (raid6rec_mod_CFLAGS): Likewise.
5465 (raid6rec_mod_LDFLAGS): Likewise.
5466 (mdraid_mod_SOURCES): Likewise.
5467 (mdraid_mod_CFLAGS): Likewise.
5468 (mdraid_mod_LDFLAGS): Likewise.
5469 (dm_nv_mod_SOURCES): Likewise.
5470 (dm_nv_mod_CFLAGS): Likewise.
5471 (dm_nv_mod_LDFLAGS): Likewise.
5472
5473 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5474 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5475 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5476
5477 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5478 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5479
5480 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5481
5482 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5483
5484 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5485
5486 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5487
5488 * disk/raid5_recover.c: New file.
5489
5490 * disk/raid6_recover.c: Likewise.
5491
5492 * disk/mdraid_linux.c: Likewise.
5493
5494 * disk/dmraid_nvidia.c: Likewise.
5495
5496 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5497 ULONG_MAX.
5498
5499 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5500 calculate the size of raid device.
5501 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5502 different layout of raid5.
5503 (grub_raid_scan_device): Remove code specific to mdraid.
5504 (grub_raid_list): New variable.
5505 (free_array): New function.
5506 (grub_raid_register): Likewise.
5507 (grub_raid_unregister): Likewise.
5508 (grub_raid_rescan): Likewise.
5509 (GRUB_MOD_INIT): Don't iterate device here.
5510 (GRUB_MOD_FINI): Use free_array to release resource.
5511
5512 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5513 (grub_raid5_recover_func_t): New function variable type.
5514 (grub_raid6_recover_func_t): Likewise.
5515 (grub_raid5_recover_func): New variable.
5516 (grub_raid6_recover_func): Likewise.
5517 (grub_raid_register): New function.
5518 (grub_raid_unregister): Likewise.
5519 (grub_raid_rescan): Likewise.
5520 (grub_raid_block_xor): Likewise.
5521
5522 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5523 (CMD_CRC): New macro.
5524 (part): Removed.
5525 (read_file): Handle device as well as file.
5526 (cmd_crc): New function.
5527 (fstest): Handle multiple disks.
5528 (options): Remove part, raw and long, add root and diskcount.
5529 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 5530 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 5531 add handling for the new options, support multiple disks.
5532
5533 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5534
29c18915 55352008-08-23 Bean <bean123ch@gmail.com>
5536
5537 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5538
5539 * genfslist.sh: Ignore kernel.mod.
5540
5541 * genpartmaplist.sh: Likewise.
5542
8415f261 55432008-08-23 Robert Millan <rmh@aybabtu.com>
5544
5545 * util/getroot.c (find_root_device): Skip anything that starts with
5546 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5547
d5a7dc5b 55482008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 5549
d5a7dc5b 5550 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5551 * util/grub.d/00_header.in: Allow the administrator to change default
5552 gfxmode via ${GRUB_GFXMODE}.
5553
380cfbb4 55542008-08-21 Felix Zielcke <fzielcke@z-51.de>
5555
5556 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5557
c9baafe7 55582008-08-21 Robert Millan <rmh@aybabtu.com>
5559
5560 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5561 loader.
5562 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5563 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5564
e290bef2 55652008-08-20 Carles Pina i Estany <carles@pina.cat>
5566
5567 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5568 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5569
f9dbfc96 55702008-08-19 Robert Millan <rmh@aybabtu.com>
5571
5572 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5573 (struct grub_virtual_screen): Remove `cursor_color'.
5574 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5575 initialization.
5576 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5577
dd6bd6ab 55782008-08-18 Robert Millan <rmh@aybabtu.com>
5579
5580 Unify (identical) linux_normal.c files.
5581 * loader/i386/efi/linux_normal.c: Move from here ...
5582 * loader/linux_normal.c: ... to here. Update all users.
5583 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5584 * loader/i386/ieee1275/linux_normal.c: Likewise.
5585
7f42f83e 55862008-08-18 Robert Millan <rmh@aybabtu.com>
5587
5588 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5589 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5590 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5591 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5592 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5593 New macros.
5594 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5595 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5596 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5597 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5598 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5599 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5600 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5601 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5602 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5603 portably using grub_getxy().
5604 Replace `-EFI' with `-bzImage' in boot message.
5605
38487ddb 56062008-08-17 Robert Millan <rmh@aybabtu.com>
5607
5608 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5609
deceb3ec 56102008-08-17 Robert Millan <rmh@aybabtu.com>
5611
5612 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5613
5614 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5615 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5616 (grub_machine_mmap_iterate): New function declaration.
5617 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5618 structure.
5619 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5620 macros.
5621
5622 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5623 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5624 Move e820 parsing from here ...
5625 * kern/i386/pc/mmap.c: New file.
5626 (grub_machine_mmap_iterate): ... to here.
5627
5628 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5629 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5630 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5631 (grub_available_iterate): Redeclare to return `void', and redeclare
5632 its hook to use grub_uint64_t as addr and size parameters, and rename
5633 to ...
5634 (grub_machine_mmap_iterate): ... this. Update all users.
5635
5636 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5637 to make it more readable. Rename to ...
5638 (grub_machine_mmap_iterate): ... this.
5639
5640 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5641 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5642 (grub_multiboot): Allocate an extra region after the payload, and fill
5643 it with a Multiboot memory map. Adjust a.out loader to calculate size
5644 with the extra space.
5645 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5646 with the extra space.
5647
f8aa0f43 56482008-08-17 Carles Pina i Estany <carles@pina.cat>
5649
9807deb9 5650 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 5651
605f5bb6 56522008-08-17 Felix Zielcke <fzielcke@z-51.de>
5653
5654 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5655 mdate-sh to the list `find' searches for.
5656 * DISTLIST: Regenerated.
5657
210db6c6 56582008-08-16 Felix Zielcke <fzielcke@z-51.de>
5659
5660 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5661 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 5662 genmoddep.awk, gensymlist.sh.in.
5663 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 5664 * DISTLIST: Regenerated.
48cdbfd4 5665 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 5666
1082b929 56672008-08-16 Robert Millan <rmh@aybabtu.com>
5668
5669 * disk/raid.c (grub_raid_init): Handle/report errors set by
5670 grub_device_iterate().
5671 * disk/lvm.c (grub_lvm_init): Likewise.
5672
42ce5170 56732008-08-15 Bean <bean123ch@gmail.com>
5674
5675 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5676 and datehook.mod.
5677 (datetime_mod_SOURCES): New macro.
5678 (datetime_mod_CFLAGS): Likewise.
5679 (datetime_mod_LDFLAGS): Likewise.
5680 (date_mod_SOURCES): Likewise.
5681 (date_mod_CFLAGS): Likewise.
5682 (date_mod_LDFLAGS): Likewise.
5683 (datehook_mod_SOURCES): Likewise.
5684 (datehook_mod_CFLAGS): Likewise.
5685 (datehook_mod_LDFLAGS): Likewise.
5686
5687 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5688 and datehook.mod.
5689 (datetime_mod_SOURCES): New macro.
5690 (datetime_mod_CFLAGS): Likewise.
5691 (datetime_mod_LDFLAGS): Likewise.
5692 (date_mod_SOURCES): Likewise.
5693 (date_mod_CFLAGS): Likewise.
5694 (date_mod_LDFLAGS): Likewise.
5695 (datehook_mod_SOURCES): Likewise.
5696 (datehook_mod_CFLAGS): Likewise.
5697 (datehook_mod_LDFLAGS): Likewise.
5698
5699 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5700 and datehook.mod.
5701 (datetime_mod_SOURCES): New macro.
5702 (datetime_mod_CFLAGS): Likewise.
5703 (datetime_mod_LDFLAGS): Likewise.
5704 (date_mod_SOURCES): Likewise.
5705 (date_mod_CFLAGS): Likewise.
5706 (date_mod_LDFLAGS): Likewise.
5707 (datehook_mod_SOURCES): Likewise.
5708 (datehook_mod_CFLAGS): Likewise.
5709 (datehook_mod_LDFLAGS): Likewise.
5710
5711 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5712 and datehook.mod.
5713 (datetime_mod_SOURCES): New macro.
5714 (datetime_mod_CFLAGS): Likewise.
5715 (datetime_mod_LDFLAGS): Likewise.
5716 (date_mod_SOURCES): Likewise.
5717 (date_mod_CFLAGS): Likewise.
5718 (date_mod_LDFLAGS): Likewise.
5719 (datehook_mod_SOURCES): Likewise.
5720 (datehook_mod_CFLAGS): Likewise.
5721 (datehook_mod_LDFLAGS): Likewise.
5722
5723 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5724 and datehook.mod.
5725 (datetime_mod_SOURCES): New macro.
5726 (datetime_mod_CFLAGS): Likewise.
5727 (datetime_mod_LDFLAGS): Likewise.
5728 (date_mod_SOURCES): Likewise.
5729 (date_mod_CFLAGS): Likewise.
5730 (date_mod_LDFLAGS): Likewise.
5731 (datehook_mod_SOURCES): Likewise.
5732 (datehook_mod_CFLAGS): Likewise.
5733 (datehook_mod_LDFLAGS): Likewise.
5734
5735 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5736
5737 * commands/date.c: New file.
5738
5739 * hook/datehook.c: Likewise.
5740
5741 * include/grub/lib/datetime.h: Likewise.
5742
5743 * include/grub/i386/cmos.h: Likewise.
5744
5745 * lib/datetime.c: Likewise.
5746
5747 * lib/i386/datetime.c: Likewise.
5748
5749 * lib/efi/datetime.c: Likewise.
5750
0e9242da 57512008-08-14 Robert Millan <rmh@aybabtu.com>
5752
5753 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5754 (grub_mkelfimage_SOURCES): New variable.
5755 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5756
5757 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5758 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5759 * conf/powerpc-ieee1275.rmk: Likewise.
5760 * conf/i386-ieee1275.rmk: Likewise.
5761
5762 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5763 * kern/i386/coreboot/init.c: Likewise.
5764
5765 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5766 with `<grub/cpu/kernel.h>'.
5767 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5768 to ...
5769 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5770 * kern/i386/coreboot/startup.S: Likewise.
5771
5772 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5773 (GRUB_MOD_GAP): Remove.
5774 * include/grub/powerpc/kernel.h: New file.
5775 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5776 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5777 * include/grub/i386/kernel.h: New file.
5778 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5779 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5780 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5781
5782 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5783 `grub-mkelfimage'.
5784 Use --directory when invoking grub_mkimage.
5785
5786 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5787 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5788 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5789 and GRUB_KERNEL_CPU_PREFIX.
5790
b86408f8 57912008-08-14 Felix Zielcke <fzielcke@z-51.de>
5792
d5e619ca 5793 * include/grub/err.h (grub_err_printf): New function prototype.
5794 * util/misc.c (grub_err_printf): New function.
5795 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5796 grub_printf.
5797 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5798
7161f0e0 57992008-08-13 Robert Millan <rmh@aybabtu.com>
5800
5801 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5802
a1967522 58032008-08-13 Robert Millan <rmh@aybabtu.com>
5804
5805 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5806 boot entry.
5807
371458b5 58082008-08-12 Robert Millan <rmh@aybabtu.com>
5809
5810 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5811 of the relocation code from here ...
5812 (grub_multiboot): ... to here.
5813 (forward_relocator, backward_relocator): Move from here ...
5814 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5815 (grub_multiboot_backward_relocator): ... to here.
5816 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5817 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5818 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5819 (grub_multiboot_forward_relocator_end)
5820 (grub_multiboot_backward_relocator)
5821 (grub_multiboot_backward_relocator_end): New variables.
5822
05f9452b 58232008-08-12 Bean <bean123ch@gmail.com>
5824
5825 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5826
20024ab0 58272008-08-11 Robert Millan <rmh@aybabtu.com>
5828
5829 * kern/i386/linuxbios/startup.S: Move from here ...
5830 * kern/i386/coreboot/startup.S: ... to here.
5831
5832 * kern/i386/linuxbios/init.c: Move from here ...
5833 * kern/i386/coreboot/init.c: ... to here.
5834
5835 * kern/i386/linuxbios/table.c: Move from here ...
5836 * kern/i386/coreboot/mmap.c: ... to here.
5837
5838 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5839
e352e9cd 58402008-08-11 Robert Millan <rmh@aybabtu.com>
5841
5842 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5843 errors. Leave it to the upper layer to handle them.
5844
2d05bc6a 58452008-08-09 Christian Franke <franke@computer.org>
5846
5847 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5848 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5849 Install `grub.d/10_windows' only on Cygwin.
5850 * configure.ac: Add subst of `target_os'.
5851 Check `target_os' also before setting TARGET_OBJ2ELF.
5852 Add `--enable-grub-pe2elf'.
5853
042bd419 58542008-08-08 Robert Millan <rmh@aybabtu.com>
5855
5856 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5857 (grub_last_time): Change type to grub_uint64_t.
5858 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5859 (grub_disk_close): Likewise.
5860
5861 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5862 (run_menu): Migrate code from to using grub_get_time_ms().
5863
5864 * util/misc.c (grub_get_time_ms): New function.
5865
7f280db5 58662008-08-08 Marco Gerards <marco@gnu.org>
5867
5868 * disk/ata.c (grub_ata_regget): Change return type to
5869 `grub_uint8_t'.
5870 (grub_ata_regget2): Likewise.
5871 (grub_ata_wait_status): New function.
5872 (grub_ata_wait_busy): Removed function, updated all users to use
5873 `grub_ata_wait_status'.
5874 (grub_ata_wait_drq): Likewise.
5875 (grub_ata_cmd): New function.
5876 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5877 error handling.
5878 (grub_ata_pio_write): Add error handling.
5879 (grub_atapi_identify): Likewise.
5880 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5881 handling.
5882 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5883 handling. Actually use the detected registers. Reorder the
5884 detection logic such that it is easier to read.
5885 (grub_ata_pciinit): Do not assign the same ID to each controller.
5886 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5887 handling.
5888 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5889
5890 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5891
1fbc5e66 58922008-08-08 Marco Gerards <marco@gnu.org>
5893
5894 * NEWS: Update.
5895
819ce6c0 58962008-08-07 Bean <bean123ch@gmail.com>
5897
5898 * include/grub/x86_64/pci.h: New file.
5899
5c41d44d 59002008-08-07 Christian Franke <franke@computer.org>
5901
5902 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5903 (TIMER2_GATE): Likewise.
5904 (grub_pit_wait): Add enable/disable of the timer2 gate
5905 bit of port 0x61. This fixes a possible infinite loop.
5906
5ebc275d 59072008-08-07 Bean <bean123ch@gmail.com>
5908
5909 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5910 kern/i386/tsc.c and kern/i386/pit.c.
5911
5912 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5913 x86_64 platform.
5914
5915 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5916 <grub/i386/tsc.h>.
5917
5918 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5919
e383b3d0 59202008-08-07 Bean <bean123ch@gmail.com>
5921
5922 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5923
5924 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5925
5926 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5927 multiple inclusion. Add #include <grub/types.h>.
5928
1cbb58ac 59292008-08-06 Christian Franke <franke@computer.org>
5930
5931 * conf/common.rmk: Build and install `10_windows'.
5932 * util/grub.d/10_windows.in: New script.
5933
337f5a1e 59342008-08-06 Pavel Roskin <proski@gnu.org>
5935
5936 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5937
057bc4ac 59382008-08-06 Robert Millan <rmh@aybabtu.com>
5939
5940 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5941 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5942
2b99f123 59432008-08-06 Bean <bean123ch@gmail.com>
5944
5945 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5946 (grub_pxefs_fs_int): Remove dummy definition.
5947 (grub_pxefs_open): Use data->block_size to store the current block
5948 size setting.
5949 (grub_pxefs_read): Use block size stored in data->block_size. As the
5950 value of grub_pxe_blksize can be changed after the file is opened.
5951
9f0234cb 59522008-08-06 Bean <bean123ch@gmail.com>
5953
5954 * fs/i386/pc/pxe.c (curr_file): new variable.
5955 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5956 require the dummy internal file system anymore.
5957 (grub_pxefs_read): Removed.
5958 (grub_pxefs_close): Likewise.
5959 (grub_pxefs_fs_int): Likewise.
5960 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5961 connection when we switch file.
5962 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5963
a55d42e0 59642008-08-06 Robert Millan <rmh@aybabtu.com>
5965
5966 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5967 `halt.mod'.
5968 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5969 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5970
5971 * kern/i386/halt.c: New file.
5972 * kern/i386/reboot.c: Likewise.
5973 * include/grub/i386/reboot.h: Likewise.
5974 * include/grub/i386/halt.h: Likewise.
5975
5976 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5977 Include `<grub/cpu/halt.h>'.
5978 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5979 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5980
5981 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5982 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5983 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5984 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5985 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5986 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5987 from here ...
5988 * include/grub/i386/at_keyboard.h: ... to here.
5989
24371d26 59902008-08-05 Robert Millan <rmh@aybabtu.com>
5991
5992 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5993 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5994 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5995 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5996 `kern/generic/millisleep.c'.
5997
5998 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5999 instead of grub_get_rtc().
6000 (grub_tsc_init): Initialize `tsc_boot_time'.
6001
6002 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6003 (grub_machine_init): Use grub_tsc_init() rather than
6004 installing an RTC-based handler via grub_install_get_time_ms().
6005
6006 * kern/i386/pit.c: New file.
6007 * include/grub/i386/pit.h: Likewise.
6008
9e7007b3 60092008-08-05 Bean <bean123ch@gmail.com>
6010
6011 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6012
6013 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6014 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6015 (pxe_mod_SOURCES): New macro.
6016 (pxe_mod_CFLAGS): Likewise.
6017 (pxe_mod_LDFLAGS): Likewise.
6018 (pxecmd_mod_SOURCES): Likewise.
6019 (pxecmd_mod_CFLAGS): Likewise.
6020 (pxecmd_mod_LDFLAGS): Likewise.
6021
6022 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6023 (grub_pxe_call): Likewise.
6024
6025 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6026
6027 * commands/i386/pc/pxecmd.c: New file.
6028
9f0234cb 6029 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 6030
6031 * include/grub/i386/pc/pxe.h: Likewise.
6032
6977d49f 60332008-08-05 Bean <bean123ch@gmail.com>
6034
6035 * util/console.c (grub_console_cur_color): New variable.
6036 (grub_console_standard_color): Likewise.
6037 (grub_console_normal_color): Likewise.
6038 (grub_console_highlight_color): Likewise.
6039 (color_map): Likewise.
6040 (use_color): Likewise.
6041 (NUM_COLORS): New macro.
6042 (grub_ncurses_setcolorstate): Handle color properly.
6043 (grub_ncurses_setcolor): Don't change color here, just remember the
6044 settings, color will be set in grub_ncurses_setcolorstate.
6045 (grub_ncurses_getcolor): New function.
6046 (grub_ncurses_init): Initialize color pairs.
6047 (grub_ncurses_term): New member grub_ncurses_getcolor.
6048
9c2ff3ee 60492008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 6050
9c2ff3ee 6051 High resolution timer support. Implemented for x86 CPUs using TSC.
6052 Extracted generic grub_millisleep() so it's linked in only as needed.
6053 This requires a Pentium compatible CPU; if the RDTSC instruction is
6054 not supported, then it falls back on the generic grub_get_time_ms()
6055 implementation that uses the machine's RTC.
6056
6057 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6058 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6059 `kern/generic/millisleep.c'.
6060
6061 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6062 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6063
6064 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6065 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6066
6067 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6068
6069 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6070 `kern/generic/millisleep.c'.
6071
6072 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6073
6074 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6075
6076 * kern/generic/rtc_get_time_ms.c: New file.
6077
6078 * kern/generic/millisleep.c: New file.
337f5a1e 6079
9c2ff3ee 6080 * kern/misc.c: Don't include
6081 <kern/time.h> anymore.
6082 (grub_millisleep_generic): Removed.
6083
6084 * commands/sleep.c (grub_interruptible_millisleep): Uses
6085 grub_get_time_ms() instead of grub_get_rtc().
6086
6087 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6088 function.
6089 (grub_cpu_is_cpuid_supported): New inline function.
6090 (grub_cpu_is_tsc_supported): New inline function.
6091 (grub_tsc_init): New function prototype.
6092 (grub_tsc_get_time_ms): New function prototype.
6093
6094 * kern/i386/tsc.c (grub_get_time_ms): New file.
6095
6096 * include/grub/time.h: Include <grub/types.h.
6097 (grub_millisleep_generic): Removed.
6098 (grub_get_time_ms): New prototype.
6099 (grub_install_get_time_ms): New prototype.
6100 (grub_rtc_get_time_ms): New prototype.
6101
6102 * kern/time.c (grub_get_time_ms): New function.
6103 (grub_install_get_time_ms): New function.
6104
6105 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
6106 <grub/time.h> anymore.
6107 (grub_millisleep): Removed.
6108 (grub_machine_init): Call grub_tsc_init.
6109
6110 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6111 get_time_ms() implementation.
6112
6113 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6114 (ieee1275_get_time_ms): New function.
6115 (grub_machine_init): Install get_time_ms() implementation.
6116
6117 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6118 (grub_machine_init): Call grub_tsc_init().
6119 (grub_millisleep): Removed.
bf06a93f 6120
9c2ff3ee 6121 * kern/ieee1275/init.c (grub_millisleep): Removed.
6122 (grub_machine_init): Install ieee1275_get_time_ms()
6123 implementation.
6124 (ieee1275_get_time_ms): New function.
6125 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6126 real work.
6127
9ec92aaf 61282008-08-05 Marco Gerards <marco@gnu.org>
6129
6130 * disk/ata.c: Include <grub/pci.h>.
6131 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6132 (grub_ata_initialize): Rewritten.
6133 (grub_ata_device_initialize): New function.
6134
8d23f507 61352008-08-04 Pavel Roskin <proski@gnu.org>
6136
6137 * kern/main.c: Include grub/mm.h.
6138
5e15ee3d 61392008-08-04 Robert Millan <rmh@aybabtu.com>
6140
6141 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6142 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6143 corruption problem).
6144
a9053f8f 61452008-08-04 Robert Millan <rmh@aybabtu.com>
6146
6147 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6148 warnings introduced in my last commit.
6149
dd19c7d7 61502008-08-03 Robert Millan <rmh@aybabtu.com>
6151
6152 Make PCI available on all i386 architectures.
6153
6154 * include/grub/i386/pc/pci.h: Move from here ...
6155 * include/grub/i386/pci.h: ... to here.
6156
6157 * include/grub/i386/pc/pci.h: Remove.
6158 * include/grub/i386/efi/pci.h: Remove.
6159 * include/grub/x86_64/efi/pci.h: Remove.
6160
6161 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6162 `<grub/cpu/pci.h>'.
6163
6164 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6165 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6166 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6167
6168 * conf/i386-ieee1275.rmk: Likewise.
6169
e14a6184 61702008-08-03 Robert Millan <rmh@aybabtu.com>
6171
6172 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6173 (grub_console_setcursor): Make it possible to set cursor off.
6174
52768e37 61752008-08-03 Robert Millan <rmh@aybabtu.com>
6176
6177 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6178 of modules instead of assuming which platform provides what.
6179 * util/update-grub.in: Likewise.
6180
2d52f57f 61812008-08-03 Robert Millan <rmh@aybabtu.com>
6182
6183 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6184 instead of `grub_install_dos_part' to determine whether a drive needs
6185 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 6186 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 6187
2a5cd121 61882008-08-02 Robert Millan <rmh@aybabtu.com>
6189
6190 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6191
93808428 61922008-08-02 Robert Millan <rmh@aybabtu.com>
6193
6194 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6195 of informational grub_dprintf() calls.
6196
3bd0a12a 61972008-08-02 Robert Millan <rmh@aybabtu.com>
6198
6199 * disk/memdisk.c (memdisk_size): Don't initialize.
6200 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6201
6202 * include/grub/i386/pc/kernel.h
6203 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6204 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6205 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6206 (grub_arch_memdisk_size): Remove.
6207
6208 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6209 field (was only used to transfer a constant). Add `type' field to
6210 support multiple module types.
6211 (grub_module_iterate): New function.
6212
6213 * kern/device.c (grub_device_open): Do not hide error messages
6214 when grub_disk_open() fails. Use grub_print_error() instead.
6215
6216 * kern/i386/pc/init.c (grub_arch_modules_addr)
6217 (grub_arch_memdisk_size): Remove functions.
6218 (grub_arch_modules_addr): Return the module address in high memory
6219 (now that it isn't copied anymore).
6220
6221 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6222 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6223 decompression routine (grub_total_module_size already includes that
6224 now). Don't copy modules back to low memory.
6225
6226 * kern/main.c: Include `<grub/mm.h>'.
6227 (grub_load_modules): Split out (and use) ...
6228 (grub_module_iterate): ... this function, which iterates through
6229 module objects and runs a hook.
6230 Comment out grub_mm_init_region() call, as it would cause non-ELF
6231 modules to be overwritten.
6232
6233 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6234 the memdisk image in its own region, make it part of the module list.
6235 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6236 (main): Parse --memdisk|-m option, and pass user-provided path as
6237 parameter to generate_image().
6238 (add_segments): Pass `memdisk_path' down to load_modules().
6239 (load_modules): Embed memdisk image in module section when requested.
6240 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6241 `header.type' instead of `header.offset'.
6242
6243 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6244 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6245 (memdisk_mod_LDFLAGS): New variables.
6246 * conf/i386-coreboot.rmk: Likewise.
6247 * conf/i386-ieee1275.rmk: Likewise.
6248
a927cc73 62492008-08-02 Robert Millan <rmh@aybabtu.com>
6250
6251 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6252 (backward_relocator): New variables. Used to allocate and relocate
6253 the payload, respectively.
6254 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 6255 address, install the appropriate relocator code in each bound of
a927cc73 6256 the payload, and set the entry point such that
6257 grub_multiboot_real_boot() will jump to one of them.
6258
6259 * kern/i386/loader.S (grub_multiboot_payload_size)
6260 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6261 (grub_multiboot_payload_entry_offset): New variables.
6262 (grub_multiboot_real_boot): Set cpu context to what the relocator
6263 expects, and jump to the relocator instead of the payload.
6264
6265 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6266 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6267 (grub_multiboot_payload_entry_offset): Export.
6268
b15d8a0c 62692008-08-01 Bean <bean123ch@gmail.com>
6270
6271 * normal/menu_entry.c (editor_getline): Don't return the original
6272 string as result, as it will be released by lexer once it has done
6273 using it.
6274
cdfb3d22 62752008-08-01 Robert Millan <rmh@aybabtu.com>
6276
6277 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6278 within menuentries, not before them.
6279 util/grub.d/10_hurd.in: Likewise.
6280
9175e93d 62812008-08-01 Bean <bean123ch@gmail.com>
6282
6283 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6284 (bufio_mod_SOURCES): New macro.
6285 (bufio_mod_CFLAGS): Likewise.
6286 (bufio_mod_LDFLAGS): Likewise.
6287
6288 * include/grub/bufio.h: New file.
6289
6290 * io/bufio.c: Likewise.
6291
6292 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6293 (grub_video_reader_png): Use grub_buffile_open to open file.
6294
6295 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6296 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6297
6298 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6299 (grub_video_reader_tga): Use grub_buffile_open to open file.
6300
6301 * font/manager.c: Include <grub/bufio.h>.
6302 (add_font): Use grub_buffile_open to open file.
6303
3d8383e7 63042008-07-31 Robert Millan <rmh@aybabtu.com>
6305
6306 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6307 ELF segments, use a macro for arbitrarily accessing any of them instead
6308 of preparing a pointer that allows access to one at a time.
6309 (grub_multiboot_load_elf64): Likewise.
6310
16e641b6 63112008-07-31 Bean <bean123ch@gmail.com>
6312
6313 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6314 GRUB_KERNEL_MACHINE_DATA_END.
6315
59198b72 63162008-07-30 Robert Millan <rmh@aybabtu.com>
6317
6318 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6319 Increase from 0x50 to 0x60.
6320 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6321 use UUIDs to identify the root drive for them. If that's not
6322 possible, abort.
6323 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6324 check, for cross-disk installs.
6325
ae88bca3 63262008-07-30 Robert Millan <rmh@aybabtu.com>
6327
6328 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6329 is non-empty, use it to set the `prefix' environment variable instead
6330 of the usual approach.
6331 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6332 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6333 environment variable instead of dummy make_install_device().
6334
6335 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6336 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 6337 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 6338
6339 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6340 New variable reference.
6341 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6342 New macro. Defines offset of `grub_prefix' within startup.S (relative
6343 to `start').
6344 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6345 section within startup.S (relative to `start').
6346 * include/grub/i386/coreboot/kernel.h: Likewise.
6347
6348 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6349 Overwrite grub_prefix with its contents, at the beginning of the
6350 first segment.
6351 (main): Understand -p|--prefix.
6352
14f41dd1 63532008-07-30 Robert Millan <rmh@aybabtu.com>
6354
6355 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6356
4ca049a3 63572008-07-30 Robert Millan <rmh@aybabtu.com>
6358
6359 * term/i386/pc/vga_text.c (grub_console_cls): Use
6360 grub_console_gotoxy() to go back to beginning of the screen.
6361 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6362
2921d337 63632008-07-29 Christian Franke <franke@computer.org>
6364
6365 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6366 Add conversion of emulated mount points on Cygwin.
6367
b609876d 63682008-07-29 Christian Franke <franke@computer.org>
6369
6370 * util/update-grub.in: Add a check for admin
6371 group on Cygwin.
6372 Remove old `grub.cfg.new' before creation.
6373 Add `-f' to `mv' to handle the different filesystem
6374 semantics of Windows.
6375
e93e4679 63762008-07-29 Bean <bean123ch@gmail.com>
6377
6378 * normal/main.c (get_line): Fix buffer overflow bug.
6379
41694fd0 63802008-07-28 Robert Millan <rmh@aybabtu.com>
6381
6382 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6383 (struct grub_apple_header): New struct. Describes the layout of
6384 the partmap header.
6385 (apple_partition_map_iterate): Check the header magic as well as the
6386 partition magic (which was already being checked).
6387
cfd0b4e6 63882008-07-28 Pavel Roskin <proski@gnu.org>
6389
6390 * genmk.rb: Add a warning to the beginning of the output that
6391 it's a generated file and should not be edited.
6392
93cce016 63932008-07-28 Robert Millan <rmh@aybabtu.com>
6394
6395 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6396 with the same number are found, just use issue a warning with
6397 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 6398
cd1df915 63992008-07-27 Robert Millan <rmh@aybabtu.com>
6400
6401 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6402 information.
6403
b70a8427 64042008-07-27 Bean <bean123ch@gmail.com>
6405
6406 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6407 (grub_fat_find_dir): Ignore case when comparing filename.
6408
8f5e379f 64092008-07-27 Bean <bean123ch@gmail.com>
6410
6411 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6412 smallino, as it's more descriptive, and i8count can be confused with
6413 the other field count.
6414 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6415 inode type.
6416
a85cd5a0 64172008-07-27 Bean <bean123ch@gmail.com>
6418
6419 * commands/crc.c: New file.
6420
6421 * lib/crc.c: Likewise.
6422
6423 * include/grub/lib/crc.h: Likewise.
6424
6425 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6426
6427 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6428 (hexdump): Move this function to ...
6429
6430 * lib/hexdump.c: ... here.
6431
6432 * include/grub/hexdump.h: Renamed to ...
6433
6434 * include/grub/lib/hexdump.h: ... this.
6435
6436 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6437
6438 * util/grub-editenv.c: Likewise.
6439
6440 * include/envblk.h: Renamed to ...
6441
6442 * include/lib/envblk.h: ... this.
6443
6444 * util/envblk.c: Renamed to ...
6445
6446 * lib/envblk.c: ... this.
6447
6448 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6449 lib/hexdump.c.
6450 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6451 (pkglib_MODULES): Add crc.mod.
6452 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6453 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6454 (crc_mod_SOURCES): New macro.
6455 (crc_mod_CFLAGS): Likewise.
6456 (crc_mod_LDFLAGS): Likewise.
6457
6458 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6459
6460 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6461
6462 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6463
6464 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6465
6466 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6467
c298def0 64682008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 6469
6470 * commands/help.c: Include <grub/term.h>.
6471 (TERM_WIDTH): Removed. Updated all users.
6472
cc349fb3 64732008-07-27 Pavel Roskin <proski@gnu.org>
6474
6475 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6476 spurious warnings about a comment within a comment.
6477
9051607e 64782008-07-25 Robert Millan <rmh@aybabtu.com>
6479
6480 * util/getroot.c (find_root_device): Skip devices that match
6481 /dev/dm-[0-9]. This lets the real device be found for any type of
6482 abstraction (LVM, EVMS, RAID..).
6483 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6484 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6485 device is found first, find_root_device() will now skip it.
6486
01453bfc 64872008-07-24 Pavel Roskin <proski@gnu.org>
6488
6489 * include/grub/types.h: Use __builtin_bswap32() and
6490 __builtin_bswap64() with gcc 4.3 and newer.
6491
6af9849f 64922008-07-24 Christian Franke <franke@computer.org>
6493
3a0fa256 6494 * util/i386/pc/grub-install.in: If `--debug' is specified,
6495 pass `--verbose' to grub-setup.
6496 Abort script if make_system_path_relative_to_its_root() fails.
6497
7810e747 64982008-07-24 Bean <bean123ch@gmail.com>
6499
6500 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6501 variable `target_platform' should be `platform'.
6502
42290e17 65032008-07-24 Bean <bean123ch@gmail.com>
6504
51cc5193 6505 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 6506 (grub_png_init_fixed_block): New function.
6507 (grub_png_decode_image_data): Handle fixed huffman code compression.
6508
2a8a80e4 65092008-07-24 Bean <bean123ch@gmail.com>
6510
6511 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6512 (grub_pe2elf_SOURCES): New macro.
6513 (CLEANFILES): Add grub-pe2elf.
6514
6515 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6516 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6517 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6518 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6519 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6520 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6521 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6522 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6523 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6524 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6525 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6526 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6527 (GRUB_PE32_DT_FUNCTION): Likewise.
6528 (GRUB_PE32_REL_I386_DIR32): Likewise.
6529 (GRUB_PE32_REL_I386_REL32): Likewise.
6530 (grub_pe32_symbol): New structure.
6531 (grub_pe32_reloc): Likewise.
6532
6533 * util/grub-pe2elf.c: New file.
6534
6535 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6536 start symbol in non pc platform.
6537
6538 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6539
6540 The following patches are from Christian Franke.
6541
6542 * include/grub/dl.h: Remove .previous, gas supports this only
6543 for ELF format.
6544
6545 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6546 Remove .type, gas supports this only for ELF format.
6547
6548 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6549 nullbytes in symbol table. This fixes an infinite loop if table is
6550 zero filled.
6551
6552 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6553 TARGET_IMG_LDFLAGS and EXEEXT.
6554
6555 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6556 TARGET_IMG_LDFLAGS_AC.
6557 (grub_CHECK_STACK_ARG_PROBE): New function.
6558
6559 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6560
6561 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6562
6563 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6564 to set TARGET_IMG_LD* accordingly.
6565 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6566 Add call to grub_CHECK_STACK_ARG_PROBE.
6567 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6568
6569 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6570
6571 * genmk.rb: Add EXEEXT to CLEANFILES.
6572
12ccdb75 65732008-07-23 Robert Millan <rmh@aybabtu.com>
6574
6575 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6576 define the codes for arrows and lines used for the menu).
6577 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6578 as well.
6579
6580 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6581 fonts, because the latter are too slow.
6582
18eeaf04 65832008-07-21 Bean <bean123ch@gmail.com>
6584
6585 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6586 a20. Run keyboard test last, as it will cause macbook to halt.
6587
b095e2ad 65882008-07-18 Pavel Roskin <proski@gnu.org>
6589
6590 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6591 load foreign architecture modules correctly anyway. Keep
6592 support for loading host architecture modules, whether we
6593 compile them or not.
6594
737feb35 65952008-07-17 Pavel Roskin <proski@gnu.org>
6596
3f4ce737 6597 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6598 change target_cpu. The compiler default can mismatch target_cpu
6599 in any case.
6600
4ad2d049 6601 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6602 * kern/efi/efi.c: Likewise.
6603
f6130a12 6604 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6605 target compiler is functional.
6606 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6607 are set up.
6608
58393a2d 6609 * configure.ac: Default to efi platform for x86_64-apple. Allow
6610 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6611 adjustments from the rest, only do them if target is not
6612 explicitly given. Merge other adjustments with the final sanity
6613 check. Remove an extraneous check for supported CPU. Be
6614 specific which CPU and which platform is not supported.
6615
737feb35 6616 * configure.ac: Default to pc platform for x86_64.
6617
546f966a 66182008-07-17 Robert Millan <rmh@aybabtu.com>
6619
6620 Partial LinuxBIOS -> Coreboot rename.
6621
6622 * conf/i386-linuxbios.rmk: Renamed to ...
6623 * conf/i386-coreboot.rmk: ... this.
6624 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6625 * configure.ac: Accept "coreboot" as input platform (but maintain
6626 compatibility with "linuxbios").
6627 * include/grub/i386/linuxbios: Renamed to ...
6628 * include/grub/i386/coreboot: ... this.
6629
20011694 66302008-07-17 Bean <bean123ch@gmail.com>
6631
6632 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 6633 (appleldr_mod_SOURCE): New variable.
20011694 6634 (appleldr_mod_CFLAGS): Likewise.
6635 (appleldr_mod_LDFLAGS): Likewise.
6636 (pci_mod_SOURCES): Likewise.
6637 (pci_mod_CFLAGS): Likewise.
6638 (pci_mod_LDFLAGS): Likewise.
6639 (lspci_mod_SOURCES): Likewise.
6640 (lspci_mod_CFLAGS): Likewise.
6641 (lspci_mod_LDFLAGS): Likewise.
6642
6643 * conf/x86_64-efi.rmk: New file.
6644
6645 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6646 macro.
6647 (grub_efidisk_write): Likewise.
6648
6649 * include/efi/api.h (efi_call_0): New macro.
6650 (efi_call_1): Likewise.
6651 (efi_call_2): Likewise.
6652 (efi_call_3): Likewise.
6653 (efi_call_4): Likewise.
6654 (efi_call_5): Likewise.
6655 (efi_call_6): Likewise.
6656
6657 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6658 grub_rescue_cmd_chainloader.
6659
6660 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6661 (grub_pe32_optional_header): Change some fields based on i386 or
6662 x86_64 platform.
6663 (GRUB_PE32_PE32_MAGIC): Likewise.
6664
6665 * include/grub/efi/uga_draw.h: New file.
6666
6667 * include/grub/elf.h (STN_ABS): New constant.
6668 (R_X86_64_NONE): Relocation constant for x86_64.
6669 (R_X86_64_64): Likewise.
6670 (R_X86_64_PC32): Likewise.
6671 (R_X86_64_GOT32): Likewise.
6672 (R_X86_64_PLT32): Likewise.
6673 (R_X86_64_COPY): Likewise.
6674 (R_X86_64_GLOB_DAT): Likewise.
6675 (R_X86_64_JUMP_SLOT): Likewise.
6676 (R_X86_64_RELATIVE): Likewise.
6677 (R_X86_64_GOTPCREL): Likewise.
6678 (R_X86_64_32): Likewise.
6679 (R_X86_64_32S): Likewise.
6680 (R_X86_64_16): Likewise.
6681 (R_X86_64_PC16): Likewise.
6682 (R_X86_64_8): Likewise.
6683 (R_X86_64_PC8): Likewise.
6684
6685 * include/grub/i386/efi/pci.h: New file.
6686
6687 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6688 Change it value based on platform.
6689 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6690 (GRUB_E820_RAM): Likewise.
6691 (GRUB_E820_RESERVED): Likewise.
6692 (GRUB_E820_ACPI): Likewise.
6693 (GRUB_E820_NVS): Likewise.
6694 (GRUB_E820_EXEC_CODE): Likewise.
6695 (GRUB_E820_MAX_ENTRY): Likewise.
6696 (grub_e820_mmap): New structure.
6697 (linux_kernel_header): Change the efi field according to different
6698 kernel version, also field from linux_kernel_header.
6699
6700 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6701
6702 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6703 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6704 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6705 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6706 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6707 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6708 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6709 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6710 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6711 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6712
6713 * include/grub/x86_64/efi/kernel.h: New file.
6714
6715 * include/grub/x86_64/efi/loader.h: Likewise.
6716
6717 * include/grub/x86_64/efi/machine.h: Likewise.
6718
6719 * include/grub/x86_64/efi/pci.h: Likewise.
6720
6721 * include/grub/x86_64/efi/time.h: Likewise.
6722
6723 * include/grub/x86_64/linux.h: Likewise.
6724
6725 * include/grub/x86_64/setjmp.h: Likewise.
6726
6727 * include/grub/x86_64/time.h: Likewise.
6728
6729 * include/grub/x86_64/types.h: Likewise.
6730
6731 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6732 GRUB_TARGET_SIZEOF_VOID_P.
6733
6734 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6735 (grub_efi_locate_handle): Likewise.
6736 (grub_efi_open_protocol): Likewise.
6737 (grub_efi_set_text_mode): Likewise.
6738 (grub_efi_stall): Likewise.
6739 (grub_exit): Likewise.
6740 (grub_reboot): Likewise.
6741 (grub_halt): Likewise.
6742 (grub_efi_exit_boot_services): Likewise.
6743 (grub_get_rtc): Likewise.
6744
6745 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6746 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6747 (grub_efi_allocate_pages): Wrap efi calls.
6748 (grub_efi_free_pages): Wrap efi calls.
6749 (grub_efi_get_memory_map): Wrap efi calls.
6750
6751 * kern/x86_64/dl.c: New file.
6752
6753 * kern/x86_64/efi/callwrap.S: Likewise.
6754
6755 * kern/x86_64/efi/startup.S: Likewise.
6756
6757 * loader/efi/appleloader.c: Likewise.
6758
6759 * loader/efi/chainloader.c (cmdline): New variable.
6760 (grub_chainloader_unload): Wrap efi calls.
6761 (grub_chainloader_boot): Likewise.
6762 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6763 command line.
6764
6765 * loader/efi/chainloader_normal.c (chainloader_command):
6766 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6767 command line.
6768
6769 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6770 method.
6771 (grub_e820_add_region): New function.
6772 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6773 booting.
6774 (grub_find_video_card): New function.
6775 (grub_linux_setup_video): New function.
6776 (grub_rescue_cmd_linux): Probe for video information.
6777
6778 * normal/x86_64/setjmp.S: New file.
6779
6780 * term/efi/console.c (map_char): New function.
6781 (grub_console_putchar): Map unicode char.
6782 (grub_console_checkkey): Wrap efi calls.
6783 (grub_console_getkey): Likewise.
6784 (grub_console_getwh): Likewise.
6785 (grub_console_gotoxy): Likewise.
6786 (grub_console_cls): Likewise.
6787 (grub_console_setcolorstate): Likewise.
6788 (grub_console_setcursor): Likewise.
6789
6790 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6791
59652a20 67922008-07-16 Pavel Roskin <proski@gnu.org>
6793
ef294055 6794 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6795 format strings.
6796
59652a20 6797 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6798 pointer, not an integer. This fixes a warning and prevents
6799 precision loss on 64-bit systems.
6800 (relocate_addresses): Remove unneeded cast.
6801
afc3b5d7 68022008-07-15 Pavel Roskin <proski@gnu.org>
6803
506b2b3e 6804 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6805
62ead89c 6806 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6807
c4cd51d7 6808 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6809 Fix comparison between signed and unsigned.
6810
0d3d8f28 6811 * include/grub/i386/ieee1275/console.h: Declare
6812 grub_console_init() and grub_console_fini().
6813
8804b286 6814 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6815 It's empty and unused.
6816
ee01cf35 6817 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6818 beginning to avoid warnings with some compilers.
6819
afc3b5d7 6820 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6821 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6822
e4e8eaa5 68232008-07-14 Pavel Roskin <proski@gnu.org>
6824
407aceb4 6825 * kern/env.c (grub_register_variable_hook): Don't copy empty
6826 string, it leaks memory. Pass "" to grub_env_set(), it should
6827 handle constant strings.
6828
e4e8eaa5 6829 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6830 * commands/cmp.c (grub_cmd_cmp): Likewise.
6831 * kern/dl.c (grub_dl_flush_cache): Likewise.
6832 (grub_dl_load_core): Likewise.
6833 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6834 (grub_elf64_load_phdrs): Likewise.
6835
d4e2dad3 68362008-07-13 Pavel Roskin <proski@gnu.org>
6837
6838 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6839 between signed and unsigned.
6840 (LzmaEnc_Finish): Fix warning about an unused parameter.
6841
aa24b516 68422008-07-13 Bean <bean123ch@gmail.com>
6843
6844 * Makefile.in (enable_lzo): New rule.
6845
6846 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6847
6848 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6849
6850 * boot/i386/pc/lnxboot.S: #include <config.h>.
6851
6852 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6853 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6854
6855 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6856 compression algorithm according to configure macro.
6857
6858 * kern/i386/pc/startup.S (codestart): Likewise.
6859
6860 * kern/i386/pc/lzma_decode.S: New file.
6861
6862 * include/grub/lib/LzFind.h: Likewise.
6863
6864 * include/grub/lib/LzHash.h: Likewise.
6865
6866 * include/grub/lib/LzmaDec.h: Likewise.
6867
6868 * include/grub/lib/LzmaEnc.h: Likewise.
6869
6870 * include/grub/lib/LzmaTypes.h: Likewise.
6871
6872 * lib/LzFind.c: Likewise.
6873
6874 * lib/LzmaDec.c: Likewise.
6875
6876 * lib/LzmaEnc.c: Likewise.
6877
4ae821ac 68782008-07-13 Bean <bean123ch@gmail.com>
6879
6880 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6881 (grub_ext4_extent_header): New structure.
6882 (grub_ext4_extent): Likewise.
6883 (grub_ext4_extent_idx): Likewise.
6884 (grub_ext4_find_leaf): New function.
6885 (grub_ext2_read_block): Handle extents.
6886
9a745147 68872008-07-12 Robert Millan <rmh@aybabtu.com>
6888
6889 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6890
d49a4cf6 68912008-07-11 Robert Millan <rmh@aybabtu.com>
6892
6893 * util/grub.d/40_custom.in: New file. Example on how to add custom
6894 entries to /etc/grub.d.
6895 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6896 40_custom (implicitly, by merging all the grub.d rules).
6897
947414b4 68982008-07-11 Pavel Roskin <proski@gnu.org>
6899
0059cf6f 6900 * commands/read.c (grub_getline): Fix invalid memory access.
6901 Don't add newline to the variable value.
6902
947414b4 6903 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6904 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6905 (serial_hw_get_port): Check validity of the port number.
6906 (grub_cmd_serial): Check return value of serial_hw_get_port().
6907
62a02d00 69082008-07-07 Pavel Roskin <proski@gnu.org>
6909
6910 * boot/i386/pc/diskboot.S (notification_string): Replace
6911 "Loading kernel" with just "loading". This is shorter, less
6912 confusing and saves a few bytes for possible future changes.
6913
3e5581b0 69142008-07-05 Pavel Roskin <proski@gnu.org>
6915
ea387a48 6916 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6917 size for ATAPI devices, they are undefined. Output sector
6918 number in decimal form.
6919
3e5581b0 6920 * disk/ata.c: Use named constants for status bits.
6921
fdecb8fd 69222008-07-04 Pavel Roskin <proski@gnu.org>
6923
bcd35b90 6924 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6925 grub_addr_t before casting it to the void pointer to fix a
6926 warning. Non-addressable regions are discarded earlier.
6927 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6928 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6929 (check_signature): Don't shadow table_header.
6930 (grub_linuxbios_table_iterate): Cast numeric constants to
6931 grub_linuxbios_table_header_t.
6932 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6933 grub_stop().
6934
af58ab3d 6935 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6936 prevent warnings.
6937
1759aa57 6938 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6939 pointer, which can cause warnings. Support 64-bit addresses.
6940
fdecb8fd 6941 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6942 of sizeof(long). This fixes PowerPC image generation on x86_64.
6943
8516d2a8 69442008-07-04 Robert Millan <rmh@aybabtu.com>
6945
6946 This fixes a performance issue when pc & gpt partmap iterators
6947 didn't abort iteration even after our hook found what it was
fe987087 6948 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6949
6950 Some callers relied on previous buggy behaviour, since they would
34c44600 6951 raise an error when their own hooks caused early abortion of its
8516d2a8 6952 iteration.
6953
6954 * kern/device.c (grub_device_open): Improve error message.
6955 * disk/lvm.c (grub_lvm_open): Likewise.
6956 * disk/raid.c (grub_raid_open): Likewise.
6957
6958 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6959 when hook requests it, independently of grub_errno.
6960 (pc_partition_map_probe): Do not fail when find_func() caused
6961 early abortion of pc_partition_map_iterate().
6962
6963 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6964 when hook requests it, independently of grub_errno.
6965 (gpt_partition_map_probe): Do not fail when find_func() caused
6966 early abortion of gpt_partition_map_iterate().
6967
6968 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6969 when hook requests it, independently of grub_errno. Do not fail when
6970 part_map_iterate_hook() caused early abortion of p->iterate().
6971
6972 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6973 when grub_partition_iterate() returned with non-zero.
6974
277d0de9 69752008-07-03 Pavel Roskin <proski@gnu.org>
6976
6977 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6978 like we do in grub_ata_pio_read().
6979 (grub_ata_readwrite): Always write individual sectors. Fix the
6980 sector count for the remainder.
6981 (grub_ata_write): Enable writing to ATA devices. Correctly
6982 report error for ATAPI devices.
6983
d4c9b428 69842008-07-02 Pavel Roskin <proski@gnu.org>
6985
e43fc690 6986 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6987 warning.
6988
f707af42 6989 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6990 for every read sector, we already increment it for the whole
6991 batch. This fixes reading more than 256 sectors at once.
6992
11e16b15 6993 * util/grub-editenv.c (cmd_info): Cast argument to long
6994 explicitly. ptrdiff_t reduces to int on i386.
6995
cbabfdd4 6996 * util/grub-editenv.c (main): Be specific which parameter is
6997 missing.
6998
b8fbce0a 6999 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7000 (memdisk): Make memdisk_orig_addr a pointer.
7001
c9c8e606 7002 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7003 for file offsets, use grub_off_t instead. Fix printf format
7004 warnings.
7005
ca62e598 7006 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7007 there. Real unexpected warnings should not drown in the noise
7008 about known problems.
7009
ce8d1766 7010 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7011 grub_disk_addr_t for memory addresses.
7012
00c7a56a 7013 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7014 explicitly to fix a warning.
7015
08d3ef09 7016 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7017
cb71ba20 7018 * Makefile.in (MODULE_LDFLAGS): New variable.
7019 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7020 the linker accepts --build-id=none.
7021 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7022 MODULE_LDFLAGS.
7023 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7024
d4c9b428 7025 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7026 those in Linux XFS code. Provide a way to access 64-bit parent
7027 inode.
7028 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7029 the end of struct grub_xfs_dir_header.
7030
d4156eee 70312008-07-02 Bean <bean123ch@gmail.com>
7032
7033 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7034 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7035 and GRUB_IEEE1275_FLAG_NO_ANSI.
7036
7037 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7038 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7039 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7040
7041 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7042 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7043
7044 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7045 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7046
7047 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7048 esc sequence on non ANSI terminal.
7049 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7050
7051 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7052 beginning of file.
7053
2270f77b 70542008-07-02 Bean <bean123ch@gmail.com>
7055
7056 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7057 (grub_editenv_SOURCES): New variable.
7058 (pkglib_MODULES): Add loadenv.mod.
7059 (loadenv_mod_SOURCES): New variable.
7060 (loadenv_mod_CFLAGS): Likewise.
7061 (loadenv_mod_LDFLAGS): Likewise.
7062
7063 * include/grub/envblk.h: New file.
7064
7065 * util/envblk.c: New file.
7066
7067 * util/grub-editenv.c: New file.
7068
7069 * commands/loadenv.c: New file.
7070
0e9e51ec 70712008-07-01 Pavel Roskin <proski@gnu.org>
7072
d89b7634 7073 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7074 not unsigned char. This fixes warnings and is consistent with
7075 other tags.
7076
bf1835b1 7077 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7078
8222a04b 7079 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7080
6a42d99d 7081 * term/tparm.c (analyze): Always set *popcount.
7082
10b159d1 7083 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7084 cast to fix a warning.
7085
b8789f6c 7086 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7087 cast to suppress a warning.
7088
29d7e38a 7089 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7090 grub_fshelp_read_file() expects.
7091
f341f669 7092 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7093 write uuid as a 32-bit value in CPU byte order, so declare and
7094 use it as such.
7095
0e9e51ec 7096 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7097 long if the format specifier expects it.
7098 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7099 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7100 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7101 long to fix a warning.
7102 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7103 grub_dprintf() arguments to fix warnings.
7104
3aefa857 71052008-06-30 Pavel Roskin <proski@gnu.org>
7106
56c7668b 7107 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7108 install_bsd_part immediately before core.img is embedded or
7109 modified on disk. This fixes core.img verification if core.img
7110 cannot be embedded.
7111
3aefa857 7112 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7113 core_path to calculate the blocklist.
7114 Patch from Javier Martín <lordhabbit@gmail.com>
7115
5444088d 71162008-06-29 Robert Millan <rmh@aybabtu.com>
7117
7118 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
7119 block to disk block.
7120 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7121 Patch from Niels Böhm <bitbucket@arcor.de>
7122
674835c8 71232008-06-29 Robert Millan <rmh@aybabtu.com>
7124
7125 * util/update-grub_lib.in (font_path): Search for fonts in
7126 /boot/grub first, which is more likely to be readable (we aren't
7127 deciding where fonts live, just looking for them).
7128
f527dbc8 71292008-06-26 Pavel Roskin <proski@gnu.org>
7130
6c2d8df6 7131 * util/biosdisk.c (read_device_map): Don't leave dead map
7132 entries for devices failing stat() check.
7133
f527dbc8 7134 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7135 core_path_dev for the core.img path on the target device.
7136
aebe3d13 71372008-06-26 Robert Millan <rmh@aybabtu.com>
7138
7139 * disk/fs_uuid.c: New file.
7140 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7141 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7142 (fs_uuid_mod_LDFLAGS): New variables.
7143 * include/grub/disk.h (grub_disk_dev_id): Add
7144 `GRUB_DISK_DEVICE_UUID_ID'.
7145 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7146 implement iterate().
7147
37aaf354 71482008-06-26 Robert Millan <rmh@aybabtu.com>
7149
7150 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7151 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7152 Linux image includes no initrd.
7153
25ff262a 71542008-06-21 Javier Martín <lordhabbit@gmail.com>
7155
7156 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7157 call to resolve the core image location that effectively appended the
7158 name twice.
7159
76a2bd44 71602008-06-21 Robert Millan <rmh@aybabtu.com>
7161
7162 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7163 call from here ...
7164
7165 * util/grub.d/10_hurd.in: ... to here ...
7166 * util/grub.d/10_linux.in: ... and here.
7167
650e1c79 71682008-06-19 Robert Millan <rmh@aybabtu.com>
7169
fe987087 7170 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 7171 after it has been set by grub_machine_set_prefix().
7172
6ce63911 71732008-06-19 Robert Millan <rmh@aybabtu.com>
7174
7175 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7176 search result when not saving to variable, not the other way around.
7177 When saving to variable, abort iteration as soon as a match is found.
7178
73940cec 71792008-06-19 Robert Millan <rmh@aybabtu.com>
7180
7181 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7182 check for partition that provides /boot/grub. Its logic is flawed,
7183 as it prevents prepare_grub_to_access_device() from being called
7184 multiple times.
7185
3c62a39d 71862008-06-19 Robert Millan <rmh@aybabtu.com>
7187
7188 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7189 "insmod" command directly when abstraction modules are needed,
fe987087 7190 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 7191 since it had already been processed).
7192
47395a42 71932008-06-19 Pavel Roskin <proski@gnu.org>
7194
7195 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7196 changed. This is needed in case GRUB_LIBDIR changes.
7197 * conf/i386-ieee1275.rmk: Likewise.
7198 * conf/i386-linuxbios.rmk: Likewise.
7199 * conf/i386-pc.rmk: Likewise.
7200 * conf/powerpc-ieee1275.rmk: Likewise.
7201
a145ac2d 72022008-06-18 Pavel Roskin <proski@gnu.org>
7203
7204 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7205 kernel_elf_symlist.c to symlist.c for consistency with other
7206 architectures. Update all users.
7207 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7208
7847c51e 72092008-06-18 Robert Millan <rmh@aybabtu.com>
7210
7211 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7212 it in prefix.
7213
7214 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7215 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7216 a RAID device, run setup() for all members independently on whether
7217 LVM abstraction is being used.
7218 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7219 If grub-mkimage has set `*install_dos_part == -2', don't override this
7220 value.
7221 Perform *install_dos_part adjustments independently on whether
7222 we're embedding or not.
7223 Clarify error message when image is too big for embedding.
7224 Remove duplicate *install_dos_part stanza.
7225
b23e5644 72262008-06-17 Robert Millan <rmh@aybabtu.com>
7227
7228 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7229 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7230 variables.
7231 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7232 values in grub_ofconsole_normal_color and
7233 grub_ofconsole_highlight_color (they're not directly related to
7234 background and foreground).
7235 (grub_ofconsole_setcolorstate): Extract background and foreground
7236 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7237
0aac2f79 72382008-06-17 Robert Millan <rmh@aybabtu.com>
7239
7240 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7241 /boot/grub for the check in last commit, not /boot (they could be
7242 different partitions).
7243
3cca7ef3 72442008-06-16 Robert Millan <rmh@aybabtu.com>
7245
7246 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7247 asked to setup access for the same partition that provides /boot,
7248 don't bother using UUIDs since our root already has the value we
7249 want.
7250
347396d8 72512008-06-16 Robert Millan <rmh@aybabtu.com>
7252
7253 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7254 I2O devices.
7255 Patch from Sven Mueller <sven@debian.org>.
7256
991477f8 72572008-06-16 Robert Millan <rmh@aybabtu.com>
7258
7259 * util/update-grub.in: Check for $EUID instead of $UID.
7260 Reported by Vincent Zweije.
7261
d31a32a1 72622008-06-16 Bean <bean123ch@gmail.com>
7263
fe987087 7264 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 7265 (grub_ext2_read_block): Likewise.
7266 (grub_ext2_read_inode): Likewise.
7267 (grub_ext2_mount): Likewise.
7268 (grub_ext2_close): Likewise.
7269 (grub_ext3_get_journal): Removed.
7270
fe987087 7271 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 7272 (grub_reiserfs_read_symlink): Likewise.
7273 (grub_reiserfs_mount): Likewise.
7274 (grub_reiserfs_open): Likewise.
7275 (grub_reiserfs_read): Likewise.
7276 (grub_reiserfs_close): Likewise.
7277 (grub_reiserfs_get_journal): Removed.
7278
7279 * fs/fshelp.c (grub_fshelp_read): Removed.
7280 (grub_fshelp_map_block): Likewise.
7281
7282 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7283 (grub_fshelp_journal): Likewise.
7284 (grub_fshelp_read): Likewise.
7285 (grub_fshelp_map_block): Likewise.
7286
3540a760 72872008-06-16 Pavel Roskin <proski@gnu.org>
7288
7289 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7290 floating point anymore.
7291 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7292
95614c84 72932008-06-15 Pavel Roskin <proski@gnu.org>
7294
7295 * commands/ls.c (grub_ls_list_files): Use integer calculations
7296 for human readable format, avoid floating point use.
7297 * kern/misc.c (grub_ftoa): Remove.
7298 (grub_vsprintf): Remove floating point support.
7299
50465dd6 73002008-06-15 Robert Millan <rmh@aybabtu.com>
7301
fe6b695a 7302 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 7303 devices.
7304 Reported by Max Vozeler.
7305
a9207284 73062008-06-15 Robert Millan <rmh@aybabtu.com>
7307
7308 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7309 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7310 skipped later.
7311 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7312 the beginning of the prefix.
7313
7314 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7315 It is assumed that if we have a memdisk, grub-mkimage has set
7316 grub_prefix to include the "(memdisk)" drive in it.
7317
a7cbd45a 73182008-06-15 Robert Millan <rmh@aybabtu.com>
7319
7320 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7321 Initialize keyboard controller after registering the terminal, so that
7322 grub_printf() can be called from grub_keyboard_controller_init().
7323
21cf716a 73242008-06-15 Robert Millan <rmh@aybabtu.com>
7325
7326 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7327 extent-btree which is written as big endian on disk.
7328 Reported by Alain Greppin <al@chilibi.org>.
7329
23a64d8e 73302008-06-14 Robert Millan <rmh@aybabtu.com>
7331
7332 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7333 * util/i386/pc/grub-install.in (modules): Likewise.
7334
d687651c 73352008-06-13 Pavel Roskin <proski@gnu.org>
7336
7337 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7338
dfe9ddd4 73392008-06-13 Bean <bean123ch@gmail.com>
7340
7341 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7342
7343 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7344
7345 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7346 to indicate sparse block.
7347
16ae7781 73482008-06-12 Pavel Roskin <proski@gnu.org>
7349
e6d1a308 7350 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7351 number, grub_fshelp_read() does it for us.
7352
16ae7781 7353 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7354 linear disk read with journal translation.
7355 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7356 * include/grub/fshelp.h: Declare grub_fshelp_read().
7357
40fd3a2b 73582008-06-09 Pavel Roskin <proski@gnu.org>
7359
7360 * fs/minix.c (grub_minix_mount): Handle error reading
7361 superblock.
7362
f5679726 73632008-06-08 Robert Millan <rmh@aybabtu.com>
7364
7365 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7366 don't append the RAID prefix afterwards.
7367 Reported by Clint Adams.
7368
ce525529 73692008-06-08 Robert Millan <rmh@aybabtu.com>
7370
7371 Based on description from Pavel:
7372 * kern/disk.c (grub_disk_check_range): Rename to ...
7373 (grub_disk_adjust_range): ... this. Add a comment explaining the
7374 tasks performed by this function.
7375
ad4936a0 73762008-06-08 Robert Millan <rmh@aybabtu.com>
7377
7378 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7379 `num_serial' (for consistency with other variables).
7380 (struct grub_ntfs_data): Add `uuid' member.
7381 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7382 (grub_ntfs_uuid): New function.
7383 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7384
dc20b0f9 73852008-06-07 Pavel Roskin <proski@gnu.org>
7386
7387 * util/biosdisk.c (open_device): Revert last change to the
7388 function, it broke installation. The sector needs to be
7389 different dependent on which device is opened.
7390
c5e3cfba 73912008-06-06 Robert Millan <rmh@aybabtu.com>
7392
7393 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7394 rest of GRUB, and breakage doesn't happen if its value were modified.
7395
7396 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7397 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7398 a constant (same value).
7399 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7400 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7401
26a1f8c4 74022008-06-06 Robert Millan <rmh@aybabtu.com>
7403
7404 * util/biosdisk.c (open_device): Do not modify sector offset when
7405 accessing a partition. kern/disk.c already handles this for us.
7406
25d6b327 74072008-06-06 Robert Millan <rmh@aybabtu.com>
7408
7409 * util/grub-emu.c (grub_machine_init): Move code in this function from
7410 here ...
7411 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7412 segfault in case grub_printf() is called).
7413
7414 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7415 grub_probe. Update all users not to explicitly add it again.
7416 (grub_device): New variable; contains corresponding device for grubdir.
7417 (fs_module, partmap_module, devabstraction_module): Pass
7418 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7419 every time.
7420
9ece62fb 74212008-06-05 Robert Millan <rmh@aybabtu.com>
7422
7423 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7424 is found, print it (same layout as with labels).
7425
1ad36d37 74262008-06-04 Robert Millan <rmh@aybabtu.com>
7427
7428 * util/biosdisk.c (get_drive): Rename to ...
7429 (find_grub_drive): ... this. Update all users.
7430
7431 (get_os_disk): Rename to ...
7432 (convert_system_partition_to_system_disk): ... this. Update all users.
7433
7434 (find_drive): Rename to ...
7435 (find_system_device): ... this. Update all users.
7436
e6a30859 74372008-06-04 Robert Millan <rmh@aybabtu.com>
7438
7439 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7440 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7441 (make_device_map): Likewise.
7442
00c108a4 74432008-06-01 Robert Millan <rmh@aybabtu.com>
7444
7445 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7446 before dereferencing it.
7447
7448 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7449 union with fat12/fat16-specific ones. Add some new fields, including
7450 `num_serial' for both versions.
7451 (struct grub_fat_data): Add `uuid' member.
7452 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7453 names. Initialize `data->uuid' using `num_serial'.
7454 (grub_fat_uuid): New function.
7455 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7456
7457 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7458 (grub_reiserfs_uuid): New function.
7459 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7460 member.
7461
7462 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7463 (grub_xfs_uuid): New function.
7464 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7465
1385c5bb 74662008-06-01 Robert Millan <rmh@aybabtu.com>
7467
7468 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7469 code that is backward compatible with pre-uuid search command.
7470
c682dfd7 74712008-05-31 Robert Millan <rmh@aybabtu.com>
7472
7473 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7474 floppies after everything else, to ensure floppy drive isn't accessed
7475 unnecessarily (patch from Bean).
7476
b7db5d47 74772008-05-31 Robert Millan <rmh@aybabtu.com>
7478
7479 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7480 not print device names when we were asked to set a variable.
7481
6e037aa9 74822008-05-31 Robert Millan <rmh@aybabtu.com>
7483
7484 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7485 using "cursor-on" and "cursor-off" commands (understood at least by
7486 the Open Firmware flavour on OLPC).
7487
41305bc8 74882008-05-31 Michael Gorven <michael@gorven.za.net>
7489
7490 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7491 on and off sequences.
7492
69ba137e 74932008-05-31 Robert Millan <rmh@aybabtu.com>
7494
7495 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7496 * util/update-grub.in: Likewise.
7497
520ae21b 74982008-05-30 Pavel Roskin <proski@gnu.org>
7499
7500 * util/biosdisk.c (linux_find_partition): Simplify logic and
7501 make the code more universal. Keep special processing for
7502 devfs, but use a simple rule for all other devices. If the
7503 device ends with a number, append 'p' and the partition number.
7504 Otherwise, append only the partition number.
7505
5786569b 75062008-05-30 Robert Millan <rmh@aybabtu.com>
7507
7508 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7509 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7510 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7511 the `root' parameter to Linux.
7512
51500452 75132008-05-30 Robert Millan <rmh@aybabtu.com>
7514
7515 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7516 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7517 --fs_uuid with --fs-uuid.
7518 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7519 all filesystems support them).
7520
811d3878 75212008-05-30 Robert Millan <rmh@aybabtu.com>
7522
7523 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 7524 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 7525
cab63c95 75262008-05-30 Robert Millan <rmh@aybabtu.com>
7527
7528 * util/grub.d/00_header.in: Remove obsolete comment referencing
7529 convert_system_path_to_grub_path().
7530 * util/update-grub.in: Likewise.
7531 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7532 (convert_system_path_to_grub_path): Add a warning message explaining
7533 that this function is deprecated. Rely on is_path_readable_by_grub()
7534 for the readability checks.
7535 (font_path): Use is_path_readable_by_grub() for the readability
7536 check rather than convert_system_path_to_grub_path().
7537
972e2f7a 75382008-05-30 Robert Millan <rmh@aybabtu.com>
7539
7540 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7541 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7542 converting it first.
7543 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7544 grub.cfg for access to font file, and afterwards call it again to set
7545 the root device.
7546
62191274 75472008-05-30 Robert Millan <rmh@aybabtu.com>
7548
7549 * commands/search.c (options): Add --fs_uuid option.
7550 (search_fs_uuid): New function.
7551 (grub_cmd_search): Fix --set argument passing.
7552 Use search_fs_uuid() when requested via --fs_uuid.
7553 (grub_search_init): Update help message.
7554 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7555 and redeclare it as an array of 16-bit words.
7556 (grub_ext2_uuid): New function.
7557 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7558 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7559 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7560 (GRUB_DEVICE_BOOT_UUID): New variables.
7561 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7562 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7563 whenever possible.
7564 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7565 just assume `root' variable has the right value.
7566 * util/grub.d/10_linux.in: Likewise.
7567 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7568 via PRINT_FS_UUID.
7569 (main): Recognise `-t fs_uuid' argument.
7570
01b73ec8 75712008-05-30 Robert Millan <rmh@aybabtu.com>
7572
7573 * util/biosdisk.c (map): Redefine structure to hold information
7574 about GRUB drive name.
fe6b695a 7575 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 7576 drive names.
7577 (call_hook): Remove.
7578 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7579 member. Assume drive has partitions.
7580 (grub_util_biosdisk_open): Access device names via `.device' struct
7581 member.
7582 (open_device): Likewise.
7583 (find_drive): Likewise.
7584 (read_device_map): Adjust map[] usage to match the new struct
7585 definition. Don't check for duplicates (still possible, but not cheap
7586 anymore).
7587 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7588 (make_device_name): Remove assumption of BIOS-like drive names.
7589
22f16596 75902008-05-30 Pavel Roskin <proski@gnu.org>
7591
7592 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7593 compiling execute.c doesn't need grub_script.tab.h anymore.
7594 (normal/command.c_DEPENDENCIES): Likewise.
7595 (normal/function.c_DEPENDENCIES): Likewise.
7596 * conf/i386-ieee1275.rmk: Likewise.
7597 * conf/i386-linuxbios.rmk: Likewise.
7598 * conf/i386-pc.rmk: Likewise.
7599 * conf/powerpc-ieee1275.rmk: Likewise.
7600 * conf/sparc64-ieee1275.rmk: Likewise.
7601
528ad8f2 76022008-05-29 Pavel Roskin <proski@gnu.org>
7603
d1dff95d 7604 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7605 when scanning metadata for volume group name.
7606
528ad8f2 7607 * include/grub/script.h: Don't include grub_script.tab.h. It's
7608 a generated file, which may only be included from the files with
7609 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7610 use union YYSTYPE, as the later allows forward declaration.
7611 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7612
47248e08 76132008-05-29 Robert Millan <rmh@aybabtu.com>
7614
7615 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7616 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7617 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7618 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7619 scan codes.
7620
ee632529 76212008-05-29 Robert Millan <rmh@aybabtu.com>
7622
7623 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7624 control key combinations.
7625
eee96e08 76262008-05-29 Robert Millan <rmh@aybabtu.com>
7627
7628 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7629 * util/ieee1275/grub-install.in: ... to here.
7630 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7631 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7632 (grub_install_SOURCES): Likewise.
7633
da9a6a94 76342008-05-29 Robert Millan <rmh@aybabtu.com>
7635
7636 * fs/affs.c: Update copyright year.
7637 * fs/ext2.c: Likewise.
7638 * fs/fshelp.c: Likewise.
7639 * fs/hfsplus.c: Likewise.
7640 * fs/ntfs.c: Likewise.
7641 * fs/xfs.c: Likewise.
7642 * include/grub/fshelp.h: Likewise.
7643 * util/grub-mkdevicemap.c: Likewise.
7644
12e65f3a 76452008-05-28 Robert Millan <rmh@aybabtu.com>
7646
7647 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7648 might need to be fatfs to support some firmware implementations
7649 (e.g. OFW or EFI).
7650
23023641 76512008-05-28 Robert Millan <rmh@aybabtu.com>
7652
7653 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7654 devices.
7655 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7656 (make_device_map): Likewise.
7657
887d2619 76582008-05-20 Bean <bean123ch@gmail.com>
7659
7660 * fs/fshelp.c (grub_fshelp_map_block): New function.
7661 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7662 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7663
7664 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7665 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7666 (grub_fshelp_journal): New structure.
7667 (grub_fshelp_map_block): New function prototype.
7668 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7669 (grub_fshelp_map_block): Likewise.
7670
7671 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7672 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7673 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7674 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7675 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7676 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7677 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7678 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7679 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7680 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7681 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7682 (grub_ext2_sblock): New members for journal support.
7683 (grub_ext3_journal_header): New structure.
7684 (grub_ext3_journal_revoke_header): Likewise.
7685 (grub_ext3_journal_block_tag): Likewise.
7686 (grub_ext3_journal_sblock): Likewise.
7687 (grub_fshelp_node): New members logfile and journal.
7688 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7689 grub_fshelp_map_block to get real block number.
7690 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7691 number.
7692 (grub_ext2_read_inode): Likewise.
7693 (grub_ext3_get_journal): New function.
7694 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7695 (grub_ext2_close): Release memory used by journal.
7696
7697 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7698 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7699 (grub_reiserfs_transaction_header): Renamed to
7700 grub_reiserfs_description_block, replace field data with real_blocks.
7701 (grub_reiserfs_commit_block): New structure.
7702 (grub_reiserfs_data): New member journal.
7703 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7704 number.
7705 (grub_reiserfs_read_symlink): Likewise.
7706 (grub_reiserfs_iterate_dir): Likewise.
7707 (grub_reiserfs_open): Likewise.
7708 (grub_reiserfs_read): Likewise.
7709 (grub_reiserfs_get_journal): New function.
7710 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7711 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7712 using grub_reiserfs_get_journal.
7713 (grub_reiserfs_close): Release memory used by journal.
7714
7715 * fs/affs.c (grub_affs_read_block): Change block type to
7716 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7717
7718 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7719
7720 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7721
7722 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7723
7724 * fs/udf.c (grub_udf_read_block): Change block type to
7725 grub_disk_addr_t. Use type cast to avoid warning.
7726
7727 * fs/xfs.c (grub_xfs_read_block): Likewise.
7728
b7c6bed5 77292008-05-16 Christian Franke <franke@computer.org>
7730
7731 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7732 to ensure that break with ESC will always work.
7733 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7734 Remove ESC from keyboard queue.
7735
eedf167f 77362008-05-16 Christian Franke <franke@computer.org>
7737
7738 * util/biosdisk.c: [__CYGWIN__] Add includes.
7739 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7740 (get_os_disk): Move variable declarations to OS specific
7741 parts to avoid warning.
7742 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7743 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7744 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7745 Cygwin.
7746 * util/getroot.c: [__CYGWIN__] Add includes.
7747 (strip_extra_slashes): Fix "/" case.
7748 [__CYGWIN__] (get_win32_path): New function.
7749 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7750 [__CYGWIN__] (find_root_device): Disable.
7751 [__CYGWIN__] (get_bootsec_serial): New function.
7752 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7753 [__linux__] (grub_guess_root_device): Add early returns to simplify
7754 structure.
7755 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7756 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7757 check for Linux only.
7758
a079699e 77592008-05-15 Bean <bean123ch@gmail.com>
7760
7761 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7762 keyboard hang problem in apple's intel mac.
7763
1cf4059a 77642008-05-09 Robert Millan <rmh@aybabtu.com>
7765
7766 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7767 devices.
7768 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7769 (make_device_map): Likewise.
7770 Reported by Aurelien Jarno <aurel32@debian.org>
7771
ed759390 77722008-05-07 Ian Campbell <ijc@hellion.org.uk>
7773
7774 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7775 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7776 (make_device_map): Output entries for xvd type disks.
7777
b56c4eaa 77782008-05-07 Robert Millan <rmh@aybabtu.com>
7779
7780 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7781 devices.
7782 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7783 (make_device_map): Likewise.
7784 Reported by Roland Dreier <rdreier@cisco.com>
7785
7f8866ed 77862008-05-07 Robert Millan <rmh@aybabtu.com>
7787
7788 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7789 grub_strstr() call. Correct a few mistakes in failure path handling.
7790
b0346e0f 77912008-05-06 Robert Millan <rmh@aybabtu.com>
7792
7793 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7794 Do not print a trailing slash (therefore, the root directory is an
7795 empty string).
7796 (convert_system_path_to_grub_path): Do not remove trailing slash
7797 from make_system_path_relative_to_its_root() output.
7798
7799 * util/i386/pc/grub-install.in: Add trailing slash to output from
7800 make_system_path_relative_to_its_root().
7801
6cf12cbd 78022008-05-06 Robert Millan <rmh@aybabtu.com>
7803
7804 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7805 ensures that output lines aren't intermangled with those sent to
7806 stderr (via grub_util_info()).
7807 * util/grub-probe.c (grub_refresh): Likewise.
7808 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7809
0fbb3117 78102008-05-05 Christian Franke <franke@computer.org>
7811
7812 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7813 Add Cygwin device names.
7814 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7815 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7816 (check_device): Return error instead of success on empty name.
7817 (make_device_map): Move label inside linux specific code to
7818 prevent compiler warning.
7819
8124cdb7 78202008-04-30 Robert Millan <rmh@aybabtu.com>
7821
7822 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7823 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7824 first boot option.
7825 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7826
094c01d0 78272008-04-29 Robert Millan <rmh@aybabtu.com>
7828
7829 * docs/grub.cfg: New file (example GRUB configuration).
7830
f4b1fc02 78312008-04-26 Robert Millan <rmh@aybabtu.com>
7832
329ce2a5 7833 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7834 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7835 and `disk/ieee1275/nand.c'.
f4b1fc02 7836
25f16ec1 78372008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7838
25f16ec1 7839 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7840 i386-linuxbios.
7841
7842 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7843 change the buffer size to 4096 for cdrom device.
7844
7845 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7846 and nand.mod.
7847 (_linux_mod_SOURCES): New variable.
7848 (_linux_mod_CFLAGS): Likewise.
7849 (_linux_mod_LDFLAGS): Likewise.
7850 (linux_mod_SOURCES): Likewise.
7851 (linux_mod_CFLAGS): Likewise.
7852 (linux_mod_LDFLAGS): Likewise.
7853 (nand_mod_SOURCES): Likewise.
7854 (nand_mod_CFLAGS): Likewise.
7855 (nand_mod_LDFLAGS): Likewise.
7856
7857 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7858 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7859 type property. (nand device in olpc don't have this property)
7860
7861 * include/grub/disk.h (grub_disk_dev_id): New macro
7862 GRUB_DISK_DEVICE_NAND_ID.
7863
7864 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7865 function prototype.
7866 (grub_rescue_cmd_initrd): Likewise.
7867
7868 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7869 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7870 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7871
25f16ec1 7872 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7873 GRUB_MACHINE_IEEE1275 is defined.
7874
7875 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7876 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7877
7878 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7879 on nested function heap_init.
7880 (grub_upper_mem): New variable for i386-ieee1275.
7881 (grub_get_extended_memory): New function for i386-ieee1275.
7882 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7883
7884 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7885 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7886 property.
f19dbdb7 7887
25f16ec1 7888 * loader/i386/ieee1275/linux.c: New file.
7889
7890 * loader/i386/ieee1275/linux_normal.c: New file.
7891
7892 * disk/ieee1275/nand.c: New file.
7893
e89d61e9 78942008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7895
7896 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7897 value.
7898 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7899
602566f6 79002008-04-18 Robert Millan <rmh@aybabtu.com>
7901
7902 Restructures early code path on ieee1275 to unify grub_main() as
7903 the first C function that is executed in every platform.
7904
7905 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7906 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7907 cmain().
7908 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7909 * kern/ieee1275/cmain.c (cmain): Rename to ...
7910 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7911 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7912 at the beginning.
7913
57490c2b 79142008-04-18 Robert Millan <rmh@aybabtu.com>
7915
7916 * util/update-grub.in: Fix syntax error when setting
7917 `GRUB_PRELOAD_MODULES'.
7918 Reported by Stephane Chazelas <stephane@artesyncp.com>
7919
1977517d 79202008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7921
7922 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7923 section into account, newer toolchains generate unique build ids
7924 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7925 we want build ids to be preserved
1977517d 7926 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7927 far from other sections don't cause the raw binary images grow
7928 size
7929
bfb1f1a2 79302008-04-15 Robert Millan <rmh@aybabtu.com>
7931
7932 * disk/lvm.c: Update copyright year.
7933 * kern/misc.c: Likewise.
7934
01979850 79352008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7936
7937 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7938 there is no memory left for physical volume name.
01979850 7939
0a1150e2 79402008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7941
7942 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7943 volume name mapping to support bigger than 9 character names properly.
7944
82ead3fe 79452008-04-13 Robert Millan <rmh@aybabtu.com>
7946
7947 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7948 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7949
e54a72f5 79502008-04-13 Christian Franke <franke@computer.org>
7951
7952 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7953 to create a floppy emulation boot CD when non emulation mode
7954 does not work.
7955 Enable Joliet CD filesystem extension.
7956
9fe86034 79572008-04-13 Robert Millan <rmh@aybabtu.com>
7958
7959 * kern/misc.c (grub_strncat): Fix off-by-one error.
7960 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7961
7962 * kern/env.c (grub_env_context_close): Clear current context, not
7963 previous one.
7964 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7965
7966 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7967
7ceeee39 79682008-04-13 Robert Millan <rmh@aybabtu.com>
7969
7970 Improve robustness when handling LVM.
7971
7972 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7973 (and leave `*p' unmodified).
7ceeee39 7974 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7975 through it.
7976 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7977 iterating through it.
7978 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7979 through it.
fe6b695a 7980 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7981 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7982 Don't assume `vg->pvs != NULL' when iterating through it.
7983
58cd3d85 79842008-04-13 Robert Millan <rmh@aybabtu.com>
7985
7986 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7987 * genmk.rb (partmap): New variable.
7988 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7989 (#{partmap}): New target rule.
7990 * genpartmaplist.sh: New file.
7991 * Makefile.in (pkglib_DATA): Add partmap.lst.
7992 (partmap.lst): New target rule.
7993 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7994 modules (including all partition maps), instead of preloading them.
7995
78b51059 79962007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7997
7998 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7999 `linux-boot-prober' (if installed) to detect other operating
8000 systems which are installed on the computer and add them to
8001 the boot menu.
8002 * conf/common.rmk: Build and install 30_os-prober.
8003
a91627b4 80042008-04-12 Robert Millan <rmh@aybabtu.com>
8005
8006 * kern/powerpc/ieee1275/init.c: Move from here ...
8007 * kern/ieee1275/init.c: ... to here. Update all users.
8008
8009 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8010 * kern/ieee1275/cmain.c: ... to here. Update all users.
8011
8012 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8013 * kern/ieee1275/openfw.c: ... to here. Update all users.
8014
8015 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8016 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8017
322562ea 80182008-04-10 Pavel Roskin <proski@gnu.org>
8019
8020 * configure.ac: Always use "_cv_" in cache variables for
8021 compatibility with Autoconf 2.62.
8022
a02a73c5 80232008-04-07 Robert Millan <rmh@aybabtu.com>
8024
8025 Revert grub/machine/init.h addition by Pavel (since it breaks on
8026 i386-ieee1275 and others):
8027 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8028 * util/powerpc/ieee1275/misc.c: Likewise.
8029
25c024b1 80302008-04-07 Robert Millan <rmh@aybabtu.com>
8031
8032 * util/grub-probe.c (probe): Improve error message.
8033
3cbd2f98 80342008-04-07 Robert Millan <rmh@aybabtu.com>
8035
8036 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8037 (this prevents the presence of a bogus entry from ruining the whole
8038 thing).
8039
87a297bf 80402008-04-06 Pavel Roskin <proski@gnu.org>
8041
36747a62 8042 * util/biosdisk.c: Include grub/util/biosdisk.h.
8043 * util/grub-fstest.c (execute_command): Make static.
8044 * util/grub-mkdevicemap.c (check_device): Likewise.
8045 * util/i386/pc/misc.c: Include grub/machine/init.h.
8046 * util/powerpc/ieee1275/misc.c: Likewise.
8047 * util/lvm.c: Include grub/util/lvm.h.
8048 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8049 grub/cache.h.
8050 * util/raid.c: Include grub/util/raid.h.
8051 (grub_util_getdiskname): Make static.
8052
87a297bf 8053 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8054 grub_hostfs_fini(), as they are called from grub_init_all() and
8055 grub_fini_all() respectively. This fixes an infinite loop in
8056 grub-fstest due to double registration of hostfs.
8057 Reported by Christian Franke <Christian.Franke@t-online.de>
8058
f6ce7629 80592008-04-05 Pavel Roskin <proski@gnu.org>
8060
8061 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8062 all 8 functions. Otherwise, probe function 0 only.
8063
070e49e4 80642008-04-04 Pavel Roskin <proski@gnu.org>
8065
8b088a4c 8066 * commands/lspci.c (grub_lspci_iter): Print the bus number
8067 correctly.
8068
4f657021 8069 * commands/lspci.c (grub_pci_classes): Fix typos.
8070 (grub_lspci_iter): Don't print func twice. Print vendor ID
8071 before device ID, as it's normally done.
8072
070e49e4 8073 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8074 Fix signedness warnings.
8075 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8076 Likewise.
8077 * util/ieee1275/get_disk_name.c: Include config.h so that
8078 _GNU_SOURCE is defined and getline() is declared. Mark an
8079 unused argument as such. Fix a signedness warning.
8080
ba7328dc 80812008-04-02 Pavel Roskin <proski@gnu.org>
8082
26887f22 8083 * genkernsyms.sh.in: Use more robust assignments for CC and
8084 srcdir. Quote srcdir.
8085 * gensymlist.sh.in: Likewise. Assert at the compile time that
8086 the symbol table is not empty.
8087
ba7328dc 8088 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8089 * fs/cpio.c (grub_cpio_read): Likewise.
8090
0f582c6b 80912008-04-01 Pavel Roskin <proski@gnu.org>
8092
4b6e1995 8093 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8094 * disk/host.c (grub_host_open): Likewise.
8095 * disk/loopback.c (grub_loopback_open): Likewise.
8096 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8097 disk->id as in disk/host.c, not a multi-character constant.
8098
828a2768 8099 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
8100 later is obsolete, potentially dangerous and sets a bad example.
8101 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8102 * util/misc.c (grub_util_get_image_size): Likewise.
8103
2bb4fb47 8104 * disk/loopback.c (options): Improve help for "--partitions".
8105
0f582c6b 8106 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8107 options to align them with the short options, e.g. "echo -e".
8108
a33224e0 81092008-03-31 Bean <bean123ch@gmail.com>
8110
8111 * video/reader/png.c (grub_png_data): New member is_16bit and
8112 image_data.
8113 (grub_png_decode_image_header): Detect 16 bit png image.
8114 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8115 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8116 (grub_video_reader_png): Release memory occupied by image_data.
8117
8118 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8119 4096 bytes.
8120 (grub_nfs_mount): Skip the test for sector per cluster.
8121
8122 * include/grub/ntfs.h (MAX_SPC): Removed.
8123
86cb4f54 81242008-03-31 Bean <bean123ch@gmail.com>
8125
8126 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8127 (grub_probe_SOURCES): Add fs/afs.c.
8128 (grub_fstest_SOURCES): Likewise.
8129 (afs_mod_SOURCES): New variable.
8130 (afs_mod_CFLAGS): Likewise.
8131 (afs_mod_LDFLAGS): Likewise.
8132
8133 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8134 (grub_emu_SOURCES): Likewise.
8135
8136 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8137
8138 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8139
8140 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8141
8142 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8143
8144 * fs/afs.c: New file.
8145
17c74c21 81462008-03-30 Pavel Roskin <proski@gnu.org>
8147
4cb68e89 8148 * disk/host.c: Include grub/misc.h to fix a warning.
8149 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8150 warnings about implicit declarations.
8151
8790bb04 8152 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8153 variable.
8154 * include/grub/i386/loader.h: Change declaration of
8155 grub_linux_boot() to match what grub_loader_set() expects.
8156 * util/getroot.c (grub_guess_root_device): Return const char* to
8157 fix a warning.
8158 * util/grub-probe.c (probe): Fix a warning about uninitialized
8159 abstraction_name variable.
8160 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8161 second argument as unused to fix a warning.
8162
9a3f3296 8163 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8164 missing grub_error() call.
8165
0ecef90d 8166 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8167 2.60 and newer uses it to define datadir.
8168
0bf6d401 8169 * commands/sleep.c: Fix warning about implicit declaration.
8170 * disk/memdisk.c: Likewise.
8171 * loader/aout.c: Likewise.
8172 * loader/i386/bsd_normal.c: Likewise.
8173 * util/grub-probe.c: Likewise.
8174
7cdacf97 8175 * commands/i386/cpuid.c (has_longmode): Make static.
8176 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8177 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8178
17c74c21 8179 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8180 GDT. This is more robust, as %ds can change.
8181 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8182 calling real_to_prot().
8183 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8184
80a3e68b 81852008-03-28 Pavel Roskin <proski@gnu.org>
8186
8187 * kern/i386/pc/startup.S: Assert that uncompressed functions
8188 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8189 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8190 code, as they push parts of the code (error handlers) beyond
8191 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8192 code as correctness and size.
8193
77bcd272 81942008-03-28 Pavel Roskin <proski@gnu.org>
8195
8196 * kern/i386/pc/startup.S
8197 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8198 data block address to the real mode, keep offset minimal. This
8199 works around a bug in AWARD BIOS on old Athlon systems, which
8200 makes CD detection hang.
8201
c5dfd43b 82022008-03-26 Pavel Roskin <proski@gnu.org>
8203
8204 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8205 const.
8206 * include/grub/normal.h: Add grub_parse_color_name_pair()
8207 declaration.
8208
bf962df2 82092008-03-24 Bean <bean123ch@gmail.com>
8210
8211 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8212 (cd_count): Removed.
8213 (cd_drive): New variable.
8214 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8215 (grub_biosdisk_call_hook): Likewise.
8216 (grub_biosdisk_iterate): Change cdrom detection method.
8217 (grub_biosdisk_open): Replace cd_start with cd_drive.
8218 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8219 detect cdrom device.
8220
8221 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8222 Removed.
8223 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8224 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8225 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8226 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8227 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8228 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8229 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8230 (grub_biosdisk_cdrp): New structure.
8231 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8232
8233 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8234
8235 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8236 device.
8237
8238 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8239 New function.
8240
68e7fc7a 82412008-03-20 Robert Millan <rmh@aybabtu.com>
8242
8243 Remove 2 TiB limit in ata.mod.
8244 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8245 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8246 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8247 grub_uint64_t instead of grub_uint32_t.
8248
38ad2cf5 82492008-03-05 Bean <bean123ch@gmail.com>
8250
8251 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8252 (grub_multiboot): Set boot device.
8253
8254 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8255
2b89344e 82562008-03-02 Bean <bean123ch@gmail.com>
8257
8258 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8259 symlink_buffer.
8260
87a95d1f 82612008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8262
8263 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8264 texinfo.tex.
8265
8266 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8267 modified.
8268
8269 * docs/fdl.texi: New file.
f19dbdb7 8270
87a95d1f 8271 * docs/mdate-sh: New file. Copied from gnulib.
8272 * docs/texinfo.tex: Likewise.
8273
8274 * config.guess: Updated from gnulib.
8275 * install-sh: Likewise.
8276
7dc15d8e 82772008-02-28 Robert Millan <rmh@aybabtu.com>
8278
8279 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8280 (aout_mod_SOURCES): New variable.
8281 (aout_mod_CFLAGS): Likewise.
8282 (aout_mod_LDFLAGS): Likewise.
8283
8284 * conf/i386-ieee1275.rmk: Likewise.
8285
b00ab696 82862008-02-28 Robert Millan <rmh@aybabtu.com>
8287
8288 * util/update-grub.in: Reorganise terminal validity check. Accept
8289 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8290 Based on suggestion by Franklin PIAT.
8291
79ca2d78 82922008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8293
8294 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8295 function.
8296 * util/getroot.c (grub_util_check_block_device): New function that
8297 returns the given argument if it is a block device and returns NULL else.
8298 * util/grub-probe.c (argument_is_device): New variable.
8299 (probe): Promote device_name from a variable to an argument. Receive
8300 device_name from grub_util_check_block_device() if path is NULL and from
8301 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 8302 (options): Introduce new parameter '-d, --device'.
79ca2d78 8303 (main): Add description of the new parameter to the help screen.
8304 Rename path variable to argument. Set argument_is_device if the '-d'
8305 option is given. Pass argument to probe() depending on
8306 argument_is_device.
8307
0d16e571 83082008-02-24 Bean <bean123ch@gmail.com>
8309
8310 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8311 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8312 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8313 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8314 (GRUB_ISO9660_VOLDESC_END): Likewise.
8315 (grub_iso9660_primary_voldesc): New member escape.
8316 (grub_iso9660_data): New member joliet.
8317 (grub_iso9660_convert_string): New function.
8318 (grub_iso9660_mount): Detect joliet extension.
8319 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8320 (grub_iso9660_iso9660_label): Likewise.
8321
8322 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8323 (grub_setup_SOURCES): Add fs/udf.c.
8324 (grub_fstest_SOURCES): Likewise.
8325 (udf_mod_SOURCES): New variable.
8326 (udf_mod_CFLAGS): Likewise.
8327 (udf_mod_LDFLAGS): Likewise.
8328
8329 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8330 (grub_emu_SOURCES): Likewise.
8331
8332 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8333
8334 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8335
8336 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8337
8338 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8339
8340 * fs/udf.c: New file.
8341
8a594a17 83422008-02-24 Robert Millan <rmh@aybabtu.com>
8343
8344 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8345 (normal/lexer.c_DEPENDENCIES): New variables.
8346 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8347 (normal/lexer.c_DEPENDENCIES): Likewise.
8348 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8349 (normal/lexer.c_DEPENDENCIES): Likewise.
8350 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8351 (normal/lexer.c_DEPENDENCIES): Likewise.
8352 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8353 (normal/lexer.c_DEPENDENCIES): Likewise.
8354 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8355 (normal/lexer.c_DEPENDENCIES): Likewise.
8356
2dc33c03 83572008-02-23 Robert Millan <rmh@aybabtu.com>
8358
8359 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8360 since they were intended to be in hex. This didn't break previously
8361 because of a bug in gpt_partition_map_iterate() (see below).
8362
8363 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8364 when checking the validity of GPT header.
8365 Remove `partno', since it always provides the same information as `i'.
8366
f6f4cfb0 83672008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8368
8369 * include/grub/efi/time.h: Fix a wrong comment.
8370
79ff665f 83712008-02-19 Pavel Roskin <proski@gnu.org>
8372
8373 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8374 message.
8375
d38e24c2 83762008-02-19 Bean <bean123ch@gmail.com>
8377
8378 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8379 (aout_mod_SOURCES): New variable.
8380 (aout_mod_CFLAGS): Likewise.
8381 (aout_mod_LDFLAGS): Likewise.
8382 (_bsd_mod_SOURCES): New variable.
8383 (_bsd_mod_CFLAGS): Likewise.
8384 (_bsd_mod_LDFLAGS): Likewise.
8385 (bsd_mod_SOURCES): New variable.
8386 (bsd_mod_CFLAGS): Likewise.
8387 (bsd_mod_LDFLAGS): Likewise.
8388
8389 * include/grub/aout.h: New file.
8390
8391 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8392
8393 * include/grub/i386/bsd.h: New file.
8394
8395 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8396 to make it public.
8397
8398 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8399 function is called, so that it's possible to change it inside the hook.
8400 (grub_elf64_load): Likewise.
8401 (grub_elf_file): Don't close the file if elf header is not found.
8402 (grub_elf_close): Close the file if grub_elf_file fails (The new
8403 grub_elf_file won't close it).
8404 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8405 (grub_elf64_size): Likewise.
8406
8407 * kern/i386/loader.S (grub_unix_real_boot): New function.
8408
8409 * loader/aout.c: New file.
8410
8411 * loader/i386/bsd.c: New file.
8412
8413 * loader/i386/bsd_normal.c: New file.
8414
8415 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8416
8417 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 8418 can test other formats.
d38e24c2 8419
b93bdb0f 84202008-02-19 Robert Millan <rmh@aybabtu.com>
8421
8422 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8423 (grub_gpt_partition_type_empty): Redefine with macro from
8424 `<grub/gpt_partition.h>'.
8425 (gpt_partition_map_iterate): Adjust partition type comparison.
8426
8427 Export `entry' as partmap-specific `part.data' struct.
8428 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8429
8430 * include/grub/gpt_partition.h (grub_gpt_header)
8431 (grub_gpt_partentry): ... to here (new file).
8432
8433 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8434
8435 (grub_gpt_partition_type_bios_boot): New const variable, defined
8436 with macro from `<grub/gpt_partition.h>'.
8437
8438 (setup): Replace `first_start' with `embed_region', which keeps
8439 track of the embed region (and is partmap-agnostic).
8440
8441 Replace find_first_partition_start() with find_usable_region(),
8442 which finds a usable region for embedding using partmap-specific
8443 knowledge (supports PC/MSDOS and GPT).
8444
8445 Fix all assumptions that the embed region start at sector 1, using
8446 `embed_region.start' from now on. Similarly, use `embed_region.end'
8447 rather than `first_start' to calculate available size.
8448
8449 In grub_util_info() message, replace "into after the MBR" with an
8450 indication of the specific sector our embed region starts at.
8451
66cb40f6 84522008-02-19 Robert Millan <rmh@aybabtu.com>
8453
8454 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8455 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8456 `commands/reboot.c'.
8457 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8458 (halt_mod_SOURCES): Likewise.
8459 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8460 (halt_mod_SOURCES): Likewise.
8461
b7202015 84622008-02-17 Christian Franke <franke@computer.org>
8463
8464 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8465
32b0fc49 84662008-02-17 Robert Millan <rmh@aybabtu.com>
8467
8468 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8469 set `first_start' to 0 for non-PC/MSDOS partition maps.
8470
aca63502 84712008-02-16 Robert Millan <rmh@aybabtu.com>
8472
8473 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8474 do not assume partition map is PC/MSDOS before performing checks that
8475 are specific to that layout.
8476
0de8be86 84772008-02-13 Robert Millan <rmh@aybabtu.com>
8478
8479 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8480 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8481 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8482
c3db8364 84832008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8484
8485 * configure.ac: Only a cosmetic change on the handling of
8486 -fno-stack-protector.
8487
f714229e 84882008-02-12 Alexandre Boeglin <alex@boeglin.org>
8489
c3db8364 8490 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8491 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8492 reboot.c.
f714229e 8493 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8494 (halt_mod_SOURCES): New variable.
8495 (halt_mod_CFLAGS): Likewise.
8496 (halt_mod_LDFLAGS): Likewise.
8497 (reboot_mod_SOURCES): Likewise.
8498 (reboot_mod_CFLAGS): Likewise.
8499 (reboot_mod_LDFLAGS): Likewise.
8500
c3db8364 8501 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8502 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8503 reboot.c.
f714229e 8504 (halt_mod_SOURCES): Likewise.
8505 (reboot_mod_SOURCES): Likewise.
8506
c3db8364 8507 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8508 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 8509 (reboot_mod_SOURCES): Likewise.
8510
8511 * commands/i386/pc/reboot.c: merge this file ...
8512
8513 * commands/ieee1275/reboot.c: ... and this file ...
8514
8515 * commands/reboot.c: ... to this file.
c3db8364 8516 Add some precompiler directive to include the correct header for
8517 each machine.
f714229e 8518
8519 * commands/ieee1275/halt.c: move this file ...
8520
8521 * commands/halt.c: ... to here.
c3db8364 8522 Add some precompiler directive to include the correct header for
8523 each machine.
f714229e 8524
8525 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8526 (grub_halt): Likewise.
8527
8528 * kern/efi/efi.c (grub_reboot): New function.
8529 (grub_halt): Likewise.
8530
c74493e0 85312008-02-12 Robert Millan <rmh@aybabtu.com>
8532
8533 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8534 /dev (like it is done for /dev/mapper). This doesn't provide support
8535 for EVMS, but at least it is now easy to identify the problem when it
8536 arises.
8537
d0db4b04 85382008-02-11 Robert Millan <rmh@aybabtu.com>
8539
8540 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8541 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8542 comparing it with -1, not 0.
8543
bf748642 85442008-02-10 Robert Millan <rmh@aybabtu.com>
8545
8546 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8547 `disk/lvm.c'.
8548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8549 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8550
8551 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8552 `disk/lvm.c' to the end of the list.
8553 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8554 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8555
b5db202a 85562008-02-10 Robert Millan <rmh@aybabtu.com>
8557
8558 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8559 grub_print_error() instead. This will let user know why we're entering
8560 rescue mode.
8561 Based on suggestions from Sam Morris.
8562
83abee31 85632008-02-10 Alexandre Boeglin <alex@boeglin.org>
8564
8565 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8566 on remaining N args, instead of "--" arg N times.
8567
78d5a08b 85682008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8569
8570 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8571 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8572 pattern for unknown glyphs.
8573
68807e5f 85742008-02-09 Robert Millan <rmh@aybabtu.com>
8575
8576 * configure.ac: Probe for `help2man'.
8577 * Makefile.in (builddir): New variable.
8578 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8579 or otherwise add a few flags/options to it.
8580 (install-local): For every executable utility or script that is
8581 installed, invoke $(HELP2MAN) to install a manpage based on --help
8582 output.
8583
8584 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8585 that it doesn't prevent --help from working in build tree.
8586
8587 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8588 with `bug-grub@gnu.org'.
8589 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8590 * util/update-grub.in (usage): New function.
8591 Implement proper argument check, with support for --help and --version
8592 (as well as existing -y).
8593
85942008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 8595
8596 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8597 avoid overwriting previous output.
8598 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8599
c1962162 86002008-02-09 Robert Millan <rmh@aybabtu.com>
8601
8602 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8603 drawing the menu.
8604
3dac2e3f 86052008-02-09 Robert Millan <rmh@aybabtu.com>
8606
8607 * commands/sleep.c: New file.
8608 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8609 (sleep_mod_SOURCES): New variable.
8610 (sleep_mod_CFLAGS): Likewise.
8611 (sleep_mod_LDFLAGS): Likewise.
8612
7a634e08 86132008-02-09 Robert Millan <rmh@aybabtu.com>
8614
8615 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8616 situations in which we can deduce the RAID size and the superblock
8617 doesn't match it.
8618
b92f0c18 86192008-02-09 Robert Millan <rmh@aybabtu.com>
8620
8621 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8622 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8623 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8624
8625 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8626 and return a grub_diskmemberlist_t composed of physical array members.
8627 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8628
8629 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8630 prototype.
8631 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8632 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8633 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8634
8635 * util/grub-probe.c (probe): Move partmap probing code from here ...
8636 (probe_partmap): ... to here.
8637 (probe): Use probe_partmap() once for the disk we're probing, and
8638 additionally, when such disk contains a memberlist() struct member,
8639 once for each disk that is contained in the structure returned by
8640 memberlist().
8641
91a4bf68 86422008-02-09 Robert Millan <rmh@aybabtu.com>
8643
8644 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8645 environment variable to 'all' in order to obtain debug output from
8646 non-util/ code.
8647 * util/i386/pc/grub-setup.c (main): Likewise.
8648
a96f9caa 86492008-02-08 Robert Millan <rmh@aybabtu.com>
8650
8651 * disk/raid.c (grub_raid_scan_device): Check for
8652 `array->device[sb.this_disk.number]' rather than for
8653 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 8654 guaranteed to be accessible.
a96f9caa 8655
b37a9222 86562008-02-08 Robert Millan <rmh@aybabtu.com>
8657
8658 * disk/raid.c: Update copyright.
8659 * fs/cpio.c: Likewise.
8660 * include/grub/raid.h: Likewise.
8661 * loader/i386/pc/multiboot.c: Likewise.
8662 * util/hostfs.c: Likewise.
8663
5626aee1 86642008-02-08 Robert Millan <rmh@aybabtu.com>
8665
8666 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8667 to a grub_disk_t array.
8668 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8669 `device[x]'.
8670 (grub_raid_scan_device): Replace `device[x].name' accesses with
8671 `device[x]->name'. Simplify initialization of `array->device[x]'.
8672
554f0187 86732008-02-08 Robert Millan <rmh@aybabtu.com>
8674
8675 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8676 grub_dprintf() calls.
8677 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8678 error message.
8679
1ec8425d 86802008-02-07 Christian Franke <franke@computer.org>
8681
8682 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8683 instead of fseek and ftell to support large files.
8684 (grub_hostfs_read): Likewise.
8685
f2156fda 86862008-02-07 Robert Millan <rmh@aybabtu.com>
8687
8688 Patch from Jeroen Dekkers.
8689 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 8690 failure, since successfully reading all array members might not be
f2156fda 8691 required.
8692
9216e0e7 86932008-02-06 Robert Millan <rmh@aybabtu.com>
8694
8695 * util/grub-probe.c (probe): Simplify partmap probing (with the
8696 assumption that the first word up to the underscore equals to
8697 the module name).
8698
b0dfd29a 86992008-02-06 Christian Franke <franke@computer.org>
8700
8701 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8702 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8703 last block of a cpio or tar stream.
8704 Check for "TRAILER!!!" instead of any empty data
8705 block to detect last block of a cpio stream.
8706 (grub_cpio_dir): Fix constness of variable np.
8707 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8708 cpio or tar trailer is detected. This fixes a crash
8709 on open of a non existing file.
8710
c32865bf 87112008-02-05 Bean <bean123ch@gmail.com>
8712
8713 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8714 address of entry.
8715 (grub_multiboot_load_elf64): Likewise.
8716 (grub_multiboot): Initialize mbi structure.
8717
8718 * util/grub-fstest.c: Don't include unused header file script.h.
8719
fe6b695a 8720 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 8721 of file.
8722 (grub_fstest_SOURCES): Likewise.
8723
409480b7 87242008-02-05 Robert Millan <rmh@aybabtu.com>
8725
8726 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8727 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8728 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8729 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8730
8731 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8732 (translation_table): Replace hardcoded values with macros
8733 provided by `<grub/term.h>'.
8734
8735 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8736 (keyboard_map): Correct/add a few values, with macros provided
8737 by `<grub/term.h>'.
8738 (keyboard_map_shift): Zero values that don't differ from their
8739 `keyboard_map' equivalents.
8740 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8741 Discard the second scan code that is always sent by Caps lock.
8742 Only use `keyboard_map_shift' when it provides a non-zero value,
8743 otherwise fallback to `keyboard_map'.
8744
99fadbaa 87452008-02-04 Bean <bean123ch@gmail.com>
8746
8747 * Makefile.in (enable_grub_fstest): New variable.
8748
8749 * conf/common.rmk (grub_fstest_init.lst): New rule.
8750 (grub_fstest_init.h): Likewise.
8751 (grub_fstest_init.c): Likewise.
8752 (util/grub-fstest.c_DEPENDENCIES): New variable.
8753 (grub_fstest_SOURCES): Likewise.
8754
8755 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8756
8757 * util/grub-fstest.c: New file.
8758
bf567c50 87592008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8760
8761 Make grub-setup handle a separate root device.
f19dbdb7 8762
bf567c50 8763 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8764 so that the root device can be compared with the destination
8765 device.
8766 When embedding the core image, if the root and destination devices
8767 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8768 0xFF.
8769 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8770
9be6b98b 87712008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8772
8773 Add support for having a grub directory in a different drive. This
8774 is still only the data handling part.
f19dbdb7 8775
9be6b98b 8776 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8777 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8778 (grub_root_drive): New variable.
8779
8780 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8781 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8782 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8783 as it was.
8784
8785 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8786
8787 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8788 macro.
8789 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8790
8791 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8792 is bogus, because PXE booting does not specify any drive
8793 correctly.
8794
8795 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8796 am not sure if this is really correct.
8797
8798 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8799 is always identical to the boot drive when booting from a CD.
8800
8801 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8802 longer.
8803 (root_drive): New variable.
8804 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8805 (setup_sectors): Push %dx right after popping it, because %dh will
8806 be modified later.
8807 (copy_buffer): Restore %dx.
8808
e0ca0677 88092008-02-03 Robert Millan <rmh@aybabtu.com>
8810
8811 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8812 use `cdboot.img' for cdrom images.
8813
3b3f6629 88142008-02-03 Robert Millan <rmh@aybabtu.com>
8815
8816 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8817 only setup gfxterm when `font' command has succeeded.
8818
d42b3672 88192008-02-03 Robert Millan <rmh@aybabtu.com>
8820
8821 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8822 (grub_rescue_cmd_multiboot_loader)
8823 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8824
fa370ea6 88252008-02-03 Pavel Roskin <proski@gnu.org>
8826
e0c5dacb 8827 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8828 %edx and %esi from stack only after grub_gate_a20() is called.
8829 grub_gate_a20() clobbers %edx.
8830
f2a76e1d 88312008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8832
8833 * configure.ac (AC_INIT): Bumped to 1.96.
8834
8835 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8836 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8837 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8838 video/readers/png.c.
8839
90fd32d1 88402008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8841
8842 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8843 (cdboot_img_SOURCES): New variable.
8844 (cdboot_img_ASFLAGS): New variable.
8845 (cdboot_img_LDFLAGS): New variable.
8846
8847 * boot/i386/pc/cdboot.S: New file.
8848
8849 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8850 (cd_count): Likewise.
8851 (grub_biosdisk_get_drive): Add support for cd device.
8852 (grub_biosdisk_call_hook): Likewise.
8853 (grub_biosdisk_iterate): Likewise.
8854 (grub_biosdisk_open): Likewise.
8855 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8856 (grub_biosdisk_rw): Support reading from cd device.
8857 (GRUB_MOD_INIT): Iterate cd devices.
8858
8859 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8860 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8861 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8862
8863 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8864
4020aa53 88652008-02-02 Robert Millan <rmh@aybabtu.com>
8866
8867 * commands/read.c: New file.
8868 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8869 (read_mod_SOURCES): New variable.
8870 (read_mod_CFLAGS): Likewise.
8871 (read_mod_LDFLAGS): Likewise.
8872
e03a1132 88732008-02-02 Robert Millan <rmh@aybabtu.com>
8874
8875 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8876 determining whether menu has to be displayed.
8877
58c69220 88782008-02-02 Marco Gerards <marco@gnu.org>
8879
8880 * bus/pci.c: New file.
8881
8882 * include/grub/pci.h: Likewise.
8883
8884 * include/grub/i386/pc/pci.h: Likewise.
8885
8886 * commands/lspci.c: Likewise.
8887
8888 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8889 `lspci.mod'.
8890 (pci_mod_SOURCES): New variable.
8891 (pci_mod_CFLAGS): Likewise.
8892 (pci_mod_LDFLAGS): Likewise.
8893 (lspci_mod_SOURCES): Likewise.
8894 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8895 (lspci_mod_LDFLAGS): Likewise.
58c69220 8896
c004e1b4 88972008-02-02 Bean <bean123ch@gmail.com>
8898
8899 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8900 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8901
8902 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8903 (grub_xfs_btree_node): New structure.
8904 (grub_xfs_btree_root): New structure.
8905 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8906 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8907 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8908 (GRUB_XFS_EXTENT_SIZE): Likewise.
8909 (grub_xfs_read_block): Support btree format type.
8910 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8911 Use directory block as basic unit.
8912
8913 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8914
8915 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8916 __attribute__ ((__regparm__ (1))).
8917
f95562bf 89182008-02-01 Robert Millan <rmh@aybabtu.com>
8919
8920 Correct a mistake in previous commit.
8921
8922 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8923 top.
8924 (normal/command.c_DEPENDENCIES): New variable.
8925
7d31f41f 89262008-02-01 Robert Millan <rmh@aybabtu.com>
8927
8928 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8929 top.
8930 (normal/command.c_DEPENDENCIES): New variable.
8931 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8932 * conf/i386-ieee1275.rmk: Likewise.
8933 * conf/i386-linuxbios.rmk: Likewise.
8934 * conf/i386-pc.rmk: Likewise.
8935 * conf/sparc64-ieee1275.rmk: Likewise.
8936 * conf/powerpc-ieee1275.rmk: Likewise.
8937 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8938
8939 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8940
60b6be74 89412008-02-01 Robert Millan <rmh@aybabtu.com>
8942
8943 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8944 call at beginning of function.
8945
078522ab 89462008-01-31 Pavel Roskin <proski@gnu.org>
8947
8948 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8949 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8950 (grub_mkrescue_SOURCES): Likewise.
078522ab 8951 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8952
ccaa8a5f 89532008-01-30 Robert Millan <rmh@aybabtu.com>
8954
8955 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8956 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8957 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8958 (grub_probe_SOURCES): ... to here.
8959
8960 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8961 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8962 * conf/i386-ieee1275.rmk: Likewise.
8963 * conf/i386-linuxbios.rmk: Likewise.
8964 * conf/powerpc-ieee1275.rmk: Likewise.
8965
ae5a9cd7 89662008-01-30 Tristan Gingold <gingold@free.fr>
8967
8968 * kern/rescue.c: Silently accept empty lines.
8969
70bc2ef2 89702008-01-29 Bean <bean123ch@gmail.com>
8971
8972 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8973 (real_code_2): Code cleanup and change comment style.
8974 (move_memory): Avoid using 32-bit address mode.
8975
6a4d50ea 89762008-01-29 Bean <bean123ch@gmail.com>
8977
8978 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8979 (png_mod_SOURCES): New variable.
8980 (png_mod_CFLAGS): Likewise.
8981 (png_mod_LDFLAGS): Likewise.
8982
8983 * video/readers/png.c: New file.
8984
11cc30ac 89852008-01-28 Robert Millan <rmh@aybabtu.com>
8986
8987 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8988 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8989 `ifndef GRUB_MOD_GAP' hack.
8990 * util/elf/grub-mkimage.c (add_segments): Likewise.
8991
3abc589f 89922008-01-27 Robert Millan <rmh@aybabtu.com>
8993
8994 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8995 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8996 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8997
e1907778 89982008-01-27 Robert Millan <rmh@aybabtu.com>
8999
9000 Get grub-emu to build again (including parallel builds).
9001
9002 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9003 Split into ...
9004 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9005 (normal/execute.c_DEPENDENCIES): ... this, ...
9006 (grub-emu_DEPENDENCIES): ... and this.
9007
9008 * conf/i386-efi.rmk: Likewise.
9009 * conf/i386-linuxbios.rmk: Likewise.
9010 * conf/i386-ieee1275.rmk: Likewise.
9011 * conf/powerpc-ieee1275.rmk: Likewise.
9012 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9013
2216b101 90142008-01-27 Robert Millan <rmh@aybabtu.com>
9015
9016 * NEWS: Add a few items.
9017
f75172d9 90182008-01-27 Robert Millan <rmh@aybabtu.com>
9019
9020 Fix parallel builds with grub-emu. Based on earlier commit for
9021 grub-probe and grub-setup.
9022
9023 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9024 (util/grub-emu.c_DEPENDENCIES): ... this.
9025 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9026 (util/grub-emu.c_DEPENDENCIES): ... this.
9027 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9028 (util/grub-emu.c_DEPENDENCIES): ... this.
9029 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9030 (util/grub-emu.c_DEPENDENCIES): ... this.
9031 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9032 (util/grub-emu.c_DEPENDENCIES): ... this.
9033
3f51de77 90342008-01-27 Pavel Roskin <proski@gnu.org>
9035
9036 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9037 to create a gap between _end and the modules added to the image
9038 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9039 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9040 * util/elf/grub-mkimage.c (add_segments): Likewise.
9041
2033f53e 90422008-01-26 Pavel Roskin <proski@gnu.org>
9043
9044 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9045 just return an error.
9046
22da1f6f 90472008-01-26 Bean <bean123ch@gmail.com>
9048
9049 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9050 (grub_reiserfs_get_item): Save offset of the next item.
9051 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9052
2a9525e6 90532008-01-25 Robert Millan <rmh@aybabtu.com>
9054
9055 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9056 make all filesystem sources appear together (possibly fixing omissions
9057 while at it).
9058 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9059 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9060 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9062
9063 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9064 add `kern/file.c'.
9065 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9066 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9067 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9068 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9069
9070 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9071 (probe): Add a sanity check to make sure of our ability to read
9072 requested files when probing for filesystem type.
9073
9074 * genmk.rb: Update copyright year (2007).
9075
9076 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9077 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9078 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9079 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9080 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9081 : Remove function prototypes.
9082
b95f71b5 90832008-01-25 Robert Millan <rmh@aybabtu.com>
9084
9085 Revert my previous commits (based on wrong assumption of how grub_errno
9086 works).
9087
fe6b695a 9088 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 9089 * kern/file.c (grub_file_open): Likewise.
9090
d08bbb49 90912008-01-24 Pavel Roskin <proski@gnu.org>
9092
9093 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9094 that hang if GRUB tries to setup colors.
9095 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9096 colors for firmwares that don't support it.
9097 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9098 Recognize Open Hack'Ware, set flags to work around its
9099 limitations.
9100
605e36ed 91012008-01-24 Robert Millan <rmh@aybabtu.com>
9102
9103 * kern/file.c (grub_file_open): Do not account previous failures of
9104 unrelated functions when grub_errno is checked for.
9105 Reported by Oleg Strikov.
9106
bac332a1 91072008-01-24 Bean <bean123ch@gmail.com>
9108
9109 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9110 (grub_ufs_sblock): New member volume name.
9111 (grub_ufs_find_file): Fix string copy bug.
9112 (grub_ufs_label): Implement this function properly.
9113
9114 * fs/hfs.c (grub_hfs_cnid_type): New enum.
9115 (grub_hfs_iterate_records): Use the correct file number for extents
9116 and catalog file. Fix problem in next index calculation.
9117 (grub_hfs_find_node): Replace recursive function call with loop.
9118 (grub_hfs_iterate_dir): Replace recursive function call with loop.
9119
15c80c09 91202008-01-23 Robert Millan <rmh@aybabtu.com>
9121
9122 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9123 `<grub/symbol.h>' and `<grub/multiboot.h>'.
9124 (grub_multiboot2_real_boot): New function prototype.
9125
9126 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9127 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9128
9129 * kern/i386/ieee1275/init.c (grub_os_area_addr)
9130 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9131
305338fd 91322008-01-23 Robert Millan <rmh@aybabtu.com>
9133
9134 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9135 #ifdef'ed out grub_printf().
9136
3ea52685 91372008-01-23 Robert Millan <rmh@aybabtu.com>
9138
9139 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9140 grub_dprintf calls, since they make "debug=all" mode unusable.
9141 (grub_console_checkkey): Likewise.
9142
5882ae4b 91432008-01-23 Robert Millan <rmh@aybabtu.com>
9144
9145 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9146 `term/i386/pc/at_keyboard.c'.
9147 (pkglib_MODULES): Add `serial.mod'.
9148 (serial_mod_SOURCES): New variable.
9149 (serial_mod_CFLAGS): Likewise.
9150 (serial_mod_LDFLAGS): Likewise.
9151
9152 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9153 `<grub/powerpc/ieee1275/console.h>'.
9154 (grub_keyboard_controller_init): New function prototype.
9155 (grub_console_checkkey): Likewise.
9156 (grub_console_getkey): Likewise.
9157
9158 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9159 keyboard on i386.
9160
9161 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9162 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9163
06ab5303 91642008-01-23 Robert Millan <rmh@aybabtu.com>
9165
9166 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9167 present, "(memdisk)/boot/grub" becomes the default prefix.
9168
9169 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9170 a memdisk tarball with all the modules. Add --overlay=DIR option that
9171 allows users to overlay additional files into the image.
9172
dbb475a4 91732008-01-23 Robert Millan <rmh@aybabtu.com>
9174
9175 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9176 and `machine/memory.h'.
9177 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9178 (_multiboot_mod_SOURCES): New variable.
9179 (_multiboot_mod_CFLAGS): Likewise.
9180 (_multiboot_mod_LDFLAGS): Likewise.
9181 (multiboot_mod_SOURCES): Likewise.
9182 (multiboot_mod_CFLAGS): Likewise.
9183 (multiboot_mod_LDFLAGS): Likewise.
9184
9185 * include/grub/i386/ieee1275/loader.h: New file.
9186
9187 * include/grub/i386/ieee1275/machine.h: Likewise.
9188
9189 * include/grub/i386/ieee1275/memory.h: Likewise.
9190
9191 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9192 variable declaration.
9193 (grub_os_area_size): Likewise.
9194
9195 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9196 (grub_lower_mem, grub_upper_mem): New variables.
9197 (grub_stop_floppy): New function (just to make
9198 grub_multiboot2_real_boot() happy).
9199
9200 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9201 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9202 (grub_stop): New function.
9203 Include `"../realmode.S"' and `"../loader.S"'.
9204
9205 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9206 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9207
9208 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9209 rely on grub_multiboot2_real_boot() for final boot.
9210
25638629 92112008-01-22 Robert Millan <rmh@aybabtu.com>
9212
9213 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9214 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9215 device that doesn't look like an SD card.
9216 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9217 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9218 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9219 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9220 found.
9221
9dad816d 92222008-01-22 Robert Millan <rmh@aybabtu.com>
9223
9224 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9225 avoid claiming over our own code.
9226
34842f2d 92272008-01-22 Bean <bean123ch@gmail.com>
9228
9229 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9230 (jpeg_mod_SOURCES): New variable.
9231 (jpeg_mod_CFLAGS): Likewise.
9232 (jpeg_mod_LDFLAGS): Likewise.
9233
9234 * video/readers/jpeg.c : New file.
9235
44023a28 92362008-01-22 Bean <bean123ch@gmail.com>
9237
9238 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9239 there are no more items.
9240
bc2d8ac6 92412008-01-21 Robert Millan <rmh@aybabtu.com>
9242
9243 * kern/mm.c (grub_mm_init_region): Improve debug message.
9244
261bd4bc 92452008-01-21 Robert Millan <rmh@aybabtu.com>
9246
9247 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9248 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9249 address.
9250 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9251 a C macro.
9252 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9253 Indicates start of upper memory.
9254 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9255 (generate_image): Abort when image size is big enough to corrupt
9256 upper memory.
9257
9258 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9259 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9260 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9261 instead of hardcoding 0xA0000.
9262 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9263 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9264 instead of hardcoding 0xA0000.
9265
f970b55e 92662008-01-21 Robert Millan <rmh@aybabtu.com>
9267
9268 * disk/memdisk.c (memdisk_size): New variable.
9269 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9270 `memdisk_size'.
9271 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9272 image to dynamic memory.
9273 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9274 `memdisk_size'. Free memdisk block.
9275
1a8b0526 92762008-01-21 Robert Millan <rmh@aybabtu.com>
9277
9278 Fix detection of very small filesystems (like tar).
9279
9280 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9281 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9282 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9283 a problem with this disk).
9284
6e9b4aab 92852008-01-21 Robert Millan <rmh@aybabtu.com>
9286
9287 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9288 on grub_biosdisk_rw_standard() error.
9289
0d8837b2 92902008-01-21 Robert Millan <rmh@aybabtu.com>
9291
9292 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9293 recent changes.
9294 * kern/elf.c: Likewise.
9295 * kern/ieee1275/ieee1275.c: Likewise.
9296 * kern/powerpc/ieee1275/openfw.c: Likewise.
9297 * term/ieee1275/ofconsole.c: Likewise.
9298
ffd36e34 92992008-01-21 Robert Millan <rmh@aybabtu.com>
9300
9301 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9302
3f0093d0 9303 * include/grub/kernel.h (grub_arch_memdisk_addr)
9304 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 9305
3f0093d0 9306 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9307 (grub_arch_memdisk_size): ... to here.
ffd36e34 9308
6c391b21 93092008-01-21 Robert Millan <rmh@aybabtu.com>
9310
9311 Mostly based on bugfix from Bean.
9312
9313 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9314 attribute with hook() parameter.
9315 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9316 declaration.
9317 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9318 attribute with hook() parameter.
9319 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9320 declaration.
9321
55a581dc 93222008-01-21 Robert Millan <rmh@aybabtu.com>
9323
9324 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9325 (pkglib_MODULES): Add `memdisk.mod'.
9326 (memdisk_mod_SOURCES): New variable.
9327 (memdisk_mod_CFLAGS): Likewise.
9328 (memdisk_mod_LDFLAGS): Likewise.
9329
9330 * disk/memdisk.c: New file.
9331
9332 * include/grub/disk.h (grub_disk_dev_id): Add
9333 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9334
9335 * include/grub/i386/pc/kernel.h
9336 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9337 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9338 (grub_kernel_image_size): New variable declaration.
9339 (grub_total_module_size): Likewise.
9340 (grub_memdisk_image_size): Likewise.
9341
9342 * include/grub/i386/pc/memory.h
9343 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9344
9345 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9346 (grub_arch_memdisk_addr): New variable declaration.
9347 (grub_arch_memdisk_size): Likewise.
9348
9349 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9350 (grub_arch_memdisk_size): Likewise.
9351
9352 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9353 (codestart): Replace hardcoded `0x100000' with
9354 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9355
9356 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9357 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9358 not NULL, append the contents of the file it refers to, at the end of
9359 the compressed kernel image. Initialize `grub_memdisk_image_size'
9360 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9361 (options): Add "memdisk"|'m' option.
9362 (main): Parse --memdisk|-m option, and pass user-provided path as
9363 parameter to generate_image().
9364
3d7f54c9 93652008-01-20 Robert Millan <rmh@aybabtu.com>
9366
9367 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9368 grub_dprintf() calls from here ...
9369 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9370
0bf74728 93712008-01-20 Robert Millan <rmh@aybabtu.com>
9372
9373 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9374
9375 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9376 declaration.
9377 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9378 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9379 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 9380 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 9381 property).
9382 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9383 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9384
33bf70a7 93852008-01-19 Robert Millan <rmh@aybabtu.com>
9386
fe6b695a 9387 Get rid of confusing function (superseded by
33bf70a7 9388 `grub_ieee1275_get_integer_property')
9389 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9390 prototype.
9391 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9392 function.
9393 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9394 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 9395 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 9396
e2da7d26 93972008-01-19 Robert Millan <rmh@aybabtu.com>
9398
9399 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9400 command after "shut-down", since implementations differ on which
9401 the command for halt is.
9402
59f1fd8d 94032008-01-19 Robert Millan <rmh@aybabtu.com>
9404
9405 * include/grub/i386/linuxbios/console.h: Add header protection.
9406 (grub_keyboard_controller_init): New function prototype.
9407 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9408 (KEYBOARD_COMMAND_READ): Likewise.
9409 (KEYBOARD_COMMAND_WRITE): Likewise.
9410 (KEYBOARD_SCANCODE_SET1): Likewise.
9411 (grub_keyboard_controller_write): New function.
9412 (grub_keyboard_controller_read): Likewise.
9413 (grub_keyboard_controller_init): Likewise.
9414
9415 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9416 (grub_console_init): On coreboot/LinuxBIOS, call
9417 grub_keyboard_controller_init().
9418
5f5a7c15 94192008-01-19 Robert Millan <rmh@aybabtu.com>
9420
9421 PowerPC changes provided by Pavel Roskin.
9422
9423 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9424 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9425 don't rely on cmain() doing it.
9426 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9427 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9428
1210e168 94292008-01-16 Robert Millan <rmh@aybabtu.com>
9430
9431 * include/grub/i386/linuxbios/memory.h
9432 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9433 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9434 receive `table_header' as argument. Instead, probe for it in the
9435 known memory ranges where it can be present.
9436 (grub_available_iterate): Do not pass a fixed `table_header' address
9437 to grub_linuxbios_table_iterate().
9438
3d04eab8 94392008-01-15 Robert Millan <rmh@aybabtu.com>
9440
9441 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9442 * conf/i386-ieee1275.rmk: New file.
9443 * include/grub/i386/ieee1275/console.h: Likewise.
9444 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9445 * include/grub/i386/ieee1275/kernel.h: Likewise.
9446 * include/grub/i386/ieee1275/time.h: Likewise.
9447 * kern/i386/ieee1275/init.c: Likewise.
9448 * kern/i386/ieee1275/startup.S: Likewise.
9449
d1bc1b73 94502008-01-15 Robert Millan <rmh@aybabtu.com>
9451
9452 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9453 when pointers are 32-bit (but still do set it to one when they are
9454 64-bit).
9455
66a65807 94562008-01-15 Robert Millan <rmh@aybabtu.com>
9457
9458 * include/grub/ieee1275/ieee1275.h
9459 (grub_ieee1275_get_integer_property): New function prototype.
9460
9461 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9462 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 9463 grub_ieee1275_get_property() to handle endianness.
66a65807 9464
9465 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9466 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 9467 where appropriate.
66a65807 9468 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9469 (grub_map): Likewise.
9470 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9471
a83ccafd 94722008-01-15 Bean <bean123ch@gmail.com>
9473
9474 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9475 (grub_script_execute_cmdline): Reset grub_errno.
9476
9477 * normal/main.c (read_config_file): Reset grub_errno.
9478
9479 * normal/parse.y (script_init): New.
9480 (script): Move function and menuentry here.
9481 (delimiter): New.
9482 (command): Add delimiter at the end of command.
9483 (commands): Adjust to match the new command.
9484 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 9485 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 9486 (if): Use the new commands.
9487
9488 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9489
df6ecfc6 94902008-01-15 Robert Millan <rmh@aybabtu.com>
9491
9492 * normal/menu.c (run_menu): Move timeout message from here ...
9493 (print_timeout): ... to here.
9494 (run_menu): Use print_timeout() once during initial draw to print
9495 the whole message, and again in every clock tick to update only
9496 the number of seconds.
9497
87ae25eb 94982008-01-15 Robert Millan <rmh@aybabtu.com>
9499
9500 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9501 actual size of `available' from grub_ieee1275_get_property(), and
9502 restrict parsing to that bound.
9503
47bf09a4 95042008-01-15 Christian Franke <franke@computer.org>
9505
9506 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9507 (argp_program_version): Remove variable.
9508 (argp_program_bug_address): Likewise.
9509 (options): Convert from struct argp_option to struct option.
9510 (struct arguments): Remove.
9511 (parse_opt): Remove.
9512 (usage): New function.
9513 (main): Replace struct args members by simple variables.
9514 Replace argp_parse() by getopt_long().
9515 Add switch to evaluate options.
9516 Add missing "(...)" around root_dev in prefix string.
9517
c86f1469 95182008-01-14 Robert Millan <rmh@aybabtu.com>
9519
9520 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9521 for grub_ieee1275_exit(), in order to improve portability.
9522
e622c559 95232008-01-14 Robert Millan <rmh@aybabtu.com>
9524
9525 * util/grub.d/10_linux.in (prefix): Define.
9526 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9527
44cb1ec8 95282008-01-13 Pavel Roskin <proski@gnu.org>
9529
9530 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9531 grub_errno if no errors have been detected.
9532
1eb8c802 95332008-01-12 Robert Millan <rmh@aybabtu.com>
9534
9535 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9536 (grub_util_get_dev_abstraction): New function prototype.
9537
9538 * util/getroot.c: Include `<grub/util/getroot.h>'
9539 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9540 (grub_util_get_dev_abstraction): ... here (new function).
9541
9542 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9543 `PRINT_ABSTRACTION'.
9544 (probe): Probe for abstraction type when requested.
9545 (main): Understand `--target=abstraction'.
9546
9547 * util/i386/efi/grub-install.in: Add abstraction module to core
9548 image when it is found to be necessary.
9549 * util/i386/pc/grub-install.in: Likewise.
9550 * util/powerpc/ieee1275/grub-install.in: Likewise.
9551
9552 * util/update-grub_lib.in (font_path): Return system path without
9553 converting to GRUB path.
9554 * util/update-grub.in: Convert system path returned by font_path()
9555 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9556 abstraction module is needed for loading fonts (if any). Export
9557 that as `GRUB_PRELOAD_MODULES'.
9558 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9559 insmod commands).
9560
52bd3de9 95612008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9562
9563 Remove some unused code from reiserfs.
f19dbdb7 9564
52bd3de9 9565 * fs/reiserfs.c (struct grub_reiserfs_key)
9566 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9567 (struct grub_reiserfs_node_body): Removed.
9568 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9569 Likewise.
9570 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9571 Likewise.
9572 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9573 Likewise.
9574 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9575 Likewise.
9576 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9577 Likewise.
9578 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9579 Likewise.
9580 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9581 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9582 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9583
2f80039d 95842008-01-10 Robert Millan <rmh@aybabtu.com>
9585
9586 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9587 Determines if a file is garbage left by packaging systems, etc.
9588 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9589 for processing /etc/grub.d scripts.
9590 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9591 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9592 as a condition for processing Linux images.
9593
87888032 95942008-01-10 Pavel Roskin <proski@gnu.org>
9595
9596 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9597 to compile reiserfs.c on PowerPC.
9598
7e54fced 95992008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 9600
9601 * kern/device.c (grub_device_iterate): Do not abort device iteration
9602 when one of the devices cannot be opened.
9603 * kern/disk.c (grub_disk_open): Do not account previous failures of
9604 unrelated functions when grub_errno is checked for.
9605
5aa541e6 96062008-01-08 Robert Millan <rmh@aybabtu.com>
9607
9608 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9609 `! grub_linux_is_bzimage', change order of address comparison to make
9610 it more intuitive, and improve "too big zImage" error message.
9611
7076340d 96122008-01-08 Robert Millan <rmh@aybabtu.com>
9613
9614 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9615 `$(update-grub_DATA)'.
9616 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9617 targets.
9618
9ca70333 96192008-01-07 Robert Millan <rmh@aybabtu.com>
9620
9621 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9622 which instruction is modified by grub-setup during installation
9623 (since it wasn't obvious by only looking at this file).
9624
38ccf575 96252008-01-07 Robert Millan <rmh@aybabtu.com>
9626
9627 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9628 listing actual TODO items.
9629
f5db4291 96302008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9631
868967cf 9632 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9633 correctly.
9634 (grub_reiserfs_get_key_offset): Likewise.
9635 (grub_reiserfs_set_key_offset): Likewise.
9636 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 9637 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 9638
9639 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9640 better to remove the bitfield version completely.
f19dbdb7 9641
868967cf 96422008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9643
f5db4291 9644 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9645 allocated from the heap, due to the fshelp implementation.
9646 (grub_reiserfs_dir): Free NODE, due to the same reason.
9647
492e6d9d 96482008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9649
9650 Mostly from Vincent Pelletier:
f19dbdb7 9651
492e6d9d 9652 * fs/reiserfs.c: New file.
f19dbdb7 9653
492e6d9d 9654 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9655 (reiserfs_mod_SOURCES): New variable.
9656 (reiserfs_mod_CFLAGS): Likewise.
9657 (reiserfs_mod_LDFLAGS): Likewise.
9658
9659 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9660 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9661 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9662 normal/color.c.
9663
9ce3e7c1 96642008-01-06 Robert Millan <rmh@aybabtu.com>
9665
9666 * normal/color.c: Remove `<grub/env.h>'.
9667
f3b58148 96682008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9669
9670 * include/grub/normal.h: Include <grub/env.h>.
9671
7ac3bcfa 96722008-01-05 Robert Millan <rmh@aybabtu.com>
9673
9674 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9675 usage example with `(hd0,1)'.
fb358190 9676 Reported by Samuel Thibault.
7ac3bcfa 9677
c8ee99d7 96782008-01-05 Robert Millan <rmh@aybabtu.com>
9679
9680 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9681 (grub_linux_boot_zimage): Rename to ...
9682 (grub_linux_boot): ... this.
9683 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9684 (grub_linux_boot_zimage): Conditionalize zImage copy.
9685
9686 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9687 (grub_linux_boot_bzimage): Remove prototype.
9688 (grub_linux_boot_zimage): Rename to ...
9689 (grub_linux_boot): ... this.
9690
9691 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9692 (grub_linux_boot): Remove function.
9693
0ece25b1 96942008-01-05 Robert Millan <rmh@aybabtu.com>
9695
9696 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9697 (grub_env_write_color_highlight): Likewise.
9698 (grub_wait_after_message): Likewise.
9699
9700 * normal/color.c: New file.
9701
9702 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9703 (normal_mod_DEPENDENCIES): Likewise.
9704
9705 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9706 (normal_mod_DEPENDENCIES): Likewise.
9707
9708 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9709 (normal_mod_DEPENDENCIES): Likewise.
9710
9711 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9712 (normal_mod_DEPENDENCIES): Likewise.
9713
9714 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9715 for waiting after a message is printed.
9716 * normal/main.c (read_config_file): Likewise.
9717 (grub_normal_init): Register grub_env_write_color_normal() and
9718 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9719 `color_highlight' variables as global.
9720
9721 * normal/menu.c (grub_wait_after_message): New function.
9722 (grub_color_menu_normal): New variable. Replaces ...
9723 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9724 (grub_color_menu_highlight): New variable. Replaces ...
9725 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9726 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9727 `GRUB_TERM_COLOR_STANDARD'.
9728 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9729 `normal_code' and `highlight_code' to `old_color_normal' and
9730 `old_color_highlight', respectively.
9731 (grub_menu_init_page): Update colors when drawing the menu, based on
9732 `menu_color_normal' and `menu_color_highlight' variables.
9733 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9734 a message is printed.
9735
182dd4e5 97362008-01-05 Robert Millan <rmh@aybabtu.com>
9737
9738 * kern/env.c (grub_env_context_open): Propagate hooks for global
9739 variables to new context.
9740
9741 * kern/main.c (grub_set_root_dev): Export `root' variable.
9742
ddf8f6ad 97432008-01-05 Robert Millan <rmh@aybabtu.com>
9744
9745 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 9746 discs unconditionally, since udev and others have options to provide
ddf8f6ad 9747 them.
9748
d8b43d9b 97492008-01-05 Robert Millan <rmh@aybabtu.com>
9750
9751 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9752
2bff2de3 97532008-01-04 Christian Franke <franke@computer.org>
9754
9755 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9756 of eisa_mmap.
9757
97eab917 97582008-01-03 Pavel Roskin <proski@gnu.org>
9759
9760 * kern/i386/linuxbios/init.c: Put "void" to all function
9761 declarations with no arguments.
9762 * kern/powerpc/ieee1275/init.c: Likewise.
9763 * term/i386/pc/at_keyboard.c: Likewise.
9764 * term/i386/pc/vga_text.c: Likewise.
9765 * util/grub-mkdevicemap.c: Likewise.
9766
b9416d00 97672008-01-02 Robert Millan <rmh@aybabtu.com>
9768
9769 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9770 message when loaded image is out of bounds.
9771 (grub_multiboot_load_elf64): Likewise.
9772
92695df9 97732008-01-02 Pavel Roskin <proski@gnu.org>
9774
9775 * util/grub.d/10_linux.in: Try version without ".old" when
9776 looking for initrd. It's better to use initrd from the newer
9777 kernel of the same version than no initrd at all.
9778
d98d9cad 97792008-01-01 Robert Millan <rmh@aybabtu.com>
9780
9781 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9782
dbfdce36 97832008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9784
f19dbdb7 9785 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9786 grub_video_get_active_render_target.
9787 (grub_video_adapter): Added unmap_color and get_active_render_target.
9788
f19dbdb7 9789 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9790 grub_video_get_active_render_target.
9791 (grub_video_get_info): Changed method to accept NULL pointer as an
9792 argument to allow detection of active video adapter.
9793
9794 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9795 grub_video_vbe_unmap_color_int.
9796 Added grub_video_vbe_unmap_color and
9797 grub_video_vbe_get_active_render_target.
9798 (grub_video_vbe_adapter): Added unmap_color and
9799 get_active_render_target.
9800
f19dbdb7 9801 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9802 with grub_video_vbe_unmap_color_int.
9803
9804 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9805 (DEFAULT_NORMAL_COLOR): Likewise.
9806 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9807 (DEFAULT_FG_COLOR): Removed.
9808 (DEFAULT_BG_COLOR): Likewise.
9809 (DEFAULT_CURSOR_COLOR): Changed value.
9810 (grub_virtual_screen): Added standard_color_setting,
9811 normal_color_setting, highlight_color_setting and term_color.
9812 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9813 (bitmap_width): Added.
9814 (bitmap_height): Likewise.
9815 (bitmap): Likewise.
9816 (set_term_color): Likewise.
9817 (grub_virtual_screen_setup): Changed to use new terminal coloring
9818 settings.
9819 (grub_gfxterm_init): Added init for bitmap.
9820 (grub_gfxterm_fini): Added destroy for bitmap.
9821 (redraw_screen_rect): Updated to use background bitmap and new
9822 terminal coloring.
9823 (scroll_up): Added optimization for case when there is no bitmap.
9824 (grub_gfxterm_cls): Fixed to use correct background color.
9825 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9826 coloring.
9827 (grub_virtual_screen_setcolor): Likewise.
9828 (grub_virtual_screen_getcolor): Added.
9829 (grub_gfxterm_background_image_cmd): Likewise.
9830 (grub_video_term): Added setcolor and getcolor.
9831 (MOD_INIT): Added registration of background_image command.
9832 (MOD_TERM): Added unregistration for background_image command.
9833
c3c20931 98342007-12-30 Pavel Roskin <proski@gnu.org>
9835
9836 * loader/multiboot_loader.c: Fix multiboot command
9837 unregistration. Fix all typos in the word "multiboot".
9838
df266716 98392007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9840
9841 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9842 support for initrd names used in Fedora.
9843
fc6e896c 98442007-12-26 Bean <bean123ch@gmail.com>
9845
9846 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9847 (cpio_mod_SOURCES): New variable.
9848 (cpio_mod_CFLAGS): Likewise.
9849 (cpio_mod_LDFLAGS): Likewise.
9850
9851 * fs/cpio.c: New file.
9852
9853 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9854
9855 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9856
9857 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9858
9859 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9860
533110ad 98612007-12-25 Robert Millan <rmh@aybabtu.com>
9862
9863 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9864 (grub_getcolor): New function.
9865
9866 * kern/term.c (grub_getcolor): New function.
9867 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9868 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9869 (print_entry): Set normal and highlight colors to
9870 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9871 respectively, before printing and restore them to old
9872 values afterwards.
9873 (grub_menu_init_page): Likewise. Fill an additional colored space
9874 that would otherwise be left blank.
9875
9876 * term/efi/console.c (grub_console_getcolor): New function.
9877 (struct grub_console_term.getcolor): New variable.
9878 * term/i386/pc/console.c (grub_console_getcolor): New function.
9879 (struct grub_console_term.getcolor): New variable.
9880 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9881 (struct grub_console_term.getcolor): New variable.
9882
9883 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9884 (struct grub_console_term.setcolor): Remove variable.
9885 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9886 (struct grub_console_term.setcolor): Remove variable.
9887 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9888 (struct grub_console_term.setcolor): Remove variable.
9889 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9890 (struct grub_console_term.setcolor): Remove variable.
9891
4931827f 98922007-12-25 Robert Millan <rmh@aybabtu.com>
9893
9894 * configure.ac: Search for possible unifont.hex locations, and
9895 define UNIFONT_HEX if found.
9896
9897 * Makefile.in (UNIFONT_HEX): Define variable.
9898 (DATA): Rename to ...
9899 (PKGLIB): ... this. Update all users.
9900 (PKGDATA): New variable.
9901 (pkgdata_IMAGES): Rename to ...
9902 (pkglib_IMAGES): ... this. Update all users.
9903 (pkgdata_MODULES): Rename to ...
9904 (pkglib_MODULES): ... this. Update all users.
9905 (pkgdata_PROGRAMS): Rename to ...
9906 (pkglib_PROGRAMS): ... this. Update all users.
9907 (pkgdata_DATA): Rename to ...
9908 (pkglib_DATA): ... this. Update all users.
9909 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9910 (unicode.pff, ascii.pff): New rules.
9911 (all-local): Add `$(PKGDATA)' dependency.
9912 (install-local): Process `$(PKGDATA)'.
9913
9914 * util/update-grub_lib.in (font_path): Search for *.pff files in
9915 a few more locations, including `${pkgdata}'.
9916
57e57e31 99172007-12-23 Robert Millan <rmh@aybabtu.com>
9918
9919 Patch from Bean <bean123ch@gmail.com>:
9920 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9921 `size'.
9922
4bc72aa9 99232007-12-21 Bean <bean123ch@gmail.com>
9924
9925 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9926 (ntfscomp_mod_SOURCES): New variable.
9927 (ntfscomp_mod_CFLAGS): Likewise.
9928 (ntfscomp_mod_LDFLAGS): Likewise.
9929
9930 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9931 (grub_probe_SOURCES): Likewise.
9932 (grub_emu_SOURCES): Likewise.
9933
9934 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9935 (grub_emu_SOURCES): Likewise.
9936
9937 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9938 (grub_emu_SOURCES): Likewise.
9939
9940 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9941 (grub_emu_SOURCES): Likewise.
9942
9943 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9944 (read_run_list): Renamed to grub_ntfs_read_run_list.
9945 (decomp_nextvcn): Moved to ntfscomp.c.
9946 (decomp_getch): Likewise.
9947 (decomp_get16): Likewise.
9948 (decomp_block): Likewise.
9949 (read_block): Likewise.
9950 (read_data): Partially moved to ntfscomp.c.
9951 (fixup): Change unsigned to grub_uint16_t.
9952 (read_mft): Change unsigned long to grub_uint32_t.
9953 (read_attr): Likewise.
9954 (read_data): Likewise.
9955 (read_run_data): Likewise.
9956 (read_run_list): Likewise.
9957 (read_mft): Likewise.
9958
9959 * fs/ntfscomp.c: New file.
9960
9961 * include/grub/ntfs.h: New file.
9962
af680a87 99632007-12-16 Robert Millan <rmh@aybabtu.com>
9964
9965 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9966 IDE disk check, since Linux is known to support 20 IDE disks.
9967 Reported by Colin Watson.
9968
84be7599 99692007-12-15 Bean <bean123ch@gmail.com>
9970
9971 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9972 (lnxboot_img_SOURCES): New variable.
9973 (lnxboot_img_ASFLAGS): Likewise.
9974 (lnxboot_img_LDFLAGS): Likewise.
9975
9976 * boot/i386/pc/lnxboot.S: New file.
9977
6af9db01 99782007-11-24 Pavel Roskin <proski@gnu.org>
9979
9980 * configure.ac: Test if '--build-id=none' is supported by the
9981 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9982 objcopy to generate incorrect binary files (binutils
9983 2.17.50.0.18-1 as shipped by Fedora 8).
9984 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9985 linking, so that build ID doesn't break the test.
9986
7361cfe6 99872007-11-24 Pavel Roskin <proski@gnu.org>
9988
9989 * include/grub/i386/time.h: use "void" in the argument list
9990 of grub_cpu_idle().
9991 * include/grub/powerpc/time.h: Likewise.
9992 * include/grub/sparc64/time.h: Likewise.
9993
1593e10c 99942007-11-18 Christian Franke <franke@computer.org>
9995
9996 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9997 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9998 This fixes the problem that function keys did not work in grub-emu.
9999
3b8db1a8 100002007-11-18 Christian Franke <franke@computer.org>
10001
10002 * disk/host.c (grub_host_open): Remove attribute unused from
10003 name parameter. Add check for "host". This fixes the problem
10004 that grub-emu does not find partitions.
10005
2e29408d 100062007-11-18 Christian Franke <franke@computer.org>
10007
10008 * util/hostfs.c (is_dir): New function.
10009 (grub_hostfs_dir): Handle missing dirent.d_type case.
10010 (grub_hostfs_read): Add missing fseek().
10011 (grub_hostfs_label): Clear label pointer. This fixes a crash
10012 of grub-emu on "ls (host)".
10013
398cd047 100142007-11-18 Christian Franke <franke@computer.org>
10015
10016 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10017 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10018 to 64 bit boundary by default.
10019
c405c391 100202007-11-18 Bean <bean123ch@gmail.com>
10021
10022 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10023 (hexdump_mod_SOURCES): New variable.
10024 (hexdump_mod_CFLAGS): Likewise.
10025 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 10026
c405c391 10027 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10028
10029 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10030
10031 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10032
10033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10034
10035 * include/grub/hexdump.h: New file.
10036
10037 * commands/hexdump.c: New file.
10038
5cced7fd 100392007-11-10 Robert Millan <rmh@aybabtu.com>
10040
10041 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10042 in grub_outb() calls.
10043 (beep_on): Likewise.
10044
8b714eb0 100452007-11-10 Christian Franke <franke@computer.org>
10046
10047 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10048 (grub_menu_run): Likewise.
10049
ce0f1839 100502007-11-10 Robert Millan <rmh@aybabtu.com>
10051
10052 * include/grub/i386/efi/machine.h: New file.
10053 * include/grub/i386/linuxbios/machine.h: Likewise.
10054 * include/grub/i386/pc/machine.h: Likewise.
10055 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10056 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10057
10058 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10059 (serial_hw_io_addr): New variable.
10060 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10061 instead of `(unsigned short *) 0x400'.
10062
270c237d 100632007-11-10 Bean <bean123ch@gmail.com>
10064
10065 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10066
a87783bf 100672007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10068
10069 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10070 (vga_mod_SOURCES): Added.
10071 (vga_mod_CFLAGS): Likewise.
10072 (vga_mod_LDFLAGS): Likewise.
10073
10074 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10075 grub_outb() calls.
10076 (set_map_mask): Likewise.
10077 (set_read_map): Likewise.
10078 (set_read_address): Likewise.
10079 (vga_font): Removed variable.
10080 (get_vga_glyph): Removed function.
10081 (invalidate_char): Likewise.
10082 (write_char): Changed to use grub_font_get_glyph() for font
10083 information.
10084 (grub_vga_putchar): Likewise.
10085 (grub_vga_getcharwidth): Likewise.
10086
6433b448 100872007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10088
10089 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10090 flags.
10091 (pxeboot_img_LDFLAGS): Likewise.
10092 (diskboot_img_LDFLAGS): Likewise.
10093 (kernel_img_LDFLAGS): Likewise.
10094
49178511 100952007-11-06 Robert Millan <rmh@aybabtu.com>
10096
10097 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10098 in grub_outb() calls.
10099 (serial_hw_init): Likewise.
10100
53b052de 101012007-11-05 Robert Millan <rmh@aybabtu.com>
10102
10103 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10104 spaces. Skip non-regular files.
10105
5ab33bba 101062007-11-05 Robert Millan <rmh@aybabtu.com>
10107
10108 * kern/disk.c (grub_disk_firmware_fini)
10109 (grub_disk_firmware_is_tainted): New variables.
10110
10111 * include/grub/disk.h (grub_disk_firmware_fini)
10112 (grub_disk_firmware_is_tainted): Likewise.
10113
10114 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10115 (grub_disk_biosdisk_fini): ... to here.
10116 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10117 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10118 is set. Register grub_disk_biosdisk_fini() in
10119 `grub_disk_firmware_fini'.
10120
10121 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10122 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10123 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10124 to finish existing firmware disk interface.
10125
10126 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10127 (ata_mod_SOURCES): New variable.
10128 (ata_mod_CFLAGS): Likewise.
10129 (ata_mod_LDFLAGS): Likewise.
10130
0149ab7c 101312007-11-05 Robert Millan <rmh@aybabtu.com>
10132
10133 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
10134 (grub_ata_wait): Reimplement using grub_millisleep().
10135
10136 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10137 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10138
be7ac41e 101392007-11-03 Marco Gerards <marco@gnu.org>
10140
10141 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10142 (CRTC_ADDR_PORT): New macro.
10143 (CRTC_DATA_PORT): Likewise.
10144 (CRTC_CURSOR): Likewise.
10145 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10146 (CRTC_CURSOR_ADDR_LOW): Likewise.
10147 (update_cursor): New function.
10148 (grub_console_real_putchar): Call `update_cursor'.
10149 (grub_console_gotoxy): Likewise.
10150 (grub_console_cls): Set the default color when clearing the
10151 screen.
10152 (grub_console_setcursor): Implemented.
10153
bb06ab2e 101542007-11-03 Marco Gerards <marco@gnu.org>
10155
10156 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10157 become activate.
10158 (grub_ata_pio_write): Likewise.
10159
10160 (grub_atapi_identify): Wait after issuing an ATA command.
10161 (grub_atapi_packet): Likewise.
10162 (grub_ata_identify): Likewise.
10163 (grub_ata_readwrite): Likewise.
10164
cf8f780b 101652007-11-03 Marco Gerards <marco@gnu.org>
10166
10167 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10168 (grub_ata_pio_write): Likewise.
10169 (grub_ata_readwrite): Use `grub_error', instead of
10170 returning `grub_errno'.
10171
ed649e54 101722007-11-03 Marco Gerards <marco@gnu.org>
10173
10174 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10175 grub_ata_pio_write once for every single sector, instead of for
10176 multiple sectors.
10177
ca25d8f0 101782007-10-31 Robert Millan <rmh@aybabtu.com>
10179
10180 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10181
10182 * conf/i386-linuxbios.rmk: New file.
10183
10184 * kern/i386/pc/hardware.c: Likewise.
10185 * term/i386/pc/at_keyboard.c: Likewise.
10186 * term/i386/pc/vga_text.c: Likewise.
10187
10188 * include/grub/i386/linuxbios/boot.h: Likewise.
10189 * include/grub/i386/linuxbios/console.h: Likewise.
10190 * include/grub/i386/linuxbios/init.h: Likewise.
10191 * include/grub/i386/linuxbios/kernel.h: Likewise.
10192 * include/grub/i386/linuxbios/loader.h: Likewise.
10193 * include/grub/i386/linuxbios/memory.h: Likewise.
10194 * include/grub/i386/linuxbios/serial.h: Likewise.
10195 * include/grub/i386/linuxbios/time.h: Likewise.
10196
10197 * kern/i386/linuxbios/init.c: Likewise.
10198 * kern/i386/linuxbios/startup.S: Likewise.
10199 * kern/i386/linuxbios/table.c: Likewise.
10200
e911ecc1 102012007-10-31 Marco Gerards <marco@gnu.org>
10202
10203 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10204 (ata_mod_SOURCES): New variable.
10205 (ata_mod_CFLAGS): Likewise.
10206 (ata_mod_LDFLAGS): Likewise.
10207
10208 * disk/ata.c: New file.
10209
10210 * include/grub/disk.h (grub_disk_dev_id): Add
10211 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 10212
7f66d0e0 102132007-10-31 Robert Millan <rmh@aybabtu.com>
10214
10215 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10216 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10217
10218 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10219 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10220
10221 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10222 `<grub/types.h>'.
10223
10224 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10225
5cd7dd46 102262007-10-27 Robert Millan <rmh@aybabtu.com>
10227
3236ca65 10228 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 10229
2ebfc90f 102302007-10-22 Robert Millan <rmh@aybabtu.com>
10231
10232 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10233 `"../realmode.S"'.
10234 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10235
73fcb0f3 102362007-10-22 Robert Millan <rmh@aybabtu.com>
10237
10238 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10239 (pkgdata_MODULES): Add `biosdisk.mod'.
10240 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10241 variables.
10242
10243 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10244 (grub_biosdisk_init): Replace with ...
10245 (GRUB_MOD_INIT(biosdisk)): ... this.
10246 (grub_biosdisk_fini): Replace with ...
10247 (GRUB_MOD_FINI(biosdisk)): ... this.
10248
10249 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10250 (grub_machine_init): Remove call to grub_biosdisk_init().
10251 (grub_machine_fini): Remove call to grub_machine_fini().
10252
10253 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10254
3381d274 102552007-10-22 Robert Millan <rmh@aybabtu.com>
10256
10257 * include/grub/time.h: New file.
10258 * include/grub/i386/time.h: Likewise.
10259 * include/grub/powerpc/time.h: Likewise.
10260 * include/grub/sparc64/time.h: Likewise.
10261
10262 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10263 instances to ...
10264 (KERNEL_MACHINE_TIME_HEADER): ... this.
10265 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10266 instances to ...
10267 (KERNEL_MACHINE_TIME_HEADER): ... this.
10268 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10269 instances to ...
10270 (KERNEL_MACHINE_TIME_HEADER): ... this.
10271
10272 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10273 (grub_millisleep): New function.
10274 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10275 (grub_millisleep): New function.
10276 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10277 Remove `grub/machine/time.h' include.
10278 (grub_millisleep): New function.
10279 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10280 Remove `grub/machine/time.h' include.
10281 (grub_millisleep): New function.
10282
10283 * include/grub/misc.h (grub_div_roundup): New function.
10284
10285 * kern/misc.c: Include `<grub/time.h>'.
10286 (grub_millisleep_generic): New function.
10287
10288 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10289 Add `time.h'.
10290 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10291 Add `time.h'.
10292 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10293 `machine/time.h'. Add `time.h'.
10294 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10295
a39a0312 102962007-10-21 Robert Millan <rmh@aybabtu.com>
10297
10298 * include/grub/misc.h (grub_max): New function.
10299
2aad70e2 103002007-10-21 Robert Millan <rmh@aybabtu.com>
10301
10302 * util/misc.c (grub_util_info): Call fflush() before returning.
10303
54b71c4b 103042007-10-20 Robert Millan <rmh@aybabtu.com>
10305
10306 * genmk.rb (Image): Copy `extra_flags' from here ...
10307 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10308
10309 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10310 to `argc' and `args' arguments.
10311
a979f513 103122007-10-17 Robert Millan <rmh@aybabtu.com>
10313
10314 * kern/i386/loader.S: New file.
10315
10316 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10317 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10318 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10319 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10320 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10321 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10322 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10323 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10324 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10325 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10326 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10327 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10328 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10329 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10330
10331 * kern/i386/realmode.S: New file.
10332
10333 * kern/i386/pc/startup.S (protstack): Moved from here ...
10334 * kern/i386/realmode.S (protstack)... to here.
10335 * kern/i386/pc/startup.S (gdt): Moved from here ...
10336 * kern/i386/realmode.S (gdt)... to here.
10337 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10338 * kern/i386/realmode.S (prot_to_real)... to here.
10339
10340 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10341 `kern/i386/realmode.S'.
10342
825fc8fd 103432007-10-17 Robert Millan <rmh@aybabtu.com>
10344
10345 * include/grub/i386/loader.h: New file.
10346
10347 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10348 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10349 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10350 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10351 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10352 * include/grub/i386/loader.h (grub_linux_prot_size)
10353 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10354 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10355 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10356 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10357
10358 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10359
e179b2f4 103602007-10-15 Robert Millan <rmh@aybabtu.com>
10361
10362 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10363 filesystem when dev->disk is unset.
10364 Do probe for filesystem even when dev->disk->has_partitions is set.
10365 In case a filesystem is found, always report it.
10366 In case it isn't, if dev->disk->has_partitions is set, report that
10367 a partition table was found instead of reporting that no filesystem
10368 could be identified.
10369
5db82af6 103702007-10-12 Robert Millan <rmh@aybabtu.com>
10371
10372 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10373 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10374
68f6ac74 10375 * include/grub/types.h (grub_host_to_target16): New macro.
10376 (grub_host_to_target32): Likewise.
10377 (grub_host_to_target64): Likewise.
10378 (grub_target_to_host16): Likewise.
10379 (grub_target_to_host32): Likewise.
10380 (grub_target_to_host64): Likewise.
5db82af6 10381
10382 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10383 Renamed from to ...
10384 (GRUB_MOD_ALIGN): ...this. Update all users.
10385
68f6ac74 10386 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10387 grub_host_to_target32.
10388 Replace grub_be_to_cpu32 with grub_target_to_host32.
10389 (load_modules): Likewise.
10390 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10391 Replace grub_be_to_cpu32 with grub_target_to_host32.
10392 Replace grub_cpu_to_be16 with grub_host_to_target16.
10393 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 10394
3cf497cc 103952007-10-12 Robert Millan <rmh@aybabtu.com>
10396
10397 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10398 * util/elf/grub-mkimage.c: ... here.
10399
10400 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10401 `util/powerpc/ieee1275/grub-mkimage.c'.
10402
c8cc3692 104032007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 10404
c8cc3692 10405 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10406 and make it easier to figure out.
10407 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10408 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10409 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10410 leave us with less than HEAP_MIN_SIZE total heap.
10411 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 10412
5c58b791 104132007-10-03 Robert Millan <rmh@aybabtu.com>
10414
10415 * include/grub/i386/io.h: New file.
10416 * commands/i386/pc/play.c (inb): Removed.
10417 (outb): Removed.
10418 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10419 with grub_outb().
afcd2ef8 10420 * term/i386/pc/serial.c (inb): Removed.
10421 (outb): Removed.
10422 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10423 with grub_outb().
10424 * term/i386/pc/vga.c (inb): Removed.
10425 (outb): Removed.
10426 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10427 with grub_outb().
5c58b791 10428
1a477ed6 104292007-10-02 Robert Millan <rmh@aybabtu.com>
10430
10431 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10432 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10433 Reported by Marcin Kurek.
10434
6b5d80fa 104352007-09-07 Robert Millan <rmh@aybabtu.com>
10436
10437 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10438 SmartFirmware version updates (as released by Sven Luther), and avoid
10439 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10440 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10441 known broken.
10442
5618afbf 104432007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10444
10445 From Hitoshi Ozeki:
10446 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10447 when merging two regions.
10448
6139dcd9 104492007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10450
508e39ee 10451 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10452 * normal/completion.c (grub_normal_do_completion): Likewise.
10453 Reported by Hitoshi Ozeki.
10454
104552007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10456
6139dcd9 10457 Do not use devices at boot in chainloading.
f19dbdb7 10458
6139dcd9 10459 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10460 (boot_part_addr): Likewise.
10461 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10462 with BOOT_DRIVE and BOOT_PART_ADDR.
10463 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10464 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10465
38da6516 104662007-08-29 Robert Millan <rmh@aybabtu.com>
10467
10468 Patch from Simon Peter <dn.tlp@gmx.net>:
10469 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10470 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10471 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10472 util/i386/pc/grub-setup.c_DEPENDENCIES.
10473 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10474 util/grub-probe.c_DEPENDENCIES.
10475 * conf/powerpc-ieee1275.rmk: Likewise.
10476
29d0928c 104772007-08-28 Robert Millan <rmh@aybabtu.com>
10478
10479 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10480 to tell grub-mkdevicemap how to name devices.
10481 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10482 feature).
10483
10484 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10485 util/i386/get_disk_name.c.
10486 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10487 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10488 util/ieee1275/get_disk_name.c.
10489
10490 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10491
10492 * DISTLIST: Add util/i386/get_disk_name.c and
10493 util/ieee1275/get_disk_name.c.
10494
10495 * util/grub-mkdevicemap.c: Replace device naming logic with
10496 grub_util_get_disk_name() calls.
10497
5a0d3cca 104982007-08-20 Robert Millan <rmh@aybabtu.com>
10499
10500 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10501 (so that it works for both plural and singular quantities).
10502
8b72db2f 105032007-08-05 Robert Millan <rmh@aybabtu.com>
10504
10505 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10506 so that [xz] isn't taken into account when determining order.
10507
352466bf 105082007-08-02 Marco Gerards <marco@gnu.org>
10509
10510 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10511 `include/multiboot2.h', `include/grub/elfload.h',
10512 `include/multiboot.h', `include/grub/multiboot.h',
10513 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10514 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10515 `kern/elf.c', `loader/multiboot_loader.c',
10516 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10517 `loader/i386/pc/multiboot2.c',
10518 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10519 `util/i386/pc/grub-mkrescue.in'. Remove
10520 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10521 `include/grub/i386/pc/util/biosdisk.h' and
10522 `include/grub/powerpc/ieee1275/multiboot.h'.
10523
8f096014 105242007-08-02 Bean <bean123ch@gmail.com>
10525
10526 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10527 (ntfs_mod_SOURCES): New variable.
10528 (ntfs_mod_CFLAGS): Likewise.
10529 (ntfs_mod_LDFLAGS): Likewise.
10530
10531 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10532 (grub_probe_SOURCES): Likewise.
10533 (grub_emu_SOURCES): Likewise.
10534
10535 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10536 (grub_emu_SOURCES): Likewise.
10537
10538 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10539 (grub_emu_SOURCES): Likewise.
f19dbdb7 10540
8f096014 10541 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10542
10543 * fs/ntfs.c: New file.
10544
9959f7db 105452007-08-02 Bean <bean123ch@gmail.com>
10546
10547 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10548
10549 * file.h (grub_file): Likewise.
10550
10551 * fshelp.h (grub_fshelp_read_file): Likewise.
10552
10553 * util/i386/pc/grub-setup.c (setup): Likewise.
10554 (save_first_sector): Likewise.
10555 (save_blocklists): Likewise.
f19dbdb7 10556
9959f7db 10557 * fs/affs.c (grub_affs_read_file): Likewise.
10558
10559 * fs/ext2.c (grub_ext2_read_file): Likewise.
10560
10561 * fs/fat.c (grub_fat_read_data): Likewise.
10562
10563 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10564
10565 * fs/hfs.c (grub_hfs_read_file): Likewise.
10566
10567 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10568
10569 * fs/jfs.c (grub_jfs_read_file): Likewise.
10570
10571 * fs/minix.c (grub_minix_read_file): Likewise.
10572
10573 * fs/sfs.c (grub_sfs_read_file): Likewise.
10574
10575 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 10576
9959f7db 10577 * fs/xfs.c (grub_xfs_read_file): Likewise.
10578
10579 * command/blocklist.c (read_blocklist): Likewise.
10580 (print_blocklist): Likewise.
10581
0a203f83 105822007-08-02 Marco Gerards <marco@gnu.org>
10583
10584 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10585 `util/hostfs.c'.
10586
10587 * disk/host.c: New file.
10588
10589 * util/hostfs.c: Likewise.
10590
10591 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10592 return `GRUB_ERR_BAD_FS'.
10593 * fs/sfs.c (grub_sfs_mount): Likewise.
10594 * fs/xfs.c (grub_xfs_mount): Likewise.
10595
10596 * include/grub/disk.h (enum grub_disk_dev_id): Add
10597 `GRUB_DISK_DEVICE_HOST_ID'.
10598
10599 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10600
e5dfe777 106012007-07-24 Jerone Young <jerone@gmail.com>
10602
f19dbdb7 10603 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 10604 modules for compilation.
10605 * conf/powerpc-ieee1275.rmk: Likewise.
10606
10607 * include/multiboot.h: Move multiboot definitions to one file. Rename
10608 many definitions to not get grub specific.
10609 * include/multiboot2.h: Create header with multiboot 2 definitions.
10610 * include/grub/multiboot.h: Header for grub specific function
10611 prototypes and definitions.
10612 * include/grub/multiboot2.h: Likewise.
10613 * include/grub/multiboot_loader.h: Likewise.
10614 * include/grub/i386/pc/multiboot.h: Removed.
10615 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10616
10617 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10618 and 2 to allow for one multiboot and module commands.
10619 * loader/multiboot2.c: Add multiboot2 functionality.
10620 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10621 and definition names.
10622 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10623 2 functions.
10624 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10625 ieee1275 specific multiboot2 code.
10626
10627 * kern/i386/pc/startup.S: Change headers and definition names for
10628 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10629
daf0f0ba 106302007-07-22 Robert Millan <rmh@aybabtu.com>
10631
10632 * geninitheader.sh: Process file specified in first parameter rather
10633 than hardcoding grub_modules_init.lst.
fe6b695a 10634 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 10635 than hardcoding grub_modules_init.h.
10636
10637 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10638 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10639 grub_probe_init.[ch] and grub_setup_init.[ch].
10640
10641 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10642 grub_modules_init.h with grub_emu_init.h.
10643 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10644 grub_probe_init.[ch] files.
10645 * conf/i386-efi.rmk: Likewise.
10646 * conf/i386-pc.rmk: Likewise.
10647 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10648 grub_setup_init.[ch] files.
10649
10650 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10651 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10652 to initialize modules rather than a list of hardcoded functions.
10653 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10654 grub_init_all() to initialize modules rather than a list of hardcoded
10655 functions.
10656
54cdc1cc 106572007-07-22 Robert Millan <rmh@aybabtu.com>
10658
10659 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10660 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10661
ad0686cc 106622007-07-22 Robert Millan <rmh@aybabtu.com>
10663
10664 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10665 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10666 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10667 flag when running on SmartFirmware.
10668 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10669 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10670 was set.
10671
10672 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10673 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10674 rather than decreasing it.
10675
10676 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10677 there's not enough space to do it, fail in the same way as when it
10678 can't be done because there are no partitions.
10679
10680 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10681 when nvsetenv failed.
10682
969c02ec 106832007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10684
10685 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10686 because this rule is automatically generated.
10687 (grub-mkrescue): Removed for the same reason as above.
10688
5a79f472 106892007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10690
10691 Migrate to GNU General Public License Version 3.
f19dbdb7 10692
5a79f472 10693 * COPYING: Replaced with the plain text version of GPLv3.
10694
10695 * config.guess: Updated from gnulib.
10696 * config.sub: Likewise.
10697
10698 * geninit.sh: Output a GPLv3 copyright notice.
10699 * geninitheader.sh: Likewise.
10700 * genmodsrc.sh: Likewise.
10701 * gensymlist.sh.in: Likewise.
10702
10703 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10704 * boot/i386/pc/diskboot.S: Likewise.
10705 * boot/i386/pc/pxeboot.S: Likewise.
10706 * commands/blocklist.c: Likewise.
10707 * commands/boot.c: Likewise.
10708 * commands/cat.c: Likewise.
10709 * commands/cmp.c: Likewise.
10710 * commands/configfile.c: Likewise.
10711 * commands/echo.c: Likewise.
10712 * commands/help.c: Likewise.
10713 * commands/ls.c: Likewise.
10714 * commands/search.c: Likewise.
10715 * commands/terminal.c: Likewise.
10716 * commands/test.c: Likewise.
10717 * commands/videotest.c: Likewise.
10718 * commands/i386/cpuid.c: Likewise.
10719 * commands/i386/pc/halt.c: Likewise.
10720 * commands/i386/pc/play.c: Likewise.
10721 * commands/i386/pc/reboot.c: Likewise.
10722 * commands/i386/pc/vbeinfo.c: Likewise.
10723 * commands/i386/pc/vbetest.c: Likewise.
10724 * commands/ieee1275/halt.c: Likewise.
10725 * commands/ieee1275/reboot.c: Likewise.
10726 * commands/ieee1275/suspend.c: Likewise.
10727 * disk/loopback.c: Likewise.
10728 * disk/lvm.c: Likewise.
10729 * disk/raid.c: Likewise.
10730 * disk/efi/efidisk.c: Likewise.
10731 * disk/i386/pc/biosdisk.c: Likewise.
10732 * disk/ieee1275/ofdisk.c: Likewise.
10733 * font/manager.c: Likewise.
10734 * fs/affs.c: Likewise.
10735 * fs/ext2.c: Likewise.
10736 * fs/fat.c: Likewise.
10737 * fs/fshelp.c: Likewise.
10738 * fs/hfs.c: Likewise.
10739 * fs/hfsplus.c: Likewise.
10740 * fs/iso9660.c: Likewise.
10741 * fs/jfs.c: Likewise.
10742 * fs/minix.c: Likewise.
10743 * fs/sfs.c: Likewise.
10744 * fs/ufs.c: Likewise.
10745 * fs/xfs.c: Likewise.
10746 * hello/hello.c: Likewise.
10747 * include/grub/acorn_filecore.h: Likewise.
10748 * include/grub/arg.h: Likewise.
10749 * include/grub/bitmap.h: Likewise.
10750 * include/grub/boot.h: Likewise.
10751 * include/grub/cache.h: Likewise.
10752 * include/grub/device.h: Likewise.
10753 * include/grub/disk.h: Likewise.
10754 * include/grub/dl.h: Likewise.
10755 * include/grub/elfload.h: Likewise.
10756 * include/grub/env.h: Likewise.
10757 * include/grub/err.h: Likewise.
10758 * include/grub/file.h: Likewise.
10759 * include/grub/font.h: Likewise.
10760 * include/grub/fs.h: Likewise.
10761 * include/grub/fshelp.h: Likewise.
10762 * include/grub/gzio.h: Likewise.
10763 * include/grub/hfs.h: Likewise.
10764 * include/grub/kernel.h: Likewise.
10765 * include/grub/loader.h: Likewise.
10766 * include/grub/lvm.h: Likewise.
10767 * include/grub/misc.h: Likewise.
10768 * include/grub/mm.h: Likewise.
10769 * include/grub/net.h: Likewise.
10770 * include/grub/normal.h: Likewise.
10771 * include/grub/parser.h: Likewise.
10772 * include/grub/partition.h: Likewise.
10773 * include/grub/pc_partition.h: Likewise.
10774 * include/grub/raid.h: Likewise.
10775 * include/grub/rescue.h: Likewise.
10776 * include/grub/script.h: Likewise.
10777 * include/grub/setjmp.h: Likewise.
10778 * include/grub/symbol.h: Likewise.
10779 * include/grub/term.h: Likewise.
10780 * include/grub/terminfo.h: Likewise.
10781 * include/grub/tparm.h: Likewise.
10782 * include/grub/types.h: Likewise.
10783 * include/grub/video.h: Likewise.
10784 * include/grub/efi/api.h: Likewise.
10785 * include/grub/efi/chainloader.h: Likewise.
10786 * include/grub/efi/console.h: Likewise.
10787 * include/grub/efi/console_control.h: Likewise.
10788 * include/grub/efi/disk.h: Likewise.
10789 * include/grub/efi/efi.h: Likewise.
10790 * include/grub/efi/pe32.h: Likewise.
10791 * include/grub/efi/time.h: Likewise.
10792 * include/grub/i386/linux.h: Likewise.
10793 * include/grub/i386/setjmp.h: Likewise.
10794 * include/grub/i386/types.h: Likewise.
10795 * include/grub/i386/efi/kernel.h: Likewise.
10796 * include/grub/i386/efi/loader.h: Likewise.
10797 * include/grub/i386/efi/time.h: Likewise.
10798 * include/grub/i386/pc/biosdisk.h: Likewise.
10799 * include/grub/i386/pc/boot.h: Likewise.
10800 * include/grub/i386/pc/chainloader.h: Likewise.
10801 * include/grub/i386/pc/console.h: Likewise.
10802 * include/grub/i386/pc/init.h: Likewise.
10803 * include/grub/i386/pc/kernel.h: Likewise.
10804 * include/grub/i386/pc/loader.h: Likewise.
10805 * include/grub/i386/pc/memory.h: Likewise.
10806 * include/grub/i386/pc/multiboot.h: Likewise.
10807 * include/grub/i386/pc/serial.h: Likewise.
10808 * include/grub/i386/pc/time.h: Likewise.
10809 * include/grub/i386/pc/vbe.h: Likewise.
10810 * include/grub/i386/pc/vbeblit.h: Likewise.
10811 * include/grub/i386/pc/vbefill.h: Likewise.
10812 * include/grub/i386/pc/vbeutil.h: Likewise.
10813 * include/grub/i386/pc/vga.h: Likewise.
10814 * include/grub/ieee1275/ieee1275.h: Likewise.
10815 * include/grub/ieee1275/ofdisk.h: Likewise.
10816 * include/grub/powerpc/libgcc.h: Likewise.
10817 * include/grub/powerpc/setjmp.h: Likewise.
10818 * include/grub/powerpc/types.h: Likewise.
10819 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10820 * include/grub/powerpc/ieee1275/console.h: Likewise.
10821 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10822 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10823 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10824 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10825 * include/grub/powerpc/ieee1275/time.h: Likewise.
10826 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10827 * include/grub/sparc64/libgcc.h: Likewise.
10828 * include/grub/sparc64/setjmp.h: Likewise.
10829 * include/grub/sparc64/types.h: Likewise.
10830 * include/grub/sparc64/ieee1275/console.h: Likewise.
10831 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10832 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10833 * include/grub/sparc64/ieee1275/time.h: Likewise.
10834 * include/grub/util/biosdisk.h: Likewise.
10835 * include/grub/util/getroot.h: Likewise.
10836 * include/grub/util/lvm.h: Likewise.
10837 * include/grub/util/misc.h: Likewise.
10838 * include/grub/util/raid.h: Likewise.
10839 * include/grub/util/resolve.h: Likewise.
10840 * io/gzio.c: Likewise.
10841 * kern/device.c: Likewise.
10842 * kern/disk.c: Likewise.
10843 * kern/dl.c: Likewise.
10844 * kern/elf.c: Likewise.
10845 * kern/env.c: Likewise.
10846 * kern/err.c: Likewise.
10847 * kern/file.c: Likewise.
10848 * kern/fs.c: Likewise.
10849 * kern/loader.c: Likewise.
10850 * kern/main.c: Likewise.
10851 * kern/misc.c: Likewise.
10852 * kern/mm.c: Likewise.
10853 * kern/parser.c: Likewise.
10854 * kern/partition.c: Likewise.
10855 * kern/rescue.c: Likewise.
10856 * kern/term.c: Likewise.
10857 * kern/efi/efi.c: Likewise.
10858 * kern/efi/init.c: Likewise.
10859 * kern/efi/mm.c: Likewise.
10860 * kern/i386/dl.c: Likewise.
10861 * kern/i386/efi/init.c: Likewise.
10862 * kern/i386/efi/startup.S: Likewise.
10863 * kern/i386/pc/init.c: Likewise.
10864 * kern/i386/pc/lzo1x.S: Likewise.
10865 * kern/i386/pc/startup.S: Likewise.
10866 * kern/ieee1275/ieee1275.c: Likewise.
10867 * kern/powerpc/cache.S: Likewise.
10868 * kern/powerpc/dl.c: Likewise.
10869 * kern/powerpc/ieee1275/cmain.c: Likewise.
10870 * kern/powerpc/ieee1275/crt0.S: Likewise.
10871 * kern/powerpc/ieee1275/init.c: Likewise.
10872 * kern/powerpc/ieee1275/openfw.c: Likewise.
10873 * kern/sparc64/cache.S: Likewise.
10874 * kern/sparc64/dl.c: Likewise.
10875 * kern/sparc64/ieee1275/init.c: Likewise.
10876 * kern/sparc64/ieee1275/openfw.c: Likewise.
10877 * loader/efi/chainloader.c: Likewise.
10878 * loader/efi/chainloader_normal.c: Likewise.
10879 * loader/i386/efi/linux.c: Likewise.
10880 * loader/i386/efi/linux_normal.c: Likewise.
10881 * loader/i386/pc/chainloader.c: Likewise.
10882 * loader/i386/pc/chainloader_normal.c: Likewise.
10883 * loader/i386/pc/linux.c: Likewise.
10884 * loader/i386/pc/linux_normal.c: Likewise.
10885 * loader/i386/pc/multiboot.c: Likewise.
10886 * loader/i386/pc/multiboot_normal.c: Likewise.
10887 * loader/powerpc/ieee1275/linux.c: Likewise.
10888 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10889 * normal/arg.c: Likewise.
10890 * normal/cmdline.c: Likewise.
10891 * normal/command.c: Likewise.
10892 * normal/completion.c: Likewise.
10893 * normal/execute.c: Likewise.
10894 * normal/function.c: Likewise.
10895 * normal/lexer.c: Likewise.
10896 * normal/main.c: Likewise.
10897 * normal/menu.c: Likewise.
10898 * normal/menu_entry.c: Likewise.
10899 * normal/misc.c: Likewise.
10900 * normal/parser.y: Likewise.
10901 * normal/script.c: Likewise.
10902 * normal/i386/setjmp.S: Likewise.
10903 * normal/powerpc/setjmp.S: Likewise.
10904 * normal/sparc64/setjmp.S: Likewise.
10905 * partmap/acorn.c: Likewise.
10906 * partmap/amiga.c: Likewise.
10907 * partmap/apple.c: Likewise.
10908 * partmap/gpt.c: Likewise.
10909 * partmap/pc.c: Likewise.
10910 * partmap/sun.c: Likewise.
10911 * term/gfxterm.c: Likewise.
10912 * term/terminfo.c: Likewise.
10913 * term/efi/console.c: Likewise.
10914 * term/i386/pc/console.c: Likewise.
10915 * term/i386/pc/serial.c: Likewise.
10916 * term/i386/pc/vesafb.c: Likewise.
10917 * term/i386/pc/vga.c: Likewise.
10918 * term/ieee1275/ofconsole.c: Likewise.
10919 * util/biosdisk.c: Likewise.
10920 * util/console.c: Likewise.
10921 * util/genmoddep.c: Likewise.
10922 * util/getroot.c: Likewise.
10923 * util/grub-emu.c: Likewise.
10924 * util/grub-mkdevicemap.c: Likewise.
10925 * util/grub-probe.c: Likewise.
10926 * util/lvm.c: Likewise.
10927 * util/misc.c: Likewise.
10928 * util/raid.c: Likewise.
10929 * util/resolve.c: Likewise.
10930 * util/update-grub.in: Likewise.
10931 * util/update-grub_lib.in: Likewise.
10932 * util/grub.d/00_header.in: Likewise.
10933 * util/grub.d/10_hurd.in: Likewise.
10934 * util/grub.d/10_linux.in: Likewise.
10935 * util/i386/efi/grub-install.in: Likewise.
10936 * util/i386/efi/grub-mkimage.c: Likewise.
10937 * util/i386/pc/grub-install.in: Likewise.
10938 * util/i386/pc/grub-mkimage.c: Likewise.
10939 * util/i386/pc/grub-mkrescue.in: Likewise.
10940 * util/i386/pc/grub-setup.c: Likewise.
10941 * util/i386/pc/misc.c: Likewise.
10942 * util/powerpc/ieee1275/grub-install.in: Likewise.
10943 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10944 * util/powerpc/ieee1275/misc.c: Likewise.
10945 * video/bitmap.c: Likewise.
10946 * video/video.c: Likewise.
10947 * video/i386/pc/vbe.c: Likewise.
10948 * video/i386/pc/vbeblit.c: Likewise.
10949 * video/i386/pc/vbefill.c: Likewise.
10950 * video/i386/pc/vbeutil.c: Likewise.
10951 * video/readers/tga.c: Likewise.
10952
3572d015 109532007-07-02 Robert Millan <rmh@aybabtu.com>
10954
10955 * conf/i386-efi.rmk: Replace obsolete reference to
10956 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10957 with util/getroot.c.
10958 * conf/powerpc-ieee1275.rmk: Likewise.
10959 * conf/sparc64-ieee1275.rmk: Likewise.
10960
10961 * util/grub-emu.c (main): Fix unchecked pointer handling.
10962
2c2a681b 109632007-07-02 Robert Millan <rmh@aybabtu.com>
10964
10965 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10966 invocation to fail, in order to support partition-less media.
10967
10968 * util/i386/pc/grub-install.in: Likewise.
10969
10970 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10971 which fs or partmap modules are needed (akin to its sister scripts).
10972
10973 Also use grub-probe to get rid of unportable /proc/mounts check.
10974
10975 Print the same informational message that the other scripts do, before
fe6b695a 10976 exiting.
2c2a681b 10977
6193defe 109782007-06-23 Robert Millan <rmh@aybabtu.com>
10979
fe6b695a 10980 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10981 a font file can be found and, if so, echo the GRUB path to it.
10982
10983 * util/update-grub.in: Handle multiple terminals depending on user
10984 input, platform availability and font file presence. Propagate
10985 variables of our findings to /etc/grub.d/ children.
10986
10987 * util/grub.d/00_header.in: Handle multiple terminals, based on
10988 environment setup by update-grub.
10989
eface1dc 109902007-06-23 Robert Millan <rmh@aybabtu.com>
10991
ba50d28f 10992 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10993
bf697e28 109942007-06-21 Robert Millan <rmh@aybabtu.com>
10995
10996 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10997 indicate end of data section in kernel image.
10998 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10999 GRUB_KERNEL_MACHINE_DATA_END.
11000
11001 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11002 space for it.
11003 * kern/i386/efi/startup.S: Likewise.
11004
11005 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11006 during image generation. Implement --prefix option to override this
11007 patch.
11008 * util/i386/efi/grub-mkimage.c: Likewise.
11009
11010 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11011 code to make path relative to its root into a separate function.
11012
11013 * util/i386/pc/grub-install.in: Use newly provided
11014 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11015 pass the result to grub-install --prefix.
11016
baa574b4 110172007-06-13 Robert Millan <rmh@aybabtu.com>
11018
11019 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11020 DEFAULT_DEVICE_MAP.
11021 * util/grub-emu.c: Use above definitions from misc.h instead of
11022 defining them.
11023 * util/grub-mkdevicemap.c: Likewise.
11024 * util/i386/pc/grub-setup.c: Likewise.
11025 * util/grub-probe.c: Likewise.
11026 (probe): Abort with grub_util_error() when either
11027 grub_guess_root_device or grub_util_get_grub_dev fails.
11028
0215dcbf 110292007-06-12 Robert Millan <rmh@aybabtu.com>
11030
11031 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11032 "pager" assignment.
11033 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11034 "pcdata".
11035 * util/grub-probe.c (probe): Likewise for "drive_name".
11036
8af2ab7b 110372007-06-11 Robert Millan <rmh@aybabtu.com>
11038
11039 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11040 not just the cdrom one.
11041
59d31694 110422007-06-11 Robert Millan <rmh@aybabtu.com>
11043
11044 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11045 Add --pkglibdir=DIR option to override pkglibdir.
11046 Mention --image-type=TYPE in help output.
11047 Fix --grub-mkimage (it was a no-op).
fe6b695a 11048 Abort gracefully when no parameter is given.
59d31694 11049
7ee367e4 110502007-06-11 Robert Millan <rmh@aybabtu.com>
11051
11052 * util/i386/pc/grub-mkrescue.in: New file.
11053 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11054 * Makefile.in: Handle bin_SCRIPTS.
11055
29b0ed46 110562007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11057
11058 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11059 list of video modes.
11060
c0f90770 110612007-06-06 Robert Millan <rmh@aybabtu.com>
11062
11063 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11064 file doesn't exist, or if it is in a filesystem grub can't read.
11065
11066 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11067 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11068 header comment to fit in 80 columns when the variables are resolved.
11069
11070 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11071 could be identified by update-grub. Remove redundant check for
fe6b695a 11072 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 11073 handles that).
11074
fb36dc26 110752007-06-04 Robert Millan <rmh@aybabtu.com>
11076
11077 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11078
11079 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11080
11081 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11082
0c68c93e 110832007-06-04 Robert Millan <rmh@aybabtu.com>
11084
11085 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11086
11087 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11088 grub_apple_partition_map_fini.
11089
11090 * util/biosdisk.c
11091 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11092 to access >2 TiB disks).
11093
11094 Print disk->total_sectors with %llu instead of %lu, since this
11095 variable is always 64-bit (prevents wrong disk size from being displayed
11096 on either >2 TiB disk or big-endian CPU).
11097
11098 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11099 into a generic case that supports all (sane) partition maps.
11100
11101 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11102 breaks big-endian.
11103
11104 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11105 and grub_apple_partition_map_fini() after that.
11106
0f23eb74 111072007-06-01 Robert Millan <rmh@aybabtu.com>
11108
11109 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11110
11111 * util/grub.d/00_header.in: Only enable gfxterm when
11112 convert_system_path_to_grub_path() succeeds.
11113
42c71976 111142007-05-20 Robert Millan <rmh@aybabtu.com>
11115
11116 * util/update-grub_lib.in: New file.
11117 * DISTLIST: Add update-grub_lib.in.
11118 * conf/common.rmk: Generate update-grub_lib and install it in
11119 $(lib_DATA).
11120 * Makefile.in: Add install routine for $(lib_DATA).
11121
11122 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11123 function provided by update-grub_lib to support arbitrary paths of
11124 unifont.pff.
11125 * util/update-grub.in: Use convert_system_path_to_grub_path() to
11126 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11127
5beb2291 111282007-05-19 Robert Millan <rmh@aybabtu.com>
11129
11130 * commands/i386/cpuid.c: New module.
11131 * DISTLIST: Add it.
11132 * conf/i386-efi.rmk: Enable cpuid.mod.
11133 * conf/i386-pc.rmk: Likewise.
11134
7262eca1 111352007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11136
11137 * kern/disk.c (grub_disk_read): Check return value of
11138 grub_realloc().
11139
260ba823 111402007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11141
11142 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11143 arrays.
11144 * disk/raid.c (grub_raid_open): Likewise.
11145
1ecb6cf2 111462007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11147
11148 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11149 stack instead of on the heap.
11150
11151 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11152 before doing a read on it.
11153
11154 * configure.ac: Only use -fno-stack-protector for the target
11155 environment.
f19dbdb7 11156
21c8cbb1 111572007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11158
11159 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11160 __attribute_ ((unused)) to mode_type argument.
11161
11162 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 11163
21c8cbb1 11164 * kern/misc.c (memcmp): Fix prototype.
11165
11166 * include/grub/partition.h [GRUB_UTIL]
11167 (grub_gpt_partition_map_init): Add prototype.
11168 (grub_gpt_partition_map_fini): Likewise.
11169
11170 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11171 at the right place.
11172
11173 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11174 (grub_fat_read_data): Likewise.
11175 (grub_fat_find_dir): Likewise.
11176
11177 * font/manager.c (find_glyph): Make table a const.
11178 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 11179
849d55d3 111802007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11181
11182 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11183 code, first search for device in /dev/mapper, then in /dev.
11184 (grub_util_get_grub_dev): New function.
11185 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11186 prototype.
11187 * util/grub-probe.c (probe): Remove check for RAID, call
11188 grub_util_get_grub_dev() instead of
11189 grub_util_biosdisk_get_grub_dev().
11190 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11191 grub_util_biosdisk_get_grub_dev().
11192 * util/i386/pc/grub-setup.c (main): Likewise.
11193
8fff7c2f 111942007-05-16 Robert Millan <rmh@aybabtu.com>
11195
11196 * DISTLIST: Update for the latest changes.
11197 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11198 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11199 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11200 grub/util/biosdisk.h.
11201 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11202 grub/util/biosdisk.h.
11203
48e12b52 112042007-05-16 Robert Millan <rmh@aybabtu.com>
11205
11206 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11207
46b9d128 112082007-05-16 Robert Millan <rmh@aybabtu.com>
11209
11210 * util/i386/efi/grub-install.in: New.
11211 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11212 newly added grub-install.
11213 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11214 include.
11215 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11216 grub/util/biosdisk.h.
11217 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11218 grub/util/biosdisk.h.
11219
2d1a40a9 112202007-05-16 Robert Millan <rmh@aybabtu.com>
11221
11222 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11223 * include/grub/util/biosdisk.h: ... here.
11224 * util/i386/pc/biosdisk.c: Moved to ...
11225 * util/biosdisk.c: ... here.
11226 * util/i386/pc/getroot.c: Moved to ...
11227 * util/getroot.c: ... here.
11228 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11229 * util/grub-mkdevicemap.c: ... here.
11230 * util/i386/pc/grub-probe.c: Moved to ...
11231 * util/grub-probe.c: ... here.
11232
9e26e3bc 112332007-05-15 Robert Millan <rmh@aybabtu.com>
11234
11235 * util/update-grub.in: Remove duplicated line in grub.cfg header
11236 message.
11237
57f96397 112382007-05-13 Robert Millan <rmh@aybabtu.com>
11239
11240 * util/update-grub.in: Fix a few assumptions about the devices holding
11241 /, /boot and /boot/grub being the same.
11242 * util/grub.d/00_header.in: Likewise.
11243 * util/grub.d/10_hurd.in: Likewise.
11244 * util/grub.d/10_linux.in: Likewise.
11245
11246 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11247 patterns. Use that to define the `.old' suffix as older than `'.
11248
11249 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11250
11251 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11252 the grub.cfg header message.
11253
2e610d62 112542007-05-11 Robert Millan <rmh@aybabtu.com>
11255
11256 * util/update-grub.in: Create device.map if it doesn't already exist,
11257 before attempting to run grub-probe.
11258 Check for grub-probe and grub-mkdevicemap with the same code
11259 grub-install is using.
11260 Remove test mode.
11261
3f6a10ef 112622007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11263
11264 * Makefile.in: Add the datarootdir autoconf variable.
11265
02e7b75e 112662007-05-09 Robert Millan <rmh@aybabtu.com>
11267
11268 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 11269 fail gracefully if dev->disk->partition == NULL.
02e7b75e 11270
75f396cc 112712007-05-07 Robert Millan <rmh@aybabtu.com>
11272
11273 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11274 determine partition map module.
11275 * util/i386/pc/grub-install.in: Use this feature to decide which
11276 partition module to load, instead of hardcoding pc and gpt.
11277
da65cb36 112782007-05-07 Robert Millan <rmh@aybabtu.com>
11279
11280 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11281 source directory differs from build directory.
11282
b57d6a91 112832007-05-05 Robert Millan <rmh@aybabtu.com>
11284
11285 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11286 initialisation.
11287
509d00f1 112882007-05-05 Robert Millan <rmh@aybabtu.com>
11289
11290 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11291
c48f23ef 112922007-05-05 Robert Millan <rmh@aybabtu.com>
11293
11294 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11295 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11296
20b97658 112972007-05-05 Robert Millan <rmh@aybabtu.com>
11298
11299 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11300 (grub_probe_SOURCES): Likewise.
11301 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11302 GPT and initialize dos_part and bsd_part accordingly.
11303 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11304 install_bsd_part.
11305 (main): Activate gpt module for use during partition identification,
11306 and deactivate it afterwards.
11307 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11308 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11309 partition identification, and deactivate it afterwards.
11310
99123174 113112007-05-05 Robert Millan <rmh@aybabtu.com>
11312
11313 * term/i386/pc/console.c (grub_console_fini): Call
11314 grub_term_set_current() before grub_term_unregister().
11315
ebd97f6e 113162007-05-04 Robert Millan <rmh@aybabtu.com>
11317
11318 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11319 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11320 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11321 and update-grub_DATA.
11322 * conf/common.rmk: Build and install update-grub components.
11323 * conf/common.mk: Regenerate.
11324 * util/update-grub.in: New. Core of update-grub.
11325 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11326 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11327 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11328 * util/grub.d/README: New. Document grub.d directory layout.
11329
b06a264d 113302007-05-01 Robert Millan <rmh@aybabtu.com>
11331
11332 * util/grub-emu.c: Move initialization functions
11333 grub_util_biosdisk_init() and grub_init_all() before
11334 grub_util_biosdisk_get_grub_dev(), which relies on them.
11335
41f0050e 113362007-04-19 Robert Millan <rmh@aybabtu.com>
11337
11338 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11339 it is used later.
11340
04582bb3 113412007-04-18 Jerone Young <jerone@gmail.com>
11342
f19dbdb7 11343 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 11344 stanza.
11345
08db4632 113462007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 11347
08db4632 11348 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11349 continue on and look for device node with real device name.
11350
801b76be 113512007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 11352
fe6b695a 11353 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 11354 ability.
11355 * Makefile.in: Add autoconf package transformation code.
11356 * util/i386/pc/grub-install.in: Likewise.
11357 * util/powerpc/ieee1275/grub-install.in: Likewise.
11358
6795c4e1 113592007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11360
11361 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11362 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11363 (EXT2_REVISION): Likewise.
11364 (EXT2_INODE_SIZE): Likewise.
11365 (struct grub_ext2_block_group): Added a missing member
11366 "used_dirs".
11367 (grub_ext2_read_inode): Divide by the inode size in a superblock
11368 instead of 128 to obtain INODES_PER_BLOCK.
11369 Use the macro EXT2_INODE_SIZE instead of directly using
11370 SBLOCK->INODE_SIZE.
11371
d70af616 113722007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11373
11374 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11375 superblock instead of the structure size to compute an
11376 offset. This fixes the problem that GRUB could not read a
11377 filesystem when inode size is different from 128-byte.
11378
3b801603 113792007-03-05 Marco Gerards <marco@gnu.org>
11380
11381 * normal/main.c (read_config_file): When "menu" is not set, create
11382 an initial context.
11383
4785bfe4 113842007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11385
11386 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11387 (HEAP_LIMIT): New macro.
11388 (grub_claim_heap): Claim memory up to `heaplimit'.
11389
a0cbb023 113902007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11391
11392 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11393 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11394 (_start): Likewise.
11395 (grub_arch_modules_addr): Return address after `_end'.
11396 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11397 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11398 (add_segments): Calculate `_end' from phdr size and location.
11399 (ALIGN_UP): Moved to ...
11400 * include/grub/misc.h: here.
11401 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11402 New macro.
11403 (GRUB_IEEE1275_MODULE_BASE): Removed.
11404
fd7d8eba 114052007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11406
11407 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11408 loop boundary.
11409
9b09e6fc 114102007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11411
11412 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11413 All users updated.
11414 (grub_elf64_load_hook_t): Likewise.
11415 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11416 debug output.
11417
3ce27299 114182007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11419
11420 * kern/mm.c: Update copyright.
11421 (grub_mm_debug): Correct syntax error.
11422 (grub_mm_dump_free): New function.
11423 (grub_debug_free): Call `grub_free'.
11424 * include/grub/mm.h: Update copyright.
11425 (grub_mm_dump_free): Add declaration.
11426
077d5fee 114272007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11428
11429 * include/grub/ieee1275/ieee1275.h: Update copyright.
11430 * kern/powerpc/ieee1275/init.c: Likewise.
11431 * kern/powerpc/ieee1275/openfw.c: Likewise.
11432
11433 * loader/powerpc/ieee1275/linux.c: Likewise.
11434 * include/grub/elfload.h: Likewise.
11435 * kern/elf.c: Likewise.
11436 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11437 callers.
11438 (grub_elf64_load): Likewise.
11439 (grub_elf32_load_segment): Move to a nested function.
11440 (grub_elf64_load_segment): Likewise.
11441
dc946850 114422007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11443
11444 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11445 prototype.
11446 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11447 (grub_heap_len): Likewise.
11448 (HEAP_SIZE): New macro.
11449 (grub_claim_heap): New function.
11450 (grub_machine_init): Don't claim heap directly. Call
11451 `grub_claim_heap'.
11452 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11453 (grub_available_iterate): New function.
11454
baa2a121 114552007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11456
11457 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11458 * configure.ac: Use it for testing the HOST and TARGET compilers.
11459
4fe9862e 114602006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11461
11462 * Makefile.in (enable_grub_emu): New variable.
11463 * configure.ac (--enable-grub-emu): New option.
11464 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11465 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11466 * conf/i386-pc.rmk: Likewise.
11467 * conf/powerpc-ieee1275.rmk: Likewise.
11468 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11469
a8aa5762 114702006-12-12 Marco Gerards <marco@gnu.org>
11471
11472 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11473
11474 * kern/env.c (grub_env_unset): Don't free the member `value' when
11475 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11476 pointer.
11477
11478 * normal/main.c (current_menu): Removed.
11479 (free_menu): Unset the `menu' environment variable.
11480 (grub_normal_menu_addentry): Make use of the environment variable
11481 `menu', instead of using the global `current_menu'. Allocate
11482 memory for the sourcecode of this entry.
11483 (read_config_file): New argument `nested', changed all callers.
11484 Only in the case of a new context, initialize a new menu. Set the
11485 `menu' environment variable.
11486 (grub_normal_execute): Don't set and unset the environment
11487 variable `menu' here anymore. Only free the menu when leaving the
11488 context.
11489
11490 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11491 leak.
11492
957b3a3e 114932006-12-11 Marco Gerards <marco@gnu.org>
11494
11495 * normal/menu_entry.c (run): Fix off by one bug so the last line
11496 is executed. Move the loader check to outside the loop.
11497
ef875714 114982006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11499
11500 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11501
4e739985 115022006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11503
11504 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11505 the number of sectors. Reported by Andrey Shuvikov
11506 <mr_hyro@yahoo.com>.
f19dbdb7 11507
790707f2 115082006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11509
11510 * kern/disk.c (grub_disk_read): When there is a read error, always
11511 try to read only the necessary data.
f19dbdb7 11512
790707f2 11513 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11514 disk/raid.c.
11515 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11516 prototype.
11517 [GRUB_UTIL] (grub_raid_fini): Likewise.
11518 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 11519 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 11520 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11521 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11522 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11523 and grub_raid_fini().
f19dbdb7 11524
03e58196 115252006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11526
11527 * include/grub/types.h (__unused): Rename to UNUSED.
11528 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11529 (grub_elf64_size): Likewise.
f19dbdb7 11530
ae4f23bf 115312006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11532
11533 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11534 grub_error_push and grub_error_pop in the error-handling path.
11535 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11536 length.
11537
2166cc83 115382006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11539
11540 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11541 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11542 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11543 (kernel_elf_SOURCES): Likewise.
11544 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11545 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11546 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11547 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11548 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11549 (elf_mod_SOURCES): New variable.
11550 (elf_mod_CFLAGS): Likewise.
11551 (elf_mod_LDFLAGS): Likewise.
11552 * include/grub/types.h (__unused): New macro.
11553 * include/grub/elfload.h: New file.
11554 * kern/elf.c: Likewise.
11555 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11556 (ELF32_LOADMASK): New macro.
11557 (ELF64_LOADMASK): Likewise.
11558 (vmlinux): Removed.
11559 (grub_linux_load32): New function.
11560 (grub_linux_load64): Likewise.
11561 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11562 Use grub_elf_t instead of grub_file_t.
11563
a09d5aa5 115642006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11565
11566 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11567 `catch_result' to struct set_color_args.
11568
d976fc51 115692006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11570
11571 * normal/menu.c: Include grub/script.h.
11572 * normal/menu_entry.c: Likewise.
11573 * include/grub/normal.h: Do not include grub/script.h.
11574
67507549 115752006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11576
11577 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11578
69203a99 115792006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11580
11581 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11582 disk.
11583 (grub_disk_close): Print debug messages when closing a disk.
11584 (grub_disk_read): Print debug messages when disk read fails.
11585 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11586 filesystem type.
11587 * kern/partition.c: Include misc.h.
11588 (grub_partition_iterate): Print debug messages when detecting
11589 partition type.
11590
e2b8278c 115912006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11592
11593 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11594 is negative.
11595 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11596
97b2f2ff 115972006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11598
11599 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11600 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11601
6555d655 116022006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11603
11604 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11605 instead of sizeof(lv). Patch by Michael Guntsche.
11606
4d42b77f 116072006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11608
11609 * disk/lvm.c: Rename VGS to VG_LIST.
11610 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11611 (grub_lvm_open): Likewise.
11612 Thanks to Michael Guntsche for finding this bug.
11613
5d74d927 116142006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11615
11616 * configure.ac (AC_INIT): Bumped to 1.95.
11617
a1bb27e4 116182006-10-14 Robert Millan <rmh@aybabtu.com>
11619
11620 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11621 with "/dev/.static/dev/md".
11622
e0994b8b 116232006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11624
11625 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11626 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11627 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11628 DRIVE_NAME are always freed.
11629
11630 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11631 DOS_PART, as a DOS partition is counted from one instead of zero
11632 now. Reported by Robert Millan.
11633
ddd5cee9 116342006-10-14 Robert Millan <rmh@aybabtu.com>
11635
11636 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11637 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11638 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11639 string returned by grub_guess_root_device.
11640 * util/i386/pc/grub-setup.c: Likewise.
11641 * util/i386/pc/grub-probefs.c: Likewise.
11642
11643 * util/i386/pc/grub-probefs.c: Rename to ...
11644 * util/i386/pc/grub-probe.c: ... this.
11645 * DISTLIST: Remove grub-probefs, add grub-probe.
11646 * conf/i386-efi.rmk: Likewise.
11647 * conf/i386-pc.rmk: Likewise.
11648 * util/i386/pc/grub-install.in: Likewise.
11649
11650 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11651 choose which information we want to print.
11652
2b002173 116532006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11654
11655 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11656 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11657 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11658 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11659 video/readers/tga.c and video/i386/pc/vbeutil.c.
11660
116612006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11662
11663 Added support for RAID and LVM.
f19dbdb7 11664
2b002173 11665 * disk/lvm.c: New file.
11666 * disk/raid.c: Likewise.
11667 * include/grub/lvm.h: Likewise.
f19dbdb7 11668 * include/grub/raid.h: Likewise.
2b002173 11669 * include/grub/util/lvm.h: Likewise.
11670 * include/grub/util/raid.h: Likewise.
11671 * util/lvm.c: Likewise.
11672 * util/raid.c: Likewise.
11673
11674 * include/grub/disk.h (grub_disk_dev_id): Add
11675 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11676 (grub_disk_get_size): New prototype.
11677 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11678 returns a partition.
11679 (grub_disk_get_size): New function.
f19dbdb7 11680
2b002173 11681 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11682 verbatim if grub_install_dos_part is -2.
11683
11684 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11685 and LVM devices.
11686
11687 * util/i386/pc/grub-setup.c (setup): New argument
11688 MUST_EMBED. Force embedding of GRUB when the argument is
11689 true. Close FILE before returning.
11690 (main): Add support for RAID and LVM.
f19dbdb7 11691
2b002173 11692 * conf/common.rmk: Add RAID and LVM modules.
11693 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11694 util/lvm.c.
11695 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11696
11697 * kern/misc.c (grub_strstr): New function.
11698 * include/grub/misc.h (grub_strstr): New prototype.
11699
050548d0 117002006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11701
11702 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11703
da849d2d 117042006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11705
11706 * kern/misc.c (grub_strtoull): Guess the base only if not
11707 specified.
11708
97b2f2ff 117092006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 11710
11711 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11712 PowerMac support.
11713
97b2f2ff 117142006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 11715
11716 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11717
11718 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11719 Remove `flags' argument. All callers changed.
11720 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11721 (IEEE1275_IHANDLE_INVALID): New variable.
11722 (IEEE1275_CELL_INVALID): New variable.
11723 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11724 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11725 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11726 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11727 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11728 codes from Open Firmware. All callers updated.
11729 (grub_ieee1275_next_property): Directly return Open Firmware return
11730 code.
11731 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11732 Standardize error checking from `grub_ieee1275_get_property'.
11733 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11734 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11735
97b2f2ff 117362006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 11737
11738 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11739 `instance_to_package_args' to `instance_to_path_args'.
11740
11741 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11742 `grub_ieee1275_chosen'.
11743
11744 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11745 `grub_ieee1275_interpret'.
11746
97b2f2ff 117472006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 11748
11749 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11750
97b2f2ff 117512006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 11752
11753 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11754 (__cmpdi): Likewise.
11755
11756 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11757 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11758 `grub_ssize_t'.
11759
02bb8acc 11760 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 11761
11762 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11763 to type `grub_ssize_t'.
11764 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11765
7f9a8531 117662006-09-22 Marco Gerards <marco@gnu.org>
11767
11768 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11769 newlines.
11770
b5ef1102 117712006-09-22 Marco Gerards <marco@gnu.org>
11772
11773 * commands/echo.c: New file.
11774
11775 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11776
11777 * conf/common.rmk (echo_mod_SOURCES): New variable.
11778 (echo_mod_CFLAGS): Likewise.
11779 (echo_mod_LDFLAGS): Likewise.
11780
2cff3677 117812006-09-22 Marco Gerards <marco@gnu.org>
11782
11783 * normal/main.c (get_line): Malloc memory instead of using
11784 preallocated memory. Removed the arguments `cmdline' and
11785 `max_len'. Updated all callers.
11786
6ba4688b 117872006-09-22 Marco Gerards <marco@gnu.org>
11788
11789 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11790 (normal_mod_DEPENDENCIES): Likewise.
11791
11792 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11793 (normal_mod_DEPENDENCIES): Likewise.
11794
11795 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11796
e02ac02c 117972006-09-22 Johan Rydberg <jrydberg@gnu.org>
11798
11799 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11800 programs.
11801 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11802 (normal_mod_DEPENDENCIES): Likewise.
11803 * conf/i386-pc.mk: Regenerate.
11804 * conf/i386-efi.mk: Likewise
11805 * conf/common.mk: Likewise.
11806 * conf/powerpc-ieee1275.mk: Likewise.
11807 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11808
8d252e44 118092006-09-22 Robert Millan <rmh@aybabtu.com>
11810
11811 Sync with i386 version.
11812 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11813 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11814
209bf7ac 118152006-09-21 Robert Millan <rmh@aybabtu.com>
11816
11817 Import from GRUB Legacy (lib/device.c):
11818 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11819 (init_device_map) [__linux__]: Add support for I2O devices.
11820
6b146090 118212006-09-14 Marco Gerards <marco@gnu.org>
11822
11823 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11824 `-melf_i386'.
11825
e38600a8 118262006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11827
11828 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11829 /boot/grub/*.lst.
78fa1790 11830
2952da5d 11831 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11832
2952da5d 11833 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11834 before adding it to device.map.
11835
01b82a64 118362006-08-15 Johan Rydberg <jrydberg@gnu.org>
11837
fe6b695a 11838 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11839 compiles a file; using the -MD option.
11840 * conf/common.mk: Regenerate.
11841 * conf/i386-pc.mk: Likewise.
11842 * conf/i386-efi.mk: Likewise.
11843 * conf/powerpc-ieee1275.mk: Likewise.
11844 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11845
1064790d 118462006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11847
11848 Move the prototypes of grub_setjmp and grub_longjmp to
11849 cpu/setjmp.h, so that each architecture may specify different
11850 attributes.
f19dbdb7 11851
1064790d 11852 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11853 (grub_longjmp): Likewise.
11854 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11855 (grub_longjmp): Likewise.
11856 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11857 (grub_longjmp): Likewise.
11858
11859 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11860 [!GRUB_UTIL] (grub_longjmp): Removed.
11861
29dda3ed 118622006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11863
11864 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11865 "color!" method does not return any value.
11866
ad2a06ed 118672006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11868
11869 * include/grub/bitmap.h: New file.
11870
11871 * include/grub/i386/pc/vbeutil.h: Likewise.
11872
11873 * video/bitmap.c: Likewise.
11874
11875 * video/readers/tga.c: Likewise.
11876
11877 * video/i386/pc/vbeutil.c: Likewise.
11878
11879 * commands/videotest.c: Code cleanup and updated to reflect to new
11880 video API.
11881
11882 * term/gfxterm.c: Likewise.
11883
11884 * video/video.c: Likewise.
11885
11886 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11887 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11888 (bitmap_mod_SOURCES): New entry.
11889 (bitmap_mod_CFLAGS): Likewise.
11890 (bitmap_mod_LDFLAGS): Likewise.
11891 (tga_mod_SOURCES): Likewise.
11892 (tga_mod_CFLAGS): Likewise.
11893 (tga_mod_LDFLAGS): Likewise.
11894
11895 * include/grub/video.h (grub_video_blit_operators): New enum type.
11896 (grub_video_render_target): Changed as forward declaration and moved
11897 actual definition to be video driver specific.
11898 (grub_video_adapter.blit_bitmap): Added blitting operator.
11899 (grub_video_adapter.blit_render_target): Likewise.
11900 (grub_video_blit_bitmap): Likewise.
11901 (grub_video_blit_render_target): Likewise.
11902
11903 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11904 driver specific render target definition.
11905 (grub_video_vbe_map_rgba): Added driver internal helper.
11906 (grub_video_vbe_unmap_color): Updated to use
11907 grub_video_i386_vbeblit_info.
11908 (grub_video_vbe_get_video_ptr): Likewise.
11909
11910 * include/grub/i386/pc/vbeblit.h
11911 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11912 grub_video_i386_vbeblit_info.
11913 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11914 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11915 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11916 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11917 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11918 (grub_video_i386_vbeblit_index_index): Likewise.
11919 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11920 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11921 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11922 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11923 operator.
11924 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11925 operator.
11926
11927 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11928 include/grub/i386/pc/vbeblit.h.
11929
11930 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11931 Updated to use grub_video_i386_vbeblit_info.
11932 (grub_video_i386_vbefill_R8G8B8): Likewise.
11933 (grub_video_i386_vbefill_index): Likewise.
11934 (grub_video_i386_vbefill): Added generic filler.
11935
11936 * video/i386/pc/vbefill.c: Updated to reflect changes on
11937 include/grub/i386/pc/vbefill.h.
11938
11939 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11940 grub_video_i386_vbeblit_info.
11941 (grub_video_vbe_unmap_color): Likewise.
11942 (grub_video_vbe_blit_glyph): Likewise.
11943 (grub_video_vbe_scroll): Likewise.
11944 (grub_video_vbe_draw_pixel): Removed function.
11945 (grub_video_vbe_get_pixel): Likewise.
11946 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11947 updated code to use it.
11948 (common_blitter): Added common blitter for render target and bitmap.
11949 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11950 (grub_video_vbe_blit_render_target): Likewise.
11951
bc8c036d 119522006-07-30 Johan Rydberg <jrydberg@gnu.org>
11953
11954 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11955 is in text mode if there is no console control protocol instance
11956 available.
11957
684a8eff 119582006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11959
11960 * include/grub/video.h: Code cleanup.
11961
11962 * include/grub/i386/pc/vbe.h: Likewise.
11963
11964 * video/i386/pc/vbe.c: Likewise.
11965
11966 * video/i386/pc/vbeblit.c: Likewise.
11967
11968 * video/i386/pc/vbefill.c: Likewise.
11969
11970 * video/video.c: Likewise. Also added more comments.
11971
5915059b 119722006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11973
11974 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11975 (struct grub_biosdisk_dap): Likewise.
11976
11977 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11978 linkage settings for all functions.
11979
90ce5d56 119802006-07-12 Marco Gerards <marco@gnu.org>
11981
11982 * configure.ac (--enable-mm-debug): Fix typo.
11983
11984 * genkernsyms.sh.in: Use proper quoting for `CC'.
11985
43e7f879 119862006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11987
11988 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11989 (normal_mod_ASFLAGS): Remove "-m32".
11990
4889bdec 119912006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11992
11993 * util/misc.c: Include config.h.
11994 [!HAVE_MEMALIGN]: Do not include malloc.h.
11995 (grub_memalign): Use posix_memalign, if present. Then, use
11996 memalign, if present. Otherwise, emit an error.
11997
11998 * util/grub-emu.c: Do not include malloc.h.
11999
12000 * include/grub/util/misc.h: Include unistd.h. This is required for
12001 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12002 D. Eades III <hde@foobar-qux.org>.
12003
12004 * configure.ac (AC_GNU_SOURCE): Added.
12005 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12006 type.
12007
fd39d4da 120082006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12009
12010 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12011 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12012
b786f3b5 120132006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12014
12015 * include/grub/types.h (grub_host_addr_t): Rename to
12016 grub_target_addr_t.
12017 (grub_host_off_t): Rename to grub_target_off_t.
12018 (grub_host_size_t): Rename to grub_target_size_t.
12019 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12020 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12021
12022 * include/grub/kernel.h (struct grub_module_header): Change type
12023 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12024 (grub_module_info): Likewise.
f19dbdb7 12025
051988bb 120262006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12027
12028 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12029 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12030 Velazquez <jesus.velazquez@gmail.com>.
12031
deae281b 120322006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12033
12034 Count partitions from 1 instead of 0 in the string representation
12035 of partitions. Still use 0-based internally.
f19dbdb7 12036
deae281b 12037 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12038 (sun_partition_map_iterate): Use grub_partition_t instead of
12039 struct grub_partition *. Cast DESC->START_CYLINDER to
12040 grub_uint64_t after converting the endian.
12041 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12042 (sun_partition_map_get_name): Add 1 to P->INDEX.
12043
12044 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12045 PCDATA->DOS_PART.
12046 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12047
12048 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12049 zero instead of one.
12050 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12051 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12052
12053 * partmap/apple.c (apple_partition_map_iterate): Change the type
12054 of POS to unsigned.
12055 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12056 (apple_partition_map_get_name): Add 1 into P->INDEX.
12057
12058 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12059 of POS to unsigned.
12060 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12061 calculate the offset of a partition.
12062 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12063 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12064
12065 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12066 SECTOR to grub_disk_addr_t.
12067 (acorn_partition_map_iterate): Likewise.
12068 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12069 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12070 top.
12071 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12072
12073 * kern/i386/pc/init.c (make_install_device): Add 1 into
12074 GRUB_INSTALL_DOS_PART.
12075
12076 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12077 conditional.
12078
524a1e6a 120792006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12080
12081 Clean up the code to support 64-bit addressing in disks and
12082 files. This change is not enough for filesystems yet.
f19dbdb7 12083
524a1e6a 12084 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12085 type of "start" to grub_uint64_t.
12086 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12087 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12088 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12089 convert addresses.
12090
12091 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12092 to grub_disk_addr_t.
12093
12094 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12095 string.
12096
12097 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12098
12099 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12100 to char *.
12101
12102 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12103
12104 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12105
12106 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12107
12108 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12109 to grub_off_t, to detect an error from grub_file_seek.
12110 (grub_multiboot_load_elf32): Likewise.
12111
12112 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12113 maximum unsigned long value when an overflow is detected.
12114 (grub_strtoull): New function.
12115 (grub_divmod64): Likewise.
12116 (grub_lltoa): use grub_divmod64.
12117
12118 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12119 grub_disk_addr_t.
12120 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12121 the pointer to next character. Use grub_strtoull instead of
12122 grub_strtoul.
12123 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12124 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12125 respectively.
12126
fe6b695a 12127 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 12128 return value is signed.
12129 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12130 test if OFFSET is less than zero, as OFFSET is unsigned now.
12131
12132 * kern/disk.c (struct grub_disk_cache): Change the type of
12133 "sector" to grub_disk_addr_t.
12134 (grub_disk_cache_get_index): Change the type of SECTOR to
12135 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12136 unsigned after shifting.
12137 (grub_disk_cache_invalidate): Change the type of SECTOR to
12138 grub_disk_addr_t.
12139 (grub_disk_cache_unlock): Likewise.
12140 (grub_disk_cache_store): Likewise.
12141 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12142 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12143 grub_disk_addr_t and grub_uint64_t, respectively.
12144 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12145 body, as the value of OFFSET is tweaked by
12146 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12147 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12148 respectively.
12149 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12150 body, as the value of OFFSET is tweaked by
12151 grub_disk_check_range. Change the types of LEN and N to
12152 grub_size_t.
12153
12154 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12155 and "saved_offset" to grub_off_t.
12156 (test_header): Cast BUF to char *.
12157 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12158 to char *.
12159 (grub_gzio_read): Change the types of OFFSET and SIZE to
12160 grub_off_t and grub_size_t, respectively.
12161
12162 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12163 Removed.
12164 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12165 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12166 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12167 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12168 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12169
12170 * include/grub/types.h (grub_off_t): Unconditionally set to
12171 grub_uint64_t.
12172 (grub_disk_addr_t): Changed to grub_uint64_t.
12173
12174 * include/grub/partition.h (struct grub_partition): Change the
12175 types of "start", "len" and "offset" to grub_disk_addr_t,
12176 grub_uint64_t and grub_disk_addr_t, respectively.
12177 (grub_partition_get_start): Return grub_disk_addr_t.
12178 (grub_partition_get_len): Return grub_uint64_t.
12179
12180 * include/grub/misc.h (grub_strtoull): New prototype.
12181 (grub_divmod64): Likewise.
12182
12183 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12184 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12185 grub_off_t, respectively.
12186 All callers and references changed.
12187
12188 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12189 grub_size_t in "read".
12190 All callers and references changed.
12191
12192 * include/grub/file.h (struct grub_file): Change the types of
12193 "offset" and "size" to grub_off_t and grub_off_t,
12194 respectively. Change the type of SECTOR to grub_disk_addr_t in
12195 "read_hook".
12196 (grub_file_read): Change the type of LEN to grub_size_t.
12197 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12198 grub_off_t.
12199 (grub_file_size): Return grub_off_t.
12200 (grub_file_tell): Likewise.
12201 All callers and references changed.
12202
12203 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12204 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12205 "write".
12206 (struct grub_disk): Change the type of "total_sectors" to
12207 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 12208 "read_hook".
524a1e6a 12209 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12210 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12211 (grub_disk_write): Likewise.
12212 All callers and references changed.
12213
12214 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12215 char * for grub_strncmp to silence gcc.
12216 (grub_iso9660_mount): Likewise.
12217 (grub_iso9660_mount): Likewise.
12218 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12219 return statement.
12220 (grub_iso9660_iterate_dir): Likewise.
12221 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12222
12223 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12224 LEN to grub_disk_addr_t and grub_size_t, respectively.
12225
12226 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12227
12228 * fs/jfs.c (grub_jfs_read_file): Likewise.
12229
12230 * fs/minix.c (grub_jfs_read_file): Likewise.
12231
12232 * fs/sfs.c (grub_jfs_read_file): Likewise.
12233
12234 * fs/ufs.c (grub_jfs_read_file): Likewise.
12235
12236 * fs/xfs.c (grub_jfs_read_file): Likewise.
12237
12238 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12239 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12240 respectively.
12241
12242 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12243 BLKNR to -1 instead of returning GRUB_ERRNO.
12244 (grub_ext2_read_file): Change the types of SECTOR and
12245 LEN to grub_disk_addr_t and grub_size_t, respectively.
12246
12247 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12248 LEN to grub_disk_addr_t and grub_size_t, respectively.
12249
12250 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12251 grub_file_read.
12252
12253 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12254 string. Do not cast SECTOR explicitly.
12255
12256 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12257 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12258 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12259 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12260 over 2TB and LBA mode is not supported, raise an error.
12261 (get_safe_sectors): New function.
12262 (grub_biosdisk_read): Use get_safe_sectors.
12263 (grub_biosdisk_write): Likewise.
12264
12265 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12266 (grub_efidisk_write): Likewise.
12267
12268 * disk/loopback.c (delete_loopback): Cosmetic changes.
12269 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12270 correctly.
12271 (grub_loopback_open): Likewise.
12272 (grub_loopback_read): Likewise. Also, change the type of POS to
12273 grub_off_t, and fix the usage of grub_memset.
12274
12275 * commands/i386/pc/play.c: Include grub/machine/time.h.
12276
12277 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12278 print FILE->SIZE.
12279
12280 * commands/configfile.c: Include grub/env.h.
12281
12282 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12283 GRUB_ERRNO directly instead. Change the type of POS to
12284 grub_off_t. Follow the coding standard.
12285
12286 * commands/blocklist.c: Include grub/partition.h.
12287 (grub_cmd_blocklist): Return an error if the underlying device is
12288 not a disk. Take the starting sector of a partition into account,
12289 if a partition is used.
12290
12291 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12292 a length field.
12293 (lba_mode): Support 64-bit addresses.
12294 (chs_mode): Likewise.
12295 (copy_buffer): Adapted to the new offsets of a length field and a
12296 segment field.
12297 (blocklist_default_start): Allocate 64-bit space.
12298
12299 * boot/i386/pc/boot.S (force_lba): Removed.
12300 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 12301 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 12302 space.
12303 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12304 is useless.
12305 (lba_mode): Refactored to support a 64-bit address. More size
12306 optimization.
12307 (setup_sectors): Likewise.
12308
53af98ad 123092006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12310
12311 * DISTLIST: Added include/grub/i386/linux.h. Removed
12312 include/grub/i386/pc/linux.h
12313
12314 * configure.ac (AC_INIT): Bumped to 1.94.
12315
12316 * config.guess: Updated from gnulib.
12317 * config.sub: Likewise.
12318 * install-sh: Likewise.
12319 * mkinstalldirs: Likewise.
12320
b4c1940a 123212006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12322
12323 * conf/common.rmk (grub_modules_init.lst): Depended on
12324 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12325 MODSRCFILES.
12326
12327 * genmk.rb (PModule::rule): Reverted the previous change.
12328
cfca1cfd 123292006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12330
12331 * conf/common.rmk (grub_modules_init.lst): Depends on
12332 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12333 that the target does not exist before producing.
12334 (grub_modules_init.h): Remove the target before generating.
12335 (grub_emu_init.c): Likewise.
12336
12337 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12338
aa6d7826 123392006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12340
12341 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12342 for the target-specific tests. Make sure that we also have the
12343 up-to-date target variables for those tests.
12344
26c607b9 123452006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12346
12347 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12348 (PModule::rule): Likewise.
12349
0162321a 123502006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12351
12352 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12353 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12354 target-specific flags should be prefixed.
12355 (PModule::rule): Likewise.
12356
6c826348 123572006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12358
12359 * configure.ac (CMP): Check if cmp is available explicitly.
12360
b977bf01 123612006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12362
12363 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12364 (target_cpu): New variable.
12365 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 12366
b977bf01 12367 * util/i386/pc/grub-install.in (host_cpu): Removed.
12368 (target_cpu): New variable.
12369 (pkglibdir): Use target_cpu instead of host_cpu.
12370
12371 * util/genmoddep.c: Removed.
f19dbdb7 12372
b977bf01 12373 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12374 instead of GRUB_HOST_SIZEOF_VOID_P.
12375 * kern/dl.c: Likewise.
12376
12377 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12378 ...
12379 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12380 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12381 (GRUB_TARGET_SIZEOF_LONG): ... this.
12382 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12383 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12384 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12385 to ...
12386 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12387 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12388 (GRUB_TARGET_SIZEOF_LONG): ... this.
12389 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12390 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12391 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12392 to ...
12393 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12394 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12395 (GRUB_TARGET_SIZEOF_LONG): ... this.
12396 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12397 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12398
12399 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12400 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12401 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12402 instead of GRUB_HOST_SIZEOF_LONG.
12403 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12404 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12405 GRUB_CPU_WORDS_BIGENDIAN.
12406 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12407 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12408 grub_host_ssize_t.
12409
12410 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12411 (genmoddep_SOURCES): Likewise.
12412 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12413 (genmoddep_SOURCES): Likewise.
12414 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12415 (genmoddep_SOURCES): Likewise.
12416 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12417 Likewise.
12418 (genmoddep_SOURCES): Likewise.
12419
12420 * genmoddep.awk: New file.
12421
12422 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12423 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12424 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12425 (PModule::rule): Likewise.
12426 (Program::rule): Likewise.
12427 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12428 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12429 respectively.
12430
12431 * configure.ac: Rewritten intensively to use host and target
12432 instead of build and host, respectively.
12433
12434 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12435 (host_cpu): Removed.
12436 (target_cpu): New variable.
12437 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12438 (BUILD_CC): Removed.
12439 (BUILD_CFLAGS): Likewise.
12440 (BUILD_CPPFLAGS): Likewise.
12441 (TARGET_CC): New variable.
12442 (TARGET_CFLAGS): Likewise.
12443 (TARGET_CPPFLAGS): Likewise.
12444 (TARGET_LDFLAGS): Likewise.
12445 (AWK): Likewise.
12446 (include): Use target_cpu instead of host_cpu.
12447 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 12448
b977bf01 12449 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12450
f09771a1 124512006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12452
12453 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12454 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12455 field 'false' to 'exec_on_false'.
12456 (grub_script_create_cmdif): Renamed argument names to reflect above
12457 changes.
12458
12459 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12460
12461 * normal/script.c (grub_script_create_cmdif): Likewise.
12462
118f4fb3 124632006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12464
12465 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12466 top.
12467 (grub_hfsplus_btree_recptr): Likewise.
12468 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12469 FILEBLOCK both to pass a block number and store next block
12470 number.
12471 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12472 overflow file correctly. Specify errors appropriately, because
12473 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12474 grub_hfsplus_btree_recptr to get the pointer to a found key.
12475 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12476 is found.
12477
12478 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12479 linux.mod.
12480 (_linux_mod_SOURCES): New variable.
12481 (_linux_mod_CFLAGS): Likewise.
12482 (_linux_mod_LDFLAGS): Likewise.
12483 (linux_mod_SOURCES): Likewise.
12484 (linux_mod_CFLAGS): Likewise.
12485 (linux_mod_LDFLAGS): Likewise.
12486
12487 * DISTLIST: Added loader/i386/efi/linux.c,
12488 loader/i386/efi/linux_normal.c and
12489 include/grub/i386/efi/loader.h.
12490
12491 * loader/i386/efi/linux.c: New file.
12492 * loader/i386/efi/linux_normal.c: Likewise.
12493 * include/grub/i386/efi/loader.h: Likewise.
12494
89a7d726 124952006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12496
12497 * commands/blocklist.c: New file.
12498
12499 * DISTLIST: Added commands/blocklist.c.
12500
12501 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 12502 color for the background, and a darker color for the foreground.
89a7d726 12503 (grub_console_checkkey): Return READ_KEY.
12504 (grub_console_cls): Set the background to
12505 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12506
12507 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12508
12509 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12510 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12511
12512 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12513 prototype.
12514
12515 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12516 BG. The spec is wrong again.
12517
12518 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12519 prototype.
12520 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12521
12522 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12523 commands/blocklist.c.
12524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 12525
89a7d726 12526 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12527 (blocklist_mod_SOURCES): New variable.
12528 (blocklist_mod_CFLAGS): Likewise.
12529 (blocklist_mod_LDFLAGS): Likewise.
12530
75c8f258 125312006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12532
12533 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12534 duplication.
12535 (lba_mode): Use %eax more intensively to reduce the code size.
12536
da2eb181 125372006-05-20 Marco Gerards <marco@gnu.org>
12538
12539 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12540
12541 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12542 for `menuentry'.
12543 (script): Accept leading newlines.
12544 (newlines): New rule to describe 0 or more newlines.
12545 (commands): Accept `command' with trailing newline. Fixed the
12546 order in which arguments were passed to `grub_script_add_cmd'.
12547 Accept commands separated by newlines.
12548 (function): Changed to accept newlines.
12549 (menuentry) Rewritten.
12550
12551 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12552 front of the list, instead of to the end.
12553
577b4050 125542006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12555
12556 * util/i386/pc/grub-install.in (bindir): New variable.
12557 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12558 Shaver <lbgwjl@gmail.com>.
12559
0d6e1189 125602006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12561
12562 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12563 grub/machine/linux.h
12564 * loader/i386/pc/linux.c: Likewise.
12565
12566 * include/grub/i386/pc/linux.h: Moved to ...
12567 * include/grub/i386/linux.h: ... here.
12568
12569 * include/grub/i386/linux.h (struct linux_kernel_params): New
12570 struct.
f19dbdb7 12571
31b86e9f 125722006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12573
12574 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12575 checking.
12576 (grub_video_vbe_blit_glyph): Likewise.
12577 (grub_video_vbe_blit_bitmap): Likewise.
12578 (grub_video_vbe_blit_render_target): Likewise.
12579
83b984de 125802006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12581
12582 * configure.ac (--with-platform): Properly quote the square
12583 brackets.
12584
5f0413bd 125852006-05-08 Marco Gerards <marco@gnu.org>
12586
12587 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12588 this...
12589 (kernel_elf_HEADERS): ...to this. Updated all users.
12590 (grubof_symlist.c): Renamed from this...
12591 (kernel_elf_symlist.c): ...to this. Updated all users.
12592 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12593 (grubof_SOURCES): Renamed from this...
12594 (kernel_elf_SOURCES): ...to this.
12595 (grubof_HEADERS): Renamed from this...
12596 (kernel_elf_HEADERS): ...to this.
12597 (grubof_CFLAGS): Renamed from this...
12598 (kernel_elf_CFLAGS): ...to this.
12599 (grubof_ASFLAGS): Renamed from this...
12600 (kernel_elf_ASFLAGS): ...to this.
12601 (grubof_LDFLAGS): Renamed from this...
12602 (kernel_elf_LDFLAGS): ...to this.
12603
12604 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12605 this...
12606 (kernel_elf_HEADERS): ...to this. Updated all users.
12607 (grubof_symlist.c): Renamed from this...
12608 (kernel_elf_symlist.c): ...to this. Updated all users.
12609 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12610 (grubof_SOURCES): Renamed from this...
12611 (kernel_elf_SOURCES): ...to this.
12612 (grubof_HEADERS): Renamed from this...
12613 (kernel_elf_HEADERS): ...to this.
12614 (grubof_CFLAGS): Renamed from this...
12615 (kernel_elf_CFLAGS): ...to this.
12616 (grubof_ASFLAGS): Renamed from this...
12617 (kernel_elf_ASFLAGS): ...to this.
12618 (grubof_LDFLAGS): Renamed from this...
12619 (kernel_elf_LDFLAGS): ...to this.
12620
12621 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12622 `kernel.elf' instead of `grubof'.
12623
05568c2e 126242006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12625
12626 Add --with-platform to configure. Use pkglibdir instead of
12627 pkgdatadir. This is reported by Roger Leigh.
12628
12629 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12630 (host_vendor): Likewise.
12631 (host_os): Likewise.
12632 (pkgdatadir): Likewise.
12633 (platform): New variable.
12634 (pkglibdir): Likewise.
12635 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 12636
05568c2e 12637 * util/i386/pc/grub-install.in (datadir): Removed.
12638 (host_vendor): Likewise.
12639 (host_os): Likewise.
12640 (pkgdatadir): Likewise.
12641 (platform): New variable.
12642 (pkglibdir): Likewise.
12643 Use PKGLIBDIR instead of PKGDATADIR.
12644
12645 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12646 instead of GRUB_DATADIR.
12647 (main): Likewise.
12648 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12649 (main): Likewise.
12650 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12651 (main): Likewise.
12652
12653 * configure.ac (--with-platform): New option.
12654 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12655
12656 * Makefile.in: Include a makefile based on PLATFORM instead of
12657 HOST_VENDOR.
12658 (pkgdatadir): Not appended by the machine type.
12659 (pkglibdir): Appended by the machine type.
12660 (host_vendor): Removed.
12661 (platform): New variable.
12662 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12663 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12664 (uninstall): Likewise.
12665
4e93851c 126662006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12667
12668 Use the environment context in the menu. Remove the commands
12669 "default" and "timeout", and use variables instead.
f19dbdb7 12670
4e93851c 12671 * normal/menu.c: Include grub/env.h.
12672 (print_entry): Cast TITLE to silence gcc.
12673 (get_timeout): New function.
12674 (set_timeout): Likewise.
12675 (get_entry_number): Likewise.
12676 (run_menu): Use a default entry, a fallback entry and a timeout
12677 in the environment variables "default", "fallback" and
12678 "timeout". Also, tweak the default entry if it is not within the
12679 current menu entries.
12680 (grub_menu_run): Use a fallback entry in the environment variable
12681 "fallback".
12682
12683 * normal/main.c (read_config_file): Do not initialize
12684 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12685 NEWMENU->TIMEOUT.
12686 (grub_normal_execute): Use a data slot to store the menu.
12687
12688 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12689 fallback_entry and timeout.
12690 (struct grub_menu_list): Removed.
12691 (grub_menu_list_t): Likewise.
12692 (struct grub_context): Likewise.
12693 (grub_context_t): Likewise.
12694 (grub_context_get): Likewise.
12695 (grub_context_get_current_menu): Likewise.
12696 (grub_context_push_menu): Likewise.
12697 (grub_context_pop_menu): Likewise.
12698 (grub_default_init): Likewise.
12699 (grub_default_fini): Likewise.
12700 (grub_timeout_init): Likewise.
12701 (grub_timeout_fini): Likewise.
12702
12703 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12704 and timeout.mod.
12705 (normal_mod_SOURCES): Removed normal/context.c.
12706
12707 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12708 commands/default.c, commands/timeout.c and normal/context.c.
12709 (normal_mod_SOURCES): Removed normal/context.c.
12710
12711 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12712 commands/timeout.c and normal/context.c.
12713 (normal_mod_SOURCES): Removed normal/context.c.
12714
12715 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12716 commands/default.c, commands/timeout.c and normal/context.c.
12717 (normal_mod_SOURCES): Removed normal/context.c.
12718
12719 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12720 timeout.mod.
12721 (default_mod_SOURCES): Removed.
12722 (default_mod_CFLAGS): Likewise.
12723 (default_mod_LDFLAGS): Likewise.
12724 (timeout_mod_SOURCES): Removed.
12725 (timeout_mod_CFLAGS): Likewise.
12726 (timeout_mod_LDFLAGS): Likewise.
12727
12728 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12729 normal/context.c.
12730
12731 * commands/default.c: Removed.
12732 * commands/timeout.c: Likewise.
12733 * normal/context.c: Likewise.
12734
1eb9cc1d 127352006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12736
12737 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12738
385bd9c1 127392006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12740
12741 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12742 "next" to "prev" for readability.
12743 (struct grub_env_sorted_var): New struct.
12744 (grub_env_context): Renamed to ...
12745 (initial_context): ... this.
12746 (grub_env_var_context): Renamed to ...
12747 (current_context): ... this.
12748 (grub_env_find): Look only at CURRENT_CONTEXT.
12749 (grub_env_context_open): Rewritten to copy exported variables from
12750 previous context.
12751 (grub_env_context_close): Rewritten according to the new
12752 scheme. Also, add an assertion to prevent the initial context from
12753 removed.
12754 (grub_env_insert): Removed the code for the sorted list.
12755 (grub_env_remove): Likewise.
12756 (grub_env_export): Simply mark the variable with
12757 GRUB_ENV_VAR_GLOBAL.
12758 (grub_env_set): A cosmetic change for naming consistency.
12759 (grub_env_get): Likewise.
12760 (grub_env_unset): Likewise.
12761 (grub_env_iterate): Rewritten to sort variables within this
12762 function.
12763 (grub_register_variable_hook): Fixed for naming consistency. Call
12764 grub_env_find again, only if NAME is not found at the first time.
12765 (mangle_data_slot_name): New function.
12766 (grub_env_set_data_slot): Likewise.
12767 (grub_env_get_data_slot): Likewise.
12768 (grub_env_unset_data_slot): Likewise.
12769
12770 * include/grub/env.h (grub_env_var_type): New enum.
12771 (GRUB_ENV_VAR_LOCAL): New constant.
12772 (GRUB_ENV_VAR_GLOBAL): Likewise.
12773 (GRUB_ENV_VAR_DATA): Likewise.
12774 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12775 "type".
12776 (grub_env_set): Replace VAR with NAME for consistency.
12777 (grub_register_variable_hook): Likewise.
12778 (grub_env_export): Specify the name of the argument.
12779 (grub_env_set_data_slot): New prototype.
12780 (grub_env_get_data_slot): Likewise.
12781 (grub_env_unset_data_slot): Likewise.
12782
7f362539 127832006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12784
12785 Extend the loader so that GRUB can accept a loader which comes
12786 back to GRUB when a loaded image exits. Also, this change adds
12787 support for a chainloader on EFI.
f19dbdb7 12788
7f362539 12789 * term/efi/console.c: Include grub/misc.h.
12790 (grub_console_checkkey): Display a scan code on the top for
12791 debugging. This will be removed once the EFI port gets stable.
12792 Correct the scan code mapping.
12793
12794 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12795 allocate memory from larger regions, in order to reduce the number
12796 of allocated regions. Otherwise, the MacOSX loader panics.
12797 (filter_memory_map): Avoid less than 1MB for compatibility with
12798 other loaders.
12799 (add_memory_regions): Allocate from the tail of a region, if
12800 possible, to avoid allocating a region near to 1MB, for the MacOSX
12801 loader.
12802
12803 * kern/efi/init.c (grub_efi_set_prefix): Specify
12804 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12805
12806 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12807 argument IMAGE_HANDLE and specify it to get a loaded image.
12808 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12809 grub_efi_get_loaded_image.
fe6b695a 12810 (grub_efi_get_filename): Divide the length by the size of
7f362539 12811 grub_efi_char16_t.
12812 (grub_efi_get_device_path): New function.
12813 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12814 the length by the size of grub_efi_char16_t for a file path device
12815 path node.
12816
12817 * kern/loader.c (grub_loader_noreturn): New variable.
12818 (grub_loader_set): Accept a new argument NORETURN. Set
12819 GRUB_LOADER_NORETURN to NORETURN.
12820 All callers changed.
12821 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12822 grub_machine_fini.
12823
12824 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12825 prototype.
12826 (grub_efi_get_loaded_image): Take an argument to specify an image
12827 handle.
12828
12829 * include/grub/loader.h (grub_loader_set): Added one more argument
12830 NORETURN.
12831
12832 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12833 instead of grub_efi_open_protocol.
12834 (grub_efidisk_get_device_name): Likewise.
12835 (grub_efidisk_close): Print a newline.
12836 (grub_efidisk_get_device_handle): Fixed to use
12837 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12838 GRUB_EFI_DEVICE_PATH_TYPE.
12839
12840 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12841 * kern/efi/efi.c (device_path_guid): ... here.
12842
12843 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12844 chain.mod.
12845 (kernel_mod_HEADERS): Added efi/disk.h.
12846 (_chain_mod_SOURCES): New variable.
12847 (_chain_mod_CFLAGS): Likewise.
12848 (_chain_mod_LDFLAGS): Likewise.
12849 (chain_mod_SOURCES): Likewise.
12850 (chain_mod_CFLAGS): Likewise.
12851 (chain_mod_LDFLAGS): Likewise.
12852
12853 * DISTLIST: Added include/grub/efi/chainloader.h,
12854 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12855
12856 * include/grub/efi/chainloader.h: New file.
12857 * loader/efi/chainloader.c: Likewise.
12858 * loader/efi/chainloader_normal.c: Likewise.
12859
c0111d6e 128602006-04-30 Marco Gerards <marco@gnu.org>
12861
12862 * commands/configfile.c (grub_cmd_source): New function.
12863 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12864 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12865
df5341da 128662006-04-30 Marco Gerards <marco@gnu.org>
12867
12868 * normal/execute.c (grub_script_execute_cmd): Change the return
12869 type to `grub_err_t'. Correctly return the error.
12870 (grub_script_execute_cmdline): In case a command line is not a
12871 command or a function, try to interpret it as an assignment.
12872
f85934bd 128732006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12874
12875 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12876 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12877 skip a node whose name is obviously invalid as UTF-16,
12878 i.e. contains a NUL character. Stop the iteration when the last
12879 directory entry is found. Instead of using the return value of
12880 grub_hfsplus_btree_iterate_node, store the value in RET and use
12881 it, because the iterator can be stopped by the last directory
12882 entry.
12883
8f8a2cf8 128842006-04-30 Marco Gerards <marco@gnu.org>
12885
12886 * include/grub/env.h (grub_env_export): New prototype. Reported
12887 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12888
a27e84ce 128892006-04-30 Marco Gerards <marco@gnu.org>
12890
12891 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12892 size of the extents in a catalog file record.
12893
eaef0553 128942006-04-29 Marco Gerards <marco@gnu.org>
12895
12896 * commands/configfile.c (grub_cmd_configfile): Execute the
12897 configfile within its own context.
12898
12899 * include/grub/env.h (grub_env_context_open): New prototype.
12900 (grub_env_context_close): Likewise.
12901
12902 * kern/env.c (grub_env): Removed.
12903 (grub_env_sorted): Likewise.
12904 (grub_env_context): New variable.
12905 (grub_env_var_context): Likewise.
12906 (grub_env_find): Search both the active context and the global
12907 context.
12908 (grub_env_context_open): New function.
12909 (grub_env_context_close): Likewise.
12910 (grub_env_insert): Likewise.
12911 (grub_env_remove): Likewise.
12912 (grub_env_export): Likewise.
12913 (grub_env_set): Changed to use helper functions to avoid code
12914 duplication.
12915 (grub_env_iterate): Rewritten so both the current context and the
12916 global context are being used.
12917
12918 * normal/command.c (export_command): New function.
12919 (grub_command_init): Register the `export' function.
12920
7b455f4d 129212006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12922
12923 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12924 explicitly to suppress gcc's warnings.
12925 * fs/fat.c (grub_fat_find_dir): Likewise.
12926 (grub_fat_label): Likewise.
12927 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12928 (grub_xfs_mount): Likewise.
12929 (grub_xfs_label): Likewise.
12930 * fs/affs.c (grub_affs_mount): Likewise.
12931 (grub_affs_label): Likewise.
12932 (grub_affs_iterate_dir): Likewise.
12933 * fs/sfs.c (grub_sfs_mount): Likewise.
12934 (grub_sfs_iterate_dir): Likewise.
12935 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12936 * fs/hfs.c (grub_hfs_mount): Likewise.
12937 (grub_hfs_cmp_catkeys): Likewise.
12938 (grub_hfs_find_dir): Likewise.
12939 (grub_hfs_dir): Likewise.
12940 (grub_hfs_label): Likewise.
12941 * fs/jfs.c (grub_jfs_mount): Likewise.
12942 (grub_jfs_opendir): Likewise.
12943 (grub_jfs_getent): Likewise.
12944 (grub_jfs_lookup_symlink): Likewise.
12945 (grub_jfs_label): Likewise.
12946 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12947 (grub_hfsplus_iterate_dir): Likewise.
12948 (grub_hfsplus_btree_iterate_node): Made static.
12949
12950 * util/grub-emu.c (prefix): New variable.
12951 (grub_machine_set_prefix): New function.
12952 (main): Do not set the environment variable "prefix" here. Only
12953 set PREFIX, which is used later by grub_machine_set_prefix.
12954
12955 * include/grub/video.h: Do not include grub/symbol.h.
12956 (grub_video_register): Not exported. This symbol is not defined in
12957 the kernel.
12958 (grub_video_unregister): Likewise.
12959 (grub_video_iterate): Likewise.
12960 (grub_video_setup): Likewise.
12961 (grub_video_restore): Likewise.
12962 (grub_video_get_info): Likewise.
12963 (grub_video_get_blit_format): Likewise.
12964 (grub_video_set_palette): Likewise.
12965 (grub_video_get_palette): Likewise.
12966 (grub_video_set_viewport): Likewise.
12967 (grub_video_get_viewport): Likewise.
12968 (grub_video_map_color): Likewise.
12969 (grub_video_map_rgb): Likewise.
12970 (grub_video_map_rgba): Likewise.
12971 (grub_video_fill_rect): Likewise.
12972 (grub_video_blit_glyph): Likewise.
12973 (grub_video_blit_bitmap): Likewise.
12974 (grub_video_blit_render_target): Likewise.
12975 (grub_video_scroll): Likewise.
12976 (grub_video_swap_buffers): Likewise.
12977 (grub_video_create_render_target): Likewise.
12978 (grub_video_delete_render_target): Likewise.
12979 (grub_video_set_active_render_target): Likewise.
12980
12981 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12982 Undefined.
12983 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12984
12985 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12986 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12987 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12988 instead of $(srcdir)/genkernsyms.sh.
12989
12990 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12991 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12992 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12993 instead of $(srcdir)/genkernsyms.sh.
12994
12995 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12996 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12997 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12998 instead of $(srcdir)/genkernsyms.sh.
12999
13000 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13001 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13002 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13003 instead of $(srcdir)/genkernsyms.sh.
13004
13005 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13006 genkernsyms.sh.
13007
13008 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13009 genkernsyms.sh.
13010 (gensymlist.sh): New target.
13011 (genkernsyms.sh): Likewise.
13012
13013 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13014 genkernsyms.sh.in and gensymlist.sh.in.
13015
13016 * genkernsyms.sh: Removed.
13017 * gensymlist.sh: Likewise.
f19dbdb7 13018
7b455f4d 13019 * genkernsyms.sh.in: New file.
13020 * gensymlist.sh.in: Likewise.
13021
1885bb27 130222006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13023
13024 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13025 clobber "prefix", since we may have already set it manually.
13026
71538dff 130272006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13028
13029 * kern/misc.c (abort): New alias for grub_abort.
13030
2965c7cc 130312006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13032
13033 A new machine-specific function "grub_machine_set_prefix" is
13034 defined. This is called after loading modules, so that a prefix
13035 initialization can use modules. Also, this change adds an
13036 intensive debugging feature for the memory manager via the
13037 configure option "--enable-mm-debug".
f19dbdb7 13038
2965c7cc 13039 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13040 PART.LEN.
13041
13042 * kern/sparc64/ieee1275/init.c (abort): Removed.
13043 (grub_stop): Likewise.
13044 (grub_exit): New function.
13045 (grub_set_prefix): Renamed to ...
13046 (grub_machine_set_prefix): ... this.
13047 (grub_machine_init): Do not call grub_set_prefix.
13048
13049 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13050 (grub_machine_set_prefix): ... this.
13051 (grub_machine_init): Do not call grub_set_prefix.
13052
13053 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13054 (grub_machine_init): Do not set the prefix here.
13055
13056 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13057
13058 * kern/efi/init.c: Include grub/mm.h.
13059 (grub_efi_set_prefix): New function.
13060
13061 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13062 (grub_efi_get_filename): New function.
13063 (grub_print_device_path): Renamed to ...
13064 (grub_efi_print_device_path): ... this.
13065
13066 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13067 [MM_DEBUG] (grub_realloc): Likewise.
13068 [MM_DEBUG] (grub_free): Likewise.
13069 [MM_DEBUG] (grub_memalign): Likewise.
13070 [MM_DEBUG] (grub_mm_debug): New variable.
13071 [MM_DEBUG] (grub_debug_malloc): New function.
13072 [MM_DEBUG] (grub_debug_free): New function.
13073 [MM_DEBUG] (grub_debug_realloc): New function.
13074 [MM_DEBUG] (grub_debug_memalign): New function.
13075
13076 * kern/misc.c (grub_abort): Print a newline to distinguish
13077 the message.
13078
13079 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13080 grub_set_root_dev after loading modules. This is necessary when
13081 setting a prefix depends on modules.
13082
13083 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13084 (grub_efi_print_device_path): ... this.
13085 (grub_efi_get_filename): New prototype.
13086 (grub_efi_set_prefix): Likewise.
13087
13088 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13089 and grub/disk.h.
13090 (grub_efidisk_get_device_handle): New prototype.
13091 (grub_efidisk_get_device_name): Likewise.
13092
13093 * include/grub/mm.h: Include config.h.
13094 (MM_DEBUG): Removed.
13095 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13096 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13097 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13098 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13099 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13100 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13101 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13102 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13103 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13104
13105 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13106
13107 * disk/efi/efidisk.c: Include grub/partition.h.
13108 (iterate_child_devices): New function.
13109 (add_device): First, compare only last device path nodes, so that
13110 devices are sorted by the types.
13111 (grub_efidisk_get_device_handle): New function.
13112 (grub_efidisk_get_device_name): Likewise.
13113
13114 * configure.ac (--enable-mm-debug): New option to enable the
13115 memory manager debugging feature. This makes the binary much
13116 bigger, so is disabled by default.
13117
9cacaa17 131182006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
13119
13120 Use grub_abort instead of grub_stop, and grub_exit must be
13121 define in each architecture now. Also, this change adds support
13122 for EFI disks.
f19dbdb7 13123
9cacaa17 13124 * util/i386/pc/grub-probefs.c: Include grub/term.h.
13125 (grub_getkey): New function.
13126 (grub_term_get_current): Likewise.
13127
13128 * util/i386/pc/grub-setup.c: Include grub/term.h.
13129 (grub_getkey): New function.
13130 (grub_term_get_current): Likewise.
13131
13132 * util/misc.c (grub_stop): Renamed to ...
13133 (grub_exit): ... this.
13134
13135 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13136 (grub_exit): ... this.
13137 (grub_machine_init): Use grub_abort instead of abort.
13138 (grub_stop): Removed.
13139
13140 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13141 abort.
13142
13143 * kern/i386/pc/startup.S (grub_exit): New function.
13144 (cold_reboot): New label.
13145
13146 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13147 (grub_efi_init): Call grub_efidisk_init.
13148 (grub_efi_fini): Call grub_efidisk_fini.
13149
13150 * kern/efi/efi.c: Include grub/mm.h.
13151 (grub_efi_console_control_guid): Renamed to ...
13152 (console_control_guid): ... this.
13153 (grub_efi_loaded_image_guid): Renamed to ...
13154 (loaded_image_guid): ... this.
13155 (grub_efi_locate_handle): New function.
13156 (grub_efi_open_protocol): Likewise.
13157 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13158 GRUB_EFI_CONSOLE_CONTROL_GUID.
13159 (grub_efi_exit): Removed.
13160 (grub_stop): Likewise.
13161 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13162 (grub_exit): New function.
13163 (grub_print_device_path): Likewise.
13164
13165 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13166 (grub_enter_rescue_mode): Register "exit".
13167
13168 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13169 (grub_abort): New function.
13170
13171 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13172
13173 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13174
13175 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13176
13177 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13178 (grub_print_device_path): New prototype.
13179 (grub_efi_locate_handle): Likewise.
13180 (grub_efi_open_protocol): Likewise.
13181
13182 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13183 * disk/efi/efidisk.c: Likewise.
13184
13185 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13186
13187 * include/grub/efi/console_control.h
13188 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13189
13190 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13191 last 8 bytes as an array.
13192 (GRUB_EFI_DISK_IO_GUID): New macro.
13193 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13194 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13195 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13196 grub_uint8_t.
13197 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13198 (struct grub_efi_device_path): Rename the member "sub_type" to
13199 "subtype".
13200 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13201 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13202 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13203 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13204 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13205 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13206 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13207 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13208 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13209 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13210 (struct grub_efi_pci_device_path): New structure.
13211 (grub_efi_pci_device_path_t): New type.
13212 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13213 (struct grub_efi_pccard_device_path): New structure.
13214 (grub_efi_pccard_device_path_t): New type.
13215 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13216 (struct grub_efi_memory_mapped_device_path): New structure.
13217 (grub_efi_memory_mapped_device_path_t): New type.
13218 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13219 (struct grub_efi_vendor_device_path): New structure.
13220 (grub_efi_vendor_device_path_t): New type.
13221 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13222 (struct grub_efi_controller_device_path): New structure.
13223 (grub_efi_controller_device_path_t): New type.
13224 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13225 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13226 (struct grub_efi_acpi_device_path): New structure.
13227 (grub_efi_acpi_device_path_t): New type.
13228 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13229 (struct grub_efi_expanded_acpi_device_path): New structure.
13230 (grub_efi_expanded_acpi_device_path_t): New type.
13231 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13232 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13233 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13234 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13235 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13236 (struct grub_efi_atapi_device_path): New structure.
13237 (grub_efi_atapi_device_path_t): New type.
13238 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13239 (struct grub_efi_fibre_channel_device_path): New structure.
13240 (grub_efi_fibre_channel_device_path_t): New type.
13241 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13242 (struct grub_efi_1394_device_path): New structure.
13243 (grub_efi_1394_device_path_t): New type.
13244 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13245 (struct grub_efi_usb_device_path): New structure.
13246 (grub_efi_usb_device_path_t): New type.
13247 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13248 (struct grub_efi_usb_class_device_path): New structure.
13249 (grub_efi_usb_class_device_path_t): New type.
13250 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13251 (struct grub_efi_i2o_device_path): New structure.
13252 (grub_efi_i2o_device_path_t): New type.
13253 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13254 (struct grub_efi_mac_address_device_path): New structure.
13255 (grub_efi_mac_address_device_path_t): New type.
13256 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13257 (struct grub_efi_ipv4_device_path): New structure.
13258 (grub_efi_ipv4_device_path_t): New type.
13259 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13260 (struct grub_efi_ipv6_device_path): New structure.
13261 (grub_efi_ipv6_device_path_t): New type.
13262 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13263 (struct grub_efi_infiniband_device_path): New structure.
13264 (grub_efi_infiniband_device_path_t): New type.
13265 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13266 (struct grub_efi_uart_device_path): New structure.
13267 (grub_efi_uart_device_path_t): New type.
13268 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13269 (struct grub_efi_vendor_messaging_device_path): New structure.
13270 (grub_efi_vendor_messaging_device_path_t): New type.
13271 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13272 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13273 (struct grub_efi_hard_drive_device_path): New structure.
13274 (grub_efi_hard_drive_device_path_t): New type.
13275 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13276 (struct grub_efi_cdrom_device_path): New structure.
13277 (grub_efi_cdrom_device_path_t): New type.
13278 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13279 (struct grub_efi_vendor_media_device_path): New structure.
13280 (grub_efi_vendor_media_device_path_t): New type.
13281 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13282 (struct grub_efi_file_path_device_path): New structure.
13283 (grub_efi_file_path_device_path_t): New type.
13284 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13285 (struct grub_efi_protocol_device_path): New structure.
13286 (grub_efi_protocol_device_path_t): New type.
13287 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13288 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13289 (struct grub_efi_bios_device_path): New structure.
13290 (grub_efi_bios_device_path_t): New type.
13291 (struct grub_efi_disk_io): New structure.
13292 (grub_efi_disk_io_t): New type.
13293 (struct grub_efi_block_io_media): New structure.
13294 (grub_efi_block_io_media_t): New type.
13295 (struct grub_efi_block_io): New structure.
13296 (grub_efi_block_io_t): New type.
13297
13298 * include/grub/misc.h (grub_stop): Removed.
13299 (grub_exit): New prototype.
13300 (grub_abort): Likewise.
13301
13302 * include/grub/disk.h (enum grub_disk_dev_id): Added
13303 GRUB_DISK_DEVICE_EFIDISK_ID.
13304
13305 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13306 disk/efi/efidisk.c.
13307 (kernel_syms.lst): Remove the target if an error occurs.
13308
49986a9f 133092006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13310
13311 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13312 as it was simply too buggy.
13313
970d3b8a 133142006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13315
13316 * kern/misc.c (grub_lltoa): New function.
13317 (grub_vsprintf): Added support for the long long suffix,
13318 i.e. "ll".
13319
ff04ec24 133202006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13321
13322 * Makefile.in (LDFLAGS): Add variable.
13323 (LD): Remove variable.
13324 * configure.ac: Add -m32 to LDFLAGS.
13325 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13326 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13327 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13328 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13329 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13330 variables.
13331 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13332 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13333 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13334
37e5e1a4 133352006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13336
13337 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13338 length for unknown glyph.
13339
c352d8dd 133402006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13341
2eab1c0d 13342 Add support for pre-loaded modules into the EFI port.
f19dbdb7 13343
2eab1c0d 13344 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13345 completely. Accept one more argument DIR. The caller has changed.
13346
13347 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13348
13349 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13350 (grub_efi_loaded_image_guid): New variable.
13351 (grub_efi_get_loaded_image): New function.
13352 (grub_arch_modules_addr): Likewise.
13353
13354 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13355 prototype.
13356
13357 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13358 (struct grub_efi_loaded_image): New structure.
13359 (grub_efi_loaded_image_t): New type.
13360
133612006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13362
c352d8dd 13363 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13364 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13365 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13366
6d01d6b4 133672006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13368
13369 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13370
976a4ea0 133712006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13372
13373 * DISTLIST: Added include/grub/efi/console.h,
13374 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13375 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13376
13377 * include/grub/efi/console.h: New file.
13378 * include/grub/efi/time.h: Likewise.
13379 * include/grub/i386/efi/kernel.h: Likewise.
13380 * kern/efi/init.c: Likewise.
13381 * kern/efi/mm.c: Likewise.
13382 * term/efi/console.c: Likewise.
f19dbdb7 13383
976a4ea0 13384 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13385 (grub_stop): Removed.
13386 (grub_get_rtc): Likewise.
13387 (grub_machine_init): Simply call grub_efi_init.
13388 (grub_machine_fini): Call grub_efi_fini.
13389
13390 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13391 (grub_efi_output_string): Removed.
13392 (grub_efi_stall): New function.
13393 (grub_stop): Likewise.
13394 (grub_get_rtc): Likewise.
13395
13396 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13397 (grub_efi_stall): New prototype.
13398 (grub_efi_allocate_pages): Likewise.
13399 (grub_efi_free_pages): Likewise.
13400 (grub_efi_get_memory_map): Likewise.
13401 (grub_efi_mm_init): Likewise.
13402 (grub_efi_mm_fini): Likewise.
13403 (grub_efi_init): Likewise.
13404 (grub_efi_fini): Likewise.
13405
13406 * include/grub/i386/efi/time.h: Do not include
13407 grub/symbol.h. Include grub/efi/time.h.
13408 (GRUB_TICKS_PER_SECOND): Removed.
13409 (grub_get_rtc): Likewise.
13410
13411 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13412 Added padding. The EFI spec is buggy.
13413 (GRUB_EFI_BLACK): New macro.
13414 (GRUB_EFI_BLUE): Likewise.
13415 (GRUB_EFI_GREEN): Likewise.
13416 (GRUB_EFI_CYAN): Likewise.
13417 (GRUB_EFI_RED): Likewise.
13418 (GRUB_EFI_MAGENTA): Likewise.
13419 (GRUB_EFI_BROWN): Likewise.
13420 (GRUB_EFI_LIGHTGRAY): Likewise.
13421 (GRUB_EFI_BRIGHT): Likewise.
13422 (GRUB_EFI_DARKGRAY): Likewise.
13423 (GRUB_EFI_LIGHTBLUE): Likewise.
13424 (GRUB_EFI_LIGHTGREEN): Likewise.
13425 (GRUB_EFI_LIGHTCYAN): Likewise.
13426 (GRUB_EFI_LIGHTRED): Likewise.
13427 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13428 (GRUB_EFI_YELLOW): Likewise.
13429 (GRUB_EFI_WHITE): Likewise.
13430 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13431 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13432 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13433 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13434 (GRUB_EFI_BACKGROUND_RED): Likewise.
13435 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13436 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13437 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13438 (GRUB_EFI_TEXT_ATTR): Likewise.
13439
13440 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13441 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13442 (kernel_mod_HEADERS): Added efi/time.h.
13443
83709125 134442006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13445
13446 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13447 include/grub/efi/api.h, include/grub/efi/console_control.h,
13448 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13449 include/grub/i386/efi/time.h, kern/efi/efi.c,
13450 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13451 and util/i386/efi/grub-mkimage.c.
13452
13453 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13454
13455 * genmk.rb (PModule#rule): Do not export symbols if
13456 #{prefix}_EXPORTS is set to "no".
13457
13458 * conf/i386-efi.mk: New file.
13459 * conf/i386-efi.rmk: Likewise.
13460 * include/grub/efi/api.h: Likewise.
13461 * include/grub/efi/console_control.h: Likewise.
13462 * include/grub/efi/efi.h: Likewise.
13463 * include/grub/efi/pe32.h: Likewise.
13464 * include/grub/i386/efi/time.h: Likewise.
13465 * kern/efi/efi.c: Likewise.
13466 * kern/i386/efi/init.c: Likewise.
13467 * kern/i386/efi/startup.S: Likewise.
13468 * util/i386/efi/grub-mkimage.c: Likewise.
13469
134702006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 13471
13472 * include/grub/script.h: Include <grub/parser.h> and
13473 "grub_script.tab.h".
13474 (struct grub_lexer_param): New struct.
13475 (struct grub_parser_param): Likewise.
13476 (grub_script_create_arglist): Pass the state in an argument.
13477 (grub_script_add_arglist): Likewise.
13478 (grub_script_create_cmdline): Likewise.
13479 (grub_script_create_cmdblock): Likewise.
13480 (grub_script_create_cmdif): Likewise.
13481 (grub_script_create_cmdmenu): Likewise.
13482 (grub_script_add_cmd): Likewise.
13483 (grub_script_arg_add): Likewise.
13484 (grub_script_lexer_ref): Likewise.
13485 (grub_script_lexer_deref): Likewise.
13486 (grub_script_lexer_record_start): Likewise.
13487 (grub_script_lexer_record_stop): Likewise.
13488 (grub_script_mem_record): Likewise.
13489 (grub_script_mem_record_stop): Likewise.
13490 (grub_script_malloc): Likewise.
13491 (grub_script_yylex): Likewise.
13492 (grub_script_yyparse): Likewise.
13493 (grub_script_yyerror): Likewise.
13494 (grub_script_yylex): Likewise.
13495 (grub_script_lexer_init): Return the state.
13496
13497 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13498 (grub_script_lexer_done): Likewise.
13499 (grub_script_lexer_getline): Likewise.
13500 (grub_script_lexer_refs): Likewise.
13501 (script): Likewise.
13502 (newscript): Likewise.
13503 (record): Likewise.
13504 (recording): Likewise.
13505 (recordpos): Likewise.
13506 (recordlen): Likewise.
13507 (grub_script_lexer_init): Return the state instead of setting
13508 global variables.
13509 (grub_script_lexer_ref): Use the newly added argument for state
13510 instead of globals.
13511 (grub_script_lexer_deref): Likewise.
13512 (grub_script_lexer_record_start): Likewise.
13513 (grub_script_lexer_record_stop): Likewise.
13514 (recordchar): Likewise.
13515 (nextchar): Likewise.
13516 (grub_script_yylex2): Likewise.
13517 (grub_script_yylex): Likewise.
13518 (grub_script_yyerror): Likewise.
13519
13520 * normal/parser.y (func_mem): Removed variable.
13521 (menu_entry): Likewise.
13522 (err): Likewise.
13523 (%lex-param): New parser option.
13524 (%parse-param): Likewise.
13525 (script): Always return the AST.
13526 (argument): Pass the state around.
13527 (arguments): Likewise.
13528 (grubcmd): Likewise.
13529 (commands): Likewise.
13530 (function): Likewise.
13531 (menuentry): Likewise.
13532 (if_statement): Likewise.
13533 (if): Likewise.
13534
13535 * normal/script.c (grub_script_memused): Removed variable.
13536 (grub_script_parsed): Likewise.
13537 (grub_script_malloc): Added a state argument. Use that instead of
13538 global variables.
13539 (grub_script_mem_record): Likewise.
13540 (grub_script_mem_record_stop): Likewise.
13541 (grub_script_arg_add): Likewise.
13542 (grub_script_add_arglist): Likewise.
13543 (grub_script_create_cmdline): Likewise.
13544 (grub_script_create_cmdif): Likewise.
13545 (grub_script_create_cmdmenu): Likewise.
13546 (grub_script_add_cmd): Likewise.
13547 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 13548
e2a8c904 135492006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 13550
13551 * normal/command.c (grub_command_init): Remove the title command.
13552
13553 * normal/lexer.c (grub_script_yylex): Renamed from this...
13554 (grub_script_yylex2): ... to this.
13555 (grub_script_yylex): New function. Temporary
13556 introduced to filter some tokens.
13557 (grub_script_yyerror): Print a newline.
13558
13559 * normal/main.c (read_config_file): Output information about the
13560 lines that contain errors. Wait for a key after all lines have
13561 been processed. Don't return an empty menu.
13562
13563 * normal/parser.y (func_mem): Don't initialize.
13564 (menu_entry): Likewise.
13565 (err): New variable.
13566 (script): Don't return anything when an error was encountered.
13567 (ws, returns): Removed rules.
13568 (argument): Disabled concatenated variable support.
13569 (arguments): Remove explicit separators.
13570 (grubcmd): Likewise.
13571 (function): Likewise.
13572 (menuentry): Likewise.
13573 (if): Likewise.
13574 (commands): Likewise. Add error handling.
13575
13576 * normal/script.c (grub_script_create_cmdline): If
13577 `grub_script_parsed' is 0, assume the parser encountered an error.
13578
c9a86192 135792006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13580
13581 * configure.ac: Add support for EFI. Fix the typo
13582 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13583
70f3b243 135842006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13585
13586 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13587 foreign multibyte characters should be shown correctly.
13588
65f201ad 135892006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13590
13591 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13592 calculation.
13593 (read_config_file): Made it to close file before returning.
13594
b4b93674 135952006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13596
13597 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13598 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13599 video/i386/pc/vbefill.c.
13600
13601 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13602 video/i386/pc/vbefill.c.
13603
13604 * include/grub/video.h (grub_video_blit_format): New enum.
13605 (grub_video_mode_info): Added new member blit_format.
13606 (grub_video_get_blit_format): New function prototype.
13607
13608 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13609 function prototype.
13610 (grub_video_vbe_map_rgb): Likewise.
13611 (grub_video_vbe_unmap_color): Likewise.
13612
13613 * include/grub/i386/pc/vbeblit.h: New file.
13614
13615 * include/grub/i386/pc/vbefill.h: New file.
13616
13617 * video/video.c (grub_video_get_blit_format): New function.
13618 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13619 (grub_video_vbe_map_rgb): Likewise.
13620 (grub_video_vbe_unmap_color): Likewise.
13621
13622 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13623 optimized fills.
13624 (grub_video_vbe_blit_render_target): Changed to use more optimized
13625 blits.
13626 (grub_video_vbe_setup): Added detection for optimized settings.
13627 (grub_video_vbe_create_render_target): Likewise.
13628
13629 * video/i386/pc/vbeblit.c: New file.
13630
13631 * video/i386/pc/vbefill.c: New file.
13632
c2379b9c 136332006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13634
13635 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13636 here...
13637
13638 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13639 parsing to support both hex and dec ranges. If filename was missing
13640 show usage information.
13641
bd0d7896 136422006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13643
13644 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13645 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13646
13647 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13648 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13649 (video_mod_SOURCES): Added.
13650 (video_mod_CFLAGS): Likewise.
13651 (video_mod_LDFLAGS): Likewise.
13652 (gfxterm_mod_SOURCES): Likewise.
13653 (gfxterm_mod_CFLAGS): Likewise.
13654 (gfxterm_mod_LDFLAGS): Likewise.
13655 (videotest_mod_SOURCES): Likewise.
13656 (videotest_mod_CFLAGS): Likewise.
13657 (videotest_mod_LDFLAGS): Likewise.
13658 (vesafb_mod_SOURCES): Removed.
13659 (vesafb_mod_CFLAGS): Likewise.
13660 (vesafb_mod_LDFLAGS): Likewise.
13661 (vga_mod_SOURCES): Likewise.
13662 (vga_mod_CFLAGS): Likewise.
13663 (vga_mod_LDFLAGS): Likewise.
13664
13665 * commands/videotest.c: New file.
13666
13667 * font/manager.c (fill_with_default_glyph): Modified to use
13668 grub_font_glyph.
13669 (grub_font_get_glyph): Likewise.
13670 (fontmanager): Renamed from this...
13671 (font_manager): ... to this.
13672
13673 * include/grub/font.h (grub_font_glyph): Added new structure.
13674 (grub_font_get_glyph): Modified to use grub_font_glyph.
13675
13676 * include/grub/misc.h (grub_abs): Added as inline function.
13677
13678 * include/grub/video.h: New file.
13679
13680 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13681 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13682 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13683 (grub_vbe_get_controller_info): Renamed from this...
13684 (grub_vbe_bios_get_controller_info): ... to this.
13685 (grub_vbe_get_mode_info): Renamed from this...
13686 (grub_vbe_bios_get_mode_info): ... to this.
13687 (grub_vbe_set_mode): Renamed from this...
13688 (grub_vbe_bios_set_mode): ... to this.
13689 (grub_vbe_get_mode): Renamed from this...
13690 (grub_vbe_bios_get_mode): ... to this.
13691 (grub_vbe_set_memory_window): Renamed from this...
13692 (grub_vbe_bios_set_memory_window): ... to this.
13693 (grub_vbe_get_memory_window): Renamed from this...
13694 (grub_vbe_bios_get_memory_window): ... to this.
13695 (grub_vbe_set_scanline_length): Renamed from this...
13696 (grub_vbe_set_scanline_length): ... to this.
13697 (grub_vbe_get_scanline_length): Renamed from this...
13698 (grub_vbe_bios_get_scanline_length): ... to this.
13699 (grub_vbe_set_display_start): Renamed from this...
13700 (grub_vbe_bios_set_display_start): ... to this.
13701 (grub_vbe_get_display_start): Renamed from this...
13702 (grub_vbe_bios_get_display_start): ... to this.
13703 (grub_vbe_set_palette_data): Renamed from this...
13704 (grub_vbe_bios_set_palette_data): ... to this.
13705 (grub_vbe_set_pixel_rgb): Removed.
13706 (grub_vbe_set_pixel_index): Likewise.
13707
13708 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13709 from this...
13710 (grub_vbe_bios_get_controller_info): ... to this.
13711 (grub_vbe_get_mode_info): Renamed from this...
13712 (grub_vbe_bios_get_mode_info): ... to this.
13713 (grub_vbe_set_mode): Renamed from this...
13714 (grub_vbe_bios_set_mode): ... to this.
13715 (grub_vbe_get_mode): Renamed from this...
13716 (grub_vbe_bios_get_mode): ... to this.
13717 (grub_vbe_set_memory_window): Renamed from this...
13718 (grub_vbe_bios_set_memory_window): ... to this.
13719 (grub_vbe_get_memory_window): Renamed from this...
13720 (grub_vbe_bios_get_memory_window): ... to this.
13721 (grub_vbe_set_scanline_length): Renamed from this...
13722 (grub_vbe_set_scanline_length): ... to this.
13723 (grub_vbe_get_scanline_length): Renamed from this...
13724 (grub_vbe_bios_get_scanline_length): ... to this.
13725 (grub_vbe_set_display_start): Renamed from this...
13726 (grub_vbe_bios_set_display_start): ... to this.
13727 (grub_vbe_get_display_start): Renamed from this...
13728 (grub_vbe_bios_get_display_start): ... to this.
13729 (grub_vbe_set_palette_data): Renamed from this...
13730 (grub_vbe_bios_set_palette_data): ... to this.
13731 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13732 getting corrupted after calling it. Added more pushes and pops.
13733 (grub_vbe_bios_set_mode): Likewise.
13734 (grub_vbe_bios_get_mode): Likewise.
13735 (grub_vbe_bios_get_memory_window): Likewise.
13736 (grub_vbe_bios_set_scanline_length): Likewise.
13737 (grub_vbe_bios_get_scanline_length): Likewise.
13738 (grub_vbe_bios_get_display_start): Likewise.
13739 (grub_vbe_bios_set_palette_data): Likewise.
13740
13741 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13742 (cl_insert): Likewise.
13743 (cl_delete): Likewise.
13744
13745 * term/gfxterm.c: New file.
13746
13747 * term/i386/pc/vesafb.c: Removed file.
13748
13749 * video/video.c: New file.
13750
13751 * video/i386/pc/vbe.c (real2pm): Added new function.
13752 (grub_video_vbe_draw_pixel): Likewise.
13753 (grub_video_vbe_get_video_ptr): Likewise.
13754 (grub_video_vbe_get_pixel): Likewise
13755 (grub_video_vbe_init): Likewise.
13756 (grub_video_vbe_fini): Likewise.
13757 (grub_video_vbe_setup): Likewise.
13758 (grub_video_vbe_get_info): Likewise.
13759 (grub_video_vbe_set_palette): Likewise.
13760 (grub_video_vbe_get_palette): Likewise.
13761 (grub_video_vbe_set_viewport): Likewise.
13762 (grub_video_vbe_get_viewport): Likewise.
13763 (grub_video_vbe_map_color): Likewise.
13764 (grub_video_vbe_map_rgb): Likewise.
13765 (grub_video_vbe_map_rgba): Likewise.
13766 (grub_video_vbe_unmap_color): Likewise.
13767 (grub_video_vbe_fill_rect): Likewise.
13768 (grub_video_vbe_blit_glyph): Likewise.
13769 (grub_video_vbe_blit_bitmap): Likewise.
13770 (grub_video_vbe_blit_render_target): Likewise.
13771 (grub_video_vbe_scroll): Likewise.
13772 (grub_video_vbe_swap_buffers): Likewise.
13773 (grub_video_vbe_create_render_target): Likewise.
13774 (grub_video_vbe_delete_render_target): Likewise.
13775 (grub_video_vbe_set_active_render_target): Likewise.
13776 (grub_vbe_set_pixel_rgb): Remove function.
13777 (grub_vbe_set_pixel_index): Likewise.
13778 (index_color_mode): Remove static variable.
13779 (active_mode): Likewise.
13780 (framebuffer): Likewise.
13781 (bytes_per_scan_line): Likewise.
13782 (grub_video_vbe_adapter): Added new static variable.
13783 (framebuffer): Likewise.
13784 (render_target): Likewise.
13785 (initial_mode): Likewise.
13786 (mode_in_use): Likewise.
13787 (mode_list): Likewise.
13788
5f97350b 137892006-03-10 Marco Gerards <marco@gnu.org>
13790
13791 * configure.ac (AC_INIT): Bumped to 1.93.
13792
13793 * DISTLIST: Added `include/grub/hfs.h'.
13794
a3c5c6f8 137952006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13796
13797 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13798 18H, which might help the BIOS falling back to next boot media.
13799
6de53d26 138002006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13801
13802 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13803 Poe Chen <poe.poechen@gmail.com>.
13804
77c4a393 138052006-01-17 Marco Gerards <marco@gnu.org>
13806
13807 * include/grub/normal.h: Include <grub/script.h>.
13808 (grub_command_list): Removed struct.
13809 (grub_command_list_t): Removed type.
13810 (grub_menu_entry): Remove members `num' and `command_list'. Add
13811 members `commands' and `sourcecode'.
13812 * include/grub/script.h: Add inclusion guards.
13813 (grub_script_cmd_menuentry): New struct.
13814 (grub_script_execute_menuentry): New prototype.
13815 (grub_script_lexer_record_start): Likewise.
13816 (grub_script_lexer_record_stop): Likewise.
13817 * normal/execute.c (grub_script_execute_menuentry): New function.
13818 * normal/lexer.c (record, recording, recordpos, recordlen): New
13819 variables.
13820 (grub_script_lexer_record_start): New function.
13821 (grub_script_lexer_record_stop): Likewise.
13822 (recordchar): Likewise.
13823 (nextchar): Likewise.
13824 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13825 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13826 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13827 (current_menu): New variable.
13828 (free_menu): Mainly rewritten.
13829 (grub_normal_menu_addentry): New function.
13830 (read_config_file): Rewritten.
13831 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13832 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13833 the menu entry.
13834 (run): Mainly rewritten.
13835 * normal/parser.y (menu_entry): New variable.
13836 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13837 (menuentry): New rule.
13838 (command): Add `menuentry'.
13839 (if_statement): Allow additional returns before `fi'.
13840 * normal/script.c (grub_script_create_cmdmenu): New function.
13841
144f1f98 138422006-01-03 Marco Gerards <marco@gnu.org>
13843
13844 * INSTALL: GNU Bison is required.
13845 * configure.ac: Rewritten the test to detect Bison.
13846 * Makefile.in (YACC): New variable. Reported by Xun Sun
13847 <xun.sun.cn@gmail.com>.
13848
af4b2d89 138492006-01-03 Marco Gerards <marco@gnu.org>
13850
13851 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13852 the HFS+ filesystem to filesystem blocks.
13853 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13854 GCC warning is silenced.
13855
15643b71 138562006-01-03 Marco Gerards <marco@gnu.org>
13857
13858 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13859 read from disk from big endian to host byte order.
13860
00905879 138612006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13862
13863 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13864 documentation.
13865 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13866 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13867 embedded HFS+ filesystem.
13868 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13869 (grub_hfs_sblock): Move from here...
13870 * include/grub/hfs.h: To here... New file.
13871 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13872 documentation.
13873 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13874 New macros.
13875 (grub_hfsplus_volheader): Change type of member `magic' to
13876 `grub_uint16_t'.
13877 (grub_hfsplus_data): Add new member `embedded_offset'.
13878 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13879 returned block.
13880 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13881 Calculate the offset.
13882
8899bc3e 138832005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13884
13885 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13886 Removed.
13887 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13888
ae8c0277 138892005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13890
13891 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13892 ENV->NAME is NULL after allocating ENV->VALUE.
13893
07084456 138942005-12-25 Marco Gerards <marco@gnu.org>
13895
13896 * kern/env.c (grub_env_set): Rewritten the error handling code.
13897
4750f5f1 138982005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13899
13900 * geninit.sh: Made more robust, and more portable.
13901
50214199 139022005-12-25 Marco Gerards <marco@gnu.org>
13903
13904 Add support for Apple HFS+ filesystems.
f19dbdb7 13905
50214199 13906 * fs/hfsplus.c: New file.
13907
13908 * DISTLIST: Added `fs/hfsplus.c'.
13909
13910 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13911 (hfsplus_mod_SOURCES): New variable.
13912 (hfsplus_mod_CFLAGS): Likewise.
13913 (hfsplus_mod_LDFLAGS): Likewise.
13914 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13915 (grub_setup_SOURCES): Likewise.
13916 (grub_mkdevicemap_SOURCES): Likewise.
13917 (grub_emu_SOURCES): Likewise.
13918 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13919
13920 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13921
13922 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13923
befaed6c 139242005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13925
13926 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13927 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13928 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13929 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13930 normal/lexer.c, normal/parser.y, normal/script.c, and
13931 partmap/gpt.c.
13932 Removed kern/sparc64/cache.c.
13933
13934 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13935 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13936 grub_emu_init.c.
13937
13938 * configure.ac (AC_INIT): Bumped to 1.92.
13939
6a124103 139402005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13941
13942 * kern/err.c (grub_error_push): Added new function to support error
13943 stacks.
13944 (grub_error_pop): Likewise.
13945 (grub_error_stack_items): New local variable to support error stacks.
13946 (grub_error_stack_pos): Likewise.
13947 (grub_error_stack_assert): Likewise.
13948 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13949 stack depth.
13950 (grub_print_error): Added support to print errors from error stack.
13951
13952 * include/grub/err.h (grub_error_push): Added function prototype.
13953 (grub_error_pop): Likewise.
13954
be973c1b 139552005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13956
13957 * configure.ac: Accept `powerpc64' as host_cpu.
13958 (amd64): Rename to `biarch32'.
13959
13960 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13961 non-cacheline-aligned addresses.
13962
13963 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13964 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13965 if `size' is non-zero.
13966
b04216ab 139672005-12-03 Marco Gerards <mgerards@xs4all.nl>
13968
13969 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13970 and `cd' to make sure the filename is not prefixed with a
13971 directory name.
13972 (pkgdata_MODULES): Add `gpt.mod'.
13973 (gpt_mod_SOURCES): New variable.
13974 (gpt_mod_CFLAGS): Likewise.
13975 (gpt_mod_LDFLAGS): Likewise.
13976
13977 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13978
13979 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13980 New macro.
13981
13982 * partmap/gpt.c: New file.
13983
13984 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13985 GPT partition map is detected.
13986
41730ed9 139872005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13988
13989 * commands/i386/pc/play.c: New file.
13990 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13991 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13992 macros.
f19dbdb7 13993
95dc3643 139942005-11-27 Marco Gerards <mgerards@xs4all.nl>
13995
13996 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13997 ((unused))' to silence gcc warning.
13998
1569ec51 139992005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14000
14001 * configure.ac: Correct `AC_PROG_YACC' test.
14002
9abde152 140032005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14004
14005 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14006 check before installing files.
14007
44b83271 140082005-11-22 Mike Small <smallm@panix.com>
14009
14010 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14011 number regex so multidigit numbers are recognized correctly.
14012
140132005-11-22 Mike Small <smallm@panix.com>
14014
14015 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14016 debugging message before attempting to claim memory.
14017 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14018 multiple addresses in case of failure.
14019
9c12956b 140202005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14021
14022 * term/tparm.c (get_space): Remove empty `if' statement.
14023
14024 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14025
14026 * kern/parser.c (check_varstate): Rename `state' to 's'.
14027
aeaf81d9 140282005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14029
14030 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14031 variable definitions to the beginning of each function. Sort stack
14032 variables by size.
14033 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14034 `buf' argument to `char *'.
14035
79bbb63f 140362005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14037
14038 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14039 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14040 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 14041 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14042 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14043 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14044 configfile.mod, search.mod, gzio.mod and test.mod.
14045 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14046 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14047 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14048 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14049 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14050 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14051 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14052 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14053 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14054 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14055 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14056 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14057 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14058 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14059 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14060 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14061 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14062 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14063 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14064 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14065 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14066 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14067 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14068
14069 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14070 `grep --include'.
14071 (pkgdata_MODULES): Add test.mod.
14072
233b1628 140732005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14074
14075 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14076 appending to variables with "+=".
14077 (PModule): Use full pathname to generate *.lst filenames.
14078
14079 * Makefile.in: Fixed list rules moved from genmk.rb.
14080 (.DELETE_ON_ERROR): New special target.
14081 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14082
14083 * conf/i386-pc.rmk: Include conf/common.mk.
14084 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14085 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 14086 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14087 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14088 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14089 configfile.mod, search.mod, gzio.mod and test.mod.
14090 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14091 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14092 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14093 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14094 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14095 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14096 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14097 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14098 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14099 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14100 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14101 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14102 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14103 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14104 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14105 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14106 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14107 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14108 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14109 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14110 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14111 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14112 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14113 here...
14114 * conf/common.rmk: ... to here. New file.
14115
14116 * conf/common.mk: New file.
14117
16f820c8 141182005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
14119
14120 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14121 (grub_script.tab.c): ... here.
14122
14123 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14124 (grub_script.tab.c): ... here.
14125
14126 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14127 (grub_script.tab.c): ... here.
14128
14129 * normal/command.c (grub_command_find): Fixed a memory leak of
14130 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14131
63ba1554 141322005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14133
14134 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14135 "@" which marks the start of a comment on ARM.
14136 (VARIABLE): Likewise.
14137
7f67dc13 141382005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14139
79bbb63f 14140 Add support for Linux/ADFS partition tables.
7f67dc13 14141
14142 * partmap/acorn.c: New file.
14143
14144 * include/grub/acorn_filecore.h: Likewise.
14145
14146 * DISTLIST: Added `partmap/acorn.c' and
14147 `include/grub/acorn_filecore.h'.
f19dbdb7 14148
7f67dc13 14149 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14150 `partmap/acorn.c'.
14151 (pkgdata_MODULES): Add `acorn.mod'.
14152 (acorn_mod_SOURCES): New variable.
14153 (acorn_mod_CFLAGS): Likewise.
14154
14155 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14156 `partmap/acorn.c'.
14157 (pkgdata_MODULES): Add `acorn.mod'.
14158 (acorn_mod_SOURCES): New variable.
14159 (acorn_mod_CFLAGS): Likewise.
14160
14161 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14162 (pkgdata_MODULES): Add `acorn.mod'.
14163 (acorn_mod_SOURCES): New variable.
14164 (acorn_mod_CFLAGS): Likewise.
14165 (acorn_mod_LDFLAGS): Likewise.
14166
14167 * include/types.h (grub_disk_addr_t): New typedef.
14168
6d099807 141692005-11-13 Marco Gerards <mgerards@xs4all.nl>
14170
14171 * geninit.sh: New file.
14172
14173 * geninitheader.sh: Likewise.
14174
14175 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14176 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14177 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14178 * commands/configfile.c (grub_configfile_init)
14179 (grub_configfile_fini): Likewise.
14180 * commands/default.c (grub_default_init, grub_default_fini):
14181 Likewise.
14182 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14183 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14184 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14185 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14186 Likewise.
14187 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14188 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14189 Likewise.
14190 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 14191 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 14192 Likewise.
14193 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14194 Likewise.
fe6b695a 14195 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 14196 Likewise.
14197 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14198 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14199 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14200 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14201 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14202 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14203 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14204 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14205 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14206 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14207 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14208 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14209 * partmap/amiga.c (grub_amiga_partition_map_init)
14210 (grub_amiga_partition_map_fini): Likewise.
14211 * partmap/apple.c (grub_apple_partition_map_init)
14212 (grub_apple_partition_map_fini): Likewise.
14213 * partmap/pc.c (grub_pc_partition_map_init)
14214 (grub_pc_partition_map_fini): Likewise.
14215 * partmap/sun.c (grub_sun_partition_map_init,
14216 grub_sun_partition_map_fini): Likewise.
14217 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14218 Likewise.
14219
14220 * util/grub-emu.c: Include <grub_modules_init.h>.
14221 (main): Don't initialize and de-initialize any modules directly,
14222 use `grub_init_all' and `grub_fini_all' instead.
14223
14224 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14225 `grub_vesafb_mod_init'.
14226 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14227 all users.
14228 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14229 `grub_vga_mod_init'. Updated all users.
14230 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 14231
6d099807 14232 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14233 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14234 rules.
14235
14236 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14237 Generate a function to initialize the module in utilities.
14238 Updated all callers.
14239 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14240 initialize the module in utilities. Updated all callers.
14241
9046bcf0 142422005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14243
14244 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14245 escape sequence and a literal ^L to clear the screen.
14246
14247 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14248 when returning from Open Firmware.
14249
d13ea639 142502005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14251
14252 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14253 (grub_ofconsole_height): Likewise.
14254 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14255 manually insert a '\n'.
14256 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14257 `grub_ofconsole_height'. Return early if these are already set.
14258
a8fcf206 142592005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14260
14261 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14262 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14263 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14264 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14265 and `normal/script.c'.
14266 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14267 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14268 (test_mod_SOURCES): New variable.
14269 (test_mod_CFLAGS): Likewise.
14270 (test_mod_LDFLAGS): Likewise.
14271 (pkgdata_MODULES): Add `test.mod'.
14272 (grub_script.tab.c): New rule.
14273 (grub_script.tab.h): Likewise.
14274
b6b32745 142752005-11-07 Marco Gerards <mgerards@xs4all.nl>
14276
14277 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14278 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14279 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14280 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14281 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14282 (test_mod_SOURCES): New variable.
14283 (test_mod_CFLAGS): Likewise.
14284 (pkgdata_MODULES): Add `test.mod'.
14285 (grub_script.tab.c): New rule.
14286 (grub_script.tab.h): Likewise.
14287
daac212a 142882005-11-06 Marco Gerards <mgerards@xs4all.nl>
14289
14290 Add initial scripting support.
14291
14292 * commands/test.c: New file.
14293 * include/grub/script.h: Likewise.
14294 * normal/execute.c: Likewise.
14295 * normal/function.c: Likewise.
14296 * normal/lexer.c: Likewise.
14297 * normal/parser.y: Likewise.
14298 * normal/script.c: Likewise.
14299
14300 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 14301
daac212a 14302 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14303 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14304 `normal/function.c' and `normal/script.c'.
14305 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14306 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 14307 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14308 variables.
daac212a 14309 (pkgdata_MODULES): Add `test.mod'.
14310 (grub_script.tab.c): New rule.
14311 (grub_script.tab.h): Likewise.
14312
14313 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14314
14315 * include/grub/normal.h (grub_test_init): New prototype.
14316 (grub_test_fini): Likewise.
f19dbdb7 14317
daac212a 14318 * normal/command.c: Include <grub/script.h>.
14319 (grub_command_execute): Rewritten.
f19dbdb7 14320
daac212a 14321 * util/grub-emu.c (main): Call `grub_test_init' and
14322 `grub_test_fini'.
14323
77500b2b 143242005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14325
14326 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14327 to 0.
14328 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14329 there are no pending characters.
14330
e45deb9e 143312005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14332
14333 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14334 `grub_strndup' to drop device arguments. Replace unnecessary
14335 `grub_strndup' with `grub_strdup'.
14336
4ce32619 143372005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14338
14339 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14340 `debug' environment variable has been set.
14341
143422005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14343
4ce32619 14344 * Makefile.in (install-local): Use $(DATA).
14345 (uninstall): Likewise.
14346 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14347 (sbin_UTILITIES): ... to here.
14348 (sbin_SCRIPTS): New variable.
14349 (grub_install_SOURCES): New variable.
14350 * util/powerpc/ieee1275/grub-install.in: New file.
14351 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14352 variable.
14353 (add_segments): Call `grub_util_get_path'.
14354
25fe6f03 143552005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14356
14357 From Timothy Baldwin:
14358 * commands/ls.c (grub_ls_list_files): Close FILE with
14359 grub_file_close.
14360 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14361
04ccf3ec 143622005-10-24 Marco Gerards <mgerards@xs4all.nl>
14363
14364 * include/grub/parser.h: New file.
14365
14366 * kern/parser.c: Likewise.
14367
14368 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14369 (grub_setup_SOURCES): Likewise.
14370 (grub_probefs_SOURCES): Likewise.
14371 (grub_emu_SOURCES): Likewise.
14372 (kernel_img_HEADERS): Add `parser.h'.
14373
14374 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14375 (grub_emu_SOURCES): Add `kern/parser.c'.
14376 (grubof_SOURCES): Likewise.
14377
14378 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14379 (grubof_SOURCES): Add `kern/parser.c'.
14380
14381 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14382
14383 * kern/misc.c (grub_split_cmdline): Removed function.
14384
14385 * kern/rescue.c: Include <grub/parser.h>.
14386 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14387 of `grub_split_cmdline'.
14388
14389 * normal/command.c: Include <grub/parser.h>.
14390 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14391 of `grub_split_cmdline'.
14392
14393 * normal/completion.c: Include <grub/parser.h>.
14394 (cmdline_state): New variable.
14395 (iterate_dir): End the filename with a quote depending on the
14396 command line state.
14397 (get_state): new function.
14398 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14399 split the arguments and determine the current argument. When the
14400 argument string is not quoted, escape all spaces.
14401
6d8f4b0e 144022005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14403
14404 * normal/sparc64/setjmp.S: New file.
14405
15cf03ed 144062005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14407
14408 * include/grub/sparc64/libgcc.h: New file.
14409 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14410 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14411 normal/sparc64/setjmp.c.
14412
03e8661a 144132005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14414
14415 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14416 * kern/sparc64/cache.S: New file.
14417 * kern/sparc64/cache.c: Removed.
14418 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14419 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14420 -mtune=ultrasparc.
14421 (COMMON_LDFLAGS): Add -melf64_sparc.
14422 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14423 (grubof_SOURCES): Use cache.S instead of cache.c.
14424 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14425 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14426 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14427 commented though.
14428 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14429 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14430 (linux_mod_CFLAGS): Commented out.
14431 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14432 out because module isn't built.
14433 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14434 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14435 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14436 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14437 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14438 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14439 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14440 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14441 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14442 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14443 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14444 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14445 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14446 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14447
34eeec8a 144482005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14449
14450 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14451 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14452 longer, because HFS should not be used on PC.
14453
708367a3 144542005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14455
14456 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14457 consistently within the loop.
14458
6fa1251a 144592005-10-15 Marco Gerards <mgerards@xs4all.nl>
14460
14461 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14462 directory can not be read.
14463
4801580b 144642005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14465
14466 * configure.ac (AC_INIT): Increase the version number to 1.91.
14467
14468 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14469 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14470 term/i386/pc/serial.c.
14471
219ad426 144722005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14473
14474 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14475 file size must be permitted.
14476
14477 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14478 between %ah and %al.
14479
688e5699 144802005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14481
14482 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14483 grub_uint64_t.
14484 Call the hook with a NUL-terminated filename.
14485 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14486 grub_cpu_to_be32.
14487
14488 * kern/term.c (cursor_state): New variable.
14489 (grub_term_set_current): Reset the cursor state on a new
14490 terminal.
14491 (grub_setcursor): Rewritten to use CURSOR_STATE.
14492 (grub_getcursor): New function.
14493
14494 * include/grub/term.h (grub_getcursor): New prototype.
14495
14496 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14497 integers on ARM. Reported by Timothy Baldwin
14498 <T.E.Baldwin99@members.leeds.ac.uk>.
14499
bb34586c 145002005-10-11 Marco Gerards <mgerards@xs4all.nl>
14501
14502 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14503 allocated.
14504 (grub_sfs_dir): Likewise.
14505
9a909877 145062005-10-09 Marco Gerards <mgerards@xs4all.nl>
14507
14508 Add support for the SFS filesystem.
14509
14510 * fs/sfs.c: New file.
14511
14512 * DISTLIST: Added `fs/sfs.c'.
14513
14514 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14515 (grub_probefs_SOURCES): Likewise.
14516 (grub_emu_SOURCES): Likewise.
14517 (pkgdata_MODULES): Add `sfs.mod'.
14518 (sfs_mod_SOURCES): New variable.
14519 (sfs_mod_CFLAGS): Likewise.
14520 (sfs_mod_LDFLAGS): Likewise.
14521
14522 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14523 (pkgdata_MODULES): Add `sfs.mod'.
14524 (sfs_mod_SOURCES): New variable.
14525 (sfs_mod_CFLAGS): Likewise.
14526
14527 * util/grub-emu.c (main): Call `grub_sfs_init' and
14528 `grub_sfs_fini'.
14529
14530 * include/grub/fs.h (grub_sfs_init): New prototype.
14531 (grub_sfs_fini): Likewise.
14532
57bdbde3 145332005-10-07 Marco Gerards <mgerards@xs4all.nl>
14534
14535 Add support for the AFFS filesystem.
14536
14537 * fs/affs.c: New file.
14538
14539 * DISTLIST: Added `fs/affs.c'.
14540
14541 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14542 (grub_probefs_SOURCES): Likewise.
14543 (grub_emu_SOURCES): Likewise.
14544 (pkgdata_MODULES): Add `affs.mod'.
14545 (affs_mod_SOURCES): New variable.
14546 (affs_mod_CFLAGS): Likewise.
14547 (affs_mod_LDFLAGS): Likewise.
14548
14549 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14550 (pkgdata_MODULES): Add `affs.mod'.
14551 (affs_mod_SOURCES): New variable.
14552 (affs_mod_CFLAGS): Likewise.
14553
14554 * util/grub-emu.c (main): Call `grub_affs_init' and
14555 `grub_affs_fini'.
14556
14557 * include/grub/fs.h (grub_affs_init): New prototype.
14558 (grub_affs_fini): Likewise.
14559
047b67e0 145602005-10-01 Marco Gerards <mgerards@xs4all.nl>
14561
14562 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14563
59b8208a 145642005-10-01 Marco Gerards <mgerards@xs4all.nl>
14565
14566 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14567 `-m32' to CFLAGS.
14568
14569 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14570 linking.
f19dbdb7 14571
59b8208a 14572 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14573 (COMMON_LDFLAGS): New variable.
14574 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14575 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14576 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14577 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14578 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14579 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14580 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14581 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14582 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14583 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14584 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14585 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14586 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14587 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14588 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14589 variables.
14590 (normal_mod_ASFLAGS): Add `-m32'.
14591
14592 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14593 (grub_host_size_t, grub_host_ssize_t): New types.
14594 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 14595 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 14596 `GRUB_HOST_SIZEOF_VOID_P'.
14597
14598 * include/grub/kernel.h (struct grub_module_header): Type of
14599 member offset changed to `grub_host_off_t'. Type of member size
14600 changed to `grub_host_size_t'.
14601 (struct grub_module_info): Type of member offset changed to
14602 `grub_host_off_t'. Type of member size changed to
14603 `grub_host_size_t'.
14604
b4093103 146052005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14606
14607 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 14608
b4093103 14609 * kern/i386/pc/startup.S (multiboot_header): New label.
14610 (multiboot_entry): Likewise.
14611 (multiboot_trampoline): Likewise.
14612
14613 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14614 Increased to 0x4A0.
14615
14616 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14617 put parentheses after a question mark.
14618 [!GRUB_UTIL] (my_mod): New variable.
14619
14620 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14621
b2499b29 146222005-09-28 Marco Gerards <mgerards@xs4all.nl>
14623
14624 Adds support for the XFS filesystem. Btrees are not supported
14625 yet.
14626
14627 * fs/xfs.c: New file.
14628
14629 * DISTLIST: Added `fs/xfs.c'.
14630
14631 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14632 (grub_probefs_SOURCES): Likewise.
14633 (grub_emu_SOURCES): Likewise.
14634 (pkgdata_MODULES): Add `xfs.mod'.
14635 (xfs_mod_SOURCES): New variable.
14636 (xfs_mod_CFLAGS): Likewise.
14637
14638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14639 (pkgdata_MODULES): Add `xfs.mod'.
14640 (xfs_mod_SOURCES): New variable.
14641 (xfs_mod_CFLAGS): Likewise.
14642
14643 * util/grub-emu.c (main): Call `grub_xfs_init' and
14644 `grub_xfs_fini'.
14645
14646 * include/grub/fs.h (grub_xfs_init): New prototype.
14647 (grub_xfs_fini): Likewise.
14648
f19dbdb7 14649
83d37a62 146502005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14651
14652 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14653 color modes, allow greater than 16 colors to be configured as
14654 a default palette.
14655
47d2d65e 146562005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14657
14658 * normal/completion.c (complete_arguments): Add the qualifier
14659 const into OPTIONS.
14660
14661 From Omniflux <omniflux+lists@omniflux.com>:
14662 * include/grub/terminfo.h: New file.
14663 * include/grub/tparm.h: Likewise.
14664 * include/grub/i386/pc/serial.h: Likewise.
14665 * term/terminfo.c: Likewise.
14666 * term/tparm.c: Likewise.
14667 * term/i386/pc/serial.c: Likewise.
14668 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14669 serial.mod.
14670 (terminfo_mod_SOURCES): New variable.
14671 (terminfo_mod_CFLAGS): Likewise.
14672 (serial_mod_SOURCES): Likewise.
14673 (serial_mod_CFLAGS): Likewise.
14674
48b671ff 146752005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14676
14677 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14678 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14679 and kern/powerpc/ieee1275/cmain.c, respectively.
14680
14681 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14682 * kern/powerpc/ieee1275/crt0.S: ... here.
14683
14684 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14685 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 14686
48b671ff 14687 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14688 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14689 instead of boot/powerpc/ieee1275/crt0.S and
14690 boot/powerpc/ieee1275/cmain.c, respectively.
14691
14692 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14693 sectors. It was not used anyway.
14694
09fc77a7 146952005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14696
14697 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14698 `unused parameter' warning.
14699
003789c7 147002005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14701
14702 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14703 function.
14704 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14705 getcharwidth.
14706
67f44c86 147072005-08-28 Marco Gerards <metgerards@student.han.nl>
14708
14709 * include/grub/normal.h (enum grub_completion_type): Added
14710 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14711
14712 * normal/cmdline.c (print_completion): Handle
14713 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14714 * normal/menu_entry.c (store_completion): Likewise.
14715
14716 * normal/completion.c (complete_arguments): New function.
14717 (grub_normal_do_completion): Call `complete_arguments' when the
14718 current words start with a dash.
14719
0b5abe02 147202005-08-27 Marco Gerards <metgerards@student.han.nl>
14721
14722 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14723 `gzio.mod' instead of `io.mod').
14724
d9864ee1 147252005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14726
14727 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14728 (DISTDIRS): Added io and video.
14729 Rewrite the search routine to make an output consistently.
14730
14731 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14732 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14733 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14734 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14735 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14736 util/powerpc/ieee1275/misc.c.
f19dbdb7 14737
d9864ee1 14738 * include/grub/gzio.h: New file.
14739 * io/gzio.c: Likewise.
f19dbdb7 14740
d9864ee1 14741 * kern/file.c (grub_file_close): Call grub_device_close only if
14742 FILE->DEVICE is not NULL.
14743
14744 * include/grub/mm.h [!NULL] (NULL): New macro.
14745
14746 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14747
14748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14749 (pkgdata_MODULES): Added gzio.mod.
14750 (gzio_mod_SOURCES): New variable.
14751 (gzio_mod_CFLAGS): Likewise.
14752
14753 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14754 (pkgdata_MODULES): Added gzio.mod.
14755 (gzio_mod_SOURCES): New variable.
14756 (gzio_mod_CFLAGS): Likewise.
14757
14758 * commands/cat.c: Include grub/gzio.h.
14759 (grub_cmd_cat): Use grub_gzfile_open instead of
14760 grub_file_open.
f19dbdb7 14761
d9864ee1 14762 * commands/cmp.c: Include grub/gzio.h.
14763 (grub_cmd_cmp): Use grub_gzfile_open instead of
14764 grub_file_open.
14765
14766 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14767 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14768 grub_file_open.
14769 (grub_rescue_cmd_module): Likewise.
14770
fa46f4b5 147712005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14772
14773 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14774 kern/sparc64/ieee1275/init.c because it contains _start.
14775 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14776
e9211b5d 147772005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14778
14779 * configure.ac: Add support for sparc64 host with ieee1275
14780 firmware.
14781 * configure: Generated from configure.ac.
14782 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14783 instead of int.
14784 (grub_ofdisk_read): Likewise.
14785 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14786 pointers as (void *) to remove a warning.
14787 (grub_ofdisk_close): Likewise.
14788 (grub_ofdisk_read): Likewise.
14789 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14790 returns, so make it return void to remove a warning.
14791 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14792 Corresponding prototype change.
14793 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14794 values, and cast the pointers as (void *) to remove a warning.
14795 (grub_mm_dump): Likewise.
14796 * conf/sparc64-ieee1275.mk: New file.
14797 * conf/sparc64-ieee1275.rmk: Likewise.
14798 * include/grub/sparc64/setjmp.h: Likewise.
14799 * include/grub/sparc64/types.h: Likewise.
14800 * include/grub/sparc64/ieee1275/console.h: Likewise.
14801 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14802 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14803 * include/grub/sparc64/ieee1275/time.h: Likewise.
14804 * kern/sparc64/cache.c: Likewise.
14805 * kern/sparc64/dl.c: Likewise.
14806 * kern/sparc64/ieee1275/init.c: Likewise.
14807 * kern/sparc64/ieee1275/openfw.c: Likewise.
14808
385c6a92 148092005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14810
14811 * util/console.c (grub_ncurses_putchar): If C is greater than
14812 0x7f, set C to a question mark.
14813 (grub_ncurses_getcharwidth): New function.
14814 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14815 getcharwidth.
14816
14817 * normal/menu.c (print_entry): Made aware of Unicode. First,
14818 convert TITLE to UCS-4, and predict the cursor position by
14819 grub_getcharwidth.
14820
14821 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14822 const to SRC.
14823 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14824
16ccb8b1 148252005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14826
14827 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14828 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14829 grub_strcat.
14830
14831 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14832 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14833 grub_strcpy and grub_strlen. Take it into account that a space
14834 character is inserted as a delimiter.
14835
6a85ce79 148362005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14837
14838 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14839 invalid magic in the error.
6a85ce79 14840
14841 * commands/search.c: New file.
f19dbdb7 14842
6a85ce79 14843 * util/grub-emu.c (main): Call grub_search_init and
14844 grub_search_fini.
14845
14846 * kern/rescue.c (grub_rescue_print_disks): Removed.
14847 (grub_rescue_print_devices): New function.
14848 (grub_rescue_cmd_ls): Use grub_device_iterate with
14849 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14850 grub_rescue_print_disks.
14851
14852 * kern/partition.c (grub_partition_iterate): Return the result of
14853 PARTMAP->ITERATE instead of GRUB_ERRNO.
14854
14855 * kern/device.c: Include grub/partition.h.
14856 (grub_device_iterate): New function.
14857
14858 * include/grub/partition.h (grub_partition_iterate): Return int
14859 instead of grub_err_t.
14860
14861 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14862 prototype.
14863 [GRUB_UTIL] (grub_search_fini): Likewise.
14864
14865 * include/grub/device.h (grub_device_iterate): New prototype.
14866
14867 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14868 commands/search.c.
14869 (pkgdata_MODULES): Added search.mod.
14870 (search_mod_SOURCES): New variable.
14871 (search_mod_CFLAGS): Likewise.
14872
14873 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14874 (pkgdata_MODULES): Added search.mod.
14875 (search_mod_SOURCES): New variable.
14876 (search_mod_CFLAGS): Likewise.
14877
14878 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14879 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14880 All callers changed.
14881
14882 * DISTLIST: Added commands/search.c.
14883
ef095434 148842005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14885
14886 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14887 conversion.
14888 (grub_getcharwidth): New function.
14889
14890 * kern/misc.c (grub_utf8_to_ucs4): New function.
14891
14892 * include/grub/term.h (struct grub_term): Added a new member
14893 "getcharwidth".
14894 (grub_getcharwidth): New prototype.
14895
14896 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14897
14898 * term/i386/pc/console.c (map_char): New function. Segregated from
14899 grub_console_putchar.
14900 (grub_console_putchar): Use map_char.
14901 (grub_console_getcharwidth): New function.
14902 (grub_console_term): Specified grub_console_getcharwidth as
14903 getcharwidth.
14904
14905 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14906 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14907
14908 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14909 GRUB_ERRNO.
14910 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14911 on grub_strtoul completely.
14912 (write_char): Declare local variables in the beginning of the
14913 function.
14914 (grub_vesafb_getcharwidth): New function.
14915 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14916 getcharwidth.
14917
1f0a95e4 149182005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14919
14920 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14921 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14922 commands/i386/pc/vbetest.c.
14923
14924 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14925 call grub_vbe_get_controller_info again, because the returned
14926 information is volatile.
14927 (grub_vbe_set_video_mode): Mostly rewritten.
14928 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14929 grub_vbe_status_t correctly.
14930 (grub_vbe_get_video_mode_info): Likewise.
14931 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14932 several if statements.
14933
14934 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14935 * commands/i386/pc/vbeinfo.c: ... this.
14936
14937 * commands/i386/pc/vbe_test.c: Renamed to ...
14938 * commands/i386/pc/vbetest.c: ... this.
14939
14940 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14941 ...
14942 (grub_cmd_vbeinfo): ... this. Save video modes before
14943 iterating. Skip a video mode, if it is not available, not enough
14944 information is given or it is monochrome. Show the memory
14945 model. Leave the interpretation of MODEVAR to grub_strtoul
14946 completely.
14947 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14948 (GRUB_MOD_FINI): Likewise.
14949
14950 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14951 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14952 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14953 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14954 grub_strtoul completely.
14955 (real2pm): Removed.
14956 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14957 (GRUB_MOD_FINI): Likewise.
14958
14959 * normal/misc.c: Include grub/mm.h.
14960
14961 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14962 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14963 (vbe_list_modes_mod_SOURCES): Removed.
14964 (vbe_list_modes_mod_CFLAGS): Likewise.
14965 (vbe_test_mod_SOURCES): Likewise.
14966 (vbe_test_mod_CFLAGS): Likewise.
14967 (vbeinfo_mod_SOURCES): New variable.
14968 (vbeinfo_mod_CFLAGS): Likewise.
14969 (vbetest_mod_SOURCES): Likewise.
14970 (vbetest_mod_CFLAGS): Likewise.
14971
992ffbbe 149722005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14973
14974 * normal/misc.c: New file.
14975
14976 * DISTLIST: Added normal/misc.c.
f19dbdb7 14977
992ffbbe 14978 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14979 DISK to HOOK. Call HOOK with DISK.
14980 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14981 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14982 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14983
14984 * normal/menu_entry.c (struct screen): Added a new member
14985 "completion_shown".
14986 (completion_buffer): New global variable.
14987 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14988 (store_completion): New function.
14989 (complete): Likewise.
14990 (clear_completions): Likewise.
14991 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14992 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14993 a tab, call complete.
14994
14995 * normal/completion.c (disk_dev): Removed.
14996 (print_simple_completion): Likewise.
14997 (print_partition_completion): Likewise.
14998 (print_func): New global variable.
14999 (add_completion): Do not take the arguments WHAT or PRINT any
15000 longer. Added a new argument TYPE. Instead of printing directly,
15001 call PRINT_FUNC if not NULL.
15002 All callers changed.
15003 (complete_device): Use a local variable DEV instead of
15004 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15005 (grub_normal_do_completion): Take a new argument HOOK. Do not
15006 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15007 empty string, return NULL instead.
15008 All callers changed.
15009
15010 * normal/cmdline.c (print_completion): New function.
15011
15012 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15013 to HOOK.
15014 All callers changed.
15015
15016 * kern/disk.c (grub_print_partinfo): Removed.
15017
15018 * include/grub/partition.h (struct grub_partition_map): Add a new
15019 argument DISK into HOOK of ITERATE.
15020 (grub_partition_iterate): Add a new argument DISK to HOOK.
15021
15022 * include/grub/normal.h (enum grub_completion_type): New enum.
15023 (grub_completion_type_t): New type.
15024 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15025 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15026 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15027 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15028 (grub_normal_do_completion): Added a new argument HOOK.
15029 (grub_normal_print_device_info): New prototype.
15030
15031 * include/grub/disk.h (grub_print_partinfo): Removed.
15032
15033 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15034 (normal_mod_SOURCES): Likewise.
15035 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15036 (normal_mod_SOURCES): Likewise.
15037
15038 * commands/ls.c (grub_ls_list_disks): Use
15039 grub_normal_print_device_info instead of grub_print_partinfo. Free
15040 PNAME.
15041 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15042 duplicating the code.
15043
0bd41162 150442005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15045
15046 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 15047 follow GCS more precisely.
15048 * commands/i386/pc/vbe_test.c: Likewise.
15049 * include/grub/i386/pc/vbe.h: Likewise.
15050 * term/i386/pc/vesafb.c: Likewise.
15051 * video/i386/pc/vbe.c: Likewise.
0bd41162 15052
6323696a 150532005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15054
15055 * DISTLIST: Added term/i386/pc/vesafb.c
15056 DISTLIST: Added video/i386/pc/vbe.c
15057 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15058 DISTLIST: Added commands/i386/pc/vbe_test.c.
15059 * commands/i386/pc/vbe_list_modes.c: New file.
15060 * commands/i386/pc/vbe_test.c: Likewise.
15061 * term/i386/pc/vesafb.c: Likewise.
15062 * video/i386/pc/vbe.c: Likewise.
15063 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15064 (grub_vbe_probe) Added prototype.
15065 (grub_vbe_set_video_mode) Likewise.
15066 (grub_vbe_get_video_mode) Likewise.
15067 (grub_vbe_get_video_mode_info) Likewise.
15068 (grub_vbe_set_pixel_rgb) Likewise.
15069 (grub_vbe_set_pixel_index) Likewise.
15070 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15071 (pkgdata_MODULES): Added vesafb.mod.
15072 (pkgdata_MODULES): Added vbe_list_modes.mod.
15073 (pkgdata_MODULES): Added vbe_test.mod.
15074 (vbe_mod_SOURCES): Added.
15075 (vbe_mod_CFLAGS): Likewise.
15076 (vesafb_mod_SOURCES): Likewise.
15077 (vesafb_mod_CFLAGS): Likewise.
15078 (vbe_list_modes_mod_SOURCES): Likewise.
15079 (vbe_list_modes_mod_CFLAGS): Likewise.
15080 (vbe_test_mod_SOURCES): Likewise.
15081 (vbe_test_mod_CFLAGS): Likewise.
15082
0a74e62f 150832005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15084
0a74e62f 15085 * normal/command.c (grub_command_execute): If INTERACTIVE is
15086 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15087 CMDLINE. Disable the pager if INTERACTIVE is true.
15088 All callers are changed.
15089
15090 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15091 before reading a config file.
15092 * normal/main.c (read_config_file): Even if a command is not
15093 found, register it if it is within an entry.
15094
15095 * util/grub-emu.c: Include sys/types.h and unistd.h.
15096 (options): Added --hold.
15097 (struct arguments): Added a new member "hold".
15098 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15099 missing.
15100 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15101 cleared by a debugger, if it is not zero.
15102
15103 * include/grub/normal.h (grub_command_execute): Add an argument
15104 INTERACTIVE.
15105
e51f85ae 151062005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
15107
15108 * DISTLIST: Added include/grub/i386/pc/vbe.h.
15109
e9c6f39b 151102005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
15111
15112 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15113 program with another one, because the old one didn't detect a bug
15114 in gcc-3.4. Always use regparm 2, because the new test is still
15115 not enough for gcc-4.0. Someone must investigate a simple test
15116 case which detects a bug in gcc-4.0.
15117
8de3495c 151182005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
15119
15120 * DISTLIST: Added normal/completion.c.
15121
15122 * normal/completion.c: New file.
f19dbdb7 15123
8de3495c 15124 * term/i386/pc/console.c (grub_console_getwh): New function.
15125 (grub_console_term): Assign grub_console_getwh to getwh.
15126
15127 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15128 function is defined in normal/completion.c as
15129 grub_normal_do_completion.
15130 (grub_cmdline_get): Use grub_normal_do_completion instead of
15131 grub_tab_complete.
15132
15133 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15134 returns non-zero, otherwise return 0.
15135 (grub_partition_iterate): First, probe the partition map. Then,
15136 call ITERATE only for this partition map.
15137
15138 * kern/misc.c (grub_strncmp): Rewritten.
15139
15140 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15141 returns non-zero. Otherwise return 0.
15142
15143 * include/grub/partition.h (grub_partition_map_iterate): Return
15144 int instead of void.
15145
15146 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15147
15148 * include/grub/misc.h (grub_strncmp): Change the type of N to
15149 grub_size_t.
15150
15151 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15152 of void.
15153
15154 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 15155 unsigned explicitly before comparing it with I.
8de3495c 15156
15157 * kern/main.c (grub_env_write_root): Add the attribute unused into
15158 VAR.
15159
15160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15161 normal/completion.c.
15162 (normal_mod_SOURCES): Likewise.
15163 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15164 (normal_mod_SOURCES): Likewise.
15165
15166 * normal/command.c (grub_iterate_commands): If ITERATE returns
15167 non-zero, return one immediately.
15168
e85e144b 151692005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15170
15171 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15172 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15173 descriptions.
15174 (grub_vbe_get_controller_info): New function.
15175 (grub_vbe_get_mode_info): Likewise.
15176 (grub_vbe_set_mode): Likewise.
15177 (grub_vbe_get_mode): Likewise.
15178 (grub_vbe_set_memory_window): Likewise.
15179 (grub_vbe_get_memory_window): Likewise.
15180 (grub_vbe_set_scanline_length): Likewise.
15181 (grub_vbe_get_scanline_length): Likewise.
15182 (grub_vbe_set_display_start): Likewise.
15183 (grub_vbe_get_display_start): Likewise.
15184 (grub_vbe_set_palette_data): Likewise.
15185 * include/grub/i386/pc/vbe.h: New file.
15186
c46153d2 151872005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15188
15189 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15190 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15191 * DISTLIST: Likewise.
15192 * kern/ieee1275/of.c: Moved to ...
15193 * kern/ieee1275/ieee1275.c: ... here.
15194
0cb90c45 151952005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15196
15197 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15198 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15199 Pass 0 as `end' parameter to grub_strtoul().
15200
a19fb360 152012005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15202
15203 * include/grub/powerpc/ieee1275/console.h: Do not include
15204 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15205 ifdef.
15206 (grub_console_cur_color): Remove i386-specific prototype.
15207 (grub_console_real_putchar): Likewise.
15208 (grub_console_checkkey): Likewise.
15209 (grub_console_getkey): Likewise.
15210 (grub_console_getxy): Likewise.
15211 (grub_console_gotoxy): Likewise.
15212 (grub_console_cls): Likewise.
15213 (grub_console_setcursor): Likewise.
15214 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15215 Include <grub/machine/console.h>.
15216 * term/ieee1275/ofconsole.c: Likewise.
15217
4ac9bd04 152182005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15219
15220 * Makefile.in (LIBLZO): New variable.
15221
15222 * configure.ac: Check for LZO version 2.
15223
15224 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15225 lzo/lzo1x.h instead of lzo1x.h.
15226
15227 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15228 of -llzo.
15229
15230 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15231 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15232
15233 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15234 copying the data from PARTITION to P.
15235
f4917dfd 152362005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15237
15238 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15239 negative, unload the module.
15240
15241 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15242 map is "pc_partition_map" but not "pc".
15243 (usage): Fix the description. The options are --boot-image and
15244 --core-image but not --boot-file or --core-file.
15245 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15246 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15247 DEFAULT_DIRECTORY.
15248
15249 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15250 --core-file. Specify INSTALL_DEVICE as an argument.
15251
15252 * util/console.c: Include config.h.
15253 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15254 [HAVE_NCURSES_H]: Include ncurses.h.
15255 [HAVE_CURSES_H]: Include curses.h.
15256 [!A_NORMAL] (A_NORMAL): Defined as zero.
15257 [!A_STANDOUT] (A_STANDOUT): Likewise.
15258
15259 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15260 -lncurses.
15261 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15262
15263 * configure.ac: Check for curses libraries and headers.
15264
15265 * Makefile.in (LIBCURSES): New variable.
15266
15267 * genmk.rb (Script::rule): Set the executable bits.
15268
15269 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15270 name of the PC partition map is "pc_partition_map" but not "pc".
15271
0e143073 152722005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15273
15274 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15275 (modules): Likewise.
15276 (usage): Added descriptions for --modules and --grub-probefs.
15277 Handle --modules and --grub-probefs. Save the arguments in MODULES
15278 and GRUB_PROBEFS, respectively.
15279 Auto-detect a filesystem module against GRUBDIR. If the result is
15280 empty and modules are not specified explicitly, abort the
15281 installation. Add the result to MODULES.
15282
15283 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15284 disk/powerpc/ieee1275/ofdisk.c,
15285 include/grub/powerpc/ieee1275/init.h and
15286 term/powerpc/ieee1275/ofconsole.c.
15287 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15288 term/ieee1275/ofconsole.c.
15289
15290 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15291
15292 * COPYING: Upgraded to the latest version. Only the address of the
15293 FSF office has changed.
f19dbdb7 15294
efd6e6d5 152952005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15296
15297 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15298 kern/ieee1275.c with kern/ieee1275/of.c.
15299
15300 * kern/ieee1275.c: Moved to ...
15301 * kern/ieee1275/of.c: ... here.
15302
8ceafda2 153032005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15304
15305 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 15306 readability.
8ceafda2 15307
15308 * config.guess: Updated to the latest version from gnulib.
15309 * config.sub: Likewise.
15310 * install.sh: Likewise.
15311 * mkinstalldirs: Likewise.
15312
15313 * include/grub/console.h: Removed. This file is arch-specific. Do
15314 not put this in include/grub.
15315
15316 * include/grub/i386/pc/console.h: Resurrected.
15317
15318 * util/console.c: Include grub/machine/console.h instead of
15319 grub/console.h.
15320 * util/grub-emu.c: Likewise.
15321
267f6cd9 153222005-08-04 Marco Gerards <metgerards@student.han.nl>
15323
15324 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15325 hardcoded value.
f19dbdb7 15326
267f6cd9 15327 From Vincent Pelletier <subdino2004@yahoo.fr>
15328 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15329 Redefined to use grub_getwh.
15330 (grub_term): New member named getwh.
15331 (grub_getwh): New prototype.
15332 * kern/term.c (grub_getwh): New function.
15333 * term/i386/pc/console.c (grub_console_getwh): New function.
15334 (grub_console_term): New member `getwh'.
15335 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15336 (grub_vga_term): New member `getwh'.
0b5abe02 15337 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 15338 grub_ssize_t.
15339 (grub_ofconsole_getw): New function.
15340 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15341 (grub_ofconsole_term): New field named getwh and new initial
15342 value.
15343
3be7266d 153442005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15345
15346 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15347 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15348 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15349 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15350 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15351 of <grub/machine/ieee1275.h>.
15352 * commands/ieee1275/reboot.c: Likewise.
15353 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15354 * kern/ieee1275.c: ... to here. All users updated. Change all
15355 parameter structs to use new type `grub_ieee1275_cell_t'.
15356 * term/powerpc/ieee1275/ofconsole.c: Move ...
15357 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15358 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15359 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15360 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15361 to return int.
15362 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15363 Remove unused prototypes. All users updated.
15364 * include/grub/powerpc/ieee1275/console.h: Removed.
15365 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15366 `grub_ieee1275_cell_t'.
15367 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15368 Cast comparisons with -1 to the correct type.
15369 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15370 type to match `grub_ieee1275_entry_fn'.
15371
8b5f3938 153722005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15373
15374 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15375
15376 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15377 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15378 partmap/sun.c.
15379 (grub_probefs_SOURCES): New variable.
15380
15381 * util/i386/pc/grub-probefs.c: New file.
15382
15383 * util/i386/pc/grub-setup.c (main): Call
15384 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15385 grub_hfs_init and grub_jfs_init to initialize the system. Call
15386 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15387 grub_pc_partition_map_fini to finish the system.
15388
ea409713 153892005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15390
15391 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15392 function.
15393 (grub_multiboot_load_elf32): Likewise.
15394 (grub_multiboot_is_elf64): Likewise.
15395 (grub_multiboot_load_elf64): Likewise.
15396 (grub_multiboot_load_elf): Likewise.
15397 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15398 an ELF32 or ELF64 file.
15399 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15400
15401 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15402 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15403 NULL before calling FS->LABEL.
15404 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15405 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15406 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15407 before calling FS->LABEL.
15408
141a288b 154092005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15410
15411 * util/i386/pc/grub-install.in (datadir): New variable.
15412 (libdir): Removed.
15413 (pkgdatadir): New variable.
15414 (pkglibdir): Removed.
15415
0d5f8a54 154162005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15417
15418 * DISTLIST: Added util/i386/pc/grub-install.in.
15419
15420 * util/i386/pc/grub-install.in: New file.
15421
15422 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15423 (grub_install_SOURCES): Likewise.
15424
15425 * genmk.rb: Added support for scripts.
15426 (Script): New class.
15427 (scripts): New variable.
15428
15429 * Makefile.in (install-local): Install sbin_SCRIPTS by
15430 INSTALL_SCRIPT.
15431 (uninstall): Remove sbin_SCRIPTS.
15432
15433 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15434 device, try to get a GRUB device by
15435 grub_util_biosdisk_get_grub_dev.
15436 Free DEST_DEV.
15437
15438 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15439 description for --device-map.
15440
5f968e1e 154412005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15442
15443 Change the semantics of variable hooks. They now return strings
15444 instead of error values.
f19dbdb7 15445
5f968e1e 15446 * util/i386/pc/grub-setup.c: Include grub/env.h.
15447 (setup): Use grub_device_set_root instead of grub_env_set.
15448
15449 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15450 grub_env_get instead of grub_device_set_root and
15451 grub_device_get_root, respectively.
15452
15453 * kern/main.c (grub_env_write_root): New function.
15454 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15455 grub_env_set instead of grub_device_set_root.
15456
15457 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15458 many variables.
15459 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15460 rather than calling ENV->WRITE_HOOK afterwards.
15461 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15462 passing a pointer of a pointer.
15463 (grub_register_variable_hook): Change the types of "read_hook" and
15464 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15465 respectively.
15466 Allocate the default empty string on the heap, because this string
15467 may be freed later.
15468
15469 * kern/device.c: Include grub/env.h.
15470 (grub_device_set_root): Removed.
15471 (grub_device_get_root): Likewise.
15472 (grub_device_open): Use grub_env_get instead of
15473 grub_device_get_root.
15474
15475 * include/grub/env.h (grub_env_read_hook_t): New type.
15476 (grub_env_write_hook_t): Likewise.
15477 (grub_env_var): Change the types of "read_hook" and "write_hook"
15478 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15479 (grub_register_variable_hook): Likewise.
15480
15481 * include/grub/device.h (grub_device_set_root): Removed.
15482 (grub_device_set_root): Likewise.
15483
15484 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15485 make sure that DIRNAME terminates with '/', so that
15486 grub_fat_find_dir will fail if PATH is not a directory.
15487
15488 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15489 from DIRNAME.
15490 Use the qualifier auto for print_files and print_files_long.
15491 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15492 as a regular file.
15493 Put a newline only if there is no error.
15494 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15495 used.
15496
896f0afd 154972005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15498
15499 * kern/partition.c (grub_partition_probe): Initialize PART to
15500 NULL. Otherwise, when no partition map is registered, this returns
15501 a garbage.
15502
b28b81b2 155032005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15504
15505 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15506 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15507 valid.
15508
5f3607e0 155092005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15510
15511 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15512 information on each device, if it does not have partitions. Print
15513 "Device" instead of "Disk", because this function is not specific
15514 to disk devices.
15515
15516 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15517 static to ensure that it is put on the memory rather than a
15518 register.
15519
502c87e8 155202005-07-17 Yoshinori Okuji <okuji@enbug.org>
15521
15522 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15523 (grub_cat_init): Likewise.
15524 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15525 (options): Likewise.
15526 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15527 (grub_configfile_init): Likewise.
15528 * font/manager.c (GRUB_MOD_INIT): Likewise.
15529 * commands/help.c (GRUB_MOD_INIT): Likewise.
15530 (grub_help_init): Likewise.
15531 * normal/command.c (grub_command_init): Likewise.
15532 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15533 * disk/loopback.c (grub_loop_init): Likewise.
15534 (GRUB_MOD_INIT): Likewise.
15535 * commands/ls.c (grub_ls_init): Likewise.
15536 (GRUB_MOD_INIT): Likewise.
15537 (options): Likewise.
15538 * commands/boot.c (grub_boot_init): Likewise.
15539 (GRUB_MOD_INIT): Likewise.
15540 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15541 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15542 (GRUB_MOD_INIT): Likewise.
15543 * commands/cmp.c (grub_cmp_init): Likewise.
15544 (GRUB_MOD_INIT): Likewise.
15545
15546 * normal/arg.c: Use <> instead of "" to include header files.
15547 (SHORT_ARG_HELP): New macro.
15548 (SHORT_ARG_USAGE): Likewise.
15549 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15550 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15551 descriptions.
15552 (find_short): Check if C is 'h' or 'u' explicitly.
15553 (grub_arg_show_help): Use space characters instead of tabs. Treat
15554 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15555 are shown with --help and --usage only if they are not used for
15556 the command itself.
15557 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15558 'h' and 'u'.
15559
15560 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15561 const into "longarg". Change the type of "shortarg" to int.
15562
f806d18e 155632005-07-17 Yoshinori Okuji <okuji@enbug.org>
15564
15565 * boot/i386/pc/boot.S (boot_drive_check): New label.
15566
15567 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15568 macro.
15569
15570 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15571 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15572
e293232b 155732005-07-17 Yoshinori Okuji <okuji@enbug.org>
15574
15575 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15576 When turning off Gate A20, skip the check and return immediately,
15577 because this is not fatal usually.
15578
ebedfd00 155792005-07-17 Yoshinori Okuji <okuji@enbug.org>
15580
15581 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15582 be 0x7C00 instead of 0x8000.
15583
15584 * boot/i386/pc/pxeboot.S: Rewritten.
15585
15586 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15587 EXT_C.
15588 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15589 result.
15590
654fc59f 155912005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15592
15593 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15594 robustness. This routine now supports a BIOS call and System
15595 Control Port A to modify the gate A20.
15596
15597 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15598 Increased to 0x440.
15599
09f9923f 156002005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15601
15602 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15603 device path and resulting ihandle.
15604 (grub_ofdisk_close): dprintf the ihandle being closed.
15605 (grub_ofdisk_read): dprintf function parameters.
15606 * kern/mm.c (grub_mm_init_region): Likewise.
15607 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15608 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15609 size, and boot arguments.
15610 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15611 before loading into memory.
15612 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15613 before loading into memory.
15614
7ef504d8 156152005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15616
15617 * kern/mm.c: Added much documentation.
15618 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15619 8, set to 5 instead of 8.
15620
e0f050c2 156212005-07-10 Yoshinori Okuji <okuji@enbug.org>
15622
15623 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15624
15625 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15626 (grub_mkdevicemap_SOURCES): New variable.
15627
15628 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15629 lib/device.c of GRUB Legacy.
15630
7224189a 156312005-07-10 Yoshinori Okuji <okuji@enbug.org>
15632
15633 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15634 instead of PATH is NULL.
15635
68c864eb 156362005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15637
15638 * commands/cmp.c (BUFFER_SIZE): New macro.
15639 (grub_cmd_cmp): Close the right file at the right time. Compare
15640 only data just read. Don't report files of different size as
15641 identical. Dynamically allocate buffers. Move variable
15642 declarations at the beginning of function.
15643
e6f3e614 156442005-07-09 Yoshinori Okuji <okuji@enbug.org>
15645
15646 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15647 reverse.
15648
f8f1559a 156492004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15650
15651 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15652 when backspace is pressed at beginning of line.
15653
39c9d41d 156542005-07-03 Yoshinori Okuji <okuji@enbug.org>
15655
15656 * DISTLIST: Added genfslist.sh.
15657
15658 * normal/main.c (fs_module_list): New variable.
15659 (autoload_fs_module): New function.
15660 (read_fs_list): Likewise.
15661 (grub_normal_execute): Call read_fs_list.
15662
15663 * kern/fs.c (grub_fs_autoload_hook): New variable.
15664 (grub_fs_probe): Added support for auto-loading.
15665
15666 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15667 (grub_fs_module_list_t): New type.
15668
15669 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15670 (grub_fs_autoload_hook): New prototype.
15671
15672 * genfslist.sh: New file.
f19dbdb7 15673
39c9d41d 15674 * genmk.rb: Added a rule to generate a filesystem list.
15675
121c1d83 156762005-06-30 Marco Gerards <metgerards@student.han.nl>
15677
15678 * configure.ac: Fix the test for cross-compiling.
15679
15680 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15681 define GRUB_UTIL anymore.
15682
15683 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15684 so this function works on other systems than just big endian.
15685 (load_modules): Likewise.
15686 (add_segments): Likewise.
15687
e75d76e1 156882005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15689
15690 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15691 contains `l' modifier, get a long from va_arg().
15692
50b5a0a7 156932005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15694
15695 * kern/mm.c (grub_free): If the next free block which is being
15696 merged is the first free block, set the first block to the block
15697 being freed.
15698 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15699
89371b20 157002005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15701
15702 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15703 `grub_ieee1275_chosen'.
15704
168d6e58 157052005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15706
15707 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15708 (grub_ieee1275_chosen): New variable.
15709 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15710 `chosen'.
15711 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15712 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15713 Rename first argument to `phandle' for consistency.
15714 (grub_ieee1275_get_property_length): Likewise.
15715 (grub_ieee1275_next_property): Likewise. Change type of first argument
15716 to grub_ieee1275_phandle_t.
15717 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15718 Move export next to declaration.
15719 (grub_ieee1275_chosen): New variable.
15720 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15721 Correct cosmetic typo.
15722 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15723 `grub_ieee1275_chosen'.
15724 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15725 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15726 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15727 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15728 `grub_ieee1275_chosen'.
15729
ca5baa3f 157302005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15731
15732 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15733 /chosen/bootargs.
15734 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15735 /chosen/bootargs as "variable=value" pairs.
15736
708b345f 157372005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15738
15739 * include/grub/misc.h (grub_dprintf): New macro.
15740 (grub_real_dprintf): New prototype.
15741 (grub_strword): Likewise.
15742 (grub_iswordseparator): Likewise.
15743 * kern/misc.c (grub_real_dprintf): New function.
15744 (grub_strword): Likewise.
15745 (grub_iswordseparator): Likewise.
15746
f4c5e67c 157472005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15748
15749 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15750 (roundup): Remove macro.
15751 (grub_ieee1275_flags): Make static.
15752 (grub_ieee1275_realmode): Remove.
15753 (grub_ieee1275_test_flag): New function.
15754 (grub_ieee1275_set_flag): Likewise.
15755 (find_options): Rename to `grub_ieee1275_find_options'; update
15756 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15757 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15758 (cmain): New prototype.
15759 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15760 `grub_ieee1275_flags' directly.
15761 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15762 machine/biosdisk.h.
15763 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15764 Don't include grub/machine/init.h.
15765 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15766 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15767 Remove prototype.
15768 (grub_ieee1275_realmode): Likewise.
15769 (grub_ieee1275_flag): New enum.
15770 (grub_ieee1275_test_flag): New prototype.
15771 (grub_ieee1275_set_flag): New prototype.
15772 * include/grub/powerpc/ieee1275/init.h: Remove file.
15773 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15774 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15775 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15776 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15777 comment.
15778 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15779 `grub_ieee1275_test_flag'.
15780 (grub_ieee1275_encode_devname): Likewise.
15781
ed16607e 157822005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15783
15784 * include/grub/powerpc/ieee1275/ieee1275.h
15785 (grub_ieee1275_encode_devname): New prototype.
15786 (grub_ieee1275_get_filename): Likewise.
15787 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15788 function.
15789 (grub_set_prefix): Likewise.
15790 (grub_machine_init): Call grub_set_prefix.
15791 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15792 (grub_parse_type): New enum.
15793 (grub_ieee1275_get_devargs): New function.
15794 (grub_ieee1275_get_devname): Likewise.
15795 (grub_ieee1275_parse_args): Likewise.
15796 (grub_ieee1275_get_filename): Likewise.
15797 (grub_ieee1275_encode_devname): Likewise.
15798
be369920 157992005-03-30 Marco Gerards <metgerards@student.han.nl>
15800
15801 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15802 `grub_loader_unset'.
15803
a5ce3a4a 158042005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15805
15806 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15807 instead of grub_ieee1275_interpret.
15808 (grub_halt_init): New function.
15809 (grub_halt_fini): Likewise.
15810 (GRUB_MOD_INIT): Correct message grammar.
15811 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15812 instead of grub_ieee1275_interpret.
15813 (grub_reboot_init): New function.
15814 (grub_reboot_fini): Likewise.
15815 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15816 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15817 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15818 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15819 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15820 function.
15821 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15822 Add prototype.
15823 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15824 prototype.
15825 (grub_halt): Likewise.
15826 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15827 (cmain): Remove __attribute__((unused)).
15828 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15829 (grub_heap_len): Likewise.
15830 (grub_machine_fini): New function.
15831 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15832 (grub_halt): Likewise.
15833 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15834 function.
15835 * util/powerpc/ieee1275/misc.c: New file.
15836
0058f771 158372005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15838
15839 * DISTLIST: New file.
15840 * gendistlist.sh: Likewise.
f19dbdb7 15841
0058f771 15842 * Makefile.in (COMMON_DISTFILES): Removed.
15843 (BOOT_DISTFILES): Likewise.
15844 (CONF_DISTFILES): Likewise.
15845 (DISK_DISTFILES): Likewise.
15846 (FS_DISTFILES): Likewise.
15847 (INCLUDE_DISTFILES): Likewise.
15848 (KERN_DISTFILES): Likewise.
15849 (LOADER_DISTFILES): Likewise.
15850 (TERM_DISTFILES): Likewise.
15851 (UTIL_DISTFILES): Likewise.
15852 (DISTFILES): Likewise.
15853 (uninstall): Uninstall files in $(pkgdata_DATA).
15854 (DISTLIST): New target.
15855 (distdir): Use the contents of the file DISTLIST to get a list of
15856 distributed files.
15857
46b3b8a5 158582005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15859
15860 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15861 descriptor. This is ported from GRUB Legacy.
15862
15863 * gencmdlist.sh: Added an extra semicolon to make it work with
15864 old sed versions. Reported by Robert Bihlmeyer
15865 <robbe@orcus.priv.at>.
15866
5822ff87 158672005-03-08 Yoshinori Okuji <okuji@enbug.org>
15868
15869 Automatic loading of commands is supported.
f19dbdb7 15870
5822ff87 15871 * normal/main.c (read_command_list): New function.
15872 (grub_normal_execute): Call read_command_list.
15873
15874 * normal/command.c (grub_register_command): Return zero or CMD.
15875 Allocate CMD->NAME from the heap.
15876 Initialize CMD->MODULE_NAME to zero.
15877 Find the same name as well. If the same command is found and it is
15878 a dummy command, overwrite members. If it is not a dummy command,
15879 return zero.
15880 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15881 (grub_command_find): If a dummy command is found, load a module
15882 and retry to find a command only once.
15883
15884 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15885 make sure that each command is loaded.
15886
15887 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15888 macro.
15889 (struct grub_command): Remove const from the member `name'.
15890 Add a new member `module_name'.
15891 (grub_register_command): Return grub_command_t.
15892
15893 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15894 sure that each command is loaded.
15895
15896 * genmk.rb (PModule::rule): Specify a module name without the
15897 suffix ".mod" to gencmdlist.sh.
15898
7b1f4b57 158992005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15900
15901 * gencmdlist.sh: New file.
f19dbdb7 15902
7b1f4b57 15903 * genmk.rb (PModule::rule): Generate a rule for a command list.
15904 Clean command.lst.
15905 Generate command.lst from $(COMMANDFILES).
15906
15907 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15908 (DATA): Added $(pkgdata_DATA).
15909 (install-local): Install files in $(pkgdata_DATA).
15910
062aaf39 159112005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15912
15913 * term/i386/pc/vga.c (debug_command): Removed.
15914 (GRUB_MOD_INIT): Do not register the command "debug".
15915
15916 From Hollis Blanchard:
15917 * commands/configfile.c: New file.
15918 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15919 commands/configfile.c.
15920 (pkgdata_MODULES): Added configfile.mod.
15921 (configfile_mod_SOURCES): New variable.
15922 (configfile_mod_CFLAGS): Likewise.
15923 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15924 commands/configfile.c.
15925 (pkgdata_MODULES): Added configfile.mod.
15926 (configfile_mod_SOURCES): New variable.
15927 (configfile_mod_CFLAGS): Likewise.
15928 * util/grub-emu.c (main): Call grub_configfile_init and
15929 grub_configfile_fini.
15930 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15931 prototype.
15932 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15933
cee01aa6 159342005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15935
15936 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15937 address.
15938
15939 * commands/help.c (grub_cmd_help): Do not print newlines after
15940 the last command in print_command_help.
15941
93f3a1d8 159422005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15943
15944 * commands/default.h: New file.
15945 * commands/timeout.h: Likewise.
15946 * normal/context.c: Likewise.
f19dbdb7 15947
93f3a1d8 15948 * util/misc.c: Do not include sys/times.h.
15949 Include sys/time.h and grub/machine/time.h.
15950 (grub_get_rtc): Rewritten with gettimeofday.
15951
15952 * util/grub-emu.c (main): Call grub_default_init and
15953 grub_timeout_init before grub_normal_init, and call
15954 grub_timeout_fini and grub_default_fini after grub_main.
15955
15956 * util/console.c (grub_ncurses_checkkey): Return the read
15957 character or -1.
15958
15959 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15960 timeouts.
15961
15962 * normal/main.c (read_config_file): Push MENU. If this fails,
15963 print an error and wait for a user input.
15964 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15965 If a menu is empty or an error occurs, pop MENU.
15966 (grub_normal_execute): Pop and free MENU after grub_menu_run
15967 returns.
15968
15969 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15970
15971 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15972 include time.h.
15973 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15974 without GRUB_UTIL.
15975 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15976 time.h.
15977 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15978 without GRUB_UTIL.
15979
15980 * include/grub/normal.h (struct grub_menu_list): New struct.
15981 (grub_menu_list_t): New type.
15982 (struct grub_context): New struct.
15983 (grub_context_t): New type.
15984 (grub_register_command): Got rid of EXPORT_FUNC.
15985 (grub_unregister_command): Likewise.
15986 (grub_context_get): New prototype.
15987 (grub_context_get_current_menu): Likewise.
15988 (grub_context_push_menu): Likewise.
15989 (grub_context_pop_menu): Likewise.
15990 [GRUB_UTIL] (grub_default_init): Likewise.
15991 [GRUB_UTIL] (grub_default_fini): Likewise.
15992 [GRUB_UTIL] (grub_timeout_init): Likewise.
15993 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15994
15995 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15996 commands/timeout.c and normal/context.c.
15997 (pkgdata_MODULES): Added default.mod and timeout.mod.
15998 (normal_mod_SOURCES): Added normal/context.c.
15999 (default_mod_SOURCES): New variable.
16000 (default_mod_CFLAGS): Likewise.
16001 (timeout_mod_SOURCES): Likewise.
16002 (timeout_mod_CFLAGS): Likewise.
16003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16004 conf/i386-pc.rmk.
16005 (pkgdata_MODULES): Added default.mod and timeout.mod.
16006 (normal_mod_SOURCES): Added normal/context.c.
16007 (default_mod_SOURCES): New variable.
16008 (default_mod_CFLAGS): Likewise.
16009 (timeout_mod_SOURCES): Likewise.
16010 (timeout_mod_CFLAGS): Likewise.
16011
16012 * Makefile.in (all-local): Added $(MKFILES).
16013
4ed2e1dd 160142005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16015
16016 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16017 (grub_emu_SOURCES): Likewise.
16018 (pkgdata_MODULES): Add `sun.mod'.
16019 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16021 `partmap/sun.c'.
16022 (pkgdata_MODULES): Add `sun.mod'.
16023 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16024 * include/grub/partition.h (grub_sun_partition_map_init): New
16025 prototype.
16026 (grub_sun_partition_map_fini): Likewise.
16027 * partmap/sun.c: New file.
16028 * util/grub-emu.c (main): Initialize and de-initialize the sun
16029 partitionmap support.
16030
4d4e372e 160312005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16032
16033 This implements an Emacs-like menu entry editor.
f19dbdb7 16034
4d4e372e 16035 * normal/menu_entry.c: New file.
f19dbdb7 16036
4d4e372e 16037 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16038 characters to ASCII.
16039 (saved_char): New variable.
16040 (grub_ncurses_checkkey): Rewritten completely.
16041 (grub_ncurses_getkey): Likewise.
16042 (grub_ncurses_init): Call raw instead of cbreak.
16043
16044 * normal/menu.c (print_entry): Do not put a space.
16045 (init_page): Renamed to ...
16046 (grub_menu_init_page): ... this. All callers changed.
16047 (edit_menu_entry): Removed.
16048 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16049
16050 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16051
16052 * kern/misc.c (grub_vprintf): Call grub_refresh.
16053
16054 * normal/menu.c (DISP_LEFT): Renamed to ...
16055 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16056 * normal/menu.c (DISP_UP): Renamed to ...
16057 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16058 * normal/menu.c (DISP_RIGHT): Renamed to ...
16059 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16060 * normal/menu.c (DISP_DOWN): Renamed to ...
16061 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16062 * normal/menu.c (DISP_HLINE): Renamed to ...
16063 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16064 * normal/menu.c (DISP_VLINE): Renamed to ...
16065 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16066 * normal/menu.c (DISP_UL): Renamed to ...
16067 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16068 * normal/menu.c (DISP_UR): Renamed to ...
16069 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16070 * normal/menu.c (DISP_LL): Renamed to ...
16071 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16072 * normal/menu.c (DISP_LR): Renamed to ...
16073 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16074 * normal/menu.c (TERM_WIDTH): Renamed to ...
16075 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16076 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16077 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16078 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16079 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16080 * normal/menu.c (TERM_MARGIN): Renamed to ...
16081 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16082 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16083 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16084 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16085 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16086 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16087 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16088 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16089 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16090 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16091 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16092 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16093 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16094 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16095 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16096 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16097 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16098 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16099 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16100 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16101 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16102 All callers changed.
16103
16104 * include/grub/normal.h: New prototype.
16105
16106 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16107 normal/menu_entry.c.
16108 (normal_mod_SOURCES): Likewise.
16109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16110 (normal_mod_SOURCES): Likewise.
16111
e6b92c8a 161122005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
16113
16114 * include/grub/normal.h (grub_halt_init): New prototype.
16115 (grub_halt_fini): Likewise.
16116 (grub_reboot_init): Likewise.
16117 (grub_reboot_fini): Likewise.
16118
16119 * util/grub-emu.c: Include signal.h.
16120 (main_env): New global variable.
16121 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16122 catch C-c.
16123 (grub_machine_fini): New function.
16124 (main): Call grub_halt_init and grub_reboot_init before
16125 grub_main, and grub_reboot_fini and grub_halt_fini after it.
16126 Call setjmp with MAIN_ENV to go back afterwards.
16127 Call grub_machine_fini right before return.
16128
16129 * include/grub/util/misc.h: Include setjmp.h.
16130 (main_env): New prototype.
16131
16132 * include/grub/kernel.h (grub_machine_fini): New prototype.
16133 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16134 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16135
16136 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16137 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16138 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 16139
e6b92c8a 16140 * util/i386/pc/misc.c: New file.
f19dbdb7 16141
e6b92c8a 16142 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16143 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16144 commands/i386/pc/reboot.c.
16145
c642636f 161462005-02-14 Guillem Jover <guillem@hadrons.org>
16147
16148 * include/grub/dl.h (grub_dl_check_header): New prototype.
16149 (grub_arch_dl_check_header): Change return type to grub_err_t,
16150 remove size parameter and export function. Update all callers.
16151 * kern/dl.c (grub_dl_check_header): New function.
16152 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16153 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16154 are inside the core.
16155 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16156 independent ELF header checks.
16157 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16158 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16159 `grub_dl_check_header' instead of explicit checks. Check for the
16160 ELF type.
16161 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16162 `grub_dl_check_header' instead of explicit checks. Remove arch
16163 specific ELF header checks.
16164
e6b92c8a 16165 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16166 argument SIZE.
16167
5eabe94b 161682005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16169
16170 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16171 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16172
1b14a681 161732005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16174
16175 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 16176 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 16177 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 16178 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 16179 * partmap/amiga.c (amiga_partition_map_iterate): Return
16180 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16181 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16182
aca108aa 161832005-02-01 Guillem Jover <guillem@hadrons.org>
16184
16185 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16186 help info.
16187
c9f9c556 161882005-01-31 Marco Gerards <metgerards@student.han.nl>
16189
16190 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16191 Removed prototype.
16192 (grub_rescue_cmd_linux): New prototype.
16193 (grub_rescue_cmd_initrd): Likewise.
16194 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16195 `bi_rec'.
16196 (grub_linux_release_mem): Release the memory for the initrd.
16197 (grub_load_linux): Renamed from this...
16198 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16199 Changed `entry' not to be static. Loop over memory regions to
16200 find another one when the default fails.
16201 (grub_rescue_cmd_initrd): New function.
16202 (grub_linux_init): Remove function.
16203 (grub_linux_fini): Likewise.
16204 (GRUB_MOD_INIT): Register `initrd'.
16205 (GRUB_MOD_FINI): Unregister `initrd'.
16206 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16207 Function removed.
16208 (grub_linux_normal_fini): Likewise.
16209 (GRUB_MOD_INIT): Register `initrd'.
16210 (GRUB_MOD_FINI): Unregister `initrd'.
16211
990cf3aa 162122005-01-31 Marco Gerards <metgerards@student.han.nl>
16213
16214 * commands/help.c: New file.
16215 * normal/arg.c (show_help): Renamed to...
16216 (grub_arg_show_help): ... this.
16217 * commands/i386/pc/halt.c: New file.
16218 * commands/i386/pc/reboot.c: Likewise.
16219 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16220 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16221 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16222 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16223 variables.
16224 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16225 `commands/help.c'.
16226 (pkgdata_MODULES): Add `help.mod'.
16227 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16228 * grub/i386/pc/init.h (grub_reboot): New prototype.
16229 (grub_halt): Likewise.
16230 * include/grub/normal.h (grub_arg_show_help): New prototype.
16231 (grub_help_init): Likewise.
16232 (grub_help_fini): Likewise.
16233 * util/grub-emu.c (main): Initialize and deinitialize the help
16234 command.
16235
16236 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16237
16238 * normal/command.c (grub_command_init): Fixed the description of
16239 the `set' and `unset' commands.
16240
162412005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 16242
16243 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16244 function.
16245 * commands/ieee1275/halt.c: New file.
16246 * commands/ieee1275/reboot.c: Likewise.
16247 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16248 `__attribute__ ((unused))'. Some GCS related fixed.
16249 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16250 (grub_suspend_fini): Likewise.
16251 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16252 and `halt.mod'.
16253 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16254 (halt_mod_CFLAGS): New variables.
16255 * include/grub/powerpc/ieee1275/ieee1275.h
16256 (grub_ieee1275_interpret): New prototype.
16257
1ab09cc7 162582005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16259
16260 * include/grub/misc.h (memmove): New prototype.
16261 (memcpy): Likewise.
16262
8b8cbdb2 162632005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16264
16265 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16266 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16267
e3741a27 162682005-01-22 Marco Gerards <metgerards@student.han.nl>
16269
16270 * kern/misc.c (grub_strndup): Function rewritten.
16271
776bd780 162722005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16273
16274 * normal/menu.c (TERM_WIDTH): Macro redefined.
16275 (TERM_TOP_BORDER_Y): Likewise.
16276 (draw_border): Replaced while-loop by a for-loop. Make the number
16277 of lines consistent with the number of lines displayed in
16278 print_entries. Added a margin below the rectangle.
16279 (print_entry): Make the entry fit in the rectangle.
16280 (print_entries): Display the scroll arrows next to the right
16281 border.
16282
78026bce 162832005-01-21 Marco Gerards <metgerards@student.han.nl>
16284
16285 * fs/minix.c (grub_minix_find_file): Reserve more space for
16286 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16287 `grub_strncpy' to copy `path' into it.
16288
67bbaf0f 162892005-01-21 Marco Gerards <metgerards@student.han.nl>
16290
16291 Add the loopback device, a device via which files can be accessed
16292 as devices.
f19dbdb7 16293
67bbaf0f 16294 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16295 (pkgdata_MODULES): Add loopback.mod.
16296 (loopback_mod_SOURCES): New variable.
16297 (loopback_mod_CFLAGS): Likewise.
16298 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16299 `disk/loopback.c'.
16300 (pkgdata_MODULES): Add loopback.mod.
16301 (loopback_mod_SOURCES): New variable.
16302 (loopback_mod_CFLAGS): Likewise.
16303 * disk/loopback.c: new file.
16304 * include/grub/normal.h (grub_loop_init): New prototype.
16305 (grub_loop_fini): New prototype.
16306 * util/grub-emu.c (main): Initialize and de-initialize loopback
16307 support.
16308 * include/grub/disk.h (grub_disk_dev_id): Add
16309 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16310
6f1c18bd 163112005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16312
16313 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16314 function.
16315 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16316 (suspend_mod_SOURCES): New variable.
16317 (suspend_mod_CFLAGS): Likewise.
16318 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16319 New prototype.
16320 * commands/ieee1275/suspend.c: New file.
16321
b38551da 163222005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16323
16324 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 16325 ((unused))' to `__attribute__ ((used))'.
b38551da 16326 (GRUB_MOD_FINI): Likewise.
16327 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16328 * genmk.rb (PModule): Assign space to common symbols when linking
16329 modules.
16330
777aff39 163312005-01-20 Marco Gerards <metgerards@student.han.nl>
16332
16333 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16334 `unsigned' arguments to `grub_size_t'.
16335 (grub_malloc): Likewise.
16336 (grub_realloc): Likewise.
16337 (grub_memalign): Likewise.
16338 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16339 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16340 * util/misc.c (grub_malloc): Likewise.
16341 (grub_realloc): Likewise.
16342 * kern/mm.c (get_header_from_pointer): Change the casts to
16343 `unsigned' into a cast to `grub_size_t'.
16344
16345 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16346 point to `currnode' when `currnode' is changed.
16347
16348 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16349 Schottelius <nico-linux@schottelius.org>.
16350
d0ff18e1 163512005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16352
16353 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16354 (note_path): Remove variable.
16355 (GRUB_IEEE1275_NOTE_NAME): New macro.
16356 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16357 (grub_ieee1275_note_hdr): New structure.
16358 (grub_ieee1275_note_desc): Likewise.
16359 (grub_ieee1275_note): Likewise.
16360 (load_note): Remove `dir' argument. All callers updated. Remove
16361 `note_img' and `path'. Do not load a file from `note_path'.
16362 Initialize a struct grub_ieee1275_note and write that to `out'.
16363 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16364
4ca7004c 163652005-01-05 Marco Gerards <metgerards@student.han.nl>
16366
16367 * util/misc.c (grub_util_read_image): Revert last change. It
16368 called `grub_util_read_at', which seeks from the beginning of the
16369 file.
16370
0b412211 163712005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16372
16373 * TODO: Add note about endianness in grub-mkimage.
16374 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16375 section.
16376 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16377 (grub_mkimage_SOURCES): New target.
16378 * include/grub/kernel.h (grub_start_addr): Remove variable.
16379 (grub_end_addr): Likewise.
16380 (grub_total_module_size): Likewise.
16381 (grub_kernel_image_size): Likewise.
16382 (GRUB_MODULE_MAGIC): New constant.
16383 (grub_module_info): New structure.
16384 (grub_arch_modules_addr): New prototype.
16385 (grub_get_end_addr): Remove prototype.
16386 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16387 * include/grub/powerpc/ieee1275/kernel.h: New file.
16388 * include/grub/util/misc.h (grub_util_get_fp_size): New
16389 prototype.
16390 (grub_util_read_at): Likewise.
16391 (grub_util_write_image_at): Likewise.
16392 * kern/main.c (grub_get_end_addr): Remove function.
16393 (grub_load_modules): Call grub_arch_modules_addr instead of using
16394 grub_end_addr. Look for a grub_module_info struct in memory. Use
16395 the grub_module_info fields instead of calling grub_get_end_addr
16396 as loop conditions. Move grub_add_unused_region code here.
16397 (grub_add_unused_region): Remove function.
16398 * kern/i386/pc/init.c: Include grub/cache.h.
16399 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16400 one call to add_mem_region.
16401 (grub_arch_modules_addr): New function.
16402 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16403 (grub_total_module_size): Likewise.
16404 Include grub/machine/kernel.h.
16405 (grub_arch_modules_addr): New function.
16406 * util/grub-emu.c (grub_end_addr): Remove variable.
16407 (grub_total_module_size): Likewise.
16408 (grub_arch_modules_addr): New function.
16409 * util/misc.c: Include unistd.h.
16410 (grub_util_get_fp_size): New function.
16411 (grub_util_read_at): Likewise.
16412 (grub_util_write_image_at): Likewise.
16413 (grub_util_read_image): Call grub_util_read_at.
16414 (grub_util_write_image): Call grub_util_write_image_at.
16415 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16416 additional memory in kernel_img for a struct grub_module_info.
16417 Fill in that grub_module_info.
16418 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16419
458786f8 164202005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16421
16422 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16423 New function.
16424 * include/grub/powerpc/ieee1275/ieee1275.h
16425 (grub_ieee1275_milliseconds): New prototype.
16426 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16427 Change to 1000.
16428 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16429 grub_ieee1275_milliseconds.
16430
ac507d1b 164312005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16432
16433 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16434 variable.
16435 (find_options): New function.
16436 (cmain): Call find_options.
16437 * include/grub/powerpc/ieee1275/ieee1275.h
16438 (grub_ieee1275_realmode): New extern variable.
16439 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16440 grub_map if grub_ieee1275_realmode is false.
16441
6b8fd1c4 164422004-12-29 Marco Gerards <metgerards@student.han.nl>
16443
16444 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16445 lines are inserted and make it work like readline. Reported by
16446 Vincent Pelletier <subdino2004@yahoo.fr>.
16447
8514a1e0 164482004-12-28 Marco Gerards <metgerards@student.han.nl>
16449
16450 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16451
16452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16453 `kern/powerpc/cache.S'.
16454
924b6140 164552004-12-27 Marco Gerards <metgerards@student.han.nl>
16456
16457 * genmk.rb: Handle the `Program' class in the main loop. Written
16458 by Johan Rydberg <jrydberg@gnu.org>.
16459 (Program): New class.
16460 (programs): New variable.
16461 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16462 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16463 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16464 (help_arch): Function removed.
16465 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16466 `powerpc/libgcc.h' and `loader.h'.
16467 (pkgdata_PROGRAMS): New variable.
16468 (sbin_UTILITIES): Variable removed.
16469 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16470 (grubof_SOURCES): Variable re-defined so it only includes the
16471 core functionality.
16472 (grubof_CFLAGS): Remove `-DGRUBOF'.
16473 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16474 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16475 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16476 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16477 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16478 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16479 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16480 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16481 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16482 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16483 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16484 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16485 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16486 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16487 (pc_mod_CFLAGS): New variables.
16488 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16489 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16490 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16491 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16492 Moved from here...
16493 * include/grub/i386/pc/init.h (grub_os_area_addr)
16494 (rub_os_area_size): ... to here.
16495 * include/grub/powerpc/ieee1275/ieee1275.h
16496 (grub_ieee1275_entry_fn): Export symbol.
16497 * include/grub/powerpc/ieee1275/init.h: New file.
16498 * include/grub/powerpc/libgcc.h: Likewise.
16499 * include/grub/cache.h: Likewise.
16500 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16501 <hollis@penguinppc.org>.
16502 * kern/dl.c: Include <grub/cache.h>.
16503 (grub_dl_flush_cache): New function.
16504 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16505 for this module.
16506 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16507 (grub_console_init): Removed prototypes.
16508 (grub_machine_init): Don't initialize the modules anymore.
16509 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16510 static.
16511 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16512 Macro undef removed.
16513 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16514 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16515 relocation `R_PPC_REL32'. Return an error when the relocation is
16516 unknown.
16517 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16518 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16519 * util/misc.c (grub_arch_sync_caches): Likewise.
16520
e4b47e0c 165212004-12-19 Marco Gerards <metgerards@student.han.nl>
16522
16523 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16524 `symlist.c', add `grubof_symlist.c'.
16525 (symlist.c): Variable removed.
16526 (grubof_HEADERS): Variable added.
16527 (grubof_symlist.c): New target.
16528 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16529 `kernel_img_HEADERS'.
16530 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16531 * kern/powerpc/dl.c: New file.
16532 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16533 Function removed.
16534 (grub_arch_dl_relocate_symbols): Likewise.
16535 (grub_register_exported_symbols): Likewise.
16536
4ceb3636 165372004-12-13 Marco Gerards <metgerards@student.han.nl>
16538
16539 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16540 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16541 to fail instead. Reported by Vincent Pelletier
16542 <subdino2004@yahoo.fr>.
16543
16544 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16545 it is not allocated. Reported by Vincent Pelletier
16546 <subdino2004@yahoo.fr>.
16547
16548 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16549 output so the output looks better.
f19dbdb7 16550
3f1578fe 165512004-12-04 Marco Gerards <metgerards@student.han.nl>
16552
16553 Modulize the partition map support and add support for the amiga
16554 partition map.
f19dbdb7 16555
3f1578fe 16556 * commands/ls.c: Include <grub/partition.h> instead of
16557 <grub/machine/partition.h>.
16558 * kern/disk.c: Likewise.
16559 * kern/rescue.c: Likewise.
16560 * loader/i386/pc/chainloader.c: Likewise.
16561 * normal/cmdline.c: Likewise.
16562 * kern/powerpc/ieee1275/init.c: Likewise.
16563 (grub_machine_init): Call `grub_pc_partition_map_init',
16564 `grub_amiga_partition_map_init' and
16565 `grub_apple_partition_map_init'.
16566 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16567 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16568 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16569 `partition.h' and `pc_partition.h'.
16570 (grub_setup_SOURCES): Remove
16571 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16572 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16573 (grub_emu_SOURCES): Likewise.
16574 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16575 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16576 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16577 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16578 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16579 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16580 (grubof_SOURCES): Likewise.
16581 * disk/i386/pc/partition.c: File removed.
16582 * disk/powerpc/ieee1275/partition.c: Likewise.
16583 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16584 * include/grub/i386/pc/partition.h: Likewise.
16585 * kern/partition.c: New file.
16586 * partmap/amiga.c: Likewise.
16587 * partmap/apple.c: Likewise.
16588 * partmap/pc.c: Likewise.
16589 * include/grub/partition.h: Likewise..
16590 * include/grub/pc_partition.h: Likewise.
16591 * util/grub-emu.c: Include <grub/partition.h> instead of
16592 <grub/machine/partition.h>.
16593 (main): Call `grub_pc_partition_map_init',
16594 `grub_amiga_partition_map_init' and
16595 `grub_apple_partition_map_init' and deinitialize afterwards.
16596 * util/i386/pc/biosdisk.c: Include `#include
16597 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16598 `<grub/machine/partition.h>'.
16599 * util/i386/pc/grub-setup.c: Likewise.
16600 * util/i386/pc/biosdisk.c: Likewise.
16601 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16602 partition information in case of a PC partition.
16603 * util/i386/pc/grub-setup.c: Include `#include
16604 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16605 `<grub/machine/partition.h>'.
16606 (setup): Only access the PC specific partition information in case
16607 of a PC partition.
16608
0ef4ced9 166092004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 16610
0ef4ced9 16611 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16612 (grub_longjmp): Likewise.
16613 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16614 20.
16615 * normal/powerpc/setjmp.S: New file.
16616 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16617 `normal/powerpc/setjmp.S'.
16618 (grubof_CFLAGS): Add `-DGRUBOF'.
16619 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16620 [GRUB_UTIL && !GRUBOF].
f19dbdb7 16621
19950e29 166222004-11-16 Marco Gerards <metgerards@student.han.nl>
16623
16624 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16625 property named `name'. Correctly handle the error returned by
16626 `grub_ieee1275_finddevice' if a device can not be opened.
16627
a2fea427 166282004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16629
16630 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16631 `actual' for negativity.
16632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16633 kern/fshelp.c.
16634
41ea0ea3 166352004-11-01 Marco Gerards <metgerards@student.han.nl>
16636
16637 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16638 (PAGE_OFFSET): New macro.
16639 (CRTC_ADDR_PORT): Likewise.
16640 (CRTC_DATA_PORT): Likewise.
16641 (START_ADDR_HIGH_REGISTER): Likewise.
16642 (START_ADDR_LOW_REGISTER): Likewise.
16643 (GRAPHICS_ADDR_PORT): Likewise.
16644 (GRAPHICS_DATA_PORT): Likewise.
16645 (READ_MAP_REGISTER): Likewise.
16646 (INPUT_STATUS1_REGISTER): Likewise.
16647 (INPUT_STATUS1_VERTR_BIT): Likewise.
16648 (page): New variable.
16649 (wait_vretrace): New function.
16650 (set_read_map): Likewise.
16651 (set_start_address): Likewise.
16652 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16653 the right page.
16654 (check_vga_mem): Take the page into account.
16655 (write_char): Likewise.
16656 (write_cursor): Likewise.
16657 (scroll_up): Likewise. Copy the page to the page that is not
16658 shown and switch between both pages.
16659 (grub_vga_putchar): Fix off by one error.
16660 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16661 account.
16662
ad0bd20b 166632004-11-01 Marco Gerards <metgerards@student.han.nl>
16664
16665 Add support for iso9660 (including rockridge).
f19dbdb7 16666
ad0bd20b 16667 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16668 (iso9660_mod_SOURCES): New variable.
16669 (iso9660_mod_CFLAGS): Likewise.
16670 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16671 * include/grub/fs.h (grub_iso9660_init): New prototype.
16672 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16673 * fs/iso9660.c: New file.
16674
16675 * include/grub/misc.h (grub_strncat): New prototype.
16676 * kern/misc.c (grub_strncat): New function.
f19dbdb7 16677
ad0bd20b 16678 * fs/hfs.c (grub_hfs_mount): Translate the error
16679 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16680 * fs/jfs.c (grub_jfs_mount): Likewise.
16681 * fs/ufs.c (grub_ufs_mount): Likewise.
16682
a5477a59 166832004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16684
16685 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16686 which initialized BAT registers.
16687 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16688 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16689 Move from here...
16690 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16691 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16692 ... to here.
16693 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16694 (grub_mapclaim): Likewise.
16695 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16696 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16697 hand.
16698
9304c1f8 166992004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16700
16701 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16702 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16703 -ffreestanding and -msoft-float.
16704
86f4ae25 167052004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16706
16707 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16708 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16709 set in grub_ieee1275_flags.
16710
38912228 167112004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16712
16713 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16714 prototype.
16715 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16716 grub_console_init first.
16717 Change the memory range used for grub_ieee1275_claim and
16718 grub_mm_init_region.
16719 Print an error message if the claim fails.
16720 Include <grub/misc.h>.
16721
d1923dc8 167222004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16723
16724 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16725 Call grub_children_iterate for device nodes of type `scsi',
16726 `ide', or `ata'.
16727 (grub_ofdisk_open): Remove manual device alias resolution.
16728 Fix memory leak when device cannot be opened.
f19dbdb7 16729 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 16730 (grub_children_iterate): New prototype.
16731 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16732 New function.
16733 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16734 Return -1 if args.size was -1.
16735
4512e4f3 167362004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16737
16738 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16739 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16740 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16741 Open Firmware's memory for it; claim memory from _start to _end.
16742 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16743 (_end): New extern.
16744 (_start): Zero BSS from __bss_start to _end.
16745 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16746 New extern.
16747 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16748
4d61feb0 167492004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16750
ad0bd20b 16751 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16752 -1 if args.base was -1.
4d61feb0 16753
026fa2f9 167542004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16755
16756 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16757 escape sequence instead of a literal ^L. Also call
16758 grub_ofconsole_gotoxy.
16759
9f2220ef 167602004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16761
16762 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16763 void * arguments to grub_addr_t. All callers updated. Also make
16764 the `result' argument optional.
16765 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16766 All callers updated.
16767
8a572cd7 167682004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16769
16770 * commands/ls.c (grub_ls_list_files): Use the string following the
16771 initial ')', if present, as the filesystem path.
16772 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16773
16774 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16775
18aa81f2 167762004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16777
16778 Make the source code of the menu interface more readable.
f19dbdb7 16779
18aa81f2 16780 * normal/menu.c: Include grub/mm.h.
16781 (TERM_WIDTH): New macro.
16782 (TERM_HEIGHT): Likewise.
16783 (TERM_INFO_HEIGHT): Likewise.
16784 (TERM_MARGIN): Likewise.
16785 (TERM_SCROLL_WIDTH): Likewise.
16786 (TERM_TOP_BORDER_Y): Likewise.
16787 (TERM_LEFT_BORDER_X): Likewise.
16788 (TERM_BORDER_WIDTH): Likewise.
16789 (TERM_MESSAGE_HEIGHT): Likewise.
16790 (TERM_BORDER_HEIGHT): Likewise.
16791 (TERM_NUM_ENTRIES): Likewise.
16792 (TERM_FIRST_ENTRY_Y): Likewise.
16793 (TERM_ENTRY_WIDTH): Likewise.
16794 (TERM_CURSOR_X): Likewise.
16795 (draw_border): Use macros instead of magic numbers.
16796 (print_entry): Likewise.
16797 (print_entries): Likewise.
16798 (run_menu): Likewise. Also, handle the key 'e'.
16799 (run_menu_entry): Ignore empty command lines.
16800 (print_message): Added a new argument EDIT. If EDIT is true,
16801 print a different message.
16802 (init_page): Likewise.
16803 (edit_menu_entry): New function. Not implemented yet.
16804
b47efe30 168052004-09-17 Marco Gerards <metgerards@student.han.nl>
16806
16807 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16808 can be loaded from normal mode.
f19dbdb7 16809
b47efe30 16810 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16811 `multiboot.mod'.
16812 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16813 (multiboot_mod_CFLAGS): New variables.
16814 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16815 * loader/i386/pc/multiboot_normal.c: Likewise.
16816
b47efe30 16817 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16818 attribute `unused'.
f19dbdb7 16819
b47efe30 16820 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16821 `fdiro' to read the mode information from instead of `diro'.
16822
16823 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16824 looking up a symlink.
16825
16826 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16827 macro.
16828 * normal/command.c (grub_command_execute): Don't parse the
16829 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16830 flags of the command.
16831
16832 * normal/menu.c (grub_menu_run): Fix typo.
16833
da75ac71 168342004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16835
16836 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16837
16838 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16839 `y + 1' instead of `y - 1'.
16840
16841 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16842
062b24c2 168432004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16844
16845 From Hollis Blanchard <hollis@penguinppc.org>:
16846 * kern/misc.c (memmove): New alias for grub_memmove.
16847 (memcmp): New alias for grub_memcmp.
16848 (memset): New alias for grub_memset.
f19dbdb7 16849 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16850 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16851 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16852 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16853
8ddad845 168542004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16855
16856 Added normal mode command `chainloader' as module chain.mod, which
16857 depends on normal.mod and _chain.mod.
f19dbdb7 16858
8ddad845 16859 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16860 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16861 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16862 Deleted prototype.
16863 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16864 but arguments parsing moved to ...
16865 (grub_chainloader_cmd): ... here. New function.
16866 * include/grub/i386/pc/chainloader.h: New file.
16867 * loader/i386/pc/chainloader_normal.c: Likewise.
16868
2c1f4ce3 168692004-09-11 Marco Gerards <metgerards@student.han.nl>
16870
16871 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16872 (grub_mkimage_LDFLAGS): Likewise.
16873 (grub_emu_SOURCES): Likewise.
16874 (kernel_img_HEADERS): Added fshelp.h.
16875 * fs/ext2.c: Include <grub/fshelp.h>.
16876 (FILETYPE_REG): New macro.
16877 (FILETYPE_INO_REG): Likewise.
16878 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16879 Changed all users.
16880 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16881 all users.
16882 (grub_fshelp_node): New struct.
16883 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16884 to a pointer.
16885 (grub_ext2_get_file_block): Removed function.
16886 (grub_ext2_read_block): New function.
16887 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16888 This function was written.
16889 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16890 (grub_ext2_find_file): Removed function.
16891 (grub_ext2_read_symlink): New function.
16892 (grub_ext2_iterate_dir): Likewise.
16893 (grub_ext2_open): Rewritten.
16894 (grub_ext2_dir): Rewritten.
16895 * include/grub/fshelp.h: New file.
16896 * fs/fshelp.c: Likewise.
16897
3c52136a 168982004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16899
16900 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16901 (print_message): Add a missing newline.
16902 (run_menu): Added timeout support.
16903 (run_menu_entry): New local function.
16904 (grub_menu_run): Added support for booting.
16905
16906 * kern/loader.c (grub_loader_is_loaded): New function.
16907
16908 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16909 (grub_get_rtc): Exported.
16910
16911 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16912 (grub_get_rtc): Exported.
16913
16914 * include/grub/normal.h (struct grub_command_list): Remove
16915 constant from the member `command'.
16916
16917 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16918
16919 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16920
16921 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16922
aa033560 169232004-08-28 Marco Gerards <metgerards@student.han.nl>
16924
16925 Add support for the JFS filesystem.
16926
16927 * fs/jfs.c: New file.
16928 * include/grub/fs.h (grub_jfs_init): New prototype.
16929 (grub_jfs_fini): New prototype.
16930 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16931 (grub_emu_SOURCES): Likewise.
16932 (pkgdata_MODULES): Add jfs.mod.
16933 (jfs_mod_SOURCES): New variable.
16934 (jfs_mod_CFLAGS): Likewise.
16935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16936 (grubof_SOURCES): Likewise.
16937 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16938
16939 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16940 endian to the host endian.
16941 (grub_fat_utf16_to_utf8): Move function from there...
16942 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16943 the endianness of the source string anymore.
aa033560 16944 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16945
94bc45af 169462004-08-24 Marco Gerards <metgerards@student.han.nl>
16947
16948 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16949 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16950 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16951 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16952
94bc45af 16953 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16954 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16955 for `node_found' and `it_dir'.
16956 (grub_hfs_dir): Add prototype for `dir_hook'.
16957
16958 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16959 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16960 and `indir32' to silence a gcc warning.
16961
16962 * include/grub/fs.h (grub_hfs_init): New prototype.
16963 (grub_hfs_fini): Likewise.
f19dbdb7 16964
16965
97543f08 169662004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16967
16968 Each disk device has its own id now. This is useful to make use
16969 of multiple disk devices.
f19dbdb7 16970
97543f08 16971 * include/grub/disk.h (grub_disk_dev_id): New enum.
16972 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16973 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16974
16975 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16976 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16977
16978 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16979 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16980
16981 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16982 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16983
16984 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16985 "id" which is used by the cache manager.
16986
16987 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16988 of just "GRUB".
16989
64372eb4 169902004-08-18 Marco Gerards <metgerards@student.han.nl>
16991
16992 * fs/hfs.c: New file.
16993 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16994 (grub_emu_SOURCES): Likewise.
16995 (pkgdata_MODULES): Add hfs.mod.
16996 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16997 (grubof_SOURCES): Likewise.
16998 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16999
17000 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17001 * kern/misc.c (grub_strncasecmp): Add function.
17002
cc61b58f 170032004-08-14 Marco Gerards <metgerards@student.han.nl>
17004
17005 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17006 with parentheses.
17007
17008 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17009 (grub_ext2_dir): In case the directory entry type is unknown, read
17010 it from the inode.
17011
0ef123f6 170122004-08-02 Peter Bruin <pjbruin@dds.nl>
17013
17014 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17015 grub_load_linux instead of grub_rescue_cmd_linux as second
17016 argument of grub_rescue_register_command.
17017
17018 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17019
a447c5df 170202004-07-27 Marco Gerards <metgerards@student.han.nl>
17021
17022 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17023 function.
17024 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17025 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17026 `loader/powerpc/ieee1275/linux.c',
17027 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17028 * include/grub/powerpc/ieee1275/ieee1275.h
17029 (grub_ieee1275_release): New prototype.
17030 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17031 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17032 normal, boot, linux and linux_normal.
17033 * loader/powerpc/ieee1275/linux.c: New file.
17034 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17035
5a9e3546 170362004-07-12 Marco Gerards <metgerards@student.han.nl>
17037
17038 * normal/arg.c (grub_arg_parse): Correct error handling after
17039 reallocating the argumentlist (check if `argl' is not null instead
17040 of checking if `args' is not null).
17041 * kern/mm.c (grub_realloc): Return the same pointer when using the
17042 same region, instead of returning the header address.
17043
e15199cb 170442004-07-11 Marco Gerards <metgerards@student.han.nl>
17045
17046 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17047 one block instead of two when looking for the initial partition.
17048 (grub_partition_probe): Initialize the local variable `p' with 0.
17049 Use base 10 for the grub_strtoul call.
17050 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17051 need for one local variable.
17052 (grub_strtoul): Don't add the new value to `num', instead of that
17053 just assign it.
17054
020616c2 170552004-07-11 Marco Gerards <metgerards@student.han.nl>
17056
17057 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17058 (pxeboot_img_SOURCES): New variable.
17059 (pxeboot_img_ASFLAGS): Likewise.
17060 (pxeboot_img_LDFLAGS): Likewise.
17061 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17062 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17063 <lode_leroy@hotmail.com>.
17064
6c51eb64 170652004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17066
17067 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17068 there was no input.
17069
cfb12aff 170702004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17071
17072 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17073 the history buffer logic.
17074
6eabba74 170752004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17076
17077 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17078 (FILETYPE_INO_SYMLINK): New macros.
17079 (grub_ext2_find_file): Check if the node is a directory using the
17080 inode stat information instead of using the filetype in the
17081 dirent. Exclude the first character of an absolute symlink.
17082 (grub_ext2_dir): Mask out the filetype part of the mode member of
17083 the inode.
17084
66e19ef8 170852004-05-24 Marco Gerards <metgerards@student.han.nl>
17086
17087 Add support for UFS version 1 and 2. Add support for the minix
17088 filesystem version 1 and 2, both the variants with 14 and 30 long
17089 filenames.
f19dbdb7 17090
66e19ef8 17091 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17092 fs/minix.c.
17093 (grub_emu_SOURCES): Likewise.
17094 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17095 (ufs_mod_SOURCES): New variable.
17096 (ufs_mod_CFLAGS): Likewise.
17097 (minix_mod_SOURCES): Likewise.
17098 (minix_mod_CFLAGS): Likewise.
17099 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17100 fs/minix.c.
17101 (grubof_SOURCES): Likewise.
17102 * fs/ufs.c: New file.
17103 * fs/minix.c: New file.
17104 * include/grub/fs.h (grub_ufs_init): New prototype.
17105 (grub_ufs_fini): Likewise.
17106 (grub_minix_init): Likewise.
17107 (grub_minix_fini): Likewise.
17108 * util/grub-emu.c (main): Initialize and deinitialize UFS and
17109 minix fs.
17110
cc2e748a 171112004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
17112
17113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17114 commands/ls.c, commands/terminal.c, commands/boot.c,
17115 commands/cmp.c and commands/cat.c.
17116 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17117
17118 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17119 "env.h"
17120
4b13b216 171212004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17122
17123 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17124 and grub_, respectively. Because the conversion is trivial and
17125 mechanical, I omit the details here. Please refer to the CVS
17126 if you need more information.
17127
6a142551 171282004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
17129
17130 * include/pupa: Renamed to ...
17131 * include/grub: ... this.
17132 * util/i386/pc/pupa-mkimage.c: Renamed to ...
17133 * util/i386/pc/grub-mkimage.c: ... this.
17134 * util/i386/pc/pupa-setup.c: Renamed to ...
17135 * util/i386/pc/grub-setup.c: ... this.
17136 * util/pupa-emu.c: Renamed to ...
17137 * util/grub-emu.c: ... this.
17138
e56cdf21 171392004-03-29 Marco Gerards <metgerards@student.han.nl>
17140
17141 Add support for the newworld apple macintosh (PPC). This has been
17142 tested on the powerbook 2000 only. It only adds support for
17143 generic ieee1275 functions, console and disk support. This should
17144 be easy to port to other architectures with support for Open
17145 Firmware.
f19dbdb7 17146
e56cdf21 17147 * configure.ac: Accept the powerpc as host_cpu. In the case of
17148 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17149 specific tests are only executed while building for the i386.
17150 Inverse test for crosscompile.
17151 * genmk.rb (Utility): Allow assembler files.
17152 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17153 * conf/powerpc-ieee1275.rmk: New file.
17154 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17155 * disk/powerpc/ieee1275/partition.c: Likewise.
17156 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17157 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17158 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17159 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17160 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17161 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17162 * include/pupa/powerpc/ieee1275/loader.h
17163 * include/pupa/powerpc/setjmp.h: Likewise.
17164 * include/pupa/powerpc/types.h: Likewise.
17165 * kern/powerpc/ieee1275/init.c: Likewise.
17166 * kern/powerpc/ieee1275/openfw.c: Likewise.
17167 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17168
17169 These files were written by Johan Rydberg
17170 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 17171
e56cdf21 17172 * boot/powerpc/ieee1275/cmain.c: New file.
17173 * boot/powerpc/ieee1275/crt0.S: Likewise.
17174 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17175 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17176
8c8cc205 171772004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17178
17179 * Makefile.in: Update copyright.
17180 * genmodsrc.sh: Likewise.
17181 * gensymlist.sh: Likewise.
17182 * term/i386/pc/vga.c: Indent correctly.
17183
17184 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17185 bugreporting address.
17186 * util/i386/pc/pupa-setup.c (usage): Likewise,
17187 (main): Call pupa_ext2_init and pupa_ext2_fini.
17188
f19dbdb7 17189 * fs/fat.c (log2): Renamed to ...
8c8cc205 17190 (fat_log2): ... this.
17191 All callers changed.
17192 * kern/misc.c (memcpy): Alias to pupa_memmove.
17193 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17194 lvalue cast.
17195 * util/console.c (pupa_ncurses_fini): Return 0.
17196
17197 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17198 Move fail label here.
17199 [__GNU__]: Don't warn when using stat.
17200 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17201 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17202 long int. Use strtol instead of strtoul.
f19dbdb7 17203
db1771cf 172042004-03-14 Marco Gerards <metgerards@student.han.nl>
17205
17206 * commands/boot.c: New file.
17207 * commands/cat.c: Likewise.
17208 * commands/cmp.c: Likewise.
17209 * commands/ls.c: Likewise.
17210 * commands/terminal.c: Likewise.
17211 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17212 (pupa_register_command): Changed interface to match the new
17213 argument parser.
17214 (pupa_command_execute): Changed (almost rewritten) so it uses
17215 pupa_split_command. Added support for setting variables using the
17216 syntax `foo=bar'.
17217 (rescue_command): Changed to work with the new argument parser.
17218 (terminal_command): Moved from here to commands/terminal.c.
17219 (set_command): New function.
17220 (unset_command): New function.
17221 (insmod_command): New function.
17222 (rmmod_command): New function.
17223 (lsmod_command): New function.
17224 (pupa_command_init): Don't initialize the command terminal
17225 anymore. Initialize the commands set, unset, insmod, rmmod and
17226 lsmod.
17227 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17228 (kernel_img_HEADERS): Add arg.h and env.h.
17229 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17230 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17231 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17232 normal/arg.c.
17233 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17234 terminal.mod.
17235 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17236 (boot_mod_SOURCES): New variable.
17237 (terminal_mod_SOURCES): Likewise.
17238 (ls_mod_SOURCES): Likewise.
17239 (cmp_mod_SOURCES): Likewise.
17240 (cat_mod_SOURCES): Likewise.
17241
17242 * normal/arg.c: New file.
17243 * kern/env.c: Likewise.
17244 * include/pupa/arg.h: Likewise.
17245 * include/pupa/env.h: Likewise.
17246 * font/manager.c (font_command): Changed to match argument parsing
17247 interface changes.
17248 (PUPA_MOD_INIT): Likewise.
17249 * hello/hello.c (pupa_cmd_hello): Likewise.
17250 (PUPA_MOD_INIT): Likewise.
17251 * include/pupa/disk.h: Include <pupa/device.h>.
17252 (pupa_print_partinfo): New prototype.
17253 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17254 (pupa_dl_get_prefix): Likewise.
17255 * include/pupa/misc.h: Include <pupa/err.h>.
17256 (pupa_isgraph): New prototype.
17257 (pupa_isdigit): Likewise.
17258 (pupa_split_cmdline): Likewise.
17259 * include/pupa/normal.h: Include <pupa/arg.h>.
17260 (pupa_command): Changed the prototype of the member `func' to
17261 match the argument parsing interface. Added member `options'.
17262 (pupa_register_command): Updated to match function.
17263 (pupa_arg_parse): New prototype.
17264 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17265 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17266 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17267 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17268 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17269 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17270 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17271 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17272 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17273 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17274 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17275 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17276 * kern/disk.c: Include <pupa/file.h>.
17277 (pupa_print_partinfo): New function.
17278 * kern/dl.c: Include <pupa/env.h>.
17279 (pupa_dl_dir): Variable removed.
17280 (pupa_dl_load): Use the environment variable `prefix' instead of
17281 the variable pupa_dl_dir.
17282 (pupa_dl_set_prefix): Function removed.
17283 (pupa_dl_get_prefix): Likewise.
17284 * kern/i386/pc/init.c: Include <pupa/env.h>.
17285 (pupa_machine_init): Use the environment variable `prefix' instead of
17286 using pupa_dl_set_prefix to set the prefix.
17287 * kern/main.c: Include <pupa/env.h>.
17288 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17289 using pupa_dl_get_prefix to get the prefix.
17290 * kern/misc.c: Include <pupa/env.h>.
17291 (pupa_isdigit): New function.
17292 (pupa_isgraph): Likewise.
17293 (pupa_ftoa): Likewise.
17294 (pupa_vsprintf): Added support for printing values of the type
17295 `double'. Make it possible to format variable output when using
17296 formatting like `%1.2%f'.
17297 (pupa_split_cmdline): New function.
17298 * kern/rescue.c: Include <pupa/env.h>.
17299 (next_word): Removed function.
17300 (pupa_rescue_cmd_prefix): Likewise.
17301 (pupa_rescue_cmd_set): New function.
17302 (pupa_rescue_cmd_unset): New function.
17303 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17304 split the command line instead of splitting it here. Added
17305 support for setting variables using the syntax `foo=bar'. Don't
17306 initialize the prefix command anymore. Initialized the set and
17307 unset commands.
17308 * normal/cmdline.c: Include <pupa/env.h>.
17309 (pupa_tab_complete): Added prototypes for print_simple_completion,
17310 print_partition_completion, add_completion, iterate_commands,
17311 iterate_dev, iterate_part and iterate_dir. Moved code to print
17312 partition information from here to kern/disk.c.
fe6b695a 17313 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 17314 * normal/main.c: Include <pupa/env.h>.
17315 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17316 instead of using pupa_dl_get_prefix to get the prefix.
17317 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17318 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17319 warning.
17320 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17321 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17322 ((unused))' to silence a gcc warning.
17323 (pupa_vga_setcolor): Likewise.
17324 (debug_command): Changed to match argument parsing
17325 interface changes.
17326 * util/pupa-emu.c: Include <pupa/env.h>.
17327 (options): Added 0's for unused fields to silence a gcc warning.
17328 (argp): Likewise.
17329 (main): Use the environment variable `prefix' instead of using
17330 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17331 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17332 and terminal.
17333
17334 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17335 * util/misc.c: Include <malloc.h>.
17336 (pupa_malloc): Rewritten so errors are correctly reported.
17337 (pupa_realloc): Likewise.
17338 (pupa_memalign): Likewise.
17339 (pupa_mm_init_region): Declare unused variables with
17340 `__attribute__ ((unused))' to silence a gcc warning.
17341 * normal/i386/setjmp.S: Remove tab at the end of the file to
17342 silence a gcc warning.
17343 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17344 variables with `__attribute__ ((unused))' to silence a gcc
17345 warning.
17346 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17347 local variable i unsigned to silence a gcc warning.
17348
17349 * kern/term.c: Include <pupa/misc.h>.
17350 (pupa_more_lines): New variable.
17351 (pupa_more): Likewise.
17352 (pupa_putcode): When the pager is active pause at the end of every
17353 screen.
17354 (pupa_set_more): New function.
17355 * include/pupa/term.h (pupa_set_more): New prototype.
17356
17357
3b1139cb 173582004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17359
17360 Now this project is GRUB 2 rather than PUPA. The location of
17361 the CVS repository was moved to GRUB's.
f19dbdb7 17362
3b1139cb 17363 * configure.ac: Use bug-grub as the reporting address.
17364 Use GRUB instead of PUPA.
17365 Change the version number to 1.90.
17366
8367695c 173672004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17368
17369 * genkernsyms.sh: Updated copyright information.
17370 * genmk.rb: Likewise.
17371 * genmodsrc.sh: Likewise.
17372 * gensymlist.sh: Likewise.
17373 * boot/i386/pc/boot.S: Likewise.
17374 * boot/i386/pc/diskboot.S: Likewise.
17375 * disk/i386/pc/biosdisk.c: Likewise.
17376 * disk/i386/pc/partition.c: Likewise.
17377 * font/manager.c: Likewise.
17378 * fs/ext2.c: Likewise.
17379 * fs/fat.c: Likewise.
17380 * include/pupa/boot.h: Likewise.
17381 * include/pupa/device.h: Likewise.
17382 * include/pupa/disk.h: Likewise.
17383 * include/pupa/dl.h: Likewise.
17384 * include/pupa/elf.h: Likewise.
17385 * include/pupa/err.h: Likewise.
17386 * include/pupa/file.h: Likewise.
17387 * include/pupa/font.h: Likewise.
17388 * include/pupa/fs.h: Likewise.
17389 * include/pupa/kernel.h: Likewise.
17390 * include/pupa/loader.h: Likewise.
17391 * include/pupa/misc.h: Likewise.
17392 * include/pupa/mm.h: Likewise.
17393 * include/pupa/net.h: Likewise.
17394 * include/pupa/normal.h: Likewise.
17395 * include/pupa/rescue.h: Likewise.
17396 * include/pupa/setjmp.h: Likewise.
17397 * include/pupa/symbol.h: Likewise.
17398 * include/pupa/term.h: Likewise.
17399 * include/pupa/types.h: Likewise.
17400 * include/pupa/i386/setjmp.h: Likewise.
17401 * include/pupa/i386/types.h: Likewise.
17402 * include/pupa/i386/pc/biosdisk.h: Likewise.
17403 * include/pupa/i386/pc/boot.h: Likewise.
17404 * include/pupa/i386/pc/console.h: Likewise.
17405 * include/pupa/i386/pc/init.h: Likewise.
17406 * include/pupa/i386/pc/kernel.h: Likewise.
17407 * include/pupa/i386/pc/linux.h: Likewise.
17408 * include/pupa/i386/pc/loader.h: Likewise.
17409 * include/pupa/i386/pc/memory.h: Likewise.
17410 * include/pupa/i386/pc/multiboot.h: Likewise.
17411 * include/pupa/i386/pc/partition.h: Likewise.
17412 * include/pupa/i386/pc/time.h: Likewise.
17413 * include/pupa/i386/pc/vga.h: Likewise.
17414 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17415 * include/pupa/util/getroot.h: Likewise.
17416 * include/pupa/util/misc.h: Likewise.
17417 * include/pupa/util/resolve.h: Likewise.
17418 * kern/device.c: Likewise.
17419 * kern/disk.c: Likewise.
17420 * kern/dl.c: Likewise.
17421 * kern/err.c: Likewise.
17422 * kern/file.c: Likewise.
17423 * kern/fs.c: Likewise.
17424 * kern/loader.c: Likewise.
17425 * kern/main.c: Likewise.
17426 * kern/misc.c: Likewise.
17427 * kern/mm.c: Likewise.
17428 * kern/rescue.c: Likewise.
17429 * kern/term.c: Likewise.
17430 * kern/i386/dl.c: Likewise.
17431 * kern/i386/pc/init.c: Likewise.
17432 * kern/i386/pc/lzo1x.S: Likewise.
17433 * kern/i386/pc/startup.S: Likewise.
17434 * loader/i386/pc/chainloader.c: Likewise.
17435 * loader/i386/pc/linux.c: Likewise.
17436 * loader/i386/pc/multiboot.c: Likewise.
17437 * normal/cmdline.c: Likewise.
17438 * normal/command.c: Likewise.
17439 * normal/main.c: Likewise.
17440 * normal/menu.c: Likewise.
17441 * normal/i386/setjmp.S: Likewise.
17442 * term/i386/pc/console.c: Likewise.
17443 * term/i386/pc/vga.c: Likewise.
17444 * util/console.c: Likewise.
17445 * util/genmoddep.c: Likewise.
17446 * util/misc.c: Likewise.
17447 * util/pupa-emu.c: Likewise.
17448 * util/resolve.c: Likewise.
17449 * util/unifont2pff.rb: Likewise.
17450 * util/i386/pc/biosdisk.c: Likewise.
17451 * util/i386/pc/getroot.c: Likewise.
17452 * util/i386/pc/pupa-mkimage.c: Likewise.
17453 * util/i386/pc/pupa-setup.c: Likewise.
17454
e6eced71 174552004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17456
17457 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17458 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17459 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17460 reading and reset it after reading.
17461 (pupa_ext2_close): Return PUPA_ERR_NONE.
17462
17463 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17464 Correct value.
17465 (struct linux_kernel_header): Add kernel_version and
17466 initrd_addr_max.
17467 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17468 pupa_file_read succeeds.
17469 (pupa_rescue_cmd_initrd): Implement.
17470
5aded270 174712003-12-03 Marco Gerards <metgerards@student.han.nl>
17472
17473 * fs/ext2.c (pupa_ext2_label): New function.
17474 (pupa_ext2_fs): Added label.
17475 * fs/fat.c (pupa_fat_label): New function.
17476 (pupa_fat_fs): Added label.
17477 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17478
17479 * kern/misc.c (pupa_strndup): New function.
17480 * include/pupa/misc.h (pupa_strndup): New prototype.
17481
17482 * include/pupa/normal.h: Include <pupa/err.h>.
17483 (pupa_set_history): New prototype.
17484 (pupa_iterate_commands): New prototype.
17485 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17486 <pupa/disk.h>, <pupa/file.h>.
17487 (hist_size): New variable.
17488 (hist_lines): Likewise.
17489 (hist_end): Likewise.
17490 (hist_used): Likewise.
17491 (pupa_set_history): New function.
17492 (pupa_history_get): Likewise.
17493 (pupa_history_add): Likewise.
17494 (pupa_history_replace): Likewise.
17495 (pupa_tab_complete): Likewise.
17496 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17497 completion shows partitionnames while completing partitions, this
17498 feature was suggested by Jeff Bailey.
17499 * normal/command.c (pupa_iterate_commands): New function.
17500 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17501 (pupa_normal_init): Initialize history buffer.
17502 (PUPA_MOD_INIT): Likewise.
17503 (pupa_normal_fini): Free the history buffer.
17504 (PUPA_MOD_FINI): Likewise.
17505
17506 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17507 key.
17508
17509 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17510 * configure.ac [i386]: Check for regparam bug.
17511 (NESTED_FUNC_ATTR) [! i386]: Defined.
17512
1f7315a3 175132003-11-17 Marco Gerards <metgerards@student.han.nl>
17514
17515 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17516 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17517 (pupa_emu_SOURCES): New variable.
17518 (pupa_emu_LDFLAGS): Likewise.
17519 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17520 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17521 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17522 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17523 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17524 (pupa_jmp_buf): New typedef.
17525 (pupa_setjmp) [PUPA_UTIL]: New macro.
17526 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17527 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17528 (pupa_refresh): New prototype.
17529 * include/pupa/util/getroot.h: New file.
17530 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17531 it.
17532 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17533 (pupa_rescue_cmd_cat): Likewise.
17534 (pupa_rescue_cmd_ls): Likewise.
17535 (pupa_rescue_cmd_testload): Likewise.
17536 (pupa_rescue_cmd_lsmod): Likewise.
17537 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17538 * normal/menu.c (run_menu): Likewise.
17539 * kern/term.c (pupa_cls): Likewise.
17540 (pupa_refresh): New function.
17541 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17542 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17543 * util/console.c: New file.
f19dbdb7 17544
1f7315a3 17545 * util/i386/pc/getroot.c: New file.
17546 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17547 (pupa_putchar): New function.
17548 (pupa_refresh): Likewise.
17549 (xgetcwd): Function moved to ...
17550 (strip_extra_slashes): Likewise.
17551 (get_prefix): Likewise.
f19dbdb7 17552 * util/i386/pc/getroot.c: ... here.
1f7315a3 17553 (find_root_device): Function moved and renamed to...
17554 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17555 Changed all callers.
17556 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17557 and renamed to...
17558 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17559 Changed all callers.
17560 * util/misc.c (pupa_memalign): New function.
17561 (pupa_mm_init_region): Likewise.
17562 (pupa_register_exported_symbols): Likewise.
17563 (pupa_putchar): Function removed.
17564 * util/pupa-emu.c: New file.
17565
9a5c1ade 175662003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17567
17568 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17569 (_multiboot_mod_SOURCES): New variable.
17570 (_multiboot_mod_CFLAGS): Likewise.
17571 * loader/i386/pc/multiboot.c: New file.
17572 * include/pupa/i386/pc/multiboot.h: Likewise.
17573 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17574 (pupa_multiboot_real_boot): New function.
17575 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17576 (pupa_multiboot_real_boot): New prototype.
17577 (pupa_rescue_cmd_multiboot): Likewise
17578 (pupa_rescue_cmd_module): Likewise.
17579
17580 * kern/loader.c (pupa_loader_set): Continue when
17581 pupa_loader_unload_func() fails.
17582 (pupa_loader_unset): New function.
17583 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17584
17585 * kern/misc.c (pupa_stpcpy): New function.
17586 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17587
8e72a9c0 175882003-11-12 Marco Gerards <metgerards@student.han.nl>
17589
17590 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17591 for available extensions.
17592
17593 * include/pupa/i386/pc/time.h: New file.
17594 * kern/disk.c: Include <pupa/machine/time.h>.
17595 (PUPA_CACHE_TIMEOUT): New macro.
17596 (pupa_last_time): New variable.
17597 (pupa_disk_open): Flush the cache when there was a timeout.
17598 (pupa_disk_close): Reset the timer.
17599 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17600 pupa_currticks.
17601 * util/misc.c: Include <sys/times.h>
17602 (pupa_get_rtc): New function.
17603
c4adbd32 176042003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17605
17606 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17607 as blocks.
17608 (pupa_ext2_get_file_block): Use blocks member.
17609
17610 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17611 first block. Return -1 instead of pupa_errno on error.
17612
bfd30f06 176132003-10-27 Marco Gerards <metgerards@student.han.nl>
17614
17615 * README: In the pupa-mkimage example use _chain instead of chain
17616 and ext2 instead of fat.
17617 * TODO: Replace ext2fs with jfs as an example. Add an item for
17618 adding journal playback for ext2fs.
17619 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17620 (pkgdata_MODULES): Added ext2.mod.
17621 (ext2_mod_SOURCES): New variable.
17622 (ext2_mod_CFLAGS): Likewise.
17623 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17624 * include/pupa/misc.h (pupa_strncpy): New prototype.
17625 (pupa_strcat): Likewise.
17626 (pupa_strncmp): Likewise.
17627 * kern/misc.c (pupa_strcat): Enable function.
17628 (pupa_strncpy): New function.
17629 (pupa_strncmp): Likewise.
17630 * fs/ext2.c: New file.
f19dbdb7 17631
bfd30f06 17632 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17633 when the read failed before retrying.
17634 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17635 (_FILE_OFFSET_BITS): Likewise.
17636 * configure.ac: Added AC_SYS_LARGEFILE.
17637
98d15063 176382003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17639
17640 * genmk.rb (PModule#rule): Make sure to get only symbol names
17641 from the output of nm.
17642 Reported by Robert Millan <zeratul2@wanadoo.es>.
17643
18d9c7cd 176442003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17645
17646 I forgot to check in these changes for a long time. This adds
17647 incomplete support for VGA console, and this is still very
17648 buggy. Also, a lot of consideration is required for I18N,
17649 UNICODE, and VGA font issues. Therefore, assume that this is
17650 such that "better than nothing".
f19dbdb7 17651
18d9c7cd 17652 * font/manager.c: New file.
17653 * include/pupa/font.h: Likewise.
17654 * include/pupa/i386/pc/vga.h: Likewise.
17655 * term/i386/pc/vga.c: Likewise.
17656 * util/unifont2pff.rb: Likewise.
17657
17658 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17659 (pkgdata_MODULES): Added vga.mod and font.mod.
17660 (vga_mod_SOURCES): New variables.
17661 (vga_mod_CFLAGS): Likewise.
17662 (font_mod_SOURCES): Likewise.
17663 (font_mod_CFLAGS): Likewise.
17664
17665 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17666
17667 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 17668 (struct pupa_term): Added init and fini.
18d9c7cd 17669 Changed the argument of putchar to pupa_uint32_t.
17670
17671 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17672 (pupa_console_real_putchar): New prototype.
17673 (pupa_console_putchar): Removed.
17674 (pupa_console_checkkey): Exported.
17675 (pupa_console_getkey): Likewise.
17676
17677 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17678 characters.
17679
17680 * kern/term.c (pupa_term_set_current): Rewritten.
17681 (pupa_putchar): Likewise.
17682 (pupa_putcode): New function.
17683
17684 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17685 (pupa_console_real_putchar): ... this.
17686 (pupa_vga_set_mode): New function.
17687 (pupa_vga_get_font): Likewise.
17688
17689 * normal/command.c: Include pupa/term.h.
17690 (terminal_command): New function.
17691 (pupa_command_init): Register the command "terminal".
17692
17693 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17694 (DISP_UP): Likewise.
17695 (DISP_RIGHT): Likewise.
17696 (DISP_DOWN): Likewise.
17697 (DISP_HLINE): Likewise.
17698 (DISP_VLINE): Likewise.
17699 (DISP_UL): Likewise.
17700 (DISP_UR): Likewise.
17701 (DISP_LL): Likewise.
17702 (DISP_LR): Likewise.
17703
17704 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 17705
977329f5 177062003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17707
17708 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17709 FIX. Reverse the path_list.
17710
17711 * include/pupa/normal.h: Export pupa_register_command and
17712 pupa_unregister_command.
17713
17714 * hello/hello.c (pupa_cmd_hello): New module.
17715 * conf/i386-pc.rmk: Added hello.mod.
17716
1f5ab428 177172003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17718
17719 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 17720
1f5ab428 17721 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17722 (compress_kernel): New variable.
17723 (generate_image): Heavily modified to support compressing a
17724 large part of the core image.
17725
17726 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17727 leak.
17728 (pupa_util_load_image): New function.
17729
17730 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17731 (pupa_compressed_size): New variable.
17732 (codestart): Enable Gate A20 here.
17733 Decompress the compressed part of the core image.
17734 Rearrange the code to put functions and variables which are
17735 required for initialization in the non-compressed part.
17736 Include lzo1x.S.
17737
17738 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17739 here.
17740
17741 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17742
f19dbdb7 17743 * include/pupa/i386/pc/kernel.h
1f5ab428 17744 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17745 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17746 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17747 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17748 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17749
17750 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17751
17752 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17753 (Utility#rule): Likewise.
17754
17755 * configure.ac: Check if LZO is available.
17756
ce5bf700 177572003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17758
17759 * include/pupa/normal.h: New file.
17760 * include/pupa/setjmp.h: Likewise.
17761 * include/pupa/i386/setjmp.h: Likewise.
17762 * normal/cmdline.c: Likewise.
17763 * normal/command.c: Likewise.
17764 * normal/main.c: Likewise.
17765 * normal/menu.c: Likewise.
17766 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17767
ce5bf700 17768 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17769 (pupa_rescue_cmd_initrd): Likewise.
17770
17771 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17772 Likewise.
17773
17774 * kern/i386/pc/startup.S (translation_table): New variable.
17775 (translate_keycode): New function.
17776 (pupa_console_getkey): Call translate_keycode.
17777
17778 * kern/rescue.c (attempt_normal_mode): New function.
17779 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17780 it failed, print a message.
17781
17782 * kern/mm.c (pupa_real_malloc): Print more information when a
17783 free magic is broken.
17784 (pupa_free): If the first free header is not free actually, set
17785 it to P.
17786
17787 * kern/main.c (pupa_load_normal_mode): Just load the module
17788 "normal".
17789 (pupa_main): Don't print the message
17790 "Entering into rescue mode..." here.
17791
17792 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17793 Declared.
17794 (pupa_rescue_cmd_initrd): Likewise.
17795 (pupa_rescue_cmd_initrd): Likewise.
17796
17797 * include/pupa/symbol.h (FUNCTION): Specify the type.
17798 (VARIABLE): Likewise.
17799
17800 * include/pupa/err.h (pupa_err_t): Added
17801 PUPA_ERR_UNKNOWN_COMMAND.
17802
17803 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17804 (pupa_dl_get_prefix): Likewise.
17805
17806 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17807 Added _chain.mod and _linux.mod instead of chain.mod and
17808 linux.mod.
17809 (chain_mod_SOURCES): Renamed to ...
17810 (_chain_mod_SOURCES): ... this.
17811 (chain_mod_CFLAGS): Renamed to ...
17812 (_chain_mod_CFLAGS): ... this.
17813 (linux_mod_SOURCES): Renamed to ...
17814 (_linux_mod_SOURCES): ... this.
17815 (linux_mod_CFLAGS): Renamed to ...
17816 (_linux_mod_CFLAGS): ... this.
17817 (normal_mod_SOURCES): New variable.
17818 (normal_mod_CFLAGS): Likewise.
17819 (normal_mod_ASFLAGS): Likewise.
17820
178212003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17822
17823 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17824 possible.
17825
fe6b695a 17826 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17827 recursively.
17828 (pupa_dl_unref): Unrefer depending modules recursively.
17829 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17830 a module is unloaded before one depending on that module is
17831 unloaded.
17832 (pupa_dl_unload): Unload depending modules explicitly,
17833 if possible.
17834
c04da074 178352003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17836
17837 * include/pupa/i386/pc/linux.h: New file.
17838 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17839
c04da074 17840 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17841 Removed.
17842 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17843 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17844 of PUPA_CHAINLOADER_BOOT_SECTOR.
17845
17846 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17847 (pupa_linux_prot_size): New variable.
17848 (pupa_linux_tmp_addr): Likewise.
17849 (pupa_linux_real_addr): Likewise.
17850 (pupa_linux_boot_zimage): New function.
17851 (pupa_linux_boot_bzimage): Likewise.
17852
17853 * kern/i386/pc/init.c (struct mem_region): New structure.
17854 (MAX_REGIONS): New macro.
17855 (mem_regions): New variable.
17856 (num_regions): Likewise.
17857 (pupa_os_area_addr): Likewise.
17858 (pupa_os_area_size): Likewise.
17859 (pupa_lower_mem): Likewise.
17860 (pupa_upper_mem): Likewise.
17861 (add_mem_region): New function.
17862 (compact_mem_regions): Likewise.
17863 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17864 the size of the conventional memory and that of so-called upper
17865 memory (before the first memory hole).
17866 Instead of adding each found region to free memory, use
17867 add_mem_region and add them after removing overlaps.
17868 Also, add only 1/4 of the upper memory to free memory. The rest
17869 is used for loading OS images. Maybe this is ad hoc, but this
17870 makes it much easier to relocate OS images when booting.
17871
17872 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17873 (pupa_enter_rescue_mode): Don't register initrd and module.
17874
17875 * kern/mm.c: Include pupa/dl.h.
17876
17877 * kern/main.c: Include pupa/file.h and pupa/device.h.
17878
17879 * kern/loader.c (pupa_loader_load_module_func): Removed.
17880 (pupa_loader_load_module): Likewise.
17881
17882 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17883 ``.o''.
17884
17885 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17886 (pupa_linux_tmp_addr): Likewise.
17887 (pupa_linux_real_addr): Likewise.
17888 (pupa_linux_boot_zimage): Likewise.
17889 (pupa_linux_boot_bzimage): Likewise.
17890
17891 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17892 (pupa_upper_mem): Likewise.
17893 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17894 module is too dangerous.
17895
17896 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17897 (pupa_os_area_size): Likewise.
17898 (pupa_loader_set): Remove the first argument. Loader doesn't
17899 manage modules or initrd any longer.
17900 (pupa_loader_load_module): Removed.
17901
17902 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17903 (linux_mod_SOURCES): New variable.
17904 (linux_mod_CFLAGS): Likewise.
17905
a13f9237 179062003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17907
17908 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17909 the length of a blocklist correctly.
17910
17911 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17912 Use ioctl only if the OS file is a block device.
17913 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17914 not very useful for normal files.
17915
17916 * kern/main.c (pupa_set_root_dev): New function.
17917 (pupa_load_normal_mode): Likewise.
17918 (pupa_main): Call those above.
17919
17920 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17921 pupa_uint16_t.
17922
17923 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17924
a5ffe966 179252003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17926
17927 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17928 (setup): Configure the installed partition information and the
17929 dl prefix.
17930
17931 * loader/i386/pc/chainloader.c (my_mod): New variable.
17932 (pupa_chainloader_unload): New function.
17933 (pupa_rescue_cmd_chainloader): Refer itself.
17934 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17935
17936 * kern/i386/pc/startup.S (install_partition): Removed.
17937 (version_string): Likewise.
17938 (config_file): Likewise.
17939 (pupa_install_dos_part): New variable.
17940 (pupa_install_bsd_part): Likewise.
17941 (pupa_prefix): Likewise.
17942 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17943
17944 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17945 and pupa/misc.h.
17946 (make_install_device): New function.
17947 (pupa_machine_init): Set the dl prefix.
17948
17949 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17950 (buf): Renamed to ...
17951 (linebuf): ... this.
17952 (pupa_rescue_cmd_prefix): New function.
17953 (pupa_rescue_cmd_insmod): Likewise.
17954 (pupa_rescue_cmd_rmmod): Likewise.
17955 (pupa_rescue_cmd_lsmod): Likewise.
17956 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17957 rmmod and lsmod.
17958
17959 * kern/mm.c (pupa_memalign): If failed even after invalidating
17960 disk caches, unload unneeded modules and retry.
17961
17962 * kern/misc.c (pupa_memmove): New function.
17963 (pupa_memcpy): Removed.
17964 (pupa_strcpy): New function.
17965 (pupa_itoa): Made static.
17966
17967 * kern/dl.c (pupa_dl_iterate): New function.
17968 (pupa_dl_ref): Likewise.
17969 (pupa_dl_unref): Likewise.
17970 (pupa_dl_unload): Return if succeeded or not.
17971 (pupa_dl_unload_unneeded): New function.
17972 (pupa_dl_unload_all): Likewise.
17973 (pupa_dl_init): Renamed to ...
17974 (pupa_dl_set_prefix): ... this.
17975 (pupa_dl_get_prefix): New function.
17976
17977 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17978 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17979 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17980 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17981 (pupa_install_dos_part): Declared.
17982 (pupa_install_bsd_part): Likewise.
17983 (pupa_prefix): Likewise.
17984 (pupa_boot_drive): Likewise.
17985
17986 * include/pupa/types.h: Fix a typo.
17987
17988 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17989 pupa_memmove.
17990 (pupa_memmove): Declared.
17991 (pupa_strcpy): Likewise.
17992
17993 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17994 pupa_mod_init takes one argument, its own module.
17995 (pupa_dl_unload_unneeded): Declared.
17996 (pupa_dl_unload_all): Likewise.
17997 (pupa_dl_ref): Likewise.
17998 (pupa_dl_unref): Likewise.
17999 (pupa_dl_iterate): Likewise.
18000 (pupa_dl_init): Renamed to ...
18001 (pupa_dl_set_prefix): ... this.
18002 (pupa_dl_get_prefix): Declared.
18003
18004 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 18005 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 18006 unloaded.
18007 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18008 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18009
18010 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18011 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18012
012d7999 180132003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18014
18015 * util/i386/pc/pupa-setup.c (setup): Define the internal
18016 function find_first_partition_start at the top level, because GCC
18017 3.0.x cannot compile internal functions in deeper scopes
18018 correctly.
18019 (find_root_device): Use lstat instead of stat.
18020 Don't follow symbolic links.
18021 Fix the path-constructing code.
18022
18023 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18024 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18025 by a BLKGETSIZE ioctl first, because block devices don't fill
18026 the member st_mode of the structure stat on Linux.
18027 [__linux__] (linux_find_partition): Use a temporary buffer
18028 REAL_DEV for the working space. Copy it to DEV before returning.
18029 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18030 buffer cache consistent.
18031 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18032 strncmp. The previous value was merely wrong.
18033 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18034
18035 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18036 FAT size is 12. The previous value was merely wrong.
18037
18038 * kern/main.c (pupa_main): Don't split the starting message from
18039 newlines.
18040
18041 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18042 LF, because BIOS goes crazy about character attributes in this
18043 case.
18044
1cc73a62 180452003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18046
18047 * include/i386/pc/util/biosdisk.h: New file.
18048 * util/i386/pc/biosdisk.c: Likewise.
18049 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 18050
1cc73a62 18051 * Makefile.in (INCLUDE_DISTFILES): Added
18052 include/pupa/i386/pc/util/biosdisk.h.
18053 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18054 directory util/i386/pc.
18055 (install-local): Added a rule for sbin_UTILITIES.
18056 (uninstall): Likewise.
18057
18058 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18059
18060 * util/misc.c (xrealloc): New function.
18061 (pupa_malloc): Likewise.
18062 (pupa_free): Likewise.
18063 (pupa_realloc): Likewise.
18064 (pupa_stop): Likewise.
18065 (pupa_putchar): Likewise.
18066
18067 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18068
18069 * include/pupa/util/misc.h (xrealloc): Declared.
18070
18071 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18072 macro.
18073 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18074 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18075
18076 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18077 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18078
18079 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18080 way should be implemented.
18081 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18082
18083 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18084 the size of NAME for safety.
18085 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18086 0x88.
18087
18088 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18089 (pupa_setup_SOURCES): Likewise.
18090
18091 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18092
08b70fe8 180932002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18094
18095 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18096 bunch of pushl's from pusha, because this destroys the return
18097 value.
18098
62ddcc8f 180992002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18100
18101 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18102 This means that any missing prototypes could be fatal. Also, you
18103 must take care when writing assembly code. See the comments at
18104 the beginning of startup.S, for more details.
f19dbdb7 18105
62ddcc8f 18106 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18107 compilation mechanism.
18108 (pupa_chainloader_real_boot): Likewise.
18109 (pupa_biosdisk_rw_int13_extensions): Likewise.
18110 (pupa_biosdisk_rw_standard): Likewise.
18111 (pupa_biosdisk_check_int13_extensions): Likewise.
18112 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18113 (pupa_biosdisk_get_diskinfo_standard): Likewise.
18114 (pupa_get_memsize): Likewise.
18115 (pupa_get_mmap_entry): Likewise.
18116 (pupa_console_putchar): Likewise.
18117 (pupa_console_setcursor): Likewise.
18118 (pupa_getrtsecs): Use pushl instead of push.
18119
18120 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18121 memory instead of the stack for a mmap entry, because some
18122 BIOSes may ignore the maximum size and overflow.
18123
18124 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18125
18126 * genmk.rb (PModule#rule): Compile automatically generated
18127 sources with module-specific CFLAGS as well as other sources.
18128
9962ed99 181292002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18130
18131 * configure.ac: Check ld.
18132 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18133 respectively, before checking endianness and sizes.
18134
18135 * Makefile.in (LD): New variable.
f19dbdb7 18136
abdfc3c5 181372002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18138
18139 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18140
6a161fa9 181412002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18142
18143 * Changelog: New file.
18144