]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
aaf53e3c 12009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2
3 * conf/i386.rmk (setjmp_mod_SOURCES)
4 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
5 * conf/common.rmk (setjmp_mod_SOURCES)
6 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
7 to use $(target_cpu).
8 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
9 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
10 * conf/powerpc-ieee1275.rmk: Likewise.
11 * conf/sparc64-ieee1275.rmk: Likewise.
12
13 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
14 $(target_cpu) for kern/$(target_cpu)/dl.c.
15 * conf/i386-efi.rmk: Likewise.
16 * conf/i386-ieee1275.rmk: Likewise.
17 * conf/x86_64-efi.rmk: Likewise.
18 * conf/i386-coreboot.rmk: Likewise.
19 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
20 $(target_cpu) for kern/$(target_cpu)/dl.c and for
21 kern/$(target_cpu)/cache.S.
22 * conf/sparc64-ieee1275.rmk: Likewise.
23
a337130b 242009-07-01 Robert Millan <rmh.grub@aybabtu.com>
25
26 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
27 type to `grub_uint8_t', and adjust `padding9' accordingly.
28
c6fe4d53 292009-06-29 Robert Millan <rmh.grub@aybabtu.com>
30
b09db61d 31 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
32
c6fe4d53 33 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
34 assembly in final jump, using register constraints.
35
b09db61d 36 (grub_linux_boot): For text mode, initialize `have_vga' using
37 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
38
39 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
40 right before the final jump.
41
42 Set `video_mode' to 0x3.
43
44 Document initialization of `video_page', `video_mode' and
45 `video_ega_bx'.
46
28333ad0 472009-06-29 Robert Millan <rmh.grub@aybabtu.com>
48
49 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
50 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
51 and set GRUB_LINUX_FLAG_QUIET appropiately.
52
02164e1b 532009-06-29 Robert Millan <rmh.grub@aybabtu.com>
54
55 Fix build on Debian / sparc.
56
57 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
58
18b6c557 592009-06-28 Pavel Roskin <proski@gnu.org>
60
85f2aab6 61 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
62 fix a warning.
63
18b6c557 64 * util/grub.d/10_linux.in: Match SUSE style initrd names.
65
ad760f81 662009-06-27 Robert Millan <rmh.grub@aybabtu.com>
67
68 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
69 `err'.
70
87a4623b 712009-06-27 Robert Millan <rmh.grub@aybabtu.com>
72
73 Revert r2338.
74
75 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
76 file can't be opened. grub_file_open() is already supposed to set
77 grub_errno / grub_errmsg appropiately.
78 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
79
8231fb77 802009-06-27 Pavel Roskin <proski@gnu.org>
812009-06-27 Robert Millan <rmh.grub@aybabtu.com>
82
83 * include/grub/dl.h: Include grub/elf.h.
84 (struct grub_dl): Add symtab field.
85 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
86 GRUB_MODULES_MACHINE_READONLY.
87 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
88 of the header for read-only modules.
89 (grub_dl_unload): Free mod->symtab for read-only modules.
90 * kern/i386/dl.c: Use mod->symtab.
91 * kern/powerpc/dl.c: Likewise.
92 * kern/sparc64/dl.c: Likewise.
93 * kern/x86_64/dl.c: Likewise.
94
95 * conf/i386-qemu.rmk: New file.
96 * kern/i386/qemu/startup.S: Likewise.
97 * kern/i386/qemu/mmap.c: Likewise.
98 * boot/i386/qemu/boot.S: Likewise.
99 * include/grub/i386/qemu/time.h: Likewise.
100 * include/grub/i386/qemu/serial.h: Likewise.
101 * include/grub/i386/qemu/kernel.h: Likewise.
102 * include/grub/i386/qemu/console.h: Likewise.
103 * include/grub/i386/qemu/boot.h: Likewise.
104 * include/grub/i386/qemu/init.h: Likewise.
105 * include/grub/i386/qemu/machine.h: Likewise.
106 * include/grub/i386/qemu/loader.h: Likewise.
107 * include/grub/i386/qemu/memory.h: Likewise.
108
109 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
110 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
111 [qemu] (pkglib_IMAGES): Add `boot.img'.
112 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
113 [qemu] (boot_img_FORMAT): New variables.
114 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
115 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
116 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
117 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
118 [qemu] (kernel_img_FORMAT): New variables.
119
120 * configure.ac: Recognise `i386-qemu'.
121
122 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
123 (for no compression).
124 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
125 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
126 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
127 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
128 ifdefs).
129
97fe384e 1302009-06-27 Pavel Roskin <proski@gnu.org>
131
132 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
133 read.
134 * efiemu/prepare32.c: Likewise.
135 * efiemu/prepare64.c: Likewise.
136
c402ab17 1372009-06-26 Pavel Roskin <proski@gnu.org>
138
139 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
140 * include/grub/elf.h: Define symbols without "32" or "64" based
141 on GRUB_TARGET_WORDSIZE.
142 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
143 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
144 ELF definitions.
145 * efiemu/loadcore64.c: Likewise.
146 * loader/i386/bsd32.c: Likewise.
147 * loader/i386/bsd64.c: Likewise.
148 * kern/dl.c: Remove own ELF definitions.
149 * util/i386/efi/grub-mkimage.c: Likewise.
150
9bbdfd4d 1512009-06-23 Robert Millan <rmh.grub@aybabtu.com>
152
153 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
154 segment 0x0 unconditionally, because the reference generated by
155 GAS is an absolute address.
156
a42ce6e9 1572009-06-22 Robert Millan <rmh.grub@aybabtu.com>
158
159 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
160 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
161
c952cf92 1622009-06-22 Robert Millan <rmh.grub@aybabtu.com>
163
164 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
165 indexes. Check for -f explicitly.
cc3752ad 166 (search_file): Improve error message.
167 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 168
132a0a59 1692009-06-22 Robert Millan <rmh.grub@aybabtu.com>
170
171 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
172 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
173
387a140c 1742009-06-22 Robert Millan <rmh.grub@aybabtu.com>
175
176 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
177 * conf/i386-ieee1275.rmk: Likewise.
178 * conf/i386-coreboot.rmk: Likewise.
179
180 * kern/i386/pc/startup.S (grub_stop): Remove function.
181 * kern/i386/ieee1275/startup.S: Likewise.
182 * kern/i386/coreboot/startup.S: Likewise.
183 * kern/i386/misc.S (grub_stop): New function.
184
41da9665 1852009-06-22 Robert Millan <rmh.grub@aybabtu.com>
186
187 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
188 * kern/i386/realmode.S (real_to_prot): ... to here.
189
bf337234 1902009-06-22 Robert Millan <rmh.grub@aybabtu.com>
191
192 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
193 with `kernel.img'.
194 (kernel_elf_SOURCES): Rename to ...
195 (kernel_img_SOURCES): ... this.
196 (kernel_elf_HEADERS): Rename to ...
197 (kernel_img_HEADERS): ... this. Update all users.
198 (kernel_elf_ASFLAGS): Rename to ...
199 (kernel_img_ASFLAGS): ... this.
200 (kernel_elf_CFLAGS): Rename to ...
201 (kernel_img_CFLAGS): ... this.
202 (kernel_elf_LDFLAGS): Rename to ...
203 (kernel_img_LDFLAGS): ... this.
204 * conf/i386-coreboot.rmk: Likewise.
205 * conf/powerpc-ieee1275.rmk: Likewise.
206
207 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
208 with "kernel.img".
209
f52196ff 2102009-06-21 Pavel Roskin <proski@gnu.org>
211
c3cee413 212 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
213 to match nested functions.
214 * loader/sparc64/ieee1275/linux.c: Likewise.
215
f52196ff 216 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
217
58750afc 2182009-06-21 Robert Millan <rmh.grub@aybabtu.com>
219
220 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
221 all i386 platforms.
222
15355c7d 2232009-06-21 Robert Millan <rmh.grub@aybabtu.com>
224
225 Fix asm file handling on ELF, and remove workarounds.
226
227 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
228 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
229 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
230 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
231
3f3ec72b 2322009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
233
234 Load BSD ELF modules
235
236 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
237 and loader/i386/bsd64.c
238 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
239 (FREEBSD_MODTYPE_ELF_MODULE): New definition
240 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
241 (grub_freebsd_load_elfmodule32): New declaration
242 (grub_freebsd_load_elfmoduleobj64): Likewise
243 (grub_freebsd_load_elf_meta32): Likewise
244 (grub_freebsd_load_elf_meta64): Likewise
245 (grub_freebsd_add_meta): Likewise
246 (grub_freebsd_add_meta_module): Likewise
247 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
248 (grub_freebsd_add_meta_module): Likewise and move module-specific
249 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
250 (grub_cmd_freebsd): Add elf-kernel specific parts
251 based on grub_freebsd_add_meta_module
252 (grub_cmd_freebsd_module): Add type parsing moved from
253 grub_freebsd_add_meta_module
254 (grub_cmd_freebsd_module_elf): New function
255 (cmd_freebsd_module_elf): New variable
256 (GRUB_MOD_INIT): Register freebsd_module_elf
257 * loader/i386/bsd32.c: New file
258 * loader/i386/bsd64.c: Likewise
259 * loader/i386/bsdXX.c: Likewise
260 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
261 (grub_elf64_load): Likewise
262 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
263 All users updated
264 (grub_elf64_load_hook_t): Likewise
265
0db15301 2662009-06-21 Colin Watson <cjwatson@ubuntu.com>
267
268 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
269 variable.
270 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
271 don't write a menu entry for recovery mode.
272
546796c1 2732009-06-20 Robert Millan <rmh.grub@aybabtu.com>
274
275 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
276 after it's no longer needed.
277
cd7310d5 2782009-06-20 Robert Millan <rmh.grub@aybabtu.com>
279
280 * include/grub/i386/loader.h (grub_linux_prot_size)
281 (grub_linux_tmp_addr, grub_linux_real_addr)
282 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
283 GRUB_MACHINE_PCBIOS.
284 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
285 common grub_util_info() call to ...
286 (generate_image): ... here.
287 Fix use of uninitialized memory, comparison of signed with
288 unsigned integers and memory leak.
289 Remove bogus module address message.
290
ab32d3b5 2912009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
292
293 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
294 grub_raid_register
295 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
296
024ef597 2972009-06-19 Pavel Roskin <proski@gnu.org>
298
299 * configure.ac: Remove stray AC_MSG_CHECKING.
300
3ac72b51 3012009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
302
303 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 304
e14cd814 3052009-06-18 Pavel Roskin <proski@gnu.org>
306
307 * conf/common.rmk: Add fs_file.mod.
308 * disk/fs_file.c: New file.
309 * include/grub/disk.h (enum grub_disk_dev_id): Add
310 GRUB_DISK_DEVICE_FILE_ID.
311
26586d98 3122009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
313
314 Fix build with Apple's toolchain. Part 2
315
316 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
317 a fake start
318
26de2bcd 3192009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
320
321 Fix build with Apple's toolchain. Part 1
322
323 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
324 for long calls
325 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 326 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 327 Apple's toolchain
328
09b3490b 3292009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
330
331 Fix warnings
332
333 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
334 (decomp_block): initialize ch
335 use grub_memcpy instead of memcpy
336
c22a006a 3372009-06-17 Pavel Roskin <proski@gnu.org>
338
d3638678 339 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
340 version, use declarations needed to use vga_text as the startup
341 console.
342
c22a006a 343 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
344 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
345 the kernel.
346 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
347 and grub_at_keyboard_fini(), it's done on module load and
348 unload.
349
05b129e0 3502009-06-17 Felix Zielcke <fzielcke@z-51.de>
351
352 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
353 file can't be found.
354 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
355
cf24ed9e 3562009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
357
358 Fix newline handling
359
360 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 361 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 362 (grub_script_yylex): don't segfault on unterminated script
363 newline terminates command and variable
364
74aa8e4b 3652009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
366
367 avoid double grub_adjust_range call. Bug reported by David Simner
368
369 * kern/disk.c (grub_disk_write): change to raw disk access before
370 calling disk_read
371
1bd265f3 3722009-06-17 Colin Watson <cjwatson@ubuntu.com>
373
374 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
375 spaces, for the benefit of help2man.
376 * util/i386/efi/grub-mkimage.c (usage): Likewise.
377
a2d08c06 3782009-06-16 Pavel Roskin <proski@gnu.org>
379
380 * kern/i386/halt.c: Include grub/machine/init.h.
381 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
382
b97bcb19 3832009-06-16 Felix Zielcke <fzielcke@z-51.de>
384
385 * util/grub.d/30_os-prober.in: Use ${root} in the generated
386 drivemap menuentry.
387
0644f96c 3882009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
389
390 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
391 `echo' command.
392
3ef17a2e 3932009-06-16 Pavel Roskin <proski@gnu.org>
394
395 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
396 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
397 save %dx, we only need %dl and we never change it.
398 * boot/i386/pc/cdboot.S: Don't set the root drive.
399 * boot/i386/pc/pxeboot.S: Likewise.
400 * include/grub/i386/pc/boot.h: Remove
401 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
402 GRUB_BOOT_MACHINE_DRIVE_CHECK.
403 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
404 * kern/i386/pc/init.c (make_install_device): Remove references
405 to grub_root_drive.
406 * kern/i386/pc/startup.S: Likewise.
407 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
408
693fe637 4092009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
410
411 xnu_uuid command
412
413 * commands/xnu_uuid.c: new file
414 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
415 (xnu_uuid_mod_SOURCES): new variable
416 (xnu_uuid_mod_CFLAGS): likewise
417 (xnu_uuid_mod_LDFLAGS): likewise
418 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
419 * conf/i386-ieee1275.rmk: likewise
420 * conf/i386-pc.rmk: likewise
421 * conf/powerpc-ieee1275.rmk: likewise
422 * conf/sparc64-ieee1275.rmk: likewise
423 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
424
c9da87d0 4252009-06-16 Pavel Roskin <proski@gnu.org>
426
427 * configure.ac: Avoid '==' in test command, it's not portable.
428
9c6f4596 4292009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
430
431 Probe command
432
433 * commands/probe.c: new file
434 * conf/common.rmk (pkglib_MODULES): add probe.mod
435 (probe_mod_SOURCES): new variable
436 (probe_mod_CFLAGS): likewise
437 (probe_mod_LDFLAGS): likewise
438 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
439 * conf/i386-ieee1275.rmk: likewise
440 * conf/i386-pc.rmk: likewise
441 * conf/powerpc-ieee1275.rmk: likewise
442 * conf/sparc64-ieee1275.rmk: likewise
443
70b7f9fd 4442009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
445
446 Fix handling of string like \"hello\" and "a
447 b"
448
449 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
450 (grub_script_yylex): fix parsing of quoting, escaping and newline
451
71c79a6b 4522009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
453
dd74360c 454 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 455 handling
dd74360c 456
0644f96c 4572009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 458
459 * util/grub-mkconfig.in: Fix parsing of --output option.
460
e40893c3 4612009-06-12 Pavel Roskin <proski@gnu.org>
462
463 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
464 genmk.rb don't need to be generated or installed.
465
3a1acfe2 4662009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
467
468 * commands/i386/pc/drivemap_int13h.S: add more comments
469
3a4575d4 4702009-06-11 Pavel Roskin <proski@gnu.org>
471
0658e928 472 * Makefile.in (uninstall): Uninstall manuals.
473
ca0388f0 474 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
475 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
476 and update-grub_lib in two places.
477 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
478
e3b27c39 479 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
480 a compiler warning.
481
3a4575d4 482 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
483 `entry_lo' to fix variable shadowing.
484
af1f4f55 4852009-06-11 Christian Franke <franke@computer.org>
486
487 * kern/misc.c (__enable_execute_stack): Add missing return type
488 to prevent gcc warning.
489
5225e649 4902009-06-11 Felix Zielcke <fzielcke@z-51.de>
491
492 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
493
7d83bd47 4942009-06-11 Pavel Roskin <proski@gnu.org>
495
c1cb63ba 496 * Makefile.in: Don't rely on any scripts being executable.
497 Always use $(SHELL) to run shell scripts.
498
7d83bd47 499 * configure.ac: Always define ___main if using -nostdlib. This
500 fixes tests on Cygwin.
501
948f48e7 5022009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
503
504 UDF fix
505
7d83bd47 506 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 507 is in bytes and not in blocks
7d83bd47 508
8ada9bc1 5092009-06-11 Pavel Roskin <proski@gnu.org>
510
511 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
512 warning.
513
25ad2323 5142009-06-11 Felix Zielcke <fzielcke@z-51.de>
515
516 * util/grub.d/30_os-prober.in: Fix a comment. Source
517 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
518 to set the root device. Place drivemap command in the generated
519 chain entry.
520
e65acb0c 5212009-06-11 Pavel Roskin <proski@gnu.org>
522
523 * configure.ac: Remove host_m32. Issues with 64-bit utilities
524 have long been resolved.
525
f285fe2d 5262009-06-11 Colin Watson <cjwatson@ubuntu.com>
527
bd47b0b5 528 * util/grub.d/10_linux.in: Capitalise "Linux".
529
f285fe2d 530 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
531
a0c62e4e 5322009-06-11 Pavel Roskin <proski@gnu.org>
533
b6783cb2 534 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
535 fix a gcc warning and ensure that the function won't ever exit.
536
dde032e8 537 * kern/i386/ieee1275/init.c: Add missing prototype for
538 grub_stop_floppy().
539
22cd079d 540 * loader/ieee1275/multiboot2.c [__i386__]: Include
541 grub/cpu/multiboot.h.
542
a0c62e4e 543 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
544 casts to short - they are not portable and cause warnings. Fix
545 use of uninitialized values in input_buf. Use ARRAY_SIZE.
546
63963d17 5472009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
548
549 Drivemap fixes
550
551 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
552 new function
553 (grub_get_root_biosnumber_saved): new variable
554 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
555 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 556 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 557 %dx after the call if necessary
558 * conf/common.rmk (pkglib_MODULES): remove boot.mod
559 (boot_mod_SOURCES): remove
560 (boot_mod_CFLAGS): remove
561 (boot_mod_LDFLAGS): remove
562 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
563 (boot_mod_SOURCES): new variable
564 (boot_mod_CFLAGS): likewise
565 (boot_mod_LDFLAGS): likewise
566 * conf/i386-efi.rmk: likewise
567 * conf/i386-ieee1275.rmk: likewise
568 * conf/i386-pc.rmk: likewise
569 * conf/powerpc-ieee1275.rmk: likewise
570 * conf/sparc64-ieee1275.rmk: likewise
571 * conf/x86_64-efi.rmk: likewise
572 * include/grub/i386/pc/biosnum.h: new file
573 * lib/i386/pc/biosnum.c: likewise
574 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
575 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
576 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 577
33abf7ae 5782009-06-10 Pavel Roskin <proski@gnu.org>
579
5ac35b35 580 * io/gzio.c (test_header): Don't reuse one buffer for all data.
581 Use separate variables. Read only the file size at the end, but
582 not the checksum that we don't use.
583
5c5215d5 584 * kern/file.c (grub_file_read): Use void pointer for the buffer.
585 Adjust all callers.
586
27d5fef7 587 * kern/ieee1275/openfw.c: Remove libc includes.
588 * kern/ieee1275/cmain.c: Likewise.
589 * include/grub/ieee1275/ieee1275.h: Likewise.
590
33abf7ae 591 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
592 compiler warnings.
593
d2d49665 5942009-06-10 Felix Zielcke <fzielcke@z-51.de>
595
596 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
597 `genparttoollist.sh'.
598 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
599 Add `*.sh' to the list find searches for and change `mdate.sh'
600 to `mdate-sh'.
601
fe052e37 6022009-06-10 Pavel Roskin <proski@gnu.org>
603
2763ac18 604 * include/grub/multiboot2.h: Provide compatibility defines for
605 multiboot2.h.
606 * include/multiboot2.h: Include stdint.h only if needed, using
607 angle brackets.
608 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
609 grub/multiboot2.h.
610 * loader/ieee1275/multiboot2.c: Likewise.
611 * loader/multiboot2.c: Likewise.
612 * loader/multiboot_loader.c: Likewise.
613
437e6adc 614 * configure.ac: Use -nostdlib when probing for the target. It
615 should not be required to have libc for the target.
616
06a6836c 617 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
618 they fail without libc headers for the target.
619 * include/grub/powerpc/libgcc.h: Use weak attribute for all
620 exports.
621 * include/grub/sparc64/libgcc.h: Likewise. Don't use
622 preprocessor conditionals.
623
fe052e37 624 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
625 build system doesn't need to be aware of the tar.c internals.
626
afd22553 6272009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 628
afd22553 629 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 630
6b787c4f 6312009-06-09 Robert Millan <rmh.grub@aybabtu.com>
632
633 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
634 disk limit to 26 for IDE, Virtio, Xen and SCSI.
635
6362009-06-09 Felix Zielcke <fzielcke@z-51.de>
637
638 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 639 aren't available if ata.mod gets used.
6b787c4f 640
473d1e45 6412009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 642
473d1e45 643 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 644 initialising controller.
473d1e45 645 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 646
255a27d4 6472009-06-08 Felix Zielcke <fzielcke@z-51.de>
648
649 * util/i386/pc/grub-install.in: Add a parameter --disk-module
650 to choose between ata and biosdisk module on i386-pc.
651
473d1e45 6522009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 653
d55842d8 654 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
655 Subclass and Programming Interface fields in terms of the 3 byte
656 Class Code register.
657 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
658
fa5db0b1 659 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
660 interface is OHCI. Add grub_dprintf for symmetry with
661 bus/usb/uhci.c.
662 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
663 interface is UHCI. Add interf variable for programming
664 interface. Print interface with class/subclass.
665
c0947beb 666 * bus/usb/ohci.c: Set interf with correct field.
667
69da8877 668 * bus/usb/uhci.c: Remove unneeded doubled lines.
669 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
670 Remove whitespace inside comment.
671
9e172e30 6722009-06-08 Robert Millan <rmh.grub@aybabtu.com>
673
674 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
675 as fallback an equivalent option without depth.
676
de65ee2b 6772009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
678
679 Not fail if unable to retrieve C/H/S on LBA disks
680
473d1e45 681 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 682 if unable to retrieve C/H/S on LBA disks
683
b57ea2c9 6842009-06-08 Pavel Roskin <proski@gnu.org>
685
686 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
687 about aliasing.
688
af361263 6892009-06-08 Felix Zielcke <fzielcke@z-51.de>
690
691 * Makefile.in (uninstall): Remove all $lib_DATA files.
692
4c9ec6b3 6932009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
694
695 Bugfix: install on partitionless device
696
697 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
698 is a whole disk
699
e76fc924 7002009-06-08 Felix Zielcke <fzielcke@z-51.de>
701
702 * Makefile.in (uninstall): Remove all $include_DATA files.
703
ba5a0d05 7042009-06-08 Felix Zielcke <fzielcke@z-51.de>
705
706 * commands/true.c: New file. Implement the true and false commands.
707 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
708 (true_mod_SOURCES): New variable.
709 (true_mod_CFLAGS): Likewise.
710 (true_mod_LDFLAGS): Likewise.
711
c8048e32 7122009-06-05 Colin D Bennett <colin@gibibit.com>
713
714 Optimized font character lookup using binary search instead of linear
715 search. Fonts now are required to have the character index ordered by
716 code point.
717
718 * font/font.c (load_font_index): Verify that fonts have ordered
719 character indices.
720 (find_glyph): Use binary search instead of linear search to find a
721 character in a font.
722
408305be 7232009-06-05 Michael Scherer <misc@mandriva.org>
724
725 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
726 uses case sensitive btree.
727 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
728 only for case insensitive filesystems.
729
8ee1e0d9 7302009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
731
732 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
733 * conf/common.rmk (search_mod_CFLAGS): likewise
734
a9966eb1 7352009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
736
473d1e45 737 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 738 compensate a compiler bug
739
9e7100fb 7402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
741
473d1e45 742 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 743 instead of '\b'
473d1e45 744
ede21d71 7452009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
746
747 Definitions for creating asm symbols with Apple's CC
748
749 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
750 [APPLE_CC] (VARIABLE): likewise
751
9dbf7653 7522009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
753
754 Disable lnxboot.img when compiled
755 with Apple's CC
756
757 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
758 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
759 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
760 [! APPLE_CC] (CODE_LENG): skip
761 [! APPLE_CC] (setup_sects): likewise
762 [! APPLE_CC]: skip filling
473d1e45 763
e93cdc3d 7642009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
765
766 Address in trampolines based on 32-bit registers when compiled
767 with Apple's CC
768
473d1e45 769 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 770 for addresses
771 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
772
6c688477 7732009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
774
775 Avoid aliases when compiling with Apple's CC for PCBIOS machine
776
777 * kern/misc.c [APPLE_CC] (memcpy): new function
778 [APPLE_CC] (memmove): likewise
779 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 780 (memcpy): define alias conditionally on !APPLE_CC
6c688477 781 (memset): likewise
782 (abort): likewise
783 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
784 APPLE_CC are defined
785 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
786 (grub_assert_fail): make prototype conditional
787
e37ffc5c 7882009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
789
790 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
791
473d1e45 792 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
793 grub-macho2img
e37ffc5c 794 (CLEANFILES): add grub-macho2img
795 (grub_macho2img_SOURCES): new variable
796 * kern/i386/pc/startup.S (bss_start): new variable
797 (bss_end): likewise
798 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
799 * util/grub-macho2img.c: new file
800
cf00df31 8012009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
802
803 Use objconv when compiling with Apple's CC
804
805 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
806 (efiemu64.o): likewise
807 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
808 when compiling with Apple's CC
809 (efiemu64_s.o): likewise
810 * configure.ac: check for objconv when compiling with Apple's CC
811 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 812
d119a20c 8132009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
814
815 Define segment as well as section when compiling with
816 Apple's CC
817
818 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
819 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
820 (efiemu_convert_pointer): likewise
821 (efiemu_set_virtual_address_map): likewise
822 (efiemu_convert_pointer): likewise
823 (efiemu_getcrc32): likewise
824 (init_crc32_table): likewise
825 (reflect): likewise
826 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
827 (GRUB_MOD_DEP): likewise
473d1e45 828
c8600122 8292009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
830
831 Allow a compilation without -mcmodel=large
832
833 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
834 when compiled without -mcmodel=large
473d1e45 835 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 836 without -mcmodel=large
473d1e45 837 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 838 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 839
e8df1d4e 8402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
841
842 Remove nested functions in efiemu core
843
844 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 845
cc6c3ac1 8462009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
847
848 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
849
850 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
851 temporary storage
473d1e45 852 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
853 using Apple's CC
cc6c3ac1 854 (grub_cpu_is_tsc_supported): likewise
855 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 856
3e325901 8572009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
858
859 Absolute addressing through constant with Apple's cc
860
861 * kern/i386/pc/startup.S: Define necessary constants
862 and address through it when using ABS with Apple's CC
863 * boot/i386/pc/diskboot.S: likewise
864 * boot/i386/pc/boot.S: likewise
865 * boot/i386/pc/lnxboot.S: likewise
866 * boot/i386/pc/cdboot.S: likewise
867 * mmap/i386/pc/mmap_helper.S: likewise
868 * commands/i386/pc/drivemap_int13h.S: likewise
869
2b167a72 8702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
871
872 Check if compiler is apple cc
873
874 * Makefile.in (ASFLAGS): new variable
875 (TARGET_ASFLAGS): likewise
876 (TARGET_MODULE_FORMAT): likewise
877 (TARGET_APPLE_CC): likewise
878 (OBJCONV): likewise
879 (TARGET_IMG_CFLAGS): likewise
880 (TARGET_CPPFLAGS): add includedir
881 * configure.ac: call grub_apple_cc and grub_apple_target_cc
882 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
883 Check for linker script only if compiler isn't Apple's CC
884 (TARGET_MODULE_FORMAT): set
885 (TARGET_APPLE_CC): likewise
886 (TARGET_ASFLAGS): likewise
887 (ASFLAGS): likewise
888 Check for objcopy only if compiler isn't Apple's CC
889 Check for BSS symbol only if compiler isn't Apple's CC
890 * genmk.rb: adapt nm options if we use Apple's utils
891 * aclocal.m4 (grub_apple_cc): new test
892 (grub_apple_target_cc): likewise
473d1e45 893
fb14123e 8942009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
895
896 Simplify sed expressions and improve awk
897
898 * Makefile.in (install-local): simplify sed expression
899 * gencmdlist.sh: likewise
900 * genmoddep.awk: avoid adding module as a dependency of itself
901
5b889789 9022009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
903
904 Add missing start symbols
905
906 * boot/i386/pc/boot.S: add start
fb14123e 907 * boot/i386/pc/pxeboot.S: likewise
473d1e45 908
fd2bf2e3 9092009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
910
911 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 912
913 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 914 (relocate_addresses): consider both r_addend and value at offset
915 (make_mods_section): zerofill modinfo and header
916 (convert_elf): write prefix here
473d1e45 917
5389763d 9182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
919
920 Use .asciz instead of .string
921
922 * i386/pc/diskboot.S: use .asciz instead of .string
923 * i386/pc/boot.S: likewise
924 * include/grub/dl.h (GRUB_MOD_DEP): likewise
925 (GRUB_MOD_NAME): likewise
473d1e45 926
3eb5ed4e 9272009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
928
929 gfxpayload support
930
931 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
932 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
933 (grub_video_setup): remove
934 (grub_video_set_mode): new prototype
935 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
936 (vid_mode): remove
937 (linux_vesafb_res): compile only on PCBIOS
938 (grub_linux_boot): support gfxpayload
939 * loader/i386/pc/xnu.c (video_hook): new function
940 (grub_xnu_set_video): support gfxpayload
941 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
942 (DEFAULT_VIDEO_HEIGHT): likewise
943 (DEFAULT_VIDEO_FLAGS): likewise
944 (DEFAULT_VIDEO_MODE): new definition
945 (video_hook): new function
946 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 947 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 948 loading xnu
949 * video/video.c (grub_video_setup): removed
473d1e45 950 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 951 grub_video_setup
952
4b0e1143 9532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
954
955 Avoid calling biosdisk in drivemap
956
957 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
958 (revparse_biosdisk): likewise
959 (list_mappings): derive name from id directly
960 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 961
fda6cb98 9622009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
963
964 Script fixes
965
966 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
967 (grub_lexer_param): add tokenonhold
968 (grub_script_create_cmdline): remove cmdline. All callers updated
969 (grub_script_function_create): make functionname
970 grub_script_arg. All callers updated
971 (grub_script_execute_argument_to_string): new prototype
972 * kern/parser.c (state_transitions): reorder
973 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 974 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 975 make global
976 (grub_script_execute_cmdline): use new format
977 * script/sh/function.c (grub_script_function_create): make functionname
978 grub_script_arg. All callers updated
473d1e45 979 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 980 (grub_script_yylex): remove
981 (grub_script_yylex2): renamed to ...
982 (grub_script_yylex): ...renamed
983 parse the expressions like a${b}c
984 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
985 (GRUB_PARSER_TOKEN_VAR): remove
986 (GRUB_PARSER_TOKEN_NAME): likewise
987 ("if"): declare as typeless
988 ("while"): likewise
989 ("function"): likewise
990 ("else"): likewise
991 ("then"): likewise
992 ("fi"): likewise
993 (text): remove
994 (argument): likewise
995 (script): accept empty scripts and make exit on error
996 (arguments): use GRUB_PARSER_TOKEN_ARG
997 (function): likewise
998 (command): move error handling to script
999 (menuentry): move grub_script_lexer_ref before
473d1e45 1000 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 1001 argument. All callers updated
1002
f4448a07 10032009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1004
1005 Prevent GRUB from probing floppies during boot.
1006
1007 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1008 * commands/search.c (options): Add --no-floppy.
1009 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1010 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1011 --no-floppy when searching for UUIDs.
1012
2bf5885a 10132009-06-04 Robert Millan <rmh.grub@aybabtu.com>
1014
1015 Simplify the code duplication in commands/search.c.
1016
1017 * commands/search.c (search_label, search_fs_uuid): Merge into ...
1018 (search_fs): ... this. Update all users.
1019
f6fd460a 10202009-06-03 Felix Zielcke <fzielcke@z-51.de>
1021
1022 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1023
cbb3c83e 10242009-05-28 Pavel Roskin <proski@gnu.org>
1025
57788cfd 1026 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1027 Remove the original symlink explicitly.
1028
cbb3c83e 1029 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1030 just one slash. That's how grub_fshelp_find_file() does it.
1031
cd0d5e30 10322009-05-26 Pavel Roskin <proski@gnu.org>
1033
f0f8bbe2 1034 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1035 to `str'.
1036
cd0d5e30 1037 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1038 possibly unused.
1039
8c2cab51 10402009-05-25 Christian Franke <franke@computer.org>
1041
1042 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1043 register.
1044 (grub_atapi_identify): Add wait after drive select.
1045 (grub_ata_identify): Do more strict status register check before
1046 calling grub_atapi_identify (). Suppress error message if status
1047 register is 0x00 after command failure. Add status register
1048 check after PIO read to avoid bogus identify due to stuck DRQ.
1049 Thanks to Pavel Roskin for testing.
1050 (grub_device_initialize): Remove unsafe status register check.
1051 Thanks to 'phcoder' for problem report and patch.
1052 Prevent sign extension in debug message.
1053
230c0ad6 10542009-05-23 Colin D Bennett <colin@gibibit.com>
1055
1056 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1057 definition file, and functions defined in `normal/menu.c' have had
1058 their prototypes moved to `include/grub/menu.h' for consistency.
1059
1060 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1061 from normal.h.
1062 (grub_menu_get_entry): Likewise.
1063 (grub_menu_get_timeout): Likewise.
1064 (grub_menu_set_timeout): Likewise.
1065 (grub_menu_execute_entry): Likewise.
1066 (grub_menu_execute_with_fallback): Likewise.
1067 (grub_menu_entry_run): Likewise.
1068
1069 * include/grub/normal.h: Re-ordered and grouped function
1070 prototypes by file that the function is defined in.
1071 (grub_menu_execute_callback): Removed; moved to menu.h.
1072 (grub_menu_get_entry): Likewise.
1073 (grub_menu_get_timeout): Likewise.
1074 (grub_menu_set_timeout): Likewise.
1075 (grub_menu_execute_entry): Likewise.
1076 (grub_menu_execute_with_fallback): Likewise.
1077 (grub_menu_entry_run): Likewise.
1078 (grub_menu_addentry): Renamed from this ...
1079 (grub_normal_add_menu_entry): ... to this.
1080
1081 * normal/main.c (grub_menu_addentry): Renamed from this ...
1082 (grub_normal_add_menu_entry): ... to this.
1083
1084 * script/sh/execute.c (grub_script_execute_menuentry): Update
1085 reference to renamed grub_menu_addentry function.
1086
861f03a5 10872009-05-23 Felix Zielcke <fzielcke@z-51.de>
1088
1089 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1090
96b1619a 10912009-05-22 Pavel Roskin <proski@gnu.org>
1092
bf6a5fb2 1093 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1094 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1095 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1096 compiling for the i386 targets, but not for the utilities.
1097
96b1619a 1098 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1099 to grub_uint8_t.
1100 (grub_root_drive): Likewise.
1101 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1102 remove alignment.
1103 (grub_root_drive): Change size to byte.
1104 (grub_start_addr): Remove.
1105 (grub_end_addr): Likewise.
1106 (grub_apm_bios_info): Likewise.
1107
b729776b 11082009-05-21 Felix Zielcke <fzielcke@z-51.de>
1109
1110 * normal/i386: Remove.
1111 * normal/powerpc: Likewise.
1112 * normal/sparc64: Likewise.
1113 * normal/x86_64: Likewise.
1114
0a15ce80 11152009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1116
1117 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 1118 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 1119 * loader/i386/xnu_helper.S: Likewise
d6da58e6 1120
33db9015 11212009-05-18 Colin D Bennett <colin@gibibit.com>
1122
d6da58e6 1123 Display error messages when parsing a Lua statement fails.
1124 Previously, executing a syntactically invalid statement like
1125 ")foo" or "bar;" would silently fail.
33db9015 1126
1127 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 1128 (grub_lua_parse_line): Improved reporting of Lua parser and
1129 execution errors.
33db9015 1130
46422c89 11312009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1132
1133 Remove -Werror which causes build to fail on some systems
1134
1135 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1136 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1137 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 1138
22f53a96 11392009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1140
1141 trampoline for linux on 64-bit platform
1142
18f547ad 1143 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1144 loader/i386/efi/linux_trampoline.S
1145 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 1146 declaration
d6da58e6 1147 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1148 here
22f53a96 1149 * loader/i386/linux_trampoline.S: moved here
d6da58e6 1150 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1151 trampoline
22f53a96 1152 (jumpvector): removed
1153 (grub_linux_trampoline_start): new declaration
1154 (grub_linux_trampoline_end): likewise
1155 (grub_linux_boot): use trampoline when on 64-bit platform
1156 * loader/i386/linux.c: likewise
1157
cb5a0f40 11582009-05-16 Pavel Roskin <proski@gnu.org>
1159
1160 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1161 const to avoid a warning.
1162 (grub_lua_setenv): Likewise.
1163 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1164 lmsg to fix a warning.
1165
334f2c28 11662009-05-16 Felix Zielcke <fzielcke@z-51.de>
1167
1168 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 1169 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1170 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1171 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1172 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1173 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1174 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1175 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 1176
59e5d3ec 11772009-05-16 Felix Zielcke <fzielcke@z-51.de>
1178
1179 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1180
9d87a1ba 11812009-05-16 Bean <bean123ch@gmail.com>
1182
1183 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1184 (lua_mod_SOURCES): New variable.
1185 (lua_mod_CFLAGS): Likewise.
1186 (lua_mod_LDFLAGS): Likewise.
1187
1188 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1189 (setjmp_mod_SOURCES): New variable.
1190 (setjmp_mod_CFLAGS): Likewise.
1191 (setjmp_LDFLAGS): Likewise.
1192
1193 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1194 (setjmp_mod_SOURCES): New variable.
1195 (setjmp_mod_CFLAGS): Likewise.
1196 (setjmp_LDFLAGS): Likewise.
1197
1198 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1199 (setjmp_mod_SOURCES): New variable.
1200 (setjmp_mod_CFLAGS): Likewise.
1201 (setjmp_LDFLAGS): Likewise.
1202
1203 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1204 (setjmp_mod_SOURCES): New variable.
1205 (setjmp_mod_CFLAGS): Likewise.
1206 (setjmp_LDFLAGS): Likewise.
1207
1208 * normal/i386/setjmp.S: Moved from here ...
1209 * lib/i386/setjmp.S: ... Moved here
1210 * normal/x86_64/setjmp.S: Moved from here ...
1211 * lib/x86_64/setjmp.S: ... Moved here
1212 * normal/powerpc/setjmp.S: Moved from here ...
1213 * lib/powerpc/setjmp.S: ... Moved here
1214 * normal/sparc64/setjmp.S: Moved from here ...
1215 * lib/sparc64/setjmp.S: ... Moved here
1216
1217 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1218 returns_twice in mingw.
1219
1220 * script/lua/grub_lib.c: New file.
1221 * script/lua/grub_lib.h: Likewise.
1222 * script/lua/grub_lua.h: Likewise.
1223 * script/lua/grub_main.c: Likewise.
1224 * script/lua/lapi.c: Likewise.
1225 * script/lua/lapi.h: Likewise.
1226 * script/lua/lauxlib.c: Likewise.
1227 * script/lua/lauxlib.h: Likewise.
1228 * script/lua/lbaselib.c: Likewise.
1229 * script/lua/lcode.c: Likewise.
1230 * script/lua/lcode.h: Likewise.
1231 * script/lua/ldblib.c: Likewise.
1232 * script/lua/ldebug.c: Likewise.
1233 * script/lua/ldebug.h: Likewise.
1234 * script/lua/ldo.c: Likewise.
1235 * script/lua/ldo.h: Likewise.
1236 * script/lua/ldump.c: Likewise.
1237 * script/lua/lfunc.c: Likewise.
1238 * script/lua/lfunc.h: Likewise.
1239 * script/lua/lgc.c: Likewise.
1240 * script/lua/lgc.h: Likewise.
1241 * script/lua/linit.c: Likewise.
1242 * script/lua/liolib.c: Likewise.
1243 * script/lua/llex.c: Likewise.
1244 * script/lua/llex.h: Likewise.
1245 * script/lua/llimits.h: Likewise.
1246 * script/lua/lmathlib.c: Likewise.
1247 * script/lua/lmem.c: Likewise.
1248 * script/lua/lmem.h: Likewise.
1249 * script/lua/loadlib.c: Likewise.
1250 * script/lua/lobject.c: Likewise.
1251 * script/lua/lobject.h: Likewise.
1252 * script/lua/lopcodes.c: Likewise.
1253 * script/lua/lopcodes.h: Likewise.
1254 * script/lua/loslib.c: Likewise.
1255 * script/lua/lparser.c: Likewise.
1256 * script/lua/lparser.h: Likewise.
1257 * script/lua/lstate.c: Likewise.
1258 * script/lua/lstate.h: Likewise.
1259 * script/lua/lstring.c: Likewise.
1260 * script/lua/lstring.h: Likewise.
1261 * script/lua/lstrlib.c: Likewise.
1262 * script/lua/ltable.c: Likewise.
1263 * script/lua/ltable.h: Likewise.
1264 * script/lua/ltablib.c: Likewise.
1265 * script/lua/ltm.c: Likewise.
1266 * script/lua/ltm.h: Likewise.
1267 * script/lua/lua.h: Likewise.
1268 * script/lua/luaconf.h: Likewise.
1269 * script/lua/lualib.h: Likewise.
1270 * script/lua/lundump.c: Likewise.
1271 * script/lua/lundump.h: Likewise.
1272 * script/lua/lvm.c: Likewise.
1273 * script/lua/lvm.h: Likewise.
1274 * script/lua/lzio.c: Likewise.
1275 * script/lua/lzio.h: Likewise.
1276
5e898c9d 12772009-05-16 Bean <bean123ch@gmail.com>
1278
1279 * include/grub/kernel.h (grub_module_header_types): Add type
1280 OBJ_TYPE_CONFIG.
1281
1282 * kern/main.c (grub_load_config): New function.
1283 (grub_main): Call grub_load_config to read boot config.
1284
1285 * grub-mkimage (generate_image): New parameter config_path.
1286 (options): New option --config.
1287 (main): Parse --config option, and pass it to generate_image.
1288
cf353a47 12892009-05-14 Christian Franke <franke@computer.org>
1290
1291 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1292 This fixes build on Cygwin.
1293
3834887f 12942009-05-14 Pavel Roskin <proski@gnu.org>
1295
1296 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1297 jump. This saves two bytes, so the typical case of 2 swapped
1298 drives would fit 32 bytes.
1299
8090fc01 13002009-05-13 Pavel Roskin <proski@gnu.org>
1301
ac963883 1302 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1303 grub_uint32_t to avoid a warning.
1304
8090fc01 1305 * loader/i386/linux.c (allocate_pages): When assigning
1306 real_mode_mem, cast through grub_size_t to fix a warning. The
1307 code already makes sure that the value would fit a pointer.
1308 (grub_linux_setup_video): Cast render_target->data to
1309 grub_size_t to fix a warning.
1310
18f547ad 13112009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 1312
1313 * commands/i386/pc/drivemap.c: New file - implement drivemap
1314 command.
1315 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1316 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1317
6f6a8b28 13182009-05-13 Pavel Roskin <proski@gnu.org>
1319
1320 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1321 embedding_area_exists.
1322
15fbf4c4 13232009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1324
1325 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1326 it easier to understand / work with.
59978c8a 1327 Improve warning messages for cases where there's no embedding area,
1328 or when it is too small (or core.img too large).
15fbf4c4 1329
238e871f 13302009-05-13 Pavel Roskin <proski@gnu.org>
1331
0ab3a9a4 1332 * loader/i386/pc/multiboot2.c: Add necessary includes for
1333 grub_multiboot2_real_boot().
1334
a2c8c5f8 1335 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1336 PX record is always little-endian. We only need the lower 2
1337 bytes of the mode.
1338
faec96af 1339 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1340 facilitate code reuse.
1341 (grub_cpio_mount): Use "struct head", not a char buffer. This
1342 fixes a warning reported by gcc 4.4.
1343
238e871f 1344 * kernel/disk.c (grub_disk_read): Use void pointer for the
1345 buffer.
1346 (grub_disk_write): Use const void pointer for the buffer.
1347 Adjust all callers. Remove unnecessary casts.
1348
901d2f0c 13492009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1350
1351 * util/i386/pc/grub-install.in: Update copyright year.
1352
18f547ad 13532009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 1354
1355 gptsync
1356
1357 * commands/gptsync.c: new file
1358 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1359 (gptsync_mod_SOURCES): new variable
1360 (gptsync_mod_CFLAGS): likewise
1361 (gptsync_mod_LDFLAGS): likewise
18f547ad 1362 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 1363 new definition
1364 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1365 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1366 * conf/i386-ieee1275.rmk: likewise
1367 * conf/i386-pc.rmk: likewise
1368 * conf/powerpc-ieee1275.rmk: likewise
1369
b4ba690a 13702009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1371
1372 Fixed grub-emu
1373
1374 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1375 (grub_dl_ref): likewise
1376
317e1a44 13772009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1378
1379 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1380 split in two functions (one for msdos and one for gpt).
1381
041b8094 13822009-05-08 Pavel Roskin <proski@gnu.org>
1383
752473c2 1384 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1385 not modified.
1386
041b8094 1387 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1388 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1389 Initialize them with -1. Add sanity check for bad1. Eliminate
1390 nerr variable.
1391
172800ce 13922009-05-08 David S. Miller <davem@davemloft.net>
1393
1394 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1395
29aa5e81 13962009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1397
1398 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 1399 existence.
29aa5e81 1400
96613b62 14012009-05-05 Felix Zielcke <fzielcke@z-51.de>
1402
1403 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 1404 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 1405
eef73c8a 14062009-05-05 David S. Miller <davem@davemloft.net>
1407
1408 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1409
119494b5 14102009-05-05 Pavel Roskin <proski@gnu.org>
1411
1412 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1413 of grub_dl_ref() and grub_dl_unref().
1414 * commands/parttool.c: Remove preprocessor conditionals around
1415 grub_dl_ref() and grub_dl_unref().
1416 * fs/affs.c: Likewise.
1417 * fs/afs.c: Likewise.
1418 * fs/cpio.c: Likewise.
1419 * fs/ext2.c: Likewise.
1420 * fs/fat.c: Likewise.
1421 * fs/hfs.c: Likewise.
1422 * fs/hfsplus.c: Likewise.
1423 * fs/iso9660.c: Likewise.
1424 * fs/jfs.c: Likewise.
1425 * fs/minix.c: Likewise.
1426 * fs/ntfs.c: Likewise.
1427 * fs/reiserfs.c: Likewise.
1428 * fs/sfs.c: Likewise.
1429 * fs/udf.c: Likewise.
1430 * fs/ufs.c: Likewise.
1431 * fs/xfs.c: Likewise.
1432 * include/grub/dl.h: Likewise.
1433 * loader/xnu.c: Likewise.
1434
de5fd76e 14352009-05-04 Pavel Roskin <proski@gnu.org>
1436
1437 * commands/acpi.c: Remove unused variable my_mod.
1438 * partmap/amiga.c: Likewise.
1439 * partmap/apple.c: Likewise.
1440 * partmap/gpt.c: Likewise.
1441 * partmap/pc.c: Likewise.
1442 * partmap/sun.c: Likewise.
1443 * term/gfxterm.c: Likewise.
1444 * term/i386/pc/vesafb.c: Likewise.
1445 * term/i386/pc/vga.c: Likewise.
1446
983598ad 14472009-05-04 David S. Miller <davem@davemloft.net>
1448
1449 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1450 pointer args to grub_ieee1275_get_property().
1451
8aadec43 1452 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1453
9554b15e 1454 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1455 devices, and do not traverse down under controller nodes.
1456
67e23c90 1457 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1458 (grub_ofdisk_open): Use it to un-escape "," characters.
1459 * kern/disk.c (find_part_sep): New.
1460 (grub_disk_open): Use it to find the first non-escaped ','
1461 character in the disk name.
1462 * util/ieee1275/devicemap.c (escape_of_path): New.
1463 (grub_util_emit_devicemap_entry): Use it.
1464 * util/sparc64/ieee1275/grub-install.in: Update script to
1465 strip partition specifiers properly by not triggering on
1466 '\' escaped ',' characters.
1467
74bfdd2f 14682009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1469
1470 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1471 to 0x300.
1472 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1473 resolutions.
1474 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1475 on documentation from Wikipedia).
1476
4241d2b1 14772009-05-04 Pavel Roskin <proski@gnu.org>
1478
1479 * disk/ata.c: Spelling fixes.
1480 * disk/raid.c: Likewise.
1481 * disk/usbms.c: Likewise.
1482 * disk/dmraid_nvidia.c: Likewise.
1483 * kern/ieee1275/openfw.c: Likewise.
1484 * kern/ieee1275/init.c: Likewise.
1485 * kern/ieee1275/cmain.c: Likewise.
1486 * boot/i386/pc/cdboot.S: Likewise.
1487 * video/readers/png.c: Likewise.
1488 * video/i386/pc/vbe.c: Likewise.
1489 * fs/udf.c: Likewise.
1490 * fs/hfs.c: Likewise.
1491 * fs/reiserfs.c: Likewise.
1492 * efiemu/runtime/efiemu.c: Likewise.
1493 * efiemu/main.c: Likewise.
1494 * efiemu/mm.c: Likewise.
1495 * include/grub/elf.h: Likewise.
1496 * include/grub/xnu.h: Likewise.
1497 * include/grub/usbdesc.h: Likewise.
1498 * include/grub/usb.h: Likewise.
1499 * include/grub/script_sh.h: Likewise.
1500 * include/grub/lib/LzmaEnc.h: Likewise.
1501 * include/grub/efiemu/efiemu.h: Likewise.
1502 * include/grub/command.h: Likewise.
1503 * normal/menu.c: Likewise.
1504 * normal/main.c: Likewise.
1505 * normal/datetime.c: Likewise.
1506 * bus/usb/uhci.c: Likewise.
1507 * mmap/i386/uppermem.c: Likewise.
1508 * mmap/mmap.c: Likewise.
1509 * commands/acpi.c: Likewise.
1510 * commands/test.c: Likewise.
1511 * partmap/apple.c: Likewise.
1512 * font/font.c: Likewise.
1513 * loader/sparc64/ieee1275/linux.c: Likewise.
1514 * loader/macho.c: Likewise.
1515 * loader/i386/bsd_trampoline.S: Likewise.
1516 * loader/i386/bsd.c: Likewise.
1517 * loader/xnu.c: Likewise.
1518 * term/i386/pc/vesafb.c: Likewise.
1519 * term/usb_keyboard.c: Likewise.
1520 * util/resolve.c: Likewise.
1521 * util/getroot.c: Likewise.
1522
0cfc0083 15232009-05-04 Felix Zielcke <fzielcke@z-51.de>
1524
1525 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1526
7c1d00cd 15272009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1528
1529 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1530 build error.
1531
b01f0548 15322009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1533
1534 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1535 parameter only available on BIOS.
1536
ecc3eb22 15372009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1538
1539 Removed wrong semicolon in declaration
1540
1541 * grub/misc.h (grub_dprintf): remove semicolon
1542
112972a9 15432009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1544
1545 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1546 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1547 is done by grub_cmd_linux() now).
1548 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1549 restore video to text mode.
1550 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1551 indicates lack of "vga=" parameter. "vga=0" is mapped to
1552 `GRUB_LINUX_VID_MODE_NORMAL'.
1553
afd5c115 15542009-05-04 Felix Zielcke <fzielcke@z-51.de>
1555
1556 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1557 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1558 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 1559 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 1560 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1561 `grub_script.tab.c'.
1562
1563 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1564 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1565 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1566 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1567 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1568
faa517ce 1569 * Makefile.in: Remove duplicated 2008 in Copyright line.
1570
ae0c0bdc 15712009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1572
473d1e45 1573 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 1574 unconditionally.
1575 * include/grub/util/misc.h (grub_util_warn): New declaration.
1576
1577 * util/i386/pc/grub-install.in: Understand --force and pass it down
1578 to grub-setup.
1579
1580 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1581 down to setup().
1582 (setup): Improve error messages and add warnings when requested to
1583 install in odd layouts. Refuse to install using blocklists unless
1584 --force was set.
1585
18f547ad 15862009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 1587
1588 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1589
6d260daa 15902009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1591
1592 Updated copyright year
1593
1594 * fs/hfsplus.c: updated copyright year
18f547ad 1595
69f853f8 15962009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1597
1598 HFS+ UUID
1599
18f547ad 1600 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 1601 in the space previously used by unused3
1602 (grub_hfsplus_uuid): new function
1603 (grub_hfsplus_fs): added uuid field
1604
4c402e73 16052009-05-03 Pavel Roskin <proski@gnu.org>
1606
1607 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1608 suppress warnings. It's no longer needed.
1609 * disk/host.c: Likewise.
1610 * disk/ata_pthru.c: Likewise.
1611 * disk/loopback.c: Likewise.
1612 * hook/datehook.c: Likewise.
1613 * parttool/pcpart.c: Likewise.
1614 * fs/i386/pc/pxe.c: Likewise.
1615 * fs/ntfscomp.c: Likewise.
1616 * efiemu/main.c: Likewise.
1617 * mmap/mmap.c: Likewise.
1618 * commands/crc.c: Likewise.
1619 * commands/hexdump.c: Likewise.
1620 * commands/hdparm.c: Likewise.
1621 * commands/acpi.c: Likewise.
1622 * commands/echo.c: Likewise.
1623 * commands/minicmd.c: Likewise.
1624 * commands/blocklist.c: Likewise.
1625 * commands/memrw.c: Likewise.
1626 * commands/loadenv.c: Likewise.
1627 * commands/usbtest.c: Likewise.
1628 * commands/lsmmap.c: Likewise.
1629 * commands/boot.c: Likewise.
1630 * commands/parttool.c: Likewise.
1631 * commands/configfile.c: Likewise.
1632 * commands/search.c: Likewise.
1633 * commands/ieee1275/suspend.c: Likewise.
1634 * commands/cat.c: Likewise.
1635 * commands/i386/pc/pxecmd.c: Likewise.
1636 * commands/i386/pc/play.c: Likewise.
1637 * commands/i386/pc/halt.c: Likewise.
1638 * commands/i386/pc/vbeinfo.c: Likewise.
1639 * commands/i386/pc/vbetest.c: Likewise.
1640 * commands/lspci.c: Likewise.
1641 * commands/date.c: Likewise.
1642 * commands/handler.c: Likewise.
1643 * commands/ls.c: Likewise.
1644 * commands/test.c: Likewise.
1645 * commands/cmp.c: Likewise.
1646 * commands/efi/loadbios.c: Likewise.
1647 * commands/efi/fixvideo.c: Likewise.
1648 * commands/halt.c: Likewise.
1649 * commands/help.c: Likewise.
1650 * commands/reboot.c: Likewise.
1651 * hello/hello.c: Likewise.
1652 * script/sh/main.c: Likewise.
1653 * loader/xnu.c: Likewise.
1654 * term/terminfo.c: Likewise.
1655 * term/i386/pc/serial.c: Likewise.
1656 * term/usb_keyboard.c: Likewise.
1657
515b5079 16582009-05-03 David S. Miller <davem@davemloft.net>
1659
1660 * normal/menu.c: Include grub/parser.h
1661
dfc31a22 16622009-05-03 Pavel Roskin <proski@gnu.org>
1663
2fee74f1 1664 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1665 not char*.
1666 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1667 Suggested by Javier Martín <lordhabbit@gmail.com>
1668
dfc31a22 1669 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1670 efiemu??.o doesn't exist.
1671 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1672 copying.
1673
18f547ad 16742009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1675
1676 FreeBSD 64-bit support
1677
18f547ad 1678 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1679 and loader/i386/bsd_trampoline.S
1680 (bsd_mod_ASFLAGS): new variable
1681 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1682 (FREEBSD_MODTYPE_KERNEL64): likewise
1683 (grub_bsd64_trampoline_start): likewise
1684 (grub_bsd64_trampoline_end): likewise
1685 (grub_bsd64_trampoline_selfjump): likewise
1686 (grub_bsd64_trampoline_gdt): likewise
1687 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1688 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1689 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1690 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1691 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1692 of "attrib" member
1693 * loader/i386/bsd_pagetable.c: new file
1694 * loader/i386/bsd_trampoline.S: likewise
1695 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1696 (ALIGN_VAR): likewise
1697 (entry_hi): new variable
1698 (kern_end_mdofs): likewise
1699 (is_64bit): likewise
1700 (grub_freebsd_add_meta): use ALIGN_VAR
1701 (grub_e820_mmap): new declaration
1702 (grub_freebsd_add_mmap): new function
1703 (grub_freebsd_add_meta_module): support 64 bit kernels
1704 (grub_freebsd_list_modules): use ALIGN_VAR
1705 (gdt_descriptor): new declaration
1706 (grub_freebsd_boot): support 64 bit kernels
1707 (grub_bsd_elf64_hook): new function
1708 (grub_bsd_load_elf): support elf64
1709
038c5720 17102009-05-03 Bean <bean123ch@gmail.com>
1711
1712 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1713 after we get the result of if statement.
1714
fc45fb58 17152009-05-03 Bean <bean123ch@gmail.com>
1716
1717 * Makefile.in (enable_efiemu): New variable.
1718
1719 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1720 set.
1721 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1722 path.
1723 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1724 path, add -mno-red-zone option.
1725 (efiemu64_s.o): Likewise.
1726 (efiemu64.o): Use macro $^ for source file.
1727
1728 * configure.ac (--enable-efiemu): New option.
1729
bbee0f2b 17302009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1731
1732 xnu support
1733
1734 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1735 (pkglib_MODULES): add xnu.mod
1736 (xnu_mod_SOURCES): new variable
1737 (xnu_mod_CFLAGS): likewise
1738 (xnu_mod_LDFLAGS): likewise
1739 (xnu_mod_ASFLAGS): likewise
1740 * conf/i386-pc.rmk: likewise
1741 * conf/x86_64-efi.rmk: likewise
7dd4a573 1742 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1743 new declaration
1744 * include/grub/i386/macho.h: new file
1745 * include/grub/i386/xnu.h: likewise
1746 * include/grub/macho.h: likewise
1747 * include/grub/machoload.h: likewise
1748 * include/grub/x86_64/macho.h: likewise
1749 * include/grub/x86_64/xnu.h: likewise
1750 * include/grub/xnu.h: likewise
1751 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1752 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1753 * loader/i386/efi/xnu.c: new file
1754 * loader/i386/pc/xnu.c: likewise
1755 * loader/i386/xnu.c: likewise
1756 * loader/i386/xnu_helper.S: likewise
1757 * loader/macho.c: likewise
1758 * loader/xnu.c: likewise
1759 * loader/xnu_resume.c: likewise
1760 * util/grub-dumpdevtree: likewise
1761 * include/grub/i386/pit.h: include grub/err.h
1762 (grub_pit_wait): export
1763 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1764
5caf964d 17652009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1766
1767 Efiemu
7dd4a573 1768
5caf964d 1769 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1770 _linux_efi, linux_efi.
1771 new files in grub-emu
5caf964d 1772 new targets efiemu32.o and efiemu64.o
1773 * loader/linux_normal_efiemu.c: likewise
1774 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1775 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1776 files to copy
1777 * include/grub/autoefi.h: new file
7dd4a573 1778 * include/grub/i386/efiemu.h: likewise
5caf964d 1779 * include/grub/i386/pc/efiemu.h: likewise
1780 * include/grub/efi/api.h: add LL suffix when necessary
1781 new definitions relating to tables
1782 * include/grub/efiemu/efiemu.h: new file
1783 * include/grub/efiemu/runtime.h: likewise
1784 * efiemu/prepare.c: likewise
1785 * efiemu/loadcore_common.c: likewise
1786 * efiemu/loadcore64.c: likewise
1787 * efiemu/runtime/efiemu.sh: likewise
1788 * efiemu/runtime/efiemu.S: likewise
1789 * efiemu/runtime/efiemu.c: likewise
1790 * efiemu/runtime/config.h: likewise
1791 * efiemu/prepare32.c: likewise
1792 * efiemu/main.c: likewise
1793 * efiemu/modules/pnvram.c: likewise
1794 * efiemu/modules/i386: likewise
1795 * efiemu/modules/i386/pc: likewise
1796 * efiemu/modules/acpi.c: likewise
1797 * efiemu/i386/pc/cfgtables.c: likewise
1798 * efiemu/i386/loadcore64.c: likewise
1799 * efiemu/i386/loadcore32.c: likewise
1800 * efiemu/prepare64.c: likewise
1801 * efiemu/loadcore.c: likewise
1802 * efiemu/symbols.c: likewise
1803 * efiemu/mm.c: likewise
1804 * efiemu/loadcore32.c: likewise
7dd4a573 1805
18062009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1807
1808 ACPI spoofing
1809
1810 * commands/acpi.c: new file
1811 * commands/i386/pc/acpi.c: likewise
1812 * commands/efi/acpi.c: likewise
1813 * include/grub/acpi.h: likewise
1814 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1815 (acpi_mod_SOURCES): new variable
1816 (acpi_mod_CFLAGS): likewise
1817 (acpi_mod_LDFLAGS): likewise
1818 * conf/i386-efi.rmk: likewise
1819 * conf/x86_64-efi.rmk: likewise
1820
7dd4a573 18212009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1822
1823 Missing part from mmap patch
1824
1825 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1826 (grub_mmap_unregister)
1827 (grub_mmap_free_and_unregister): use grub_mmap_register
1828
7dd4a573 18292009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1830
1831 Mmap services
1832
1833 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1834 * loader/i386/linux.c (find_mmap_size): likewise
1835 (allocate_pages): likewise
1836 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1837 (grub_fill_multiboot_mmap): likewise
1838 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1839 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1840 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1841 (OPENBSD_MMAP_RESERVED): likewise
1842 * include/grub/i386/pc/memory.h: include grub/memory.h
1843 (grub_lower_mem): removed
1844 (grub_upper_mem): likewise
1845 (GRUB_MACHINE_MEMORY_ACPI): new definition
1846 (GRUB_MACHINE_MEMORY_NVS): likewise
1847 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1848 (GRUB_MACHINE_MEMORY_HOLE): likewise
1849 (grub_machine_mmap_register): likewise
1850 (grub_machine_mmap_unregister): likewise
1851 (grub_machine_get_upper): likewise
1852 (grub_machine_get_lower): likewise
1853 (grub_machine_get_post64): likewise
1854 * include/grub/i386/efi/memory.h: new file
1855 * include/grub/x86_64/efi/memory.h: likewise
1856 * include/grub/efi/memory.h: likewise
1857 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1858 (mmap_mod_SOURCES): new variable
1859 (mmap_mod_LDFLAGS): likewise
1860 (mmap_mod_ASFLAGS): likewise
1861 * conf/i386-coreboot.rmk: likewise
1862 * conf/i386-ieee1275.rmk: likewise
1863 * conf/i386-efi.rmk: likewise
1864 * conf/x86_64-efi.rmk: likewise
1865 * include/grub/types.h (UINT_TO_PTR): new macro
1866 (PTR_TO_UINT32): likewise
1867 (PTR_TO_UINT64): likewise
1868 * include/grub/memory.h: new file
1869 * mmap/i386/pc/mmap.c: likewise
1870 * mmap/i386/pc/mmap_helper.S: likewise
1871 * mmap/i386/uppermem.c: likewise
1872 * mmap/mmap.c: likewise
1873 * mmap/efi/mmap.c: likewise
7dd4a573 1874 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 1875 grub_upper_mem
1876 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1877 (grub_upper_mem): likewise
1878 (grub_machine_init): don't use grub_upper_mem,
1879 make grub_lower_mem local
1880 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1881 grub_mmap_iterate and grub_mmap_get_upper
1882 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1883
d558e6b5 18842009-05-02 Bean <bean123ch@gmail.com>
1885
1886 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1887 script/sh/parser.y.
1888 (pkglib_MODULES): Add normal.mod and sh.mod.
1889 (normal_SOURCES): New variable.
1890 (normal_mod_CFLAGS): Likewise.
1891 (normal_mod_LDFLAGS): Likewise.
1892 (sh_mod_SOURCES): Likewise.
1893 (sh_mod_CFLAGS): Likewise.
1894 (sh_mod_LDFLAGS): Likewise.
1895
1896 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1897 script/sh/lexer.c_DEPENDENCIES.
1898 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1899 kern/rescue_reader.c and kern/rescue_parser.c.
1900 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1901 (grub_emu_SOURCES): Change source files.
1902 (pkglib_MODULES): Remove normal.mod.
1903 (normal_SOURCES): Removed.
1904 (normal_mod_CFLAGS): Likewise.
1905 (normal_mod_LDFLAGS): Likewise.
1906 * conf/i386-coreboot.rmk: Likewise.
1907 * conf/i386-efi.rmk: Likewise.
1908 * conf/i386-ieee1276.rmk: Likewise.
1909 * conf/powerpc-ieee1275.rmk: Likewise.
1910 * conf/sparc64-ieee1275.rmk: Likewise.
1911 * conf/x86_64-efi.rmk: Likewise.
1912
1913 * include/grub/command.h (grub_command_execute): New inline function.
1914
1915 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1916
1917 * include/grub/normal.h: Remove <grub/setjmp.h>.
1918 (grub_fs_module_list): Moved to normal/autofs.c.
1919 (grub_exit_env): Removed.
1920 (grub_command_execute): Likewise.
1921 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1922 parameter script.
1923 (read_command_list): New function declaration.
1924 (read_fs_list): Likewise.
1925
1926 * include/parser.h: Include <grub/reader.h>.
1927 (grub_parser_split_cmdline): Change type of getline parameter.
1928 (grub_parser): New structure.
1929 (grub_parser_class): New variable.
1930 (grub_parser_execute): New function declaration.
1931 (grub_register_rescue_parser): Likewise.
1932 (grub_parser_register): New inline function.
1933 (grub_parser_unregister): Likewise.
1934 (grub_parser_get_current): Likewise.
1935 (grub_parser_set_current): Likewise.
1936
1937 * include/grub/reader.h: New file.
1938 * kern/reader.c: Likewise.
1939 * kern/rescue_parser.c: Likewise.
1940 * kern/rescue_reader.c: Likewise.
1941 * normal/autofs.c: Likewise.
1942 * normal/dyncmd.c: Likewise.
1943
1944 * include/grub/rescue.h: Removed.
1945 * normal/command.h: Likewise.
1946
1947 * include/grub/script.h: Moved to ...
1948 * include/grub/script_sh.h: ... Moved here.
1949 * normal/execute.c: Moved to ...
1950 * script/sh/execute.c: ... Moved here.
1951 * normal/function.c: Moved to ...
1952 * script/sh/function.c: ... Moved here.
1953 * normal/lexer.c: Moved to ...
1954 * script/sh/lexer.c: ... Moved here.
1955 * normal/parser.y: Moved to ...
1956 * script/sh/parser.y: ... Moved here.
1957 * normal/script.c: Moved to ...
1958 * script/sh/script.c: ... Moved here.
1959
1960 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1961 <grub/reader.h>.
1962 (grub_exit_env): Removed.
1963 (fs_module_list): Moved to normal/autofs.c.
1964 (grub_file_getline): Don't handle comment here.
1965 (free_menu): Skip removed field entry->commands.
1966 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1967 script parameter.
1968 (read_config_file): Removed nested parameter, change getline function.
1969 (grub_enter_normal_mode): Removed.
1970 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1971 (read_command_list): Likewise.
1972 (autoload_fs_module): Moved to normal/autofs.c.
1973 (read_fs_list): Likewise.
1974 (reader_nested): New variable.
1975 (grub_normal_execute): Run parser.sh to switch to sh parser.
1976 (grub_cmd_rescue): Removed.
1977 (cmd_normal): Removed.
1978 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1979 rescue command.
1980 (grub_cmdline_run): New function.
1981 (grub_normal_reader_init): Likewise.
1982 (grub_normal_read_line): Likewise.
1983 (grub_env_write_pager): Likewise.
1984 (cmdline): New variable.
1985 (grub_normal_reader): Likewise.
1986 (GRUB_MOD_INIT): Register normal reader and set as current, register
1987 pager hook, register normal command with grub_register_command_prio,
1988 so that it won't show up in command.lst.
1989 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1990 grub_fs_autoload_hook.
1991
1992 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1993 (grub_menu_execute_entry): Replace grub_script_execute with
1994 grub_parser_execute, change parameter to grub_command_execute.
1995
1996 * normal/menu_text.c: Remove <grub/script.h>.
1997
1998 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1999 and <grub/parser.h>.
2000 (run): Change editor_getline to use new parser interface. Change
2001 parameter to grub_command_execute.
2002
2003 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2004 <grub/reader.h> and <grub/parser.h>.
2005 (grub_load_normal_mode): Execute normal command.
2006 (grub_main): Call grub_register_core_commands,
2007 grub_register_rescue_parser and grub_register_rescue_reader, use
2008 grub_reader_loop to enter input loop.
2009
7dd4a573 2010 * kern/parser.c (grub_parser_split_cmdline): Change type of
2011 getline parameter.
d558e6b5 2012 (grub_parser_class): New variable.
2013 (grub_parser_execute): New function.
2014
2015 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2016 * loader/multiboot2.c: Likewise.
2017 * loader/sparc64/ieee1275/linux.c: Likewise.
2018
2019 * util/grub-emu.c (read_command_list): New dummy function.
2020
18db813d 20212009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2022
2023 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2024 count to 16 for CCISS and IDA.
2025
6c67de15 20262009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2027
2028 * normal/menu_text.c (grub_wait_after_message): Print a newline
2029 after waiting for user input.
2030
2031 * loader/i386/linux.c: Include `<grub/normal.h>'.
2032 (grub_cmd_linux): Improve the error message about `ask' mode, by
2033 waiting for user input so it's not missed (we can do this, since
2034 user requested interaction).
2035
d9dc87b0 20362009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2037
2038 Added missing lst to grub-mkrescue
2039
2040 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2041 and ${input_dir}/parttool.lst
2042
ac8a2baa 20432009-04-30 David S. Miller <davem@davemloft.net>
2044
ad22a610 2045 * util/hostdisk.c (device_is_wholedisk): New function.
2046 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2047 zero only if device_is_wholedisk() returns true.
2048
6966215d 2049 * util/hostdisk.c (convert_system_partition_to_system_disk):
2050 Handle virtual disk devices named /dev/vdiskX as found on sparc
2051 and powerpc.
2052
ac8a2baa 2053 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2054 lettered partition specifier is found, convert to numbered.
2055
979b4fb4 20562009-04-29 David S. Miller <davem@davemloft.net>
2057
e2bf39b2 2058 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2059 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2060
3c64e104 2061 * normal/command.c: Add missing newline at end of file.
2062
979b4fb4 2063 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2064 warnings.
2065 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2066 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2067 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2068 ihandles have a 32-bit type but need to be stored in a "void *".
2069
136d9f82 20702009-04-28 Pavel Roskin <proski@gnu.org>
2071
9459c306 2072 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2073 not disk. Adjust all dependencies.
2e08a26a 2074 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 2075 grub_disk_close().
2076
136d9f82 2077 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2078 parent's partition, don't copy it by reference, as it gets freed
2079 on close.
2080
7dd4a573 20812009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 2082
2083 Preboot hooks support
2084
2085 * commands/boot.c (struct grub_preboot_t): new declaration
2086 (preboots_head): new variable
2087 (preboots_tail): likewise
2088 (grub_loader_register_preboot_hook): new function
2089 (grub_loader_unregister_preboot_hook): likewise
2090 (grub_loader_set): launch preboot hooks
2091 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2092 (grub_loader_register_preboot_hook): new declaration
2093 (grub_loader_unregister_preboot_hook): likewise
2094
5af922b5 20952009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2096
2097 Warning fix
2098
7dd4a573 2099 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 2100 calling grub_dprintf
2101
a5562c30 21022009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2103
2104 Bug and warning fixes
2105
7dd4a573 2106 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 2107 declaration
2108 * commands/test.c (test_parse): fixed bug with file tests and corrected
2109 declaration of find_file
2110
4006f85c 21112009-04-26 Pavel Roskin <proski@gnu.org>
2112
2113 * Makefile.in: Don't install empty manual pages if help2man is
2114 missing. Use help2man option for output, not shell redirection.
2115
5c77c3de 21162009-04-26 David S. Miller <davem@davemloft.net>
2117
2118 * util/grub-mkdevicemap.c (make_device_map): Add missing
2119 NESTED_FUNC_ATTR to process_device().
2120
033b10a8 21212009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2122
2123 Test command
2124
2125 * commands/test.c: rewritten to use bash-like test
2126
e4343593 21272009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2128
2129 Parttool autoloading and improvements
2130
7dd4a573 2131 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 2132 (parttool.lst): new target
2133 * genmk.rb: generate parttool-*
2134 (CLEANFILES): add #{parttool}
2135 (PARTTOOLFILES): new variable
2136 * genparttoollist.sh: new file
7dd4a573 2137 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 2138 (grub_pcpart_type): likewise
2139 * commands/parttool.c (helpmsg): new variable
2140 (grub_cmd_parttool): output help if not enough arguments are supplied
2141 autoload modules
2142 (GRUB_MOD_INIT(parttool)): use helpmsg
2143
0d312500 21442009-04-24 David S. Miller <davem@davemloft.net>
2145
7dd4a573 2146 Avoiding opening same device multiple times in device iterator.
0d312500 2147
2148 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 2149 and use it to build a list of partitions in iterate_disk() and
0d312500 2150 iterate_partition().
2151
ac20caff 2152 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2153 on disk->data.
2154
0dcf7495 2155 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2156 grub_devalias_iterate() result instead of unconditional 0.
2157 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2158 Also, capture hook return value, either directly or via
2159 grub_children_iterate(), and propagate to caller.
2160 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2161 grub_children_iterate): Return value is now 'int' instead of
2162 'grub_err_t'.
2163 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2164 like a proper iterator, stopping when hooks return non-zero.
2165 (grub_devalias_iterate): Likewise.
2166
c8c08833 21672009-04-23 David S. Miller <davem@davemloft.net>
2168
2169 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2170
f01005a8 21712009-04-22 David S. Miller <davem@davemloft.net>
2172
2173 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2174 is larger than address_cells, use that value for address_cells too.
2175
4e8269da 2176 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2177 IEEE1275_MAX_PATH_LEN): Define.
2178 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2179 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2180 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2181 'devtype'. Explicitly NULL terminate devalias expansion.
2182
a1447506 2183 * util/sparc64/ieee1275/misc.c: New file.
2184 * util/sparc64/ieee1275/grub-setup.c: New file.
2185 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2186 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2187 * util/sparc64/ieee1275/grub-install.in: New file.
2188 * util/ieee1275/ofpath.c: New file.
2189 * util/ieee1275/devicemap.c: New file.
2190 * util/devicemap.c: New file.
2191 * util/deviceiter.c: New file.
2192 * kern/sparc64/ieee1275/init.c: New file.
2193 * include/grub/util/ofpath.h: New file.
2194 * include/grub/util/deviceiter.h: New file.
2195 * util/grub-mkdevicemap.c: Include deviceiter.h.
2196 Implement using grub_util_emit_devicemap_entry and
2197 grub_util_iterate_devices.
2198 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2199 util/devicemap.c into grub-mkdevicemap
2200 * conf/i386-efi.rmk: Likewise.
2201 * conf/i386-ieee1275.rmk: Likewise.
2202 * conf/i386-pc.rmk: Likewise.
2203 * conf/powerpc-ieee1275.rmk: Likewise.
2204 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2205 images and installation utilities. Build kernel as image
2206 instead of as elf binary. Use common rules as much as possible.
2207
7dd4a573 22082009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 2209
2210 Correct GPT definition
2211
7dd4a573 2212 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 2213 of "attrib" member
2214
c6c5219f 22152009-04-19 Felix Zielcke <fzielcke@z-51.de>
2216
2217 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2218
0552ff9f 22192009-04-19 David S. Miller <davem@davemloft.net>
2220
2221 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2222 (grub_rescue_cmd_linux): Rename to...
2223 (grub_cmd_linux): and fix prototype.
2224 (grub_rescue_cmd_initrd): Rename to...
2225 (grub_cmd_initrd): and fix prototype.
2226 (cmd_linux, cmd_initrd): New.
2227 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2228 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2229
d1a282fc 22302009-04-17 Pavel Roskin <proski@gnu.org>
2231
07c5039f 2232 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2233 format.
2234 (grub_ohci_transfer): Likewise.
2235
b012002d 2236 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2237
1bc09c35 2238 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2239 return without a value. Fix inconsistent indentation.
2240
e0ff9126 2241 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2242 match struct grub_fs.
2243
d1a282fc 2244 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2245 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2246 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2247 * commands/lspci.c (grub_lspci_iter): Likewise.
2248
a96df3f2 22492009-04-16 Bean <bean123ch@gmail.com>
2250
2251 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2252 value.
2253
41bb0fe9 22542009-04-15 Pavel Roskin <proski@gnu.org>
2255
2256 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2257 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2258 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2259 definitions.
2260
596c6970 22612009-04-15 Felix Zielcke <fzielcke@z-51.de>
2262
2263 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 2264 that no multiple data or metadata areas are supported and `Unknown
596c6970 2265 metadata header'.
2266
7dd4a573 22672009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 2268
2269 Move loader out of the kernel
2270
2271 * kern/loader.c: moved to ...
2272 * commands/boot.c: ... moved here
2273 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2274 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2275 * include/grub/kernel.h (grub_machine_fini): export
2276 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2277 (grub_loader_set): likewise
2278 (grub_loader_unset): likewise
2279 (grub_loader_boot): likewise
2280 * conf/common.rmk: new module boot.mod
2281 (pkglib_MODULES): add boot.mod
2282 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2283 (grub_emu_SOURCES): likewise
2284 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2285 (grub_emu_SOURCES): likewise
2286 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2287 (grub_emu_SOURCES): likewise
2288 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2289 (grub_emu_SOURCES): likewise
2290 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2291 (grub_emu_SOURCES): likewise
7dd4a573 2292 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2293 (grub_emu_SOURCES): likewise
0d5d5653 2294 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 2295 (grub_emu_SOURCES): likewise
0d5d5653 2296
7dd4a573 22972009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 2298
2299 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 2300
5999d619 2301 * kern/misc.c (grub_itoa): Removed function
2302 (grub_ltoa): likewise
2303 (grub_vsprintf): use grub_lltoa
2304
7dd4a573 23052009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 2306
2307 Restore grub-emu
2308
2309 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2310 * conf/i386-coreboot.rmk: likewise
2311 * conf/i386-ieee1275.rmk: likewise
2312 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2313
20318222 23142009-04-15 Felix Zielcke <fzielcke@z-51.de>
2315
2316 * INSTALL: Add that `./autogen.sh' needs to be run before
2317 `./configure.'.
2318
d05f0df3 23192009-04-14 Bean <bean123ch@gmail.com>
2320
2321 * Makefile.in (pkglib_DATA): Add handler.lst.
2322 (handler.lst): New rule.
2323
2324 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2325 * conf/i386-coreboot.rmk: Likewise.
2326 * conf/i386-ieee1275.rmk: Likewise.
2327 * conf/i386-efi.rmk: Likewise.
2328 * conf/x86_64-efi.rmk: Likewise.
2329 * conf/powerpc-ieee1275.rmk: Likewise.
2330 * conf/sparc64-ieee1275.rmk: Likewise.
2331
2332 * genhandlerlist.sh: New file.
2333
2334 * genmk.rb: Add rules to generate handler.lst.
2335
2336 * include/grub/normal.h (grub_file_getline): New function definition.
2337 (read_handler_list): Likewise.
2338 (free_handler_list): Likewise.
2339
2340 * include/grub/term.h (grub_term_register_input): Add name parameter
2341 for auto generation of handler.lst.
2342 (grub_term_register_output): Likewise.
2343
2344 * normal/handler.c: New file.
2345
2346 * normal/main.c (get_line): Renamed to grub_file_getline.
2347 (read_config_file): Use the newly renamed grub_file_getline.
2348 (read_command_list): Likewise.
2349 (read_fs_list): Likewise.
2350 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2351 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2352
2353 * term/efi/console.c (grub_console_init): Add name parameter for auto
2354 generation of handler.lst.
2355 * term/gfxterm.c: Likewise.
2356 * term/i386/pc/at_keyboard.c: Likewise.
2357 * term/i386/pc/console.c: Likewise.
2358 * term/i386/pc/serial.c: Likewise.
2359 * term/i386/pc/vesafb.c: Likewise.
2360 * term/i386/pc/vga.c: Likewise.
2361 * term/i386/pc/vga_text.c: Likewise.
2362 * term/ieee1275/ofconsole.c: Likewise.
2363 * term/usb_keyboard.c: Likewise.
2364
33c846be 23652009-04-14 Bean <bean123ch@gmail.com>
2366
2367 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2368 properly with null character.
2369
4484e01e 23702009-04-14 Felix Zielcke <fzielcke@z-51.de>
2371
2372 * configure: Remove.
2373 * config.h.in: Likewise.
f93d668e 2374 * stamp-h.in: Likewise.
4484e01e 2375 * DISTLIST: Likewise.
2376 * conf/common.mk: Likewise.
2377 * conf/i386-coreboot.mk: Likewise.
2378 * conf/i386-efi.mk: Likewise.
2379 * conf/i386-ieee1275.mk: Likewise.
2380 * conf/i386.mk: Likewise.
2381 * conf/i386-pc.mk: Likewise.
2382 * conf/powerpc-ieee1275.mk: Likewise.
2383 * conf/sparc64-ieee1275.mk: Likewise.
2384 * conf/x86_64-efi.mk: Likewise.
2385
2386 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2387 develop on GRUB.
2388
7dd4a573 23892009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 2390 David S. Miller <davem@davemloft.net>
2391
2392 * util/hostdisk.c (make_device_name): Fix buffer length
2393 calculations.
2394
e25b5a8c 23952009-04-14 Felix Zielcke <fzielcke@z-51.de>
2396
2397 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2398 <sys/param.h> and <sys/sysctl.h>.
2399 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2400 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2401 opening the device and reset them afterwards.
2402
1f1f580c 24032009-04-13 Pavel Roskin <proski@gnu.org>
2404
2405 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2406 Reported by John Stanley <jpsinthemix@verizon.net>
2407
7ebc2d6b 24082009-04-13 Robert Millan <rmh@aybabtu.com>
2409
2410 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 2411 that name for menuentries when appropriate.
7ebc2d6b 2412
d8ba3667 24132009-04-13 Felix Zielcke <fzielcke@z-51.de>
2414
2415 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2416
cba416eb 24172009-04-13 Robert Millan <rmh@aybabtu.com>
2418
2419 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2420 to Linux, simply abort telling the user it's no longer supported.
2421
a547a745 24222009-04-13 Felix Zielcke <fzielcke@z-51.de>
2423
2424 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 2425 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 2426 `freebsd_loadenv' only when devices.hints exist.
2427
232a769c 24282009-04-13 Pavel Roskin <proski@gnu.org>
2429
2430 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2431
c3012039 24322009-04-13 Felix Zielcke <fzielcke@z-51.de>
2433
2434 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2435 partition number.
2436 (grub_drive): Likewise.
2437
234022fe 24382009-04-13 David S. Miller <davem@davemloft.net>
2439
2440 * kern/sparc64/ieee1275/ieee1275.c: New file.
2441 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2442 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2443 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2444 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2445 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2446 grub_ieee1275_alloc_physmem): Declare new exported functions.
2447
d8e1836c 2448 * include/grub/sparc64/ieee1275/loader.h: New file.
2449 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2450 * include/grub/sparc64/kernel.h: Likewise.
2451 * loader/sparc64/ieee1275/linux.c: Likewise.
2452
96bd81ec 2453 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2454 (grub_fstest_SOURCES): Likewise.
2455
6a4737e5 2456 * util/hostdisk.c (make_device_name): Do not make any assumptions
2457 about the length of drive names.
2458
1d7a72fd 2459 * kern/dl.c (grub_dl_load_file): Close file immediately when
2460 we are done using it.
2461
56bc2471 24622009-04-12 David S. Miller <davem@davemloft.net>
2463
2464 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2465 values. Noticed by Pavel Roskin.
2466
df38d0bb 2467 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2468 target compiler.
7dd4a573 2469
e382e93a 2470 * genmk.rb: Add more flexible image type specification, also
2471 pass --strip-unneeded to objcopy.
2472 * conf/i386-pc.rmk: Use *_FORMAT.
2473 * conf/i386-pc.mk: Rebuilt.
2474
f5dbbca9 2475 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2476 (OFDISK_HASH_SZ): Define.
2477 (ofdisk_hash): New hash table.
2478 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2479 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2480 instead of device phandle which is not unique.
2481
91c88b12 2482 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2483 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2484 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2485 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2486 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2487 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2488 GRUB_KERNEL_MACHINE_DATA_END): Define.
2489 (grub_kernel_image_size, grub_total_module_size): Declare.
2490
5b5d4aa5 24912009-04-12 Pavel Roskin <proski@gnu.org>
2492
7dd4a573 2493 * configure.ac: Change the logic when we check for target tools.
2494 Do it when the target is specified and it's different from the
2495 specified value of the host.
5b5d4aa5 2496
c91e1793 24972009-04-11 Felix Zielcke <fzielcke@z-51.de>
2498
2499 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2500 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2501 GNU/kFreeBSD. Check if a device is a character device. Use
2502 DIOCGMEDIASIZE to get the size.
2503 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2504 support for GNU/kFreeBSD.
2505 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2506 is a character device instead of a block device. Add support for
2507 FreeBSD device names.
2508
2509 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2510 is a character device instead of a block device.
2511
2512 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2513 is a character device instead of a block device.
2514
b1ac8644 25152009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2516
2517 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2518 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2519 FreeBSD. Check if a device is a character device. Use
2520 DIOCGMEDIASIZE to get the size.
2521 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2522 support for FreeBSD.
2523 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2524 is a character device instead of a block device. Add support for
2525 FreeBSD device names.
2526
2527 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2528 a character device instead of a block device.
2529 (grub_util_check_char_device): New function.
2530
2531 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2532 a character device instead of a block device.
2533
2534 * include/grub/util/getroot.h (grub_util_check_char_device): New
2535 prototype.
2536
a3f7515a 25372009-04-11 David S. Miller <davem@davemloft.net>
2538
2539 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2540 static libgcc.
2541 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2542 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2543 function, if present.
2544 (__bswapdi2): Likewise.
2545
0d44993d 2546 * include/grub/sparc64/ieee1275/boot.h: New file.
2547 * boot/sparc64/ieee1275/boot.S: Likewise.
2548 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2549
ed3d2bc2 2550 * kern/misc.c (grub_ltoa): New function.
2551 (grub_vsprintf): Use it to format 'long' integers.
2552
d3bfb59c 25532009-04-10 David S. Miller <davem@davemloft.net>
2554
2555 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2556 slots are of type grub_ieee1275_cell_t.
2557 (grub_nand_read): Likewise.
2558 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2559 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2560 macros are used to compare values in arg/ret block of the call.
2561 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2562 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2563 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2564 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2565 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2566 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2567 grub_ieee1275_close, grub_ieee1275_set_property,
2568 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2569 grub_ieee1275_cell_t.
2570 * kern/ieee1275/openfw.c (grub_map): Likewise.
2571 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2572 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2573
450e2238 2574 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2575 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2576 (grub_devalias_iterate): Likewise.
2577
7dd4a573 25782009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 2579
2580 UFS improvements
2581
2582 * fs/ufs.c (INODE_NBLOCKS): new definition
2583 (struct grub_ufs_dirent): added fields for non-BSD dirents
2584 (grub_ufs_get_file_block): fixed double indirect handling
2585 (grub_ufs_lookup_symlink): use more robust way to determine whether
2586 symlink is inline
2587 (grub_ufs_find_file): support for non-BSD dirents
2588 (grub_ufs_dir): support for non-BSD dirents
2589
e7e6862a 25902009-04-10 Bean <bean123ch@gnail.com>
2591
2592 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2593 attribute, otherwise the size would be wrong for i386 platform.
2594
2595 * include/grub/pci.h (grub_pci_read_word): New inline function.
2596 (grub_pci_read_byte): Likewise.
2597 (grub_pci_write): Likewise.
2598 (grub_pci_write_word): Likewise.
2599 (grub_pci_write_byte): Likewise.
2600
2601 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2602
2603 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2604 (find_framebuf): Scan pci to locate the frame buffer address.
2605
2606 * commands/efi/fixvideo.c: New file.
2607
2608 * commands/efi/loadbios.c: Likewise.
2609
2610 * commands/memrw.c: Likewise.
2611
2612 * util/grub-dumpbios.in: Likewise.
2613
2614 * conf/common.rmk (grub-dumpbios): New utility.
2615 (pkglib_MODULES): New module memrw.mod.
2616 (memrw_mod_SOURCE): New macro.
2617 (memrw_mod_CFLAGS): Likewise.
2618 (memrw_mod_LDFLAGS): Likewise.
2619
7dd4a573 2620 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2621 fixvideo.mod.
2622 (loadbios_mod_SOURCE): New macro.
2623 (loadbios_mod_CFLAGS): Likewise.
2624 (loadbios_mod_LDFLAGS): Likewise.
2625 (fixvideo_mod_SOURCE): Likewise.
2626 (fixvideo_mod_CFLAGS): Likewise.
2627 (fixvideo_mod_LDFLAGS): Likewise.
2628
7dd4a573 2629 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2630 fixvideo.mod.
2631 (loadbios_mod_SOURCE): New macro.
2632 (loadbios_mod_CFLAGS): Likewise.
2633 (loadbios_mod_LDFLAGS): Likewise.
2634 (fixvideo_mod_SOURCE): Likewise.
2635 (fixvideo_mod_CFLAGS): Likewise.
2636 (fixvideo_mod_LDFLAGS): Likewise.
2637
af63ada2 26382009-04-08 Felix Zielcke <fzielcke@z-51.de>
2639
2640 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2641
c2cdde70 26422009-04-07 David S. Miller <davem@davemloft.net>
2643
2644 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2645 support for R_SPARC_OLO10 relocations. Fix compile warning for
2646 R_SPARC_WDISP30 case.
ea3f72cf 2647 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2648
761319cf 26492009-04-06 Pavel Roskin <proski@gnu.org>
2650
1007d1f5 2651 * include/grub/misc.h (ARRAY_SIZE): New macro.
2652 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2653 New macro.
2654 * loader/i386/linux.c (allocate_pages): Use free_pages().
2655 (grub_linux_unload): Don't use free_pages().
2656 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2657 wrong index. Treat all other modes as text modes.
2658 (grub_cmd_linux): Initialize vid_mode unconditionally to
2659 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2660
761319cf 2661 * commands/help.c (print_command_help): Use cmd->prio, not
2662 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2663
ea761d40 26642009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2665
ea761d40 2666 Parttool
2667
2668 * parttool/pcpart.c: new file
2669 * commands/parttool.c: likewise
2670 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2671 (parttool_mod_SOURCES): new variable
2672 (parttool_mod_CFLAGS): likewise
2673 (parttool_mod_LDFLAGS): likewise
2674 (pcpart_mod_SOURCES): likewise
2675 (pcpart_mod_CFLAGS): likewise
2676 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2677 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2678 and parttool/pcpart.c
2679 * conf/i386-efi.rmk: likewise
2680 * conf/i386-ieee1275.rmk: likewise
2681 * conf/i386-pc.rmk: likewise
2682 * conf/powerpc-ieee1275.rmk: likewise
2683 * conf/sparc64-ieee1275.rmk: likewise
2684 * conf/x86_64-ieee1275.rmk: likewise
2685
05aaebfb 26862009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2687
2688 Support for mtime and further expandability of dir command
2689
2690 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2691 * include/grub/datetime.h: ... moved here and added
05aaebfb 2692 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2693 * include/grub/fs.h: new syntax for dir and mtime functions in
2694 struct grub_fs
05aaebfb 2695 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2696 and GRUB_FSHELP_FLAGS_MASK
2697 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2698 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2699 (grub_ext2_mtime): new function
2700 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2701 (grub_hfsplus_mtime): new function
2702 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2703 (GRUB_UFS_ATTR_FILE): likewise
2704 (GRUB_UFS_ATTR_LNK): likewise
2705 (struct grub_ufs_sblock): new fields mtime
2706 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2707 all users updated
2708 (grub_ufs_dir): mtime support
2709 (grub_ufs_mtime): new function
2710 * fs/affs.c (grub_affs_dir): use new dir syntax
2711 * fs/afs.c (grub_afs_dir): likewise
2712 * fs/cpio.c (grub_cpio_dir): likewise
2713 * fs/fat.c (grub_fat_find_dir): likewise
2714 * fs/hfs.c (grub_hfs_dir): likewise
2715 * fs/iso9660.c (grub_iso9660_dir): likewise
2716 * fs/jfs.c (grub_jfs_dir): likewise
2717 * fs/minix.c (grub_minix_dir): likewise
2718 * fs/ntfs.c (grub_ntfs_dir): likewise
2719 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2720 * fs/sfs.c (grub_sfs_dir): likewise
2721 * fs/xfs.c (grub_xfs_dir): likewise
2722 * util/hostfs.c (grub_hostfs_dir): likewise
2723 * lib/datetime.c: moved to ...
2724 * normal/datetime.c: ... moved here
2725 (grub_unixtime2datetime): new function
2726 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2727 * normal/completion.c (iterate_dir): use new dir syntax
2728 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2729 last modification time of a volume
7dd4a573 2730 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2731 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2732 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2733 (normal_mod_SOURCES): likewise
2734 (datetime_mod_SOURCES): Removed lib/datetime.c
2735 * conf/i386-efi.rmk: likewise
7dd4a573 2736 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2737 * conf/i386-pc.rmk: likewise
2738 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2739 * conf/sparc64-ieee1275.rmk: likewise
2740 * conf/x86_64-efi.rmk: likewise
05aaebfb 2741
8a7e1a14 27422009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2743
2744 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2745
2746 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2747 on grub_fat_find_dir
2748 (grub_fat_find_dir): use grub_fat_iterate_dir
2749 (grub_fat_label): likewise
2750
04186a9c 27512009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2752
7dd4a573 2753 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2754 and command.h
2755 remove extraneous kernel_elf_HEADERS
2756
da4c0bb6 27572009-04-04 Bean <bean123ch@gnail.com>
2758
2759 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2760
2761 * util/misc.c: Likewise.
2762
54ad9555 27632009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2764
2765 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2766 instead of grub_printf.
2767
7a6bf9f2 27682009-04-03 Robert Millan <rmh@aybabtu.com>
2769
2770 * loader/i386/linux.c (grub_linux_setup_video): Fill
2771 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2772 values from `mode info' structure instead of hardcoded
2773 values.
2774
3fcc2083 27752009-04-01 Pavel Roskin <proski@gnu.org>
2776
2777 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2778 unused now.
2779 * genmk.rb: Likewise.
2780 * configure.ac: Likewise.
2781
5ec9740b 27822009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2783
2784 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2785 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2786
5270cec8 27872009-04-01 David S. Miller <davem@davemloft.net>
2788
2789 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2790 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2791 (grub_setjmp): Mark with 'returns_twice' attribute.
2792 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2793 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2794 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2795
9c3dd854 27962009-04-01 Robert Millan <rmh@aybabtu.com>
2797
2798 Reapply fix from 2008-07-28 which was accidentally reverted; also
2799 perform the same fix to a similar check in same function.
2800
2801 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2802 with the same number are found, just use issue a warning with
2803 grub_dprintf(), as this error has been reported to be non-fatal.
2804
0d818b7e 28052009-03-31 Pavel Roskin <proski@gnu.org>
2806
2807 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2808 for cross-compilation.
2809
95646d92 28102009-03-30 Robert Millan <rmh@aybabtu.com>
2811
2812 Fix i386-ieee1275 build.
2813
2814 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2815 Remove declaration.
2816
6a003ed1 28172009-03-30 Pavel Roskin <proski@gnu.org>
2818
2819 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2820 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2821 zero-terminated, rely only on the strlen value. Fix comparison
2822 of strings differing in length.
2823
92f33540 28242009-03-30 Robert Millan <rmh@aybabtu.com>
2825
2826 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2827 checking for abi version. Improve error messages on BIOS to notify
2828 user about `linux16' command.
2829
a8c48fd5 28302009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2831
f968172e 2832 Leak fixes
a8c48fd5 2833
f968172e 2834 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2835 in case of collision
2836 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2837
9c323f09 28382009-03-29 Robert Millan <rmh@aybabtu.com>
2839
2840 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2841 set `vid_mode' accordingly.
2842 (grub_linux_boot): Process `vid_mode' and set video mode.
2843
ae68f423 28442009-03-29 Robert Millan <rmh@aybabtu.com>
2845
2846 * util/grub.d/10_linux.in (linux_entry): New function.
2847 Factorize generation of Linux boot entries.
2848
5709cfc4 28492009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2850
2851 Make the format of Environment Block plain text. The boot loader
2852 part is not tested well yet.
7dd4a573 2853
5709cfc4 2854 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2855 (buffer): Removed.
2856 (envblk): Likewise.
2857 (usage): Remove "info" and "clear". Add "unset". Update the
2858 description of "set", as this does not delete variables any
2859 longer.
2860 (create_envblk_file): Complete rewrite.
2861 (open_envblk_file): Likewise.
2862 (cmd_info): Removed.
2863 (cmd_list): Likewise.
2864 (cmd_set): Likewise.
2865 (cmd_clear): Likewise.
2866 (list_variables): New function.
2867 (write_envblk): Likewise.
2868 (set_variables): Likewise.
2869 (unset_variables): Likewise.
2870 (main): Complete rewrite.
2871
2872 * commands/loadenv.c (buffer): Removed.
2873 (envblk): Likewise.
2874 (open_envblk_file): New function.
2875 (read_envblk_file): Complete rewrite.
2876 (grub_cmd_load_env): Likewise.
2877 (grub_cmd_list_env): Likewise.
2878 (struct blocklist): New struct.
2879 (free_blocklists): New function.
2880 (check_blocklists): Likewise.
2881 (write_blocklists): Likewise.
2882 (grub_cmd_save_env): Complete rewrite.
2883
2884 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2885 a plain text signature.
2886 (GRUB_ENVBLK_MAXLEN): Removed.
2887 (struct grub_envblk): Complete rewrite.
2888 (grub_envblk_find): Removed.
2889 (grub_envblk_insert): Likewise.
2890 (grub_envblk_open): New prototype.
2891 (grub_envblk_set): Likewise.
2892 (grub_envblk_delete): Put const to VALUE.
2893 (grub_envblk_iterate): Put const to NAME and VALUE.
2894 (grub_envblk_close): New prototype.
2895 (grub_envblk_buffer): New inline function.
2896 (grub_envblk_size): Likewise.
2897
2898 * lib/envblk.c: Include grub/mm.h.
2899 (grub_env_find): Removed.
2900 (grub_envblk_open): New function.
2901 (grub_envblk_close): Likewise.
2902 (escaped_value_len): Likewise.
2903 (find_next_line): Likewise.
2904 (grub_envblk_insert): Removed.
2905 (grub_envblk_set): New function.
2906 (grub_envblk_delete): Complete rewrite.
2907 (grub_envblk_iterate): Likewise.
2908
a9368fd3 29092009-03-28 Robert Millan <rmh@aybabtu.com>
2910
2911 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2912 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2913 variables. Use 16-bit loader.
2914 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2915 loader.
2916 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2917 (grub_linux16_boot): ... this. Update all users.
2918 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2919 (grub_linux_boot): ... this. Update all users.
2920
2921 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2922 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2923 commands to `linux16' and `initrd16'.
2924 (GRUB_MOD_FINI(linux)): Rename to ...
2925 (GRUB_MOD_FINI(linux16)): ... this.
2926
e4dd5a7e 29272009-03-24 Pavel Roskin <proski@gnu.org>
2928
2929 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2930 not just for compilation.
2931
c04d6e05 29322009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2933
2934 Move multiboot helper out of kernel
2935
2936 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2937 `loader/i386/multiboot_helper.S'.
2938 * conf/i386-coreboot.rmk: Likewise
2939 * conf/i386-ieee1275.rmk: Likewise
2940
2941 * kern/i386/loader.S: Move multiboot helpers from here...
2942 * loader/i386/multiboot_helper.S: ...moved here
2943 * include/grub/i386/loader.h: Move declarations of multiboot
2944 helpers from here...
2945 * include/grub/i386/multiboot.h: ...moved here
2946 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2947
42a5b3fc 29482009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2949
2950 * kern/env.c (grub_env_context_open): Added an argument to specify
2951 whether a new context inherits exported variables from current
2952 one. This is useful when making a sandbox to interpret a config
2953 file.
2954 All callers updated.
2955
2956 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2957
b28bbc4e 29582009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2959
2960 * kern/env.c (grub_env_context_close): Fix memory leaks.
2961
f04f02e4 29622009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2963
2964 * normal/main.c (grub_normal_execute): Added an argument
2965 BATCH to specify if an interactive interface should be provided
2966 after reading a config file.
2967 All callers updated.
2968 (read_command_list): Prevent being executed twice.
2969 (read_fs_list): Likewise.
2970
42a5b3fc 2971 * include/grub/normal.h (grub_normal_execute): Updated the
2972 prototype.
f04f02e4 2973
41473ac2 29742009-03-22 Pavel Roskin <proski@gno.org>
2975
fbc00b0c 2976 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2977 _start.
2978 * kern/i386/pc/startup.S: Likewise.
2979 * kern/i386/efi/startup.S: Likewise.
2980 * kern/i386/ieee1275/startup.S: Likewise.
2981 * kern/i386/coreboot/startup.S: Likewise.
2982 * kern/x86_64/efi/startup.S: Likewise.
2983
41473ac2 2984 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2985 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2986 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2987
2274cc8f 29882009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2989
2990 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2991
2992 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2993 limit detection.
2994 Use vaddr of correct segment for entry_point.
2995
b1b797cb 29962009-03-21 Bean <bean123ch@gmail.com>
2997
2998 * commands/blocklist.c: Add include file <grub/command.h>, remove
2999 <grub/normal.h> and <grub/arg.h>.
3000 (grub_cmd_blocklist): Use the new command interface.
3001 (GRUB_MOD_INIT): Likewise.
3002 (GRUB_MOD_FINI): Likewise.
3003 * commands/boot.c: Likewise.
3004 * commands/cat.c: Likewise.
3005 * commands/cmp.c: Likewise.
3006 * commands/configfile.c: Likewise.
3007 * commands/crc.c: Likewise.
3008 * commands/echo.c: Likewise.
3009 * commands/halt.c: Likewise.
3010 * commands/handler.c: Likewise.
3011 * commands/hdparm.c: Likewise.
3012 * commands/help.c: Likewise.
3013 * commands/hexdump.c: Likewise.
3014 * commands/loadenv.c: Likewise.
3015 * commands/ls.c: Likewise.
3016 * commands/lsmmap.c: Likewise.
3017 * commands/lspci.c: Likewise.
3018 * commands/loadenv.c: Likewise.
3019 * commands/read.c: Likewise.
3020 * commands/reboot.c: Likewise.
3021 * commands/search.c: Likewise.
3022 * commands/sleep.c: Likewise.
3023 * commands/test.c: Likewise.
3024 * commands/usbtest.c: Likewise.
3025 * commands/videotest.c: Likewise.
3026 * commands/i386/cpuid.c: Likewise.
3027 * commands/i386/pc/halt.c: Likewise.
3028 * commands/i386/pc/play.c: Likewise.
3029 * commands/i386/pc/pxecmd.c: Likewise.
3030 * commands/i386/pc/vbeinfo.c: Likewise.
3031 * commands/i386/pc/vbetest.c: Likewise.
3032 * commands/ieee1275/suspend.c: Likewise.
3033 * disk/loopback.c: Likewise.
3034 * font/font_cmd.c: Likewise.
3035 * hello/hello.c: Likewise.
3036 * loader/efi/appleloader.c: Likewise.
3037 * loader/efi/chainloader.c: Likewise.
3038 * loader/i386/bsd.c: Likewise.
3039 * loader/i386/efi/linux.c: Likewise.
3040 * loader/i386/ieee1275/linux.c: Likewise.
3041 * loader/i386/linux.c: Likewise.
3042 * loader/i386/pc/chainloader.c: Likewise.
3043 * loader/i386/pc/linux.c: Likewise.
3044 * loader/powerpc/ieee1275/linux.c: Likewise.
3045 * loader/multiboot_loader.c: Likewise.
3046 * term/gfxterm.c: Likewise.
3047 * term/i386/pc/serial.c: Likewise.
3048 * term/terminfo.c: Likewise.
3049
3050 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3051 * term/i386/pc/vga.c: Likewise.
3052 * video/readers/jpeg.c: Likewise.
3053 * video/readers/png.c: Likewise.
3054 * video/readers/tga.c: Likewise.
3055
3056 * util/grub-fstest (cmd_loopback): Removed.
3057 (cmd_blocklist): Likewise.
3058 (cmd_ls): Likewise.
3059 (grub_register_command): Likewise.
3060 (grub_unregister_command): Likewise.
3061 (execute_command): Use grub_command_find to locate command and execute
3062 it.
3063
3064 * include/grub/efi/chainloader.h: Removed.
3065 * loader/efi/chainloader_normal.c: Likewise.
3066 * loader/i386/bsd_normal.c: Likewise.
3067 * loader/i386/pc/chainloader_normal.c: Likewise.
3068 * loader/i386/pc/multiboot_normal.c: Likewise.
3069 * loader/linux_normal.c: Likewise.
3070 * loader/multiboot_loader_normal.c: Likewise.
3071 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3072
3073 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3074 and grub_register_command_p1.
3075
3076 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3077 kern/command.c, lib/arg.c and commands/extcmd.c.
3078 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3079 (minicmd_mod_SOURCES): New variable.
3080 (minicmd_mod_CFLAGS): Likewise.
3081 (minicmd_mod_LDFLAGS): Likewise.
3082 (extcmd_mod_SOURCES): Likewise.
3083 (extcmd_mod_CFLAGS): Likewise.
3084 (extcmd_mod_LDFLAGS): Likewise.
3085 (boot_mod_SOURCES): Removed.
3086 (boot_mod_CFLAGS): Likewise.
3087 (boot_mod_LDFLAGS): Likewise.
3088
3089 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3090 kern/corecmd.c.
3091 (kernel_img_HEADERS): Add command.h.
3092 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3093 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3094 and lib/arg.c.
3095 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3096 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3097 remove the corresponding normal mode command.
3098 (normal_mod_SOURCES): Remove normal/arg.c.
3099 * conf/i386-coreboot.rmk: Likewise.
3100 * conf/i386-efi.rmk: Likewise.
3101 * conf/i386-ieee1275.rmk: Likewise.
3102 * conf/powerpc-ieee1275.rmk: Likewise.
3103 * conf/x86_64-efi.rmk: Likewise.
3104
3105 * include/grub/arg.h: Move from here ...
3106 * include/grub/lib/arg.h: ... to here.
3107
3108 * normal/arg.c: Move from here ...
3109 * lib/arg.c: ... to here.
3110
3111 * commands/extcmd.c: New file.
3112 * commands/minicmd.c: Likewise.
3113 * include/grub/command.h: Likewise.
3114 * include/grub/extcmd.h: Likewise.
3115 * kern/command.c: Likewise.
3116 * kern/corecmd.c: Likewise.
3117
3118 * kern/list.c (grub_list_iterate): Return int instead of void.
3119 (grub_list_insert): New function.
3120 (grub_prio_list_insert): Likewise.
3121
3122 * kern/rescue.c (grub_rescue_command): Removed.
3123 (grub_rescue_command_list): Likewise.
3124 (grub_rescue_register_command): Likewise.
3125 (grub_rescue_unregister_command): Likewise.
3126 (grub_rescue_cmd_boot): Move to minicmd.c
3127 (grub_rescue_cmd_help): Likewise.
3128 (grub_rescue_cmd_info): Likewise.
3129 (grub_rescue_cmd_boot): Likewise.
3130 (grub_rescue_cmd_testload): Likewise.
3131 (grub_rescue_cmd_dump): Likewise.
3132 (grub_rescue_cmd_rmmod): Likewise.
3133 (grub_rescue_cmd_lsmod): Likewise.
3134 (grub_rescue_cmd_exit): Likewise.
3135 (grub_rescue_print_devices): Moved to corecmd.c.
3136 (grub_rescue_print_files): Likewise.
3137 (grub_rescue_cmd_ls): Likewise.
3138 (grub_rescue_cmd_insmod): Likewise.
3139 (grub_rescue_cmd_set): Likewise.
3140 (grub_rescue_cmd_unset): Likewise.
7d074e3c 3141 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 3142 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 3143 commands, remove grub_rescue_register_command calls.
b1b797cb 3144
7d074e3c 3145 * normal/command.c (grub_register_command): Removed.
b1b797cb 3146 (grub_unregister_command): Likewise.
3147 (grub_command_find): Likewise.
3148 (grub_iterate_commands): Likewise.
3149 (rescue_command): Likewise.
3150 (export_command): Moved to corecmd.c.
3151 (set_command): Removed.
3152 (unset_command): Likewise.
3153 (insmod_command): Likewise.
3154 (rmmod_command): Likewise.
3155 (lsmod_command): Likewise.
3156 (grub_command_init): Likewise.
3157
3158 * normal/completion.c (iterate_command): Use cmd->prio to check for
3159 active command.
3160 (complete_arguments): Use grub_extcmd_t structure to find options.
3161 (grub_normal_do_completion): Change function grub_iterate_commands to
3162 grub_command_iterate.
3163
3164 * normal/execute.c (grub_script_execute_cmd): No need to parse
3165 argument here.
3166
3167 * normal/main.c (grub_dyncmd_dispatcher): New function.
3168 (read_command_list): Register unload commands as dyncmd.
3169 (grub_cmd_normal): Use new command interface, register rescue,
3170 unregister normal at entry, register normal, unregister rescue at exit.
3171
3172 * include/grub/list.h (grub_list_test_t): New type.
3173 (grub_list_iterate): Return int instead of void.
3174 (grub_list_insert): New function.
3175 (GRUB_AS_NAMED_LIST_P): New macro.
3176 (GRUB_AS_PRIO_LIST): Likewise.
3177 (GRUB_AS_PRIO_LIST_P): Likewise.
3178 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3179 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3180 (grub_prio_list): New structure.
3181 (grub_prio_list_insert): New function.
3182 (grub_prio_list_remove): New inline function.
3183
3184 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3185 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3186 (GRUB_COMMAND_FLAG_MENU): Likewise.
3187 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3188 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3189 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3190 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3191 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3192 (grub_command): Likewise.
3193 (grub_register_command): Likewise.
3194 (grub_command_find): Likewise.
3195 (grub_iterate_commands): Likewise.
3196 (grub_command_init): Likewise.
3197 (grub_arg_parse): Likewise.
3198 (grub_arg_show_help): Likewise.
3199
3200 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3201 (grub_rescue_unregister_command): Likewise.
3202
3203 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3204 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3205 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3206
3207 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3208 grub_rescue_cmd_initrd.
3209 * include/grub/i386/loader.h: Likewise.
3210 * include/grub/x86_64/loader.h: Likewise.
3211
3212 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3213
1f4147aa 32142009-03-21 Bean <bean123ch@gmail.com>
3215
3216 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3217 instead of stat in mingw environment.
3218
3219 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3220
3221 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3222
3223 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3224 AC_CONFIG_LINKS.
3225
2156d5ba 32262009-03-21 Bean <bean123ch@gmail.com>
3227
3228 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3229 out of range error.
3230
177b82ca 32312009-03-18 Michel Dänzer <michel@daenzer.net>
3232
3233 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3234 checking inode flags for EXT4_EXTENTS_FLAG.
3235
14aad807 32362009-03-18 Robert Millan <rmh@aybabtu.com>
3237
3238 * loader/i386/linux.c: Include `<grub/video.h>' and
3239 `<grub/i386/pc/vbe.h>'..
3240 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3241 (grub_linux32_boot): Attempt to configure video settings with
3242 grub_linux_setup_video().
3243 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3244 to avoid grub_console_fini() which would step out of graphical mode
3245 unconditionally.
3246
8cf83a27 32472009-03-14 Robert Millan <rmh@aybabtu.com>
3248
3249 Fix build on powerpc.
3250 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3251
40164e75 32522009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3253
3254 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3255 background image command.
3256
c58bc32a 32572009-03-12 Colin D Bennett <colin@gibibit.com>
3258
3259 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3260 (grub_gfxterm_putchar): Extract pairs of identical calls to
3261 draw_cursor out of conditional blocks.
3262
5415144a 32632009-03-11 Pavel Roskin <proski@gnu.org>
3264
3265 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3266 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3267
6394042e 32682009-03-11 Robert Millan <rmh@aybabtu.com>
3269
3270 * loader/i386/multiboot_elfxx.c
3271 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3272
b7b50e5f 32732009-03-11 Felix Zielcke <fzielcke@z-51.de>
3274
3275 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3276 `kern/handler.c'.
3277
1ca7fc96 32782009-03-11 Robert Millan <rmh@aybabtu.com>
3279
3280 * loader/i386/multiboot.c (code_size): New variable.
3281 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 3282 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 3283 4-byte alignment to MBI and others by increasing
7d074e3c 3284 `boot_loader_name_length' appropriately.
1ca7fc96 3285
3286 * loader/i386/multiboot_elfxx.c
3287 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3288
a83ea1d2 32892009-03-09 Felix Zielcke <fzielcke@z-51.de>
3290
3291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3292 `fs/ext2.c'.
3293
aa9f3bff 32942009-03-08 Robert Millan <rmh@aybabtu.com>
3295
3296 Make loader/i386/linux.c usable on i386-pc again.
3297
3298 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3299 memory to heap.
3300 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3301 `#error' stanza.
3302
d8b3b60e 33032009-03-07 Bean <bean123ch@gmail.com>
3304
3305 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3306 allocation.
3307
b362c9e9 33082009-03-06 Robert Millan <rmh@aybabtu.com>
3309
3310 Fix display issue on terminals with screen size other than 80x25
3311 (e.g. gfxterm with resolution higher than 640x480).
3312
3313 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 3314 position relative to the center of the terminal instead of relying
b362c9e9 3315 on a hardcoded offset.
3316
9304eef1 33172009-03-04 Robert Millan <rmh@aybabtu.com>
3318
3319 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3320 installed.
3321
3322 * Makefile.in (host_kernel): New variable.
3323 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3324 scripts instead of just the windows one.
3325 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3326
eabc95fb 33272009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 3328
3329 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3330 `kern/handler.c'.
3331 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3332 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3333 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3334 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3335 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3336 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3337
ceb1223c 33382009-03-04 Felix Zielcke <fzielcke@z-51.de>
3339
3340 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3341 or if there's no space for the disk label and print the partition number on a
3342 invalid magic.
3343
4910684a 33442009-03-04 Felix Zielcke <fzielcke@z-51.de>
3345
3346 * util/misc.c: Include <time.h>.
3347 (grub_millisleep): New function.
3348
7e9ca17a 33492009-03-04 Bean <bean123ch@gmail.com>
3350
3351 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3352 another option -mno-red-zone.
3353
3354 * commands/handler.c: Change module description.
3355
3356 * kern/handler.c: Add missing space at the end of description line.
3357
3358 * kern/list.c: Likewise.
3359
f501677c 33602009-03-03 Robert Millan <rmh@aybabtu.com>
3361
3362 Move more components to the relocation area, and fix mbi pointer
3363 handling to use the destination rather than the origin (thanks to
3364 Vladimir Serbinenko for spotting).
3365
3366 * loader/i386/multiboot.c (mbi_dest): New variable.
3367 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3368 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3369 relocation area.
3370
9902d047 33712009-03-01 Bean <bean123ch@gmail.com>
3372
50fb7002 3373 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 3374 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3375 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3376 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3377
3378 * loader/i386/efi/linux.c (acpi_guid): New variable.
3379 (acpi_guid): Likewise.
3380 (EBDA_SEG_ADDR): New constant.
3381 (LOW_MEM_ADDR): Likewise.
3382 (FAKE_EBDA_SEG): Likewise.
3383 (fake_bios_data): New function.
3384 (grub_linux_boot): Call fake_bios_data.
3385
71b9f361 33862009-03-01 Bean <bean123ch@gmail.com>
3387
3388 * commands/terminal.c: Removed.
3389
3390 * commands/handler.c: New file.
3391
3392 * include/grub/list.h: Likewise.
3393
3394 * include/grub/handler.h: Likewise.
3395
3396 * kern/list.c: Likewise.
3397
3398 * kern/handler.c: Likewise.
3399
3400 * kern/term.h: Include header file <grub/handler.h>.
3401 (grub_term_input): Move next field to the beginning.
3402 (grub_term_output): Likewise.
3403 (grub_term_input_class): New variable.
3404 (grub_term_output_class): Likewise.
3405 (grub_term_register_input): Changed to inline function.
3406 (grub_term_register_output): Likewise.
3407 (grub_term_unregister_input): Likewise.
3408 (grub_term_unregister_output): Likewise.
3409 (grub_term_set_current_input): Likewise.
3410 (grub_term_set_current_output): Likewise.
3411 (grub_term_get_current_input): Likewise.
3412 (grub_term_get_current_output): Likewise.
3413 (grub_term_iterate_input): Removed.
3414 (grub_term_iterate_output): Likewise.
3415
3416 * kern/term.c (grub_term_list_input): Removed.
3417 (grub_term_list_output): Likewise.
3418 (grub_term_input_class): New variable.
3419 (grub_term_output_class): Likewise.
50fb7002 3420 (grub_cur_term_input): Change variable as macro.
71b9f361 3421 (grub_cur_term_output): Likewise.
3422 (grub_term_register_input): Removed.
3423 (grub_term_register_output): Likewise.
3424 (grub_term_unregister_input): Likewise.
3425 (grub_term_unregister_output): Likewise.
3426 (grub_term_set_current_input): Likewise.
3427 (grub_term_set_current_output): Likewise.
3428 (grub_term_iterate_input): Likewise.
3429 (grub_term_iterate_output): Likewise.
3430 (grub_term_get_current_input): Likewise.
3431 (grub_term_get_current_output): Likewise.
3432
3433 * util/grub-editenv.c: Include header file <grub/handler.h>.
3434 (grub_term_get_current_input): Removed.
3435 (grub_term_get_current_output): Likewise.
3436 (grub_term_input_class): New variable.
50fb7002 3437 (grub_term_output_class): Likewise.
71b9f361 3438
3439 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3440 (grub_term_get_current_output): Likewise.
3441 (grub_term_input_class): New variable.
50fb7002 3442 (grub_term_output_class): Likewise.
71b9f361 3443
3444 * util/grub-probe.c (grub_term_get_current_input): Removed.
3445 (grub_term_get_current_output): Likewise.
3446 (grub_term_input_class): New variable.
50fb7002 3447 (grub_term_output_class): Likewise.
71b9f361 3448
3449 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3450 (grub_term_get_current_output): Likewise.
3451 (grub_term_input_class): New variable.
50fb7002 3452 (grub_term_output_class): Likewise.
71b9f361 3453
3454 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3455 (terminal_mod_SOURCES): Likewise.
3456 (terminal_mod_CFLAGS): Likewise.
3457 (terminal_mod_LDFLAGS): Likewise.
3458
3459 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3460 handler.c.
3461 (kernel_img_SOURCES): Add list.c and handler.c.
3462 (kernel_img_HEADERS): Add list.h and handler.h.
3463
3464 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3465 handler.c.
3466 (kernel_mod_SOURCES): Add list.c and handler.c.
3467 (kernel_mod_HEADERS): Add list.h and handler.h.
3468
3469 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3470 handler.c.
3471 (kernel_elf_SOURCES): Add list.c and handler.c.
3472 (kernel_elf_HEADERS): Add list.h and handler.h.
3473
3474 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3475 handler.c.
3476 (kernel_elf_SOURCES): Add list.c and handler.c.
3477 (kernel_elf_HEADERS): Add list.h and handler.h.
3478
3479 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3480 handler.c.
3481 (kernel_mod_SOURCES): Add list.c and handler.c.
3482 (kernel_mod_HEADERS): Add list.h and handler.h.
3483
3484 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3485 handler.c.
3486 (kernel_elf_SOURCES): Add list.c and handler.c.
3487 (kernel_elf_HEADERS): Add list.h and handler.h.
3488
8a31787f 34892009-02-27 Robert Millan <rmh@aybabtu.com>
3490
3491 Factorize elf32 / elf64 code in Multiboot loader. This will
3492 prevent it from getting out of sync again.
3493
3494 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3495 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3496 grub_multiboot_load_elf64): Move from here ...
3497 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3498 grub_multiboot_load_elf): ... to here (new file).
3499
51cd3dfc 35002009-02-27 Robert Millan <rmh@aybabtu.com>
3501
3502 * util/grub.d/10_linux.in: Rename "single-user mode" to
3503 "recovery mode".
3504
6e8c9c3a 35052009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3506
3507 Don't leak in SCSI code.
3508 * disk/scsi.c (grub_scsi_close): free `scsi'.
3509
4b6bf4f9 35102009-02-27 Robert Millan <rmh@aybabtu.com>
3511
3512 * loader/i386/pc/multiboot.c: Move from here ...
3513 * loader/i386/multiboot.c: ... to here. Update all users.
3514
b9413424 35152009-02-27 Robert Millan <rmh@aybabtu.com>
3516
3517 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3518 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3519
50fb7002 35202009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 3521
3522 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3523 b-tree.
3524
8cc50345 35252009-02-27 Robert Millan <rmh@aybabtu.com>
3526
3527 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3528 `0x' qualifier as 0 when base is specified as parameter).
3529
6e09b8b7 35302009-02-24 Bean <bean123ch@gmail.com>
3531
3532 * configure.ac: Check for -mcmodel=large in x86_64 target.
3533
3534 * include/grub/efi/api.h (efi_call_10): New macro.
3535 (efi_wrap_10): New function.
3536
3537 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3538 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3539 (GRUB_PE32_REL_BASED_LOW): Likewise.
3540 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3541 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3542 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3543 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3544 (GRUB_PE32_REL_BASED_REL): Likewise.
3545 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3546 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3547 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3548
3549 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3550 issue.
3551
3552 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3553 (efi_wrap_10): New function.
3554
3555 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3556
3557 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3558 MB/MBP model (NV chipset).
3559 (devdata_devs): Add devpath_5 to the list.
3560
3561 * load/i386/efi/linux.c (video_base): Remove variable.
3562 (RGB_MASK): New macro.
3563 (RGB_MAGIC): Likewise.
3564 (LINE_MIN): Likewise.
3565 (LINE_MAX): Likewise.
3566 (FBTEST_STEP): Likewise.
3567 (FBTEST_COUNT): Likewise.
3568 (fb_list): New variable.
3569 (grub_find_video_card): Remove function.
3570 (find_framebuf): New function.
3571 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3572 line length.
3573
3574 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3575 problem for x86_64.
3576
74b21bee 35772009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3578
3579 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3580
3581 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3582 coding tool name.
3583
a455f472 35842009-02-22 Robert Millan <rmh@aybabtu.com>
3585
3586 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3587 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3588 in our relocation, instead of using it directly from heap. Also
3589 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3590
6374daf3 35912009-02-21 Robert Millan <rmh@aybabtu.com>
3592
3593 Implement USB keyboard support (based on patch by Marco Gerards)
3594
3595 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3596 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3597 (usb_keyboard_mod_LDFLAGS): New variables.
3598
3599 * term/usb_keyboard.c: New file.
3600
8fa4ea70 36012009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3602
3603 Corrected wrong declaration
3604
3605 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3606
353976ac 36072009-02-14 Christian Franke <franke@computer.org>
3608
3609 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3610 (grub_lspci_iter): Print class code and programming interface byte.
3611
6aa1169b 36122009-02-14 Christian Franke <franke@computer.org>
3613
3614 * gendistlist.sh: Ignore `.svn' directories.
3615
265372ca 36162009-02-14 Felix Zielcke <fzielcke@z-51.de>
3617
3618 * fs/fat.c: Add 2009 to Copyright line.
3619
9ff516f3 36202009-02-14 Christian Franke <franke@computer.org>
3621
3622 * commands/hdparm.c: New file. Provides `hdparm' command
3623 which sends ATA commands via grub_disk_ata_pass_through ().
3624
3625 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3626
3627 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3628 and <grub/cpu/io.h> to include/grub/ata.h.
3629 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3630 (GRUB_CDROM_SECTOR_SIZE): Remove.
3631 (GRUB_ATA_*): Move to include/grub/ata.h.
3632 (GRUB_ATAPI_*): Likewise.
3633 (enum grub_ata_commands): Likewise.
3634 (enum grub_ata_timeout_milliseconds): Likewise.
3635 (struct grub_ata_device): Likewise.
3636 (grub_ata_regset): Likewise.
3637 (grub_ata_regget): Likewise.
3638 (grub_ata_regset2): Likewise.
3639 (grub_ata_regget2): Likewise.
3640 (grub_ata_check_ready): Likewise.
3641 (grub_ata_wait_not_busy): Remove static, exported in
3642 include/grub/ata.h.
3643 (grub_ata_wait_drq): Likewise.
3644 (grub_ata_pio_read): Likewise.
3645
3646 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3647 function for hdparm.mod.
3648
3649 * include/grub/ata.h: New file, contains declarations from
3650 disk/ata.c.
3651 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3652
3653 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3654 (grub_disk_ata_pass_through): New exported variable.
3655
3656 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3657
772e23da 36582009-02-13 Colin D Bennett <colin@gibibit.com>
3659
3660 Support multiple fallback entries, and provide an API to support
3661 executing default+fallback menu entries. Renamed the `terminal' menu
3662 viewer to `text'.
3663
3664 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3665 variable declaration.
3666 (grub_menu_execute_callback): New structure declaration.
3667 (grub_menu_execute_callback_t): New typedef.
3668 (grub_menu_execute_with_fallback): New function declaration.
3669 (grub_menu_get_entry): Likewise.
3670 (grub_menu_get_timeout): Likewise.
3671 (grub_menu_set_timeout): Likewise.
3672
3673 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3674
3675 * normal/menu.c (grub_wait_after_message): Moved to
3676 `normal/menu_text.c'.
3677 (draw_border): Likewise.
3678 (print_message): Likewise.
3679 (print_entry): Likewise.
3680 (print_entries): Likewise.
3681 (grub_menu_init_page): Likewise.
3682 (get_entry_number): Likewise.
3683 (print_timeout): Likewise.
3684 (run_menu): Likewise.
3685 (grub_menu_execute_entry): Likewise.
3686 (show_text_menu): Likewise.
3687 (get_and_remove_first_entry_number): New function.
3688 (grub_menu_execute_with_fallback): Likewise.
3689 (get_entry): Renamed to ...
3690 (grub_menu_get_entry): .. this and made it global.
3691 (get_timeout): Renamed to ...
3692 (grub_menu_get_timeout): ... this and made it global.
3693 (set_timeout): Renamed to ...
3694 (grub_menu_set_timeout): ... this and made it global.
3695 (grub_normal_terminal_menu_viewer): Renamed to ...
3696 (grub_normal_text_menu_viewer): ... this.
3697
3698 * normal/menu_text.c: New file. Extracted text-menu-specific code
3699 from normal/menu.c.
3700
3701 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3702 (normal_mod_SOURCES): Likewise.
3703
3704 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3705 (normal_mod_SOURCES): Likewise.
3706
3707 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3708 (normal_mod_SOURCES): Likewise.
3709
3710 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3711 (normal_mod_SOURCES): Likewise.
3712
3713 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3714 (normal_mod_SOURCES): Likewise.
3715
3716 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3717 (normal_mod_SOURCES): Likewise.
3718
3719 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3720 (normal_mod_SOURCES): Likewise.
3721
16ac430e 37222009-02-11 Robert Millan <rmh@aybabtu.com>
3723
3724 * util/grub.d/00_header.in: Update old reference to `font' command.
3725
06ff20fc 37262009-02-10 Felix Zielcke <fzielcke@z-51.de>
3727
3728 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3729
3730 Based on patch from Javier Martín.
3731
96da9407 37322009-02-09 Felix Zielcke <fzielcke@z-51.de>
3733
3734 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3735 to avoid false positives with FAT.
96da9407 3736 (grub_fstest_SOURCES): Likewise.
3737 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3738 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3740 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3741 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3742 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3743
6dca6fe4 37442009-02-09 Felix Zielcke <fzielcke@z-51.de>
3745
06ff20fc 3746 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3747 bpb.version_specific.fat12_or_fat16.fstype and
3748 bpb.version_specific.fat32.fstype.
3749
2550c62f 37502009-02-08 Robert Millan <rmh@aybabtu.com>
3751
be110b30 3752 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3753
56978920 37542009-02-08 Robert Millan <rmh@aybabtu.com>
3755
3756 * Makefile.in (host_os, host_cpu): New variables.
3757 (target_os): Remove. Update all users.
3758
d64399b5 37592009-02-08 Marco Gerards <marco@gnu.org>
3760
3761 * Makefile.in (enable_grub_emu_usb): New variable.
3762 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3763 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3764 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3765 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3766 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3767 `usbtest.mod' and `usbms.mod'.
3768 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3769 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3770 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3771 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3772 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3773 variables.
3774
3775 * disk/usbms.c: New file.
3776
3777 * include/grub/usb.h: Likewise.
3778
3779 * include/grub/usbtrans.h: Likewise.
3780
3781 * include/grub/usbdesc.h: Likewise.
3782
3783 * bus/usb/usbtrans.c: Likewise.
3784
3785 * bus/usb/ohci.c: Likewise.
3786
3787 * bus/usb/uhci.c: Likewise.
3788
3789 * bus/usb/usbhub.c: Likewise.
3790
3791 * bus/usb/usb.c: Likewise.
3792
3793 * commands/usbtest.c: Likewise.
3794
3795 * util/usb.c: Likewise.
50fb7002 3796
d64399b5 3797 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3798
3799 * configure.ac: Test for libusb presence.
50fb7002 3800
d64399b5 3801 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3802
2b40d6bb 38032009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3804
3805 * kern/mm.c: Add more comments.
3806
73a4ce81 38072009-02-08 Robert Millan <rmh@aybabtu.com>
3808
3809 Patch from Javier Martín.
3810 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3811 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3812
f821ce59 38132009-02-08 Robert Millan <rmh@aybabtu.com>
3814
3815 * fs/cpio.c: Split tar functionality to ...
3816 * fs/tar.c: ... here (new file). Update all users.
3817
aebfc4b0 38182009-02-07 Robert Millan <rmh@aybabtu.com>
3819
3820 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3821 backward-incompatible features.
3822
3823 Based on patch from Javier Martín, with some adjustments.
3824
50fb7002 38252009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3826
3827 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3828
0bb5115e 38292009-02-07 Robert Millan <rmh@aybabtu.com>
3830
3831 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3832 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3833 after the RAID stuff.
3834
38a0f8e7 38352009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3836
50fb7002 3837 Fixes problem when running vbetest command as reported by
38a0f8e7 3838 Vladimir Serbinenko <phcoder@gmail.com>.
3839
3840 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3841
3143cc1c 38422009-02-04 Felix Zielcke <fzielcke@z-51.de>
3843
3844 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3845 /dev/md/NpN style mdraid devices.
3846
9cba6fce 38472009-02-03 Felix Zielcke <fzielcke@z-51.de>
3848
3849 * util/unifont2pff.rb: Remove.
3850
e507a2c1 38512009-02-03 Felix Zielcke <fzielcke@z-51.de>
3852
3853 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3854 `#'.
3855
d2c2b4cd 38562009-02-03 Felix Zielcke <fzielcke@z-51.de>
3857
3858 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3859 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3860 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3861 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3863 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3864 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3865
b4315fb0 38662009-02-02 Christian Franke <franke@computer.org>
3867
3868 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3869
de3aa260 38702009-02-01 Felix Zielcke <fzielcke@z-51.de>
3871
7c3ff286 3872 * INSTALL: Note that we now require at least autoconf 2.59 and
3873 that LZO is optional.
de3aa260 3874
825a182b 38752009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3876
3877 Base on patch on bug #24154 created by Tomas Tintera
3878 <trosos@seznam.cz>.
3879
3880 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3881
a69ef770 38822009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3883
7c3ff286 3884 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 3885 <bero@arklinux.org>.
3886
3887 * normal/parser.y (script_init): Add missing semicolon.
3888
6fa42fa6 38892009-01-31 Colin D Bennett <colin@gibibit.com>
3890
7c3ff286 3891 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 3892 (free_menu_entry_classes): Added.
3893 (grub_normal_menu_addentry): Added class property handling.
3894 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3895 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3896
3897 * normal/menu_viewer.c: New file.
3898
3899 * normal/menu.c (run_menu_entry): Renamed to ...
3900 (grub_menu_execute_entry): ... this and made it as global.
3901 (grub_menu_run): Renamed to ...
3902 (show_text_menu): ... this and made it local.
3903 (show_text_menu): Adapt to new function names.
3904 (grub_normal_terminal_menu_viewer): New global variable.
3905
3906 * include/grub/menu.h: New file.
3907
3908 * include/grub/menu_viewer.h: New file.
3909
3910 * include/grub/normal.h: Added include to grub/menu.h.
3911 (grub_menu_entry): Moved to include/grub/menu.h.
3912 (grub_menu_entry_t): Likewise.
3913 (grub_menu): Likewise.
3914 (grub_menu_t): Likewise.
3915 (grub_normal_terminal_menu_viewer): Added.
3916 (grub_menu_execute_entry): Likewise.
3917 (grub_menu_run): Removed.
3918
3919 * DISTLIST: Added include/grub/menu.h.
3920 Added include/grub/menu_viewer.h.
3921 Added normal/menu_viewer.c.
3922
39232009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3924
3925 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3926 arglist for menutitle arguments.
3927
3928 * normal/main.c (grub_normal_menu_addentry): Likewise.
3929
3930 * normal/parser.y (menuentry): Likewise.
3931
3932 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3933
3934 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3935 (grub_script_create_cmdmenu): Likewise.
3936
3937 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3938
3939 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3940 changes.
3941
3942 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3943
3944 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3945
3946 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3947
3948 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3949
3950 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3951
3952 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3953
56192c23 39542009-01-30 Christian Franke <franke@computer.org>
3955
3956 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3957 in option help text.
3958
d72521b3 39592009-01-27 Pavel Roskin <proski@gnu.org>
3960
3961 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3962
994b5e84 39632009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3964
3965 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3966
3967 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3968
3969 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3970 unregister function.
3971
6a7eab2c 39722009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3973
3974 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3975
3976 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3977
3978 * util/grub-mkfont.c (usage): Fix typo.
3979
3980 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3981
1806b56e 39822009-01-26 Daniel Mierswa <impulze@impulze.org>
3983
3fb18f09 3984 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3985
336e1fb9 3986 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3987
1806b56e 3988 * kern/misc.c (grub_strcasecmp): New function.
3989 (grub_strcasecmp): Use grub_size_t instead of int for length.
3990 Fix return value.
3991 * include/grub/misc.h: Update function prototypes.
3992
580b2a0f 39932009-01-26 Robert Millan <rmh@aybabtu.com>
3994
3995 * configure.ac: Fix cross-compilation check.
ef257b36 3996
d31c24f1 39972009-01-22 Christian Franke <franke@computer.org>
3998
3999 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4000 (precision) digit string. Allow `.format2' without `format1' (width).
4001 Limit input chars for `%s' output to `format2' if specified. This is
4002 compatible with standard printf ().
4003
3138b44c 40042009-01-22 Christian Franke <franke@computer.org>
4005
4006 * disk/ata.c (grub_ata_wait_status): Replace by ...
4007 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
4008 other status bits may be invalid while BSY is asserted.
4009 (grub_ata_check_ready): New function.
4010 (grub_ata_cmd): Removed.
4011 (grub_ata_wait_drq): New function.
4012 (grub_ata_strncpy): Remove inline.
4013 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
4014 and error check now done by grub_ata_wait_drq ().
4015 (grub_ata_pio_write): Likewise.
4016 (grub_atapi_identify): Set DEV before check for !BSY. Use
4017 grub_ata_wait_drq () to wait for data.
4018 (grub_ata_device_initialize): Add status register check to
4019 detect missing SATA slave devices. Add debug messages.
4020 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4021 (grub_atapi_packet): Set DEV before check for !BSY. Replace
4022 transfer loop by grub_ata_pio_write ().
4023 (grub_ata_identify): Set DEV before check for !BSY. Use
4024 grub_ata_wait_drq () to wait for data.
ef257b36 4025 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 4026 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4027 read/write in one loop. Fix invalid command on write. Fix incomplete
4028 command on (size % batch) == 0. Add missing error check after write of
4029 last block. Add debug messages.
4030 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4031
59a64ef6 40322009-01-19 Christian Franke <franke@computer.org>
4033
4034 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4035 (GRUB_ATAPI_IREASON_*): Likewise.
4036 (grub_ata_pio_write): Fix timeout error return.
4037 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4038 (grub_atapi_wait_drq): New function.
4039 (grub_atapi_packet): New parameter `size'.
4040 Use grub_atapi_wait_drq () and direct write instead of
4041 grub_ata_pio_write ().
4042 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4043 reads the number of bytes requested by the device for each DRQ
4044 assertion.
4045 (grub_atapi_write): Remove old implementation, return not
4046 implemented instead.
4047
1cfe20b3 40482009-01-19 Christian Franke <franke@computer.org>
4049
4050 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4051 of 512 to calculate data size.
4052 (grub_scsi_read12): Likewise.
4053 (grub_scsi_write10): Likewise.
4054 (grub_scsi_write12): Likewise.
4055 (grub_scsi_read): Adjust size according to blocksize.
4056 Add checks for invalid blocksize and unaligned transfer.
4057
bee5fe5d 40582009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4059
4060 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4061
ef257b36 4062 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 4063 width glyphs.
4064
3e643f8c 40652009-01-19 Robert Millan <rmh@aybabtu.com>
4066
4067 * config.guess: Update to latest version from config git.
4068 * config.sub: Likewise.
4069
4fa80998 40702009-01-17 Felix Zielcke <fzielcke@z-51.de>
4071
4072 * Makefile.in: Change font compilation to use new grub-mkfont instead
4073 of java version.
4074
4075 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4076 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4077 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4078 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4079 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4080 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4081 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4082 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4083 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4084
7086085b 40852009-01-16 Christian Franke <franke@computer.org>
4086
4087 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4088 (enum grub_ata_timeout_milliseconds): New enum.
4089 (grub_ata_wait_status): Add parameter milliseconds.
4090 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4091 recovery from timed-out commands.
4092 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4093 return grub_errno instead of REG_ERROR.
4094 (grub_ata_pio_write): Add parameter milliseconds.
4095 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4096 Pass milliseconds to grub_ata_wait_status () and
4097 grub_ata_pio_read ().
4098 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4099 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4100 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4101 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4102 It is not suitable for device detection, because DEV bit is ignored,
4103 the command may run too long, and not all devices set the signature
4104 properly.
4105 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4106 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4107 Fix device selection, DEV bit must be set first to address the registers
4108 of the correct device.
4109 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4110 grub_ata_pio_read/write ().
4111 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4112 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4113
4a412913 41142009-01-13 Carles Pina i Estany <carles@pina.cat>
4115
4116 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4117
7795c55e 41182009-01-13 Bean <bean123ch@gmail.com>
d913988c 4119
4120 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4121
7795c55e 41222009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 4123
4124 * Makefile.in: (enable_grub_mkfont): New variable.
4125 (freetype_cflags): Likewise.
4126 (freetype_libs): Likewise.
4127
4128 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4129 (grub_mkfont_SOURCES): New variable.
4130 (grub_mkfont_CFLAGS): Likewise.
4131 (grub_mkfont_LDFLAGS): Likewise.
4132
4133 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4134 library if `--enable-grub-mkfont' is requested.
4135 (enable_grub_mkfont): New variable.
4136 (freetype_cflags): Likewise.
4137 (freetype_libs): Likewise.
4138
4139 * util/grub-mkfont.c: New file.
4140
093af1fe 41412009-01-12 Christian Franke <franke@computer.org>
4142
4143 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4144 mode check. Fix setting of compat_use[].
4145
f36cc108 41462009-01-10 Robert Millan <rmh@aybabtu.com>
4147
4148 Update a few copyright years which we forgot to do in 2008 (only for
4149 files whose changes made in 2008 were copyright-significant)
4150
4151 * Makefile.in: Add 2008 to Copyright line.
4152 * disk/ieee1275/ofdisk.c: Likewise.
4153 * disk/efi/efidisk.c: Likewise.
4154 * kern/dl.c: Likewise.
4155 * kern/sparc64/ieee1275/init.c: Likewise.
4156 * kern/mm.c: Likewise.
4157 * kern/efi/mm.c: Likewise.
4158 * boot/i386/pc/boot.S: Likewise.
4159 * genfslist.sh: Likewise.
4160 * fs/iso9660.c: Likewise.
4161 * fs/hfs.c: Likewise.
4162 * fs/jfs.c: Likewise.
4163 * fs/minix.c: Likewise.
4164 * fs/ufs.c: Likewise.
4165 * gensymlist.sh.in: Likewise.
4166 * genkernsyms.sh.in: Likewise.
4167 * include/grub/misc.h: Likewise.
4168 * include/grub/types.h: Likewise.
4169 * include/grub/symbol.h: Likewise.
4170 * include/grub/elf.h: Likewise.
4171 * include/grub/kernel.h: Likewise.
4172 * include/grub/disk.h: Likewise.
4173 * include/grub/dl.h: Likewise.
4174 * include/grub/i386/linux.h: Likewise.
4175 * include/grub/i386/pc/biosdisk.h: Likewise.
4176 * include/grub/efi/api.h: Likewise.
4177 * include/grub/efi/pe32.h: Likewise.
4178 * include/grub/util/misc.h: Likewise.
4179 * normal/execute.c: Likewise.
4180 * normal/arg.c: Likewise.
4181 * normal/completion.c: Likewise.
4182 * normal/lexer.c: Likewise.
4183 * normal/parser.y: Likewise.
4184 * normal/misc.c: Likewise.
4185 * commands/i386/pc/vbeinfo.c: Likewise.
4186 * commands/hexdump.c: Likewise.
4187 * commands/terminal.c: Likewise.
4188 * commands/ls.c: Likewise.
4189 * commands/help.c: Likewise.
4190 * partmap/pc.c: Likewise.
4191 * loader/efi/chainloader.c: Likewise.
4192 * loader/multiboot_loader.c: Likewise.
4193 * loader/i386/pc/multiboot2.c: Likewise.
4194 * term/efi/console.c: Likewise.
4195 * term/i386/pc/serial.c: Likewise.
4196 * util/lvm.c: Likewise.
4197 * util/console.c: Likewise.
4198 * util/i386/efi/grub-mkimage.c: Likewise.
4199 * util/raid.c: Likewise.
4200
7f02114b 42012009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4202
4203 * commands/videotest.c: Removed include to grub/machine/memory.h.
4204
4205 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4206 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4207 (video_mod_SOURCES): Removed.
4208 (video_mod_CFLAGS): Likewise.
4209 (video_mod_LDFLAGS): Likewise.
4210 (gfxterm_mod_SOURCES): Likewise.
4211 (gfxterm_mod_CFLAGS): Likewise.
4212 (gfxterm_mod_LDFLAGS): Likewise.
4213 (videotest_mod_SOURCES): Likewise.
4214 (videotest_mod_CFLAGS): Likewise.
4215 (videotest_mod_LDFLAGS): Likewise.
4216 (bitmap_mod_SOURCES): Likewise.
4217 (bitmap_mod_CFLAGS): Likewise.
4218 (bitmap_mod_LDFLAGS): Likewise.
4219 (tga_mod_SOURCES): Likewise.
4220 (tga_mod_CFLAGS): Likewise.
4221 (tga_mod_LDFLAGS): Likewise.
4222 (jpeg_mod_SOURCES): Likewise.
4223 (jpeg_mod_CFLAGS): Likewise.
4224 (jpeg_mod_LDFLAGS): Likewise.
4225 (png_mod_SOURCES): Likewise.
4226 (png_mod_CFLAGS): Likewise.
4227 (png_mod_LDFLAGS): Likewise.
4228
4229 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4230 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4231 (video_mod_SOURCES): Added.
4232 (video_mod_CFLAGS): Likewise.
4233 (video_mod_LDFLAGS): Likewise.
4234 (videotest_mod_SOURCES): Likewise.
4235 (videotest_mod_CFLAGS): Likewise.
4236 (videotest_mod_LDFLAGS): Likewise.
4237 (bitmap_mod_SOURCES): Likewise.
4238 (bitmap_mod_CFLAGS): Likewise.
4239 (bitmap_mod_LDFLAGS): Likewise.
4240 (tga_mod_SOURCES): Likewise.
4241 (tga_mod_CFLAGS): Likewise.
4242 (tga_mod_LDFLAGS): Likewise.
4243 (jpeg_mod_SOURCES): Likewise.
4244 (jpeg_mod_CFLAGS): Likewise.
4245 (jpeg_mod_LDFLAGS): Likewise.
4246 (png_mod_SOURCES): Likewise.
4247 (png_mod_CFLAGS): Likewise.
4248 (png_mod_LDFLAGS): Likewise.
4249 (gfxterm_mod_SOURCES): Likewise.
4250 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 4251 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 4252
4253 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4254 grub/machine/console.h.
4255
644fff97 42562009-01-04 Jerone Young <jerone@gmail.com>
4257
4258 Make on screen instructions clearer
4259
4260 Based on patch created by Jidanni <jidanni@jidanni.org>
4261
4262 * normal/menu.c: print clearer instructions on the screen
4263
1e901a75 42642009-01-02 Colin D Bennett <colin@gibibit.com>
4265
4266 New font engine.
34c44600 4267
1e901a75 4268 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4269 build system and fixed gfxterm.c to work with different sized fonts.
4270
4271 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 4272
1e901a75 4273 * configure: Re-generated.
34c44600 4274
1e901a75 4275 * DISTLIST: Removed font/manager.c.
4276 Added font/font.c.
4277 Added font/font_cmd.c.
34c44600 4278
1e901a75 4279 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4280 compilation.
34c44600 4281
1e901a75 4282 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 4283
4284 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 4285
4286 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 4287
1e901a75 4288 * normal/menu.c: Likewise.
34c44600 4289
1e901a75 4290 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4291 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 4292
1e901a75 4293 * include/grub/font.h: Replaced with new file.
34c44600 4294
1e901a75 4295 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4296 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4297 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4298 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4299 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 4300 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 4301 fg_red, fg_green, fg_blue, fg_alpha.
4302 (grub_video_adapter): Removed blit_glyph.
34c44600 4303 (grub_video_blit_glyph): Removed.
4304
1e901a75 4305 * font/manager.c: Removed file.
34c44600 4306
4307 * font/font.c: New file.
4308
1e901a75 4309 * font/font_cmd.c: Likewise.
34c44600 4310
1e901a75 4311 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 4312
1e901a75 4313 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4314 (grub_video_vbe_map_rgba): Likewise.
4315 (grub_video_vbe_unmap_color_int): Likewise.
4316 (grub_video_vbe_blit_glyph): Removed.
4317 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 4318
1e901a75 4319 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4320 (get_pixel): Likewise.
34c44600 4321 (set_pixel): Likewise.
4322
1e901a75 4323 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 4324
1e901a75 4325 * term/gfxterm.c: Adapted to new font engine.
34c44600 4326
1e901a75 4327 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 4328
1e901a75 4329 * term/i386/pc/vga.c: Likewise.
34c44600 4330
1e901a75 4331 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 4332
1e901a75 4333 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 4334
1e901a75 4335 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4336
1e901a75 4337 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 4338
1e901a75 4339 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 4340
1e901a75 4341 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 4342
1e901a75 4343 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 4344
1e901a75 4345 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 4346
1e901a75 4347 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4348
4349 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 4350
1e901a75 4351 * util/grub-mkconfig_lib.in: Changed font extension.
4352
278922e8 43532008-12-28 Felix Zielcke <fzielcke@z-51.de>
4354
4355 * util/getroot.c (grub_util_get_grub_dev): Add support for
4356 /dev/md/dNNpNN style partitionable mdraid devices.
4357
3ced05cf 43582008-12-12 Alex Smith <alex@alex-smith.me.uk>
4359
4360 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4361 at a time limit of the PXE TFTP API correctly.
4362 (grub_pxefs_close): Likewise.
4363
7fd0ee30 43642008-11-29 Robert Millan <rmh@aybabtu.com>
4365
34c44600 4366 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 4367 grub_ata_device_initialize() calls.
4368
34c44600 43692008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 4370
4371 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4372 iteration failed.
4373 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4374
89313780 43752008-11-28 Robert Millan <rmh@aybabtu.com>
4376
4377 Fix build on powerpc-ieee1275. Based on patch created by
4378 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4379 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4380 `kern/ieee1275/mmap.c'.
4381 * include/grub/powerpc/ieee1275/memory.h: New file.
4382
15257703 4383 Provide grub-install on coreboot.
4384 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4385 (grub_install_SOURCES): New variable.
4386 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4387 usable on coreboot.
4388
9fc5388a 43892008-11-25 Felix Zielcke <fzielcke@z-51.de>
4390
4391 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4392 to `grub_term_input_t'.
4393 (grub_term_get_current_output): Change return type to
4394 `grub_term_output_t'.
4395
bc3a2f31 43962008-11-22 Robert Millan <rmh@aybabtu.com>
4397
34c44600 4398 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 4399 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4400 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4401 grub_vga_text_cls().
4402
80fc88f2 4403 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 4404 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 4405
cbf36fd3 4406 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4407 to 0x200000 (avoids trouble with some OFW implementations, and matches
4408 with the one in Yaboot).
4409 Reported by Manoel Abranches
4410
73e8e268 44112008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 4412
4413 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4414 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4415
73e8e268 4416 * util/grub-mkconfig_lib.in (grub_warn): New function.
4417 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4418 warnings, to obtain consistent formatting.
4419 * util/grub.d/00_header.in: Likewise.
4420 * util/update-grub_lib.in: Likewise.
4421
e94045a1 4422 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 4423 Move comment text to `#error' stanza.
e94045a1 4424
79d29fd7 4425 Harmonize ieee1275's grub_available_iterate() with the generic
4426 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4427 build problem on i386-ieee1275):
4428 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4429 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4430 parameter `type'. Update all users of this function.
4431 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4432 `kern/ieee1275/mmap.c'.
4433 * kern/ieee1275/init.c
4434 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4435 with ...
4436 (grub_machine_mmap_iterate): ... this.
4437 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4438 return type to `grub_err_t'. Update all implementations of this
4439 function prototype.
4440 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4441 Likewise.
4442
60d6b16e 4443 Add `lsmmap' command (lists firmware-provided memory map):
4444 * commands/lsmmap.c: New file.
4445 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4446 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4447 variables.
4448 * conf/powerpc-ieee1275.rmk: Likewise.
4449 * conf/i386-coreboot.rmk: Likewise.
4450 * conf/i386-ieee1275.rmk: Likewise.
4451
ebaaf49b 44522008-11-19 Robert Millan <rmh@aybabtu.com>
4453
4454 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 4455 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4456 constraints to initrd allocation (based on code from
4457 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4458 for Linux to find it.
ebaaf49b 4459
dfab719f 44602008-11-14 Robert Millan <rmh@aybabtu.com>
4461
4462 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4463 order to cope with duplicate slashes.
4464
10fc3eb9 44652008-11-14 Robert Millan <rmh@aybabtu.com>
4466
4467 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4468 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4469 don't want to mess with lower memory, because it is used in the Linux
4470 loader.
4471
4472 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 4473 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 4474 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4475 is in our heap (probably as a result of it being corrupted during
2f2a3442 4476 decompression). Add #error instance with comment to explain why this
4477 loader isn't currently usable on PC/BIOS.
10fc3eb9 4478
e2e07847 44792008-11-14 Robert Millan <rmh@aybabtu.com>
4480
4481 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 4482 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 4483
fe8e8d69 44842008-11-12 Robert Millan <rmh@aybabtu.com>
4485
4486 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4487
4488 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4489 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4490 from here ...
4491 * include/grub/i386/pc/memory.h: ... to here.
4492
976b07d0 44932008-11-12 Robert Millan <rmh@aybabtu.com>
4494
4495 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4496 split).
4497
4498 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4499 (grub_console_cur_color, grub_console_real_putchar)
4500 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4501 (grub_console_setcolorstate, grub_console_setcolor)
4502 (grub_console_getcolor): Move from here ...
4503 * include/grub/i386/vga_common.h: ... to here (new file).
4504
4505 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4506 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4507 `<grub/i386/io.h>'.
4508 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4509 `<grub/i386/vga_common.h>'.
4510
76679cd3 45112008-11-12 Robert Millan <rmh@aybabtu.com>
4512
4513 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4514 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4515 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4516 variables.
4517 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4518 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4519
4520 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4521 grub_console_init() with call to grub_vga_text_init().
4522 (grub_machine_fini): Replace call to
4523 grub_console_fini() with call to grub_vga_text_fini() and
4524 grub_at_keyboard_fini().
4525
4526 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4527 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4528 (grub_console_setcolorstate, grub_console_setcolor)
4529 (grub_console_getcolor): New function prototypes.
4530
4531 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4532 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4533 (grub_vga_text_setcursor): Static-ize.
4534 (grub_vga_text_term): New structure.
4535 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4536
4537 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4538 (grub_console_cur_color, grub_console_standard_color)
4539 (grub_console_normal_color, grub_console_highlight_color)
4540 (map_char, grub_console_putchar, grub_console_getcharwidth)
4541 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4542 (grub_console_getcolor): Move from here ...
4543 * term/i386/vga_common.c: ... to here (same function names).
4544
95b841d3 45452008-11-12 Robert Millan <rmh@aybabtu.com>
4546
4547 Use newly-added Multiboot support in coreboot.
4548
4549 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4550 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4551
4552 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4553 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4554 (codestart): Store the MBI in `startup_multiboot_info' when we're
4555 being loaded using Multiboot.
4556
4557 * kern/i386/coreboot/init.c (grub_machine_init): Move
4558 grub_at_keyboard_init() call to beginning of function (useful for
4559 debugging). Call grub_machine_mmap_init() before attempting to use
4560 grub_machine_mmap_iterate().
4561 (grub_lower_mem, grub_upper_mem): Move from here ...
4562 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4563 here (new file).
4564
4565 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4566 function prototype.
4567
761ca975 45682008-11-12 Robert Millan <rmh@aybabtu.com>
4569
4570 Fix a regression introduced by the at_keyboard.mod split. Because
4571 some terminals are default on some platforms and non-default on
4572 others, the first terminal being registered determines which is
4573 going to be default.
4574
4575 * kern/term.c (grub_term_register_input): If this is the first
4576 terminal being registered, set it as the current one.
4577 (grub_term_register_output): Likewise.
4578
4579 * term/efi/console.c (grub_console_init): Do not call
4580 grub_term_set_current_output() or grub_term_set_current_input().
4581 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4582 * term/i386/pc/console.c (grub_console_init): Likewise.
4583 (grub_console_fini): Do not call grub_term_set_current_input()
4584 (but leave grub_term_set_current_output() to restore text mode).
4585
6c529df7 45862008-11-10 Robert Millan <rmh@aybabtu.com>
4587
4588 * util/grub.d/00_header.in: Add backward compatibility check for
4589 versions of terminal.mod that don't understand `terminal_input' or
4590 `terminal_output'.
4591
132e4113 45922008-11-09 Robert Millan <rmh@aybabtu.com>
4593
4594 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4595 `terminal_input' / `terminal_output', not `terminal'.
4596
ac293d50 45972008-11-08 Robert Millan <rmh@aybabtu.com>
4598
4599 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 4600 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 4601
0025933a 46022008-11-08 Robert Millan <rmh@aybabtu.com>
4603
4604 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 4605 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 4606 members. Update all users.
4607 * util/console.c (grub_ncurses_term): Split in ...
4608 (grub_ncurses_term_input): ... this, and ...
4609 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 4610 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 4611
37c86336 46122008-11-08 Robert Millan <rmh@aybabtu.com>
4613
4614 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4615 (PKGDATA): Add $(pkgdata_SRCDIR).
4616 (pkglib_BUILDDIR): New variable.
4617 (pkgdata_SRCDIR): New variable.
4618 (build_env.mk): New target.
4619 (include_DATA): New variable.
4620 (install-local): Install $(include_DATA) files in $(includedir).
4621
b6c15a2d 46222008-11-07 Pavel Roskin <proski@gnu.org>
4623
d99d46f1 4624 * gendistlist.sh: Use C locale for sorting to ensure consistent
4625 output on all systems.
4626
b6c15a2d 4627 * util/grub.d/00_header.in: Remove incorrect space before
4628 "serial".
4629
c32ee8c9 46302008-11-07 Robert Millan <rmh@aybabtu.com>
4631
4632 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4633 per specification.
4634 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4635 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4636 (based on find_multi_boot1_header).
4637 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4638 using find_multi_boot2_header(), and abort if neither Multiboot or
4639 Multiboot headers were found.
4640
651c29b7 46412008-11-07 Robert Millan <rmh@aybabtu.com>
4642
4643 Modularize at_keyboard.mod:
4644
4645 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4646 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4647 (at_keyboard_mod_LDFLAGS): New variables.
4648
4649 Actual terminal split:
4650
4651 * include/grub/term.h (struct grub_term): Split in ...
4652 (struct grub_term_input): ... this, and ...
4653 (struct grub_term_output): ... this. Update all users.
4654 (grub_term_set_current): Split in ...
4655 (grub_term_set_current_input): ... this, and ...
4656 (grub_term_set_current_output): ... this.
4657 (grub_term_get_current): Split in ...
4658 (grub_term_get_current_input): ... this, and ...
4659 (grub_term_get_current_output): ... this.
4660 (grub_term_register): Split in ...
4661 (grub_term_register_input): ... this, and ...
4662 (grub_term_register_output): ... this.
4663 (grub_term_unregister): Split in ...
4664 (grub_term_unregister_input): ... this, and ...
4665 (grub_term_unregister_output): ... this.
4666 (grub_term_iterate): Split in ...
4667 (grub_term_iterate_input): ... this, and ...
4668 (grub_term_iterate_output): ... this.
4669
4670 * kern/term.c (grub_term_list): Split in ...
4671 (grub_term_list_input): ... this, and ...
4672 (grub_term_list_output): ... this. Update all users.
4673 (grub_cur_term): Split in ...
4674 (grub_cur_term_input): ... this, and ...
4675 (grub_cur_term_output): ... this. Update all users.
4676 (grub_term_set_current): Split in ...
4677 (grub_term_set_current_input): ... this, and ...
4678 (grub_term_set_current_output): ... this.
4679 (grub_term_get_current): Split in ...
4680 (grub_term_get_current_input): ... this, and ...
4681 (grub_term_get_current_output): ... this.
4682 (grub_term_register): Split in ...
4683 (grub_term_register_input): ... this, and ...
4684 (grub_term_register_output): ... this.
4685 (grub_term_unregister): Split in ...
4686 (grub_term_unregister_input): ... this, and ...
4687 (grub_term_unregister_output): ... this.
4688 (grub_term_iterate): Split in ...
4689 (grub_term_iterate_input): ... this, and ...
4690 (grub_term_iterate_output): ... this.
4691
4692 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4693 a check for input and one for output (and only attempt to get keys
4694 from user when input works).
4695
4696 * util/grub-probe.c (grub_term_get_current): Split in ...
4697 (grub_term_get_current_input): ... this, and ...
4698 (grub_term_get_current_output): ... this.
4699 * util/grub-fstest.c: Likewise.
4700 * util/i386/pc/grub-setup.c: Likewise.
4701 * util/grub-editenv.c: Likewise.
4702
4703 Portability adjustments:
4704
4705 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4706 `term/i386/pc/at_keyboard.c'.
4707 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4708 grub_keyboard_controller_init() (now handled by terminal .init).
4709 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4710 grub_at_keyboard_init().
4711 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4712 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4713 at_keyboard.mod via input terminal interface).
4714 * include/grub/i386/coreboot/console.h: Convert into a stub for
4715 `<grub/i386/pc/console.h>'.
4716
4717 Migrate full terminals to new API:
4718
4719 * term/efi/console.c (grub_console_term): Split into ...
4720 (grub_console_term_input): ... this, and ...
4721 (grub_console_term_output): ... this. Update all users.
4722 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4723 (grub_ofconsole_init): Split into ...
4724 (grub_ofconsole_init_input): ... this, and ...
4725 (grub_ofconsole_init_output): ... this.
4726 (grub_ofconsole_term): Split into ...
4727 (grub_ofconsole_term_input): ... this, and ...
4728 (grub_ofconsole_term_output): ... this. Update all users.
4729 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4730 (grub_serial_term_input): ... this, and ...
4731 (grub_serial_term_output): ... this. Update all users.
4732 * term/i386/pc/console.c (grub_console_term): Split into ...
4733 (grub_console_term_input): ... this, and ...
4734 (grub_console_term_output): ... this. Update all users.
4735 (grub_console_term_input): Only enable it on PC/BIOS platform.
4736 (grub_console_init): Remove grub_keyboard_controller_init() call.
4737
4738 Migrate input terminals to new API:
4739
4740 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4741 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4742 i386-specific anyway).
4743 (grub_console_checkkey): Rename to ...
4744 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4745 users.
4746 (grub_keyboard_controller_orig): New variable.
4747 (grub_console_getkey): Rename to ...
4748 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4749 users.
4750 (grub_keyboard_controller_init): Static-ize. Save original
4751 controller value so that it can be restored ...
4752 (grub_keyboard_controller_fini): ... here (new function).
4753 (grub_at_keyboard_term): New structure.
4754 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4755 functions.
4756
4757 Migrate output terminals to new API:
4758
4759 * term/i386/pc/vga.c (grub_vga_term): Change type to
4760 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4761 members. Update all users.
4762 * term/gfxterm.c (grub_video_term): Change type to
4763 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4764 members. Update all users.
4765 * include/grub/i386/pc/console.h (grub_console_checkkey)
4766 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4767 etc).
4768
4769 Migrate `terminal' command and userland tools to new API:
4770
4771 * commands/terminal.c (grub_cmd_terminal): Split into ...
4772 (grub_cmd_terminal_input): ... this, and ...
4773 (grub_cmd_terminal_output): ... this.
4774 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4775 `terminal_input' and `terminal_output'.
4776 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4777 `terminal_input' / `terminal_output' API.
4778 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4779 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4780 provided ${GRUB_TERMINAL}, convert it).
4781
96e5d876 47822008-11-04 Robert Millan <rmh@aybabtu.com>
4783
4784 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4785 for FreeBSD.
4786 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4787
556f3775 47882008-11-03 Bean <bean123ch@gmail.com>
4789
4790 * kern/elf.c (grub_elf32_load): Revert to previous code.
4791 (grub_elf64_load): Likewise.
4792
4793 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4794
926b9823 47952008-11-01 Robert Millan <rmh@aybabtu.com>
4796
4797 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4798 (TARGET_CPPFLAGS): Likewise.
4799 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4800
1432e958 48012008-11-01 Carles Pina i Estany <carles@pina.cat>
4802
4803 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4804
dba3f844 48052008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4806
4807 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4808 addition of objects until the code is not going to be able to fail.
4809
dba3f844 48102008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4811
4812 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4813 (add a missing NULL check, and correct them by moving the pointer
4814 operations after the actual check).
4815
7ab28c21 48162008-10-29 Robert Millan <rmh@aybabtu.com>
4817
4818 * util/i386/pc/grub-install.in: Handle empty string as output from
4819 make_system_path_relative_to_its_root().
4820
1b7748eb 48212008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4822
4823 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4824 circular metadata worst case scenario. If the metadata is circular
4825 then copy the wrap in place.
4826 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4827 project lib/format_text/layout.h
4828 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4829
c9618ab2 48302008-10-03 Felix Zielcke <fzielcke@z-51.de>
4831
7a36edca 4832 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4833
bf981c62 48342008-10-03 Felix Zielcke <fzielcke@z-51.de>
4835
4836 * util/update-grub_lib.in: Mention filename in warning message.
4837
6d994591 48382008-09-29 Felix Zielcke <fzielcke@z-51.de>
4839
4840 * NEWS: Update for rename of update-grub to grub-mkconfig.
4841
18ade780 48422008-09-29 Felix Zielcke <fzielcke@z-51.de>
4843
4844 * util/update-grub_lib.in: Copy to ...
4845 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4846 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4847 * util/update-grub.in: Rename to ...
4848 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4849 option. Add `--output' option to allow users to specify the generated
4850 configuration file. Default to stdout.
4851 (update_grub_dir): Rename to ...
4852 (grub_mkconfig_dir): ... this.
4853 (grub_cfg): Default to an empty string.
4854 * conf/common.rmk (update-grub): Rename to ...
4855 (grub-mkconfig): ... this.
4856 (update-grub_lib): Copy to ...
4857 (grub-mkconfig_lib): ... this.
4858 (update-grub_SCRIPTS): Copy to ...
4859 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4860 (update-grub_DATA): Rename to ...
4861 (grub-mkconfig_DATA): ... this.
4862
556ce6ac 48632008-09-28 Robert Millan <rmh@aybabtu.com>
4864
4865 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4866 to `modified'. Add the real `created' field.
4867 (grub_iso9660_uuid): Use `modified' rather than `created' for
4868 constructing the UUID.
4869
48702008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 4871
4872 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4873 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4874
92274e85 48752008-09-28 Bean <bean123ch@gmail.com>
4876
4877 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4878 Thanks to Christian Franke for finding this bug.
4879
add6f17a 48802008-09-25 Robert Millan <rmh@aybabtu.com>
4881
4882 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4883 instances of grub_util_get_disk_name() (see previous commit).
4884
d2a367b8 48852008-09-25 Robert Millan <rmh@aybabtu.com>
4886
4887 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4888 `util/i386/get_disk_name.c'.
4889 * conf/i386-efi.rmk: Likewise.
4890 * conf/x86_64-efi.rmk: Likewise.
4891 * conf/i386-coreboot.rmk: Likewise.
4892 * conf/i386-ieee1275.rmk: Likewise.
4893 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4894 `util/ieee1275/get_disk_name.c'.
4895 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4896 * util/ieee1275/get_disk_name.c: Remove file.
4897 * util/i386/get_disk_name.c: Remove file.
4898 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4899 "hd%d" for device.map entries, rather than using
4900 grub_util_get_disk_name().
4901
81a06771 49022008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 4903
4904 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4905 warning.
4906 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4907
5a004279 49082008-09-24 Carles Pina i Estany <carles@pina.cat>
4909
4910 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4911 Changed to 0x5100.
4912 (GRUB_TERM_PPAGE): Changed to 0x4900.
4913
397093d3 49142008-09-24 Robert Millan <rmh@aybabtu.com>
4915
4916 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4917 macros (they were i386-pc specific).
4918 * include/grub/sparc64/ieee1275/console.h: Likewise.
4919 * include/grub/efi/console.h: Likewise.
4920
a91b6c7c 49212008-09-22 Bean <bean123ch@gmail.com>
4922
4923 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4924 resident and in attribute list.
4925
4926 * include/grub/ntfs.h (BMP_LEN): Removed.
4927
c40fd116 49282008-09-22 Bean <bean123ch@gmail.com>
4929
81a06771 4930 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 4931 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4932
4933 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4934 error occurs, as grub_disk_open will call grub_disk_close, which will
4935 call p->close (scsi).
4936
81a06771 49372008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 4938
4939 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4940 (AC_PREREQ): Bumped to 2.59.
4941 (AC_TRY_COMPILE): Replace obsolete macro with ...
4942 (AC_COMPILE_IFELSE): ... this.
4943 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4944 (AC_LINK_IFELSE): ... this.
4945
5dc43410 49462008-09-21 Felix Zielcke <fzielcke@z-51.de>
4947
4948 * autogen.sh: Add a call to `gendistlist.sh'.
4949
9035dce4 49502008-09-19 Christian Franke <franke@computer.org>
4951
4952 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4953 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4954 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4955 Export __enable_execute_stack() to modules.
4956 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4957 New function.
4958
7fd75377 49592008-09-09 Felix Zielcke <fzielcke@z-51.de>
4960
040030b3 4961 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4962 Sort the list.
4963
49642008-09-09 Felix Zielcke <fzielcke@z-51.de>
4965
4966 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 4967 #include <grub/util/hostdisk.h>.
4968
89d5ffcf 49692008-09-08 Robert Millan <rmh@aybabtu.com>
4970
4971 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4972 segments when their filesz is zero (grub_file_read() interprets
81a06771 4973 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 4974 Use `lowest_segment' rather than 0 for calculating the current
4975 segment load address.
4976
40da438f 49772008-09-08 Robert Millan <rmh@aybabtu.com>
4978
4979 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4980 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4981 clobbered useful information.
4982
ddbf5556 49832008-09-08 Robert Millan <rmh@aybabtu.com>
4984
4985 * include/grub/util/biosdisk.h: Move to ...
4986 * include/grub/util/hostdisk.h: ... here. Update all users.
4987 * util/biosdisk.c: Move to ...
4988 * util/hostdisk.c: ... here. Update all users.
4989
783d0f48 49902008-09-07 Robert Millan <rmh@aybabtu.com>
4991
4992 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4993 variables.
4994 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4995 and length can be stored directly in the `mbi->mmap_addr' and
4996 `mbi->mmap_length' struct fields.
4997
548e2ea5 49982008-09-07 Robert Millan <rmh@aybabtu.com>
4999
5000 * conf/i386.rmk: New file. Provides declaration for building
5001 `cpuid.mod'.
5002 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5003 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5004 variables.
5005 Include `conf/i386.mk'.
5006 * conf/i386-efi.rmk: Likewise.
5007 * conf/x86_64-efi.rmk: Likewise.
5008 * conf/i386-coreboot.rmk: Likewise.
5009 * conf/i386-ieee1275.rmk: Likewise.
5010
0ea85a37 50112008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
5012
5013 Based on patch created by Colin D Bennett <colin@gibibit.com>.
5014 Adds optimization support for BGR based modes.
5015
5016 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5017 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5018 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5019 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5020 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5021 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5022 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5023 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5024 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5025 (grub_video_i386_vbeblit_index_index): Likewise.
5026 (grub_video_i386_vbeblit_replace_directN): Added.
5027 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5028 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5029 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5030 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5031 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5032 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 5033 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 5034 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5035 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5036 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5037 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5038 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5039 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5040
5041 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5042 (grub_video_i386_vbefill_R8G8B8): Likewise.
5043 (grub_video_i386_vbefill_index): Likewise.
5044 (grub_video_i386_vbefill_direct32): Added.
5045 (grub_video_i386_vbefill_direct24): Likewise.
5046 (grub_video_i386_vbefill_direct16): Likewise.
5047 (grub_video_i386_vbefill_direct8): Likewise.
5048
81a06771 5049 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 5050 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5051 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5052 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5053 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5054 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 5055
0ea85a37 5056 * video/video.c (grub_video_get_blit_format): Updated to use new
5057 blit formats. Added handling for 16 bit color modes.
81a06771 5058
5059 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 5060 fillers.
5061 (common_blitter): Updated to use new blitters.
5062
5063 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5064 Removed.
5065 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5066 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5067 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5068 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5069 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5070 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5071 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5072 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5073 (grub_video_i386_vbeblit_index_index): Likewise.
5074 (grub_video_i386_vbeblit_replace_directN): Added.
5075 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5076 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5077 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5078 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5079 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5080 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5081 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5082 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5083 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5084 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5085 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5086 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5087 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 5088
0ea85a37 5089 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5090 (grub_video_i386_vbefill_R8G8B8): Likewise.
5091 (grub_video_i386_vbefill_index): Likewise.
5092 (grub_video_i386_vbefill_direct32): Added.
5093 (grub_video_i386_vbefill_direct24): Likewise.
5094 (grub_video_i386_vbefill_direct16): Likewise.
5095 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 5096
0ea85a37 5097 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5098 types.
81a06771 5099
0ea85a37 5100 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5101 types.
81a06771 5102
0ea85a37 5103 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5104 blitter types.
81a06771 5105
0ea85a37 5106 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5107 types.
5108
e8a83df6 51092008-09-06 Felix Zielcke <fzielcke@z-51.de>
5110
5111 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5112 RAID level 1.
5113
6bcd8ee5 51142008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 5115
6bcd8ee5 5116 * fs/iso9660.c (grub_iso9660_date): New structure.
5117 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5118 (grub_iso9660_uuid): New function.
c375ae58 5119
59261157 51202008-09-05 Bean <bean123ch@gmail.com>
5121
5122 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5123
5124 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5125 insensitive bit for names in Win32 and Win32 & DOS namespace.
5126
5127 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5128
5129 * include/grub/types.h (LONG_MAX): Likewise.
5130
58b6645a 51312008-09-04 Felix Zielcke <fzielcke@z-51.de>
5132
4ee55921 5133 * util/getroot.c: Include <config.h>.
5134 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5135 add support for /dev/md/N devices and handle LVM double dash escaping.
5136
51372008-09-04 Felix Zielcke <fzielcke@z-51.de>
5138
5139 * config.guess: Update to latest version from config git.
5140 * config.sub: Likewise.
58b6645a 5141
9124f65d 51422008-09-03 Robert Millan <rmh@aybabtu.com>
5143
5144 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5145 `disk->total_sectors'.
5146
81a06771 51472008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 5148
5149 * include/grub/normal.h: Fixed incorrect comment for
5150 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5151
81a06771 51522008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 5153
5154 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5155 values with defines.
5156
5157 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5158 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5159 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5160 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5161 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5162 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5163 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5164 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5165 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5166 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5167 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5168 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5169 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5170 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5171 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5172 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5173 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5174 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5175 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5176
93d5cbf8 51772008-08-31 Robert Millan <rmh@aybabtu.com>
5178
5179 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5180 declaration.
5181 (grub_multiboot): Fix a few warnings.
5182
21751d50 51832008-08-31 Robert Millan <rmh@aybabtu.com>
5184
5185 * loader/i386/pc/multiboot.c: Update comment not to say that
5186 boot_device support is unimplemented.
5187
e27a75c5 51882008-08-31 Robert Millan <rmh@aybabtu.com>
5189
5190 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5191 or memory map support are unimplemented.
5192
81a06771 51932008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 5194
5195 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5196
81a06771 51972008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 5198
5199 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5200 total video memory in 'vbeinfo' output; show color format details for
5201 each video mode.
5202
7c5d8d95 52032008-08-30 Pavel Roskin <proski@gnu.org>
5204
5205 * util/genmoddep.c: Remove for real this time.
5206 * DISTLIST: Remove util/genmoddep.c.
5207
4cebd25a 52082008-08-30 Robert Millan <rmh@aybabtu.com>
5209
5210 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5211 as required by Multiboot spec (it was already 4-byte aligned, but
5212 only by chance).
5213
b497a269 52142008-08-29 Pavel Roskin <proski@gnu.org>
5215
e3925185 5216 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5217 * kern/powerpc/ieee1275/startup.S: ... this.
5218 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5219 * DISTLIST: Likewise.
5220
b497a269 5221 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5222 grub/cpu/kernel.h. Add start label for consistency with other
5223 platforms. Add grub_prefix immediately after start. Add jump
5224 to the code after grub_prefix.
5225 * include/grub/powerpc/kernel.h: Provide valid values for
5226 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5227
6e5a42fe 52282008-08-29 Bean <bean123ch@gmail.com>
5229
5230 * configure.ac: Change host_os to cygwin for mingw.
5231 (asprintf): New check for function.
5232
5233 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5234 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5235
5236 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 5237 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 5238 sync, sleep and grub_util_get_disk_size for mingw.
5239
5240 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5241 to get size in mingw.
5242 (open_device): Use flag O_BINARY if it's defined.
5243 (find_root_device): Add dummy code for mingw.
5244
5245 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5246 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5247 (get_scsi_disk_name): Return 0 for mingw.
5248
5249 * util/hostfs.c: #include <grub/util/misc.h>.
5250 (grub_hostfs_open): Use "rb" flag to open file, use
5251 grub_util_get_disk_size to get disk size for mingw.
5252
5253 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5254 (asprintf): New function if HAVE_ASPRINTF is not set.
5255 (sync): New function for mingw.
5256 (sleep): Likewise.
5257 (grub_util_get_disk_size): Likewise.
5258
ab3f2673 52592008-08-28 Pavel Roskin <proski@gnu.org>
5260
5261 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5262 kern/time.c.
5263
1c282483 52642008-08-28 Robert Millan <rmh@aybabtu.com>
5265
5266 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5267
678e849c 52682008-08-28 Robert Millan <rmh@aybabtu.com>
5269
5270 Change find_grub_drive() syntax so it doesn't prevent it from
5271 detecting NULL names as errors.
5272
5273 * util/biosdisk.c (find_grub_drive): Move free slot search code
5274 from here ...
5275 (find_free_slot): ... to here.
5276 (read_device_map): Use find_free_slot() to search for free slots.
5277
965c75ca 52782008-08-27 Marco Gerards <marco@gnu.org>
5279
5280 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5281 (scsi_mod_SOURCES): New variable.
5282 (scsi_mod_CFLAGS): Likewise
5283 (scsi_mod_LDFLAGS): Likewise.
5284
5285 * disk/scsi.c: New file.
5286
5287 * include/grub/scsi.h: Likewise.
5288
5289 * include/grub/scsicmd.h: Likewise.
5290
5291 * disk/ata.c: Include <grub/scsi.h>.
5292 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5293 instead.
5294 (grub_ata_iterate): Skip ATAPI devices.
5295 (grub_ata_open): Only handle ATAPI devices.
5296 (struct grub_atapi_read): Removed.
5297 (grub_atapi_readsector): Likewise.
5298 (grub_ata_read): No longer handle ATAPI devices.
5299 (grub_ata_write): Likewise.
5300 (grub_atapi_iterate): New function.
5301 (grub_atapi_read): Likewise.
5302 (grub_atapi_write): Likewise.
5303 (grub_atapi_open): Likewise.
5304 (grub_atapi_close): Likewise.
5305 (grub_atapi_dev): New variable.
5306 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5307 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5308
5309 * include/grub/disk.h (enum grub_disk_dev_id): Add
5310 `GRUB_DISK_DEVICE_SCSI_ID'.
5311
c07ae501 53122008-08-26 Robert Millan <rmh@aybabtu.com>
5313
5314 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5315 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5316 descriptive.
5317
5ed20adc 53182008-08-23 Bean <bean123ch@gmail.com>
5319
5320 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5321 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5322 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5323 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5324 dm_nv.mod.
5325 (raid5rec_mod_SOURCES): New macro.
5326 (raid5rec_mod_CFLAGS): Likewise.
5327 (raid5rec_mod_LDFLAGS): Likewise.
5328 (raid6rec_mod_SOURCES): Likewise.
5329 (raid6rec_mod_CFLAGS): Likewise.
5330 (raid6rec_mod_LDFLAGS): Likewise.
5331 (mdraid_mod_SOURCES): Likewise.
5332 (mdraid_mod_CFLAGS): Likewise.
5333 (mdraid_mod_LDFLAGS): Likewise.
5334 (dm_nv_mod_SOURCES): Likewise.
5335 (dm_nv_mod_CFLAGS): Likewise.
5336 (dm_nv_mod_LDFLAGS): Likewise.
5337
5338 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5339 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5340 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5341
5342 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5343 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5344
5345 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5346
5347 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5348
5349 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5350
5351 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5352
5353 * disk/raid5_recover.c: New file.
5354
5355 * disk/raid6_recover.c: Likewise.
5356
5357 * disk/mdraid_linux.c: Likewise.
5358
5359 * disk/dmraid_nvidia.c: Likewise.
5360
5361 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5362 ULONG_MAX.
5363
5364 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5365 calculate the size of raid device.
5366 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5367 different layout of raid5.
5368 (grub_raid_scan_device): Remove code specific to mdraid.
5369 (grub_raid_list): New variable.
5370 (free_array): New function.
5371 (grub_raid_register): Likewise.
5372 (grub_raid_unregister): Likewise.
5373 (grub_raid_rescan): Likewise.
5374 (GRUB_MOD_INIT): Don't iterate device here.
5375 (GRUB_MOD_FINI): Use free_array to release resource.
5376
5377 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5378 (grub_raid5_recover_func_t): New function variable type.
5379 (grub_raid6_recover_func_t): Likewise.
5380 (grub_raid5_recover_func): New variable.
5381 (grub_raid6_recover_func): Likewise.
5382 (grub_raid_register): New function.
5383 (grub_raid_unregister): Likewise.
5384 (grub_raid_rescan): Likewise.
5385 (grub_raid_block_xor): Likewise.
5386
5387 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5388 (CMD_CRC): New macro.
5389 (part): Removed.
5390 (read_file): Handle device as well as file.
5391 (cmd_crc): New function.
5392 (fstest): Handle multiple disks.
5393 (options): Remove part, raw and long, add root and diskcount.
5394 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 5395 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 5396 add handling for the new options, support multiple disks.
5397
5398 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5399
29c18915 54002008-08-23 Bean <bean123ch@gmail.com>
5401
5402 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5403
5404 * genfslist.sh: Ignore kernel.mod.
5405
5406 * genpartmaplist.sh: Likewise.
5407
8415f261 54082008-08-23 Robert Millan <rmh@aybabtu.com>
5409
5410 * util/getroot.c (find_root_device): Skip anything that starts with
5411 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5412
d5a7dc5b 54132008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 5414
d5a7dc5b 5415 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5416 * util/grub.d/00_header.in: Allow the administrator to change default
5417 gfxmode via ${GRUB_GFXMODE}.
5418
380cfbb4 54192008-08-21 Felix Zielcke <fzielcke@z-51.de>
5420
5421 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5422
c9baafe7 54232008-08-21 Robert Millan <rmh@aybabtu.com>
5424
5425 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5426 loader.
5427 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5428 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5429
e290bef2 54302008-08-20 Carles Pina i Estany <carles@pina.cat>
5431
5432 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5433 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5434
f9dbfc96 54352008-08-19 Robert Millan <rmh@aybabtu.com>
5436
5437 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5438 (struct grub_virtual_screen): Remove `cursor_color'.
5439 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5440 initialization.
5441 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5442
dd6bd6ab 54432008-08-18 Robert Millan <rmh@aybabtu.com>
5444
5445 Unify (identical) linux_normal.c files.
5446 * loader/i386/efi/linux_normal.c: Move from here ...
5447 * loader/linux_normal.c: ... to here. Update all users.
5448 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5449 * loader/i386/ieee1275/linux_normal.c: Likewise.
5450
7f42f83e 54512008-08-18 Robert Millan <rmh@aybabtu.com>
5452
5453 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5454 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5455 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5456 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5457 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5458 New macros.
5459 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5460 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5461 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5462 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5463 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5464 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5465 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5466 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5467 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5468 portably using grub_getxy().
5469 Replace `-EFI' with `-bzImage' in boot message.
5470
38487ddb 54712008-08-17 Robert Millan <rmh@aybabtu.com>
5472
5473 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5474
deceb3ec 54752008-08-17 Robert Millan <rmh@aybabtu.com>
5476
5477 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5478
5479 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5480 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5481 (grub_machine_mmap_iterate): New function declaration.
5482 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5483 structure.
5484 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5485 macros.
5486
5487 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5488 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5489 Move e820 parsing from here ...
5490 * kern/i386/pc/mmap.c: New file.
5491 (grub_machine_mmap_iterate): ... to here.
5492
5493 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5494 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5495 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5496 (grub_available_iterate): Redeclare to return `void', and redeclare
5497 its hook to use grub_uint64_t as addr and size parameters, and rename
5498 to ...
5499 (grub_machine_mmap_iterate): ... this. Update all users.
5500
5501 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5502 to make it more readable. Rename to ...
5503 (grub_machine_mmap_iterate): ... this.
5504
5505 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5506 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5507 (grub_multiboot): Allocate an extra region after the payload, and fill
5508 it with a Multiboot memory map. Adjust a.out loader to calculate size
5509 with the extra space.
5510 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5511 with the extra space.
5512
f8aa0f43 55132008-08-17 Carles Pina i Estany <carles@pina.cat>
5514
9807deb9 5515 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 5516
605f5bb6 55172008-08-17 Felix Zielcke <fzielcke@z-51.de>
5518
5519 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5520 mdate-sh to the list `find' searches for.
5521 * DISTLIST: Regenerated.
5522
210db6c6 55232008-08-16 Felix Zielcke <fzielcke@z-51.de>
5524
5525 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5526 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 5527 genmoddep.awk, gensymlist.sh.in.
5528 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 5529 * DISTLIST: Regenerated.
48cdbfd4 5530 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 5531
1082b929 55322008-08-16 Robert Millan <rmh@aybabtu.com>
5533
5534 * disk/raid.c (grub_raid_init): Handle/report errors set by
5535 grub_device_iterate().
5536 * disk/lvm.c (grub_lvm_init): Likewise.
5537
42ce5170 55382008-08-15 Bean <bean123ch@gmail.com>
5539
5540 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5541 and datehook.mod.
5542 (datetime_mod_SOURCES): New macro.
5543 (datetime_mod_CFLAGS): Likewise.
5544 (datetime_mod_LDFLAGS): Likewise.
5545 (date_mod_SOURCES): Likewise.
5546 (date_mod_CFLAGS): Likewise.
5547 (date_mod_LDFLAGS): Likewise.
5548 (datehook_mod_SOURCES): Likewise.
5549 (datehook_mod_CFLAGS): Likewise.
5550 (datehook_mod_LDFLAGS): Likewise.
5551
5552 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5553 and datehook.mod.
5554 (datetime_mod_SOURCES): New macro.
5555 (datetime_mod_CFLAGS): Likewise.
5556 (datetime_mod_LDFLAGS): Likewise.
5557 (date_mod_SOURCES): Likewise.
5558 (date_mod_CFLAGS): Likewise.
5559 (date_mod_LDFLAGS): Likewise.
5560 (datehook_mod_SOURCES): Likewise.
5561 (datehook_mod_CFLAGS): Likewise.
5562 (datehook_mod_LDFLAGS): Likewise.
5563
5564 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5565 and datehook.mod.
5566 (datetime_mod_SOURCES): New macro.
5567 (datetime_mod_CFLAGS): Likewise.
5568 (datetime_mod_LDFLAGS): Likewise.
5569 (date_mod_SOURCES): Likewise.
5570 (date_mod_CFLAGS): Likewise.
5571 (date_mod_LDFLAGS): Likewise.
5572 (datehook_mod_SOURCES): Likewise.
5573 (datehook_mod_CFLAGS): Likewise.
5574 (datehook_mod_LDFLAGS): Likewise.
5575
5576 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5577 and datehook.mod.
5578 (datetime_mod_SOURCES): New macro.
5579 (datetime_mod_CFLAGS): Likewise.
5580 (datetime_mod_LDFLAGS): Likewise.
5581 (date_mod_SOURCES): Likewise.
5582 (date_mod_CFLAGS): Likewise.
5583 (date_mod_LDFLAGS): Likewise.
5584 (datehook_mod_SOURCES): Likewise.
5585 (datehook_mod_CFLAGS): Likewise.
5586 (datehook_mod_LDFLAGS): Likewise.
5587
5588 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5589 and datehook.mod.
5590 (datetime_mod_SOURCES): New macro.
5591 (datetime_mod_CFLAGS): Likewise.
5592 (datetime_mod_LDFLAGS): Likewise.
5593 (date_mod_SOURCES): Likewise.
5594 (date_mod_CFLAGS): Likewise.
5595 (date_mod_LDFLAGS): Likewise.
5596 (datehook_mod_SOURCES): Likewise.
5597 (datehook_mod_CFLAGS): Likewise.
5598 (datehook_mod_LDFLAGS): Likewise.
5599
5600 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5601
5602 * commands/date.c: New file.
5603
5604 * hook/datehook.c: Likewise.
5605
5606 * include/grub/lib/datetime.h: Likewise.
5607
5608 * include/grub/i386/cmos.h: Likewise.
5609
5610 * lib/datetime.c: Likewise.
5611
5612 * lib/i386/datetime.c: Likewise.
5613
5614 * lib/efi/datetime.c: Likewise.
5615
0e9242da 56162008-08-14 Robert Millan <rmh@aybabtu.com>
5617
5618 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5619 (grub_mkelfimage_SOURCES): New variable.
5620 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5621
5622 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5623 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5624 * conf/powerpc-ieee1275.rmk: Likewise.
5625 * conf/i386-ieee1275.rmk: Likewise.
5626
5627 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5628 * kern/i386/coreboot/init.c: Likewise.
5629
5630 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5631 with `<grub/cpu/kernel.h>'.
5632 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5633 to ...
5634 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5635 * kern/i386/coreboot/startup.S: Likewise.
5636
5637 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5638 (GRUB_MOD_GAP): Remove.
5639 * include/grub/powerpc/kernel.h: New file.
5640 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5641 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5642 * include/grub/i386/kernel.h: New file.
5643 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5644 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5645 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5646
5647 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5648 `grub-mkelfimage'.
5649 Use --directory when invoking grub_mkimage.
5650
5651 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5652 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5653 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5654 and GRUB_KERNEL_CPU_PREFIX.
5655
b86408f8 56562008-08-14 Felix Zielcke <fzielcke@z-51.de>
5657
d5e619ca 5658 * include/grub/err.h (grub_err_printf): New function prototype.
5659 * util/misc.c (grub_err_printf): New function.
5660 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5661 grub_printf.
5662 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5663
7161f0e0 56642008-08-13 Robert Millan <rmh@aybabtu.com>
5665
5666 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5667
a1967522 56682008-08-13 Robert Millan <rmh@aybabtu.com>
5669
5670 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5671 boot entry.
5672
371458b5 56732008-08-12 Robert Millan <rmh@aybabtu.com>
5674
5675 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5676 of the relocation code from here ...
5677 (grub_multiboot): ... to here.
5678 (forward_relocator, backward_relocator): Move from here ...
5679 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5680 (grub_multiboot_backward_relocator): ... to here.
5681 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5682 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5683 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5684 (grub_multiboot_forward_relocator_end)
5685 (grub_multiboot_backward_relocator)
5686 (grub_multiboot_backward_relocator_end): New variables.
5687
05f9452b 56882008-08-12 Bean <bean123ch@gmail.com>
5689
5690 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5691
20024ab0 56922008-08-11 Robert Millan <rmh@aybabtu.com>
5693
5694 * kern/i386/linuxbios/startup.S: Move from here ...
5695 * kern/i386/coreboot/startup.S: ... to here.
5696
5697 * kern/i386/linuxbios/init.c: Move from here ...
5698 * kern/i386/coreboot/init.c: ... to here.
5699
5700 * kern/i386/linuxbios/table.c: Move from here ...
5701 * kern/i386/coreboot/mmap.c: ... to here.
5702
5703 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5704
e352e9cd 57052008-08-11 Robert Millan <rmh@aybabtu.com>
5706
5707 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5708 errors. Leave it to the upper layer to handle them.
5709
2d05bc6a 57102008-08-09 Christian Franke <franke@computer.org>
5711
5712 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5713 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5714 Install `grub.d/10_windows' only on Cygwin.
5715 * configure.ac: Add subst of `target_os'.
5716 Check `target_os' also before setting TARGET_OBJ2ELF.
5717 Add `--enable-grub-pe2elf'.
5718
042bd419 57192008-08-08 Robert Millan <rmh@aybabtu.com>
5720
5721 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5722 (grub_last_time): Change type to grub_uint64_t.
5723 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5724 (grub_disk_close): Likewise.
5725
5726 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5727 (run_menu): Migrate code from to using grub_get_time_ms().
5728
5729 * util/misc.c (grub_get_time_ms): New function.
5730
7f280db5 57312008-08-08 Marco Gerards <marco@gnu.org>
5732
5733 * disk/ata.c (grub_ata_regget): Change return type to
5734 `grub_uint8_t'.
5735 (grub_ata_regget2): Likewise.
5736 (grub_ata_wait_status): New function.
5737 (grub_ata_wait_busy): Removed function, updated all users to use
5738 `grub_ata_wait_status'.
5739 (grub_ata_wait_drq): Likewise.
5740 (grub_ata_cmd): New function.
5741 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5742 error handling.
5743 (grub_ata_pio_write): Add error handling.
5744 (grub_atapi_identify): Likewise.
5745 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5746 handling.
5747 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5748 handling. Actually use the detected registers. Reorder the
5749 detection logic such that it is easier to read.
5750 (grub_ata_pciinit): Do not assign the same ID to each controller.
5751 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5752 handling.
5753 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5754
5755 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5756
1fbc5e66 57572008-08-08 Marco Gerards <marco@gnu.org>
5758
5759 * NEWS: Update.
5760
819ce6c0 57612008-08-07 Bean <bean123ch@gmail.com>
5762
5763 * include/grub/x86_64/pci.h: New file.
5764
5c41d44d 57652008-08-07 Christian Franke <franke@computer.org>
5766
5767 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5768 (TIMER2_GATE): Likewise.
5769 (grub_pit_wait): Add enable/disable of the timer2 gate
5770 bit of port 0x61. This fixes a possible infinite loop.
5771
5ebc275d 57722008-08-07 Bean <bean123ch@gmail.com>
5773
5774 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5775 kern/i386/tsc.c and kern/i386/pit.c.
5776
5777 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5778 x86_64 platform.
5779
5780 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5781 <grub/i386/tsc.h>.
5782
5783 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5784
e383b3d0 57852008-08-07 Bean <bean123ch@gmail.com>
5786
5787 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5788
5789 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5790
5791 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5792 multiple inclusion. Add #include <grub/types.h>.
5793
1cbb58ac 57942008-08-06 Christian Franke <franke@computer.org>
5795
5796 * conf/common.rmk: Build and install `10_windows'.
5797 * util/grub.d/10_windows.in: New script.
5798
337f5a1e 57992008-08-06 Pavel Roskin <proski@gnu.org>
5800
5801 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5802
057bc4ac 58032008-08-06 Robert Millan <rmh@aybabtu.com>
5804
5805 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5806 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5807
2b99f123 58082008-08-06 Bean <bean123ch@gmail.com>
5809
5810 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5811 (grub_pxefs_fs_int): Remove dummy definition.
5812 (grub_pxefs_open): Use data->block_size to store the current block
5813 size setting.
5814 (grub_pxefs_read): Use block size stored in data->block_size. As the
5815 value of grub_pxe_blksize can be changed after the file is opened.
5816
9f0234cb 58172008-08-06 Bean <bean123ch@gmail.com>
5818
5819 * fs/i386/pc/pxe.c (curr_file): new variable.
5820 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5821 require the dummy internal file system anymore.
5822 (grub_pxefs_read): Removed.
5823 (grub_pxefs_close): Likewise.
5824 (grub_pxefs_fs_int): Likewise.
5825 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5826 connection when we switch file.
5827 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5828
a55d42e0 58292008-08-06 Robert Millan <rmh@aybabtu.com>
5830
5831 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5832 `halt.mod'.
5833 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5834 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5835
5836 * kern/i386/halt.c: New file.
5837 * kern/i386/reboot.c: Likewise.
5838 * include/grub/i386/reboot.h: Likewise.
5839 * include/grub/i386/halt.h: Likewise.
5840
5841 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5842 Include `<grub/cpu/halt.h>'.
5843 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5844 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5845
5846 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5847 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5848 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5849 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5850 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5851 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5852 from here ...
5853 * include/grub/i386/at_keyboard.h: ... to here.
5854
24371d26 58552008-08-05 Robert Millan <rmh@aybabtu.com>
5856
5857 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5858 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5859 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5860 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5861 `kern/generic/millisleep.c'.
5862
5863 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5864 instead of grub_get_rtc().
5865 (grub_tsc_init): Initialize `tsc_boot_time'.
5866
5867 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5868 (grub_machine_init): Use grub_tsc_init() rather than
5869 installing an RTC-based handler via grub_install_get_time_ms().
5870
5871 * kern/i386/pit.c: New file.
5872 * include/grub/i386/pit.h: Likewise.
5873
9e7007b3 58742008-08-05 Bean <bean123ch@gmail.com>
5875
5876 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5877
5878 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5879 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5880 (pxe_mod_SOURCES): New macro.
5881 (pxe_mod_CFLAGS): Likewise.
5882 (pxe_mod_LDFLAGS): Likewise.
5883 (pxecmd_mod_SOURCES): Likewise.
5884 (pxecmd_mod_CFLAGS): Likewise.
5885 (pxecmd_mod_LDFLAGS): Likewise.
5886
5887 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5888 (grub_pxe_call): Likewise.
5889
5890 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5891
5892 * commands/i386/pc/pxecmd.c: New file.
5893
9f0234cb 5894 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 5895
5896 * include/grub/i386/pc/pxe.h: Likewise.
5897
6977d49f 58982008-08-05 Bean <bean123ch@gmail.com>
5899
5900 * util/console.c (grub_console_cur_color): New variable.
5901 (grub_console_standard_color): Likewise.
5902 (grub_console_normal_color): Likewise.
5903 (grub_console_highlight_color): Likewise.
5904 (color_map): Likewise.
5905 (use_color): Likewise.
5906 (NUM_COLORS): New macro.
5907 (grub_ncurses_setcolorstate): Handle color properly.
5908 (grub_ncurses_setcolor): Don't change color here, just remember the
5909 settings, color will be set in grub_ncurses_setcolorstate.
5910 (grub_ncurses_getcolor): New function.
5911 (grub_ncurses_init): Initialize color pairs.
5912 (grub_ncurses_term): New member grub_ncurses_getcolor.
5913
9c2ff3ee 59142008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 5915
9c2ff3ee 5916 High resolution timer support. Implemented for x86 CPUs using TSC.
5917 Extracted generic grub_millisleep() so it's linked in only as needed.
5918 This requires a Pentium compatible CPU; if the RDTSC instruction is
5919 not supported, then it falls back on the generic grub_get_time_ms()
5920 implementation that uses the machine's RTC.
5921
5922 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5923 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5924 `kern/generic/millisleep.c'.
5925
5926 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5927 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5928
5929 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5930 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5931
5932 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5933
5934 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5935 `kern/generic/millisleep.c'.
5936
5937 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5938
5939 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5940
5941 * kern/generic/rtc_get_time_ms.c: New file.
5942
5943 * kern/generic/millisleep.c: New file.
337f5a1e 5944
9c2ff3ee 5945 * kern/misc.c: Don't include
5946 <kern/time.h> anymore.
5947 (grub_millisleep_generic): Removed.
5948
5949 * commands/sleep.c (grub_interruptible_millisleep): Uses
5950 grub_get_time_ms() instead of grub_get_rtc().
5951
5952 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5953 function.
5954 (grub_cpu_is_cpuid_supported): New inline function.
5955 (grub_cpu_is_tsc_supported): New inline function.
5956 (grub_tsc_init): New function prototype.
5957 (grub_tsc_get_time_ms): New function prototype.
5958
5959 * kern/i386/tsc.c (grub_get_time_ms): New file.
5960
5961 * include/grub/time.h: Include <grub/types.h.
5962 (grub_millisleep_generic): Removed.
5963 (grub_get_time_ms): New prototype.
5964 (grub_install_get_time_ms): New prototype.
5965 (grub_rtc_get_time_ms): New prototype.
5966
5967 * kern/time.c (grub_get_time_ms): New function.
5968 (grub_install_get_time_ms): New function.
5969
5970 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5971 <grub/time.h> anymore.
5972 (grub_millisleep): Removed.
5973 (grub_machine_init): Call grub_tsc_init.
5974
5975 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5976 get_time_ms() implementation.
5977
5978 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5979 (ieee1275_get_time_ms): New function.
5980 (grub_machine_init): Install get_time_ms() implementation.
5981
5982 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5983 (grub_machine_init): Call grub_tsc_init().
5984 (grub_millisleep): Removed.
bf06a93f 5985
9c2ff3ee 5986 * kern/ieee1275/init.c (grub_millisleep): Removed.
5987 (grub_machine_init): Install ieee1275_get_time_ms()
5988 implementation.
5989 (ieee1275_get_time_ms): New function.
5990 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5991 real work.
5992
9ec92aaf 59932008-08-05 Marco Gerards <marco@gnu.org>
5994
5995 * disk/ata.c: Include <grub/pci.h>.
5996 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5997 (grub_ata_initialize): Rewritten.
5998 (grub_ata_device_initialize): New function.
5999
8d23f507 60002008-08-04 Pavel Roskin <proski@gnu.org>
6001
6002 * kern/main.c: Include grub/mm.h.
6003
5e15ee3d 60042008-08-04 Robert Millan <rmh@aybabtu.com>
6005
6006 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6007 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6008 corruption problem).
6009
a9053f8f 60102008-08-04 Robert Millan <rmh@aybabtu.com>
6011
6012 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6013 warnings introduced in my last commit.
6014
dd19c7d7 60152008-08-03 Robert Millan <rmh@aybabtu.com>
6016
6017 Make PCI available on all i386 architectures.
6018
6019 * include/grub/i386/pc/pci.h: Move from here ...
6020 * include/grub/i386/pci.h: ... to here.
6021
6022 * include/grub/i386/pc/pci.h: Remove.
6023 * include/grub/i386/efi/pci.h: Remove.
6024 * include/grub/x86_64/efi/pci.h: Remove.
6025
6026 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6027 `<grub/cpu/pci.h>'.
6028
6029 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6030 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6031 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6032
6033 * conf/i386-ieee1275.rmk: Likewise.
6034
e14a6184 60352008-08-03 Robert Millan <rmh@aybabtu.com>
6036
6037 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6038 (grub_console_setcursor): Make it possible to set cursor off.
6039
52768e37 60402008-08-03 Robert Millan <rmh@aybabtu.com>
6041
6042 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6043 of modules instead of assuming which platform provides what.
6044 * util/update-grub.in: Likewise.
6045
2d52f57f 60462008-08-03 Robert Millan <rmh@aybabtu.com>
6047
6048 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6049 instead of `grub_install_dos_part' to determine whether a drive needs
6050 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 6051 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 6052
2a5cd121 60532008-08-02 Robert Millan <rmh@aybabtu.com>
6054
6055 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6056
93808428 60572008-08-02 Robert Millan <rmh@aybabtu.com>
6058
6059 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6060 of informational grub_dprintf() calls.
6061
3bd0a12a 60622008-08-02 Robert Millan <rmh@aybabtu.com>
6063
6064 * disk/memdisk.c (memdisk_size): Don't initialize.
6065 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6066
6067 * include/grub/i386/pc/kernel.h
6068 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6069 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6070 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6071 (grub_arch_memdisk_size): Remove.
6072
6073 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6074 field (was only used to transfer a constant). Add `type' field to
6075 support multiple module types.
6076 (grub_module_iterate): New function.
6077
6078 * kern/device.c (grub_device_open): Do not hide error messages
6079 when grub_disk_open() fails. Use grub_print_error() instead.
6080
6081 * kern/i386/pc/init.c (grub_arch_modules_addr)
6082 (grub_arch_memdisk_size): Remove functions.
6083 (grub_arch_modules_addr): Return the module address in high memory
6084 (now that it isn't copied anymore).
6085
6086 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6087 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6088 decompression routine (grub_total_module_size already includes that
6089 now). Don't copy modules back to low memory.
6090
6091 * kern/main.c: Include `<grub/mm.h>'.
6092 (grub_load_modules): Split out (and use) ...
6093 (grub_module_iterate): ... this function, which iterates through
6094 module objects and runs a hook.
6095 Comment out grub_mm_init_region() call, as it would cause non-ELF
6096 modules to be overwritten.
6097
6098 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6099 the memdisk image in its own region, make it part of the module list.
6100 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6101 (main): Parse --memdisk|-m option, and pass user-provided path as
6102 parameter to generate_image().
6103 (add_segments): Pass `memdisk_path' down to load_modules().
6104 (load_modules): Embed memdisk image in module section when requested.
6105 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6106 `header.type' instead of `header.offset'.
6107
6108 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6109 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6110 (memdisk_mod_LDFLAGS): New variables.
6111 * conf/i386-coreboot.rmk: Likewise.
6112 * conf/i386-ieee1275.rmk: Likewise.
6113
a927cc73 61142008-08-02 Robert Millan <rmh@aybabtu.com>
6115
6116 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6117 (backward_relocator): New variables. Used to allocate and relocate
6118 the payload, respectively.
6119 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 6120 address, install the appropriate relocator code in each bound of
a927cc73 6121 the payload, and set the entry point such that
6122 grub_multiboot_real_boot() will jump to one of them.
6123
6124 * kern/i386/loader.S (grub_multiboot_payload_size)
6125 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6126 (grub_multiboot_payload_entry_offset): New variables.
6127 (grub_multiboot_real_boot): Set cpu context to what the relocator
6128 expects, and jump to the relocator instead of the payload.
6129
6130 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6131 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6132 (grub_multiboot_payload_entry_offset): Export.
6133
b15d8a0c 61342008-08-01 Bean <bean123ch@gmail.com>
6135
6136 * normal/menu_entry.c (editor_getline): Don't return the original
6137 string as result, as it will be released by lexer once it has done
6138 using it.
6139
cdfb3d22 61402008-08-01 Robert Millan <rmh@aybabtu.com>
6141
6142 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6143 within menuentries, not before them.
6144 util/grub.d/10_hurd.in: Likewise.
6145
9175e93d 61462008-08-01 Bean <bean123ch@gmail.com>
6147
6148 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6149 (bufio_mod_SOURCES): New macro.
6150 (bufio_mod_CFLAGS): Likewise.
6151 (bufio_mod_LDFLAGS): Likewise.
6152
6153 * include/grub/bufio.h: New file.
6154
6155 * io/bufio.c: Likewise.
6156
6157 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6158 (grub_video_reader_png): Use grub_buffile_open to open file.
6159
6160 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6161 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6162
6163 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6164 (grub_video_reader_tga): Use grub_buffile_open to open file.
6165
6166 * font/manager.c: Include <grub/bufio.h>.
6167 (add_font): Use grub_buffile_open to open file.
6168
3d8383e7 61692008-07-31 Robert Millan <rmh@aybabtu.com>
6170
6171 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6172 ELF segments, use a macro for arbitrarily accessing any of them instead
6173 of preparing a pointer that allows access to one at a time.
6174 (grub_multiboot_load_elf64): Likewise.
6175
16e641b6 61762008-07-31 Bean <bean123ch@gmail.com>
6177
6178 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6179 GRUB_KERNEL_MACHINE_DATA_END.
6180
59198b72 61812008-07-30 Robert Millan <rmh@aybabtu.com>
6182
6183 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6184 Increase from 0x50 to 0x60.
6185 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6186 use UUIDs to identify the root drive for them. If that's not
6187 possible, abort.
6188 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6189 check, for cross-disk installs.
6190
ae88bca3 61912008-07-30 Robert Millan <rmh@aybabtu.com>
6192
6193 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6194 is non-empty, use it to set the `prefix' environment variable instead
6195 of the usual approach.
6196 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6197 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6198 environment variable instead of dummy make_install_device().
6199
6200 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6201 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 6202 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 6203
6204 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6205 New variable reference.
6206 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6207 New macro. Defines offset of `grub_prefix' within startup.S (relative
6208 to `start').
6209 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6210 section within startup.S (relative to `start').
6211 * include/grub/i386/coreboot/kernel.h: Likewise.
6212
6213 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6214 Overwrite grub_prefix with its contents, at the beginning of the
6215 first segment.
6216 (main): Understand -p|--prefix.
6217
14f41dd1 62182008-07-30 Robert Millan <rmh@aybabtu.com>
6219
6220 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6221
4ca049a3 62222008-07-30 Robert Millan <rmh@aybabtu.com>
6223
6224 * term/i386/pc/vga_text.c (grub_console_cls): Use
6225 grub_console_gotoxy() to go back to beginning of the screen.
6226 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6227
2921d337 62282008-07-29 Christian Franke <franke@computer.org>
6229
6230 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6231 Add conversion of emulated mount points on Cygwin.
6232
b609876d 62332008-07-29 Christian Franke <franke@computer.org>
6234
6235 * util/update-grub.in: Add a check for admin
6236 group on Cygwin.
6237 Remove old `grub.cfg.new' before creation.
6238 Add `-f' to `mv' to handle the different filesystem
6239 semantics of Windows.
6240
e93e4679 62412008-07-29 Bean <bean123ch@gmail.com>
6242
6243 * normal/main.c (get_line): Fix buffer overflow bug.
6244
41694fd0 62452008-07-28 Robert Millan <rmh@aybabtu.com>
6246
6247 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6248 (struct grub_apple_header): New struct. Describes the layout of
6249 the partmap header.
6250 (apple_partition_map_iterate): Check the header magic as well as the
6251 partition magic (which was already being checked).
6252
cfd0b4e6 62532008-07-28 Pavel Roskin <proski@gnu.org>
6254
6255 * genmk.rb: Add a warning to the beginning of the output that
6256 it's a generated file and should not be edited.
6257
93cce016 62582008-07-28 Robert Millan <rmh@aybabtu.com>
6259
6260 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6261 with the same number are found, just use issue a warning with
6262 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 6263
cd1df915 62642008-07-27 Robert Millan <rmh@aybabtu.com>
6265
6266 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6267 information.
6268
b70a8427 62692008-07-27 Bean <bean123ch@gmail.com>
6270
6271 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6272 (grub_fat_find_dir): Ignore case when comparing filename.
6273
8f5e379f 62742008-07-27 Bean <bean123ch@gmail.com>
6275
6276 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6277 smallino, as it's more descriptive, and i8count can be confused with
6278 the other field count.
6279 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6280 inode type.
6281
a85cd5a0 62822008-07-27 Bean <bean123ch@gmail.com>
6283
6284 * commands/crc.c: New file.
6285
6286 * lib/crc.c: Likewise.
6287
6288 * include/grub/lib/crc.h: Likewise.
6289
6290 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6291
6292 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6293 (hexdump): Move this function to ...
6294
6295 * lib/hexdump.c: ... here.
6296
6297 * include/grub/hexdump.h: Renamed to ...
6298
6299 * include/grub/lib/hexdump.h: ... this.
6300
6301 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6302
6303 * util/grub-editenv.c: Likewise.
6304
6305 * include/envblk.h: Renamed to ...
6306
6307 * include/lib/envblk.h: ... this.
6308
6309 * util/envblk.c: Renamed to ...
6310
6311 * lib/envblk.c: ... this.
6312
6313 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6314 lib/hexdump.c.
6315 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6316 (pkglib_MODULES): Add crc.mod.
6317 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6318 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6319 (crc_mod_SOURCES): New macro.
6320 (crc_mod_CFLAGS): Likewise.
6321 (crc_mod_LDFLAGS): Likewise.
6322
6323 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6324
6325 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6326
6327 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6328
6329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6330
6331 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6332
c298def0 63332008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 6334
6335 * commands/help.c: Include <grub/term.h>.
6336 (TERM_WIDTH): Removed. Updated all users.
6337
cc349fb3 63382008-07-27 Pavel Roskin <proski@gnu.org>
6339
6340 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6341 spurious warnings about a comment within a comment.
6342
9051607e 63432008-07-25 Robert Millan <rmh@aybabtu.com>
6344
6345 * util/getroot.c (find_root_device): Skip devices that match
6346 /dev/dm-[0-9]. This lets the real device be found for any type of
6347 abstraction (LVM, EVMS, RAID..).
6348 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6349 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6350 device is found first, find_root_device() will now skip it.
6351
01453bfc 63522008-07-24 Pavel Roskin <proski@gnu.org>
6353
6354 * include/grub/types.h: Use __builtin_bswap32() and
6355 __builtin_bswap64() with gcc 4.3 and newer.
6356
6af9849f 63572008-07-24 Christian Franke <franke@computer.org>
6358
3a0fa256 6359 * util/i386/pc/grub-install.in: If `--debug' is specified,
6360 pass `--verbose' to grub-setup.
6361 Abort script if make_system_path_relative_to_its_root() fails.
6362
7810e747 63632008-07-24 Bean <bean123ch@gmail.com>
6364
6365 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6366 variable `target_platform' should be `platform'.
6367
42290e17 63682008-07-24 Bean <bean123ch@gmail.com>
6369
51cc5193 6370 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 6371 (grub_png_init_fixed_block): New function.
6372 (grub_png_decode_image_data): Handle fixed huffman code compression.
6373
2a8a80e4 63742008-07-24 Bean <bean123ch@gmail.com>
6375
6376 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6377 (grub_pe2elf_SOURCES): New macro.
6378 (CLEANFILES): Add grub-pe2elf.
6379
6380 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6381 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6382 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6383 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6384 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6385 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6386 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6387 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6388 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6389 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6390 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6391 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6392 (GRUB_PE32_DT_FUNCTION): Likewise.
6393 (GRUB_PE32_REL_I386_DIR32): Likewise.
6394 (GRUB_PE32_REL_I386_REL32): Likewise.
6395 (grub_pe32_symbol): New structure.
6396 (grub_pe32_reloc): Likewise.
6397
6398 * util/grub-pe2elf.c: New file.
6399
6400 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6401 start symbol in non pc platform.
6402
6403 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6404
6405 The following patches are from Christian Franke.
6406
6407 * include/grub/dl.h: Remove .previous, gas supports this only
6408 for ELF format.
6409
6410 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6411 Remove .type, gas supports this only for ELF format.
6412
6413 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6414 nullbytes in symbol table. This fixes an infinite loop if table is
6415 zero filled.
6416
6417 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6418 TARGET_IMG_LDFLAGS and EXEEXT.
6419
6420 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6421 TARGET_IMG_LDFLAGS_AC.
6422 (grub_CHECK_STACK_ARG_PROBE): New function.
6423
6424 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6425
6426 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6427
6428 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6429 to set TARGET_IMG_LD* accordingly.
6430 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6431 Add call to grub_CHECK_STACK_ARG_PROBE.
6432 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6433
6434 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6435
6436 * genmk.rb: Add EXEEXT to CLEANFILES.
6437
12ccdb75 64382008-07-23 Robert Millan <rmh@aybabtu.com>
6439
6440 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6441 define the codes for arrows and lines used for the menu).
6442 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6443 as well.
6444
6445 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6446 fonts, because the latter are too slow.
6447
18eeaf04 64482008-07-21 Bean <bean123ch@gmail.com>
6449
6450 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6451 a20. Run keyboard test last, as it will cause macbook to halt.
6452
b095e2ad 64532008-07-18 Pavel Roskin <proski@gnu.org>
6454
6455 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6456 load foreign architecture modules correctly anyway. Keep
6457 support for loading host architecture modules, whether we
6458 compile them or not.
6459
737feb35 64602008-07-17 Pavel Roskin <proski@gnu.org>
6461
3f4ce737 6462 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6463 change target_cpu. The compiler default can mismatch target_cpu
6464 in any case.
6465
4ad2d049 6466 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6467 * kern/efi/efi.c: Likewise.
6468
f6130a12 6469 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6470 target compiler is functional.
6471 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6472 are set up.
6473
58393a2d 6474 * configure.ac: Default to efi platform for x86_64-apple. Allow
6475 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6476 adjustments from the rest, only do them if target is not
6477 explicitly given. Merge other adjustments with the final sanity
6478 check. Remove an extraneous check for supported CPU. Be
6479 specific which CPU and which platform is not supported.
6480
737feb35 6481 * configure.ac: Default to pc platform for x86_64.
6482
546f966a 64832008-07-17 Robert Millan <rmh@aybabtu.com>
6484
6485 Partial LinuxBIOS -> Coreboot rename.
6486
6487 * conf/i386-linuxbios.rmk: Renamed to ...
6488 * conf/i386-coreboot.rmk: ... this.
6489 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6490 * configure.ac: Accept "coreboot" as input platform (but maintain
6491 compatibility with "linuxbios").
6492 * include/grub/i386/linuxbios: Renamed to ...
6493 * include/grub/i386/coreboot: ... this.
6494
20011694 64952008-07-17 Bean <bean123ch@gmail.com>
6496
6497 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 6498 (appleldr_mod_SOURCE): New variable.
20011694 6499 (appleldr_mod_CFLAGS): Likewise.
6500 (appleldr_mod_LDFLAGS): Likewise.
6501 (pci_mod_SOURCES): Likewise.
6502 (pci_mod_CFLAGS): Likewise.
6503 (pci_mod_LDFLAGS): Likewise.
6504 (lspci_mod_SOURCES): Likewise.
6505 (lspci_mod_CFLAGS): Likewise.
6506 (lspci_mod_LDFLAGS): Likewise.
6507
6508 * conf/x86_64-efi.rmk: New file.
6509
6510 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6511 macro.
6512 (grub_efidisk_write): Likewise.
6513
6514 * include/efi/api.h (efi_call_0): New macro.
6515 (efi_call_1): Likewise.
6516 (efi_call_2): Likewise.
6517 (efi_call_3): Likewise.
6518 (efi_call_4): Likewise.
6519 (efi_call_5): Likewise.
6520 (efi_call_6): Likewise.
6521
6522 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6523 grub_rescue_cmd_chainloader.
6524
6525 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6526 (grub_pe32_optional_header): Change some fields based on i386 or
6527 x86_64 platform.
6528 (GRUB_PE32_PE32_MAGIC): Likewise.
6529
6530 * include/grub/efi/uga_draw.h: New file.
6531
6532 * include/grub/elf.h (STN_ABS): New constant.
6533 (R_X86_64_NONE): Relocation constant for x86_64.
6534 (R_X86_64_64): Likewise.
6535 (R_X86_64_PC32): Likewise.
6536 (R_X86_64_GOT32): Likewise.
6537 (R_X86_64_PLT32): Likewise.
6538 (R_X86_64_COPY): Likewise.
6539 (R_X86_64_GLOB_DAT): Likewise.
6540 (R_X86_64_JUMP_SLOT): Likewise.
6541 (R_X86_64_RELATIVE): Likewise.
6542 (R_X86_64_GOTPCREL): Likewise.
6543 (R_X86_64_32): Likewise.
6544 (R_X86_64_32S): Likewise.
6545 (R_X86_64_16): Likewise.
6546 (R_X86_64_PC16): Likewise.
6547 (R_X86_64_8): Likewise.
6548 (R_X86_64_PC8): Likewise.
6549
6550 * include/grub/i386/efi/pci.h: New file.
6551
6552 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6553 Change it value based on platform.
6554 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6555 (GRUB_E820_RAM): Likewise.
6556 (GRUB_E820_RESERVED): Likewise.
6557 (GRUB_E820_ACPI): Likewise.
6558 (GRUB_E820_NVS): Likewise.
6559 (GRUB_E820_EXEC_CODE): Likewise.
6560 (GRUB_E820_MAX_ENTRY): Likewise.
6561 (grub_e820_mmap): New structure.
6562 (linux_kernel_header): Change the efi field according to different
6563 kernel version, also field from linux_kernel_header.
6564
6565 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6566
6567 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6568 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6569 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6570 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6571 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6572 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6573 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6574 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6575 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6576 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6577
6578 * include/grub/x86_64/efi/kernel.h: New file.
6579
6580 * include/grub/x86_64/efi/loader.h: Likewise.
6581
6582 * include/grub/x86_64/efi/machine.h: Likewise.
6583
6584 * include/grub/x86_64/efi/pci.h: Likewise.
6585
6586 * include/grub/x86_64/efi/time.h: Likewise.
6587
6588 * include/grub/x86_64/linux.h: Likewise.
6589
6590 * include/grub/x86_64/setjmp.h: Likewise.
6591
6592 * include/grub/x86_64/time.h: Likewise.
6593
6594 * include/grub/x86_64/types.h: Likewise.
6595
6596 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6597 GRUB_TARGET_SIZEOF_VOID_P.
6598
6599 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6600 (grub_efi_locate_handle): Likewise.
6601 (grub_efi_open_protocol): Likewise.
6602 (grub_efi_set_text_mode): Likewise.
6603 (grub_efi_stall): Likewise.
6604 (grub_exit): Likewise.
6605 (grub_reboot): Likewise.
6606 (grub_halt): Likewise.
6607 (grub_efi_exit_boot_services): Likewise.
6608 (grub_get_rtc): Likewise.
6609
6610 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6611 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6612 (grub_efi_allocate_pages): Wrap efi calls.
6613 (grub_efi_free_pages): Wrap efi calls.
6614 (grub_efi_get_memory_map): Wrap efi calls.
6615
6616 * kern/x86_64/dl.c: New file.
6617
6618 * kern/x86_64/efi/callwrap.S: Likewise.
6619
6620 * kern/x86_64/efi/startup.S: Likewise.
6621
6622 * loader/efi/appleloader.c: Likewise.
6623
6624 * loader/efi/chainloader.c (cmdline): New variable.
6625 (grub_chainloader_unload): Wrap efi calls.
6626 (grub_chainloader_boot): Likewise.
6627 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6628 command line.
6629
6630 * loader/efi/chainloader_normal.c (chainloader_command):
6631 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6632 command line.
6633
6634 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6635 method.
6636 (grub_e820_add_region): New function.
6637 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6638 booting.
6639 (grub_find_video_card): New function.
6640 (grub_linux_setup_video): New function.
6641 (grub_rescue_cmd_linux): Probe for video information.
6642
6643 * normal/x86_64/setjmp.S: New file.
6644
6645 * term/efi/console.c (map_char): New function.
6646 (grub_console_putchar): Map unicode char.
6647 (grub_console_checkkey): Wrap efi calls.
6648 (grub_console_getkey): Likewise.
6649 (grub_console_getwh): Likewise.
6650 (grub_console_gotoxy): Likewise.
6651 (grub_console_cls): Likewise.
6652 (grub_console_setcolorstate): Likewise.
6653 (grub_console_setcursor): Likewise.
6654
6655 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6656
59652a20 66572008-07-16 Pavel Roskin <proski@gnu.org>
6658
ef294055 6659 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6660 format strings.
6661
59652a20 6662 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6663 pointer, not an integer. This fixes a warning and prevents
6664 precision loss on 64-bit systems.
6665 (relocate_addresses): Remove unneeded cast.
6666
afc3b5d7 66672008-07-15 Pavel Roskin <proski@gnu.org>
6668
506b2b3e 6669 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6670
62ead89c 6671 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6672
c4cd51d7 6673 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6674 Fix comparison between signed and unsigned.
6675
0d3d8f28 6676 * include/grub/i386/ieee1275/console.h: Declare
6677 grub_console_init() and grub_console_fini().
6678
8804b286 6679 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6680 It's empty and unused.
6681
ee01cf35 6682 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6683 beginning to avoid warnings with some compilers.
6684
afc3b5d7 6685 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6686 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6687
e4e8eaa5 66882008-07-14 Pavel Roskin <proski@gnu.org>
6689
407aceb4 6690 * kern/env.c (grub_register_variable_hook): Don't copy empty
6691 string, it leaks memory. Pass "" to grub_env_set(), it should
6692 handle constant strings.
6693
e4e8eaa5 6694 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6695 * commands/cmp.c (grub_cmd_cmp): Likewise.
6696 * kern/dl.c (grub_dl_flush_cache): Likewise.
6697 (grub_dl_load_core): Likewise.
6698 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6699 (grub_elf64_load_phdrs): Likewise.
6700
d4e2dad3 67012008-07-13 Pavel Roskin <proski@gnu.org>
6702
6703 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6704 between signed and unsigned.
6705 (LzmaEnc_Finish): Fix warning about an unused parameter.
6706
aa24b516 67072008-07-13 Bean <bean123ch@gmail.com>
6708
6709 * Makefile.in (enable_lzo): New rule.
6710
6711 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6712
6713 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6714
6715 * boot/i386/pc/lnxboot.S: #include <config.h>.
6716
6717 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6718 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6719
6720 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6721 compression algorithm according to configure macro.
6722
6723 * kern/i386/pc/startup.S (codestart): Likewise.
6724
6725 * kern/i386/pc/lzma_decode.S: New file.
6726
6727 * include/grub/lib/LzFind.h: Likewise.
6728
6729 * include/grub/lib/LzHash.h: Likewise.
6730
6731 * include/grub/lib/LzmaDec.h: Likewise.
6732
6733 * include/grub/lib/LzmaEnc.h: Likewise.
6734
6735 * include/grub/lib/LzmaTypes.h: Likewise.
6736
6737 * lib/LzFind.c: Likewise.
6738
6739 * lib/LzmaDec.c: Likewise.
6740
6741 * lib/LzmaEnc.c: Likewise.
6742
4ae821ac 67432008-07-13 Bean <bean123ch@gmail.com>
6744
6745 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6746 (grub_ext4_extent_header): New structure.
6747 (grub_ext4_extent): Likewise.
6748 (grub_ext4_extent_idx): Likewise.
6749 (grub_ext4_find_leaf): New function.
6750 (grub_ext2_read_block): Handle extents.
6751
9a745147 67522008-07-12 Robert Millan <rmh@aybabtu.com>
6753
6754 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6755
d49a4cf6 67562008-07-11 Robert Millan <rmh@aybabtu.com>
6757
6758 * util/grub.d/40_custom.in: New file. Example on how to add custom
6759 entries to /etc/grub.d.
6760 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6761 40_custom (implicitly, by merging all the grub.d rules).
6762
947414b4 67632008-07-11 Pavel Roskin <proski@gnu.org>
6764
0059cf6f 6765 * commands/read.c (grub_getline): Fix invalid memory access.
6766 Don't add newline to the variable value.
6767
947414b4 6768 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6769 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6770 (serial_hw_get_port): Check validity of the port number.
6771 (grub_cmd_serial): Check return value of serial_hw_get_port().
6772
62a02d00 67732008-07-07 Pavel Roskin <proski@gnu.org>
6774
6775 * boot/i386/pc/diskboot.S (notification_string): Replace
6776 "Loading kernel" with just "loading". This is shorter, less
6777 confusing and saves a few bytes for possible future changes.
6778
3e5581b0 67792008-07-05 Pavel Roskin <proski@gnu.org>
6780
ea387a48 6781 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6782 size for ATAPI devices, they are undefined. Output sector
6783 number in decimal form.
6784
3e5581b0 6785 * disk/ata.c: Use named constants for status bits.
6786
fdecb8fd 67872008-07-04 Pavel Roskin <proski@gnu.org>
6788
bcd35b90 6789 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6790 grub_addr_t before casting it to the void pointer to fix a
6791 warning. Non-addressable regions are discarded earlier.
6792 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6793 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6794 (check_signature): Don't shadow table_header.
6795 (grub_linuxbios_table_iterate): Cast numeric constants to
6796 grub_linuxbios_table_header_t.
6797 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6798 grub_stop().
6799
af58ab3d 6800 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6801 prevent warnings.
6802
1759aa57 6803 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6804 pointer, which can cause warnings. Support 64-bit addresses.
6805
fdecb8fd 6806 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6807 of sizeof(long). This fixes PowerPC image generation on x86_64.
6808
8516d2a8 68092008-07-04 Robert Millan <rmh@aybabtu.com>
6810
6811 This fixes a performance issue when pc & gpt partmap iterators
6812 didn't abort iteration even after our hook found what it was
fe987087 6813 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6814
6815 Some callers relied on previous buggy behaviour, since they would
34c44600 6816 raise an error when their own hooks caused early abortion of its
8516d2a8 6817 iteration.
6818
6819 * kern/device.c (grub_device_open): Improve error message.
6820 * disk/lvm.c (grub_lvm_open): Likewise.
6821 * disk/raid.c (grub_raid_open): Likewise.
6822
6823 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6824 when hook requests it, independently of grub_errno.
6825 (pc_partition_map_probe): Do not fail when find_func() caused
6826 early abortion of pc_partition_map_iterate().
6827
6828 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6829 when hook requests it, independently of grub_errno.
6830 (gpt_partition_map_probe): Do not fail when find_func() caused
6831 early abortion of gpt_partition_map_iterate().
6832
6833 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6834 when hook requests it, independently of grub_errno. Do not fail when
6835 part_map_iterate_hook() caused early abortion of p->iterate().
6836
6837 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6838 when grub_partition_iterate() returned with non-zero.
6839
277d0de9 68402008-07-03 Pavel Roskin <proski@gnu.org>
6841
6842 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6843 like we do in grub_ata_pio_read().
6844 (grub_ata_readwrite): Always write individual sectors. Fix the
6845 sector count for the remainder.
6846 (grub_ata_write): Enable writing to ATA devices. Correctly
6847 report error for ATAPI devices.
6848
d4c9b428 68492008-07-02 Pavel Roskin <proski@gnu.org>
6850
e43fc690 6851 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6852 warning.
6853
f707af42 6854 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6855 for every read sector, we already increment it for the whole
6856 batch. This fixes reading more than 256 sectors at once.
6857
11e16b15 6858 * util/grub-editenv.c (cmd_info): Cast argument to long
6859 explicitly. ptrdiff_t reduces to int on i386.
6860
cbabfdd4 6861 * util/grub-editenv.c (main): Be specific which parameter is
6862 missing.
6863
b8fbce0a 6864 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6865 (memdisk): Make memdisk_orig_addr a pointer.
6866
c9c8e606 6867 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6868 for file offsets, use grub_off_t instead. Fix printf format
6869 warnings.
6870
ca62e598 6871 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6872 there. Real unexpected warnings should not drown in the noise
6873 about known problems.
6874
ce8d1766 6875 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6876 grub_disk_addr_t for memory addresses.
6877
00c7a56a 6878 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6879 explicitly to fix a warning.
6880
08d3ef09 6881 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6882
cb71ba20 6883 * Makefile.in (MODULE_LDFLAGS): New variable.
6884 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6885 the linker accepts --build-id=none.
6886 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6887 MODULE_LDFLAGS.
6888 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6889
d4c9b428 6890 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6891 those in Linux XFS code. Provide a way to access 64-bit parent
6892 inode.
6893 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6894 the end of struct grub_xfs_dir_header.
6895
d4156eee 68962008-07-02 Bean <bean123ch@gmail.com>
6897
6898 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6899 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6900 and GRUB_IEEE1275_FLAG_NO_ANSI.
6901
6902 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6903 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6904 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6905
6906 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6907 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6908
6909 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6910 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6911
6912 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6913 esc sequence on non ANSI terminal.
6914 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6915
6916 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6917 beginning of file.
6918
2270f77b 69192008-07-02 Bean <bean123ch@gmail.com>
6920
6921 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6922 (grub_editenv_SOURCES): New variable.
6923 (pkglib_MODULES): Add loadenv.mod.
6924 (loadenv_mod_SOURCES): New variable.
6925 (loadenv_mod_CFLAGS): Likewise.
6926 (loadenv_mod_LDFLAGS): Likewise.
6927
6928 * include/grub/envblk.h: New file.
6929
6930 * util/envblk.c: New file.
6931
6932 * util/grub-editenv.c: New file.
6933
6934 * commands/loadenv.c: New file.
6935
0e9e51ec 69362008-07-01 Pavel Roskin <proski@gnu.org>
6937
d89b7634 6938 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6939 not unsigned char. This fixes warnings and is consistent with
6940 other tags.
6941
bf1835b1 6942 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6943
8222a04b 6944 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6945
6a42d99d 6946 * term/tparm.c (analyze): Always set *popcount.
6947
10b159d1 6948 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6949 cast to fix a warning.
6950
b8789f6c 6951 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6952 cast to suppress a warning.
6953
29d7e38a 6954 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6955 grub_fshelp_read_file() expects.
6956
f341f669 6957 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6958 write uuid as a 32-bit value in CPU byte order, so declare and
6959 use it as such.
6960
0e9e51ec 6961 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6962 long if the format specifier expects it.
6963 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6964 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6965 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6966 long to fix a warning.
6967 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6968 grub_dprintf() arguments to fix warnings.
6969
3aefa857 69702008-06-30 Pavel Roskin <proski@gnu.org>
6971
56c7668b 6972 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6973 install_bsd_part immediately before core.img is embedded or
6974 modified on disk. This fixes core.img verification if core.img
6975 cannot be embedded.
6976
3aefa857 6977 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6978 core_path to calculate the blocklist.
6979 Patch from Javier Martín <lordhabbit@gmail.com>
6980
5444088d 69812008-06-29 Robert Millan <rmh@aybabtu.com>
6982
6983 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6984 block to disk block.
6985 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6986 Patch from Niels Böhm <bitbucket@arcor.de>
6987
674835c8 69882008-06-29 Robert Millan <rmh@aybabtu.com>
6989
6990 * util/update-grub_lib.in (font_path): Search for fonts in
6991 /boot/grub first, which is more likely to be readable (we aren't
6992 deciding where fonts live, just looking for them).
6993
f527dbc8 69942008-06-26 Pavel Roskin <proski@gnu.org>
6995
6c2d8df6 6996 * util/biosdisk.c (read_device_map): Don't leave dead map
6997 entries for devices failing stat() check.
6998
f527dbc8 6999 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7000 core_path_dev for the core.img path on the target device.
7001
aebe3d13 70022008-06-26 Robert Millan <rmh@aybabtu.com>
7003
7004 * disk/fs_uuid.c: New file.
7005 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7006 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7007 (fs_uuid_mod_LDFLAGS): New variables.
7008 * include/grub/disk.h (grub_disk_dev_id): Add
7009 `GRUB_DISK_DEVICE_UUID_ID'.
7010 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7011 implement iterate().
7012
37aaf354 70132008-06-26 Robert Millan <rmh@aybabtu.com>
7014
7015 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7016 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7017 Linux image includes no initrd.
7018
25ff262a 70192008-06-21 Javier Martín <lordhabbit@gmail.com>
7020
7021 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7022 call to resolve the core image location that effectively appended the
7023 name twice.
7024
76a2bd44 70252008-06-21 Robert Millan <rmh@aybabtu.com>
7026
7027 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7028 call from here ...
7029
7030 * util/grub.d/10_hurd.in: ... to here ...
7031 * util/grub.d/10_linux.in: ... and here.
7032
650e1c79 70332008-06-19 Robert Millan <rmh@aybabtu.com>
7034
fe987087 7035 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 7036 after it has been set by grub_machine_set_prefix().
7037
6ce63911 70382008-06-19 Robert Millan <rmh@aybabtu.com>
7039
7040 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7041 search result when not saving to variable, not the other way around.
7042 When saving to variable, abort iteration as soon as a match is found.
7043
73940cec 70442008-06-19 Robert Millan <rmh@aybabtu.com>
7045
7046 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7047 check for partition that provides /boot/grub. Its logic is flawed,
7048 as it prevents prepare_grub_to_access_device() from being called
7049 multiple times.
7050
3c62a39d 70512008-06-19 Robert Millan <rmh@aybabtu.com>
7052
7053 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7054 "insmod" command directly when abstraction modules are needed,
fe987087 7055 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 7056 since it had already been processed).
7057
47395a42 70582008-06-19 Pavel Roskin <proski@gnu.org>
7059
7060 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7061 changed. This is needed in case GRUB_LIBDIR changes.
7062 * conf/i386-ieee1275.rmk: Likewise.
7063 * conf/i386-linuxbios.rmk: Likewise.
7064 * conf/i386-pc.rmk: Likewise.
7065 * conf/powerpc-ieee1275.rmk: Likewise.
7066
a145ac2d 70672008-06-18 Pavel Roskin <proski@gnu.org>
7068
7069 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7070 kernel_elf_symlist.c to symlist.c for consistency with other
7071 architectures. Update all users.
7072 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7073
7847c51e 70742008-06-18 Robert Millan <rmh@aybabtu.com>
7075
7076 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7077 it in prefix.
7078
7079 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7080 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7081 a RAID device, run setup() for all members independently on whether
7082 LVM abstraction is being used.
7083 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7084 If grub-mkimage has set `*install_dos_part == -2', don't override this
7085 value.
7086 Perform *install_dos_part adjustments independently on whether
7087 we're embedding or not.
7088 Clarify error message when image is too big for embedding.
7089 Remove duplicate *install_dos_part stanza.
7090
b23e5644 70912008-06-17 Robert Millan <rmh@aybabtu.com>
7092
7093 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7094 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7095 variables.
7096 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7097 values in grub_ofconsole_normal_color and
7098 grub_ofconsole_highlight_color (they're not directly related to
7099 background and foreground).
7100 (grub_ofconsole_setcolorstate): Extract background and foreground
7101 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7102
0aac2f79 71032008-06-17 Robert Millan <rmh@aybabtu.com>
7104
7105 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7106 /boot/grub for the check in last commit, not /boot (they could be
7107 different partitions).
7108
3cca7ef3 71092008-06-16 Robert Millan <rmh@aybabtu.com>
7110
7111 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7112 asked to setup access for the same partition that provides /boot,
7113 don't bother using UUIDs since our root already has the value we
7114 want.
7115
347396d8 71162008-06-16 Robert Millan <rmh@aybabtu.com>
7117
7118 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7119 I2O devices.
7120 Patch from Sven Mueller <sven@debian.org>.
7121
991477f8 71222008-06-16 Robert Millan <rmh@aybabtu.com>
7123
7124 * util/update-grub.in: Check for $EUID instead of $UID.
7125 Reported by Vincent Zweije.
7126
d31a32a1 71272008-06-16 Bean <bean123ch@gmail.com>
7128
fe987087 7129 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 7130 (grub_ext2_read_block): Likewise.
7131 (grub_ext2_read_inode): Likewise.
7132 (grub_ext2_mount): Likewise.
7133 (grub_ext2_close): Likewise.
7134 (grub_ext3_get_journal): Removed.
7135
fe987087 7136 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 7137 (grub_reiserfs_read_symlink): Likewise.
7138 (grub_reiserfs_mount): Likewise.
7139 (grub_reiserfs_open): Likewise.
7140 (grub_reiserfs_read): Likewise.
7141 (grub_reiserfs_close): Likewise.
7142 (grub_reiserfs_get_journal): Removed.
7143
7144 * fs/fshelp.c (grub_fshelp_read): Removed.
7145 (grub_fshelp_map_block): Likewise.
7146
7147 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7148 (grub_fshelp_journal): Likewise.
7149 (grub_fshelp_read): Likewise.
7150 (grub_fshelp_map_block): Likewise.
7151
3540a760 71522008-06-16 Pavel Roskin <proski@gnu.org>
7153
7154 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7155 floating point anymore.
7156 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7157
95614c84 71582008-06-15 Pavel Roskin <proski@gnu.org>
7159
7160 * commands/ls.c (grub_ls_list_files): Use integer calculations
7161 for human readable format, avoid floating point use.
7162 * kern/misc.c (grub_ftoa): Remove.
7163 (grub_vsprintf): Remove floating point support.
7164
50465dd6 71652008-06-15 Robert Millan <rmh@aybabtu.com>
7166
fe6b695a 7167 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 7168 devices.
7169 Reported by Max Vozeler.
7170
a9207284 71712008-06-15 Robert Millan <rmh@aybabtu.com>
7172
7173 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7174 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7175 skipped later.
7176 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7177 the beginning of the prefix.
7178
7179 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7180 It is assumed that if we have a memdisk, grub-mkimage has set
7181 grub_prefix to include the "(memdisk)" drive in it.
7182
a7cbd45a 71832008-06-15 Robert Millan <rmh@aybabtu.com>
7184
7185 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7186 Initialize keyboard controller after registering the terminal, so that
7187 grub_printf() can be called from grub_keyboard_controller_init().
7188
21cf716a 71892008-06-15 Robert Millan <rmh@aybabtu.com>
7190
7191 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7192 extent-btree which is written as big endian on disk.
7193 Reported by Alain Greppin <al@chilibi.org>.
7194
23a64d8e 71952008-06-14 Robert Millan <rmh@aybabtu.com>
7196
7197 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7198 * util/i386/pc/grub-install.in (modules): Likewise.
7199
d687651c 72002008-06-13 Pavel Roskin <proski@gnu.org>
7201
7202 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7203
dfe9ddd4 72042008-06-13 Bean <bean123ch@gmail.com>
7205
7206 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7207
7208 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7209
7210 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7211 to indicate sparse block.
7212
16ae7781 72132008-06-12 Pavel Roskin <proski@gnu.org>
7214
e6d1a308 7215 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7216 number, grub_fshelp_read() does it for us.
7217
16ae7781 7218 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7219 linear disk read with journal translation.
7220 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7221 * include/grub/fshelp.h: Declare grub_fshelp_read().
7222
40fd3a2b 72232008-06-09 Pavel Roskin <proski@gnu.org>
7224
7225 * fs/minix.c (grub_minix_mount): Handle error reading
7226 superblock.
7227
f5679726 72282008-06-08 Robert Millan <rmh@aybabtu.com>
7229
7230 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7231 don't append the RAID prefix afterwards.
7232 Reported by Clint Adams.
7233
ce525529 72342008-06-08 Robert Millan <rmh@aybabtu.com>
7235
7236 Based on description from Pavel:
7237 * kern/disk.c (grub_disk_check_range): Rename to ...
7238 (grub_disk_adjust_range): ... this. Add a comment explaining the
7239 tasks performed by this function.
7240
ad4936a0 72412008-06-08 Robert Millan <rmh@aybabtu.com>
7242
7243 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7244 `num_serial' (for consistency with other variables).
7245 (struct grub_ntfs_data): Add `uuid' member.
7246 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7247 (grub_ntfs_uuid): New function.
7248 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7249
dc20b0f9 72502008-06-07 Pavel Roskin <proski@gnu.org>
7251
7252 * util/biosdisk.c (open_device): Revert last change to the
7253 function, it broke installation. The sector needs to be
7254 different dependent on which device is opened.
7255
c5e3cfba 72562008-06-06 Robert Millan <rmh@aybabtu.com>
7257
7258 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7259 rest of GRUB, and breakage doesn't happen if its value were modified.
7260
7261 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7262 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7263 a constant (same value).
7264 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7265 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7266
26a1f8c4 72672008-06-06 Robert Millan <rmh@aybabtu.com>
7268
7269 * util/biosdisk.c (open_device): Do not modify sector offset when
7270 accessing a partition. kern/disk.c already handles this for us.
7271
25d6b327 72722008-06-06 Robert Millan <rmh@aybabtu.com>
7273
7274 * util/grub-emu.c (grub_machine_init): Move code in this function from
7275 here ...
7276 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7277 segfault in case grub_printf() is called).
7278
7279 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7280 grub_probe. Update all users not to explicitly add it again.
7281 (grub_device): New variable; contains corresponding device for grubdir.
7282 (fs_module, partmap_module, devabstraction_module): Pass
7283 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7284 every time.
7285
9ece62fb 72862008-06-05 Robert Millan <rmh@aybabtu.com>
7287
7288 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7289 is found, print it (same layout as with labels).
7290
1ad36d37 72912008-06-04 Robert Millan <rmh@aybabtu.com>
7292
7293 * util/biosdisk.c (get_drive): Rename to ...
7294 (find_grub_drive): ... this. Update all users.
7295
7296 (get_os_disk): Rename to ...
7297 (convert_system_partition_to_system_disk): ... this. Update all users.
7298
7299 (find_drive): Rename to ...
7300 (find_system_device): ... this. Update all users.
7301
e6a30859 73022008-06-04 Robert Millan <rmh@aybabtu.com>
7303
7304 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7305 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7306 (make_device_map): Likewise.
7307
00c108a4 73082008-06-01 Robert Millan <rmh@aybabtu.com>
7309
7310 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7311 before dereferencing it.
7312
7313 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7314 union with fat12/fat16-specific ones. Add some new fields, including
7315 `num_serial' for both versions.
7316 (struct grub_fat_data): Add `uuid' member.
7317 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7318 names. Initialize `data->uuid' using `num_serial'.
7319 (grub_fat_uuid): New function.
7320 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7321
7322 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7323 (grub_reiserfs_uuid): New function.
7324 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7325 member.
7326
7327 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7328 (grub_xfs_uuid): New function.
7329 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7330
1385c5bb 73312008-06-01 Robert Millan <rmh@aybabtu.com>
7332
7333 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7334 code that is backward compatible with pre-uuid search command.
7335
c682dfd7 73362008-05-31 Robert Millan <rmh@aybabtu.com>
7337
7338 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7339 floppies after everything else, to ensure floppy drive isn't accessed
7340 unnecessarily (patch from Bean).
7341
b7db5d47 73422008-05-31 Robert Millan <rmh@aybabtu.com>
7343
7344 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7345 not print device names when we were asked to set a variable.
7346
6e037aa9 73472008-05-31 Robert Millan <rmh@aybabtu.com>
7348
7349 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7350 using "cursor-on" and "cursor-off" commands (understood at least by
7351 the Open Firmware flavour on OLPC).
7352
41305bc8 73532008-05-31 Michael Gorven <michael@gorven.za.net>
7354
7355 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7356 on and off sequences.
7357
69ba137e 73582008-05-31 Robert Millan <rmh@aybabtu.com>
7359
7360 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7361 * util/update-grub.in: Likewise.
7362
520ae21b 73632008-05-30 Pavel Roskin <proski@gnu.org>
7364
7365 * util/biosdisk.c (linux_find_partition): Simplify logic and
7366 make the code more universal. Keep special processing for
7367 devfs, but use a simple rule for all other devices. If the
7368 device ends with a number, append 'p' and the partition number.
7369 Otherwise, append only the partition number.
7370
5786569b 73712008-05-30 Robert Millan <rmh@aybabtu.com>
7372
7373 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7374 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7375 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7376 the `root' parameter to Linux.
7377
51500452 73782008-05-30 Robert Millan <rmh@aybabtu.com>
7379
7380 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7381 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7382 --fs_uuid with --fs-uuid.
7383 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7384 all filesystems support them).
7385
811d3878 73862008-05-30 Robert Millan <rmh@aybabtu.com>
7387
7388 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 7389 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 7390
cab63c95 73912008-05-30 Robert Millan <rmh@aybabtu.com>
7392
7393 * util/grub.d/00_header.in: Remove obsolete comment referencing
7394 convert_system_path_to_grub_path().
7395 * util/update-grub.in: Likewise.
7396 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7397 (convert_system_path_to_grub_path): Add a warning message explaining
7398 that this function is deprecated. Rely on is_path_readable_by_grub()
7399 for the readability checks.
7400 (font_path): Use is_path_readable_by_grub() for the readability
7401 check rather than convert_system_path_to_grub_path().
7402
972e2f7a 74032008-05-30 Robert Millan <rmh@aybabtu.com>
7404
7405 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7406 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7407 converting it first.
7408 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7409 grub.cfg for access to font file, and afterwards call it again to set
7410 the root device.
7411
62191274 74122008-05-30 Robert Millan <rmh@aybabtu.com>
7413
7414 * commands/search.c (options): Add --fs_uuid option.
7415 (search_fs_uuid): New function.
7416 (grub_cmd_search): Fix --set argument passing.
7417 Use search_fs_uuid() when requested via --fs_uuid.
7418 (grub_search_init): Update help message.
7419 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7420 and redeclare it as an array of 16-bit words.
7421 (grub_ext2_uuid): New function.
7422 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7423 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7424 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7425 (GRUB_DEVICE_BOOT_UUID): New variables.
7426 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7427 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7428 whenever possible.
7429 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7430 just assume `root' variable has the right value.
7431 * util/grub.d/10_linux.in: Likewise.
7432 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7433 via PRINT_FS_UUID.
7434 (main): Recognise `-t fs_uuid' argument.
7435
01b73ec8 74362008-05-30 Robert Millan <rmh@aybabtu.com>
7437
7438 * util/biosdisk.c (map): Redefine structure to hold information
7439 about GRUB drive name.
fe6b695a 7440 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 7441 drive names.
7442 (call_hook): Remove.
7443 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7444 member. Assume drive has partitions.
7445 (grub_util_biosdisk_open): Access device names via `.device' struct
7446 member.
7447 (open_device): Likewise.
7448 (find_drive): Likewise.
7449 (read_device_map): Adjust map[] usage to match the new struct
7450 definition. Don't check for duplicates (still possible, but not cheap
7451 anymore).
7452 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7453 (make_device_name): Remove assumption of BIOS-like drive names.
7454
22f16596 74552008-05-30 Pavel Roskin <proski@gnu.org>
7456
7457 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7458 compiling execute.c doesn't need grub_script.tab.h anymore.
7459 (normal/command.c_DEPENDENCIES): Likewise.
7460 (normal/function.c_DEPENDENCIES): Likewise.
7461 * conf/i386-ieee1275.rmk: Likewise.
7462 * conf/i386-linuxbios.rmk: Likewise.
7463 * conf/i386-pc.rmk: Likewise.
7464 * conf/powerpc-ieee1275.rmk: Likewise.
7465 * conf/sparc64-ieee1275.rmk: Likewise.
7466
528ad8f2 74672008-05-29 Pavel Roskin <proski@gnu.org>
7468
d1dff95d 7469 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7470 when scanning metadata for volume group name.
7471
528ad8f2 7472 * include/grub/script.h: Don't include grub_script.tab.h. It's
7473 a generated file, which may only be included from the files with
7474 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7475 use union YYSTYPE, as the later allows forward declaration.
7476 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7477
47248e08 74782008-05-29 Robert Millan <rmh@aybabtu.com>
7479
7480 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7481 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7482 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7483 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7484 scan codes.
7485
ee632529 74862008-05-29 Robert Millan <rmh@aybabtu.com>
7487
7488 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7489 control key combinations.
7490
eee96e08 74912008-05-29 Robert Millan <rmh@aybabtu.com>
7492
7493 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7494 * util/ieee1275/grub-install.in: ... to here.
7495 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7496 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7497 (grub_install_SOURCES): Likewise.
7498
da9a6a94 74992008-05-29 Robert Millan <rmh@aybabtu.com>
7500
7501 * fs/affs.c: Update copyright year.
7502 * fs/ext2.c: Likewise.
7503 * fs/fshelp.c: Likewise.
7504 * fs/hfsplus.c: Likewise.
7505 * fs/ntfs.c: Likewise.
7506 * fs/xfs.c: Likewise.
7507 * include/grub/fshelp.h: Likewise.
7508 * util/grub-mkdevicemap.c: Likewise.
7509
12e65f3a 75102008-05-28 Robert Millan <rmh@aybabtu.com>
7511
7512 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7513 might need to be fatfs to support some firmware implementations
7514 (e.g. OFW or EFI).
7515
23023641 75162008-05-28 Robert Millan <rmh@aybabtu.com>
7517
7518 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7519 devices.
7520 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7521 (make_device_map): Likewise.
7522
887d2619 75232008-05-20 Bean <bean123ch@gmail.com>
7524
7525 * fs/fshelp.c (grub_fshelp_map_block): New function.
7526 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7527 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7528
7529 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7530 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7531 (grub_fshelp_journal): New structure.
7532 (grub_fshelp_map_block): New function prototype.
7533 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7534 (grub_fshelp_map_block): Likewise.
7535
7536 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7537 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7538 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7539 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7540 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7541 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7542 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7543 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7544 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7545 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7546 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7547 (grub_ext2_sblock): New members for journal support.
7548 (grub_ext3_journal_header): New structure.
7549 (grub_ext3_journal_revoke_header): Likewise.
7550 (grub_ext3_journal_block_tag): Likewise.
7551 (grub_ext3_journal_sblock): Likewise.
7552 (grub_fshelp_node): New members logfile and journal.
7553 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7554 grub_fshelp_map_block to get real block number.
7555 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7556 number.
7557 (grub_ext2_read_inode): Likewise.
7558 (grub_ext3_get_journal): New function.
7559 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7560 (grub_ext2_close): Release memory used by journal.
7561
7562 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7563 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7564 (grub_reiserfs_transaction_header): Renamed to
7565 grub_reiserfs_description_block, replace field data with real_blocks.
7566 (grub_reiserfs_commit_block): New structure.
7567 (grub_reiserfs_data): New member journal.
7568 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7569 number.
7570 (grub_reiserfs_read_symlink): Likewise.
7571 (grub_reiserfs_iterate_dir): Likewise.
7572 (grub_reiserfs_open): Likewise.
7573 (grub_reiserfs_read): Likewise.
7574 (grub_reiserfs_get_journal): New function.
7575 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7576 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7577 using grub_reiserfs_get_journal.
7578 (grub_reiserfs_close): Release memory used by journal.
7579
7580 * fs/affs.c (grub_affs_read_block): Change block type to
7581 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7582
7583 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7584
7585 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7586
7587 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7588
7589 * fs/udf.c (grub_udf_read_block): Change block type to
7590 grub_disk_addr_t. Use type cast to avoid warning.
7591
7592 * fs/xfs.c (grub_xfs_read_block): Likewise.
7593
b7c6bed5 75942008-05-16 Christian Franke <franke@computer.org>
7595
7596 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7597 to ensure that break with ESC will always work.
7598 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7599 Remove ESC from keyboard queue.
7600
eedf167f 76012008-05-16 Christian Franke <franke@computer.org>
7602
7603 * util/biosdisk.c: [__CYGWIN__] Add includes.
7604 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7605 (get_os_disk): Move variable declarations to OS specific
7606 parts to avoid warning.
7607 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7608 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7609 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7610 Cygwin.
7611 * util/getroot.c: [__CYGWIN__] Add includes.
7612 (strip_extra_slashes): Fix "/" case.
7613 [__CYGWIN__] (get_win32_path): New function.
7614 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7615 [__CYGWIN__] (find_root_device): Disable.
7616 [__CYGWIN__] (get_bootsec_serial): New function.
7617 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7618 [__linux__] (grub_guess_root_device): Add early returns to simplify
7619 structure.
7620 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7621 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7622 check for Linux only.
7623
a079699e 76242008-05-15 Bean <bean123ch@gmail.com>
7625
7626 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7627 keyboard hang problem in apple's intel mac.
7628
1cf4059a 76292008-05-09 Robert Millan <rmh@aybabtu.com>
7630
7631 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7632 devices.
7633 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7634 (make_device_map): Likewise.
7635 Reported by Aurelien Jarno <aurel32@debian.org>
7636
ed759390 76372008-05-07 Ian Campbell <ijc@hellion.org.uk>
7638
7639 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7640 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7641 (make_device_map): Output entries for xvd type disks.
7642
b56c4eaa 76432008-05-07 Robert Millan <rmh@aybabtu.com>
7644
7645 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7646 devices.
7647 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7648 (make_device_map): Likewise.
7649 Reported by Roland Dreier <rdreier@cisco.com>
7650
7f8866ed 76512008-05-07 Robert Millan <rmh@aybabtu.com>
7652
7653 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7654 grub_strstr() call. Correct a few mistakes in failure path handling.
7655
b0346e0f 76562008-05-06 Robert Millan <rmh@aybabtu.com>
7657
7658 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7659 Do not print a trailing slash (therefore, the root directory is an
7660 empty string).
7661 (convert_system_path_to_grub_path): Do not remove trailing slash
7662 from make_system_path_relative_to_its_root() output.
7663
7664 * util/i386/pc/grub-install.in: Add trailing slash to output from
7665 make_system_path_relative_to_its_root().
7666
6cf12cbd 76672008-05-06 Robert Millan <rmh@aybabtu.com>
7668
7669 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7670 ensures that output lines aren't intermangled with those sent to
7671 stderr (via grub_util_info()).
7672 * util/grub-probe.c (grub_refresh): Likewise.
7673 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7674
0fbb3117 76752008-05-05 Christian Franke <franke@computer.org>
7676
7677 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7678 Add Cygwin device names.
7679 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7680 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7681 (check_device): Return error instead of success on empty name.
7682 (make_device_map): Move label inside linux specific code to
7683 prevent compiler warning.
7684
8124cdb7 76852008-04-30 Robert Millan <rmh@aybabtu.com>
7686
7687 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7688 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7689 first boot option.
7690 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7691
094c01d0 76922008-04-29 Robert Millan <rmh@aybabtu.com>
7693
7694 * docs/grub.cfg: New file (example GRUB configuration).
7695
f4b1fc02 76962008-04-26 Robert Millan <rmh@aybabtu.com>
7697
329ce2a5 7698 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7699 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7700 and `disk/ieee1275/nand.c'.
f4b1fc02 7701
25f16ec1 77022008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7703
25f16ec1 7704 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7705 i386-linuxbios.
7706
7707 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7708 change the buffer size to 4096 for cdrom device.
7709
7710 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7711 and nand.mod.
7712 (_linux_mod_SOURCES): New variable.
7713 (_linux_mod_CFLAGS): Likewise.
7714 (_linux_mod_LDFLAGS): Likewise.
7715 (linux_mod_SOURCES): Likewise.
7716 (linux_mod_CFLAGS): Likewise.
7717 (linux_mod_LDFLAGS): Likewise.
7718 (nand_mod_SOURCES): Likewise.
7719 (nand_mod_CFLAGS): Likewise.
7720 (nand_mod_LDFLAGS): Likewise.
7721
7722 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7723 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7724 type property. (nand device in olpc don't have this property)
7725
7726 * include/grub/disk.h (grub_disk_dev_id): New macro
7727 GRUB_DISK_DEVICE_NAND_ID.
7728
7729 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7730 function prototype.
7731 (grub_rescue_cmd_initrd): Likewise.
7732
7733 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7734 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7735 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7736
25f16ec1 7737 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7738 GRUB_MACHINE_IEEE1275 is defined.
7739
7740 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7741 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7742
7743 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7744 on nested function heap_init.
7745 (grub_upper_mem): New variable for i386-ieee1275.
7746 (grub_get_extended_memory): New function for i386-ieee1275.
7747 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7748
7749 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7750 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7751 property.
f19dbdb7 7752
25f16ec1 7753 * loader/i386/ieee1275/linux.c: New file.
7754
7755 * loader/i386/ieee1275/linux_normal.c: New file.
7756
7757 * disk/ieee1275/nand.c: New file.
7758
e89d61e9 77592008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7760
7761 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7762 value.
7763 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7764
602566f6 77652008-04-18 Robert Millan <rmh@aybabtu.com>
7766
7767 Restructures early code path on ieee1275 to unify grub_main() as
7768 the first C function that is executed in every platform.
7769
7770 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7771 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7772 cmain().
7773 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7774 * kern/ieee1275/cmain.c (cmain): Rename to ...
7775 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7776 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7777 at the beginning.
7778
57490c2b 77792008-04-18 Robert Millan <rmh@aybabtu.com>
7780
7781 * util/update-grub.in: Fix syntax error when setting
7782 `GRUB_PRELOAD_MODULES'.
7783 Reported by Stephane Chazelas <stephane@artesyncp.com>
7784
1977517d 77852008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7786
7787 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7788 section into account, newer toolchains generate unique build ids
7789 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7790 we want build ids to be preserved
1977517d 7791 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7792 far from other sections don't cause the raw binary images grow
7793 size
7794
bfb1f1a2 77952008-04-15 Robert Millan <rmh@aybabtu.com>
7796
7797 * disk/lvm.c: Update copyright year.
7798 * kern/misc.c: Likewise.
7799
01979850 78002008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7801
7802 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7803 there is no memory left for physical volume name.
01979850 7804
0a1150e2 78052008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7806
7807 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7808 volume name mapping to support bigger than 9 character names properly.
7809
82ead3fe 78102008-04-13 Robert Millan <rmh@aybabtu.com>
7811
7812 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7813 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7814
e54a72f5 78152008-04-13 Christian Franke <franke@computer.org>
7816
7817 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7818 to create a floppy emulation boot CD when non emulation mode
7819 does not work.
7820 Enable Joliet CD filesystem extension.
7821
9fe86034 78222008-04-13 Robert Millan <rmh@aybabtu.com>
7823
7824 * kern/misc.c (grub_strncat): Fix off-by-one error.
7825 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7826
7827 * kern/env.c (grub_env_context_close): Clear current context, not
7828 previous one.
7829 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7830
7831 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7832
7ceeee39 78332008-04-13 Robert Millan <rmh@aybabtu.com>
7834
7835 Improve robustness when handling LVM.
7836
7837 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7838 (and leave `*p' unmodified).
7ceeee39 7839 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7840 through it.
7841 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7842 iterating through it.
7843 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7844 through it.
fe6b695a 7845 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7846 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7847 Don't assume `vg->pvs != NULL' when iterating through it.
7848
58cd3d85 78492008-04-13 Robert Millan <rmh@aybabtu.com>
7850
7851 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7852 * genmk.rb (partmap): New variable.
7853 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7854 (#{partmap}): New target rule.
7855 * genpartmaplist.sh: New file.
7856 * Makefile.in (pkglib_DATA): Add partmap.lst.
7857 (partmap.lst): New target rule.
7858 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7859 modules (including all partition maps), instead of preloading them.
7860
78b51059 78612007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7862
7863 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7864 `linux-boot-prober' (if installed) to detect other operating
7865 systems which are installed on the computer and add them to
7866 the boot menu.
7867 * conf/common.rmk: Build and install 30_os-prober.
7868
a91627b4 78692008-04-12 Robert Millan <rmh@aybabtu.com>
7870
7871 * kern/powerpc/ieee1275/init.c: Move from here ...
7872 * kern/ieee1275/init.c: ... to here. Update all users.
7873
7874 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7875 * kern/ieee1275/cmain.c: ... to here. Update all users.
7876
7877 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7878 * kern/ieee1275/openfw.c: ... to here. Update all users.
7879
7880 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7881 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7882
322562ea 78832008-04-10 Pavel Roskin <proski@gnu.org>
7884
7885 * configure.ac: Always use "_cv_" in cache variables for
7886 compatibility with Autoconf 2.62.
7887
a02a73c5 78882008-04-07 Robert Millan <rmh@aybabtu.com>
7889
7890 Revert grub/machine/init.h addition by Pavel (since it breaks on
7891 i386-ieee1275 and others):
7892 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7893 * util/powerpc/ieee1275/misc.c: Likewise.
7894
25c024b1 78952008-04-07 Robert Millan <rmh@aybabtu.com>
7896
7897 * util/grub-probe.c (probe): Improve error message.
7898
3cbd2f98 78992008-04-07 Robert Millan <rmh@aybabtu.com>
7900
7901 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7902 (this prevents the presence of a bogus entry from ruining the whole
7903 thing).
7904
87a297bf 79052008-04-06 Pavel Roskin <proski@gnu.org>
7906
36747a62 7907 * util/biosdisk.c: Include grub/util/biosdisk.h.
7908 * util/grub-fstest.c (execute_command): Make static.
7909 * util/grub-mkdevicemap.c (check_device): Likewise.
7910 * util/i386/pc/misc.c: Include grub/machine/init.h.
7911 * util/powerpc/ieee1275/misc.c: Likewise.
7912 * util/lvm.c: Include grub/util/lvm.h.
7913 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7914 grub/cache.h.
7915 * util/raid.c: Include grub/util/raid.h.
7916 (grub_util_getdiskname): Make static.
7917
87a297bf 7918 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7919 grub_hostfs_fini(), as they are called from grub_init_all() and
7920 grub_fini_all() respectively. This fixes an infinite loop in
7921 grub-fstest due to double registration of hostfs.
7922 Reported by Christian Franke <Christian.Franke@t-online.de>
7923
f6ce7629 79242008-04-05 Pavel Roskin <proski@gnu.org>
7925
7926 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7927 all 8 functions. Otherwise, probe function 0 only.
7928
070e49e4 79292008-04-04 Pavel Roskin <proski@gnu.org>
7930
8b088a4c 7931 * commands/lspci.c (grub_lspci_iter): Print the bus number
7932 correctly.
7933
4f657021 7934 * commands/lspci.c (grub_pci_classes): Fix typos.
7935 (grub_lspci_iter): Don't print func twice. Print vendor ID
7936 before device ID, as it's normally done.
7937
070e49e4 7938 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7939 Fix signedness warnings.
7940 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7941 Likewise.
7942 * util/ieee1275/get_disk_name.c: Include config.h so that
7943 _GNU_SOURCE is defined and getline() is declared. Mark an
7944 unused argument as such. Fix a signedness warning.
7945
ba7328dc 79462008-04-02 Pavel Roskin <proski@gnu.org>
7947
26887f22 7948 * genkernsyms.sh.in: Use more robust assignments for CC and
7949 srcdir. Quote srcdir.
7950 * gensymlist.sh.in: Likewise. Assert at the compile time that
7951 the symbol table is not empty.
7952
ba7328dc 7953 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7954 * fs/cpio.c (grub_cpio_read): Likewise.
7955
0f582c6b 79562008-04-01 Pavel Roskin <proski@gnu.org>
7957
4b6e1995 7958 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7959 * disk/host.c (grub_host_open): Likewise.
7960 * disk/loopback.c (grub_loopback_open): Likewise.
7961 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7962 disk->id as in disk/host.c, not a multi-character constant.
7963
828a2768 7964 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7965 later is obsolete, potentially dangerous and sets a bad example.
7966 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7967 * util/misc.c (grub_util_get_image_size): Likewise.
7968
2bb4fb47 7969 * disk/loopback.c (options): Improve help for "--partitions".
7970
0f582c6b 7971 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7972 options to align them with the short options, e.g. "echo -e".
7973
a33224e0 79742008-03-31 Bean <bean123ch@gmail.com>
7975
7976 * video/reader/png.c (grub_png_data): New member is_16bit and
7977 image_data.
7978 (grub_png_decode_image_header): Detect 16 bit png image.
7979 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7980 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7981 (grub_video_reader_png): Release memory occupied by image_data.
7982
7983 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7984 4096 bytes.
7985 (grub_nfs_mount): Skip the test for sector per cluster.
7986
7987 * include/grub/ntfs.h (MAX_SPC): Removed.
7988
86cb4f54 79892008-03-31 Bean <bean123ch@gmail.com>
7990
7991 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7992 (grub_probe_SOURCES): Add fs/afs.c.
7993 (grub_fstest_SOURCES): Likewise.
7994 (afs_mod_SOURCES): New variable.
7995 (afs_mod_CFLAGS): Likewise.
7996 (afs_mod_LDFLAGS): Likewise.
7997
7998 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7999 (grub_emu_SOURCES): Likewise.
8000
8001 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8002
8003 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8004
8005 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8006
8007 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8008
8009 * fs/afs.c: New file.
8010
17c74c21 80112008-03-30 Pavel Roskin <proski@gnu.org>
8012
4cb68e89 8013 * disk/host.c: Include grub/misc.h to fix a warning.
8014 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8015 warnings about implicit declarations.
8016
8790bb04 8017 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8018 variable.
8019 * include/grub/i386/loader.h: Change declaration of
8020 grub_linux_boot() to match what grub_loader_set() expects.
8021 * util/getroot.c (grub_guess_root_device): Return const char* to
8022 fix a warning.
8023 * util/grub-probe.c (probe): Fix a warning about uninitialized
8024 abstraction_name variable.
8025 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8026 second argument as unused to fix a warning.
8027
9a3f3296 8028 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8029 missing grub_error() call.
8030
0ecef90d 8031 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8032 2.60 and newer uses it to define datadir.
8033
0bf6d401 8034 * commands/sleep.c: Fix warning about implicit declaration.
8035 * disk/memdisk.c: Likewise.
8036 * loader/aout.c: Likewise.
8037 * loader/i386/bsd_normal.c: Likewise.
8038 * util/grub-probe.c: Likewise.
8039
7cdacf97 8040 * commands/i386/cpuid.c (has_longmode): Make static.
8041 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8042 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8043
17c74c21 8044 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8045 GDT. This is more robust, as %ds can change.
8046 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8047 calling real_to_prot().
8048 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8049
80a3e68b 80502008-03-28 Pavel Roskin <proski@gnu.org>
8051
8052 * kern/i386/pc/startup.S: Assert that uncompressed functions
8053 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8054 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8055 code, as they push parts of the code (error handlers) beyond
8056 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8057 code as correctness and size.
8058
77bcd272 80592008-03-28 Pavel Roskin <proski@gnu.org>
8060
8061 * kern/i386/pc/startup.S
8062 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8063 data block address to the real mode, keep offset minimal. This
8064 works around a bug in AWARD BIOS on old Athlon systems, which
8065 makes CD detection hang.
8066
c5dfd43b 80672008-03-26 Pavel Roskin <proski@gnu.org>
8068
8069 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8070 const.
8071 * include/grub/normal.h: Add grub_parse_color_name_pair()
8072 declaration.
8073
bf962df2 80742008-03-24 Bean <bean123ch@gmail.com>
8075
8076 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8077 (cd_count): Removed.
8078 (cd_drive): New variable.
8079 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8080 (grub_biosdisk_call_hook): Likewise.
8081 (grub_biosdisk_iterate): Change cdrom detection method.
8082 (grub_biosdisk_open): Replace cd_start with cd_drive.
8083 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8084 detect cdrom device.
8085
8086 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8087 Removed.
8088 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8089 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8090 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8091 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8092 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8093 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8094 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8095 (grub_biosdisk_cdrp): New structure.
8096 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8097
8098 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8099
8100 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8101 device.
8102
8103 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8104 New function.
8105
68e7fc7a 81062008-03-20 Robert Millan <rmh@aybabtu.com>
8107
8108 Remove 2 TiB limit in ata.mod.
8109 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8110 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8111 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8112 grub_uint64_t instead of grub_uint32_t.
8113
38ad2cf5 81142008-03-05 Bean <bean123ch@gmail.com>
8115
8116 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8117 (grub_multiboot): Set boot device.
8118
8119 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8120
2b89344e 81212008-03-02 Bean <bean123ch@gmail.com>
8122
8123 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8124 symlink_buffer.
8125
87a95d1f 81262008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8127
8128 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8129 texinfo.tex.
8130
8131 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8132 modified.
8133
8134 * docs/fdl.texi: New file.
f19dbdb7 8135
87a95d1f 8136 * docs/mdate-sh: New file. Copied from gnulib.
8137 * docs/texinfo.tex: Likewise.
8138
8139 * config.guess: Updated from gnulib.
8140 * install-sh: Likewise.
8141
7dc15d8e 81422008-02-28 Robert Millan <rmh@aybabtu.com>
8143
8144 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8145 (aout_mod_SOURCES): New variable.
8146 (aout_mod_CFLAGS): Likewise.
8147 (aout_mod_LDFLAGS): Likewise.
8148
8149 * conf/i386-ieee1275.rmk: Likewise.
8150
b00ab696 81512008-02-28 Robert Millan <rmh@aybabtu.com>
8152
8153 * util/update-grub.in: Reorganise terminal validity check. Accept
8154 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8155 Based on suggestion by Franklin PIAT.
8156
79ca2d78 81572008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8158
8159 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8160 function.
8161 * util/getroot.c (grub_util_check_block_device): New function that
8162 returns the given argument if it is a block device and returns NULL else.
8163 * util/grub-probe.c (argument_is_device): New variable.
8164 (probe): Promote device_name from a variable to an argument. Receive
8165 device_name from grub_util_check_block_device() if path is NULL and from
8166 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 8167 (options): Introduce new parameter '-d, --device'.
79ca2d78 8168 (main): Add description of the new parameter to the help screen.
8169 Rename path variable to argument. Set argument_is_device if the '-d'
8170 option is given. Pass argument to probe() depending on
8171 argument_is_device.
8172
0d16e571 81732008-02-24 Bean <bean123ch@gmail.com>
8174
8175 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8176 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8177 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8178 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8179 (GRUB_ISO9660_VOLDESC_END): Likewise.
8180 (grub_iso9660_primary_voldesc): New member escape.
8181 (grub_iso9660_data): New member joliet.
8182 (grub_iso9660_convert_string): New function.
8183 (grub_iso9660_mount): Detect joliet extension.
8184 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8185 (grub_iso9660_iso9660_label): Likewise.
8186
8187 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8188 (grub_setup_SOURCES): Add fs/udf.c.
8189 (grub_fstest_SOURCES): Likewise.
8190 (udf_mod_SOURCES): New variable.
8191 (udf_mod_CFLAGS): Likewise.
8192 (udf_mod_LDFLAGS): Likewise.
8193
8194 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8195 (grub_emu_SOURCES): Likewise.
8196
8197 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8198
8199 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8200
8201 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8202
8203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8204
8205 * fs/udf.c: New file.
8206
8a594a17 82072008-02-24 Robert Millan <rmh@aybabtu.com>
8208
8209 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8210 (normal/lexer.c_DEPENDENCIES): New variables.
8211 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8212 (normal/lexer.c_DEPENDENCIES): Likewise.
8213 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8214 (normal/lexer.c_DEPENDENCIES): Likewise.
8215 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8216 (normal/lexer.c_DEPENDENCIES): Likewise.
8217 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8218 (normal/lexer.c_DEPENDENCIES): Likewise.
8219 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8220 (normal/lexer.c_DEPENDENCIES): Likewise.
8221
2dc33c03 82222008-02-23 Robert Millan <rmh@aybabtu.com>
8223
8224 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8225 since they were intended to be in hex. This didn't break previously
8226 because of a bug in gpt_partition_map_iterate() (see below).
8227
8228 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8229 when checking the validity of GPT header.
8230 Remove `partno', since it always provides the same information as `i'.
8231
f6f4cfb0 82322008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8233
8234 * include/grub/efi/time.h: Fix a wrong comment.
8235
79ff665f 82362008-02-19 Pavel Roskin <proski@gnu.org>
8237
8238 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8239 message.
8240
d38e24c2 82412008-02-19 Bean <bean123ch@gmail.com>
8242
8243 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8244 (aout_mod_SOURCES): New variable.
8245 (aout_mod_CFLAGS): Likewise.
8246 (aout_mod_LDFLAGS): Likewise.
8247 (_bsd_mod_SOURCES): New variable.
8248 (_bsd_mod_CFLAGS): Likewise.
8249 (_bsd_mod_LDFLAGS): Likewise.
8250 (bsd_mod_SOURCES): New variable.
8251 (bsd_mod_CFLAGS): Likewise.
8252 (bsd_mod_LDFLAGS): Likewise.
8253
8254 * include/grub/aout.h: New file.
8255
8256 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8257
8258 * include/grub/i386/bsd.h: New file.
8259
8260 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8261 to make it public.
8262
8263 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8264 function is called, so that it's possible to change it inside the hook.
8265 (grub_elf64_load): Likewise.
8266 (grub_elf_file): Don't close the file if elf header is not found.
8267 (grub_elf_close): Close the file if grub_elf_file fails (The new
8268 grub_elf_file won't close it).
8269 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8270 (grub_elf64_size): Likewise.
8271
8272 * kern/i386/loader.S (grub_unix_real_boot): New function.
8273
8274 * loader/aout.c: New file.
8275
8276 * loader/i386/bsd.c: New file.
8277
8278 * loader/i386/bsd_normal.c: New file.
8279
8280 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8281
8282 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 8283 can test other formats.
d38e24c2 8284
b93bdb0f 82852008-02-19 Robert Millan <rmh@aybabtu.com>
8286
8287 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8288 (grub_gpt_partition_type_empty): Redefine with macro from
8289 `<grub/gpt_partition.h>'.
8290 (gpt_partition_map_iterate): Adjust partition type comparison.
8291
8292 Export `entry' as partmap-specific `part.data' struct.
8293 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8294
8295 * include/grub/gpt_partition.h (grub_gpt_header)
8296 (grub_gpt_partentry): ... to here (new file).
8297
8298 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8299
8300 (grub_gpt_partition_type_bios_boot): New const variable, defined
8301 with macro from `<grub/gpt_partition.h>'.
8302
8303 (setup): Replace `first_start' with `embed_region', which keeps
8304 track of the embed region (and is partmap-agnostic).
8305
8306 Replace find_first_partition_start() with find_usable_region(),
8307 which finds a usable region for embedding using partmap-specific
8308 knowledge (supports PC/MSDOS and GPT).
8309
8310 Fix all assumptions that the embed region start at sector 1, using
8311 `embed_region.start' from now on. Similarly, use `embed_region.end'
8312 rather than `first_start' to calculate available size.
8313
8314 In grub_util_info() message, replace "into after the MBR" with an
8315 indication of the specific sector our embed region starts at.
8316
66cb40f6 83172008-02-19 Robert Millan <rmh@aybabtu.com>
8318
8319 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8320 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8321 `commands/reboot.c'.
8322 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8323 (halt_mod_SOURCES): Likewise.
8324 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8325 (halt_mod_SOURCES): Likewise.
8326
b7202015 83272008-02-17 Christian Franke <franke@computer.org>
8328
8329 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8330
32b0fc49 83312008-02-17 Robert Millan <rmh@aybabtu.com>
8332
8333 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8334 set `first_start' to 0 for non-PC/MSDOS partition maps.
8335
aca63502 83362008-02-16 Robert Millan <rmh@aybabtu.com>
8337
8338 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8339 do not assume partition map is PC/MSDOS before performing checks that
8340 are specific to that layout.
8341
0de8be86 83422008-02-13 Robert Millan <rmh@aybabtu.com>
8343
8344 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8345 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8346 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8347
c3db8364 83482008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8349
8350 * configure.ac: Only a cosmetic change on the handling of
8351 -fno-stack-protector.
8352
f714229e 83532008-02-12 Alexandre Boeglin <alex@boeglin.org>
8354
c3db8364 8355 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8356 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8357 reboot.c.
f714229e 8358 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8359 (halt_mod_SOURCES): New variable.
8360 (halt_mod_CFLAGS): Likewise.
8361 (halt_mod_LDFLAGS): Likewise.
8362 (reboot_mod_SOURCES): Likewise.
8363 (reboot_mod_CFLAGS): Likewise.
8364 (reboot_mod_LDFLAGS): Likewise.
8365
c3db8364 8366 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8367 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8368 reboot.c.
f714229e 8369 (halt_mod_SOURCES): Likewise.
8370 (reboot_mod_SOURCES): Likewise.
8371
c3db8364 8372 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8373 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 8374 (reboot_mod_SOURCES): Likewise.
8375
8376 * commands/i386/pc/reboot.c: merge this file ...
8377
8378 * commands/ieee1275/reboot.c: ... and this file ...
8379
8380 * commands/reboot.c: ... to this file.
c3db8364 8381 Add some precompiler directive to include the correct header for
8382 each machine.
f714229e 8383
8384 * commands/ieee1275/halt.c: move this file ...
8385
8386 * commands/halt.c: ... to here.
c3db8364 8387 Add some precompiler directive to include the correct header for
8388 each machine.
f714229e 8389
8390 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8391 (grub_halt): Likewise.
8392
8393 * kern/efi/efi.c (grub_reboot): New function.
8394 (grub_halt): Likewise.
8395
c74493e0 83962008-02-12 Robert Millan <rmh@aybabtu.com>
8397
8398 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8399 /dev (like it is done for /dev/mapper). This doesn't provide support
8400 for EVMS, but at least it is now easy to identify the problem when it
8401 arises.
8402
d0db4b04 84032008-02-11 Robert Millan <rmh@aybabtu.com>
8404
8405 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8406 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8407 comparing it with -1, not 0.
8408
bf748642 84092008-02-10 Robert Millan <rmh@aybabtu.com>
8410
8411 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8412 `disk/lvm.c'.
8413 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8414 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8415
8416 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8417 `disk/lvm.c' to the end of the list.
8418 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8419 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8420
b5db202a 84212008-02-10 Robert Millan <rmh@aybabtu.com>
8422
8423 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8424 grub_print_error() instead. This will let user know why we're entering
8425 rescue mode.
8426 Based on suggestions from Sam Morris.
8427
83abee31 84282008-02-10 Alexandre Boeglin <alex@boeglin.org>
8429
8430 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8431 on remaining N args, instead of "--" arg N times.
8432
78d5a08b 84332008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8434
8435 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8436 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8437 pattern for unknown glyphs.
8438
68807e5f 84392008-02-09 Robert Millan <rmh@aybabtu.com>
8440
8441 * configure.ac: Probe for `help2man'.
8442 * Makefile.in (builddir): New variable.
8443 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8444 or otherwise add a few flags/options to it.
8445 (install-local): For every executable utility or script that is
8446 installed, invoke $(HELP2MAN) to install a manpage based on --help
8447 output.
8448
8449 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8450 that it doesn't prevent --help from working in build tree.
8451
8452 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8453 with `bug-grub@gnu.org'.
8454 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8455 * util/update-grub.in (usage): New function.
8456 Implement proper argument check, with support for --help and --version
8457 (as well as existing -y).
8458
84592008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 8460
8461 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8462 avoid overwriting previous output.
8463 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8464
c1962162 84652008-02-09 Robert Millan <rmh@aybabtu.com>
8466
8467 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8468 drawing the menu.
8469
3dac2e3f 84702008-02-09 Robert Millan <rmh@aybabtu.com>
8471
8472 * commands/sleep.c: New file.
8473 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8474 (sleep_mod_SOURCES): New variable.
8475 (sleep_mod_CFLAGS): Likewise.
8476 (sleep_mod_LDFLAGS): Likewise.
8477
7a634e08 84782008-02-09 Robert Millan <rmh@aybabtu.com>
8479
8480 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8481 situations in which we can deduce the RAID size and the superblock
8482 doesn't match it.
8483
b92f0c18 84842008-02-09 Robert Millan <rmh@aybabtu.com>
8485
8486 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8487 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8488 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8489
8490 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8491 and return a grub_diskmemberlist_t composed of physical array members.
8492 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8493
8494 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8495 prototype.
8496 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8497 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8498 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8499
8500 * util/grub-probe.c (probe): Move partmap probing code from here ...
8501 (probe_partmap): ... to here.
8502 (probe): Use probe_partmap() once for the disk we're probing, and
8503 additionally, when such disk contains a memberlist() struct member,
8504 once for each disk that is contained in the structure returned by
8505 memberlist().
8506
91a4bf68 85072008-02-09 Robert Millan <rmh@aybabtu.com>
8508
8509 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8510 environment variable to 'all' in order to obtain debug output from
8511 non-util/ code.
8512 * util/i386/pc/grub-setup.c (main): Likewise.
8513
a96f9caa 85142008-02-08 Robert Millan <rmh@aybabtu.com>
8515
8516 * disk/raid.c (grub_raid_scan_device): Check for
8517 `array->device[sb.this_disk.number]' rather than for
8518 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 8519 guaranteed to be accessible.
a96f9caa 8520
b37a9222 85212008-02-08 Robert Millan <rmh@aybabtu.com>
8522
8523 * disk/raid.c: Update copyright.
8524 * fs/cpio.c: Likewise.
8525 * include/grub/raid.h: Likewise.
8526 * loader/i386/pc/multiboot.c: Likewise.
8527 * util/hostfs.c: Likewise.
8528
5626aee1 85292008-02-08 Robert Millan <rmh@aybabtu.com>
8530
8531 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8532 to a grub_disk_t array.
8533 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8534 `device[x]'.
8535 (grub_raid_scan_device): Replace `device[x].name' accesses with
8536 `device[x]->name'. Simplify initialization of `array->device[x]'.
8537
554f0187 85382008-02-08 Robert Millan <rmh@aybabtu.com>
8539
8540 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8541 grub_dprintf() calls.
8542 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8543 error message.
8544
1ec8425d 85452008-02-07 Christian Franke <franke@computer.org>
8546
8547 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8548 instead of fseek and ftell to support large files.
8549 (grub_hostfs_read): Likewise.
8550
f2156fda 85512008-02-07 Robert Millan <rmh@aybabtu.com>
8552
8553 Patch from Jeroen Dekkers.
8554 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 8555 failure, since successfully reading all array members might not be
f2156fda 8556 required.
8557
9216e0e7 85582008-02-06 Robert Millan <rmh@aybabtu.com>
8559
8560 * util/grub-probe.c (probe): Simplify partmap probing (with the
8561 assumption that the first word up to the underscore equals to
8562 the module name).
8563
b0dfd29a 85642008-02-06 Christian Franke <franke@computer.org>
8565
8566 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8567 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8568 last block of a cpio or tar stream.
8569 Check for "TRAILER!!!" instead of any empty data
8570 block to detect last block of a cpio stream.
8571 (grub_cpio_dir): Fix constness of variable np.
8572 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8573 cpio or tar trailer is detected. This fixes a crash
8574 on open of a non existing file.
8575
c32865bf 85762008-02-05 Bean <bean123ch@gmail.com>
8577
8578 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8579 address of entry.
8580 (grub_multiboot_load_elf64): Likewise.
8581 (grub_multiboot): Initialize mbi structure.
8582
8583 * util/grub-fstest.c: Don't include unused header file script.h.
8584
fe6b695a 8585 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 8586 of file.
8587 (grub_fstest_SOURCES): Likewise.
8588
409480b7 85892008-02-05 Robert Millan <rmh@aybabtu.com>
8590
8591 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8592 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8593 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8594 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8595
8596 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8597 (translation_table): Replace hardcoded values with macros
8598 provided by `<grub/term.h>'.
8599
8600 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8601 (keyboard_map): Correct/add a few values, with macros provided
8602 by `<grub/term.h>'.
8603 (keyboard_map_shift): Zero values that don't differ from their
8604 `keyboard_map' equivalents.
8605 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8606 Discard the second scan code that is always sent by Caps lock.
8607 Only use `keyboard_map_shift' when it provides a non-zero value,
8608 otherwise fallback to `keyboard_map'.
8609
99fadbaa 86102008-02-04 Bean <bean123ch@gmail.com>
8611
8612 * Makefile.in (enable_grub_fstest): New variable.
8613
8614 * conf/common.rmk (grub_fstest_init.lst): New rule.
8615 (grub_fstest_init.h): Likewise.
8616 (grub_fstest_init.c): Likewise.
8617 (util/grub-fstest.c_DEPENDENCIES): New variable.
8618 (grub_fstest_SOURCES): Likewise.
8619
8620 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8621
8622 * util/grub-fstest.c: New file.
8623
bf567c50 86242008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8625
8626 Make grub-setup handle a separate root device.
f19dbdb7 8627
bf567c50 8628 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8629 so that the root device can be compared with the destination
8630 device.
8631 When embedding the core image, if the root and destination devices
8632 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8633 0xFF.
8634 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8635
9be6b98b 86362008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8637
8638 Add support for having a grub directory in a different drive. This
8639 is still only the data handling part.
f19dbdb7 8640
9be6b98b 8641 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8642 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8643 (grub_root_drive): New variable.
8644
8645 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8646 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8647 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8648 as it was.
8649
8650 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8651
8652 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8653 macro.
8654 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8655
8656 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8657 is bogus, because PXE booting does not specify any drive
8658 correctly.
8659
8660 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8661 am not sure if this is really correct.
8662
8663 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8664 is always identical to the boot drive when booting from a CD.
8665
8666 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8667 longer.
8668 (root_drive): New variable.
8669 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8670 (setup_sectors): Push %dx right after popping it, because %dh will
8671 be modified later.
8672 (copy_buffer): Restore %dx.
8673
e0ca0677 86742008-02-03 Robert Millan <rmh@aybabtu.com>
8675
8676 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8677 use `cdboot.img' for cdrom images.
8678
3b3f6629 86792008-02-03 Robert Millan <rmh@aybabtu.com>
8680
8681 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8682 only setup gfxterm when `font' command has succeeded.
8683
d42b3672 86842008-02-03 Robert Millan <rmh@aybabtu.com>
8685
8686 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8687 (grub_rescue_cmd_multiboot_loader)
8688 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8689
fa370ea6 86902008-02-03 Pavel Roskin <proski@gnu.org>
8691
e0c5dacb 8692 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8693 %edx and %esi from stack only after grub_gate_a20() is called.
8694 grub_gate_a20() clobbers %edx.
8695
f2a76e1d 86962008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8697
8698 * configure.ac (AC_INIT): Bumped to 1.96.
8699
8700 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8701 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8702 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8703 video/readers/png.c.
8704
90fd32d1 87052008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8706
8707 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8708 (cdboot_img_SOURCES): New variable.
8709 (cdboot_img_ASFLAGS): New variable.
8710 (cdboot_img_LDFLAGS): New variable.
8711
8712 * boot/i386/pc/cdboot.S: New file.
8713
8714 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8715 (cd_count): Likewise.
8716 (grub_biosdisk_get_drive): Add support for cd device.
8717 (grub_biosdisk_call_hook): Likewise.
8718 (grub_biosdisk_iterate): Likewise.
8719 (grub_biosdisk_open): Likewise.
8720 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8721 (grub_biosdisk_rw): Support reading from cd device.
8722 (GRUB_MOD_INIT): Iterate cd devices.
8723
8724 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8725 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8726 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8727
8728 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8729
4020aa53 87302008-02-02 Robert Millan <rmh@aybabtu.com>
8731
8732 * commands/read.c: New file.
8733 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8734 (read_mod_SOURCES): New variable.
8735 (read_mod_CFLAGS): Likewise.
8736 (read_mod_LDFLAGS): Likewise.
8737
e03a1132 87382008-02-02 Robert Millan <rmh@aybabtu.com>
8739
8740 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8741 determining whether menu has to be displayed.
8742
58c69220 87432008-02-02 Marco Gerards <marco@gnu.org>
8744
8745 * bus/pci.c: New file.
8746
8747 * include/grub/pci.h: Likewise.
8748
8749 * include/grub/i386/pc/pci.h: Likewise.
8750
8751 * commands/lspci.c: Likewise.
8752
8753 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8754 `lspci.mod'.
8755 (pci_mod_SOURCES): New variable.
8756 (pci_mod_CFLAGS): Likewise.
8757 (pci_mod_LDFLAGS): Likewise.
8758 (lspci_mod_SOURCES): Likewise.
8759 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8760 (lspci_mod_LDFLAGS): Likewise.
58c69220 8761
c004e1b4 87622008-02-02 Bean <bean123ch@gmail.com>
8763
8764 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8765 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8766
8767 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8768 (grub_xfs_btree_node): New structure.
8769 (grub_xfs_btree_root): New structure.
8770 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8771 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8772 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8773 (GRUB_XFS_EXTENT_SIZE): Likewise.
8774 (grub_xfs_read_block): Support btree format type.
8775 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8776 Use directory block as basic unit.
8777
8778 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8779
8780 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8781 __attribute__ ((__regparm__ (1))).
8782
f95562bf 87832008-02-01 Robert Millan <rmh@aybabtu.com>
8784
8785 Correct a mistake in previous commit.
8786
8787 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8788 top.
8789 (normal/command.c_DEPENDENCIES): New variable.
8790
7d31f41f 87912008-02-01 Robert Millan <rmh@aybabtu.com>
8792
8793 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8794 top.
8795 (normal/command.c_DEPENDENCIES): New variable.
8796 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8797 * conf/i386-ieee1275.rmk: Likewise.
8798 * conf/i386-linuxbios.rmk: Likewise.
8799 * conf/i386-pc.rmk: Likewise.
8800 * conf/sparc64-ieee1275.rmk: Likewise.
8801 * conf/powerpc-ieee1275.rmk: Likewise.
8802 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8803
8804 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8805
60b6be74 88062008-02-01 Robert Millan <rmh@aybabtu.com>
8807
8808 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8809 call at beginning of function.
8810
078522ab 88112008-01-31 Pavel Roskin <proski@gnu.org>
8812
8813 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8814 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8815 (grub_mkrescue_SOURCES): Likewise.
078522ab 8816 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8817
ccaa8a5f 88182008-01-30 Robert Millan <rmh@aybabtu.com>
8819
8820 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8821 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8822 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8823 (grub_probe_SOURCES): ... to here.
8824
8825 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8826 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8827 * conf/i386-ieee1275.rmk: Likewise.
8828 * conf/i386-linuxbios.rmk: Likewise.
8829 * conf/powerpc-ieee1275.rmk: Likewise.
8830
ae5a9cd7 88312008-01-30 Tristan Gingold <gingold@free.fr>
8832
8833 * kern/rescue.c: Silently accept empty lines.
8834
70bc2ef2 88352008-01-29 Bean <bean123ch@gmail.com>
8836
8837 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8838 (real_code_2): Code cleanup and change comment style.
8839 (move_memory): Avoid using 32-bit address mode.
8840
6a4d50ea 88412008-01-29 Bean <bean123ch@gmail.com>
8842
8843 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8844 (png_mod_SOURCES): New variable.
8845 (png_mod_CFLAGS): Likewise.
8846 (png_mod_LDFLAGS): Likewise.
8847
8848 * video/readers/png.c: New file.
8849
11cc30ac 88502008-01-28 Robert Millan <rmh@aybabtu.com>
8851
8852 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8853 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8854 `ifndef GRUB_MOD_GAP' hack.
8855 * util/elf/grub-mkimage.c (add_segments): Likewise.
8856
3abc589f 88572008-01-27 Robert Millan <rmh@aybabtu.com>
8858
8859 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8860 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8861 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8862
e1907778 88632008-01-27 Robert Millan <rmh@aybabtu.com>
8864
8865 Get grub-emu to build again (including parallel builds).
8866
8867 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8868 Split into ...
8869 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8870 (normal/execute.c_DEPENDENCIES): ... this, ...
8871 (grub-emu_DEPENDENCIES): ... and this.
8872
8873 * conf/i386-efi.rmk: Likewise.
8874 * conf/i386-linuxbios.rmk: Likewise.
8875 * conf/i386-ieee1275.rmk: Likewise.
8876 * conf/powerpc-ieee1275.rmk: Likewise.
8877 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8878
2216b101 88792008-01-27 Robert Millan <rmh@aybabtu.com>
8880
8881 * NEWS: Add a few items.
8882
f75172d9 88832008-01-27 Robert Millan <rmh@aybabtu.com>
8884
8885 Fix parallel builds with grub-emu. Based on earlier commit for
8886 grub-probe and grub-setup.
8887
8888 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8889 (util/grub-emu.c_DEPENDENCIES): ... this.
8890 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8891 (util/grub-emu.c_DEPENDENCIES): ... this.
8892 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8893 (util/grub-emu.c_DEPENDENCIES): ... this.
8894 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8895 (util/grub-emu.c_DEPENDENCIES): ... this.
8896 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8897 (util/grub-emu.c_DEPENDENCIES): ... this.
8898
3f51de77 88992008-01-27 Pavel Roskin <proski@gnu.org>
8900
8901 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8902 to create a gap between _end and the modules added to the image
8903 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8904 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8905 * util/elf/grub-mkimage.c (add_segments): Likewise.
8906
2033f53e 89072008-01-26 Pavel Roskin <proski@gnu.org>
8908
8909 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8910 just return an error.
8911
22da1f6f 89122008-01-26 Bean <bean123ch@gmail.com>
8913
8914 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8915 (grub_reiserfs_get_item): Save offset of the next item.
8916 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8917
2a9525e6 89182008-01-25 Robert Millan <rmh@aybabtu.com>
8919
8920 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8921 make all filesystem sources appear together (possibly fixing omissions
8922 while at it).
8923 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8924 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8925 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8926 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8927
8928 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8929 add `kern/file.c'.
8930 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8931 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8932 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8933 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8934
8935 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8936 (probe): Add a sanity check to make sure of our ability to read
8937 requested files when probing for filesystem type.
8938
8939 * genmk.rb: Update copyright year (2007).
8940
8941 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8942 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8943 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8944 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8945 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8946 : Remove function prototypes.
8947
b95f71b5 89482008-01-25 Robert Millan <rmh@aybabtu.com>
8949
8950 Revert my previous commits (based on wrong assumption of how grub_errno
8951 works).
8952
fe6b695a 8953 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 8954 * kern/file.c (grub_file_open): Likewise.
8955
d08bbb49 89562008-01-24 Pavel Roskin <proski@gnu.org>
8957
8958 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8959 that hang if GRUB tries to setup colors.
8960 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8961 colors for firmwares that don't support it.
8962 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8963 Recognize Open Hack'Ware, set flags to work around its
8964 limitations.
8965
605e36ed 89662008-01-24 Robert Millan <rmh@aybabtu.com>
8967
8968 * kern/file.c (grub_file_open): Do not account previous failures of
8969 unrelated functions when grub_errno is checked for.
8970 Reported by Oleg Strikov.
8971
bac332a1 89722008-01-24 Bean <bean123ch@gmail.com>
8973
8974 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8975 (grub_ufs_sblock): New member volume name.
8976 (grub_ufs_find_file): Fix string copy bug.
8977 (grub_ufs_label): Implement this function properly.
8978
8979 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8980 (grub_hfs_iterate_records): Use the correct file number for extents
8981 and catalog file. Fix problem in next index calculation.
8982 (grub_hfs_find_node): Replace recursive function call with loop.
8983 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8984
15c80c09 89852008-01-23 Robert Millan <rmh@aybabtu.com>
8986
8987 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8988 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8989 (grub_multiboot2_real_boot): New function prototype.
8990
8991 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8992 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8993
8994 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8995 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8996
305338fd 89972008-01-23 Robert Millan <rmh@aybabtu.com>
8998
8999 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9000 #ifdef'ed out grub_printf().
9001
3ea52685 90022008-01-23 Robert Millan <rmh@aybabtu.com>
9003
9004 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9005 grub_dprintf calls, since they make "debug=all" mode unusable.
9006 (grub_console_checkkey): Likewise.
9007
5882ae4b 90082008-01-23 Robert Millan <rmh@aybabtu.com>
9009
9010 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9011 `term/i386/pc/at_keyboard.c'.
9012 (pkglib_MODULES): Add `serial.mod'.
9013 (serial_mod_SOURCES): New variable.
9014 (serial_mod_CFLAGS): Likewise.
9015 (serial_mod_LDFLAGS): Likewise.
9016
9017 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
9018 `<grub/powerpc/ieee1275/console.h>'.
9019 (grub_keyboard_controller_init): New function prototype.
9020 (grub_console_checkkey): Likewise.
9021 (grub_console_getkey): Likewise.
9022
9023 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9024 keyboard on i386.
9025
9026 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9027 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9028
06ab5303 90292008-01-23 Robert Millan <rmh@aybabtu.com>
9030
9031 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9032 present, "(memdisk)/boot/grub" becomes the default prefix.
9033
9034 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9035 a memdisk tarball with all the modules. Add --overlay=DIR option that
9036 allows users to overlay additional files into the image.
9037
dbb475a4 90382008-01-23 Robert Millan <rmh@aybabtu.com>
9039
9040 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9041 and `machine/memory.h'.
9042 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9043 (_multiboot_mod_SOURCES): New variable.
9044 (_multiboot_mod_CFLAGS): Likewise.
9045 (_multiboot_mod_LDFLAGS): Likewise.
9046 (multiboot_mod_SOURCES): Likewise.
9047 (multiboot_mod_CFLAGS): Likewise.
9048 (multiboot_mod_LDFLAGS): Likewise.
9049
9050 * include/grub/i386/ieee1275/loader.h: New file.
9051
9052 * include/grub/i386/ieee1275/machine.h: Likewise.
9053
9054 * include/grub/i386/ieee1275/memory.h: Likewise.
9055
9056 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9057 variable declaration.
9058 (grub_os_area_size): Likewise.
9059
9060 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9061 (grub_lower_mem, grub_upper_mem): New variables.
9062 (grub_stop_floppy): New function (just to make
9063 grub_multiboot2_real_boot() happy).
9064
9065 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9066 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9067 (grub_stop): New function.
9068 Include `"../realmode.S"' and `"../loader.S"'.
9069
9070 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9071 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9072
9073 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9074 rely on grub_multiboot2_real_boot() for final boot.
9075
25638629 90762008-01-22 Robert Millan <rmh@aybabtu.com>
9077
9078 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9079 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9080 device that doesn't look like an SD card.
9081 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9082 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9083 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9084 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9085 found.
9086
9dad816d 90872008-01-22 Robert Millan <rmh@aybabtu.com>
9088
9089 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9090 avoid claiming over our own code.
9091
34842f2d 90922008-01-22 Bean <bean123ch@gmail.com>
9093
9094 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9095 (jpeg_mod_SOURCES): New variable.
9096 (jpeg_mod_CFLAGS): Likewise.
9097 (jpeg_mod_LDFLAGS): Likewise.
9098
9099 * video/readers/jpeg.c : New file.
9100
44023a28 91012008-01-22 Bean <bean123ch@gmail.com>
9102
9103 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9104 there are no more items.
9105
bc2d8ac6 91062008-01-21 Robert Millan <rmh@aybabtu.com>
9107
9108 * kern/mm.c (grub_mm_init_region): Improve debug message.
9109
261bd4bc 91102008-01-21 Robert Millan <rmh@aybabtu.com>
9111
9112 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9113 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9114 address.
9115 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9116 a C macro.
9117 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9118 Indicates start of upper memory.
9119 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9120 (generate_image): Abort when image size is big enough to corrupt
9121 upper memory.
9122
9123 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9124 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9125 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9126 instead of hardcoding 0xA0000.
9127 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9128 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9129 instead of hardcoding 0xA0000.
9130
f970b55e 91312008-01-21 Robert Millan <rmh@aybabtu.com>
9132
9133 * disk/memdisk.c (memdisk_size): New variable.
9134 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9135 `memdisk_size'.
9136 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9137 image to dynamic memory.
9138 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9139 `memdisk_size'. Free memdisk block.
9140
1a8b0526 91412008-01-21 Robert Millan <rmh@aybabtu.com>
9142
9143 Fix detection of very small filesystems (like tar).
9144
9145 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9146 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9147 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9148 a problem with this disk).
9149
6e9b4aab 91502008-01-21 Robert Millan <rmh@aybabtu.com>
9151
9152 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9153 on grub_biosdisk_rw_standard() error.
9154
0d8837b2 91552008-01-21 Robert Millan <rmh@aybabtu.com>
9156
9157 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9158 recent changes.
9159 * kern/elf.c: Likewise.
9160 * kern/ieee1275/ieee1275.c: Likewise.
9161 * kern/powerpc/ieee1275/openfw.c: Likewise.
9162 * term/ieee1275/ofconsole.c: Likewise.
9163
ffd36e34 91642008-01-21 Robert Millan <rmh@aybabtu.com>
9165
9166 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9167
3f0093d0 9168 * include/grub/kernel.h (grub_arch_memdisk_addr)
9169 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 9170
3f0093d0 9171 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9172 (grub_arch_memdisk_size): ... to here.
ffd36e34 9173
6c391b21 91742008-01-21 Robert Millan <rmh@aybabtu.com>
9175
9176 Mostly based on bugfix from Bean.
9177
9178 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9179 attribute with hook() parameter.
9180 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9181 declaration.
9182 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9183 attribute with hook() parameter.
9184 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9185 declaration.
9186
55a581dc 91872008-01-21 Robert Millan <rmh@aybabtu.com>
9188
9189 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9190 (pkglib_MODULES): Add `memdisk.mod'.
9191 (memdisk_mod_SOURCES): New variable.
9192 (memdisk_mod_CFLAGS): Likewise.
9193 (memdisk_mod_LDFLAGS): Likewise.
9194
9195 * disk/memdisk.c: New file.
9196
9197 * include/grub/disk.h (grub_disk_dev_id): Add
9198 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9199
9200 * include/grub/i386/pc/kernel.h
9201 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9202 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9203 (grub_kernel_image_size): New variable declaration.
9204 (grub_total_module_size): Likewise.
9205 (grub_memdisk_image_size): Likewise.
9206
9207 * include/grub/i386/pc/memory.h
9208 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9209
9210 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9211 (grub_arch_memdisk_addr): New variable declaration.
9212 (grub_arch_memdisk_size): Likewise.
9213
9214 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9215 (grub_arch_memdisk_size): Likewise.
9216
9217 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9218 (codestart): Replace hardcoded `0x100000' with
9219 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9220
9221 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9222 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9223 not NULL, append the contents of the file it refers to, at the end of
9224 the compressed kernel image. Initialize `grub_memdisk_image_size'
9225 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9226 (options): Add "memdisk"|'m' option.
9227 (main): Parse --memdisk|-m option, and pass user-provided path as
9228 parameter to generate_image().
9229
3d7f54c9 92302008-01-20 Robert Millan <rmh@aybabtu.com>
9231
9232 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9233 grub_dprintf() calls from here ...
9234 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9235
0bf74728 92362008-01-20 Robert Millan <rmh@aybabtu.com>
9237
9238 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9239
9240 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9241 declaration.
9242 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9243 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9244 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 9245 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 9246 property).
9247 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9248 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9249
33bf70a7 92502008-01-19 Robert Millan <rmh@aybabtu.com>
9251
fe6b695a 9252 Get rid of confusing function (superseded by
33bf70a7 9253 `grub_ieee1275_get_integer_property')
9254 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9255 prototype.
9256 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9257 function.
9258 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9259 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 9260 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 9261
e2da7d26 92622008-01-19 Robert Millan <rmh@aybabtu.com>
9263
9264 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9265 command after "shut-down", since implementations differ on which
9266 the command for halt is.
9267
59f1fd8d 92682008-01-19 Robert Millan <rmh@aybabtu.com>
9269
9270 * include/grub/i386/linuxbios/console.h: Add header protection.
9271 (grub_keyboard_controller_init): New function prototype.
9272 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9273 (KEYBOARD_COMMAND_READ): Likewise.
9274 (KEYBOARD_COMMAND_WRITE): Likewise.
9275 (KEYBOARD_SCANCODE_SET1): Likewise.
9276 (grub_keyboard_controller_write): New function.
9277 (grub_keyboard_controller_read): Likewise.
9278 (grub_keyboard_controller_init): Likewise.
9279
9280 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9281 (grub_console_init): On coreboot/LinuxBIOS, call
9282 grub_keyboard_controller_init().
9283
5f5a7c15 92842008-01-19 Robert Millan <rmh@aybabtu.com>
9285
9286 PowerPC changes provided by Pavel Roskin.
9287
9288 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9289 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9290 don't rely on cmain() doing it.
9291 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9292 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9293
1210e168 92942008-01-16 Robert Millan <rmh@aybabtu.com>
9295
9296 * include/grub/i386/linuxbios/memory.h
9297 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9298 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9299 receive `table_header' as argument. Instead, probe for it in the
9300 known memory ranges where it can be present.
9301 (grub_available_iterate): Do not pass a fixed `table_header' address
9302 to grub_linuxbios_table_iterate().
9303
3d04eab8 93042008-01-15 Robert Millan <rmh@aybabtu.com>
9305
9306 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9307 * conf/i386-ieee1275.rmk: New file.
9308 * include/grub/i386/ieee1275/console.h: Likewise.
9309 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9310 * include/grub/i386/ieee1275/kernel.h: Likewise.
9311 * include/grub/i386/ieee1275/time.h: Likewise.
9312 * kern/i386/ieee1275/init.c: Likewise.
9313 * kern/i386/ieee1275/startup.S: Likewise.
9314
d1bc1b73 93152008-01-15 Robert Millan <rmh@aybabtu.com>
9316
9317 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9318 when pointers are 32-bit (but still do set it to one when they are
9319 64-bit).
9320
66a65807 93212008-01-15 Robert Millan <rmh@aybabtu.com>
9322
9323 * include/grub/ieee1275/ieee1275.h
9324 (grub_ieee1275_get_integer_property): New function prototype.
9325
9326 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9327 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 9328 grub_ieee1275_get_property() to handle endianness.
66a65807 9329
9330 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9331 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 9332 where appropriate.
66a65807 9333 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9334 (grub_map): Likewise.
9335 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9336
a83ccafd 93372008-01-15 Bean <bean123ch@gmail.com>
9338
9339 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9340 (grub_script_execute_cmdline): Reset grub_errno.
9341
9342 * normal/main.c (read_config_file): Reset grub_errno.
9343
9344 * normal/parse.y (script_init): New.
9345 (script): Move function and menuentry here.
9346 (delimiter): New.
9347 (command): Add delimiter at the end of command.
9348 (commands): Adjust to match the new command.
9349 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 9350 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 9351 (if): Use the new commands.
9352
9353 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9354
df6ecfc6 93552008-01-15 Robert Millan <rmh@aybabtu.com>
9356
9357 * normal/menu.c (run_menu): Move timeout message from here ...
9358 (print_timeout): ... to here.
9359 (run_menu): Use print_timeout() once during initial draw to print
9360 the whole message, and again in every clock tick to update only
9361 the number of seconds.
9362
87ae25eb 93632008-01-15 Robert Millan <rmh@aybabtu.com>
9364
9365 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9366 actual size of `available' from grub_ieee1275_get_property(), and
9367 restrict parsing to that bound.
9368
47bf09a4 93692008-01-15 Christian Franke <franke@computer.org>
9370
9371 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9372 (argp_program_version): Remove variable.
9373 (argp_program_bug_address): Likewise.
9374 (options): Convert from struct argp_option to struct option.
9375 (struct arguments): Remove.
9376 (parse_opt): Remove.
9377 (usage): New function.
9378 (main): Replace struct args members by simple variables.
9379 Replace argp_parse() by getopt_long().
9380 Add switch to evaluate options.
9381 Add missing "(...)" around root_dev in prefix string.
9382
c86f1469 93832008-01-14 Robert Millan <rmh@aybabtu.com>
9384
9385 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9386 for grub_ieee1275_exit(), in order to improve portability.
9387
e622c559 93882008-01-14 Robert Millan <rmh@aybabtu.com>
9389
9390 * util/grub.d/10_linux.in (prefix): Define.
9391 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9392
44cb1ec8 93932008-01-13 Pavel Roskin <proski@gnu.org>
9394
9395 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9396 grub_errno if no errors have been detected.
9397
1eb8c802 93982008-01-12 Robert Millan <rmh@aybabtu.com>
9399
9400 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9401 (grub_util_get_dev_abstraction): New function prototype.
9402
9403 * util/getroot.c: Include `<grub/util/getroot.h>'
9404 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9405 (grub_util_get_dev_abstraction): ... here (new function).
9406
9407 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9408 `PRINT_ABSTRACTION'.
9409 (probe): Probe for abstraction type when requested.
9410 (main): Understand `--target=abstraction'.
9411
9412 * util/i386/efi/grub-install.in: Add abstraction module to core
9413 image when it is found to be necessary.
9414 * util/i386/pc/grub-install.in: Likewise.
9415 * util/powerpc/ieee1275/grub-install.in: Likewise.
9416
9417 * util/update-grub_lib.in (font_path): Return system path without
9418 converting to GRUB path.
9419 * util/update-grub.in: Convert system path returned by font_path()
9420 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9421 abstraction module is needed for loading fonts (if any). Export
9422 that as `GRUB_PRELOAD_MODULES'.
9423 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9424 insmod commands).
9425
52bd3de9 94262008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9427
9428 Remove some unused code from reiserfs.
f19dbdb7 9429
52bd3de9 9430 * fs/reiserfs.c (struct grub_reiserfs_key)
9431 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9432 (struct grub_reiserfs_node_body): Removed.
9433 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9434 Likewise.
9435 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9436 Likewise.
9437 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9438 Likewise.
9439 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9440 Likewise.
9441 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9442 Likewise.
9443 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9444 Likewise.
9445 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9446 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9447 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9448
2f80039d 94492008-01-10 Robert Millan <rmh@aybabtu.com>
9450
9451 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9452 Determines if a file is garbage left by packaging systems, etc.
9453 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9454 for processing /etc/grub.d scripts.
9455 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9456 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9457 as a condition for processing Linux images.
9458
87888032 94592008-01-10 Pavel Roskin <proski@gnu.org>
9460
9461 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9462 to compile reiserfs.c on PowerPC.
9463
7e54fced 94642008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 9465
9466 * kern/device.c (grub_device_iterate): Do not abort device iteration
9467 when one of the devices cannot be opened.
9468 * kern/disk.c (grub_disk_open): Do not account previous failures of
9469 unrelated functions when grub_errno is checked for.
9470
5aa541e6 94712008-01-08 Robert Millan <rmh@aybabtu.com>
9472
9473 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9474 `! grub_linux_is_bzimage', change order of address comparison to make
9475 it more intuitive, and improve "too big zImage" error message.
9476
7076340d 94772008-01-08 Robert Millan <rmh@aybabtu.com>
9478
9479 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9480 `$(update-grub_DATA)'.
9481 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9482 targets.
9483
9ca70333 94842008-01-07 Robert Millan <rmh@aybabtu.com>
9485
9486 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9487 which instruction is modified by grub-setup during installation
9488 (since it wasn't obvious by only looking at this file).
9489
38ccf575 94902008-01-07 Robert Millan <rmh@aybabtu.com>
9491
9492 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9493 listing actual TODO items.
9494
f5db4291 94952008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9496
868967cf 9497 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9498 correctly.
9499 (grub_reiserfs_get_key_offset): Likewise.
9500 (grub_reiserfs_set_key_offset): Likewise.
9501 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 9502 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 9503
9504 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9505 better to remove the bitfield version completely.
f19dbdb7 9506
868967cf 95072008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9508
f5db4291 9509 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9510 allocated from the heap, due to the fshelp implementation.
9511 (grub_reiserfs_dir): Free NODE, due to the same reason.
9512
492e6d9d 95132008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9514
9515 Mostly from Vincent Pelletier:
f19dbdb7 9516
492e6d9d 9517 * fs/reiserfs.c: New file.
f19dbdb7 9518
492e6d9d 9519 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9520 (reiserfs_mod_SOURCES): New variable.
9521 (reiserfs_mod_CFLAGS): Likewise.
9522 (reiserfs_mod_LDFLAGS): Likewise.
9523
9524 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9525 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9526 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9527 normal/color.c.
9528
9ce3e7c1 95292008-01-06 Robert Millan <rmh@aybabtu.com>
9530
9531 * normal/color.c: Remove `<grub/env.h>'.
9532
f3b58148 95332008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9534
9535 * include/grub/normal.h: Include <grub/env.h>.
9536
7ac3bcfa 95372008-01-05 Robert Millan <rmh@aybabtu.com>
9538
9539 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9540 usage example with `(hd0,1)'.
fb358190 9541 Reported by Samuel Thibault.
7ac3bcfa 9542
c8ee99d7 95432008-01-05 Robert Millan <rmh@aybabtu.com>
9544
9545 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9546 (grub_linux_boot_zimage): Rename to ...
9547 (grub_linux_boot): ... this.
9548 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9549 (grub_linux_boot_zimage): Conditionalize zImage copy.
9550
9551 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9552 (grub_linux_boot_bzimage): Remove prototype.
9553 (grub_linux_boot_zimage): Rename to ...
9554 (grub_linux_boot): ... this.
9555
9556 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9557 (grub_linux_boot): Remove function.
9558
0ece25b1 95592008-01-05 Robert Millan <rmh@aybabtu.com>
9560
9561 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9562 (grub_env_write_color_highlight): Likewise.
9563 (grub_wait_after_message): Likewise.
9564
9565 * normal/color.c: New file.
9566
9567 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9568 (normal_mod_DEPENDENCIES): Likewise.
9569
9570 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9571 (normal_mod_DEPENDENCIES): Likewise.
9572
9573 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9574 (normal_mod_DEPENDENCIES): Likewise.
9575
9576 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9577 (normal_mod_DEPENDENCIES): Likewise.
9578
9579 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9580 for waiting after a message is printed.
9581 * normal/main.c (read_config_file): Likewise.
9582 (grub_normal_init): Register grub_env_write_color_normal() and
9583 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9584 `color_highlight' variables as global.
9585
9586 * normal/menu.c (grub_wait_after_message): New function.
9587 (grub_color_menu_normal): New variable. Replaces ...
9588 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9589 (grub_color_menu_highlight): New variable. Replaces ...
9590 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9591 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9592 `GRUB_TERM_COLOR_STANDARD'.
9593 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9594 `normal_code' and `highlight_code' to `old_color_normal' and
9595 `old_color_highlight', respectively.
9596 (grub_menu_init_page): Update colors when drawing the menu, based on
9597 `menu_color_normal' and `menu_color_highlight' variables.
9598 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9599 a message is printed.
9600
182dd4e5 96012008-01-05 Robert Millan <rmh@aybabtu.com>
9602
9603 * kern/env.c (grub_env_context_open): Propagate hooks for global
9604 variables to new context.
9605
9606 * kern/main.c (grub_set_root_dev): Export `root' variable.
9607
ddf8f6ad 96082008-01-05 Robert Millan <rmh@aybabtu.com>
9609
9610 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 9611 discs unconditionally, since udev and others have options to provide
ddf8f6ad 9612 them.
9613
d8b43d9b 96142008-01-05 Robert Millan <rmh@aybabtu.com>
9615
9616 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9617
2bff2de3 96182008-01-04 Christian Franke <franke@computer.org>
9619
9620 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9621 of eisa_mmap.
9622
97eab917 96232008-01-03 Pavel Roskin <proski@gnu.org>
9624
9625 * kern/i386/linuxbios/init.c: Put "void" to all function
9626 declarations with no arguments.
9627 * kern/powerpc/ieee1275/init.c: Likewise.
9628 * term/i386/pc/at_keyboard.c: Likewise.
9629 * term/i386/pc/vga_text.c: Likewise.
9630 * util/grub-mkdevicemap.c: Likewise.
9631
b9416d00 96322008-01-02 Robert Millan <rmh@aybabtu.com>
9633
9634 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9635 message when loaded image is out of bounds.
9636 (grub_multiboot_load_elf64): Likewise.
9637
92695df9 96382008-01-02 Pavel Roskin <proski@gnu.org>
9639
9640 * util/grub.d/10_linux.in: Try version without ".old" when
9641 looking for initrd. It's better to use initrd from the newer
9642 kernel of the same version than no initrd at all.
9643
d98d9cad 96442008-01-01 Robert Millan <rmh@aybabtu.com>
9645
9646 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9647
dbfdce36 96482008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9649
f19dbdb7 9650 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9651 grub_video_get_active_render_target.
9652 (grub_video_adapter): Added unmap_color and get_active_render_target.
9653
f19dbdb7 9654 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9655 grub_video_get_active_render_target.
9656 (grub_video_get_info): Changed method to accept NULL pointer as an
9657 argument to allow detection of active video adapter.
9658
9659 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9660 grub_video_vbe_unmap_color_int.
9661 Added grub_video_vbe_unmap_color and
9662 grub_video_vbe_get_active_render_target.
9663 (grub_video_vbe_adapter): Added unmap_color and
9664 get_active_render_target.
9665
f19dbdb7 9666 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9667 with grub_video_vbe_unmap_color_int.
9668
9669 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9670 (DEFAULT_NORMAL_COLOR): Likewise.
9671 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9672 (DEFAULT_FG_COLOR): Removed.
9673 (DEFAULT_BG_COLOR): Likewise.
9674 (DEFAULT_CURSOR_COLOR): Changed value.
9675 (grub_virtual_screen): Added standard_color_setting,
9676 normal_color_setting, highlight_color_setting and term_color.
9677 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9678 (bitmap_width): Added.
9679 (bitmap_height): Likewise.
9680 (bitmap): Likewise.
9681 (set_term_color): Likewise.
9682 (grub_virtual_screen_setup): Changed to use new terminal coloring
9683 settings.
9684 (grub_gfxterm_init): Added init for bitmap.
9685 (grub_gfxterm_fini): Added destroy for bitmap.
9686 (redraw_screen_rect): Updated to use background bitmap and new
9687 terminal coloring.
9688 (scroll_up): Added optimization for case when there is no bitmap.
9689 (grub_gfxterm_cls): Fixed to use correct background color.
9690 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9691 coloring.
9692 (grub_virtual_screen_setcolor): Likewise.
9693 (grub_virtual_screen_getcolor): Added.
9694 (grub_gfxterm_background_image_cmd): Likewise.
9695 (grub_video_term): Added setcolor and getcolor.
9696 (MOD_INIT): Added registration of background_image command.
9697 (MOD_TERM): Added unregistration for background_image command.
9698
c3c20931 96992007-12-30 Pavel Roskin <proski@gnu.org>
9700
9701 * loader/multiboot_loader.c: Fix multiboot command
9702 unregistration. Fix all typos in the word "multiboot".
9703
df266716 97042007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9705
9706 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9707 support for initrd names used in Fedora.
9708
fc6e896c 97092007-12-26 Bean <bean123ch@gmail.com>
9710
9711 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9712 (cpio_mod_SOURCES): New variable.
9713 (cpio_mod_CFLAGS): Likewise.
9714 (cpio_mod_LDFLAGS): Likewise.
9715
9716 * fs/cpio.c: New file.
9717
9718 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9719
9720 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9721
9722 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9723
9724 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9725
533110ad 97262007-12-25 Robert Millan <rmh@aybabtu.com>
9727
9728 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9729 (grub_getcolor): New function.
9730
9731 * kern/term.c (grub_getcolor): New function.
9732 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9733 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9734 (print_entry): Set normal and highlight colors to
9735 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9736 respectively, before printing and restore them to old
9737 values afterwards.
9738 (grub_menu_init_page): Likewise. Fill an additional colored space
9739 that would otherwise be left blank.
9740
9741 * term/efi/console.c (grub_console_getcolor): New function.
9742 (struct grub_console_term.getcolor): New variable.
9743 * term/i386/pc/console.c (grub_console_getcolor): New function.
9744 (struct grub_console_term.getcolor): New variable.
9745 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9746 (struct grub_console_term.getcolor): New variable.
9747
9748 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9749 (struct grub_console_term.setcolor): Remove variable.
9750 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9751 (struct grub_console_term.setcolor): Remove variable.
9752 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9753 (struct grub_console_term.setcolor): Remove variable.
9754 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9755 (struct grub_console_term.setcolor): Remove variable.
9756
4931827f 97572007-12-25 Robert Millan <rmh@aybabtu.com>
9758
9759 * configure.ac: Search for possible unifont.hex locations, and
9760 define UNIFONT_HEX if found.
9761
9762 * Makefile.in (UNIFONT_HEX): Define variable.
9763 (DATA): Rename to ...
9764 (PKGLIB): ... this. Update all users.
9765 (PKGDATA): New variable.
9766 (pkgdata_IMAGES): Rename to ...
9767 (pkglib_IMAGES): ... this. Update all users.
9768 (pkgdata_MODULES): Rename to ...
9769 (pkglib_MODULES): ... this. Update all users.
9770 (pkgdata_PROGRAMS): Rename to ...
9771 (pkglib_PROGRAMS): ... this. Update all users.
9772 (pkgdata_DATA): Rename to ...
9773 (pkglib_DATA): ... this. Update all users.
9774 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9775 (unicode.pff, ascii.pff): New rules.
9776 (all-local): Add `$(PKGDATA)' dependency.
9777 (install-local): Process `$(PKGDATA)'.
9778
9779 * util/update-grub_lib.in (font_path): Search for *.pff files in
9780 a few more locations, including `${pkgdata}'.
9781
57e57e31 97822007-12-23 Robert Millan <rmh@aybabtu.com>
9783
9784 Patch from Bean <bean123ch@gmail.com>:
9785 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9786 `size'.
9787
4bc72aa9 97882007-12-21 Bean <bean123ch@gmail.com>
9789
9790 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9791 (ntfscomp_mod_SOURCES): New variable.
9792 (ntfscomp_mod_CFLAGS): Likewise.
9793 (ntfscomp_mod_LDFLAGS): Likewise.
9794
9795 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9796 (grub_probe_SOURCES): Likewise.
9797 (grub_emu_SOURCES): Likewise.
9798
9799 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9800 (grub_emu_SOURCES): Likewise.
9801
9802 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9803 (grub_emu_SOURCES): Likewise.
9804
9805 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9806 (grub_emu_SOURCES): Likewise.
9807
9808 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9809 (read_run_list): Renamed to grub_ntfs_read_run_list.
9810 (decomp_nextvcn): Moved to ntfscomp.c.
9811 (decomp_getch): Likewise.
9812 (decomp_get16): Likewise.
9813 (decomp_block): Likewise.
9814 (read_block): Likewise.
9815 (read_data): Partially moved to ntfscomp.c.
9816 (fixup): Change unsigned to grub_uint16_t.
9817 (read_mft): Change unsigned long to grub_uint32_t.
9818 (read_attr): Likewise.
9819 (read_data): Likewise.
9820 (read_run_data): Likewise.
9821 (read_run_list): Likewise.
9822 (read_mft): Likewise.
9823
9824 * fs/ntfscomp.c: New file.
9825
9826 * include/grub/ntfs.h: New file.
9827
af680a87 98282007-12-16 Robert Millan <rmh@aybabtu.com>
9829
9830 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9831 IDE disk check, since Linux is known to support 20 IDE disks.
9832 Reported by Colin Watson.
9833
84be7599 98342007-12-15 Bean <bean123ch@gmail.com>
9835
9836 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9837 (lnxboot_img_SOURCES): New variable.
9838 (lnxboot_img_ASFLAGS): Likewise.
9839 (lnxboot_img_LDFLAGS): Likewise.
9840
9841 * boot/i386/pc/lnxboot.S: New file.
9842
6af9db01 98432007-11-24 Pavel Roskin <proski@gnu.org>
9844
9845 * configure.ac: Test if '--build-id=none' is supported by the
9846 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9847 objcopy to generate incorrect binary files (binutils
9848 2.17.50.0.18-1 as shipped by Fedora 8).
9849 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9850 linking, so that build ID doesn't break the test.
9851
7361cfe6 98522007-11-24 Pavel Roskin <proski@gnu.org>
9853
9854 * include/grub/i386/time.h: use "void" in the argument list
9855 of grub_cpu_idle().
9856 * include/grub/powerpc/time.h: Likewise.
9857 * include/grub/sparc64/time.h: Likewise.
9858
1593e10c 98592007-11-18 Christian Franke <franke@computer.org>
9860
9861 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9862 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9863 This fixes the problem that function keys did not work in grub-emu.
9864
3b8db1a8 98652007-11-18 Christian Franke <franke@computer.org>
9866
9867 * disk/host.c (grub_host_open): Remove attribute unused from
9868 name parameter. Add check for "host". This fixes the problem
9869 that grub-emu does not find partitions.
9870
2e29408d 98712007-11-18 Christian Franke <franke@computer.org>
9872
9873 * util/hostfs.c (is_dir): New function.
9874 (grub_hostfs_dir): Handle missing dirent.d_type case.
9875 (grub_hostfs_read): Add missing fseek().
9876 (grub_hostfs_label): Clear label pointer. This fixes a crash
9877 of grub-emu on "ls (host)".
9878
398cd047 98792007-11-18 Christian Franke <franke@computer.org>
9880
9881 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9882 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9883 to 64 bit boundary by default.
9884
c405c391 98852007-11-18 Bean <bean123ch@gmail.com>
9886
9887 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9888 (hexdump_mod_SOURCES): New variable.
9889 (hexdump_mod_CFLAGS): Likewise.
9890 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 9891
c405c391 9892 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9893
9894 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9895
9896 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9897
9898 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9899
9900 * include/grub/hexdump.h: New file.
9901
9902 * commands/hexdump.c: New file.
9903
5cced7fd 99042007-11-10 Robert Millan <rmh@aybabtu.com>
9905
9906 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9907 in grub_outb() calls.
9908 (beep_on): Likewise.
9909
8b714eb0 99102007-11-10 Christian Franke <franke@computer.org>
9911
9912 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9913 (grub_menu_run): Likewise.
9914
ce0f1839 99152007-11-10 Robert Millan <rmh@aybabtu.com>
9916
9917 * include/grub/i386/efi/machine.h: New file.
9918 * include/grub/i386/linuxbios/machine.h: Likewise.
9919 * include/grub/i386/pc/machine.h: Likewise.
9920 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9921 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9922
9923 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9924 (serial_hw_io_addr): New variable.
9925 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9926 instead of `(unsigned short *) 0x400'.
9927
270c237d 99282007-11-10 Bean <bean123ch@gmail.com>
9929
9930 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9931
a87783bf 99322007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9933
9934 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9935 (vga_mod_SOURCES): Added.
9936 (vga_mod_CFLAGS): Likewise.
9937 (vga_mod_LDFLAGS): Likewise.
9938
9939 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9940 grub_outb() calls.
9941 (set_map_mask): Likewise.
9942 (set_read_map): Likewise.
9943 (set_read_address): Likewise.
9944 (vga_font): Removed variable.
9945 (get_vga_glyph): Removed function.
9946 (invalidate_char): Likewise.
9947 (write_char): Changed to use grub_font_get_glyph() for font
9948 information.
9949 (grub_vga_putchar): Likewise.
9950 (grub_vga_getcharwidth): Likewise.
9951
6433b448 99522007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9953
9954 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9955 flags.
9956 (pxeboot_img_LDFLAGS): Likewise.
9957 (diskboot_img_LDFLAGS): Likewise.
9958 (kernel_img_LDFLAGS): Likewise.
9959
49178511 99602007-11-06 Robert Millan <rmh@aybabtu.com>
9961
9962 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9963 in grub_outb() calls.
9964 (serial_hw_init): Likewise.
9965
53b052de 99662007-11-05 Robert Millan <rmh@aybabtu.com>
9967
9968 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9969 spaces. Skip non-regular files.
9970
5ab33bba 99712007-11-05 Robert Millan <rmh@aybabtu.com>
9972
9973 * kern/disk.c (grub_disk_firmware_fini)
9974 (grub_disk_firmware_is_tainted): New variables.
9975
9976 * include/grub/disk.h (grub_disk_firmware_fini)
9977 (grub_disk_firmware_is_tainted): Likewise.
9978
9979 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9980 (grub_disk_biosdisk_fini): ... to here.
9981 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9982 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9983 is set. Register grub_disk_biosdisk_fini() in
9984 `grub_disk_firmware_fini'.
9985
9986 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9987 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9988 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9989 to finish existing firmware disk interface.
9990
9991 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9992 (ata_mod_SOURCES): New variable.
9993 (ata_mod_CFLAGS): Likewise.
9994 (ata_mod_LDFLAGS): Likewise.
9995
0149ab7c 99962007-11-05 Robert Millan <rmh@aybabtu.com>
9997
9998 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9999 (grub_ata_wait): Reimplement using grub_millisleep().
10000
10001 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10002 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10003
be7ac41e 100042007-11-03 Marco Gerards <marco@gnu.org>
10005
10006 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10007 (CRTC_ADDR_PORT): New macro.
10008 (CRTC_DATA_PORT): Likewise.
10009 (CRTC_CURSOR): Likewise.
10010 (CRTC_CURSOR_ADDR_HIGH): Likewise.
10011 (CRTC_CURSOR_ADDR_LOW): Likewise.
10012 (update_cursor): New function.
10013 (grub_console_real_putchar): Call `update_cursor'.
10014 (grub_console_gotoxy): Likewise.
10015 (grub_console_cls): Set the default color when clearing the
10016 screen.
10017 (grub_console_setcursor): Implemented.
10018
bb06ab2e 100192007-11-03 Marco Gerards <marco@gnu.org>
10020
10021 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10022 become activate.
10023 (grub_ata_pio_write): Likewise.
10024
10025 (grub_atapi_identify): Wait after issuing an ATA command.
10026 (grub_atapi_packet): Likewise.
10027 (grub_ata_identify): Likewise.
10028 (grub_ata_readwrite): Likewise.
10029
cf8f780b 100302007-11-03 Marco Gerards <marco@gnu.org>
10031
10032 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10033 (grub_ata_pio_write): Likewise.
10034 (grub_ata_readwrite): Use `grub_error', instead of
10035 returning `grub_errno'.
10036
ed649e54 100372007-11-03 Marco Gerards <marco@gnu.org>
10038
10039 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10040 grub_ata_pio_write once for every single sector, instead of for
10041 multiple sectors.
10042
ca25d8f0 100432007-10-31 Robert Millan <rmh@aybabtu.com>
10044
10045 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10046
10047 * conf/i386-linuxbios.rmk: New file.
10048
10049 * kern/i386/pc/hardware.c: Likewise.
10050 * term/i386/pc/at_keyboard.c: Likewise.
10051 * term/i386/pc/vga_text.c: Likewise.
10052
10053 * include/grub/i386/linuxbios/boot.h: Likewise.
10054 * include/grub/i386/linuxbios/console.h: Likewise.
10055 * include/grub/i386/linuxbios/init.h: Likewise.
10056 * include/grub/i386/linuxbios/kernel.h: Likewise.
10057 * include/grub/i386/linuxbios/loader.h: Likewise.
10058 * include/grub/i386/linuxbios/memory.h: Likewise.
10059 * include/grub/i386/linuxbios/serial.h: Likewise.
10060 * include/grub/i386/linuxbios/time.h: Likewise.
10061
10062 * kern/i386/linuxbios/init.c: Likewise.
10063 * kern/i386/linuxbios/startup.S: Likewise.
10064 * kern/i386/linuxbios/table.c: Likewise.
10065
e911ecc1 100662007-10-31 Marco Gerards <marco@gnu.org>
10067
10068 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10069 (ata_mod_SOURCES): New variable.
10070 (ata_mod_CFLAGS): Likewise.
10071 (ata_mod_LDFLAGS): Likewise.
10072
10073 * disk/ata.c: New file.
10074
10075 * include/grub/disk.h (grub_disk_dev_id): Add
10076 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 10077
7f66d0e0 100782007-10-31 Robert Millan <rmh@aybabtu.com>
10079
10080 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10081 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10082
10083 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10084 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10085
10086 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10087 `<grub/types.h>'.
10088
10089 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10090
5cd7dd46 100912007-10-27 Robert Millan <rmh@aybabtu.com>
10092
3236ca65 10093 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 10094
2ebfc90f 100952007-10-22 Robert Millan <rmh@aybabtu.com>
10096
10097 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10098 `"../realmode.S"'.
10099 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10100
73fcb0f3 101012007-10-22 Robert Millan <rmh@aybabtu.com>
10102
10103 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10104 (pkgdata_MODULES): Add `biosdisk.mod'.
10105 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10106 variables.
10107
10108 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10109 (grub_biosdisk_init): Replace with ...
10110 (GRUB_MOD_INIT(biosdisk)): ... this.
10111 (grub_biosdisk_fini): Replace with ...
10112 (GRUB_MOD_FINI(biosdisk)): ... this.
10113
10114 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10115 (grub_machine_init): Remove call to grub_biosdisk_init().
10116 (grub_machine_fini): Remove call to grub_machine_fini().
10117
10118 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10119
3381d274 101202007-10-22 Robert Millan <rmh@aybabtu.com>
10121
10122 * include/grub/time.h: New file.
10123 * include/grub/i386/time.h: Likewise.
10124 * include/grub/powerpc/time.h: Likewise.
10125 * include/grub/sparc64/time.h: Likewise.
10126
10127 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10128 instances to ...
10129 (KERNEL_MACHINE_TIME_HEADER): ... this.
10130 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10131 instances to ...
10132 (KERNEL_MACHINE_TIME_HEADER): ... this.
10133 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10134 instances to ...
10135 (KERNEL_MACHINE_TIME_HEADER): ... this.
10136
10137 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10138 (grub_millisleep): New function.
10139 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10140 (grub_millisleep): New function.
10141 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10142 Remove `grub/machine/time.h' include.
10143 (grub_millisleep): New function.
10144 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10145 Remove `grub/machine/time.h' include.
10146 (grub_millisleep): New function.
10147
10148 * include/grub/misc.h (grub_div_roundup): New function.
10149
10150 * kern/misc.c: Include `<grub/time.h>'.
10151 (grub_millisleep_generic): New function.
10152
10153 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10154 Add `time.h'.
10155 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10156 Add `time.h'.
10157 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10158 `machine/time.h'. Add `time.h'.
10159 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10160
a39a0312 101612007-10-21 Robert Millan <rmh@aybabtu.com>
10162
10163 * include/grub/misc.h (grub_max): New function.
10164
2aad70e2 101652007-10-21 Robert Millan <rmh@aybabtu.com>
10166
10167 * util/misc.c (grub_util_info): Call fflush() before returning.
10168
54b71c4b 101692007-10-20 Robert Millan <rmh@aybabtu.com>
10170
10171 * genmk.rb (Image): Copy `extra_flags' from here ...
10172 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10173
10174 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10175 to `argc' and `args' arguments.
10176
a979f513 101772007-10-17 Robert Millan <rmh@aybabtu.com>
10178
10179 * kern/i386/loader.S: New file.
10180
10181 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10182 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10183 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10184 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10185 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10186 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10187 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10188 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10189 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10190 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10191 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10192 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10193 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10194 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10195
10196 * kern/i386/realmode.S: New file.
10197
10198 * kern/i386/pc/startup.S (protstack): Moved from here ...
10199 * kern/i386/realmode.S (protstack)... to here.
10200 * kern/i386/pc/startup.S (gdt): Moved from here ...
10201 * kern/i386/realmode.S (gdt)... to here.
10202 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10203 * kern/i386/realmode.S (prot_to_real)... to here.
10204
10205 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10206 `kern/i386/realmode.S'.
10207
825fc8fd 102082007-10-17 Robert Millan <rmh@aybabtu.com>
10209
10210 * include/grub/i386/loader.h: New file.
10211
10212 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10213 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10214 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10215 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10216 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10217 * include/grub/i386/loader.h (grub_linux_prot_size)
10218 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10219 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10220 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10221 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10222
10223 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10224
e179b2f4 102252007-10-15 Robert Millan <rmh@aybabtu.com>
10226
10227 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10228 filesystem when dev->disk is unset.
10229 Do probe for filesystem even when dev->disk->has_partitions is set.
10230 In case a filesystem is found, always report it.
10231 In case it isn't, if dev->disk->has_partitions is set, report that
10232 a partition table was found instead of reporting that no filesystem
10233 could be identified.
10234
5db82af6 102352007-10-12 Robert Millan <rmh@aybabtu.com>
10236
10237 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10238 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10239
68f6ac74 10240 * include/grub/types.h (grub_host_to_target16): New macro.
10241 (grub_host_to_target32): Likewise.
10242 (grub_host_to_target64): Likewise.
10243 (grub_target_to_host16): Likewise.
10244 (grub_target_to_host32): Likewise.
10245 (grub_target_to_host64): Likewise.
5db82af6 10246
10247 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10248 Renamed from to ...
10249 (GRUB_MOD_ALIGN): ...this. Update all users.
10250
68f6ac74 10251 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10252 grub_host_to_target32.
10253 Replace grub_be_to_cpu32 with grub_target_to_host32.
10254 (load_modules): Likewise.
10255 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10256 Replace grub_be_to_cpu32 with grub_target_to_host32.
10257 Replace grub_cpu_to_be16 with grub_host_to_target16.
10258 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 10259
3cf497cc 102602007-10-12 Robert Millan <rmh@aybabtu.com>
10261
10262 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10263 * util/elf/grub-mkimage.c: ... here.
10264
10265 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10266 `util/powerpc/ieee1275/grub-mkimage.c'.
10267
c8cc3692 102682007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 10269
c8cc3692 10270 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10271 and make it easier to figure out.
10272 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10273 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10274 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10275 leave us with less than HEAP_MIN_SIZE total heap.
10276 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 10277
5c58b791 102782007-10-03 Robert Millan <rmh@aybabtu.com>
10279
10280 * include/grub/i386/io.h: New file.
10281 * commands/i386/pc/play.c (inb): Removed.
10282 (outb): Removed.
10283 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10284 with grub_outb().
afcd2ef8 10285 * term/i386/pc/serial.c (inb): Removed.
10286 (outb): Removed.
10287 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10288 with grub_outb().
10289 * term/i386/pc/vga.c (inb): Removed.
10290 (outb): Removed.
10291 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10292 with grub_outb().
5c58b791 10293
1a477ed6 102942007-10-02 Robert Millan <rmh@aybabtu.com>
10295
10296 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10297 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10298 Reported by Marcin Kurek.
10299
6b5d80fa 103002007-09-07 Robert Millan <rmh@aybabtu.com>
10301
10302 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10303 SmartFirmware version updates (as released by Sven Luther), and avoid
10304 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10305 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10306 known broken.
10307
5618afbf 103082007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10309
10310 From Hitoshi Ozeki:
10311 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10312 when merging two regions.
10313
6139dcd9 103142007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10315
508e39ee 10316 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10317 * normal/completion.c (grub_normal_do_completion): Likewise.
10318 Reported by Hitoshi Ozeki.
10319
103202007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10321
6139dcd9 10322 Do not use devices at boot in chainloading.
f19dbdb7 10323
6139dcd9 10324 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10325 (boot_part_addr): Likewise.
10326 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10327 with BOOT_DRIVE and BOOT_PART_ADDR.
10328 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10329 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10330
38da6516 103312007-08-29 Robert Millan <rmh@aybabtu.com>
10332
10333 Patch from Simon Peter <dn.tlp@gmx.net>:
10334 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10335 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10336 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10337 util/i386/pc/grub-setup.c_DEPENDENCIES.
10338 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10339 util/grub-probe.c_DEPENDENCIES.
10340 * conf/powerpc-ieee1275.rmk: Likewise.
10341
29d0928c 103422007-08-28 Robert Millan <rmh@aybabtu.com>
10343
10344 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10345 to tell grub-mkdevicemap how to name devices.
10346 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10347 feature).
10348
10349 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10350 util/i386/get_disk_name.c.
10351 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10352 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10353 util/ieee1275/get_disk_name.c.
10354
10355 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10356
10357 * DISTLIST: Add util/i386/get_disk_name.c and
10358 util/ieee1275/get_disk_name.c.
10359
10360 * util/grub-mkdevicemap.c: Replace device naming logic with
10361 grub_util_get_disk_name() calls.
10362
5a0d3cca 103632007-08-20 Robert Millan <rmh@aybabtu.com>
10364
10365 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10366 (so that it works for both plural and singular quantities).
10367
8b72db2f 103682007-08-05 Robert Millan <rmh@aybabtu.com>
10369
10370 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10371 so that [xz] isn't taken into account when determining order.
10372
352466bf 103732007-08-02 Marco Gerards <marco@gnu.org>
10374
10375 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10376 `include/multiboot2.h', `include/grub/elfload.h',
10377 `include/multiboot.h', `include/grub/multiboot.h',
10378 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10379 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10380 `kern/elf.c', `loader/multiboot_loader.c',
10381 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10382 `loader/i386/pc/multiboot2.c',
10383 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10384 `util/i386/pc/grub-mkrescue.in'. Remove
10385 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10386 `include/grub/i386/pc/util/biosdisk.h' and
10387 `include/grub/powerpc/ieee1275/multiboot.h'.
10388
8f096014 103892007-08-02 Bean <bean123ch@gmail.com>
10390
10391 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10392 (ntfs_mod_SOURCES): New variable.
10393 (ntfs_mod_CFLAGS): Likewise.
10394 (ntfs_mod_LDFLAGS): Likewise.
10395
10396 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10397 (grub_probe_SOURCES): Likewise.
10398 (grub_emu_SOURCES): Likewise.
10399
10400 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10401 (grub_emu_SOURCES): Likewise.
10402
10403 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10404 (grub_emu_SOURCES): Likewise.
f19dbdb7 10405
8f096014 10406 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10407
10408 * fs/ntfs.c: New file.
10409
9959f7db 104102007-08-02 Bean <bean123ch@gmail.com>
10411
10412 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10413
10414 * file.h (grub_file): Likewise.
10415
10416 * fshelp.h (grub_fshelp_read_file): Likewise.
10417
10418 * util/i386/pc/grub-setup.c (setup): Likewise.
10419 (save_first_sector): Likewise.
10420 (save_blocklists): Likewise.
f19dbdb7 10421
9959f7db 10422 * fs/affs.c (grub_affs_read_file): Likewise.
10423
10424 * fs/ext2.c (grub_ext2_read_file): Likewise.
10425
10426 * fs/fat.c (grub_fat_read_data): Likewise.
10427
10428 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10429
10430 * fs/hfs.c (grub_hfs_read_file): Likewise.
10431
10432 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10433
10434 * fs/jfs.c (grub_jfs_read_file): Likewise.
10435
10436 * fs/minix.c (grub_minix_read_file): Likewise.
10437
10438 * fs/sfs.c (grub_sfs_read_file): Likewise.
10439
10440 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 10441
9959f7db 10442 * fs/xfs.c (grub_xfs_read_file): Likewise.
10443
10444 * command/blocklist.c (read_blocklist): Likewise.
10445 (print_blocklist): Likewise.
10446
0a203f83 104472007-08-02 Marco Gerards <marco@gnu.org>
10448
10449 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10450 `util/hostfs.c'.
10451
10452 * disk/host.c: New file.
10453
10454 * util/hostfs.c: Likewise.
10455
10456 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10457 return `GRUB_ERR_BAD_FS'.
10458 * fs/sfs.c (grub_sfs_mount): Likewise.
10459 * fs/xfs.c (grub_xfs_mount): Likewise.
10460
10461 * include/grub/disk.h (enum grub_disk_dev_id): Add
10462 `GRUB_DISK_DEVICE_HOST_ID'.
10463
10464 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10465
e5dfe777 104662007-07-24 Jerone Young <jerone@gmail.com>
10467
f19dbdb7 10468 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 10469 modules for compilation.
10470 * conf/powerpc-ieee1275.rmk: Likewise.
10471
10472 * include/multiboot.h: Move multiboot definitions to one file. Rename
10473 many definitions to not get grub specific.
10474 * include/multiboot2.h: Create header with multiboot 2 definitions.
10475 * include/grub/multiboot.h: Header for grub specific function
10476 prototypes and definitions.
10477 * include/grub/multiboot2.h: Likewise.
10478 * include/grub/multiboot_loader.h: Likewise.
10479 * include/grub/i386/pc/multiboot.h: Removed.
10480 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10481
10482 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10483 and 2 to allow for one multiboot and module commands.
10484 * loader/multiboot2.c: Add multiboot2 functionality.
10485 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10486 and definition names.
10487 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10488 2 functions.
10489 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10490 ieee1275 specific multiboot2 code.
10491
10492 * kern/i386/pc/startup.S: Change headers and definition names for
10493 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10494
daf0f0ba 104952007-07-22 Robert Millan <rmh@aybabtu.com>
10496
10497 * geninitheader.sh: Process file specified in first parameter rather
10498 than hardcoding grub_modules_init.lst.
fe6b695a 10499 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 10500 than hardcoding grub_modules_init.h.
10501
10502 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10503 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10504 grub_probe_init.[ch] and grub_setup_init.[ch].
10505
10506 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10507 grub_modules_init.h with grub_emu_init.h.
10508 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10509 grub_probe_init.[ch] files.
10510 * conf/i386-efi.rmk: Likewise.
10511 * conf/i386-pc.rmk: Likewise.
10512 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10513 grub_setup_init.[ch] files.
10514
10515 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10516 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10517 to initialize modules rather than a list of hardcoded functions.
10518 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10519 grub_init_all() to initialize modules rather than a list of hardcoded
10520 functions.
10521
54cdc1cc 105222007-07-22 Robert Millan <rmh@aybabtu.com>
10523
10524 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10525 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10526
ad0686cc 105272007-07-22 Robert Millan <rmh@aybabtu.com>
10528
10529 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10530 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10531 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10532 flag when running on SmartFirmware.
10533 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10534 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10535 was set.
10536
10537 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10538 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10539 rather than decreasing it.
10540
10541 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10542 there's not enough space to do it, fail in the same way as when it
10543 can't be done because there are no partitions.
10544
10545 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10546 when nvsetenv failed.
10547
969c02ec 105482007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10549
10550 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10551 because this rule is automatically generated.
10552 (grub-mkrescue): Removed for the same reason as above.
10553
5a79f472 105542007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10555
10556 Migrate to GNU General Public License Version 3.
f19dbdb7 10557
5a79f472 10558 * COPYING: Replaced with the plain text version of GPLv3.
10559
10560 * config.guess: Updated from gnulib.
10561 * config.sub: Likewise.
10562
10563 * geninit.sh: Output a GPLv3 copyright notice.
10564 * geninitheader.sh: Likewise.
10565 * genmodsrc.sh: Likewise.
10566 * gensymlist.sh.in: Likewise.
10567
10568 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10569 * boot/i386/pc/diskboot.S: Likewise.
10570 * boot/i386/pc/pxeboot.S: Likewise.
10571 * commands/blocklist.c: Likewise.
10572 * commands/boot.c: Likewise.
10573 * commands/cat.c: Likewise.
10574 * commands/cmp.c: Likewise.
10575 * commands/configfile.c: Likewise.
10576 * commands/echo.c: Likewise.
10577 * commands/help.c: Likewise.
10578 * commands/ls.c: Likewise.
10579 * commands/search.c: Likewise.
10580 * commands/terminal.c: Likewise.
10581 * commands/test.c: Likewise.
10582 * commands/videotest.c: Likewise.
10583 * commands/i386/cpuid.c: Likewise.
10584 * commands/i386/pc/halt.c: Likewise.
10585 * commands/i386/pc/play.c: Likewise.
10586 * commands/i386/pc/reboot.c: Likewise.
10587 * commands/i386/pc/vbeinfo.c: Likewise.
10588 * commands/i386/pc/vbetest.c: Likewise.
10589 * commands/ieee1275/halt.c: Likewise.
10590 * commands/ieee1275/reboot.c: Likewise.
10591 * commands/ieee1275/suspend.c: Likewise.
10592 * disk/loopback.c: Likewise.
10593 * disk/lvm.c: Likewise.
10594 * disk/raid.c: Likewise.
10595 * disk/efi/efidisk.c: Likewise.
10596 * disk/i386/pc/biosdisk.c: Likewise.
10597 * disk/ieee1275/ofdisk.c: Likewise.
10598 * font/manager.c: Likewise.
10599 * fs/affs.c: Likewise.
10600 * fs/ext2.c: Likewise.
10601 * fs/fat.c: Likewise.
10602 * fs/fshelp.c: Likewise.
10603 * fs/hfs.c: Likewise.
10604 * fs/hfsplus.c: Likewise.
10605 * fs/iso9660.c: Likewise.
10606 * fs/jfs.c: Likewise.
10607 * fs/minix.c: Likewise.
10608 * fs/sfs.c: Likewise.
10609 * fs/ufs.c: Likewise.
10610 * fs/xfs.c: Likewise.
10611 * hello/hello.c: Likewise.
10612 * include/grub/acorn_filecore.h: Likewise.
10613 * include/grub/arg.h: Likewise.
10614 * include/grub/bitmap.h: Likewise.
10615 * include/grub/boot.h: Likewise.
10616 * include/grub/cache.h: Likewise.
10617 * include/grub/device.h: Likewise.
10618 * include/grub/disk.h: Likewise.
10619 * include/grub/dl.h: Likewise.
10620 * include/grub/elfload.h: Likewise.
10621 * include/grub/env.h: Likewise.
10622 * include/grub/err.h: Likewise.
10623 * include/grub/file.h: Likewise.
10624 * include/grub/font.h: Likewise.
10625 * include/grub/fs.h: Likewise.
10626 * include/grub/fshelp.h: Likewise.
10627 * include/grub/gzio.h: Likewise.
10628 * include/grub/hfs.h: Likewise.
10629 * include/grub/kernel.h: Likewise.
10630 * include/grub/loader.h: Likewise.
10631 * include/grub/lvm.h: Likewise.
10632 * include/grub/misc.h: Likewise.
10633 * include/grub/mm.h: Likewise.
10634 * include/grub/net.h: Likewise.
10635 * include/grub/normal.h: Likewise.
10636 * include/grub/parser.h: Likewise.
10637 * include/grub/partition.h: Likewise.
10638 * include/grub/pc_partition.h: Likewise.
10639 * include/grub/raid.h: Likewise.
10640 * include/grub/rescue.h: Likewise.
10641 * include/grub/script.h: Likewise.
10642 * include/grub/setjmp.h: Likewise.
10643 * include/grub/symbol.h: Likewise.
10644 * include/grub/term.h: Likewise.
10645 * include/grub/terminfo.h: Likewise.
10646 * include/grub/tparm.h: Likewise.
10647 * include/grub/types.h: Likewise.
10648 * include/grub/video.h: Likewise.
10649 * include/grub/efi/api.h: Likewise.
10650 * include/grub/efi/chainloader.h: Likewise.
10651 * include/grub/efi/console.h: Likewise.
10652 * include/grub/efi/console_control.h: Likewise.
10653 * include/grub/efi/disk.h: Likewise.
10654 * include/grub/efi/efi.h: Likewise.
10655 * include/grub/efi/pe32.h: Likewise.
10656 * include/grub/efi/time.h: Likewise.
10657 * include/grub/i386/linux.h: Likewise.
10658 * include/grub/i386/setjmp.h: Likewise.
10659 * include/grub/i386/types.h: Likewise.
10660 * include/grub/i386/efi/kernel.h: Likewise.
10661 * include/grub/i386/efi/loader.h: Likewise.
10662 * include/grub/i386/efi/time.h: Likewise.
10663 * include/grub/i386/pc/biosdisk.h: Likewise.
10664 * include/grub/i386/pc/boot.h: Likewise.
10665 * include/grub/i386/pc/chainloader.h: Likewise.
10666 * include/grub/i386/pc/console.h: Likewise.
10667 * include/grub/i386/pc/init.h: Likewise.
10668 * include/grub/i386/pc/kernel.h: Likewise.
10669 * include/grub/i386/pc/loader.h: Likewise.
10670 * include/grub/i386/pc/memory.h: Likewise.
10671 * include/grub/i386/pc/multiboot.h: Likewise.
10672 * include/grub/i386/pc/serial.h: Likewise.
10673 * include/grub/i386/pc/time.h: Likewise.
10674 * include/grub/i386/pc/vbe.h: Likewise.
10675 * include/grub/i386/pc/vbeblit.h: Likewise.
10676 * include/grub/i386/pc/vbefill.h: Likewise.
10677 * include/grub/i386/pc/vbeutil.h: Likewise.
10678 * include/grub/i386/pc/vga.h: Likewise.
10679 * include/grub/ieee1275/ieee1275.h: Likewise.
10680 * include/grub/ieee1275/ofdisk.h: Likewise.
10681 * include/grub/powerpc/libgcc.h: Likewise.
10682 * include/grub/powerpc/setjmp.h: Likewise.
10683 * include/grub/powerpc/types.h: Likewise.
10684 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10685 * include/grub/powerpc/ieee1275/console.h: Likewise.
10686 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10687 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10688 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10689 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10690 * include/grub/powerpc/ieee1275/time.h: Likewise.
10691 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10692 * include/grub/sparc64/libgcc.h: Likewise.
10693 * include/grub/sparc64/setjmp.h: Likewise.
10694 * include/grub/sparc64/types.h: Likewise.
10695 * include/grub/sparc64/ieee1275/console.h: Likewise.
10696 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10697 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10698 * include/grub/sparc64/ieee1275/time.h: Likewise.
10699 * include/grub/util/biosdisk.h: Likewise.
10700 * include/grub/util/getroot.h: Likewise.
10701 * include/grub/util/lvm.h: Likewise.
10702 * include/grub/util/misc.h: Likewise.
10703 * include/grub/util/raid.h: Likewise.
10704 * include/grub/util/resolve.h: Likewise.
10705 * io/gzio.c: Likewise.
10706 * kern/device.c: Likewise.
10707 * kern/disk.c: Likewise.
10708 * kern/dl.c: Likewise.
10709 * kern/elf.c: Likewise.
10710 * kern/env.c: Likewise.
10711 * kern/err.c: Likewise.
10712 * kern/file.c: Likewise.
10713 * kern/fs.c: Likewise.
10714 * kern/loader.c: Likewise.
10715 * kern/main.c: Likewise.
10716 * kern/misc.c: Likewise.
10717 * kern/mm.c: Likewise.
10718 * kern/parser.c: Likewise.
10719 * kern/partition.c: Likewise.
10720 * kern/rescue.c: Likewise.
10721 * kern/term.c: Likewise.
10722 * kern/efi/efi.c: Likewise.
10723 * kern/efi/init.c: Likewise.
10724 * kern/efi/mm.c: Likewise.
10725 * kern/i386/dl.c: Likewise.
10726 * kern/i386/efi/init.c: Likewise.
10727 * kern/i386/efi/startup.S: Likewise.
10728 * kern/i386/pc/init.c: Likewise.
10729 * kern/i386/pc/lzo1x.S: Likewise.
10730 * kern/i386/pc/startup.S: Likewise.
10731 * kern/ieee1275/ieee1275.c: Likewise.
10732 * kern/powerpc/cache.S: Likewise.
10733 * kern/powerpc/dl.c: Likewise.
10734 * kern/powerpc/ieee1275/cmain.c: Likewise.
10735 * kern/powerpc/ieee1275/crt0.S: Likewise.
10736 * kern/powerpc/ieee1275/init.c: Likewise.
10737 * kern/powerpc/ieee1275/openfw.c: Likewise.
10738 * kern/sparc64/cache.S: Likewise.
10739 * kern/sparc64/dl.c: Likewise.
10740 * kern/sparc64/ieee1275/init.c: Likewise.
10741 * kern/sparc64/ieee1275/openfw.c: Likewise.
10742 * loader/efi/chainloader.c: Likewise.
10743 * loader/efi/chainloader_normal.c: Likewise.
10744 * loader/i386/efi/linux.c: Likewise.
10745 * loader/i386/efi/linux_normal.c: Likewise.
10746 * loader/i386/pc/chainloader.c: Likewise.
10747 * loader/i386/pc/chainloader_normal.c: Likewise.
10748 * loader/i386/pc/linux.c: Likewise.
10749 * loader/i386/pc/linux_normal.c: Likewise.
10750 * loader/i386/pc/multiboot.c: Likewise.
10751 * loader/i386/pc/multiboot_normal.c: Likewise.
10752 * loader/powerpc/ieee1275/linux.c: Likewise.
10753 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10754 * normal/arg.c: Likewise.
10755 * normal/cmdline.c: Likewise.
10756 * normal/command.c: Likewise.
10757 * normal/completion.c: Likewise.
10758 * normal/execute.c: Likewise.
10759 * normal/function.c: Likewise.
10760 * normal/lexer.c: Likewise.
10761 * normal/main.c: Likewise.
10762 * normal/menu.c: Likewise.
10763 * normal/menu_entry.c: Likewise.
10764 * normal/misc.c: Likewise.
10765 * normal/parser.y: Likewise.
10766 * normal/script.c: Likewise.
10767 * normal/i386/setjmp.S: Likewise.
10768 * normal/powerpc/setjmp.S: Likewise.
10769 * normal/sparc64/setjmp.S: Likewise.
10770 * partmap/acorn.c: Likewise.
10771 * partmap/amiga.c: Likewise.
10772 * partmap/apple.c: Likewise.
10773 * partmap/gpt.c: Likewise.
10774 * partmap/pc.c: Likewise.
10775 * partmap/sun.c: Likewise.
10776 * term/gfxterm.c: Likewise.
10777 * term/terminfo.c: Likewise.
10778 * term/efi/console.c: Likewise.
10779 * term/i386/pc/console.c: Likewise.
10780 * term/i386/pc/serial.c: Likewise.
10781 * term/i386/pc/vesafb.c: Likewise.
10782 * term/i386/pc/vga.c: Likewise.
10783 * term/ieee1275/ofconsole.c: Likewise.
10784 * util/biosdisk.c: Likewise.
10785 * util/console.c: Likewise.
10786 * util/genmoddep.c: Likewise.
10787 * util/getroot.c: Likewise.
10788 * util/grub-emu.c: Likewise.
10789 * util/grub-mkdevicemap.c: Likewise.
10790 * util/grub-probe.c: Likewise.
10791 * util/lvm.c: Likewise.
10792 * util/misc.c: Likewise.
10793 * util/raid.c: Likewise.
10794 * util/resolve.c: Likewise.
10795 * util/update-grub.in: Likewise.
10796 * util/update-grub_lib.in: Likewise.
10797 * util/grub.d/00_header.in: Likewise.
10798 * util/grub.d/10_hurd.in: Likewise.
10799 * util/grub.d/10_linux.in: Likewise.
10800 * util/i386/efi/grub-install.in: Likewise.
10801 * util/i386/efi/grub-mkimage.c: Likewise.
10802 * util/i386/pc/grub-install.in: Likewise.
10803 * util/i386/pc/grub-mkimage.c: Likewise.
10804 * util/i386/pc/grub-mkrescue.in: Likewise.
10805 * util/i386/pc/grub-setup.c: Likewise.
10806 * util/i386/pc/misc.c: Likewise.
10807 * util/powerpc/ieee1275/grub-install.in: Likewise.
10808 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10809 * util/powerpc/ieee1275/misc.c: Likewise.
10810 * video/bitmap.c: Likewise.
10811 * video/video.c: Likewise.
10812 * video/i386/pc/vbe.c: Likewise.
10813 * video/i386/pc/vbeblit.c: Likewise.
10814 * video/i386/pc/vbefill.c: Likewise.
10815 * video/i386/pc/vbeutil.c: Likewise.
10816 * video/readers/tga.c: Likewise.
10817
3572d015 108182007-07-02 Robert Millan <rmh@aybabtu.com>
10819
10820 * conf/i386-efi.rmk: Replace obsolete reference to
10821 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10822 with util/getroot.c.
10823 * conf/powerpc-ieee1275.rmk: Likewise.
10824 * conf/sparc64-ieee1275.rmk: Likewise.
10825
10826 * util/grub-emu.c (main): Fix unchecked pointer handling.
10827
2c2a681b 108282007-07-02 Robert Millan <rmh@aybabtu.com>
10829
10830 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10831 invocation to fail, in order to support partition-less media.
10832
10833 * util/i386/pc/grub-install.in: Likewise.
10834
10835 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10836 which fs or partmap modules are needed (akin to its sister scripts).
10837
10838 Also use grub-probe to get rid of unportable /proc/mounts check.
10839
10840 Print the same informational message that the other scripts do, before
fe6b695a 10841 exiting.
2c2a681b 10842
6193defe 108432007-06-23 Robert Millan <rmh@aybabtu.com>
10844
fe6b695a 10845 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10846 a font file can be found and, if so, echo the GRUB path to it.
10847
10848 * util/update-grub.in: Handle multiple terminals depending on user
10849 input, platform availability and font file presence. Propagate
10850 variables of our findings to /etc/grub.d/ children.
10851
10852 * util/grub.d/00_header.in: Handle multiple terminals, based on
10853 environment setup by update-grub.
10854
eface1dc 108552007-06-23 Robert Millan <rmh@aybabtu.com>
10856
ba50d28f 10857 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10858
bf697e28 108592007-06-21 Robert Millan <rmh@aybabtu.com>
10860
10861 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10862 indicate end of data section in kernel image.
10863 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10864 GRUB_KERNEL_MACHINE_DATA_END.
10865
10866 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10867 space for it.
10868 * kern/i386/efi/startup.S: Likewise.
10869
10870 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10871 during image generation. Implement --prefix option to override this
10872 patch.
10873 * util/i386/efi/grub-mkimage.c: Likewise.
10874
10875 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10876 code to make path relative to its root into a separate function.
10877
10878 * util/i386/pc/grub-install.in: Use newly provided
10879 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10880 pass the result to grub-install --prefix.
10881
baa574b4 108822007-06-13 Robert Millan <rmh@aybabtu.com>
10883
10884 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10885 DEFAULT_DEVICE_MAP.
10886 * util/grub-emu.c: Use above definitions from misc.h instead of
10887 defining them.
10888 * util/grub-mkdevicemap.c: Likewise.
10889 * util/i386/pc/grub-setup.c: Likewise.
10890 * util/grub-probe.c: Likewise.
10891 (probe): Abort with grub_util_error() when either
10892 grub_guess_root_device or grub_util_get_grub_dev fails.
10893
0215dcbf 108942007-06-12 Robert Millan <rmh@aybabtu.com>
10895
10896 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10897 "pager" assignment.
10898 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10899 "pcdata".
10900 * util/grub-probe.c (probe): Likewise for "drive_name".
10901
8af2ab7b 109022007-06-11 Robert Millan <rmh@aybabtu.com>
10903
10904 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10905 not just the cdrom one.
10906
59d31694 109072007-06-11 Robert Millan <rmh@aybabtu.com>
10908
10909 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10910 Add --pkglibdir=DIR option to override pkglibdir.
10911 Mention --image-type=TYPE in help output.
10912 Fix --grub-mkimage (it was a no-op).
fe6b695a 10913 Abort gracefully when no parameter is given.
59d31694 10914
7ee367e4 109152007-06-11 Robert Millan <rmh@aybabtu.com>
10916
10917 * util/i386/pc/grub-mkrescue.in: New file.
10918 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10919 * Makefile.in: Handle bin_SCRIPTS.
10920
29b0ed46 109212007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10922
10923 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10924 list of video modes.
10925
c0f90770 109262007-06-06 Robert Millan <rmh@aybabtu.com>
10927
10928 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10929 file doesn't exist, or if it is in a filesystem grub can't read.
10930
10931 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10932 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10933 header comment to fit in 80 columns when the variables are resolved.
10934
10935 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10936 could be identified by update-grub. Remove redundant check for
fe6b695a 10937 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 10938 handles that).
10939
fb36dc26 109402007-06-04 Robert Millan <rmh@aybabtu.com>
10941
10942 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10943
10944 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10945
10946 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10947
0c68c93e 109482007-06-04 Robert Millan <rmh@aybabtu.com>
10949
10950 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10951
10952 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10953 grub_apple_partition_map_fini.
10954
10955 * util/biosdisk.c
10956 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10957 to access >2 TiB disks).
10958
10959 Print disk->total_sectors with %llu instead of %lu, since this
10960 variable is always 64-bit (prevents wrong disk size from being displayed
10961 on either >2 TiB disk or big-endian CPU).
10962
10963 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10964 into a generic case that supports all (sane) partition maps.
10965
10966 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10967 breaks big-endian.
10968
10969 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10970 and grub_apple_partition_map_fini() after that.
10971
0f23eb74 109722007-06-01 Robert Millan <rmh@aybabtu.com>
10973
10974 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10975
10976 * util/grub.d/00_header.in: Only enable gfxterm when
10977 convert_system_path_to_grub_path() succeeds.
10978
42c71976 109792007-05-20 Robert Millan <rmh@aybabtu.com>
10980
10981 * util/update-grub_lib.in: New file.
10982 * DISTLIST: Add update-grub_lib.in.
10983 * conf/common.rmk: Generate update-grub_lib and install it in
10984 $(lib_DATA).
10985 * Makefile.in: Add install routine for $(lib_DATA).
10986
10987 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10988 function provided by update-grub_lib to support arbitrary paths of
10989 unifont.pff.
10990 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10991 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10992
5beb2291 109932007-05-19 Robert Millan <rmh@aybabtu.com>
10994
10995 * commands/i386/cpuid.c: New module.
10996 * DISTLIST: Add it.
10997 * conf/i386-efi.rmk: Enable cpuid.mod.
10998 * conf/i386-pc.rmk: Likewise.
10999
7262eca1 110002007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11001
11002 * kern/disk.c (grub_disk_read): Check return value of
11003 grub_realloc().
11004
260ba823 110052007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
11006
11007 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11008 arrays.
11009 * disk/raid.c (grub_raid_open): Likewise.
11010
1ecb6cf2 110112007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11012
11013 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11014 stack instead of on the heap.
11015
11016 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11017 before doing a read on it.
11018
11019 * configure.ac: Only use -fno-stack-protector for the target
11020 environment.
f19dbdb7 11021
21c8cbb1 110222007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
11023
11024 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11025 __attribute_ ((unused)) to mode_type argument.
11026
11027 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 11028
21c8cbb1 11029 * kern/misc.c (memcmp): Fix prototype.
11030
11031 * include/grub/partition.h [GRUB_UTIL]
11032 (grub_gpt_partition_map_init): Add prototype.
11033 (grub_gpt_partition_map_fini): Likewise.
11034
11035 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11036 at the right place.
11037
11038 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11039 (grub_fat_read_data): Likewise.
11040 (grub_fat_find_dir): Likewise.
11041
11042 * font/manager.c (find_glyph): Make table a const.
11043 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 11044
849d55d3 110452007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11046
11047 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11048 code, first search for device in /dev/mapper, then in /dev.
11049 (grub_util_get_grub_dev): New function.
11050 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11051 prototype.
11052 * util/grub-probe.c (probe): Remove check for RAID, call
11053 grub_util_get_grub_dev() instead of
11054 grub_util_biosdisk_get_grub_dev().
11055 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11056 grub_util_biosdisk_get_grub_dev().
11057 * util/i386/pc/grub-setup.c (main): Likewise.
11058
8fff7c2f 110592007-05-16 Robert Millan <rmh@aybabtu.com>
11060
11061 * DISTLIST: Update for the latest changes.
11062 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11063 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11064 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11065 grub/util/biosdisk.h.
11066 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11067 grub/util/biosdisk.h.
11068
48e12b52 110692007-05-16 Robert Millan <rmh@aybabtu.com>
11070
11071 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11072
46b9d128 110732007-05-16 Robert Millan <rmh@aybabtu.com>
11074
11075 * util/i386/efi/grub-install.in: New.
11076 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11077 newly added grub-install.
11078 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11079 include.
11080 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11081 grub/util/biosdisk.h.
11082 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11083 grub/util/biosdisk.h.
11084
2d1a40a9 110852007-05-16 Robert Millan <rmh@aybabtu.com>
11086
11087 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11088 * include/grub/util/biosdisk.h: ... here.
11089 * util/i386/pc/biosdisk.c: Moved to ...
11090 * util/biosdisk.c: ... here.
11091 * util/i386/pc/getroot.c: Moved to ...
11092 * util/getroot.c: ... here.
11093 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11094 * util/grub-mkdevicemap.c: ... here.
11095 * util/i386/pc/grub-probe.c: Moved to ...
11096 * util/grub-probe.c: ... here.
11097
9e26e3bc 110982007-05-15 Robert Millan <rmh@aybabtu.com>
11099
11100 * util/update-grub.in: Remove duplicated line in grub.cfg header
11101 message.
11102
57f96397 111032007-05-13 Robert Millan <rmh@aybabtu.com>
11104
11105 * util/update-grub.in: Fix a few assumptions about the devices holding
11106 /, /boot and /boot/grub being the same.
11107 * util/grub.d/00_header.in: Likewise.
11108 * util/grub.d/10_hurd.in: Likewise.
11109 * util/grub.d/10_linux.in: Likewise.
11110
11111 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11112 patterns. Use that to define the `.old' suffix as older than `'.
11113
11114 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11115
11116 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11117 the grub.cfg header message.
11118
2e610d62 111192007-05-11 Robert Millan <rmh@aybabtu.com>
11120
11121 * util/update-grub.in: Create device.map if it doesn't already exist,
11122 before attempting to run grub-probe.
11123 Check for grub-probe and grub-mkdevicemap with the same code
11124 grub-install is using.
11125 Remove test mode.
11126
3f6a10ef 111272007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11128
11129 * Makefile.in: Add the datarootdir autoconf variable.
11130
02e7b75e 111312007-05-09 Robert Millan <rmh@aybabtu.com>
11132
11133 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 11134 fail gracefully if dev->disk->partition == NULL.
02e7b75e 11135
75f396cc 111362007-05-07 Robert Millan <rmh@aybabtu.com>
11137
11138 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11139 determine partition map module.
11140 * util/i386/pc/grub-install.in: Use this feature to decide which
11141 partition module to load, instead of hardcoding pc and gpt.
11142
da65cb36 111432007-05-07 Robert Millan <rmh@aybabtu.com>
11144
11145 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11146 source directory differs from build directory.
11147
b57d6a91 111482007-05-05 Robert Millan <rmh@aybabtu.com>
11149
11150 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11151 initialisation.
11152
509d00f1 111532007-05-05 Robert Millan <rmh@aybabtu.com>
11154
11155 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11156
c48f23ef 111572007-05-05 Robert Millan <rmh@aybabtu.com>
11158
11159 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11160 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11161
20b97658 111622007-05-05 Robert Millan <rmh@aybabtu.com>
11163
11164 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11165 (grub_probe_SOURCES): Likewise.
11166 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11167 GPT and initialize dos_part and bsd_part accordingly.
11168 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11169 install_bsd_part.
11170 (main): Activate gpt module for use during partition identification,
11171 and deactivate it afterwards.
11172 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11173 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11174 partition identification, and deactivate it afterwards.
11175
99123174 111762007-05-05 Robert Millan <rmh@aybabtu.com>
11177
11178 * term/i386/pc/console.c (grub_console_fini): Call
11179 grub_term_set_current() before grub_term_unregister().
11180
ebd97f6e 111812007-05-04 Robert Millan <rmh@aybabtu.com>
11182
11183 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11184 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11185 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11186 and update-grub_DATA.
11187 * conf/common.rmk: Build and install update-grub components.
11188 * conf/common.mk: Regenerate.
11189 * util/update-grub.in: New. Core of update-grub.
11190 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11191 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11192 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11193 * util/grub.d/README: New. Document grub.d directory layout.
11194
b06a264d 111952007-05-01 Robert Millan <rmh@aybabtu.com>
11196
11197 * util/grub-emu.c: Move initialization functions
11198 grub_util_biosdisk_init() and grub_init_all() before
11199 grub_util_biosdisk_get_grub_dev(), which relies on them.
11200
41f0050e 112012007-04-19 Robert Millan <rmh@aybabtu.com>
11202
11203 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11204 it is used later.
11205
04582bb3 112062007-04-18 Jerone Young <jerone@gmail.com>
11207
f19dbdb7 11208 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 11209 stanza.
11210
08db4632 112112007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 11212
08db4632 11213 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11214 continue on and look for device node with real device name.
11215
801b76be 112162007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 11217
fe6b695a 11218 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 11219 ability.
11220 * Makefile.in: Add autoconf package transformation code.
11221 * util/i386/pc/grub-install.in: Likewise.
11222 * util/powerpc/ieee1275/grub-install.in: Likewise.
11223
6795c4e1 112242007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11225
11226 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11227 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11228 (EXT2_REVISION): Likewise.
11229 (EXT2_INODE_SIZE): Likewise.
11230 (struct grub_ext2_block_group): Added a missing member
11231 "used_dirs".
11232 (grub_ext2_read_inode): Divide by the inode size in a superblock
11233 instead of 128 to obtain INODES_PER_BLOCK.
11234 Use the macro EXT2_INODE_SIZE instead of directly using
11235 SBLOCK->INODE_SIZE.
11236
d70af616 112372007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11238
11239 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11240 superblock instead of the structure size to compute an
11241 offset. This fixes the problem that GRUB could not read a
11242 filesystem when inode size is different from 128-byte.
11243
3b801603 112442007-03-05 Marco Gerards <marco@gnu.org>
11245
11246 * normal/main.c (read_config_file): When "menu" is not set, create
11247 an initial context.
11248
4785bfe4 112492007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11250
11251 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11252 (HEAP_LIMIT): New macro.
11253 (grub_claim_heap): Claim memory up to `heaplimit'.
11254
a0cbb023 112552007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11256
11257 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11258 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11259 (_start): Likewise.
11260 (grub_arch_modules_addr): Return address after `_end'.
11261 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11262 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11263 (add_segments): Calculate `_end' from phdr size and location.
11264 (ALIGN_UP): Moved to ...
11265 * include/grub/misc.h: here.
11266 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11267 New macro.
11268 (GRUB_IEEE1275_MODULE_BASE): Removed.
11269
fd7d8eba 112702007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11271
11272 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11273 loop boundary.
11274
9b09e6fc 112752007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11276
11277 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11278 All users updated.
11279 (grub_elf64_load_hook_t): Likewise.
11280 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11281 debug output.
11282
3ce27299 112832007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11284
11285 * kern/mm.c: Update copyright.
11286 (grub_mm_debug): Correct syntax error.
11287 (grub_mm_dump_free): New function.
11288 (grub_debug_free): Call `grub_free'.
11289 * include/grub/mm.h: Update copyright.
11290 (grub_mm_dump_free): Add declaration.
11291
077d5fee 112922007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11293
11294 * include/grub/ieee1275/ieee1275.h: Update copyright.
11295 * kern/powerpc/ieee1275/init.c: Likewise.
11296 * kern/powerpc/ieee1275/openfw.c: Likewise.
11297
11298 * loader/powerpc/ieee1275/linux.c: Likewise.
11299 * include/grub/elfload.h: Likewise.
11300 * kern/elf.c: Likewise.
11301 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11302 callers.
11303 (grub_elf64_load): Likewise.
11304 (grub_elf32_load_segment): Move to a nested function.
11305 (grub_elf64_load_segment): Likewise.
11306
dc946850 113072007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11308
11309 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11310 prototype.
11311 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11312 (grub_heap_len): Likewise.
11313 (HEAP_SIZE): New macro.
11314 (grub_claim_heap): New function.
11315 (grub_machine_init): Don't claim heap directly. Call
11316 `grub_claim_heap'.
11317 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11318 (grub_available_iterate): New function.
11319
baa2a121 113202007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11321
11322 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11323 * configure.ac: Use it for testing the HOST and TARGET compilers.
11324
4fe9862e 113252006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11326
11327 * Makefile.in (enable_grub_emu): New variable.
11328 * configure.ac (--enable-grub-emu): New option.
11329 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11330 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11331 * conf/i386-pc.rmk: Likewise.
11332 * conf/powerpc-ieee1275.rmk: Likewise.
11333 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11334
a8aa5762 113352006-12-12 Marco Gerards <marco@gnu.org>
11336
11337 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11338
11339 * kern/env.c (grub_env_unset): Don't free the member `value' when
11340 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11341 pointer.
11342
11343 * normal/main.c (current_menu): Removed.
11344 (free_menu): Unset the `menu' environment variable.
11345 (grub_normal_menu_addentry): Make use of the environment variable
11346 `menu', instead of using the global `current_menu'. Allocate
11347 memory for the sourcecode of this entry.
11348 (read_config_file): New argument `nested', changed all callers.
11349 Only in the case of a new context, initialize a new menu. Set the
11350 `menu' environment variable.
11351 (grub_normal_execute): Don't set and unset the environment
11352 variable `menu' here anymore. Only free the menu when leaving the
11353 context.
11354
11355 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11356 leak.
11357
957b3a3e 113582006-12-11 Marco Gerards <marco@gnu.org>
11359
11360 * normal/menu_entry.c (run): Fix off by one bug so the last line
11361 is executed. Move the loader check to outside the loop.
11362
ef875714 113632006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11364
11365 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11366
4e739985 113672006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11368
11369 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11370 the number of sectors. Reported by Andrey Shuvikov
11371 <mr_hyro@yahoo.com>.
f19dbdb7 11372
790707f2 113732006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11374
11375 * kern/disk.c (grub_disk_read): When there is a read error, always
11376 try to read only the necessary data.
f19dbdb7 11377
790707f2 11378 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11379 disk/raid.c.
11380 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11381 prototype.
11382 [GRUB_UTIL] (grub_raid_fini): Likewise.
11383 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 11384 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 11385 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11386 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11387 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11388 and grub_raid_fini().
f19dbdb7 11389
03e58196 113902006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11391
11392 * include/grub/types.h (__unused): Rename to UNUSED.
11393 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11394 (grub_elf64_size): Likewise.
f19dbdb7 11395
ae4f23bf 113962006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11397
11398 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11399 grub_error_push and grub_error_pop in the error-handling path.
11400 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11401 length.
11402
2166cc83 114032006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11404
11405 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11406 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11407 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11408 (kernel_elf_SOURCES): Likewise.
11409 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11410 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11411 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11412 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11413 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11414 (elf_mod_SOURCES): New variable.
11415 (elf_mod_CFLAGS): Likewise.
11416 (elf_mod_LDFLAGS): Likewise.
11417 * include/grub/types.h (__unused): New macro.
11418 * include/grub/elfload.h: New file.
11419 * kern/elf.c: Likewise.
11420 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11421 (ELF32_LOADMASK): New macro.
11422 (ELF64_LOADMASK): Likewise.
11423 (vmlinux): Removed.
11424 (grub_linux_load32): New function.
11425 (grub_linux_load64): Likewise.
11426 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11427 Use grub_elf_t instead of grub_file_t.
11428
a09d5aa5 114292006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11430
11431 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11432 `catch_result' to struct set_color_args.
11433
d976fc51 114342006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11435
11436 * normal/menu.c: Include grub/script.h.
11437 * normal/menu_entry.c: Likewise.
11438 * include/grub/normal.h: Do not include grub/script.h.
11439
67507549 114402006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11441
11442 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11443
69203a99 114442006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11445
11446 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11447 disk.
11448 (grub_disk_close): Print debug messages when closing a disk.
11449 (grub_disk_read): Print debug messages when disk read fails.
11450 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11451 filesystem type.
11452 * kern/partition.c: Include misc.h.
11453 (grub_partition_iterate): Print debug messages when detecting
11454 partition type.
11455
e2b8278c 114562006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11457
11458 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11459 is negative.
11460 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11461
97b2f2ff 114622006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11463
11464 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11465 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11466
6555d655 114672006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11468
11469 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11470 instead of sizeof(lv). Patch by Michael Guntsche.
11471
4d42b77f 114722006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11473
11474 * disk/lvm.c: Rename VGS to VG_LIST.
11475 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11476 (grub_lvm_open): Likewise.
11477 Thanks to Michael Guntsche for finding this bug.
11478
5d74d927 114792006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11480
11481 * configure.ac (AC_INIT): Bumped to 1.95.
11482
a1bb27e4 114832006-10-14 Robert Millan <rmh@aybabtu.com>
11484
11485 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11486 with "/dev/.static/dev/md".
11487
e0994b8b 114882006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11489
11490 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11491 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11492 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11493 DRIVE_NAME are always freed.
11494
11495 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11496 DOS_PART, as a DOS partition is counted from one instead of zero
11497 now. Reported by Robert Millan.
11498
ddd5cee9 114992006-10-14 Robert Millan <rmh@aybabtu.com>
11500
11501 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11502 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11503 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11504 string returned by grub_guess_root_device.
11505 * util/i386/pc/grub-setup.c: Likewise.
11506 * util/i386/pc/grub-probefs.c: Likewise.
11507
11508 * util/i386/pc/grub-probefs.c: Rename to ...
11509 * util/i386/pc/grub-probe.c: ... this.
11510 * DISTLIST: Remove grub-probefs, add grub-probe.
11511 * conf/i386-efi.rmk: Likewise.
11512 * conf/i386-pc.rmk: Likewise.
11513 * util/i386/pc/grub-install.in: Likewise.
11514
11515 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11516 choose which information we want to print.
11517
2b002173 115182006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11519
11520 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11521 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11522 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11523 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11524 video/readers/tga.c and video/i386/pc/vbeutil.c.
11525
115262006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11527
11528 Added support for RAID and LVM.
f19dbdb7 11529
2b002173 11530 * disk/lvm.c: New file.
11531 * disk/raid.c: Likewise.
11532 * include/grub/lvm.h: Likewise.
f19dbdb7 11533 * include/grub/raid.h: Likewise.
2b002173 11534 * include/grub/util/lvm.h: Likewise.
11535 * include/grub/util/raid.h: Likewise.
11536 * util/lvm.c: Likewise.
11537 * util/raid.c: Likewise.
11538
11539 * include/grub/disk.h (grub_disk_dev_id): Add
11540 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11541 (grub_disk_get_size): New prototype.
11542 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11543 returns a partition.
11544 (grub_disk_get_size): New function.
f19dbdb7 11545
2b002173 11546 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11547 verbatim if grub_install_dos_part is -2.
11548
11549 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11550 and LVM devices.
11551
11552 * util/i386/pc/grub-setup.c (setup): New argument
11553 MUST_EMBED. Force embedding of GRUB when the argument is
11554 true. Close FILE before returning.
11555 (main): Add support for RAID and LVM.
f19dbdb7 11556
2b002173 11557 * conf/common.rmk: Add RAID and LVM modules.
11558 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11559 util/lvm.c.
11560 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11561
11562 * kern/misc.c (grub_strstr): New function.
11563 * include/grub/misc.h (grub_strstr): New prototype.
11564
050548d0 115652006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11566
11567 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11568
da849d2d 115692006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11570
11571 * kern/misc.c (grub_strtoull): Guess the base only if not
11572 specified.
11573
97b2f2ff 115742006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 11575
11576 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11577 PowerMac support.
11578
97b2f2ff 115792006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 11580
11581 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11582
11583 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11584 Remove `flags' argument. All callers changed.
11585 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11586 (IEEE1275_IHANDLE_INVALID): New variable.
11587 (IEEE1275_CELL_INVALID): New variable.
11588 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11589 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11590 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11591 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11592 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11593 codes from Open Firmware. All callers updated.
11594 (grub_ieee1275_next_property): Directly return Open Firmware return
11595 code.
11596 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11597 Standardize error checking from `grub_ieee1275_get_property'.
11598 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11599 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11600
97b2f2ff 116012006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 11602
11603 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11604 `instance_to_package_args' to `instance_to_path_args'.
11605
11606 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11607 `grub_ieee1275_chosen'.
11608
11609 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11610 `grub_ieee1275_interpret'.
11611
97b2f2ff 116122006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 11613
11614 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11615
97b2f2ff 116162006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 11617
11618 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11619 (__cmpdi): Likewise.
11620
11621 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11622 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11623 `grub_ssize_t'.
11624
02bb8acc 11625 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 11626
11627 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11628 to type `grub_ssize_t'.
11629 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11630
7f9a8531 116312006-09-22 Marco Gerards <marco@gnu.org>
11632
11633 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11634 newlines.
11635
b5ef1102 116362006-09-22 Marco Gerards <marco@gnu.org>
11637
11638 * commands/echo.c: New file.
11639
11640 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11641
11642 * conf/common.rmk (echo_mod_SOURCES): New variable.
11643 (echo_mod_CFLAGS): Likewise.
11644 (echo_mod_LDFLAGS): Likewise.
11645
2cff3677 116462006-09-22 Marco Gerards <marco@gnu.org>
11647
11648 * normal/main.c (get_line): Malloc memory instead of using
11649 preallocated memory. Removed the arguments `cmdline' and
11650 `max_len'. Updated all callers.
11651
6ba4688b 116522006-09-22 Marco Gerards <marco@gnu.org>
11653
11654 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11655 (normal_mod_DEPENDENCIES): Likewise.
11656
11657 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11658 (normal_mod_DEPENDENCIES): Likewise.
11659
11660 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11661
e02ac02c 116622006-09-22 Johan Rydberg <jrydberg@gnu.org>
11663
11664 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11665 programs.
11666 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11667 (normal_mod_DEPENDENCIES): Likewise.
11668 * conf/i386-pc.mk: Regenerate.
11669 * conf/i386-efi.mk: Likewise
11670 * conf/common.mk: Likewise.
11671 * conf/powerpc-ieee1275.mk: Likewise.
11672 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11673
8d252e44 116742006-09-22 Robert Millan <rmh@aybabtu.com>
11675
11676 Sync with i386 version.
11677 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11678 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11679
209bf7ac 116802006-09-21 Robert Millan <rmh@aybabtu.com>
11681
11682 Import from GRUB Legacy (lib/device.c):
11683 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11684 (init_device_map) [__linux__]: Add support for I2O devices.
11685
6b146090 116862006-09-14 Marco Gerards <marco@gnu.org>
11687
11688 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11689 `-melf_i386'.
11690
e38600a8 116912006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11692
11693 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11694 /boot/grub/*.lst.
78fa1790 11695
2952da5d 11696 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11697
2952da5d 11698 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11699 before adding it to device.map.
11700
01b82a64 117012006-08-15 Johan Rydberg <jrydberg@gnu.org>
11702
fe6b695a 11703 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11704 compiles a file; using the -MD option.
11705 * conf/common.mk: Regenerate.
11706 * conf/i386-pc.mk: Likewise.
11707 * conf/i386-efi.mk: Likewise.
11708 * conf/powerpc-ieee1275.mk: Likewise.
11709 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11710
1064790d 117112006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11712
11713 Move the prototypes of grub_setjmp and grub_longjmp to
11714 cpu/setjmp.h, so that each architecture may specify different
11715 attributes.
f19dbdb7 11716
1064790d 11717 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11718 (grub_longjmp): Likewise.
11719 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11720 (grub_longjmp): Likewise.
11721 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11722 (grub_longjmp): Likewise.
11723
11724 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11725 [!GRUB_UTIL] (grub_longjmp): Removed.
11726
29dda3ed 117272006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11728
11729 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11730 "color!" method does not return any value.
11731
ad2a06ed 117322006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11733
11734 * include/grub/bitmap.h: New file.
11735
11736 * include/grub/i386/pc/vbeutil.h: Likewise.
11737
11738 * video/bitmap.c: Likewise.
11739
11740 * video/readers/tga.c: Likewise.
11741
11742 * video/i386/pc/vbeutil.c: Likewise.
11743
11744 * commands/videotest.c: Code cleanup and updated to reflect to new
11745 video API.
11746
11747 * term/gfxterm.c: Likewise.
11748
11749 * video/video.c: Likewise.
11750
11751 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11752 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11753 (bitmap_mod_SOURCES): New entry.
11754 (bitmap_mod_CFLAGS): Likewise.
11755 (bitmap_mod_LDFLAGS): Likewise.
11756 (tga_mod_SOURCES): Likewise.
11757 (tga_mod_CFLAGS): Likewise.
11758 (tga_mod_LDFLAGS): Likewise.
11759
11760 * include/grub/video.h (grub_video_blit_operators): New enum type.
11761 (grub_video_render_target): Changed as forward declaration and moved
11762 actual definition to be video driver specific.
11763 (grub_video_adapter.blit_bitmap): Added blitting operator.
11764 (grub_video_adapter.blit_render_target): Likewise.
11765 (grub_video_blit_bitmap): Likewise.
11766 (grub_video_blit_render_target): Likewise.
11767
11768 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11769 driver specific render target definition.
11770 (grub_video_vbe_map_rgba): Added driver internal helper.
11771 (grub_video_vbe_unmap_color): Updated to use
11772 grub_video_i386_vbeblit_info.
11773 (grub_video_vbe_get_video_ptr): Likewise.
11774
11775 * include/grub/i386/pc/vbeblit.h
11776 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11777 grub_video_i386_vbeblit_info.
11778 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11779 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11780 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11781 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11782 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11783 (grub_video_i386_vbeblit_index_index): Likewise.
11784 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11785 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11786 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11787 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11788 operator.
11789 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11790 operator.
11791
11792 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11793 include/grub/i386/pc/vbeblit.h.
11794
11795 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11796 Updated to use grub_video_i386_vbeblit_info.
11797 (grub_video_i386_vbefill_R8G8B8): Likewise.
11798 (grub_video_i386_vbefill_index): Likewise.
11799 (grub_video_i386_vbefill): Added generic filler.
11800
11801 * video/i386/pc/vbefill.c: Updated to reflect changes on
11802 include/grub/i386/pc/vbefill.h.
11803
11804 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11805 grub_video_i386_vbeblit_info.
11806 (grub_video_vbe_unmap_color): Likewise.
11807 (grub_video_vbe_blit_glyph): Likewise.
11808 (grub_video_vbe_scroll): Likewise.
11809 (grub_video_vbe_draw_pixel): Removed function.
11810 (grub_video_vbe_get_pixel): Likewise.
11811 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11812 updated code to use it.
11813 (common_blitter): Added common blitter for render target and bitmap.
11814 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11815 (grub_video_vbe_blit_render_target): Likewise.
11816
bc8c036d 118172006-07-30 Johan Rydberg <jrydberg@gnu.org>
11818
11819 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11820 is in text mode if there is no console control protocol instance
11821 available.
11822
684a8eff 118232006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11824
11825 * include/grub/video.h: Code cleanup.
11826
11827 * include/grub/i386/pc/vbe.h: Likewise.
11828
11829 * video/i386/pc/vbe.c: Likewise.
11830
11831 * video/i386/pc/vbeblit.c: Likewise.
11832
11833 * video/i386/pc/vbefill.c: Likewise.
11834
11835 * video/video.c: Likewise. Also added more comments.
11836
5915059b 118372006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11838
11839 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11840 (struct grub_biosdisk_dap): Likewise.
11841
11842 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11843 linkage settings for all functions.
11844
90ce5d56 118452006-07-12 Marco Gerards <marco@gnu.org>
11846
11847 * configure.ac (--enable-mm-debug): Fix typo.
11848
11849 * genkernsyms.sh.in: Use proper quoting for `CC'.
11850
43e7f879 118512006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11852
11853 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11854 (normal_mod_ASFLAGS): Remove "-m32".
11855
4889bdec 118562006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11857
11858 * util/misc.c: Include config.h.
11859 [!HAVE_MEMALIGN]: Do not include malloc.h.
11860 (grub_memalign): Use posix_memalign, if present. Then, use
11861 memalign, if present. Otherwise, emit an error.
11862
11863 * util/grub-emu.c: Do not include malloc.h.
11864
11865 * include/grub/util/misc.h: Include unistd.h. This is required for
11866 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11867 D. Eades III <hde@foobar-qux.org>.
11868
11869 * configure.ac (AC_GNU_SOURCE): Added.
11870 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11871 type.
11872
fd39d4da 118732006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11874
11875 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11876 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11877
b786f3b5 118782006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11879
11880 * include/grub/types.h (grub_host_addr_t): Rename to
11881 grub_target_addr_t.
11882 (grub_host_off_t): Rename to grub_target_off_t.
11883 (grub_host_size_t): Rename to grub_target_size_t.
11884 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11885 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11886
11887 * include/grub/kernel.h (struct grub_module_header): Change type
11888 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11889 (grub_module_info): Likewise.
f19dbdb7 11890
051988bb 118912006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11892
11893 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11894 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11895 Velazquez <jesus.velazquez@gmail.com>.
11896
deae281b 118972006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11898
11899 Count partitions from 1 instead of 0 in the string representation
11900 of partitions. Still use 0-based internally.
f19dbdb7 11901
deae281b 11902 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11903 (sun_partition_map_iterate): Use grub_partition_t instead of
11904 struct grub_partition *. Cast DESC->START_CYLINDER to
11905 grub_uint64_t after converting the endian.
11906 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11907 (sun_partition_map_get_name): Add 1 to P->INDEX.
11908
11909 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11910 PCDATA->DOS_PART.
11911 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11912
11913 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11914 zero instead of one.
11915 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11916 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11917
11918 * partmap/apple.c (apple_partition_map_iterate): Change the type
11919 of POS to unsigned.
11920 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11921 (apple_partition_map_get_name): Add 1 into P->INDEX.
11922
11923 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11924 of POS to unsigned.
11925 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11926 calculate the offset of a partition.
11927 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11928 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11929
11930 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11931 SECTOR to grub_disk_addr_t.
11932 (acorn_partition_map_iterate): Likewise.
11933 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11934 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11935 top.
11936 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11937
11938 * kern/i386/pc/init.c (make_install_device): Add 1 into
11939 GRUB_INSTALL_DOS_PART.
11940
11941 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11942 conditional.
11943
524a1e6a 119442006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11945
11946 Clean up the code to support 64-bit addressing in disks and
11947 files. This change is not enough for filesystems yet.
f19dbdb7 11948
524a1e6a 11949 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11950 type of "start" to grub_uint64_t.
11951 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11952 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11953 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11954 convert addresses.
11955
11956 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11957 to grub_disk_addr_t.
11958
11959 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11960 string.
11961
11962 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11963
11964 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11965 to char *.
11966
11967 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11968
11969 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11970
11971 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11972
11973 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11974 to grub_off_t, to detect an error from grub_file_seek.
11975 (grub_multiboot_load_elf32): Likewise.
11976
11977 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11978 maximum unsigned long value when an overflow is detected.
11979 (grub_strtoull): New function.
11980 (grub_divmod64): Likewise.
11981 (grub_lltoa): use grub_divmod64.
11982
11983 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11984 grub_disk_addr_t.
11985 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11986 the pointer to next character. Use grub_strtoull instead of
11987 grub_strtoul.
11988 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11989 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11990 respectively.
11991
fe6b695a 11992 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 11993 return value is signed.
11994 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11995 test if OFFSET is less than zero, as OFFSET is unsigned now.
11996
11997 * kern/disk.c (struct grub_disk_cache): Change the type of
11998 "sector" to grub_disk_addr_t.
11999 (grub_disk_cache_get_index): Change the type of SECTOR to
12000 grub_disk_addr_t. Calculate the hash with SECTOR casted to
12001 unsigned after shifting.
12002 (grub_disk_cache_invalidate): Change the type of SECTOR to
12003 grub_disk_addr_t.
12004 (grub_disk_cache_unlock): Likewise.
12005 (grub_disk_cache_store): Likewise.
12006 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12007 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12008 grub_disk_addr_t and grub_uint64_t, respectively.
12009 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12010 body, as the value of OFFSET is tweaked by
12011 grub_disk_check_range. Change the types of START_SECTOR, LEN and
12012 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12013 respectively.
12014 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12015 body, as the value of OFFSET is tweaked by
12016 grub_disk_check_range. Change the types of LEN and N to
12017 grub_size_t.
12018
12019 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12020 and "saved_offset" to grub_off_t.
12021 (test_header): Cast BUF to char *.
12022 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12023 to char *.
12024 (grub_gzio_read): Change the types of OFFSET and SIZE to
12025 grub_off_t and grub_size_t, respectively.
12026
12027 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12028 Removed.
12029 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12030 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12031 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12032 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12033 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12034
12035 * include/grub/types.h (grub_off_t): Unconditionally set to
12036 grub_uint64_t.
12037 (grub_disk_addr_t): Changed to grub_uint64_t.
12038
12039 * include/grub/partition.h (struct grub_partition): Change the
12040 types of "start", "len" and "offset" to grub_disk_addr_t,
12041 grub_uint64_t and grub_disk_addr_t, respectively.
12042 (grub_partition_get_start): Return grub_disk_addr_t.
12043 (grub_partition_get_len): Return grub_uint64_t.
12044
12045 * include/grub/misc.h (grub_strtoull): New prototype.
12046 (grub_divmod64): Likewise.
12047
12048 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12049 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12050 grub_off_t, respectively.
12051 All callers and references changed.
12052
12053 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12054 grub_size_t in "read".
12055 All callers and references changed.
12056
12057 * include/grub/file.h (struct grub_file): Change the types of
12058 "offset" and "size" to grub_off_t and grub_off_t,
12059 respectively. Change the type of SECTOR to grub_disk_addr_t in
12060 "read_hook".
12061 (grub_file_read): Change the type of LEN to grub_size_t.
12062 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12063 grub_off_t.
12064 (grub_file_size): Return grub_off_t.
12065 (grub_file_tell): Likewise.
12066 All callers and references changed.
12067
12068 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12069 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12070 "write".
12071 (struct grub_disk): Change the type of "total_sectors" to
12072 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 12073 "read_hook".
524a1e6a 12074 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12075 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12076 (grub_disk_write): Likewise.
12077 All callers and references changed.
12078
12079 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12080 char * for grub_strncmp to silence gcc.
12081 (grub_iso9660_mount): Likewise.
12082 (grub_iso9660_mount): Likewise.
12083 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12084 return statement.
12085 (grub_iso9660_iterate_dir): Likewise.
12086 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12087
12088 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12089 LEN to grub_disk_addr_t and grub_size_t, respectively.
12090
12091 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12092
12093 * fs/jfs.c (grub_jfs_read_file): Likewise.
12094
12095 * fs/minix.c (grub_jfs_read_file): Likewise.
12096
12097 * fs/sfs.c (grub_jfs_read_file): Likewise.
12098
12099 * fs/ufs.c (grub_jfs_read_file): Likewise.
12100
12101 * fs/xfs.c (grub_jfs_read_file): Likewise.
12102
12103 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12104 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12105 respectively.
12106
12107 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12108 BLKNR to -1 instead of returning GRUB_ERRNO.
12109 (grub_ext2_read_file): Change the types of SECTOR and
12110 LEN to grub_disk_addr_t and grub_size_t, respectively.
12111
12112 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12113 LEN to grub_disk_addr_t and grub_size_t, respectively.
12114
12115 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12116 grub_file_read.
12117
12118 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12119 string. Do not cast SECTOR explicitly.
12120
12121 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12122 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12123 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12124 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12125 over 2TB and LBA mode is not supported, raise an error.
12126 (get_safe_sectors): New function.
12127 (grub_biosdisk_read): Use get_safe_sectors.
12128 (grub_biosdisk_write): Likewise.
12129
12130 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12131 (grub_efidisk_write): Likewise.
12132
12133 * disk/loopback.c (delete_loopback): Cosmetic changes.
12134 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12135 correctly.
12136 (grub_loopback_open): Likewise.
12137 (grub_loopback_read): Likewise. Also, change the type of POS to
12138 grub_off_t, and fix the usage of grub_memset.
12139
12140 * commands/i386/pc/play.c: Include grub/machine/time.h.
12141
12142 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12143 print FILE->SIZE.
12144
12145 * commands/configfile.c: Include grub/env.h.
12146
12147 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12148 GRUB_ERRNO directly instead. Change the type of POS to
12149 grub_off_t. Follow the coding standard.
12150
12151 * commands/blocklist.c: Include grub/partition.h.
12152 (grub_cmd_blocklist): Return an error if the underlying device is
12153 not a disk. Take the starting sector of a partition into account,
12154 if a partition is used.
12155
12156 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12157 a length field.
12158 (lba_mode): Support 64-bit addresses.
12159 (chs_mode): Likewise.
12160 (copy_buffer): Adapted to the new offsets of a length field and a
12161 segment field.
12162 (blocklist_default_start): Allocate 64-bit space.
12163
12164 * boot/i386/pc/boot.S (force_lba): Removed.
12165 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 12166 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 12167 space.
12168 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12169 is useless.
12170 (lba_mode): Refactored to support a 64-bit address. More size
12171 optimization.
12172 (setup_sectors): Likewise.
12173
53af98ad 121742006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12175
12176 * DISTLIST: Added include/grub/i386/linux.h. Removed
12177 include/grub/i386/pc/linux.h
12178
12179 * configure.ac (AC_INIT): Bumped to 1.94.
12180
12181 * config.guess: Updated from gnulib.
12182 * config.sub: Likewise.
12183 * install-sh: Likewise.
12184 * mkinstalldirs: Likewise.
12185
b4c1940a 121862006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12187
12188 * conf/common.rmk (grub_modules_init.lst): Depended on
12189 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12190 MODSRCFILES.
12191
12192 * genmk.rb (PModule::rule): Reverted the previous change.
12193
cfca1cfd 121942006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12195
12196 * conf/common.rmk (grub_modules_init.lst): Depends on
12197 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12198 that the target does not exist before producing.
12199 (grub_modules_init.h): Remove the target before generating.
12200 (grub_emu_init.c): Likewise.
12201
12202 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12203
aa6d7826 122042006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12205
12206 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12207 for the target-specific tests. Make sure that we also have the
12208 up-to-date target variables for those tests.
12209
26c607b9 122102006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12211
12212 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12213 (PModule::rule): Likewise.
12214
0162321a 122152006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12216
12217 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12218 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12219 target-specific flags should be prefixed.
12220 (PModule::rule): Likewise.
12221
6c826348 122222006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12223
12224 * configure.ac (CMP): Check if cmp is available explicitly.
12225
b977bf01 122262006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12227
12228 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12229 (target_cpu): New variable.
12230 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 12231
b977bf01 12232 * util/i386/pc/grub-install.in (host_cpu): Removed.
12233 (target_cpu): New variable.
12234 (pkglibdir): Use target_cpu instead of host_cpu.
12235
12236 * util/genmoddep.c: Removed.
f19dbdb7 12237
b977bf01 12238 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12239 instead of GRUB_HOST_SIZEOF_VOID_P.
12240 * kern/dl.c: Likewise.
12241
12242 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12243 ...
12244 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12245 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12246 (GRUB_TARGET_SIZEOF_LONG): ... this.
12247 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12248 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12249 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12250 to ...
12251 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12252 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12253 (GRUB_TARGET_SIZEOF_LONG): ... this.
12254 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12255 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12256 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12257 to ...
12258 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12259 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12260 (GRUB_TARGET_SIZEOF_LONG): ... this.
12261 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12262 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12263
12264 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12265 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12266 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12267 instead of GRUB_HOST_SIZEOF_LONG.
12268 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12269 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12270 GRUB_CPU_WORDS_BIGENDIAN.
12271 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12272 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12273 grub_host_ssize_t.
12274
12275 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12276 (genmoddep_SOURCES): Likewise.
12277 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12278 (genmoddep_SOURCES): Likewise.
12279 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12280 (genmoddep_SOURCES): Likewise.
12281 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12282 Likewise.
12283 (genmoddep_SOURCES): Likewise.
12284
12285 * genmoddep.awk: New file.
12286
12287 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12288 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12289 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12290 (PModule::rule): Likewise.
12291 (Program::rule): Likewise.
12292 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12293 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12294 respectively.
12295
12296 * configure.ac: Rewritten intensively to use host and target
12297 instead of build and host, respectively.
12298
12299 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12300 (host_cpu): Removed.
12301 (target_cpu): New variable.
12302 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12303 (BUILD_CC): Removed.
12304 (BUILD_CFLAGS): Likewise.
12305 (BUILD_CPPFLAGS): Likewise.
12306 (TARGET_CC): New variable.
12307 (TARGET_CFLAGS): Likewise.
12308 (TARGET_CPPFLAGS): Likewise.
12309 (TARGET_LDFLAGS): Likewise.
12310 (AWK): Likewise.
12311 (include): Use target_cpu instead of host_cpu.
12312 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 12313
b977bf01 12314 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12315
f09771a1 123162006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12317
12318 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12319 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12320 field 'false' to 'exec_on_false'.
12321 (grub_script_create_cmdif): Renamed argument names to reflect above
12322 changes.
12323
12324 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12325
12326 * normal/script.c (grub_script_create_cmdif): Likewise.
12327
118f4fb3 123282006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12329
12330 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12331 top.
12332 (grub_hfsplus_btree_recptr): Likewise.
12333 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12334 FILEBLOCK both to pass a block number and store next block
12335 number.
12336 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12337 overflow file correctly. Specify errors appropriately, because
12338 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12339 grub_hfsplus_btree_recptr to get the pointer to a found key.
12340 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12341 is found.
12342
12343 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12344 linux.mod.
12345 (_linux_mod_SOURCES): New variable.
12346 (_linux_mod_CFLAGS): Likewise.
12347 (_linux_mod_LDFLAGS): Likewise.
12348 (linux_mod_SOURCES): Likewise.
12349 (linux_mod_CFLAGS): Likewise.
12350 (linux_mod_LDFLAGS): Likewise.
12351
12352 * DISTLIST: Added loader/i386/efi/linux.c,
12353 loader/i386/efi/linux_normal.c and
12354 include/grub/i386/efi/loader.h.
12355
12356 * loader/i386/efi/linux.c: New file.
12357 * loader/i386/efi/linux_normal.c: Likewise.
12358 * include/grub/i386/efi/loader.h: Likewise.
12359
89a7d726 123602006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12361
12362 * commands/blocklist.c: New file.
12363
12364 * DISTLIST: Added commands/blocklist.c.
12365
12366 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 12367 color for the background, and a darker color for the foreground.
89a7d726 12368 (grub_console_checkkey): Return READ_KEY.
12369 (grub_console_cls): Set the background to
12370 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12371
12372 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12373
12374 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12375 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12376
12377 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12378 prototype.
12379
12380 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12381 BG. The spec is wrong again.
12382
12383 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12384 prototype.
12385 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12386
12387 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12388 commands/blocklist.c.
12389 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 12390
89a7d726 12391 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12392 (blocklist_mod_SOURCES): New variable.
12393 (blocklist_mod_CFLAGS): Likewise.
12394 (blocklist_mod_LDFLAGS): Likewise.
12395
75c8f258 123962006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12397
12398 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12399 duplication.
12400 (lba_mode): Use %eax more intensively to reduce the code size.
12401
da2eb181 124022006-05-20 Marco Gerards <marco@gnu.org>
12403
12404 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12405
12406 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12407 for `menuentry'.
12408 (script): Accept leading newlines.
12409 (newlines): New rule to describe 0 or more newlines.
12410 (commands): Accept `command' with trailing newline. Fixed the
12411 order in which arguments were passed to `grub_script_add_cmd'.
12412 Accept commands separated by newlines.
12413 (function): Changed to accept newlines.
12414 (menuentry) Rewritten.
12415
12416 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12417 front of the list, instead of to the end.
12418
577b4050 124192006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12420
12421 * util/i386/pc/grub-install.in (bindir): New variable.
12422 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12423 Shaver <lbgwjl@gmail.com>.
12424
0d6e1189 124252006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12426
12427 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12428 grub/machine/linux.h
12429 * loader/i386/pc/linux.c: Likewise.
12430
12431 * include/grub/i386/pc/linux.h: Moved to ...
12432 * include/grub/i386/linux.h: ... here.
12433
12434 * include/grub/i386/linux.h (struct linux_kernel_params): New
12435 struct.
f19dbdb7 12436
31b86e9f 124372006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12438
12439 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12440 checking.
12441 (grub_video_vbe_blit_glyph): Likewise.
12442 (grub_video_vbe_blit_bitmap): Likewise.
12443 (grub_video_vbe_blit_render_target): Likewise.
12444
83b984de 124452006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12446
12447 * configure.ac (--with-platform): Properly quote the square
12448 brackets.
12449
5f0413bd 124502006-05-08 Marco Gerards <marco@gnu.org>
12451
12452 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12453 this...
12454 (kernel_elf_HEADERS): ...to this. Updated all users.
12455 (grubof_symlist.c): Renamed from this...
12456 (kernel_elf_symlist.c): ...to this. Updated all users.
12457 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12458 (grubof_SOURCES): Renamed from this...
12459 (kernel_elf_SOURCES): ...to this.
12460 (grubof_HEADERS): Renamed from this...
12461 (kernel_elf_HEADERS): ...to this.
12462 (grubof_CFLAGS): Renamed from this...
12463 (kernel_elf_CFLAGS): ...to this.
12464 (grubof_ASFLAGS): Renamed from this...
12465 (kernel_elf_ASFLAGS): ...to this.
12466 (grubof_LDFLAGS): Renamed from this...
12467 (kernel_elf_LDFLAGS): ...to this.
12468
12469 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12470 this...
12471 (kernel_elf_HEADERS): ...to this. Updated all users.
12472 (grubof_symlist.c): Renamed from this...
12473 (kernel_elf_symlist.c): ...to this. Updated all users.
12474 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12475 (grubof_SOURCES): Renamed from this...
12476 (kernel_elf_SOURCES): ...to this.
12477 (grubof_HEADERS): Renamed from this...
12478 (kernel_elf_HEADERS): ...to this.
12479 (grubof_CFLAGS): Renamed from this...
12480 (kernel_elf_CFLAGS): ...to this.
12481 (grubof_ASFLAGS): Renamed from this...
12482 (kernel_elf_ASFLAGS): ...to this.
12483 (grubof_LDFLAGS): Renamed from this...
12484 (kernel_elf_LDFLAGS): ...to this.
12485
12486 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12487 `kernel.elf' instead of `grubof'.
12488
05568c2e 124892006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12490
12491 Add --with-platform to configure. Use pkglibdir instead of
12492 pkgdatadir. This is reported by Roger Leigh.
12493
12494 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12495 (host_vendor): Likewise.
12496 (host_os): Likewise.
12497 (pkgdatadir): Likewise.
12498 (platform): New variable.
12499 (pkglibdir): Likewise.
12500 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 12501
05568c2e 12502 * util/i386/pc/grub-install.in (datadir): Removed.
12503 (host_vendor): Likewise.
12504 (host_os): Likewise.
12505 (pkgdatadir): Likewise.
12506 (platform): New variable.
12507 (pkglibdir): Likewise.
12508 Use PKGLIBDIR instead of PKGDATADIR.
12509
12510 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12511 instead of GRUB_DATADIR.
12512 (main): Likewise.
12513 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12514 (main): Likewise.
12515 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12516 (main): Likewise.
12517
12518 * configure.ac (--with-platform): New option.
12519 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12520
12521 * Makefile.in: Include a makefile based on PLATFORM instead of
12522 HOST_VENDOR.
12523 (pkgdatadir): Not appended by the machine type.
12524 (pkglibdir): Appended by the machine type.
12525 (host_vendor): Removed.
12526 (platform): New variable.
12527 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12528 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12529 (uninstall): Likewise.
12530
4e93851c 125312006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12532
12533 Use the environment context in the menu. Remove the commands
12534 "default" and "timeout", and use variables instead.
f19dbdb7 12535
4e93851c 12536 * normal/menu.c: Include grub/env.h.
12537 (print_entry): Cast TITLE to silence gcc.
12538 (get_timeout): New function.
12539 (set_timeout): Likewise.
12540 (get_entry_number): Likewise.
12541 (run_menu): Use a default entry, a fallback entry and a timeout
12542 in the environment variables "default", "fallback" and
12543 "timeout". Also, tweak the default entry if it is not within the
12544 current menu entries.
12545 (grub_menu_run): Use a fallback entry in the environment variable
12546 "fallback".
12547
12548 * normal/main.c (read_config_file): Do not initialize
12549 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12550 NEWMENU->TIMEOUT.
12551 (grub_normal_execute): Use a data slot to store the menu.
12552
12553 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12554 fallback_entry and timeout.
12555 (struct grub_menu_list): Removed.
12556 (grub_menu_list_t): Likewise.
12557 (struct grub_context): Likewise.
12558 (grub_context_t): Likewise.
12559 (grub_context_get): Likewise.
12560 (grub_context_get_current_menu): Likewise.
12561 (grub_context_push_menu): Likewise.
12562 (grub_context_pop_menu): Likewise.
12563 (grub_default_init): Likewise.
12564 (grub_default_fini): Likewise.
12565 (grub_timeout_init): Likewise.
12566 (grub_timeout_fini): Likewise.
12567
12568 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12569 and timeout.mod.
12570 (normal_mod_SOURCES): Removed normal/context.c.
12571
12572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12573 commands/default.c, commands/timeout.c and normal/context.c.
12574 (normal_mod_SOURCES): Removed normal/context.c.
12575
12576 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12577 commands/timeout.c and normal/context.c.
12578 (normal_mod_SOURCES): Removed normal/context.c.
12579
12580 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12581 commands/default.c, commands/timeout.c and normal/context.c.
12582 (normal_mod_SOURCES): Removed normal/context.c.
12583
12584 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12585 timeout.mod.
12586 (default_mod_SOURCES): Removed.
12587 (default_mod_CFLAGS): Likewise.
12588 (default_mod_LDFLAGS): Likewise.
12589 (timeout_mod_SOURCES): Removed.
12590 (timeout_mod_CFLAGS): Likewise.
12591 (timeout_mod_LDFLAGS): Likewise.
12592
12593 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12594 normal/context.c.
12595
12596 * commands/default.c: Removed.
12597 * commands/timeout.c: Likewise.
12598 * normal/context.c: Likewise.
12599
1eb9cc1d 126002006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12601
12602 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12603
385bd9c1 126042006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12605
12606 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12607 "next" to "prev" for readability.
12608 (struct grub_env_sorted_var): New struct.
12609 (grub_env_context): Renamed to ...
12610 (initial_context): ... this.
12611 (grub_env_var_context): Renamed to ...
12612 (current_context): ... this.
12613 (grub_env_find): Look only at CURRENT_CONTEXT.
12614 (grub_env_context_open): Rewritten to copy exported variables from
12615 previous context.
12616 (grub_env_context_close): Rewritten according to the new
12617 scheme. Also, add an assertion to prevent the initial context from
12618 removed.
12619 (grub_env_insert): Removed the code for the sorted list.
12620 (grub_env_remove): Likewise.
12621 (grub_env_export): Simply mark the variable with
12622 GRUB_ENV_VAR_GLOBAL.
12623 (grub_env_set): A cosmetic change for naming consistency.
12624 (grub_env_get): Likewise.
12625 (grub_env_unset): Likewise.
12626 (grub_env_iterate): Rewritten to sort variables within this
12627 function.
12628 (grub_register_variable_hook): Fixed for naming consistency. Call
12629 grub_env_find again, only if NAME is not found at the first time.
12630 (mangle_data_slot_name): New function.
12631 (grub_env_set_data_slot): Likewise.
12632 (grub_env_get_data_slot): Likewise.
12633 (grub_env_unset_data_slot): Likewise.
12634
12635 * include/grub/env.h (grub_env_var_type): New enum.
12636 (GRUB_ENV_VAR_LOCAL): New constant.
12637 (GRUB_ENV_VAR_GLOBAL): Likewise.
12638 (GRUB_ENV_VAR_DATA): Likewise.
12639 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12640 "type".
12641 (grub_env_set): Replace VAR with NAME for consistency.
12642 (grub_register_variable_hook): Likewise.
12643 (grub_env_export): Specify the name of the argument.
12644 (grub_env_set_data_slot): New prototype.
12645 (grub_env_get_data_slot): Likewise.
12646 (grub_env_unset_data_slot): Likewise.
12647
7f362539 126482006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12649
12650 Extend the loader so that GRUB can accept a loader which comes
12651 back to GRUB when a loaded image exits. Also, this change adds
12652 support for a chainloader on EFI.
f19dbdb7 12653
7f362539 12654 * term/efi/console.c: Include grub/misc.h.
12655 (grub_console_checkkey): Display a scan code on the top for
12656 debugging. This will be removed once the EFI port gets stable.
12657 Correct the scan code mapping.
12658
12659 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12660 allocate memory from larger regions, in order to reduce the number
12661 of allocated regions. Otherwise, the MacOSX loader panics.
12662 (filter_memory_map): Avoid less than 1MB for compatibility with
12663 other loaders.
12664 (add_memory_regions): Allocate from the tail of a region, if
12665 possible, to avoid allocating a region near to 1MB, for the MacOSX
12666 loader.
12667
12668 * kern/efi/init.c (grub_efi_set_prefix): Specify
12669 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12670
12671 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12672 argument IMAGE_HANDLE and specify it to get a loaded image.
12673 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12674 grub_efi_get_loaded_image.
fe6b695a 12675 (grub_efi_get_filename): Divide the length by the size of
7f362539 12676 grub_efi_char16_t.
12677 (grub_efi_get_device_path): New function.
12678 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12679 the length by the size of grub_efi_char16_t for a file path device
12680 path node.
12681
12682 * kern/loader.c (grub_loader_noreturn): New variable.
12683 (grub_loader_set): Accept a new argument NORETURN. Set
12684 GRUB_LOADER_NORETURN to NORETURN.
12685 All callers changed.
12686 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12687 grub_machine_fini.
12688
12689 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12690 prototype.
12691 (grub_efi_get_loaded_image): Take an argument to specify an image
12692 handle.
12693
12694 * include/grub/loader.h (grub_loader_set): Added one more argument
12695 NORETURN.
12696
12697 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12698 instead of grub_efi_open_protocol.
12699 (grub_efidisk_get_device_name): Likewise.
12700 (grub_efidisk_close): Print a newline.
12701 (grub_efidisk_get_device_handle): Fixed to use
12702 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12703 GRUB_EFI_DEVICE_PATH_TYPE.
12704
12705 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12706 * kern/efi/efi.c (device_path_guid): ... here.
12707
12708 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12709 chain.mod.
12710 (kernel_mod_HEADERS): Added efi/disk.h.
12711 (_chain_mod_SOURCES): New variable.
12712 (_chain_mod_CFLAGS): Likewise.
12713 (_chain_mod_LDFLAGS): Likewise.
12714 (chain_mod_SOURCES): Likewise.
12715 (chain_mod_CFLAGS): Likewise.
12716 (chain_mod_LDFLAGS): Likewise.
12717
12718 * DISTLIST: Added include/grub/efi/chainloader.h,
12719 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12720
12721 * include/grub/efi/chainloader.h: New file.
12722 * loader/efi/chainloader.c: Likewise.
12723 * loader/efi/chainloader_normal.c: Likewise.
12724
c0111d6e 127252006-04-30 Marco Gerards <marco@gnu.org>
12726
12727 * commands/configfile.c (grub_cmd_source): New function.
12728 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12729 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12730
df5341da 127312006-04-30 Marco Gerards <marco@gnu.org>
12732
12733 * normal/execute.c (grub_script_execute_cmd): Change the return
12734 type to `grub_err_t'. Correctly return the error.
12735 (grub_script_execute_cmdline): In case a command line is not a
12736 command or a function, try to interpret it as an assignment.
12737
f85934bd 127382006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12739
12740 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12741 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12742 skip a node whose name is obviously invalid as UTF-16,
12743 i.e. contains a NUL character. Stop the iteration when the last
12744 directory entry is found. Instead of using the return value of
12745 grub_hfsplus_btree_iterate_node, store the value in RET and use
12746 it, because the iterator can be stopped by the last directory
12747 entry.
12748
8f8a2cf8 127492006-04-30 Marco Gerards <marco@gnu.org>
12750
12751 * include/grub/env.h (grub_env_export): New prototype. Reported
12752 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12753
a27e84ce 127542006-04-30 Marco Gerards <marco@gnu.org>
12755
12756 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12757 size of the extents in a catalog file record.
12758
eaef0553 127592006-04-29 Marco Gerards <marco@gnu.org>
12760
12761 * commands/configfile.c (grub_cmd_configfile): Execute the
12762 configfile within its own context.
12763
12764 * include/grub/env.h (grub_env_context_open): New prototype.
12765 (grub_env_context_close): Likewise.
12766
12767 * kern/env.c (grub_env): Removed.
12768 (grub_env_sorted): Likewise.
12769 (grub_env_context): New variable.
12770 (grub_env_var_context): Likewise.
12771 (grub_env_find): Search both the active context and the global
12772 context.
12773 (grub_env_context_open): New function.
12774 (grub_env_context_close): Likewise.
12775 (grub_env_insert): Likewise.
12776 (grub_env_remove): Likewise.
12777 (grub_env_export): Likewise.
12778 (grub_env_set): Changed to use helper functions to avoid code
12779 duplication.
12780 (grub_env_iterate): Rewritten so both the current context and the
12781 global context are being used.
12782
12783 * normal/command.c (export_command): New function.
12784 (grub_command_init): Register the `export' function.
12785
7b455f4d 127862006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12787
12788 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12789 explicitly to suppress gcc's warnings.
12790 * fs/fat.c (grub_fat_find_dir): Likewise.
12791 (grub_fat_label): Likewise.
12792 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12793 (grub_xfs_mount): Likewise.
12794 (grub_xfs_label): Likewise.
12795 * fs/affs.c (grub_affs_mount): Likewise.
12796 (grub_affs_label): Likewise.
12797 (grub_affs_iterate_dir): Likewise.
12798 * fs/sfs.c (grub_sfs_mount): Likewise.
12799 (grub_sfs_iterate_dir): Likewise.
12800 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12801 * fs/hfs.c (grub_hfs_mount): Likewise.
12802 (grub_hfs_cmp_catkeys): Likewise.
12803 (grub_hfs_find_dir): Likewise.
12804 (grub_hfs_dir): Likewise.
12805 (grub_hfs_label): Likewise.
12806 * fs/jfs.c (grub_jfs_mount): Likewise.
12807 (grub_jfs_opendir): Likewise.
12808 (grub_jfs_getent): Likewise.
12809 (grub_jfs_lookup_symlink): Likewise.
12810 (grub_jfs_label): Likewise.
12811 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12812 (grub_hfsplus_iterate_dir): Likewise.
12813 (grub_hfsplus_btree_iterate_node): Made static.
12814
12815 * util/grub-emu.c (prefix): New variable.
12816 (grub_machine_set_prefix): New function.
12817 (main): Do not set the environment variable "prefix" here. Only
12818 set PREFIX, which is used later by grub_machine_set_prefix.
12819
12820 * include/grub/video.h: Do not include grub/symbol.h.
12821 (grub_video_register): Not exported. This symbol is not defined in
12822 the kernel.
12823 (grub_video_unregister): Likewise.
12824 (grub_video_iterate): Likewise.
12825 (grub_video_setup): Likewise.
12826 (grub_video_restore): Likewise.
12827 (grub_video_get_info): Likewise.
12828 (grub_video_get_blit_format): Likewise.
12829 (grub_video_set_palette): Likewise.
12830 (grub_video_get_palette): Likewise.
12831 (grub_video_set_viewport): Likewise.
12832 (grub_video_get_viewport): Likewise.
12833 (grub_video_map_color): Likewise.
12834 (grub_video_map_rgb): Likewise.
12835 (grub_video_map_rgba): Likewise.
12836 (grub_video_fill_rect): Likewise.
12837 (grub_video_blit_glyph): Likewise.
12838 (grub_video_blit_bitmap): Likewise.
12839 (grub_video_blit_render_target): Likewise.
12840 (grub_video_scroll): Likewise.
12841 (grub_video_swap_buffers): Likewise.
12842 (grub_video_create_render_target): Likewise.
12843 (grub_video_delete_render_target): Likewise.
12844 (grub_video_set_active_render_target): Likewise.
12845
12846 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12847 Undefined.
12848 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12849
12850 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12851 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12852 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12853 instead of $(srcdir)/genkernsyms.sh.
12854
12855 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12856 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12857 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12858 instead of $(srcdir)/genkernsyms.sh.
12859
12860 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12861 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12862 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12863 instead of $(srcdir)/genkernsyms.sh.
12864
12865 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12866 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12867 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12868 instead of $(srcdir)/genkernsyms.sh.
12869
12870 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12871 genkernsyms.sh.
12872
12873 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12874 genkernsyms.sh.
12875 (gensymlist.sh): New target.
12876 (genkernsyms.sh): Likewise.
12877
12878 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12879 genkernsyms.sh.in and gensymlist.sh.in.
12880
12881 * genkernsyms.sh: Removed.
12882 * gensymlist.sh: Likewise.
f19dbdb7 12883
7b455f4d 12884 * genkernsyms.sh.in: New file.
12885 * gensymlist.sh.in: Likewise.
12886
1885bb27 128872006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12888
12889 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12890 clobber "prefix", since we may have already set it manually.
12891
71538dff 128922006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12893
12894 * kern/misc.c (abort): New alias for grub_abort.
12895
2965c7cc 128962006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12897
12898 A new machine-specific function "grub_machine_set_prefix" is
12899 defined. This is called after loading modules, so that a prefix
12900 initialization can use modules. Also, this change adds an
12901 intensive debugging feature for the memory manager via the
12902 configure option "--enable-mm-debug".
f19dbdb7 12903
2965c7cc 12904 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12905 PART.LEN.
12906
12907 * kern/sparc64/ieee1275/init.c (abort): Removed.
12908 (grub_stop): Likewise.
12909 (grub_exit): New function.
12910 (grub_set_prefix): Renamed to ...
12911 (grub_machine_set_prefix): ... this.
12912 (grub_machine_init): Do not call grub_set_prefix.
12913
12914 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12915 (grub_machine_set_prefix): ... this.
12916 (grub_machine_init): Do not call grub_set_prefix.
12917
12918 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12919 (grub_machine_init): Do not set the prefix here.
12920
12921 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12922
12923 * kern/efi/init.c: Include grub/mm.h.
12924 (grub_efi_set_prefix): New function.
12925
12926 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12927 (grub_efi_get_filename): New function.
12928 (grub_print_device_path): Renamed to ...
12929 (grub_efi_print_device_path): ... this.
12930
12931 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12932 [MM_DEBUG] (grub_realloc): Likewise.
12933 [MM_DEBUG] (grub_free): Likewise.
12934 [MM_DEBUG] (grub_memalign): Likewise.
12935 [MM_DEBUG] (grub_mm_debug): New variable.
12936 [MM_DEBUG] (grub_debug_malloc): New function.
12937 [MM_DEBUG] (grub_debug_free): New function.
12938 [MM_DEBUG] (grub_debug_realloc): New function.
12939 [MM_DEBUG] (grub_debug_memalign): New function.
12940
12941 * kern/misc.c (grub_abort): Print a newline to distinguish
12942 the message.
12943
12944 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12945 grub_set_root_dev after loading modules. This is necessary when
12946 setting a prefix depends on modules.
12947
12948 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12949 (grub_efi_print_device_path): ... this.
12950 (grub_efi_get_filename): New prototype.
12951 (grub_efi_set_prefix): Likewise.
12952
12953 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12954 and grub/disk.h.
12955 (grub_efidisk_get_device_handle): New prototype.
12956 (grub_efidisk_get_device_name): Likewise.
12957
12958 * include/grub/mm.h: Include config.h.
12959 (MM_DEBUG): Removed.
12960 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12961 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12962 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12963 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12964 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12965 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12966 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12967 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12968 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12969
12970 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12971
12972 * disk/efi/efidisk.c: Include grub/partition.h.
12973 (iterate_child_devices): New function.
12974 (add_device): First, compare only last device path nodes, so that
12975 devices are sorted by the types.
12976 (grub_efidisk_get_device_handle): New function.
12977 (grub_efidisk_get_device_name): Likewise.
12978
12979 * configure.ac (--enable-mm-debug): New option to enable the
12980 memory manager debugging feature. This makes the binary much
12981 bigger, so is disabled by default.
12982
9cacaa17 129832006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12984
12985 Use grub_abort instead of grub_stop, and grub_exit must be
12986 define in each architecture now. Also, this change adds support
12987 for EFI disks.
f19dbdb7 12988
9cacaa17 12989 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12990 (grub_getkey): New function.
12991 (grub_term_get_current): Likewise.
12992
12993 * util/i386/pc/grub-setup.c: Include grub/term.h.
12994 (grub_getkey): New function.
12995 (grub_term_get_current): Likewise.
12996
12997 * util/misc.c (grub_stop): Renamed to ...
12998 (grub_exit): ... this.
12999
13000 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13001 (grub_exit): ... this.
13002 (grub_machine_init): Use grub_abort instead of abort.
13003 (grub_stop): Removed.
13004
13005 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13006 abort.
13007
13008 * kern/i386/pc/startup.S (grub_exit): New function.
13009 (cold_reboot): New label.
13010
13011 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13012 (grub_efi_init): Call grub_efidisk_init.
13013 (grub_efi_fini): Call grub_efidisk_fini.
13014
13015 * kern/efi/efi.c: Include grub/mm.h.
13016 (grub_efi_console_control_guid): Renamed to ...
13017 (console_control_guid): ... this.
13018 (grub_efi_loaded_image_guid): Renamed to ...
13019 (loaded_image_guid): ... this.
13020 (grub_efi_locate_handle): New function.
13021 (grub_efi_open_protocol): Likewise.
13022 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13023 GRUB_EFI_CONSOLE_CONTROL_GUID.
13024 (grub_efi_exit): Removed.
13025 (grub_stop): Likewise.
13026 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13027 (grub_exit): New function.
13028 (grub_print_device_path): Likewise.
13029
13030 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13031 (grub_enter_rescue_mode): Register "exit".
13032
13033 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13034 (grub_abort): New function.
13035
13036 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13037
13038 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13039
13040 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13041
13042 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13043 (grub_print_device_path): New prototype.
13044 (grub_efi_locate_handle): Likewise.
13045 (grub_efi_open_protocol): Likewise.
13046
13047 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13048 * disk/efi/efidisk.c: Likewise.
13049
13050 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13051
13052 * include/grub/efi/console_control.h
13053 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13054
13055 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13056 last 8 bytes as an array.
13057 (GRUB_EFI_DISK_IO_GUID): New macro.
13058 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13059 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13060 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13061 grub_uint8_t.
13062 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13063 (struct grub_efi_device_path): Rename the member "sub_type" to
13064 "subtype".
13065 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13066 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13067 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13068 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13069 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13070 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13071 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13072 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13073 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13074 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13075 (struct grub_efi_pci_device_path): New structure.
13076 (grub_efi_pci_device_path_t): New type.
13077 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13078 (struct grub_efi_pccard_device_path): New structure.
13079 (grub_efi_pccard_device_path_t): New type.
13080 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13081 (struct grub_efi_memory_mapped_device_path): New structure.
13082 (grub_efi_memory_mapped_device_path_t): New type.
13083 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13084 (struct grub_efi_vendor_device_path): New structure.
13085 (grub_efi_vendor_device_path_t): New type.
13086 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13087 (struct grub_efi_controller_device_path): New structure.
13088 (grub_efi_controller_device_path_t): New type.
13089 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13090 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13091 (struct grub_efi_acpi_device_path): New structure.
13092 (grub_efi_acpi_device_path_t): New type.
13093 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13094 (struct grub_efi_expanded_acpi_device_path): New structure.
13095 (grub_efi_expanded_acpi_device_path_t): New type.
13096 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13097 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13098 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13099 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13100 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13101 (struct grub_efi_atapi_device_path): New structure.
13102 (grub_efi_atapi_device_path_t): New type.
13103 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13104 (struct grub_efi_fibre_channel_device_path): New structure.
13105 (grub_efi_fibre_channel_device_path_t): New type.
13106 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13107 (struct grub_efi_1394_device_path): New structure.
13108 (grub_efi_1394_device_path_t): New type.
13109 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13110 (struct grub_efi_usb_device_path): New structure.
13111 (grub_efi_usb_device_path_t): New type.
13112 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13113 (struct grub_efi_usb_class_device_path): New structure.
13114 (grub_efi_usb_class_device_path_t): New type.
13115 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13116 (struct grub_efi_i2o_device_path): New structure.
13117 (grub_efi_i2o_device_path_t): New type.
13118 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13119 (struct grub_efi_mac_address_device_path): New structure.
13120 (grub_efi_mac_address_device_path_t): New type.
13121 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13122 (struct grub_efi_ipv4_device_path): New structure.
13123 (grub_efi_ipv4_device_path_t): New type.
13124 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13125 (struct grub_efi_ipv6_device_path): New structure.
13126 (grub_efi_ipv6_device_path_t): New type.
13127 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13128 (struct grub_efi_infiniband_device_path): New structure.
13129 (grub_efi_infiniband_device_path_t): New type.
13130 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13131 (struct grub_efi_uart_device_path): New structure.
13132 (grub_efi_uart_device_path_t): New type.
13133 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13134 (struct grub_efi_vendor_messaging_device_path): New structure.
13135 (grub_efi_vendor_messaging_device_path_t): New type.
13136 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13137 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13138 (struct grub_efi_hard_drive_device_path): New structure.
13139 (grub_efi_hard_drive_device_path_t): New type.
13140 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13141 (struct grub_efi_cdrom_device_path): New structure.
13142 (grub_efi_cdrom_device_path_t): New type.
13143 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13144 (struct grub_efi_vendor_media_device_path): New structure.
13145 (grub_efi_vendor_media_device_path_t): New type.
13146 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13147 (struct grub_efi_file_path_device_path): New structure.
13148 (grub_efi_file_path_device_path_t): New type.
13149 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13150 (struct grub_efi_protocol_device_path): New structure.
13151 (grub_efi_protocol_device_path_t): New type.
13152 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13153 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13154 (struct grub_efi_bios_device_path): New structure.
13155 (grub_efi_bios_device_path_t): New type.
13156 (struct grub_efi_disk_io): New structure.
13157 (grub_efi_disk_io_t): New type.
13158 (struct grub_efi_block_io_media): New structure.
13159 (grub_efi_block_io_media_t): New type.
13160 (struct grub_efi_block_io): New structure.
13161 (grub_efi_block_io_t): New type.
13162
13163 * include/grub/misc.h (grub_stop): Removed.
13164 (grub_exit): New prototype.
13165 (grub_abort): Likewise.
13166
13167 * include/grub/disk.h (enum grub_disk_dev_id): Added
13168 GRUB_DISK_DEVICE_EFIDISK_ID.
13169
13170 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13171 disk/efi/efidisk.c.
13172 (kernel_syms.lst): Remove the target if an error occurs.
13173
49986a9f 131742006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13175
13176 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13177 as it was simply too buggy.
13178
970d3b8a 131792006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13180
13181 * kern/misc.c (grub_lltoa): New function.
13182 (grub_vsprintf): Added support for the long long suffix,
13183 i.e. "ll".
13184
ff04ec24 131852006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13186
13187 * Makefile.in (LDFLAGS): Add variable.
13188 (LD): Remove variable.
13189 * configure.ac: Add -m32 to LDFLAGS.
13190 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13191 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13192 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13193 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13194 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13195 variables.
13196 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13197 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13198 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13199
37e5e1a4 132002006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13201
13202 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13203 length for unknown glyph.
13204
c352d8dd 132052006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13206
2eab1c0d 13207 Add support for pre-loaded modules into the EFI port.
f19dbdb7 13208
2eab1c0d 13209 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13210 completely. Accept one more argument DIR. The caller has changed.
13211
13212 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13213
13214 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13215 (grub_efi_loaded_image_guid): New variable.
13216 (grub_efi_get_loaded_image): New function.
13217 (grub_arch_modules_addr): Likewise.
13218
13219 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13220 prototype.
13221
13222 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13223 (struct grub_efi_loaded_image): New structure.
13224 (grub_efi_loaded_image_t): New type.
13225
132262006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13227
c352d8dd 13228 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13229 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13230 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13231
6d01d6b4 132322006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13233
13234 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13235
976a4ea0 132362006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13237
13238 * DISTLIST: Added include/grub/efi/console.h,
13239 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13240 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13241
13242 * include/grub/efi/console.h: New file.
13243 * include/grub/efi/time.h: Likewise.
13244 * include/grub/i386/efi/kernel.h: Likewise.
13245 * kern/efi/init.c: Likewise.
13246 * kern/efi/mm.c: Likewise.
13247 * term/efi/console.c: Likewise.
f19dbdb7 13248
976a4ea0 13249 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13250 (grub_stop): Removed.
13251 (grub_get_rtc): Likewise.
13252 (grub_machine_init): Simply call grub_efi_init.
13253 (grub_machine_fini): Call grub_efi_fini.
13254
13255 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13256 (grub_efi_output_string): Removed.
13257 (grub_efi_stall): New function.
13258 (grub_stop): Likewise.
13259 (grub_get_rtc): Likewise.
13260
13261 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13262 (grub_efi_stall): New prototype.
13263 (grub_efi_allocate_pages): Likewise.
13264 (grub_efi_free_pages): Likewise.
13265 (grub_efi_get_memory_map): Likewise.
13266 (grub_efi_mm_init): Likewise.
13267 (grub_efi_mm_fini): Likewise.
13268 (grub_efi_init): Likewise.
13269 (grub_efi_fini): Likewise.
13270
13271 * include/grub/i386/efi/time.h: Do not include
13272 grub/symbol.h. Include grub/efi/time.h.
13273 (GRUB_TICKS_PER_SECOND): Removed.
13274 (grub_get_rtc): Likewise.
13275
13276 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13277 Added padding. The EFI spec is buggy.
13278 (GRUB_EFI_BLACK): New macro.
13279 (GRUB_EFI_BLUE): Likewise.
13280 (GRUB_EFI_GREEN): Likewise.
13281 (GRUB_EFI_CYAN): Likewise.
13282 (GRUB_EFI_RED): Likewise.
13283 (GRUB_EFI_MAGENTA): Likewise.
13284 (GRUB_EFI_BROWN): Likewise.
13285 (GRUB_EFI_LIGHTGRAY): Likewise.
13286 (GRUB_EFI_BRIGHT): Likewise.
13287 (GRUB_EFI_DARKGRAY): Likewise.
13288 (GRUB_EFI_LIGHTBLUE): Likewise.
13289 (GRUB_EFI_LIGHTGREEN): Likewise.
13290 (GRUB_EFI_LIGHTCYAN): Likewise.
13291 (GRUB_EFI_LIGHTRED): Likewise.
13292 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13293 (GRUB_EFI_YELLOW): Likewise.
13294 (GRUB_EFI_WHITE): Likewise.
13295 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13296 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13297 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13298 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13299 (GRUB_EFI_BACKGROUND_RED): Likewise.
13300 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13301 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13302 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13303 (GRUB_EFI_TEXT_ATTR): Likewise.
13304
13305 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13306 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13307 (kernel_mod_HEADERS): Added efi/time.h.
13308
83709125 133092006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13310
13311 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13312 include/grub/efi/api.h, include/grub/efi/console_control.h,
13313 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13314 include/grub/i386/efi/time.h, kern/efi/efi.c,
13315 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13316 and util/i386/efi/grub-mkimage.c.
13317
13318 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13319
13320 * genmk.rb (PModule#rule): Do not export symbols if
13321 #{prefix}_EXPORTS is set to "no".
13322
13323 * conf/i386-efi.mk: New file.
13324 * conf/i386-efi.rmk: Likewise.
13325 * include/grub/efi/api.h: Likewise.
13326 * include/grub/efi/console_control.h: Likewise.
13327 * include/grub/efi/efi.h: Likewise.
13328 * include/grub/efi/pe32.h: Likewise.
13329 * include/grub/i386/efi/time.h: Likewise.
13330 * kern/efi/efi.c: Likewise.
13331 * kern/i386/efi/init.c: Likewise.
13332 * kern/i386/efi/startup.S: Likewise.
13333 * util/i386/efi/grub-mkimage.c: Likewise.
13334
133352006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 13336
13337 * include/grub/script.h: Include <grub/parser.h> and
13338 "grub_script.tab.h".
13339 (struct grub_lexer_param): New struct.
13340 (struct grub_parser_param): Likewise.
13341 (grub_script_create_arglist): Pass the state in an argument.
13342 (grub_script_add_arglist): Likewise.
13343 (grub_script_create_cmdline): Likewise.
13344 (grub_script_create_cmdblock): Likewise.
13345 (grub_script_create_cmdif): Likewise.
13346 (grub_script_create_cmdmenu): Likewise.
13347 (grub_script_add_cmd): Likewise.
13348 (grub_script_arg_add): Likewise.
13349 (grub_script_lexer_ref): Likewise.
13350 (grub_script_lexer_deref): Likewise.
13351 (grub_script_lexer_record_start): Likewise.
13352 (grub_script_lexer_record_stop): Likewise.
13353 (grub_script_mem_record): Likewise.
13354 (grub_script_mem_record_stop): Likewise.
13355 (grub_script_malloc): Likewise.
13356 (grub_script_yylex): Likewise.
13357 (grub_script_yyparse): Likewise.
13358 (grub_script_yyerror): Likewise.
13359 (grub_script_yylex): Likewise.
13360 (grub_script_lexer_init): Return the state.
13361
13362 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13363 (grub_script_lexer_done): Likewise.
13364 (grub_script_lexer_getline): Likewise.
13365 (grub_script_lexer_refs): Likewise.
13366 (script): Likewise.
13367 (newscript): Likewise.
13368 (record): Likewise.
13369 (recording): Likewise.
13370 (recordpos): Likewise.
13371 (recordlen): Likewise.
13372 (grub_script_lexer_init): Return the state instead of setting
13373 global variables.
13374 (grub_script_lexer_ref): Use the newly added argument for state
13375 instead of globals.
13376 (grub_script_lexer_deref): Likewise.
13377 (grub_script_lexer_record_start): Likewise.
13378 (grub_script_lexer_record_stop): Likewise.
13379 (recordchar): Likewise.
13380 (nextchar): Likewise.
13381 (grub_script_yylex2): Likewise.
13382 (grub_script_yylex): Likewise.
13383 (grub_script_yyerror): Likewise.
13384
13385 * normal/parser.y (func_mem): Removed variable.
13386 (menu_entry): Likewise.
13387 (err): Likewise.
13388 (%lex-param): New parser option.
13389 (%parse-param): Likewise.
13390 (script): Always return the AST.
13391 (argument): Pass the state around.
13392 (arguments): Likewise.
13393 (grubcmd): Likewise.
13394 (commands): Likewise.
13395 (function): Likewise.
13396 (menuentry): Likewise.
13397 (if_statement): Likewise.
13398 (if): Likewise.
13399
13400 * normal/script.c (grub_script_memused): Removed variable.
13401 (grub_script_parsed): Likewise.
13402 (grub_script_malloc): Added a state argument. Use that instead of
13403 global variables.
13404 (grub_script_mem_record): Likewise.
13405 (grub_script_mem_record_stop): Likewise.
13406 (grub_script_arg_add): Likewise.
13407 (grub_script_add_arglist): Likewise.
13408 (grub_script_create_cmdline): Likewise.
13409 (grub_script_create_cmdif): Likewise.
13410 (grub_script_create_cmdmenu): Likewise.
13411 (grub_script_add_cmd): Likewise.
13412 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 13413
e2a8c904 134142006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 13415
13416 * normal/command.c (grub_command_init): Remove the title command.
13417
13418 * normal/lexer.c (grub_script_yylex): Renamed from this...
13419 (grub_script_yylex2): ... to this.
13420 (grub_script_yylex): New function. Temporary
13421 introduced to filter some tokens.
13422 (grub_script_yyerror): Print a newline.
13423
13424 * normal/main.c (read_config_file): Output information about the
13425 lines that contain errors. Wait for a key after all lines have
13426 been processed. Don't return an empty menu.
13427
13428 * normal/parser.y (func_mem): Don't initialize.
13429 (menu_entry): Likewise.
13430 (err): New variable.
13431 (script): Don't return anything when an error was encountered.
13432 (ws, returns): Removed rules.
13433 (argument): Disabled concatenated variable support.
13434 (arguments): Remove explicit separators.
13435 (grubcmd): Likewise.
13436 (function): Likewise.
13437 (menuentry): Likewise.
13438 (if): Likewise.
13439 (commands): Likewise. Add error handling.
13440
13441 * normal/script.c (grub_script_create_cmdline): If
13442 `grub_script_parsed' is 0, assume the parser encountered an error.
13443
c9a86192 134442006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13445
13446 * configure.ac: Add support for EFI. Fix the typo
13447 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13448
70f3b243 134492006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13450
13451 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13452 foreign multibyte characters should be shown correctly.
13453
65f201ad 134542006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13455
13456 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13457 calculation.
13458 (read_config_file): Made it to close file before returning.
13459
b4b93674 134602006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13461
13462 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13463 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13464 video/i386/pc/vbefill.c.
13465
13466 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13467 video/i386/pc/vbefill.c.
13468
13469 * include/grub/video.h (grub_video_blit_format): New enum.
13470 (grub_video_mode_info): Added new member blit_format.
13471 (grub_video_get_blit_format): New function prototype.
13472
13473 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13474 function prototype.
13475 (grub_video_vbe_map_rgb): Likewise.
13476 (grub_video_vbe_unmap_color): Likewise.
13477
13478 * include/grub/i386/pc/vbeblit.h: New file.
13479
13480 * include/grub/i386/pc/vbefill.h: New file.
13481
13482 * video/video.c (grub_video_get_blit_format): New function.
13483 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13484 (grub_video_vbe_map_rgb): Likewise.
13485 (grub_video_vbe_unmap_color): Likewise.
13486
13487 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13488 optimized fills.
13489 (grub_video_vbe_blit_render_target): Changed to use more optimized
13490 blits.
13491 (grub_video_vbe_setup): Added detection for optimized settings.
13492 (grub_video_vbe_create_render_target): Likewise.
13493
13494 * video/i386/pc/vbeblit.c: New file.
13495
13496 * video/i386/pc/vbefill.c: New file.
13497
c2379b9c 134982006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13499
13500 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13501 here...
13502
13503 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13504 parsing to support both hex and dec ranges. If filename was missing
13505 show usage information.
13506
bd0d7896 135072006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13508
13509 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13510 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13511
13512 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13513 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13514 (video_mod_SOURCES): Added.
13515 (video_mod_CFLAGS): Likewise.
13516 (video_mod_LDFLAGS): Likewise.
13517 (gfxterm_mod_SOURCES): Likewise.
13518 (gfxterm_mod_CFLAGS): Likewise.
13519 (gfxterm_mod_LDFLAGS): Likewise.
13520 (videotest_mod_SOURCES): Likewise.
13521 (videotest_mod_CFLAGS): Likewise.
13522 (videotest_mod_LDFLAGS): Likewise.
13523 (vesafb_mod_SOURCES): Removed.
13524 (vesafb_mod_CFLAGS): Likewise.
13525 (vesafb_mod_LDFLAGS): Likewise.
13526 (vga_mod_SOURCES): Likewise.
13527 (vga_mod_CFLAGS): Likewise.
13528 (vga_mod_LDFLAGS): Likewise.
13529
13530 * commands/videotest.c: New file.
13531
13532 * font/manager.c (fill_with_default_glyph): Modified to use
13533 grub_font_glyph.
13534 (grub_font_get_glyph): Likewise.
13535 (fontmanager): Renamed from this...
13536 (font_manager): ... to this.
13537
13538 * include/grub/font.h (grub_font_glyph): Added new structure.
13539 (grub_font_get_glyph): Modified to use grub_font_glyph.
13540
13541 * include/grub/misc.h (grub_abs): Added as inline function.
13542
13543 * include/grub/video.h: New file.
13544
13545 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13546 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13547 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13548 (grub_vbe_get_controller_info): Renamed from this...
13549 (grub_vbe_bios_get_controller_info): ... to this.
13550 (grub_vbe_get_mode_info): Renamed from this...
13551 (grub_vbe_bios_get_mode_info): ... to this.
13552 (grub_vbe_set_mode): Renamed from this...
13553 (grub_vbe_bios_set_mode): ... to this.
13554 (grub_vbe_get_mode): Renamed from this...
13555 (grub_vbe_bios_get_mode): ... to this.
13556 (grub_vbe_set_memory_window): Renamed from this...
13557 (grub_vbe_bios_set_memory_window): ... to this.
13558 (grub_vbe_get_memory_window): Renamed from this...
13559 (grub_vbe_bios_get_memory_window): ... to this.
13560 (grub_vbe_set_scanline_length): Renamed from this...
13561 (grub_vbe_set_scanline_length): ... to this.
13562 (grub_vbe_get_scanline_length): Renamed from this...
13563 (grub_vbe_bios_get_scanline_length): ... to this.
13564 (grub_vbe_set_display_start): Renamed from this...
13565 (grub_vbe_bios_set_display_start): ... to this.
13566 (grub_vbe_get_display_start): Renamed from this...
13567 (grub_vbe_bios_get_display_start): ... to this.
13568 (grub_vbe_set_palette_data): Renamed from this...
13569 (grub_vbe_bios_set_palette_data): ... to this.
13570 (grub_vbe_set_pixel_rgb): Removed.
13571 (grub_vbe_set_pixel_index): Likewise.
13572
13573 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13574 from this...
13575 (grub_vbe_bios_get_controller_info): ... to this.
13576 (grub_vbe_get_mode_info): Renamed from this...
13577 (grub_vbe_bios_get_mode_info): ... to this.
13578 (grub_vbe_set_mode): Renamed from this...
13579 (grub_vbe_bios_set_mode): ... to this.
13580 (grub_vbe_get_mode): Renamed from this...
13581 (grub_vbe_bios_get_mode): ... to this.
13582 (grub_vbe_set_memory_window): Renamed from this...
13583 (grub_vbe_bios_set_memory_window): ... to this.
13584 (grub_vbe_get_memory_window): Renamed from this...
13585 (grub_vbe_bios_get_memory_window): ... to this.
13586 (grub_vbe_set_scanline_length): Renamed from this...
13587 (grub_vbe_set_scanline_length): ... to this.
13588 (grub_vbe_get_scanline_length): Renamed from this...
13589 (grub_vbe_bios_get_scanline_length): ... to this.
13590 (grub_vbe_set_display_start): Renamed from this...
13591 (grub_vbe_bios_set_display_start): ... to this.
13592 (grub_vbe_get_display_start): Renamed from this...
13593 (grub_vbe_bios_get_display_start): ... to this.
13594 (grub_vbe_set_palette_data): Renamed from this...
13595 (grub_vbe_bios_set_palette_data): ... to this.
13596 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13597 getting corrupted after calling it. Added more pushes and pops.
13598 (grub_vbe_bios_set_mode): Likewise.
13599 (grub_vbe_bios_get_mode): Likewise.
13600 (grub_vbe_bios_get_memory_window): Likewise.
13601 (grub_vbe_bios_set_scanline_length): Likewise.
13602 (grub_vbe_bios_get_scanline_length): Likewise.
13603 (grub_vbe_bios_get_display_start): Likewise.
13604 (grub_vbe_bios_set_palette_data): Likewise.
13605
13606 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13607 (cl_insert): Likewise.
13608 (cl_delete): Likewise.
13609
13610 * term/gfxterm.c: New file.
13611
13612 * term/i386/pc/vesafb.c: Removed file.
13613
13614 * video/video.c: New file.
13615
13616 * video/i386/pc/vbe.c (real2pm): Added new function.
13617 (grub_video_vbe_draw_pixel): Likewise.
13618 (grub_video_vbe_get_video_ptr): Likewise.
13619 (grub_video_vbe_get_pixel): Likewise
13620 (grub_video_vbe_init): Likewise.
13621 (grub_video_vbe_fini): Likewise.
13622 (grub_video_vbe_setup): Likewise.
13623 (grub_video_vbe_get_info): Likewise.
13624 (grub_video_vbe_set_palette): Likewise.
13625 (grub_video_vbe_get_palette): Likewise.
13626 (grub_video_vbe_set_viewport): Likewise.
13627 (grub_video_vbe_get_viewport): Likewise.
13628 (grub_video_vbe_map_color): Likewise.
13629 (grub_video_vbe_map_rgb): Likewise.
13630 (grub_video_vbe_map_rgba): Likewise.
13631 (grub_video_vbe_unmap_color): Likewise.
13632 (grub_video_vbe_fill_rect): Likewise.
13633 (grub_video_vbe_blit_glyph): Likewise.
13634 (grub_video_vbe_blit_bitmap): Likewise.
13635 (grub_video_vbe_blit_render_target): Likewise.
13636 (grub_video_vbe_scroll): Likewise.
13637 (grub_video_vbe_swap_buffers): Likewise.
13638 (grub_video_vbe_create_render_target): Likewise.
13639 (grub_video_vbe_delete_render_target): Likewise.
13640 (grub_video_vbe_set_active_render_target): Likewise.
13641 (grub_vbe_set_pixel_rgb): Remove function.
13642 (grub_vbe_set_pixel_index): Likewise.
13643 (index_color_mode): Remove static variable.
13644 (active_mode): Likewise.
13645 (framebuffer): Likewise.
13646 (bytes_per_scan_line): Likewise.
13647 (grub_video_vbe_adapter): Added new static variable.
13648 (framebuffer): Likewise.
13649 (render_target): Likewise.
13650 (initial_mode): Likewise.
13651 (mode_in_use): Likewise.
13652 (mode_list): Likewise.
13653
5f97350b 136542006-03-10 Marco Gerards <marco@gnu.org>
13655
13656 * configure.ac (AC_INIT): Bumped to 1.93.
13657
13658 * DISTLIST: Added `include/grub/hfs.h'.
13659
a3c5c6f8 136602006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13661
13662 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13663 18H, which might help the BIOS falling back to next boot media.
13664
6de53d26 136652006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13666
13667 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13668 Poe Chen <poe.poechen@gmail.com>.
13669
77c4a393 136702006-01-17 Marco Gerards <marco@gnu.org>
13671
13672 * include/grub/normal.h: Include <grub/script.h>.
13673 (grub_command_list): Removed struct.
13674 (grub_command_list_t): Removed type.
13675 (grub_menu_entry): Remove members `num' and `command_list'. Add
13676 members `commands' and `sourcecode'.
13677 * include/grub/script.h: Add inclusion guards.
13678 (grub_script_cmd_menuentry): New struct.
13679 (grub_script_execute_menuentry): New prototype.
13680 (grub_script_lexer_record_start): Likewise.
13681 (grub_script_lexer_record_stop): Likewise.
13682 * normal/execute.c (grub_script_execute_menuentry): New function.
13683 * normal/lexer.c (record, recording, recordpos, recordlen): New
13684 variables.
13685 (grub_script_lexer_record_start): New function.
13686 (grub_script_lexer_record_stop): Likewise.
13687 (recordchar): Likewise.
13688 (nextchar): Likewise.
13689 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13690 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13691 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13692 (current_menu): New variable.
13693 (free_menu): Mainly rewritten.
13694 (grub_normal_menu_addentry): New function.
13695 (read_config_file): Rewritten.
13696 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13697 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13698 the menu entry.
13699 (run): Mainly rewritten.
13700 * normal/parser.y (menu_entry): New variable.
13701 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13702 (menuentry): New rule.
13703 (command): Add `menuentry'.
13704 (if_statement): Allow additional returns before `fi'.
13705 * normal/script.c (grub_script_create_cmdmenu): New function.
13706
144f1f98 137072006-01-03 Marco Gerards <marco@gnu.org>
13708
13709 * INSTALL: GNU Bison is required.
13710 * configure.ac: Rewritten the test to detect Bison.
13711 * Makefile.in (YACC): New variable. Reported by Xun Sun
13712 <xun.sun.cn@gmail.com>.
13713
af4b2d89 137142006-01-03 Marco Gerards <marco@gnu.org>
13715
13716 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13717 the HFS+ filesystem to filesystem blocks.
13718 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13719 GCC warning is silenced.
13720
15643b71 137212006-01-03 Marco Gerards <marco@gnu.org>
13722
13723 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13724 read from disk from big endian to host byte order.
13725
00905879 137262006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13727
13728 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13729 documentation.
13730 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13731 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13732 embedded HFS+ filesystem.
13733 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13734 (grub_hfs_sblock): Move from here...
13735 * include/grub/hfs.h: To here... New file.
13736 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13737 documentation.
13738 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13739 New macros.
13740 (grub_hfsplus_volheader): Change type of member `magic' to
13741 `grub_uint16_t'.
13742 (grub_hfsplus_data): Add new member `embedded_offset'.
13743 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13744 returned block.
13745 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13746 Calculate the offset.
13747
8899bc3e 137482005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13749
13750 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13751 Removed.
13752 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13753
ae8c0277 137542005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13755
13756 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13757 ENV->NAME is NULL after allocating ENV->VALUE.
13758
07084456 137592005-12-25 Marco Gerards <marco@gnu.org>
13760
13761 * kern/env.c (grub_env_set): Rewritten the error handling code.
13762
4750f5f1 137632005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13764
13765 * geninit.sh: Made more robust, and more portable.
13766
50214199 137672005-12-25 Marco Gerards <marco@gnu.org>
13768
13769 Add support for Apple HFS+ filesystems.
f19dbdb7 13770
50214199 13771 * fs/hfsplus.c: New file.
13772
13773 * DISTLIST: Added `fs/hfsplus.c'.
13774
13775 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13776 (hfsplus_mod_SOURCES): New variable.
13777 (hfsplus_mod_CFLAGS): Likewise.
13778 (hfsplus_mod_LDFLAGS): Likewise.
13779 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13780 (grub_setup_SOURCES): Likewise.
13781 (grub_mkdevicemap_SOURCES): Likewise.
13782 (grub_emu_SOURCES): Likewise.
13783 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13784
13785 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13786
13787 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13788
befaed6c 137892005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13790
13791 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13792 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13793 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13794 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13795 normal/lexer.c, normal/parser.y, normal/script.c, and
13796 partmap/gpt.c.
13797 Removed kern/sparc64/cache.c.
13798
13799 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13800 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13801 grub_emu_init.c.
13802
13803 * configure.ac (AC_INIT): Bumped to 1.92.
13804
6a124103 138052005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13806
13807 * kern/err.c (grub_error_push): Added new function to support error
13808 stacks.
13809 (grub_error_pop): Likewise.
13810 (grub_error_stack_items): New local variable to support error stacks.
13811 (grub_error_stack_pos): Likewise.
13812 (grub_error_stack_assert): Likewise.
13813 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13814 stack depth.
13815 (grub_print_error): Added support to print errors from error stack.
13816
13817 * include/grub/err.h (grub_error_push): Added function prototype.
13818 (grub_error_pop): Likewise.
13819
be973c1b 138202005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13821
13822 * configure.ac: Accept `powerpc64' as host_cpu.
13823 (amd64): Rename to `biarch32'.
13824
13825 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13826 non-cacheline-aligned addresses.
13827
13828 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13829 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13830 if `size' is non-zero.
13831
b04216ab 138322005-12-03 Marco Gerards <mgerards@xs4all.nl>
13833
13834 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13835 and `cd' to make sure the filename is not prefixed with a
13836 directory name.
13837 (pkgdata_MODULES): Add `gpt.mod'.
13838 (gpt_mod_SOURCES): New variable.
13839 (gpt_mod_CFLAGS): Likewise.
13840 (gpt_mod_LDFLAGS): Likewise.
13841
13842 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13843
13844 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13845 New macro.
13846
13847 * partmap/gpt.c: New file.
13848
13849 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13850 GPT partition map is detected.
13851
41730ed9 138522005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13853
13854 * commands/i386/pc/play.c: New file.
13855 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13856 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13857 macros.
f19dbdb7 13858
95dc3643 138592005-11-27 Marco Gerards <mgerards@xs4all.nl>
13860
13861 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13862 ((unused))' to silence gcc warning.
13863
1569ec51 138642005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13865
13866 * configure.ac: Correct `AC_PROG_YACC' test.
13867
9abde152 138682005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13869
13870 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13871 check before installing files.
13872
44b83271 138732005-11-22 Mike Small <smallm@panix.com>
13874
13875 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13876 number regex so multidigit numbers are recognized correctly.
13877
138782005-11-22 Mike Small <smallm@panix.com>
13879
13880 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13881 debugging message before attempting to claim memory.
13882 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13883 multiple addresses in case of failure.
13884
9c12956b 138852005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13886
13887 * term/tparm.c (get_space): Remove empty `if' statement.
13888
13889 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13890
13891 * kern/parser.c (check_varstate): Rename `state' to 's'.
13892
aeaf81d9 138932005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13894
13895 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13896 variable definitions to the beginning of each function. Sort stack
13897 variables by size.
13898 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13899 `buf' argument to `char *'.
13900
79bbb63f 139012005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13902
13903 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13904 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13905 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 13906 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13907 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13908 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13909 configfile.mod, search.mod, gzio.mod and test.mod.
13910 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13911 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13912 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13913 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13914 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13915 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13916 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13917 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13918 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13919 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13920 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13921 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13922 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13923 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13924 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13925 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13926 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13927 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13928 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13929 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13930 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13931 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13932 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13933
13934 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13935 `grep --include'.
13936 (pkgdata_MODULES): Add test.mod.
13937
233b1628 139382005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13939
13940 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13941 appending to variables with "+=".
13942 (PModule): Use full pathname to generate *.lst filenames.
13943
13944 * Makefile.in: Fixed list rules moved from genmk.rb.
13945 (.DELETE_ON_ERROR): New special target.
13946 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13947
13948 * conf/i386-pc.rmk: Include conf/common.mk.
13949 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13950 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 13951 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13952 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13953 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13954 configfile.mod, search.mod, gzio.mod and test.mod.
13955 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13956 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13957 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13958 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13959 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13960 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13961 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13962 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13963 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13964 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13965 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13966 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13967 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13968 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13969 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13970 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13971 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13972 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13973 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13974 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13975 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13976 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13977 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13978 here...
13979 * conf/common.rmk: ... to here. New file.
13980
13981 * conf/common.mk: New file.
13982
16f820c8 139832005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13984
13985 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13986 (grub_script.tab.c): ... here.
13987
13988 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13989 (grub_script.tab.c): ... here.
13990
13991 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13992 (grub_script.tab.c): ... here.
13993
13994 * normal/command.c (grub_command_find): Fixed a memory leak of
13995 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13996
63ba1554 139972005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13998
13999 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14000 "@" which marks the start of a comment on ARM.
14001 (VARIABLE): Likewise.
14002
7f67dc13 140032005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14004
79bbb63f 14005 Add support for Linux/ADFS partition tables.
7f67dc13 14006
14007 * partmap/acorn.c: New file.
14008
14009 * include/grub/acorn_filecore.h: Likewise.
14010
14011 * DISTLIST: Added `partmap/acorn.c' and
14012 `include/grub/acorn_filecore.h'.
f19dbdb7 14013
7f67dc13 14014 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14015 `partmap/acorn.c'.
14016 (pkgdata_MODULES): Add `acorn.mod'.
14017 (acorn_mod_SOURCES): New variable.
14018 (acorn_mod_CFLAGS): Likewise.
14019
14020 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14021 `partmap/acorn.c'.
14022 (pkgdata_MODULES): Add `acorn.mod'.
14023 (acorn_mod_SOURCES): New variable.
14024 (acorn_mod_CFLAGS): Likewise.
14025
14026 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14027 (pkgdata_MODULES): Add `acorn.mod'.
14028 (acorn_mod_SOURCES): New variable.
14029 (acorn_mod_CFLAGS): Likewise.
14030 (acorn_mod_LDFLAGS): Likewise.
14031
14032 * include/types.h (grub_disk_addr_t): New typedef.
14033
6d099807 140342005-11-13 Marco Gerards <mgerards@xs4all.nl>
14035
14036 * geninit.sh: New file.
14037
14038 * geninitheader.sh: Likewise.
14039
14040 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14041 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14042 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14043 * commands/configfile.c (grub_configfile_init)
14044 (grub_configfile_fini): Likewise.
14045 * commands/default.c (grub_default_init, grub_default_fini):
14046 Likewise.
14047 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14048 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14049 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14050 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14051 Likewise.
14052 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14053 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14054 Likewise.
14055 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 14056 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 14057 Likewise.
14058 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14059 Likewise.
fe6b695a 14060 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 14061 Likewise.
14062 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14063 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14064 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14065 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14066 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14067 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14068 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14069 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14070 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14071 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14072 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14073 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14074 * partmap/amiga.c (grub_amiga_partition_map_init)
14075 (grub_amiga_partition_map_fini): Likewise.
14076 * partmap/apple.c (grub_apple_partition_map_init)
14077 (grub_apple_partition_map_fini): Likewise.
14078 * partmap/pc.c (grub_pc_partition_map_init)
14079 (grub_pc_partition_map_fini): Likewise.
14080 * partmap/sun.c (grub_sun_partition_map_init,
14081 grub_sun_partition_map_fini): Likewise.
14082 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14083 Likewise.
14084
14085 * util/grub-emu.c: Include <grub_modules_init.h>.
14086 (main): Don't initialize and de-initialize any modules directly,
14087 use `grub_init_all' and `grub_fini_all' instead.
14088
14089 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14090 `grub_vesafb_mod_init'.
14091 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14092 all users.
14093 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14094 `grub_vga_mod_init'. Updated all users.
14095 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 14096
6d099807 14097 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14098 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14099 rules.
14100
14101 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14102 Generate a function to initialize the module in utilities.
14103 Updated all callers.
14104 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14105 initialize the module in utilities. Updated all callers.
14106
9046bcf0 141072005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14108
14109 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14110 escape sequence and a literal ^L to clear the screen.
14111
14112 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14113 when returning from Open Firmware.
14114
d13ea639 141152005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14116
14117 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14118 (grub_ofconsole_height): Likewise.
14119 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14120 manually insert a '\n'.
14121 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14122 `grub_ofconsole_height'. Return early if these are already set.
14123
a8fcf206 141242005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14125
14126 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14127 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14128 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14129 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14130 and `normal/script.c'.
14131 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14132 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14133 (test_mod_SOURCES): New variable.
14134 (test_mod_CFLAGS): Likewise.
14135 (test_mod_LDFLAGS): Likewise.
14136 (pkgdata_MODULES): Add `test.mod'.
14137 (grub_script.tab.c): New rule.
14138 (grub_script.tab.h): Likewise.
14139
b6b32745 141402005-11-07 Marco Gerards <mgerards@xs4all.nl>
14141
14142 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14143 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14144 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14145 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14146 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14147 (test_mod_SOURCES): New variable.
14148 (test_mod_CFLAGS): Likewise.
14149 (pkgdata_MODULES): Add `test.mod'.
14150 (grub_script.tab.c): New rule.
14151 (grub_script.tab.h): Likewise.
14152
daac212a 141532005-11-06 Marco Gerards <mgerards@xs4all.nl>
14154
14155 Add initial scripting support.
14156
14157 * commands/test.c: New file.
14158 * include/grub/script.h: Likewise.
14159 * normal/execute.c: Likewise.
14160 * normal/function.c: Likewise.
14161 * normal/lexer.c: Likewise.
14162 * normal/parser.y: Likewise.
14163 * normal/script.c: Likewise.
14164
14165 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 14166
daac212a 14167 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14168 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14169 `normal/function.c' and `normal/script.c'.
14170 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14171 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 14172 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14173 variables.
daac212a 14174 (pkgdata_MODULES): Add `test.mod'.
14175 (grub_script.tab.c): New rule.
14176 (grub_script.tab.h): Likewise.
14177
14178 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14179
14180 * include/grub/normal.h (grub_test_init): New prototype.
14181 (grub_test_fini): Likewise.
f19dbdb7 14182
daac212a 14183 * normal/command.c: Include <grub/script.h>.
14184 (grub_command_execute): Rewritten.
f19dbdb7 14185
daac212a 14186 * util/grub-emu.c (main): Call `grub_test_init' and
14187 `grub_test_fini'.
14188
77500b2b 141892005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14190
14191 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14192 to 0.
14193 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14194 there are no pending characters.
14195
e45deb9e 141962005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14197
14198 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14199 `grub_strndup' to drop device arguments. Replace unnecessary
14200 `grub_strndup' with `grub_strdup'.
14201
4ce32619 142022005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14203
14204 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14205 `debug' environment variable has been set.
14206
142072005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14208
4ce32619 14209 * Makefile.in (install-local): Use $(DATA).
14210 (uninstall): Likewise.
14211 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14212 (sbin_UTILITIES): ... to here.
14213 (sbin_SCRIPTS): New variable.
14214 (grub_install_SOURCES): New variable.
14215 * util/powerpc/ieee1275/grub-install.in: New file.
14216 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14217 variable.
14218 (add_segments): Call `grub_util_get_path'.
14219
25fe6f03 142202005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14221
14222 From Timothy Baldwin:
14223 * commands/ls.c (grub_ls_list_files): Close FILE with
14224 grub_file_close.
14225 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14226
04ccf3ec 142272005-10-24 Marco Gerards <mgerards@xs4all.nl>
14228
14229 * include/grub/parser.h: New file.
14230
14231 * kern/parser.c: Likewise.
14232
14233 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14234 (grub_setup_SOURCES): Likewise.
14235 (grub_probefs_SOURCES): Likewise.
14236 (grub_emu_SOURCES): Likewise.
14237 (kernel_img_HEADERS): Add `parser.h'.
14238
14239 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14240 (grub_emu_SOURCES): Add `kern/parser.c'.
14241 (grubof_SOURCES): Likewise.
14242
14243 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14244 (grubof_SOURCES): Add `kern/parser.c'.
14245
14246 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14247
14248 * kern/misc.c (grub_split_cmdline): Removed function.
14249
14250 * kern/rescue.c: Include <grub/parser.h>.
14251 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14252 of `grub_split_cmdline'.
14253
14254 * normal/command.c: Include <grub/parser.h>.
14255 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14256 of `grub_split_cmdline'.
14257
14258 * normal/completion.c: Include <grub/parser.h>.
14259 (cmdline_state): New variable.
14260 (iterate_dir): End the filename with a quote depending on the
14261 command line state.
14262 (get_state): new function.
14263 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14264 split the arguments and determine the current argument. When the
14265 argument string is not quoted, escape all spaces.
14266
6d8f4b0e 142672005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14268
14269 * normal/sparc64/setjmp.S: New file.
14270
15cf03ed 142712005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14272
14273 * include/grub/sparc64/libgcc.h: New file.
14274 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14275 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14276 normal/sparc64/setjmp.c.
14277
03e8661a 142782005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14279
14280 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14281 * kern/sparc64/cache.S: New file.
14282 * kern/sparc64/cache.c: Removed.
14283 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14284 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14285 -mtune=ultrasparc.
14286 (COMMON_LDFLAGS): Add -melf64_sparc.
14287 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14288 (grubof_SOURCES): Use cache.S instead of cache.c.
14289 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14290 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14291 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14292 commented though.
14293 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14294 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14295 (linux_mod_CFLAGS): Commented out.
14296 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14297 out because module isn't built.
14298 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14299 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14300 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14301 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14302 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14303 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14304 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14305 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14306 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14307 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14308 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14309 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14310 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14311 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14312
34eeec8a 143132005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14314
14315 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14316 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14317 longer, because HFS should not be used on PC.
14318
708367a3 143192005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14320
14321 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14322 consistently within the loop.
14323
6fa1251a 143242005-10-15 Marco Gerards <mgerards@xs4all.nl>
14325
14326 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14327 directory can not be read.
14328
4801580b 143292005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14330
14331 * configure.ac (AC_INIT): Increase the version number to 1.91.
14332
14333 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14334 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14335 term/i386/pc/serial.c.
14336
219ad426 143372005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14338
14339 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14340 file size must be permitted.
14341
14342 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14343 between %ah and %al.
14344
688e5699 143452005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14346
14347 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14348 grub_uint64_t.
14349 Call the hook with a NUL-terminated filename.
14350 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14351 grub_cpu_to_be32.
14352
14353 * kern/term.c (cursor_state): New variable.
14354 (grub_term_set_current): Reset the cursor state on a new
14355 terminal.
14356 (grub_setcursor): Rewritten to use CURSOR_STATE.
14357 (grub_getcursor): New function.
14358
14359 * include/grub/term.h (grub_getcursor): New prototype.
14360
14361 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14362 integers on ARM. Reported by Timothy Baldwin
14363 <T.E.Baldwin99@members.leeds.ac.uk>.
14364
bb34586c 143652005-10-11 Marco Gerards <mgerards@xs4all.nl>
14366
14367 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14368 allocated.
14369 (grub_sfs_dir): Likewise.
14370
9a909877 143712005-10-09 Marco Gerards <mgerards@xs4all.nl>
14372
14373 Add support for the SFS filesystem.
14374
14375 * fs/sfs.c: New file.
14376
14377 * DISTLIST: Added `fs/sfs.c'.
14378
14379 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14380 (grub_probefs_SOURCES): Likewise.
14381 (grub_emu_SOURCES): Likewise.
14382 (pkgdata_MODULES): Add `sfs.mod'.
14383 (sfs_mod_SOURCES): New variable.
14384 (sfs_mod_CFLAGS): Likewise.
14385 (sfs_mod_LDFLAGS): Likewise.
14386
14387 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14388 (pkgdata_MODULES): Add `sfs.mod'.
14389 (sfs_mod_SOURCES): New variable.
14390 (sfs_mod_CFLAGS): Likewise.
14391
14392 * util/grub-emu.c (main): Call `grub_sfs_init' and
14393 `grub_sfs_fini'.
14394
14395 * include/grub/fs.h (grub_sfs_init): New prototype.
14396 (grub_sfs_fini): Likewise.
14397
57bdbde3 143982005-10-07 Marco Gerards <mgerards@xs4all.nl>
14399
14400 Add support for the AFFS filesystem.
14401
14402 * fs/affs.c: New file.
14403
14404 * DISTLIST: Added `fs/affs.c'.
14405
14406 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14407 (grub_probefs_SOURCES): Likewise.
14408 (grub_emu_SOURCES): Likewise.
14409 (pkgdata_MODULES): Add `affs.mod'.
14410 (affs_mod_SOURCES): New variable.
14411 (affs_mod_CFLAGS): Likewise.
14412 (affs_mod_LDFLAGS): Likewise.
14413
14414 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14415 (pkgdata_MODULES): Add `affs.mod'.
14416 (affs_mod_SOURCES): New variable.
14417 (affs_mod_CFLAGS): Likewise.
14418
14419 * util/grub-emu.c (main): Call `grub_affs_init' and
14420 `grub_affs_fini'.
14421
14422 * include/grub/fs.h (grub_affs_init): New prototype.
14423 (grub_affs_fini): Likewise.
14424
047b67e0 144252005-10-01 Marco Gerards <mgerards@xs4all.nl>
14426
14427 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14428
59b8208a 144292005-10-01 Marco Gerards <mgerards@xs4all.nl>
14430
14431 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14432 `-m32' to CFLAGS.
14433
14434 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14435 linking.
f19dbdb7 14436
59b8208a 14437 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14438 (COMMON_LDFLAGS): New variable.
14439 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14440 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14441 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14442 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14443 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14444 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14445 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14446 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14447 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14448 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14449 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14450 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14451 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14452 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14453 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14454 variables.
14455 (normal_mod_ASFLAGS): Add `-m32'.
14456
14457 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14458 (grub_host_size_t, grub_host_ssize_t): New types.
14459 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 14460 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 14461 `GRUB_HOST_SIZEOF_VOID_P'.
14462
14463 * include/grub/kernel.h (struct grub_module_header): Type of
14464 member offset changed to `grub_host_off_t'. Type of member size
14465 changed to `grub_host_size_t'.
14466 (struct grub_module_info): Type of member offset changed to
14467 `grub_host_off_t'. Type of member size changed to
14468 `grub_host_size_t'.
14469
b4093103 144702005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14471
14472 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 14473
b4093103 14474 * kern/i386/pc/startup.S (multiboot_header): New label.
14475 (multiboot_entry): Likewise.
14476 (multiboot_trampoline): Likewise.
14477
14478 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14479 Increased to 0x4A0.
14480
14481 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14482 put parentheses after a question mark.
14483 [!GRUB_UTIL] (my_mod): New variable.
14484
14485 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14486
b2499b29 144872005-09-28 Marco Gerards <mgerards@xs4all.nl>
14488
14489 Adds support for the XFS filesystem. Btrees are not supported
14490 yet.
14491
14492 * fs/xfs.c: New file.
14493
14494 * DISTLIST: Added `fs/xfs.c'.
14495
14496 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14497 (grub_probefs_SOURCES): Likewise.
14498 (grub_emu_SOURCES): Likewise.
14499 (pkgdata_MODULES): Add `xfs.mod'.
14500 (xfs_mod_SOURCES): New variable.
14501 (xfs_mod_CFLAGS): Likewise.
14502
14503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14504 (pkgdata_MODULES): Add `xfs.mod'.
14505 (xfs_mod_SOURCES): New variable.
14506 (xfs_mod_CFLAGS): Likewise.
14507
14508 * util/grub-emu.c (main): Call `grub_xfs_init' and
14509 `grub_xfs_fini'.
14510
14511 * include/grub/fs.h (grub_xfs_init): New prototype.
14512 (grub_xfs_fini): Likewise.
14513
f19dbdb7 14514
83d37a62 145152005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14516
14517 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14518 color modes, allow greater than 16 colors to be configured as
14519 a default palette.
14520
47d2d65e 145212005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14522
14523 * normal/completion.c (complete_arguments): Add the qualifier
14524 const into OPTIONS.
14525
14526 From Omniflux <omniflux+lists@omniflux.com>:
14527 * include/grub/terminfo.h: New file.
14528 * include/grub/tparm.h: Likewise.
14529 * include/grub/i386/pc/serial.h: Likewise.
14530 * term/terminfo.c: Likewise.
14531 * term/tparm.c: Likewise.
14532 * term/i386/pc/serial.c: Likewise.
14533 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14534 serial.mod.
14535 (terminfo_mod_SOURCES): New variable.
14536 (terminfo_mod_CFLAGS): Likewise.
14537 (serial_mod_SOURCES): Likewise.
14538 (serial_mod_CFLAGS): Likewise.
14539
48b671ff 145402005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14541
14542 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14543 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14544 and kern/powerpc/ieee1275/cmain.c, respectively.
14545
14546 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14547 * kern/powerpc/ieee1275/crt0.S: ... here.
14548
14549 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14550 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 14551
48b671ff 14552 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14553 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14554 instead of boot/powerpc/ieee1275/crt0.S and
14555 boot/powerpc/ieee1275/cmain.c, respectively.
14556
14557 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14558 sectors. It was not used anyway.
14559
09fc77a7 145602005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14561
14562 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14563 `unused parameter' warning.
14564
003789c7 145652005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14566
14567 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14568 function.
14569 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14570 getcharwidth.
14571
67f44c86 145722005-08-28 Marco Gerards <metgerards@student.han.nl>
14573
14574 * include/grub/normal.h (enum grub_completion_type): Added
14575 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14576
14577 * normal/cmdline.c (print_completion): Handle
14578 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14579 * normal/menu_entry.c (store_completion): Likewise.
14580
14581 * normal/completion.c (complete_arguments): New function.
14582 (grub_normal_do_completion): Call `complete_arguments' when the
14583 current words start with a dash.
14584
0b5abe02 145852005-08-27 Marco Gerards <metgerards@student.han.nl>
14586
14587 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14588 `gzio.mod' instead of `io.mod').
14589
d9864ee1 145902005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14591
14592 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14593 (DISTDIRS): Added io and video.
14594 Rewrite the search routine to make an output consistently.
14595
14596 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14597 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14598 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14599 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14600 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14601 util/powerpc/ieee1275/misc.c.
f19dbdb7 14602
d9864ee1 14603 * include/grub/gzio.h: New file.
14604 * io/gzio.c: Likewise.
f19dbdb7 14605
d9864ee1 14606 * kern/file.c (grub_file_close): Call grub_device_close only if
14607 FILE->DEVICE is not NULL.
14608
14609 * include/grub/mm.h [!NULL] (NULL): New macro.
14610
14611 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14612
14613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14614 (pkgdata_MODULES): Added gzio.mod.
14615 (gzio_mod_SOURCES): New variable.
14616 (gzio_mod_CFLAGS): Likewise.
14617
14618 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14619 (pkgdata_MODULES): Added gzio.mod.
14620 (gzio_mod_SOURCES): New variable.
14621 (gzio_mod_CFLAGS): Likewise.
14622
14623 * commands/cat.c: Include grub/gzio.h.
14624 (grub_cmd_cat): Use grub_gzfile_open instead of
14625 grub_file_open.
f19dbdb7 14626
d9864ee1 14627 * commands/cmp.c: Include grub/gzio.h.
14628 (grub_cmd_cmp): Use grub_gzfile_open instead of
14629 grub_file_open.
14630
14631 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14632 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14633 grub_file_open.
14634 (grub_rescue_cmd_module): Likewise.
14635
fa46f4b5 146362005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14637
14638 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14639 kern/sparc64/ieee1275/init.c because it contains _start.
14640 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14641
e9211b5d 146422005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14643
14644 * configure.ac: Add support for sparc64 host with ieee1275
14645 firmware.
14646 * configure: Generated from configure.ac.
14647 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14648 instead of int.
14649 (grub_ofdisk_read): Likewise.
14650 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14651 pointers as (void *) to remove a warning.
14652 (grub_ofdisk_close): Likewise.
14653 (grub_ofdisk_read): Likewise.
14654 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14655 returns, so make it return void to remove a warning.
14656 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14657 Corresponding prototype change.
14658 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14659 values, and cast the pointers as (void *) to remove a warning.
14660 (grub_mm_dump): Likewise.
14661 * conf/sparc64-ieee1275.mk: New file.
14662 * conf/sparc64-ieee1275.rmk: Likewise.
14663 * include/grub/sparc64/setjmp.h: Likewise.
14664 * include/grub/sparc64/types.h: Likewise.
14665 * include/grub/sparc64/ieee1275/console.h: Likewise.
14666 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14667 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14668 * include/grub/sparc64/ieee1275/time.h: Likewise.
14669 * kern/sparc64/cache.c: Likewise.
14670 * kern/sparc64/dl.c: Likewise.
14671 * kern/sparc64/ieee1275/init.c: Likewise.
14672 * kern/sparc64/ieee1275/openfw.c: Likewise.
14673
385c6a92 146742005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14675
14676 * util/console.c (grub_ncurses_putchar): If C is greater than
14677 0x7f, set C to a question mark.
14678 (grub_ncurses_getcharwidth): New function.
14679 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14680 getcharwidth.
14681
14682 * normal/menu.c (print_entry): Made aware of Unicode. First,
14683 convert TITLE to UCS-4, and predict the cursor position by
14684 grub_getcharwidth.
14685
14686 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14687 const to SRC.
14688 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14689
16ccb8b1 146902005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14691
14692 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14693 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14694 grub_strcat.
14695
14696 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14697 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14698 grub_strcpy and grub_strlen. Take it into account that a space
14699 character is inserted as a delimiter.
14700
6a85ce79 147012005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14702
14703 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14704 invalid magic in the error.
6a85ce79 14705
14706 * commands/search.c: New file.
f19dbdb7 14707
6a85ce79 14708 * util/grub-emu.c (main): Call grub_search_init and
14709 grub_search_fini.
14710
14711 * kern/rescue.c (grub_rescue_print_disks): Removed.
14712 (grub_rescue_print_devices): New function.
14713 (grub_rescue_cmd_ls): Use grub_device_iterate with
14714 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14715 grub_rescue_print_disks.
14716
14717 * kern/partition.c (grub_partition_iterate): Return the result of
14718 PARTMAP->ITERATE instead of GRUB_ERRNO.
14719
14720 * kern/device.c: Include grub/partition.h.
14721 (grub_device_iterate): New function.
14722
14723 * include/grub/partition.h (grub_partition_iterate): Return int
14724 instead of grub_err_t.
14725
14726 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14727 prototype.
14728 [GRUB_UTIL] (grub_search_fini): Likewise.
14729
14730 * include/grub/device.h (grub_device_iterate): New prototype.
14731
14732 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14733 commands/search.c.
14734 (pkgdata_MODULES): Added search.mod.
14735 (search_mod_SOURCES): New variable.
14736 (search_mod_CFLAGS): Likewise.
14737
14738 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14739 (pkgdata_MODULES): Added search.mod.
14740 (search_mod_SOURCES): New variable.
14741 (search_mod_CFLAGS): Likewise.
14742
14743 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14744 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14745 All callers changed.
14746
14747 * DISTLIST: Added commands/search.c.
14748
ef095434 147492005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14750
14751 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14752 conversion.
14753 (grub_getcharwidth): New function.
14754
14755 * kern/misc.c (grub_utf8_to_ucs4): New function.
14756
14757 * include/grub/term.h (struct grub_term): Added a new member
14758 "getcharwidth".
14759 (grub_getcharwidth): New prototype.
14760
14761 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14762
14763 * term/i386/pc/console.c (map_char): New function. Segregated from
14764 grub_console_putchar.
14765 (grub_console_putchar): Use map_char.
14766 (grub_console_getcharwidth): New function.
14767 (grub_console_term): Specified grub_console_getcharwidth as
14768 getcharwidth.
14769
14770 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14771 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14772
14773 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14774 GRUB_ERRNO.
14775 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14776 on grub_strtoul completely.
14777 (write_char): Declare local variables in the beginning of the
14778 function.
14779 (grub_vesafb_getcharwidth): New function.
14780 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14781 getcharwidth.
14782
1f0a95e4 147832005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14784
14785 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14786 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14787 commands/i386/pc/vbetest.c.
14788
14789 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14790 call grub_vbe_get_controller_info again, because the returned
14791 information is volatile.
14792 (grub_vbe_set_video_mode): Mostly rewritten.
14793 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14794 grub_vbe_status_t correctly.
14795 (grub_vbe_get_video_mode_info): Likewise.
14796 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14797 several if statements.
14798
14799 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14800 * commands/i386/pc/vbeinfo.c: ... this.
14801
14802 * commands/i386/pc/vbe_test.c: Renamed to ...
14803 * commands/i386/pc/vbetest.c: ... this.
14804
14805 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14806 ...
14807 (grub_cmd_vbeinfo): ... this. Save video modes before
14808 iterating. Skip a video mode, if it is not available, not enough
14809 information is given or it is monochrome. Show the memory
14810 model. Leave the interpretation of MODEVAR to grub_strtoul
14811 completely.
14812 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14813 (GRUB_MOD_FINI): Likewise.
14814
14815 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14816 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14817 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14818 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14819 grub_strtoul completely.
14820 (real2pm): Removed.
14821 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14822 (GRUB_MOD_FINI): Likewise.
14823
14824 * normal/misc.c: Include grub/mm.h.
14825
14826 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14827 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14828 (vbe_list_modes_mod_SOURCES): Removed.
14829 (vbe_list_modes_mod_CFLAGS): Likewise.
14830 (vbe_test_mod_SOURCES): Likewise.
14831 (vbe_test_mod_CFLAGS): Likewise.
14832 (vbeinfo_mod_SOURCES): New variable.
14833 (vbeinfo_mod_CFLAGS): Likewise.
14834 (vbetest_mod_SOURCES): Likewise.
14835 (vbetest_mod_CFLAGS): Likewise.
14836
992ffbbe 148372005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14838
14839 * normal/misc.c: New file.
14840
14841 * DISTLIST: Added normal/misc.c.
f19dbdb7 14842
992ffbbe 14843 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14844 DISK to HOOK. Call HOOK with DISK.
14845 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14846 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14847 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14848
14849 * normal/menu_entry.c (struct screen): Added a new member
14850 "completion_shown".
14851 (completion_buffer): New global variable.
14852 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14853 (store_completion): New function.
14854 (complete): Likewise.
14855 (clear_completions): Likewise.
14856 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14857 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14858 a tab, call complete.
14859
14860 * normal/completion.c (disk_dev): Removed.
14861 (print_simple_completion): Likewise.
14862 (print_partition_completion): Likewise.
14863 (print_func): New global variable.
14864 (add_completion): Do not take the arguments WHAT or PRINT any
14865 longer. Added a new argument TYPE. Instead of printing directly,
14866 call PRINT_FUNC if not NULL.
14867 All callers changed.
14868 (complete_device): Use a local variable DEV instead of
14869 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14870 (grub_normal_do_completion): Take a new argument HOOK. Do not
14871 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14872 empty string, return NULL instead.
14873 All callers changed.
14874
14875 * normal/cmdline.c (print_completion): New function.
14876
14877 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14878 to HOOK.
14879 All callers changed.
14880
14881 * kern/disk.c (grub_print_partinfo): Removed.
14882
14883 * include/grub/partition.h (struct grub_partition_map): Add a new
14884 argument DISK into HOOK of ITERATE.
14885 (grub_partition_iterate): Add a new argument DISK to HOOK.
14886
14887 * include/grub/normal.h (enum grub_completion_type): New enum.
14888 (grub_completion_type_t): New type.
14889 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14890 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14891 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14892 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14893 (grub_normal_do_completion): Added a new argument HOOK.
14894 (grub_normal_print_device_info): New prototype.
14895
14896 * include/grub/disk.h (grub_print_partinfo): Removed.
14897
14898 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14899 (normal_mod_SOURCES): Likewise.
14900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14901 (normal_mod_SOURCES): Likewise.
14902
14903 * commands/ls.c (grub_ls_list_disks): Use
14904 grub_normal_print_device_info instead of grub_print_partinfo. Free
14905 PNAME.
14906 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14907 duplicating the code.
14908
0bd41162 149092005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14910
14911 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 14912 follow GCS more precisely.
14913 * commands/i386/pc/vbe_test.c: Likewise.
14914 * include/grub/i386/pc/vbe.h: Likewise.
14915 * term/i386/pc/vesafb.c: Likewise.
14916 * video/i386/pc/vbe.c: Likewise.
0bd41162 14917
6323696a 149182005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14919
14920 * DISTLIST: Added term/i386/pc/vesafb.c
14921 DISTLIST: Added video/i386/pc/vbe.c
14922 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14923 DISTLIST: Added commands/i386/pc/vbe_test.c.
14924 * commands/i386/pc/vbe_list_modes.c: New file.
14925 * commands/i386/pc/vbe_test.c: Likewise.
14926 * term/i386/pc/vesafb.c: Likewise.
14927 * video/i386/pc/vbe.c: Likewise.
14928 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14929 (grub_vbe_probe) Added prototype.
14930 (grub_vbe_set_video_mode) Likewise.
14931 (grub_vbe_get_video_mode) Likewise.
14932 (grub_vbe_get_video_mode_info) Likewise.
14933 (grub_vbe_set_pixel_rgb) Likewise.
14934 (grub_vbe_set_pixel_index) Likewise.
14935 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14936 (pkgdata_MODULES): Added vesafb.mod.
14937 (pkgdata_MODULES): Added vbe_list_modes.mod.
14938 (pkgdata_MODULES): Added vbe_test.mod.
14939 (vbe_mod_SOURCES): Added.
14940 (vbe_mod_CFLAGS): Likewise.
14941 (vesafb_mod_SOURCES): Likewise.
14942 (vesafb_mod_CFLAGS): Likewise.
14943 (vbe_list_modes_mod_SOURCES): Likewise.
14944 (vbe_list_modes_mod_CFLAGS): Likewise.
14945 (vbe_test_mod_SOURCES): Likewise.
14946 (vbe_test_mod_CFLAGS): Likewise.
14947
0a74e62f 149482005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14949
0a74e62f 14950 * normal/command.c (grub_command_execute): If INTERACTIVE is
14951 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14952 CMDLINE. Disable the pager if INTERACTIVE is true.
14953 All callers are changed.
14954
14955 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14956 before reading a config file.
14957 * normal/main.c (read_config_file): Even if a command is not
14958 found, register it if it is within an entry.
14959
14960 * util/grub-emu.c: Include sys/types.h and unistd.h.
14961 (options): Added --hold.
14962 (struct arguments): Added a new member "hold".
14963 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14964 missing.
14965 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14966 cleared by a debugger, if it is not zero.
14967
14968 * include/grub/normal.h (grub_command_execute): Add an argument
14969 INTERACTIVE.
14970
e51f85ae 149712005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14972
14973 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14974
e9c6f39b 149752005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14976
14977 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14978 program with another one, because the old one didn't detect a bug
14979 in gcc-3.4. Always use regparm 2, because the new test is still
14980 not enough for gcc-4.0. Someone must investigate a simple test
14981 case which detects a bug in gcc-4.0.
14982
8de3495c 149832005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14984
14985 * DISTLIST: Added normal/completion.c.
14986
14987 * normal/completion.c: New file.
f19dbdb7 14988
8de3495c 14989 * term/i386/pc/console.c (grub_console_getwh): New function.
14990 (grub_console_term): Assign grub_console_getwh to getwh.
14991
14992 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14993 function is defined in normal/completion.c as
14994 grub_normal_do_completion.
14995 (grub_cmdline_get): Use grub_normal_do_completion instead of
14996 grub_tab_complete.
14997
14998 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14999 returns non-zero, otherwise return 0.
15000 (grub_partition_iterate): First, probe the partition map. Then,
15001 call ITERATE only for this partition map.
15002
15003 * kern/misc.c (grub_strncmp): Rewritten.
15004
15005 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15006 returns non-zero. Otherwise return 0.
15007
15008 * include/grub/partition.h (grub_partition_map_iterate): Return
15009 int instead of void.
15010
15011 * include/grub/normal.h (grub_normal_do_completion): New prototype.
15012
15013 * include/grub/misc.h (grub_strncmp): Change the type of N to
15014 grub_size_t.
15015
15016 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15017 of void.
15018
15019 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 15020 unsigned explicitly before comparing it with I.
8de3495c 15021
15022 * kern/main.c (grub_env_write_root): Add the attribute unused into
15023 VAR.
15024
15025 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15026 normal/completion.c.
15027 (normal_mod_SOURCES): Likewise.
15028 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15029 (normal_mod_SOURCES): Likewise.
15030
15031 * normal/command.c (grub_iterate_commands): If ITERATE returns
15032 non-zero, return one immediately.
15033
e85e144b 150342005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15035
15036 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15037 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15038 descriptions.
15039 (grub_vbe_get_controller_info): New function.
15040 (grub_vbe_get_mode_info): Likewise.
15041 (grub_vbe_set_mode): Likewise.
15042 (grub_vbe_get_mode): Likewise.
15043 (grub_vbe_set_memory_window): Likewise.
15044 (grub_vbe_get_memory_window): Likewise.
15045 (grub_vbe_set_scanline_length): Likewise.
15046 (grub_vbe_get_scanline_length): Likewise.
15047 (grub_vbe_set_display_start): Likewise.
15048 (grub_vbe_get_display_start): Likewise.
15049 (grub_vbe_set_palette_data): Likewise.
15050 * include/grub/i386/pc/vbe.h: New file.
15051
c46153d2 150522005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15053
15054 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15055 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15056 * DISTLIST: Likewise.
15057 * kern/ieee1275/of.c: Moved to ...
15058 * kern/ieee1275/ieee1275.c: ... here.
15059
0cb90c45 150602005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15061
15062 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15063 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15064 Pass 0 as `end' parameter to grub_strtoul().
15065
a19fb360 150662005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15067
15068 * include/grub/powerpc/ieee1275/console.h: Do not include
15069 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15070 ifdef.
15071 (grub_console_cur_color): Remove i386-specific prototype.
15072 (grub_console_real_putchar): Likewise.
15073 (grub_console_checkkey): Likewise.
15074 (grub_console_getkey): Likewise.
15075 (grub_console_getxy): Likewise.
15076 (grub_console_gotoxy): Likewise.
15077 (grub_console_cls): Likewise.
15078 (grub_console_setcursor): Likewise.
15079 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15080 Include <grub/machine/console.h>.
15081 * term/ieee1275/ofconsole.c: Likewise.
15082
4ac9bd04 150832005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15084
15085 * Makefile.in (LIBLZO): New variable.
15086
15087 * configure.ac: Check for LZO version 2.
15088
15089 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15090 lzo/lzo1x.h instead of lzo1x.h.
15091
15092 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15093 of -llzo.
15094
15095 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15096 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15097
15098 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15099 copying the data from PARTITION to P.
15100
f4917dfd 151012005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15102
15103 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15104 negative, unload the module.
15105
15106 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15107 map is "pc_partition_map" but not "pc".
15108 (usage): Fix the description. The options are --boot-image and
15109 --core-image but not --boot-file or --core-file.
15110 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15111 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15112 DEFAULT_DIRECTORY.
15113
15114 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15115 --core-file. Specify INSTALL_DEVICE as an argument.
15116
15117 * util/console.c: Include config.h.
15118 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15119 [HAVE_NCURSES_H]: Include ncurses.h.
15120 [HAVE_CURSES_H]: Include curses.h.
15121 [!A_NORMAL] (A_NORMAL): Defined as zero.
15122 [!A_STANDOUT] (A_STANDOUT): Likewise.
15123
15124 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15125 -lncurses.
15126 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15127
15128 * configure.ac: Check for curses libraries and headers.
15129
15130 * Makefile.in (LIBCURSES): New variable.
15131
15132 * genmk.rb (Script::rule): Set the executable bits.
15133
15134 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15135 name of the PC partition map is "pc_partition_map" but not "pc".
15136
0e143073 151372005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15138
15139 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15140 (modules): Likewise.
15141 (usage): Added descriptions for --modules and --grub-probefs.
15142 Handle --modules and --grub-probefs. Save the arguments in MODULES
15143 and GRUB_PROBEFS, respectively.
15144 Auto-detect a filesystem module against GRUBDIR. If the result is
15145 empty and modules are not specified explicitly, abort the
15146 installation. Add the result to MODULES.
15147
15148 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15149 disk/powerpc/ieee1275/ofdisk.c,
15150 include/grub/powerpc/ieee1275/init.h and
15151 term/powerpc/ieee1275/ofconsole.c.
15152 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15153 term/ieee1275/ofconsole.c.
15154
15155 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15156
15157 * COPYING: Upgraded to the latest version. Only the address of the
15158 FSF office has changed.
f19dbdb7 15159
efd6e6d5 151602005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15161
15162 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15163 kern/ieee1275.c with kern/ieee1275/of.c.
15164
15165 * kern/ieee1275.c: Moved to ...
15166 * kern/ieee1275/of.c: ... here.
15167
8ceafda2 151682005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15169
15170 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 15171 readability.
8ceafda2 15172
15173 * config.guess: Updated to the latest version from gnulib.
15174 * config.sub: Likewise.
15175 * install.sh: Likewise.
15176 * mkinstalldirs: Likewise.
15177
15178 * include/grub/console.h: Removed. This file is arch-specific. Do
15179 not put this in include/grub.
15180
15181 * include/grub/i386/pc/console.h: Resurrected.
15182
15183 * util/console.c: Include grub/machine/console.h instead of
15184 grub/console.h.
15185 * util/grub-emu.c: Likewise.
15186
267f6cd9 151872005-08-04 Marco Gerards <metgerards@student.han.nl>
15188
15189 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15190 hardcoded value.
f19dbdb7 15191
267f6cd9 15192 From Vincent Pelletier <subdino2004@yahoo.fr>
15193 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15194 Redefined to use grub_getwh.
15195 (grub_term): New member named getwh.
15196 (grub_getwh): New prototype.
15197 * kern/term.c (grub_getwh): New function.
15198 * term/i386/pc/console.c (grub_console_getwh): New function.
15199 (grub_console_term): New member `getwh'.
15200 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15201 (grub_vga_term): New member `getwh'.
0b5abe02 15202 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 15203 grub_ssize_t.
15204 (grub_ofconsole_getw): New function.
15205 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15206 (grub_ofconsole_term): New field named getwh and new initial
15207 value.
15208
3be7266d 152092005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15210
15211 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15212 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15213 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15214 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15215 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15216 of <grub/machine/ieee1275.h>.
15217 * commands/ieee1275/reboot.c: Likewise.
15218 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15219 * kern/ieee1275.c: ... to here. All users updated. Change all
15220 parameter structs to use new type `grub_ieee1275_cell_t'.
15221 * term/powerpc/ieee1275/ofconsole.c: Move ...
15222 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15223 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15224 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15225 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15226 to return int.
15227 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15228 Remove unused prototypes. All users updated.
15229 * include/grub/powerpc/ieee1275/console.h: Removed.
15230 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15231 `grub_ieee1275_cell_t'.
15232 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15233 Cast comparisons with -1 to the correct type.
15234 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15235 type to match `grub_ieee1275_entry_fn'.
15236
8b5f3938 152372005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15238
15239 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15240
15241 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15242 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15243 partmap/sun.c.
15244 (grub_probefs_SOURCES): New variable.
15245
15246 * util/i386/pc/grub-probefs.c: New file.
15247
15248 * util/i386/pc/grub-setup.c (main): Call
15249 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15250 grub_hfs_init and grub_jfs_init to initialize the system. Call
15251 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15252 grub_pc_partition_map_fini to finish the system.
15253
ea409713 152542005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15255
15256 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15257 function.
15258 (grub_multiboot_load_elf32): Likewise.
15259 (grub_multiboot_is_elf64): Likewise.
15260 (grub_multiboot_load_elf64): Likewise.
15261 (grub_multiboot_load_elf): Likewise.
15262 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15263 an ELF32 or ELF64 file.
15264 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15265
15266 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15267 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15268 NULL before calling FS->LABEL.
15269 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15270 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15271 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15272 before calling FS->LABEL.
15273
141a288b 152742005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15275
15276 * util/i386/pc/grub-install.in (datadir): New variable.
15277 (libdir): Removed.
15278 (pkgdatadir): New variable.
15279 (pkglibdir): Removed.
15280
0d5f8a54 152812005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15282
15283 * DISTLIST: Added util/i386/pc/grub-install.in.
15284
15285 * util/i386/pc/grub-install.in: New file.
15286
15287 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15288 (grub_install_SOURCES): Likewise.
15289
15290 * genmk.rb: Added support for scripts.
15291 (Script): New class.
15292 (scripts): New variable.
15293
15294 * Makefile.in (install-local): Install sbin_SCRIPTS by
15295 INSTALL_SCRIPT.
15296 (uninstall): Remove sbin_SCRIPTS.
15297
15298 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15299 device, try to get a GRUB device by
15300 grub_util_biosdisk_get_grub_dev.
15301 Free DEST_DEV.
15302
15303 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15304 description for --device-map.
15305
5f968e1e 153062005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15307
15308 Change the semantics of variable hooks. They now return strings
15309 instead of error values.
f19dbdb7 15310
5f968e1e 15311 * util/i386/pc/grub-setup.c: Include grub/env.h.
15312 (setup): Use grub_device_set_root instead of grub_env_set.
15313
15314 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15315 grub_env_get instead of grub_device_set_root and
15316 grub_device_get_root, respectively.
15317
15318 * kern/main.c (grub_env_write_root): New function.
15319 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15320 grub_env_set instead of grub_device_set_root.
15321
15322 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15323 many variables.
15324 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15325 rather than calling ENV->WRITE_HOOK afterwards.
15326 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15327 passing a pointer of a pointer.
15328 (grub_register_variable_hook): Change the types of "read_hook" and
15329 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15330 respectively.
15331 Allocate the default empty string on the heap, because this string
15332 may be freed later.
15333
15334 * kern/device.c: Include grub/env.h.
15335 (grub_device_set_root): Removed.
15336 (grub_device_get_root): Likewise.
15337 (grub_device_open): Use grub_env_get instead of
15338 grub_device_get_root.
15339
15340 * include/grub/env.h (grub_env_read_hook_t): New type.
15341 (grub_env_write_hook_t): Likewise.
15342 (grub_env_var): Change the types of "read_hook" and "write_hook"
15343 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15344 (grub_register_variable_hook): Likewise.
15345
15346 * include/grub/device.h (grub_device_set_root): Removed.
15347 (grub_device_set_root): Likewise.
15348
15349 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15350 make sure that DIRNAME terminates with '/', so that
15351 grub_fat_find_dir will fail if PATH is not a directory.
15352
15353 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15354 from DIRNAME.
15355 Use the qualifier auto for print_files and print_files_long.
15356 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15357 as a regular file.
15358 Put a newline only if there is no error.
15359 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15360 used.
15361
896f0afd 153622005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15363
15364 * kern/partition.c (grub_partition_probe): Initialize PART to
15365 NULL. Otherwise, when no partition map is registered, this returns
15366 a garbage.
15367
b28b81b2 153682005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15369
15370 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15371 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15372 valid.
15373
5f3607e0 153742005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15375
15376 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15377 information on each device, if it does not have partitions. Print
15378 "Device" instead of "Disk", because this function is not specific
15379 to disk devices.
15380
15381 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15382 static to ensure that it is put on the memory rather than a
15383 register.
15384
502c87e8 153852005-07-17 Yoshinori Okuji <okuji@enbug.org>
15386
15387 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15388 (grub_cat_init): Likewise.
15389 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15390 (options): Likewise.
15391 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15392 (grub_configfile_init): Likewise.
15393 * font/manager.c (GRUB_MOD_INIT): Likewise.
15394 * commands/help.c (GRUB_MOD_INIT): Likewise.
15395 (grub_help_init): Likewise.
15396 * normal/command.c (grub_command_init): Likewise.
15397 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15398 * disk/loopback.c (grub_loop_init): Likewise.
15399 (GRUB_MOD_INIT): Likewise.
15400 * commands/ls.c (grub_ls_init): Likewise.
15401 (GRUB_MOD_INIT): Likewise.
15402 (options): Likewise.
15403 * commands/boot.c (grub_boot_init): Likewise.
15404 (GRUB_MOD_INIT): Likewise.
15405 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15406 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15407 (GRUB_MOD_INIT): Likewise.
15408 * commands/cmp.c (grub_cmp_init): Likewise.
15409 (GRUB_MOD_INIT): Likewise.
15410
15411 * normal/arg.c: Use <> instead of "" to include header files.
15412 (SHORT_ARG_HELP): New macro.
15413 (SHORT_ARG_USAGE): Likewise.
15414 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15415 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15416 descriptions.
15417 (find_short): Check if C is 'h' or 'u' explicitly.
15418 (grub_arg_show_help): Use space characters instead of tabs. Treat
15419 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15420 are shown with --help and --usage only if they are not used for
15421 the command itself.
15422 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15423 'h' and 'u'.
15424
15425 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15426 const into "longarg". Change the type of "shortarg" to int.
15427
f806d18e 154282005-07-17 Yoshinori Okuji <okuji@enbug.org>
15429
15430 * boot/i386/pc/boot.S (boot_drive_check): New label.
15431
15432 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15433 macro.
15434
15435 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15436 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15437
e293232b 154382005-07-17 Yoshinori Okuji <okuji@enbug.org>
15439
15440 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15441 When turning off Gate A20, skip the check and return immediately,
15442 because this is not fatal usually.
15443
ebedfd00 154442005-07-17 Yoshinori Okuji <okuji@enbug.org>
15445
15446 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15447 be 0x7C00 instead of 0x8000.
15448
15449 * boot/i386/pc/pxeboot.S: Rewritten.
15450
15451 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15452 EXT_C.
15453 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15454 result.
15455
654fc59f 154562005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15457
15458 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15459 robustness. This routine now supports a BIOS call and System
15460 Control Port A to modify the gate A20.
15461
15462 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15463 Increased to 0x440.
15464
09f9923f 154652005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15466
15467 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15468 device path and resulting ihandle.
15469 (grub_ofdisk_close): dprintf the ihandle being closed.
15470 (grub_ofdisk_read): dprintf function parameters.
15471 * kern/mm.c (grub_mm_init_region): Likewise.
15472 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15473 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15474 size, and boot arguments.
15475 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15476 before loading into memory.
15477 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15478 before loading into memory.
15479
7ef504d8 154802005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15481
15482 * kern/mm.c: Added much documentation.
15483 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15484 8, set to 5 instead of 8.
15485
e0f050c2 154862005-07-10 Yoshinori Okuji <okuji@enbug.org>
15487
15488 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15489
15490 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15491 (grub_mkdevicemap_SOURCES): New variable.
15492
15493 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15494 lib/device.c of GRUB Legacy.
15495
7224189a 154962005-07-10 Yoshinori Okuji <okuji@enbug.org>
15497
15498 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15499 instead of PATH is NULL.
15500
68c864eb 155012005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15502
15503 * commands/cmp.c (BUFFER_SIZE): New macro.
15504 (grub_cmd_cmp): Close the right file at the right time. Compare
15505 only data just read. Don't report files of different size as
15506 identical. Dynamically allocate buffers. Move variable
15507 declarations at the beginning of function.
15508
e6f3e614 155092005-07-09 Yoshinori Okuji <okuji@enbug.org>
15510
15511 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15512 reverse.
15513
f8f1559a 155142004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15515
15516 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15517 when backspace is pressed at beginning of line.
15518
39c9d41d 155192005-07-03 Yoshinori Okuji <okuji@enbug.org>
15520
15521 * DISTLIST: Added genfslist.sh.
15522
15523 * normal/main.c (fs_module_list): New variable.
15524 (autoload_fs_module): New function.
15525 (read_fs_list): Likewise.
15526 (grub_normal_execute): Call read_fs_list.
15527
15528 * kern/fs.c (grub_fs_autoload_hook): New variable.
15529 (grub_fs_probe): Added support for auto-loading.
15530
15531 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15532 (grub_fs_module_list_t): New type.
15533
15534 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15535 (grub_fs_autoload_hook): New prototype.
15536
15537 * genfslist.sh: New file.
f19dbdb7 15538
39c9d41d 15539 * genmk.rb: Added a rule to generate a filesystem list.
15540
121c1d83 155412005-06-30 Marco Gerards <metgerards@student.han.nl>
15542
15543 * configure.ac: Fix the test for cross-compiling.
15544
15545 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15546 define GRUB_UTIL anymore.
15547
15548 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15549 so this function works on other systems than just big endian.
15550 (load_modules): Likewise.
15551 (add_segments): Likewise.
15552
e75d76e1 155532005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15554
15555 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15556 contains `l' modifier, get a long from va_arg().
15557
50b5a0a7 155582005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15559
15560 * kern/mm.c (grub_free): If the next free block which is being
15561 merged is the first free block, set the first block to the block
15562 being freed.
15563 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15564
89371b20 155652005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15566
15567 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15568 `grub_ieee1275_chosen'.
15569
168d6e58 155702005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15571
15572 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15573 (grub_ieee1275_chosen): New variable.
15574 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15575 `chosen'.
15576 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15577 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15578 Rename first argument to `phandle' for consistency.
15579 (grub_ieee1275_get_property_length): Likewise.
15580 (grub_ieee1275_next_property): Likewise. Change type of first argument
15581 to grub_ieee1275_phandle_t.
15582 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15583 Move export next to declaration.
15584 (grub_ieee1275_chosen): New variable.
15585 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15586 Correct cosmetic typo.
15587 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15588 `grub_ieee1275_chosen'.
15589 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15590 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15591 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15592 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15593 `grub_ieee1275_chosen'.
15594
ca5baa3f 155952005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15596
15597 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15598 /chosen/bootargs.
15599 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15600 /chosen/bootargs as "variable=value" pairs.
15601
708b345f 156022005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15603
15604 * include/grub/misc.h (grub_dprintf): New macro.
15605 (grub_real_dprintf): New prototype.
15606 (grub_strword): Likewise.
15607 (grub_iswordseparator): Likewise.
15608 * kern/misc.c (grub_real_dprintf): New function.
15609 (grub_strword): Likewise.
15610 (grub_iswordseparator): Likewise.
15611
f4c5e67c 156122005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15613
15614 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15615 (roundup): Remove macro.
15616 (grub_ieee1275_flags): Make static.
15617 (grub_ieee1275_realmode): Remove.
15618 (grub_ieee1275_test_flag): New function.
15619 (grub_ieee1275_set_flag): Likewise.
15620 (find_options): Rename to `grub_ieee1275_find_options'; update
15621 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15622 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15623 (cmain): New prototype.
15624 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15625 `grub_ieee1275_flags' directly.
15626 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15627 machine/biosdisk.h.
15628 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15629 Don't include grub/machine/init.h.
15630 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15631 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15632 Remove prototype.
15633 (grub_ieee1275_realmode): Likewise.
15634 (grub_ieee1275_flag): New enum.
15635 (grub_ieee1275_test_flag): New prototype.
15636 (grub_ieee1275_set_flag): New prototype.
15637 * include/grub/powerpc/ieee1275/init.h: Remove file.
15638 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15639 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15640 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15641 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15642 comment.
15643 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15644 `grub_ieee1275_test_flag'.
15645 (grub_ieee1275_encode_devname): Likewise.
15646
ed16607e 156472005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15648
15649 * include/grub/powerpc/ieee1275/ieee1275.h
15650 (grub_ieee1275_encode_devname): New prototype.
15651 (grub_ieee1275_get_filename): Likewise.
15652 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15653 function.
15654 (grub_set_prefix): Likewise.
15655 (grub_machine_init): Call grub_set_prefix.
15656 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15657 (grub_parse_type): New enum.
15658 (grub_ieee1275_get_devargs): New function.
15659 (grub_ieee1275_get_devname): Likewise.
15660 (grub_ieee1275_parse_args): Likewise.
15661 (grub_ieee1275_get_filename): Likewise.
15662 (grub_ieee1275_encode_devname): Likewise.
15663
be369920 156642005-03-30 Marco Gerards <metgerards@student.han.nl>
15665
15666 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15667 `grub_loader_unset'.
15668
a5ce3a4a 156692005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15670
15671 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15672 instead of grub_ieee1275_interpret.
15673 (grub_halt_init): New function.
15674 (grub_halt_fini): Likewise.
15675 (GRUB_MOD_INIT): Correct message grammar.
15676 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15677 instead of grub_ieee1275_interpret.
15678 (grub_reboot_init): New function.
15679 (grub_reboot_fini): Likewise.
15680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15681 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15682 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15683 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15684 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15685 function.
15686 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15687 Add prototype.
15688 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15689 prototype.
15690 (grub_halt): Likewise.
15691 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15692 (cmain): Remove __attribute__((unused)).
15693 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15694 (grub_heap_len): Likewise.
15695 (grub_machine_fini): New function.
15696 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15697 (grub_halt): Likewise.
15698 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15699 function.
15700 * util/powerpc/ieee1275/misc.c: New file.
15701
0058f771 157022005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15703
15704 * DISTLIST: New file.
15705 * gendistlist.sh: Likewise.
f19dbdb7 15706
0058f771 15707 * Makefile.in (COMMON_DISTFILES): Removed.
15708 (BOOT_DISTFILES): Likewise.
15709 (CONF_DISTFILES): Likewise.
15710 (DISK_DISTFILES): Likewise.
15711 (FS_DISTFILES): Likewise.
15712 (INCLUDE_DISTFILES): Likewise.
15713 (KERN_DISTFILES): Likewise.
15714 (LOADER_DISTFILES): Likewise.
15715 (TERM_DISTFILES): Likewise.
15716 (UTIL_DISTFILES): Likewise.
15717 (DISTFILES): Likewise.
15718 (uninstall): Uninstall files in $(pkgdata_DATA).
15719 (DISTLIST): New target.
15720 (distdir): Use the contents of the file DISTLIST to get a list of
15721 distributed files.
15722
46b3b8a5 157232005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15724
15725 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15726 descriptor. This is ported from GRUB Legacy.
15727
15728 * gencmdlist.sh: Added an extra semicolon to make it work with
15729 old sed versions. Reported by Robert Bihlmeyer
15730 <robbe@orcus.priv.at>.
15731
5822ff87 157322005-03-08 Yoshinori Okuji <okuji@enbug.org>
15733
15734 Automatic loading of commands is supported.
f19dbdb7 15735
5822ff87 15736 * normal/main.c (read_command_list): New function.
15737 (grub_normal_execute): Call read_command_list.
15738
15739 * normal/command.c (grub_register_command): Return zero or CMD.
15740 Allocate CMD->NAME from the heap.
15741 Initialize CMD->MODULE_NAME to zero.
15742 Find the same name as well. If the same command is found and it is
15743 a dummy command, overwrite members. If it is not a dummy command,
15744 return zero.
15745 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15746 (grub_command_find): If a dummy command is found, load a module
15747 and retry to find a command only once.
15748
15749 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15750 make sure that each command is loaded.
15751
15752 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15753 macro.
15754 (struct grub_command): Remove const from the member `name'.
15755 Add a new member `module_name'.
15756 (grub_register_command): Return grub_command_t.
15757
15758 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15759 sure that each command is loaded.
15760
15761 * genmk.rb (PModule::rule): Specify a module name without the
15762 suffix ".mod" to gencmdlist.sh.
15763
7b1f4b57 157642005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15765
15766 * gencmdlist.sh: New file.
f19dbdb7 15767
7b1f4b57 15768 * genmk.rb (PModule::rule): Generate a rule for a command list.
15769 Clean command.lst.
15770 Generate command.lst from $(COMMANDFILES).
15771
15772 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15773 (DATA): Added $(pkgdata_DATA).
15774 (install-local): Install files in $(pkgdata_DATA).
15775
062aaf39 157762005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15777
15778 * term/i386/pc/vga.c (debug_command): Removed.
15779 (GRUB_MOD_INIT): Do not register the command "debug".
15780
15781 From Hollis Blanchard:
15782 * commands/configfile.c: New file.
15783 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15784 commands/configfile.c.
15785 (pkgdata_MODULES): Added configfile.mod.
15786 (configfile_mod_SOURCES): New variable.
15787 (configfile_mod_CFLAGS): Likewise.
15788 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15789 commands/configfile.c.
15790 (pkgdata_MODULES): Added configfile.mod.
15791 (configfile_mod_SOURCES): New variable.
15792 (configfile_mod_CFLAGS): Likewise.
15793 * util/grub-emu.c (main): Call grub_configfile_init and
15794 grub_configfile_fini.
15795 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15796 prototype.
15797 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15798
cee01aa6 157992005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15800
15801 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15802 address.
15803
15804 * commands/help.c (grub_cmd_help): Do not print newlines after
15805 the last command in print_command_help.
15806
93f3a1d8 158072005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15808
15809 * commands/default.h: New file.
15810 * commands/timeout.h: Likewise.
15811 * normal/context.c: Likewise.
f19dbdb7 15812
93f3a1d8 15813 * util/misc.c: Do not include sys/times.h.
15814 Include sys/time.h and grub/machine/time.h.
15815 (grub_get_rtc): Rewritten with gettimeofday.
15816
15817 * util/grub-emu.c (main): Call grub_default_init and
15818 grub_timeout_init before grub_normal_init, and call
15819 grub_timeout_fini and grub_default_fini after grub_main.
15820
15821 * util/console.c (grub_ncurses_checkkey): Return the read
15822 character or -1.
15823
15824 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15825 timeouts.
15826
15827 * normal/main.c (read_config_file): Push MENU. If this fails,
15828 print an error and wait for a user input.
15829 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15830 If a menu is empty or an error occurs, pop MENU.
15831 (grub_normal_execute): Pop and free MENU after grub_menu_run
15832 returns.
15833
15834 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15835
15836 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15837 include time.h.
15838 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15839 without GRUB_UTIL.
15840 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15841 time.h.
15842 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15843 without GRUB_UTIL.
15844
15845 * include/grub/normal.h (struct grub_menu_list): New struct.
15846 (grub_menu_list_t): New type.
15847 (struct grub_context): New struct.
15848 (grub_context_t): New type.
15849 (grub_register_command): Got rid of EXPORT_FUNC.
15850 (grub_unregister_command): Likewise.
15851 (grub_context_get): New prototype.
15852 (grub_context_get_current_menu): Likewise.
15853 (grub_context_push_menu): Likewise.
15854 (grub_context_pop_menu): Likewise.
15855 [GRUB_UTIL] (grub_default_init): Likewise.
15856 [GRUB_UTIL] (grub_default_fini): Likewise.
15857 [GRUB_UTIL] (grub_timeout_init): Likewise.
15858 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15859
15860 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15861 commands/timeout.c and normal/context.c.
15862 (pkgdata_MODULES): Added default.mod and timeout.mod.
15863 (normal_mod_SOURCES): Added normal/context.c.
15864 (default_mod_SOURCES): New variable.
15865 (default_mod_CFLAGS): Likewise.
15866 (timeout_mod_SOURCES): Likewise.
15867 (timeout_mod_CFLAGS): Likewise.
15868 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15869 conf/i386-pc.rmk.
15870 (pkgdata_MODULES): Added default.mod and timeout.mod.
15871 (normal_mod_SOURCES): Added normal/context.c.
15872 (default_mod_SOURCES): New variable.
15873 (default_mod_CFLAGS): Likewise.
15874 (timeout_mod_SOURCES): Likewise.
15875 (timeout_mod_CFLAGS): Likewise.
15876
15877 * Makefile.in (all-local): Added $(MKFILES).
15878
4ed2e1dd 158792005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15880
15881 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15882 (grub_emu_SOURCES): Likewise.
15883 (pkgdata_MODULES): Add `sun.mod'.
15884 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15885 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15886 `partmap/sun.c'.
15887 (pkgdata_MODULES): Add `sun.mod'.
15888 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15889 * include/grub/partition.h (grub_sun_partition_map_init): New
15890 prototype.
15891 (grub_sun_partition_map_fini): Likewise.
15892 * partmap/sun.c: New file.
15893 * util/grub-emu.c (main): Initialize and de-initialize the sun
15894 partitionmap support.
15895
4d4e372e 158962005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15897
15898 This implements an Emacs-like menu entry editor.
f19dbdb7 15899
4d4e372e 15900 * normal/menu_entry.c: New file.
f19dbdb7 15901
4d4e372e 15902 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15903 characters to ASCII.
15904 (saved_char): New variable.
15905 (grub_ncurses_checkkey): Rewritten completely.
15906 (grub_ncurses_getkey): Likewise.
15907 (grub_ncurses_init): Call raw instead of cbreak.
15908
15909 * normal/menu.c (print_entry): Do not put a space.
15910 (init_page): Renamed to ...
15911 (grub_menu_init_page): ... this. All callers changed.
15912 (edit_menu_entry): Removed.
15913 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15914
15915 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15916
15917 * kern/misc.c (grub_vprintf): Call grub_refresh.
15918
15919 * normal/menu.c (DISP_LEFT): Renamed to ...
15920 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15921 * normal/menu.c (DISP_UP): Renamed to ...
15922 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15923 * normal/menu.c (DISP_RIGHT): Renamed to ...
15924 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15925 * normal/menu.c (DISP_DOWN): Renamed to ...
15926 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15927 * normal/menu.c (DISP_HLINE): Renamed to ...
15928 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15929 * normal/menu.c (DISP_VLINE): Renamed to ...
15930 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15931 * normal/menu.c (DISP_UL): Renamed to ...
15932 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15933 * normal/menu.c (DISP_UR): Renamed to ...
15934 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15935 * normal/menu.c (DISP_LL): Renamed to ...
15936 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15937 * normal/menu.c (DISP_LR): Renamed to ...
15938 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15939 * normal/menu.c (TERM_WIDTH): Renamed to ...
15940 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15941 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15942 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15943 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15944 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15945 * normal/menu.c (TERM_MARGIN): Renamed to ...
15946 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15947 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15948 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15949 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15950 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15951 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15952 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15953 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15954 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15955 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15956 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15957 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15958 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15959 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15960 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15961 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15962 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15963 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15964 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15965 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15966 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15967 All callers changed.
15968
15969 * include/grub/normal.h: New prototype.
15970
15971 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15972 normal/menu_entry.c.
15973 (normal_mod_SOURCES): Likewise.
15974 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15975 (normal_mod_SOURCES): Likewise.
15976
e6b92c8a 159772005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15978
15979 * include/grub/normal.h (grub_halt_init): New prototype.
15980 (grub_halt_fini): Likewise.
15981 (grub_reboot_init): Likewise.
15982 (grub_reboot_fini): Likewise.
15983
15984 * util/grub-emu.c: Include signal.h.
15985 (main_env): New global variable.
15986 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15987 catch C-c.
15988 (grub_machine_fini): New function.
15989 (main): Call grub_halt_init and grub_reboot_init before
15990 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15991 Call setjmp with MAIN_ENV to go back afterwards.
15992 Call grub_machine_fini right before return.
15993
15994 * include/grub/util/misc.h: Include setjmp.h.
15995 (main_env): New prototype.
15996
15997 * include/grub/kernel.h (grub_machine_fini): New prototype.
15998 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15999 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16000
16001 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16002 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16003 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 16004
e6b92c8a 16005 * util/i386/pc/misc.c: New file.
f19dbdb7 16006
e6b92c8a 16007 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16008 util/i386/pc/misc.c, commands/i386/pc/halt.c and
16009 commands/i386/pc/reboot.c.
16010
c642636f 160112005-02-14 Guillem Jover <guillem@hadrons.org>
16012
16013 * include/grub/dl.h (grub_dl_check_header): New prototype.
16014 (grub_arch_dl_check_header): Change return type to grub_err_t,
16015 remove size parameter and export function. Update all callers.
16016 * kern/dl.c (grub_dl_check_header): New function.
16017 (grub_dl_load_core): Use `grub_dl_check_header' instead of
16018 `grub_arch_dl_check_header'. Check ELF type. Check if sections
16019 are inside the core.
16020 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16021 independent ELF header checks.
16022 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16023 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16024 `grub_dl_check_header' instead of explicit checks. Check for the
16025 ELF type.
16026 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16027 `grub_dl_check_header' instead of explicit checks. Remove arch
16028 specific ELF header checks.
16029
e6b92c8a 16030 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16031 argument SIZE.
16032
5eabe94b 160332005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16034
16035 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16036 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16037
1b14a681 160382005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16039
16040 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 16041 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 16042 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 16043 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 16044 * partmap/amiga.c (amiga_partition_map_iterate): Return
16045 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16046 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16047
aca108aa 160482005-02-01 Guillem Jover <guillem@hadrons.org>
16049
16050 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16051 help info.
16052
c9f9c556 160532005-01-31 Marco Gerards <metgerards@student.han.nl>
16054
16055 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16056 Removed prototype.
16057 (grub_rescue_cmd_linux): New prototype.
16058 (grub_rescue_cmd_initrd): Likewise.
16059 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16060 `bi_rec'.
16061 (grub_linux_release_mem): Release the memory for the initrd.
16062 (grub_load_linux): Renamed from this...
16063 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16064 Changed `entry' not to be static. Loop over memory regions to
16065 find another one when the default fails.
16066 (grub_rescue_cmd_initrd): New function.
16067 (grub_linux_init): Remove function.
16068 (grub_linux_fini): Likewise.
16069 (GRUB_MOD_INIT): Register `initrd'.
16070 (GRUB_MOD_FINI): Unregister `initrd'.
16071 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16072 Function removed.
16073 (grub_linux_normal_fini): Likewise.
16074 (GRUB_MOD_INIT): Register `initrd'.
16075 (GRUB_MOD_FINI): Unregister `initrd'.
16076
990cf3aa 160772005-01-31 Marco Gerards <metgerards@student.han.nl>
16078
16079 * commands/help.c: New file.
16080 * normal/arg.c (show_help): Renamed to...
16081 (grub_arg_show_help): ... this.
16082 * commands/i386/pc/halt.c: New file.
16083 * commands/i386/pc/reboot.c: Likewise.
16084 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16085 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16086 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16087 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16088 variables.
16089 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16090 `commands/help.c'.
16091 (pkgdata_MODULES): Add `help.mod'.
16092 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16093 * grub/i386/pc/init.h (grub_reboot): New prototype.
16094 (grub_halt): Likewise.
16095 * include/grub/normal.h (grub_arg_show_help): New prototype.
16096 (grub_help_init): Likewise.
16097 (grub_help_fini): Likewise.
16098 * util/grub-emu.c (main): Initialize and deinitialize the help
16099 command.
16100
16101 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16102
16103 * normal/command.c (grub_command_init): Fixed the description of
16104 the `set' and `unset' commands.
16105
161062005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 16107
16108 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16109 function.
16110 * commands/ieee1275/halt.c: New file.
16111 * commands/ieee1275/reboot.c: Likewise.
16112 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16113 `__attribute__ ((unused))'. Some GCS related fixed.
16114 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16115 (grub_suspend_fini): Likewise.
16116 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16117 and `halt.mod'.
16118 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16119 (halt_mod_CFLAGS): New variables.
16120 * include/grub/powerpc/ieee1275/ieee1275.h
16121 (grub_ieee1275_interpret): New prototype.
16122
1ab09cc7 161232005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16124
16125 * include/grub/misc.h (memmove): New prototype.
16126 (memcpy): Likewise.
16127
8b8cbdb2 161282005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16129
16130 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16131 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16132
e3741a27 161332005-01-22 Marco Gerards <metgerards@student.han.nl>
16134
16135 * kern/misc.c (grub_strndup): Function rewritten.
16136
776bd780 161372005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16138
16139 * normal/menu.c (TERM_WIDTH): Macro redefined.
16140 (TERM_TOP_BORDER_Y): Likewise.
16141 (draw_border): Replaced while-loop by a for-loop. Make the number
16142 of lines consistent with the number of lines displayed in
16143 print_entries. Added a margin below the rectangle.
16144 (print_entry): Make the entry fit in the rectangle.
16145 (print_entries): Display the scroll arrows next to the right
16146 border.
16147
78026bce 161482005-01-21 Marco Gerards <metgerards@student.han.nl>
16149
16150 * fs/minix.c (grub_minix_find_file): Reserve more space for
16151 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16152 `grub_strncpy' to copy `path' into it.
16153
67bbaf0f 161542005-01-21 Marco Gerards <metgerards@student.han.nl>
16155
16156 Add the loopback device, a device via which files can be accessed
16157 as devices.
f19dbdb7 16158
67bbaf0f 16159 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16160 (pkgdata_MODULES): Add loopback.mod.
16161 (loopback_mod_SOURCES): New variable.
16162 (loopback_mod_CFLAGS): Likewise.
16163 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16164 `disk/loopback.c'.
16165 (pkgdata_MODULES): Add loopback.mod.
16166 (loopback_mod_SOURCES): New variable.
16167 (loopback_mod_CFLAGS): Likewise.
16168 * disk/loopback.c: new file.
16169 * include/grub/normal.h (grub_loop_init): New prototype.
16170 (grub_loop_fini): New prototype.
16171 * util/grub-emu.c (main): Initialize and de-initialize loopback
16172 support.
16173 * include/grub/disk.h (grub_disk_dev_id): Add
16174 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16175
6f1c18bd 161762005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16177
16178 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16179 function.
16180 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16181 (suspend_mod_SOURCES): New variable.
16182 (suspend_mod_CFLAGS): Likewise.
16183 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16184 New prototype.
16185 * commands/ieee1275/suspend.c: New file.
16186
b38551da 161872005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16188
16189 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 16190 ((unused))' to `__attribute__ ((used))'.
b38551da 16191 (GRUB_MOD_FINI): Likewise.
16192 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16193 * genmk.rb (PModule): Assign space to common symbols when linking
16194 modules.
16195
777aff39 161962005-01-20 Marco Gerards <metgerards@student.han.nl>
16197
16198 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16199 `unsigned' arguments to `grub_size_t'.
16200 (grub_malloc): Likewise.
16201 (grub_realloc): Likewise.
16202 (grub_memalign): Likewise.
16203 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16204 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16205 * util/misc.c (grub_malloc): Likewise.
16206 (grub_realloc): Likewise.
16207 * kern/mm.c (get_header_from_pointer): Change the casts to
16208 `unsigned' into a cast to `grub_size_t'.
16209
16210 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16211 point to `currnode' when `currnode' is changed.
16212
16213 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16214 Schottelius <nico-linux@schottelius.org>.
16215
d0ff18e1 162162005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16217
16218 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16219 (note_path): Remove variable.
16220 (GRUB_IEEE1275_NOTE_NAME): New macro.
16221 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16222 (grub_ieee1275_note_hdr): New structure.
16223 (grub_ieee1275_note_desc): Likewise.
16224 (grub_ieee1275_note): Likewise.
16225 (load_note): Remove `dir' argument. All callers updated. Remove
16226 `note_img' and `path'. Do not load a file from `note_path'.
16227 Initialize a struct grub_ieee1275_note and write that to `out'.
16228 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16229
4ca7004c 162302005-01-05 Marco Gerards <metgerards@student.han.nl>
16231
16232 * util/misc.c (grub_util_read_image): Revert last change. It
16233 called `grub_util_read_at', which seeks from the beginning of the
16234 file.
16235
0b412211 162362005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16237
16238 * TODO: Add note about endianness in grub-mkimage.
16239 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16240 section.
16241 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16242 (grub_mkimage_SOURCES): New target.
16243 * include/grub/kernel.h (grub_start_addr): Remove variable.
16244 (grub_end_addr): Likewise.
16245 (grub_total_module_size): Likewise.
16246 (grub_kernel_image_size): Likewise.
16247 (GRUB_MODULE_MAGIC): New constant.
16248 (grub_module_info): New structure.
16249 (grub_arch_modules_addr): New prototype.
16250 (grub_get_end_addr): Remove prototype.
16251 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16252 * include/grub/powerpc/ieee1275/kernel.h: New file.
16253 * include/grub/util/misc.h (grub_util_get_fp_size): New
16254 prototype.
16255 (grub_util_read_at): Likewise.
16256 (grub_util_write_image_at): Likewise.
16257 * kern/main.c (grub_get_end_addr): Remove function.
16258 (grub_load_modules): Call grub_arch_modules_addr instead of using
16259 grub_end_addr. Look for a grub_module_info struct in memory. Use
16260 the grub_module_info fields instead of calling grub_get_end_addr
16261 as loop conditions. Move grub_add_unused_region code here.
16262 (grub_add_unused_region): Remove function.
16263 * kern/i386/pc/init.c: Include grub/cache.h.
16264 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16265 one call to add_mem_region.
16266 (grub_arch_modules_addr): New function.
16267 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16268 (grub_total_module_size): Likewise.
16269 Include grub/machine/kernel.h.
16270 (grub_arch_modules_addr): New function.
16271 * util/grub-emu.c (grub_end_addr): Remove variable.
16272 (grub_total_module_size): Likewise.
16273 (grub_arch_modules_addr): New function.
16274 * util/misc.c: Include unistd.h.
16275 (grub_util_get_fp_size): New function.
16276 (grub_util_read_at): Likewise.
16277 (grub_util_write_image_at): Likewise.
16278 (grub_util_read_image): Call grub_util_read_at.
16279 (grub_util_write_image): Call grub_util_write_image_at.
16280 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16281 additional memory in kernel_img for a struct grub_module_info.
16282 Fill in that grub_module_info.
16283 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16284
458786f8 162852005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16286
16287 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16288 New function.
16289 * include/grub/powerpc/ieee1275/ieee1275.h
16290 (grub_ieee1275_milliseconds): New prototype.
16291 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16292 Change to 1000.
16293 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16294 grub_ieee1275_milliseconds.
16295
ac507d1b 162962005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16297
16298 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16299 variable.
16300 (find_options): New function.
16301 (cmain): Call find_options.
16302 * include/grub/powerpc/ieee1275/ieee1275.h
16303 (grub_ieee1275_realmode): New extern variable.
16304 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16305 grub_map if grub_ieee1275_realmode is false.
16306
6b8fd1c4 163072004-12-29 Marco Gerards <metgerards@student.han.nl>
16308
16309 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16310 lines are inserted and make it work like readline. Reported by
16311 Vincent Pelletier <subdino2004@yahoo.fr>.
16312
8514a1e0 163132004-12-28 Marco Gerards <metgerards@student.han.nl>
16314
16315 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16316
16317 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16318 `kern/powerpc/cache.S'.
16319
924b6140 163202004-12-27 Marco Gerards <metgerards@student.han.nl>
16321
16322 * genmk.rb: Handle the `Program' class in the main loop. Written
16323 by Johan Rydberg <jrydberg@gnu.org>.
16324 (Program): New class.
16325 (programs): New variable.
16326 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16327 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16328 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16329 (help_arch): Function removed.
16330 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16331 `powerpc/libgcc.h' and `loader.h'.
16332 (pkgdata_PROGRAMS): New variable.
16333 (sbin_UTILITIES): Variable removed.
16334 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16335 (grubof_SOURCES): Variable re-defined so it only includes the
16336 core functionality.
16337 (grubof_CFLAGS): Remove `-DGRUBOF'.
16338 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16339 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16340 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16341 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16342 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16343 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16344 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16345 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16346 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16347 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16348 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16349 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16350 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16351 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16352 (pc_mod_CFLAGS): New variables.
16353 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16354 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16355 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16356 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16357 Moved from here...
16358 * include/grub/i386/pc/init.h (grub_os_area_addr)
16359 (rub_os_area_size): ... to here.
16360 * include/grub/powerpc/ieee1275/ieee1275.h
16361 (grub_ieee1275_entry_fn): Export symbol.
16362 * include/grub/powerpc/ieee1275/init.h: New file.
16363 * include/grub/powerpc/libgcc.h: Likewise.
16364 * include/grub/cache.h: Likewise.
16365 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16366 <hollis@penguinppc.org>.
16367 * kern/dl.c: Include <grub/cache.h>.
16368 (grub_dl_flush_cache): New function.
16369 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16370 for this module.
16371 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16372 (grub_console_init): Removed prototypes.
16373 (grub_machine_init): Don't initialize the modules anymore.
16374 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16375 static.
16376 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16377 Macro undef removed.
16378 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16379 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16380 relocation `R_PPC_REL32'. Return an error when the relocation is
16381 unknown.
16382 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16383 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16384 * util/misc.c (grub_arch_sync_caches): Likewise.
16385
e4b47e0c 163862004-12-19 Marco Gerards <metgerards@student.han.nl>
16387
16388 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16389 `symlist.c', add `grubof_symlist.c'.
16390 (symlist.c): Variable removed.
16391 (grubof_HEADERS): Variable added.
16392 (grubof_symlist.c): New target.
16393 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16394 `kernel_img_HEADERS'.
16395 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16396 * kern/powerpc/dl.c: New file.
16397 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16398 Function removed.
16399 (grub_arch_dl_relocate_symbols): Likewise.
16400 (grub_register_exported_symbols): Likewise.
16401
4ceb3636 164022004-12-13 Marco Gerards <metgerards@student.han.nl>
16403
16404 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16405 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16406 to fail instead. Reported by Vincent Pelletier
16407 <subdino2004@yahoo.fr>.
16408
16409 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16410 it is not allocated. Reported by Vincent Pelletier
16411 <subdino2004@yahoo.fr>.
16412
16413 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16414 output so the output looks better.
f19dbdb7 16415
3f1578fe 164162004-12-04 Marco Gerards <metgerards@student.han.nl>
16417
16418 Modulize the partition map support and add support for the amiga
16419 partition map.
f19dbdb7 16420
3f1578fe 16421 * commands/ls.c: Include <grub/partition.h> instead of
16422 <grub/machine/partition.h>.
16423 * kern/disk.c: Likewise.
16424 * kern/rescue.c: Likewise.
16425 * loader/i386/pc/chainloader.c: Likewise.
16426 * normal/cmdline.c: Likewise.
16427 * kern/powerpc/ieee1275/init.c: Likewise.
16428 (grub_machine_init): Call `grub_pc_partition_map_init',
16429 `grub_amiga_partition_map_init' and
16430 `grub_apple_partition_map_init'.
16431 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16432 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16433 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16434 `partition.h' and `pc_partition.h'.
16435 (grub_setup_SOURCES): Remove
16436 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16437 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16438 (grub_emu_SOURCES): Likewise.
16439 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16440 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16441 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16442 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16443 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16444 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16445 (grubof_SOURCES): Likewise.
16446 * disk/i386/pc/partition.c: File removed.
16447 * disk/powerpc/ieee1275/partition.c: Likewise.
16448 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16449 * include/grub/i386/pc/partition.h: Likewise.
16450 * kern/partition.c: New file.
16451 * partmap/amiga.c: Likewise.
16452 * partmap/apple.c: Likewise.
16453 * partmap/pc.c: Likewise.
16454 * include/grub/partition.h: Likewise..
16455 * include/grub/pc_partition.h: Likewise.
16456 * util/grub-emu.c: Include <grub/partition.h> instead of
16457 <grub/machine/partition.h>.
16458 (main): Call `grub_pc_partition_map_init',
16459 `grub_amiga_partition_map_init' and
16460 `grub_apple_partition_map_init' and deinitialize afterwards.
16461 * util/i386/pc/biosdisk.c: Include `#include
16462 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16463 `<grub/machine/partition.h>'.
16464 * util/i386/pc/grub-setup.c: Likewise.
16465 * util/i386/pc/biosdisk.c: Likewise.
16466 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16467 partition information in case of a PC partition.
16468 * util/i386/pc/grub-setup.c: Include `#include
16469 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16470 `<grub/machine/partition.h>'.
16471 (setup): Only access the PC specific partition information in case
16472 of a PC partition.
16473
0ef4ced9 164742004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 16475
0ef4ced9 16476 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16477 (grub_longjmp): Likewise.
16478 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16479 20.
16480 * normal/powerpc/setjmp.S: New file.
16481 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16482 `normal/powerpc/setjmp.S'.
16483 (grubof_CFLAGS): Add `-DGRUBOF'.
16484 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16485 [GRUB_UTIL && !GRUBOF].
f19dbdb7 16486
19950e29 164872004-11-16 Marco Gerards <metgerards@student.han.nl>
16488
16489 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16490 property named `name'. Correctly handle the error returned by
16491 `grub_ieee1275_finddevice' if a device can not be opened.
16492
a2fea427 164932004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16494
16495 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16496 `actual' for negativity.
16497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16498 kern/fshelp.c.
16499
41ea0ea3 165002004-11-01 Marco Gerards <metgerards@student.han.nl>
16501
16502 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16503 (PAGE_OFFSET): New macro.
16504 (CRTC_ADDR_PORT): Likewise.
16505 (CRTC_DATA_PORT): Likewise.
16506 (START_ADDR_HIGH_REGISTER): Likewise.
16507 (START_ADDR_LOW_REGISTER): Likewise.
16508 (GRAPHICS_ADDR_PORT): Likewise.
16509 (GRAPHICS_DATA_PORT): Likewise.
16510 (READ_MAP_REGISTER): Likewise.
16511 (INPUT_STATUS1_REGISTER): Likewise.
16512 (INPUT_STATUS1_VERTR_BIT): Likewise.
16513 (page): New variable.
16514 (wait_vretrace): New function.
16515 (set_read_map): Likewise.
16516 (set_start_address): Likewise.
16517 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16518 the right page.
16519 (check_vga_mem): Take the page into account.
16520 (write_char): Likewise.
16521 (write_cursor): Likewise.
16522 (scroll_up): Likewise. Copy the page to the page that is not
16523 shown and switch between both pages.
16524 (grub_vga_putchar): Fix off by one error.
16525 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16526 account.
16527
ad0bd20b 165282004-11-01 Marco Gerards <metgerards@student.han.nl>
16529
16530 Add support for iso9660 (including rockridge).
f19dbdb7 16531
ad0bd20b 16532 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16533 (iso9660_mod_SOURCES): New variable.
16534 (iso9660_mod_CFLAGS): Likewise.
16535 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16536 * include/grub/fs.h (grub_iso9660_init): New prototype.
16537 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16538 * fs/iso9660.c: New file.
16539
16540 * include/grub/misc.h (grub_strncat): New prototype.
16541 * kern/misc.c (grub_strncat): New function.
f19dbdb7 16542
ad0bd20b 16543 * fs/hfs.c (grub_hfs_mount): Translate the error
16544 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16545 * fs/jfs.c (grub_jfs_mount): Likewise.
16546 * fs/ufs.c (grub_ufs_mount): Likewise.
16547
a5477a59 165482004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16549
16550 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16551 which initialized BAT registers.
16552 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16553 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16554 Move from here...
16555 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16556 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16557 ... to here.
16558 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16559 (grub_mapclaim): Likewise.
16560 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16561 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16562 hand.
16563
9304c1f8 165642004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16565
16566 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16567 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16568 -ffreestanding and -msoft-float.
16569
86f4ae25 165702004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16571
16572 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16573 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16574 set in grub_ieee1275_flags.
16575
38912228 165762004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16577
16578 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16579 prototype.
16580 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16581 grub_console_init first.
16582 Change the memory range used for grub_ieee1275_claim and
16583 grub_mm_init_region.
16584 Print an error message if the claim fails.
16585 Include <grub/misc.h>.
16586
d1923dc8 165872004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16588
16589 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16590 Call grub_children_iterate for device nodes of type `scsi',
16591 `ide', or `ata'.
16592 (grub_ofdisk_open): Remove manual device alias resolution.
16593 Fix memory leak when device cannot be opened.
f19dbdb7 16594 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 16595 (grub_children_iterate): New prototype.
16596 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16597 New function.
16598 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16599 Return -1 if args.size was -1.
16600
4512e4f3 166012004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16602
16603 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16604 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16605 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16606 Open Firmware's memory for it; claim memory from _start to _end.
16607 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16608 (_end): New extern.
16609 (_start): Zero BSS from __bss_start to _end.
16610 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16611 New extern.
16612 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16613
4d61feb0 166142004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16615
ad0bd20b 16616 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16617 -1 if args.base was -1.
4d61feb0 16618
026fa2f9 166192004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16620
16621 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16622 escape sequence instead of a literal ^L. Also call
16623 grub_ofconsole_gotoxy.
16624
9f2220ef 166252004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16626
16627 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16628 void * arguments to grub_addr_t. All callers updated. Also make
16629 the `result' argument optional.
16630 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16631 All callers updated.
16632
8a572cd7 166332004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16634
16635 * commands/ls.c (grub_ls_list_files): Use the string following the
16636 initial ')', if present, as the filesystem path.
16637 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16638
16639 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16640
18aa81f2 166412004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16642
16643 Make the source code of the menu interface more readable.
f19dbdb7 16644
18aa81f2 16645 * normal/menu.c: Include grub/mm.h.
16646 (TERM_WIDTH): New macro.
16647 (TERM_HEIGHT): Likewise.
16648 (TERM_INFO_HEIGHT): Likewise.
16649 (TERM_MARGIN): Likewise.
16650 (TERM_SCROLL_WIDTH): Likewise.
16651 (TERM_TOP_BORDER_Y): Likewise.
16652 (TERM_LEFT_BORDER_X): Likewise.
16653 (TERM_BORDER_WIDTH): Likewise.
16654 (TERM_MESSAGE_HEIGHT): Likewise.
16655 (TERM_BORDER_HEIGHT): Likewise.
16656 (TERM_NUM_ENTRIES): Likewise.
16657 (TERM_FIRST_ENTRY_Y): Likewise.
16658 (TERM_ENTRY_WIDTH): Likewise.
16659 (TERM_CURSOR_X): Likewise.
16660 (draw_border): Use macros instead of magic numbers.
16661 (print_entry): Likewise.
16662 (print_entries): Likewise.
16663 (run_menu): Likewise. Also, handle the key 'e'.
16664 (run_menu_entry): Ignore empty command lines.
16665 (print_message): Added a new argument EDIT. If EDIT is true,
16666 print a different message.
16667 (init_page): Likewise.
16668 (edit_menu_entry): New function. Not implemented yet.
16669
b47efe30 166702004-09-17 Marco Gerards <metgerards@student.han.nl>
16671
16672 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16673 can be loaded from normal mode.
f19dbdb7 16674
b47efe30 16675 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16676 `multiboot.mod'.
16677 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16678 (multiboot_mod_CFLAGS): New variables.
16679 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16680 * loader/i386/pc/multiboot_normal.c: Likewise.
16681
b47efe30 16682 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16683 attribute `unused'.
f19dbdb7 16684
b47efe30 16685 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16686 `fdiro' to read the mode information from instead of `diro'.
16687
16688 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16689 looking up a symlink.
16690
16691 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16692 macro.
16693 * normal/command.c (grub_command_execute): Don't parse the
16694 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16695 flags of the command.
16696
16697 * normal/menu.c (grub_menu_run): Fix typo.
16698
da75ac71 166992004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16700
16701 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16702
16703 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16704 `y + 1' instead of `y - 1'.
16705
16706 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16707
062b24c2 167082004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16709
16710 From Hollis Blanchard <hollis@penguinppc.org>:
16711 * kern/misc.c (memmove): New alias for grub_memmove.
16712 (memcmp): New alias for grub_memcmp.
16713 (memset): New alias for grub_memset.
f19dbdb7 16714 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16715 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16716 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16717 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16718
8ddad845 167192004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16720
16721 Added normal mode command `chainloader' as module chain.mod, which
16722 depends on normal.mod and _chain.mod.
f19dbdb7 16723
8ddad845 16724 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16725 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16726 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16727 Deleted prototype.
16728 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16729 but arguments parsing moved to ...
16730 (grub_chainloader_cmd): ... here. New function.
16731 * include/grub/i386/pc/chainloader.h: New file.
16732 * loader/i386/pc/chainloader_normal.c: Likewise.
16733
2c1f4ce3 167342004-09-11 Marco Gerards <metgerards@student.han.nl>
16735
16736 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16737 (grub_mkimage_LDFLAGS): Likewise.
16738 (grub_emu_SOURCES): Likewise.
16739 (kernel_img_HEADERS): Added fshelp.h.
16740 * fs/ext2.c: Include <grub/fshelp.h>.
16741 (FILETYPE_REG): New macro.
16742 (FILETYPE_INO_REG): Likewise.
16743 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16744 Changed all users.
16745 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16746 all users.
16747 (grub_fshelp_node): New struct.
16748 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16749 to a pointer.
16750 (grub_ext2_get_file_block): Removed function.
16751 (grub_ext2_read_block): New function.
16752 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16753 This function was written.
16754 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16755 (grub_ext2_find_file): Removed function.
16756 (grub_ext2_read_symlink): New function.
16757 (grub_ext2_iterate_dir): Likewise.
16758 (grub_ext2_open): Rewritten.
16759 (grub_ext2_dir): Rewritten.
16760 * include/grub/fshelp.h: New file.
16761 * fs/fshelp.c: Likewise.
16762
3c52136a 167632004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16764
16765 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16766 (print_message): Add a missing newline.
16767 (run_menu): Added timeout support.
16768 (run_menu_entry): New local function.
16769 (grub_menu_run): Added support for booting.
16770
16771 * kern/loader.c (grub_loader_is_loaded): New function.
16772
16773 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16774 (grub_get_rtc): Exported.
16775
16776 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16777 (grub_get_rtc): Exported.
16778
16779 * include/grub/normal.h (struct grub_command_list): Remove
16780 constant from the member `command'.
16781
16782 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16783
16784 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16785
16786 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16787
aa033560 167882004-08-28 Marco Gerards <metgerards@student.han.nl>
16789
16790 Add support for the JFS filesystem.
16791
16792 * fs/jfs.c: New file.
16793 * include/grub/fs.h (grub_jfs_init): New prototype.
16794 (grub_jfs_fini): New prototype.
16795 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16796 (grub_emu_SOURCES): Likewise.
16797 (pkgdata_MODULES): Add jfs.mod.
16798 (jfs_mod_SOURCES): New variable.
16799 (jfs_mod_CFLAGS): Likewise.
16800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16801 (grubof_SOURCES): Likewise.
16802 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16803
16804 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16805 endian to the host endian.
16806 (grub_fat_utf16_to_utf8): Move function from there...
16807 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16808 the endianness of the source string anymore.
aa033560 16809 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16810
94bc45af 168112004-08-24 Marco Gerards <metgerards@student.han.nl>
16812
16813 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16814 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16815 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16816 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16817
94bc45af 16818 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16819 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16820 for `node_found' and `it_dir'.
16821 (grub_hfs_dir): Add prototype for `dir_hook'.
16822
16823 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16824 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16825 and `indir32' to silence a gcc warning.
16826
16827 * include/grub/fs.h (grub_hfs_init): New prototype.
16828 (grub_hfs_fini): Likewise.
f19dbdb7 16829
16830
97543f08 168312004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16832
16833 Each disk device has its own id now. This is useful to make use
16834 of multiple disk devices.
f19dbdb7 16835
97543f08 16836 * include/grub/disk.h (grub_disk_dev_id): New enum.
16837 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16838 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16839
16840 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16841 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16842
16843 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16844 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16845
16846 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16847 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16848
16849 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16850 "id" which is used by the cache manager.
16851
16852 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16853 of just "GRUB".
16854
64372eb4 168552004-08-18 Marco Gerards <metgerards@student.han.nl>
16856
16857 * fs/hfs.c: New file.
16858 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16859 (grub_emu_SOURCES): Likewise.
16860 (pkgdata_MODULES): Add hfs.mod.
16861 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16862 (grubof_SOURCES): Likewise.
16863 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16864
16865 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16866 * kern/misc.c (grub_strncasecmp): Add function.
16867
cc61b58f 168682004-08-14 Marco Gerards <metgerards@student.han.nl>
16869
16870 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16871 with parentheses.
16872
16873 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16874 (grub_ext2_dir): In case the directory entry type is unknown, read
16875 it from the inode.
16876
0ef123f6 168772004-08-02 Peter Bruin <pjbruin@dds.nl>
16878
16879 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16880 grub_load_linux instead of grub_rescue_cmd_linux as second
16881 argument of grub_rescue_register_command.
16882
16883 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16884
a447c5df 168852004-07-27 Marco Gerards <metgerards@student.han.nl>
16886
16887 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16888 function.
16889 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16890 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16891 `loader/powerpc/ieee1275/linux.c',
16892 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16893 * include/grub/powerpc/ieee1275/ieee1275.h
16894 (grub_ieee1275_release): New prototype.
16895 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16896 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16897 normal, boot, linux and linux_normal.
16898 * loader/powerpc/ieee1275/linux.c: New file.
16899 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16900
5a9e3546 169012004-07-12 Marco Gerards <metgerards@student.han.nl>
16902
16903 * normal/arg.c (grub_arg_parse): Correct error handling after
16904 reallocating the argumentlist (check if `argl' is not null instead
16905 of checking if `args' is not null).
16906 * kern/mm.c (grub_realloc): Return the same pointer when using the
16907 same region, instead of returning the header address.
16908
e15199cb 169092004-07-11 Marco Gerards <metgerards@student.han.nl>
16910
16911 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16912 one block instead of two when looking for the initial partition.
16913 (grub_partition_probe): Initialize the local variable `p' with 0.
16914 Use base 10 for the grub_strtoul call.
16915 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16916 need for one local variable.
16917 (grub_strtoul): Don't add the new value to `num', instead of that
16918 just assign it.
16919
020616c2 169202004-07-11 Marco Gerards <metgerards@student.han.nl>
16921
16922 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16923 (pxeboot_img_SOURCES): New variable.
16924 (pxeboot_img_ASFLAGS): Likewise.
16925 (pxeboot_img_LDFLAGS): Likewise.
16926 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16927 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16928 <lode_leroy@hotmail.com>.
16929
6c51eb64 169302004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16931
16932 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16933 there was no input.
16934
cfb12aff 169352004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16936
16937 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16938 the history buffer logic.
16939
6eabba74 169402004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16941
16942 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16943 (FILETYPE_INO_SYMLINK): New macros.
16944 (grub_ext2_find_file): Check if the node is a directory using the
16945 inode stat information instead of using the filetype in the
16946 dirent. Exclude the first character of an absolute symlink.
16947 (grub_ext2_dir): Mask out the filetype part of the mode member of
16948 the inode.
16949
66e19ef8 169502004-05-24 Marco Gerards <metgerards@student.han.nl>
16951
16952 Add support for UFS version 1 and 2. Add support for the minix
16953 filesystem version 1 and 2, both the variants with 14 and 30 long
16954 filenames.
f19dbdb7 16955
66e19ef8 16956 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16957 fs/minix.c.
16958 (grub_emu_SOURCES): Likewise.
16959 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16960 (ufs_mod_SOURCES): New variable.
16961 (ufs_mod_CFLAGS): Likewise.
16962 (minix_mod_SOURCES): Likewise.
16963 (minix_mod_CFLAGS): Likewise.
16964 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16965 fs/minix.c.
16966 (grubof_SOURCES): Likewise.
16967 * fs/ufs.c: New file.
16968 * fs/minix.c: New file.
16969 * include/grub/fs.h (grub_ufs_init): New prototype.
16970 (grub_ufs_fini): Likewise.
16971 (grub_minix_init): Likewise.
16972 (grub_minix_fini): Likewise.
16973 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16974 minix fs.
16975
cc2e748a 169762004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16977
16978 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16979 commands/ls.c, commands/terminal.c, commands/boot.c,
16980 commands/cmp.c and commands/cat.c.
16981 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16982
16983 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16984 "env.h"
16985
4b13b216 169862004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16987
16988 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16989 and grub_, respectively. Because the conversion is trivial and
16990 mechanical, I omit the details here. Please refer to the CVS
16991 if you need more information.
16992
6a142551 169932004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16994
16995 * include/pupa: Renamed to ...
16996 * include/grub: ... this.
16997 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16998 * util/i386/pc/grub-mkimage.c: ... this.
16999 * util/i386/pc/pupa-setup.c: Renamed to ...
17000 * util/i386/pc/grub-setup.c: ... this.
17001 * util/pupa-emu.c: Renamed to ...
17002 * util/grub-emu.c: ... this.
17003
e56cdf21 170042004-03-29 Marco Gerards <metgerards@student.han.nl>
17005
17006 Add support for the newworld apple macintosh (PPC). This has been
17007 tested on the powerbook 2000 only. It only adds support for
17008 generic ieee1275 functions, console and disk support. This should
17009 be easy to port to other architectures with support for Open
17010 Firmware.
f19dbdb7 17011
e56cdf21 17012 * configure.ac: Accept the powerpc as host_cpu. In the case of
17013 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
17014 specific tests are only executed while building for the i386.
17015 Inverse test for crosscompile.
17016 * genmk.rb (Utility): Allow assembler files.
17017 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17018 * conf/powerpc-ieee1275.rmk: New file.
17019 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17020 * disk/powerpc/ieee1275/partition.c: Likewise.
17021 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17022 * include/pupa/powerpc/ieee1275/console.h: Likewise.
17023 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17024 * include/pupa/powerpc/ieee1275/time.h: Likewise.
17025 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17026 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17027 * include/pupa/powerpc/ieee1275/loader.h
17028 * include/pupa/powerpc/setjmp.h: Likewise.
17029 * include/pupa/powerpc/types.h: Likewise.
17030 * kern/powerpc/ieee1275/init.c: Likewise.
17031 * kern/powerpc/ieee1275/openfw.c: Likewise.
17032 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17033
17034 These files were written by Johan Rydberg
17035 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 17036
e56cdf21 17037 * boot/powerpc/ieee1275/cmain.c: New file.
17038 * boot/powerpc/ieee1275/crt0.S: Likewise.
17039 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17040 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17041
8c8cc205 170422004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17043
17044 * Makefile.in: Update copyright.
17045 * genmodsrc.sh: Likewise.
17046 * gensymlist.sh: Likewise.
17047 * term/i386/pc/vga.c: Indent correctly.
17048
17049 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17050 bugreporting address.
17051 * util/i386/pc/pupa-setup.c (usage): Likewise,
17052 (main): Call pupa_ext2_init and pupa_ext2_fini.
17053
f19dbdb7 17054 * fs/fat.c (log2): Renamed to ...
8c8cc205 17055 (fat_log2): ... this.
17056 All callers changed.
17057 * kern/misc.c (memcpy): Alias to pupa_memmove.
17058 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17059 lvalue cast.
17060 * util/console.c (pupa_ncurses_fini): Return 0.
17061
17062 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17063 Move fail label here.
17064 [__GNU__]: Don't warn when using stat.
17065 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17066 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17067 long int. Use strtol instead of strtoul.
f19dbdb7 17068
db1771cf 170692004-03-14 Marco Gerards <metgerards@student.han.nl>
17070
17071 * commands/boot.c: New file.
17072 * commands/cat.c: Likewise.
17073 * commands/cmp.c: Likewise.
17074 * commands/ls.c: Likewise.
17075 * commands/terminal.c: Likewise.
17076 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17077 (pupa_register_command): Changed interface to match the new
17078 argument parser.
17079 (pupa_command_execute): Changed (almost rewritten) so it uses
17080 pupa_split_command. Added support for setting variables using the
17081 syntax `foo=bar'.
17082 (rescue_command): Changed to work with the new argument parser.
17083 (terminal_command): Moved from here to commands/terminal.c.
17084 (set_command): New function.
17085 (unset_command): New function.
17086 (insmod_command): New function.
17087 (rmmod_command): New function.
17088 (lsmod_command): New function.
17089 (pupa_command_init): Don't initialize the command terminal
17090 anymore. Initialize the commands set, unset, insmod, rmmod and
17091 lsmod.
17092 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17093 (kernel_img_HEADERS): Add arg.h and env.h.
17094 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17095 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17096 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17097 normal/arg.c.
17098 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17099 terminal.mod.
17100 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17101 (boot_mod_SOURCES): New variable.
17102 (terminal_mod_SOURCES): Likewise.
17103 (ls_mod_SOURCES): Likewise.
17104 (cmp_mod_SOURCES): Likewise.
17105 (cat_mod_SOURCES): Likewise.
17106
17107 * normal/arg.c: New file.
17108 * kern/env.c: Likewise.
17109 * include/pupa/arg.h: Likewise.
17110 * include/pupa/env.h: Likewise.
17111 * font/manager.c (font_command): Changed to match argument parsing
17112 interface changes.
17113 (PUPA_MOD_INIT): Likewise.
17114 * hello/hello.c (pupa_cmd_hello): Likewise.
17115 (PUPA_MOD_INIT): Likewise.
17116 * include/pupa/disk.h: Include <pupa/device.h>.
17117 (pupa_print_partinfo): New prototype.
17118 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17119 (pupa_dl_get_prefix): Likewise.
17120 * include/pupa/misc.h: Include <pupa/err.h>.
17121 (pupa_isgraph): New prototype.
17122 (pupa_isdigit): Likewise.
17123 (pupa_split_cmdline): Likewise.
17124 * include/pupa/normal.h: Include <pupa/arg.h>.
17125 (pupa_command): Changed the prototype of the member `func' to
17126 match the argument parsing interface. Added member `options'.
17127 (pupa_register_command): Updated to match function.
17128 (pupa_arg_parse): New prototype.
17129 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17130 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17131 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17132 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17133 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17134 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17135 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17136 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17137 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17138 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17139 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17140 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17141 * kern/disk.c: Include <pupa/file.h>.
17142 (pupa_print_partinfo): New function.
17143 * kern/dl.c: Include <pupa/env.h>.
17144 (pupa_dl_dir): Variable removed.
17145 (pupa_dl_load): Use the environment variable `prefix' instead of
17146 the variable pupa_dl_dir.
17147 (pupa_dl_set_prefix): Function removed.
17148 (pupa_dl_get_prefix): Likewise.
17149 * kern/i386/pc/init.c: Include <pupa/env.h>.
17150 (pupa_machine_init): Use the environment variable `prefix' instead of
17151 using pupa_dl_set_prefix to set the prefix.
17152 * kern/main.c: Include <pupa/env.h>.
17153 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17154 using pupa_dl_get_prefix to get the prefix.
17155 * kern/misc.c: Include <pupa/env.h>.
17156 (pupa_isdigit): New function.
17157 (pupa_isgraph): Likewise.
17158 (pupa_ftoa): Likewise.
17159 (pupa_vsprintf): Added support for printing values of the type
17160 `double'. Make it possible to format variable output when using
17161 formatting like `%1.2%f'.
17162 (pupa_split_cmdline): New function.
17163 * kern/rescue.c: Include <pupa/env.h>.
17164 (next_word): Removed function.
17165 (pupa_rescue_cmd_prefix): Likewise.
17166 (pupa_rescue_cmd_set): New function.
17167 (pupa_rescue_cmd_unset): New function.
17168 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17169 split the command line instead of splitting it here. Added
17170 support for setting variables using the syntax `foo=bar'. Don't
17171 initialize the prefix command anymore. Initialized the set and
17172 unset commands.
17173 * normal/cmdline.c: Include <pupa/env.h>.
17174 (pupa_tab_complete): Added prototypes for print_simple_completion,
17175 print_partition_completion, add_completion, iterate_commands,
17176 iterate_dev, iterate_part and iterate_dir. Moved code to print
17177 partition information from here to kern/disk.c.
fe6b695a 17178 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 17179 * normal/main.c: Include <pupa/env.h>.
17180 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17181 instead of using pupa_dl_get_prefix to get the prefix.
17182 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17183 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17184 warning.
17185 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17186 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17187 ((unused))' to silence a gcc warning.
17188 (pupa_vga_setcolor): Likewise.
17189 (debug_command): Changed to match argument parsing
17190 interface changes.
17191 * util/pupa-emu.c: Include <pupa/env.h>.
17192 (options): Added 0's for unused fields to silence a gcc warning.
17193 (argp): Likewise.
17194 (main): Use the environment variable `prefix' instead of using
17195 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17196 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17197 and terminal.
17198
17199 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17200 * util/misc.c: Include <malloc.h>.
17201 (pupa_malloc): Rewritten so errors are correctly reported.
17202 (pupa_realloc): Likewise.
17203 (pupa_memalign): Likewise.
17204 (pupa_mm_init_region): Declare unused variables with
17205 `__attribute__ ((unused))' to silence a gcc warning.
17206 * normal/i386/setjmp.S: Remove tab at the end of the file to
17207 silence a gcc warning.
17208 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17209 variables with `__attribute__ ((unused))' to silence a gcc
17210 warning.
17211 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17212 local variable i unsigned to silence a gcc warning.
17213
17214 * kern/term.c: Include <pupa/misc.h>.
17215 (pupa_more_lines): New variable.
17216 (pupa_more): Likewise.
17217 (pupa_putcode): When the pager is active pause at the end of every
17218 screen.
17219 (pupa_set_more): New function.
17220 * include/pupa/term.h (pupa_set_more): New prototype.
17221
17222
3b1139cb 172232004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17224
17225 Now this project is GRUB 2 rather than PUPA. The location of
17226 the CVS repository was moved to GRUB's.
f19dbdb7 17227
3b1139cb 17228 * configure.ac: Use bug-grub as the reporting address.
17229 Use GRUB instead of PUPA.
17230 Change the version number to 1.90.
17231
8367695c 172322004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17233
17234 * genkernsyms.sh: Updated copyright information.
17235 * genmk.rb: Likewise.
17236 * genmodsrc.sh: Likewise.
17237 * gensymlist.sh: Likewise.
17238 * boot/i386/pc/boot.S: Likewise.
17239 * boot/i386/pc/diskboot.S: Likewise.
17240 * disk/i386/pc/biosdisk.c: Likewise.
17241 * disk/i386/pc/partition.c: Likewise.
17242 * font/manager.c: Likewise.
17243 * fs/ext2.c: Likewise.
17244 * fs/fat.c: Likewise.
17245 * include/pupa/boot.h: Likewise.
17246 * include/pupa/device.h: Likewise.
17247 * include/pupa/disk.h: Likewise.
17248 * include/pupa/dl.h: Likewise.
17249 * include/pupa/elf.h: Likewise.
17250 * include/pupa/err.h: Likewise.
17251 * include/pupa/file.h: Likewise.
17252 * include/pupa/font.h: Likewise.
17253 * include/pupa/fs.h: Likewise.
17254 * include/pupa/kernel.h: Likewise.
17255 * include/pupa/loader.h: Likewise.
17256 * include/pupa/misc.h: Likewise.
17257 * include/pupa/mm.h: Likewise.
17258 * include/pupa/net.h: Likewise.
17259 * include/pupa/normal.h: Likewise.
17260 * include/pupa/rescue.h: Likewise.
17261 * include/pupa/setjmp.h: Likewise.
17262 * include/pupa/symbol.h: Likewise.
17263 * include/pupa/term.h: Likewise.
17264 * include/pupa/types.h: Likewise.
17265 * include/pupa/i386/setjmp.h: Likewise.
17266 * include/pupa/i386/types.h: Likewise.
17267 * include/pupa/i386/pc/biosdisk.h: Likewise.
17268 * include/pupa/i386/pc/boot.h: Likewise.
17269 * include/pupa/i386/pc/console.h: Likewise.
17270 * include/pupa/i386/pc/init.h: Likewise.
17271 * include/pupa/i386/pc/kernel.h: Likewise.
17272 * include/pupa/i386/pc/linux.h: Likewise.
17273 * include/pupa/i386/pc/loader.h: Likewise.
17274 * include/pupa/i386/pc/memory.h: Likewise.
17275 * include/pupa/i386/pc/multiboot.h: Likewise.
17276 * include/pupa/i386/pc/partition.h: Likewise.
17277 * include/pupa/i386/pc/time.h: Likewise.
17278 * include/pupa/i386/pc/vga.h: Likewise.
17279 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17280 * include/pupa/util/getroot.h: Likewise.
17281 * include/pupa/util/misc.h: Likewise.
17282 * include/pupa/util/resolve.h: Likewise.
17283 * kern/device.c: Likewise.
17284 * kern/disk.c: Likewise.
17285 * kern/dl.c: Likewise.
17286 * kern/err.c: Likewise.
17287 * kern/file.c: Likewise.
17288 * kern/fs.c: Likewise.
17289 * kern/loader.c: Likewise.
17290 * kern/main.c: Likewise.
17291 * kern/misc.c: Likewise.
17292 * kern/mm.c: Likewise.
17293 * kern/rescue.c: Likewise.
17294 * kern/term.c: Likewise.
17295 * kern/i386/dl.c: Likewise.
17296 * kern/i386/pc/init.c: Likewise.
17297 * kern/i386/pc/lzo1x.S: Likewise.
17298 * kern/i386/pc/startup.S: Likewise.
17299 * loader/i386/pc/chainloader.c: Likewise.
17300 * loader/i386/pc/linux.c: Likewise.
17301 * loader/i386/pc/multiboot.c: Likewise.
17302 * normal/cmdline.c: Likewise.
17303 * normal/command.c: Likewise.
17304 * normal/main.c: Likewise.
17305 * normal/menu.c: Likewise.
17306 * normal/i386/setjmp.S: Likewise.
17307 * term/i386/pc/console.c: Likewise.
17308 * term/i386/pc/vga.c: Likewise.
17309 * util/console.c: Likewise.
17310 * util/genmoddep.c: Likewise.
17311 * util/misc.c: Likewise.
17312 * util/pupa-emu.c: Likewise.
17313 * util/resolve.c: Likewise.
17314 * util/unifont2pff.rb: Likewise.
17315 * util/i386/pc/biosdisk.c: Likewise.
17316 * util/i386/pc/getroot.c: Likewise.
17317 * util/i386/pc/pupa-mkimage.c: Likewise.
17318 * util/i386/pc/pupa-setup.c: Likewise.
17319
e6eced71 173202004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17321
17322 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17323 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17324 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17325 reading and reset it after reading.
17326 (pupa_ext2_close): Return PUPA_ERR_NONE.
17327
17328 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17329 Correct value.
17330 (struct linux_kernel_header): Add kernel_version and
17331 initrd_addr_max.
17332 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17333 pupa_file_read succeeds.
17334 (pupa_rescue_cmd_initrd): Implement.
17335
5aded270 173362003-12-03 Marco Gerards <metgerards@student.han.nl>
17337
17338 * fs/ext2.c (pupa_ext2_label): New function.
17339 (pupa_ext2_fs): Added label.
17340 * fs/fat.c (pupa_fat_label): New function.
17341 (pupa_fat_fs): Added label.
17342 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17343
17344 * kern/misc.c (pupa_strndup): New function.
17345 * include/pupa/misc.h (pupa_strndup): New prototype.
17346
17347 * include/pupa/normal.h: Include <pupa/err.h>.
17348 (pupa_set_history): New prototype.
17349 (pupa_iterate_commands): New prototype.
17350 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17351 <pupa/disk.h>, <pupa/file.h>.
17352 (hist_size): New variable.
17353 (hist_lines): Likewise.
17354 (hist_end): Likewise.
17355 (hist_used): Likewise.
17356 (pupa_set_history): New function.
17357 (pupa_history_get): Likewise.
17358 (pupa_history_add): Likewise.
17359 (pupa_history_replace): Likewise.
17360 (pupa_tab_complete): Likewise.
17361 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17362 completion shows partitionnames while completing partitions, this
17363 feature was suggested by Jeff Bailey.
17364 * normal/command.c (pupa_iterate_commands): New function.
17365 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17366 (pupa_normal_init): Initialize history buffer.
17367 (PUPA_MOD_INIT): Likewise.
17368 (pupa_normal_fini): Free the history buffer.
17369 (PUPA_MOD_FINI): Likewise.
17370
17371 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17372 key.
17373
17374 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17375 * configure.ac [i386]: Check for regparam bug.
17376 (NESTED_FUNC_ATTR) [! i386]: Defined.
17377
1f7315a3 173782003-11-17 Marco Gerards <metgerards@student.han.nl>
17379
17380 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17381 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17382 (pupa_emu_SOURCES): New variable.
17383 (pupa_emu_LDFLAGS): Likewise.
17384 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17385 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17386 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17387 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17388 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17389 (pupa_jmp_buf): New typedef.
17390 (pupa_setjmp) [PUPA_UTIL]: New macro.
17391 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17392 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17393 (pupa_refresh): New prototype.
17394 * include/pupa/util/getroot.h: New file.
17395 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17396 it.
17397 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17398 (pupa_rescue_cmd_cat): Likewise.
17399 (pupa_rescue_cmd_ls): Likewise.
17400 (pupa_rescue_cmd_testload): Likewise.
17401 (pupa_rescue_cmd_lsmod): Likewise.
17402 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17403 * normal/menu.c (run_menu): Likewise.
17404 * kern/term.c (pupa_cls): Likewise.
17405 (pupa_refresh): New function.
17406 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17407 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17408 * util/console.c: New file.
f19dbdb7 17409
1f7315a3 17410 * util/i386/pc/getroot.c: New file.
17411 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17412 (pupa_putchar): New function.
17413 (pupa_refresh): Likewise.
17414 (xgetcwd): Function moved to ...
17415 (strip_extra_slashes): Likewise.
17416 (get_prefix): Likewise.
f19dbdb7 17417 * util/i386/pc/getroot.c: ... here.
1f7315a3 17418 (find_root_device): Function moved and renamed to...
17419 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17420 Changed all callers.
17421 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17422 and renamed to...
17423 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17424 Changed all callers.
17425 * util/misc.c (pupa_memalign): New function.
17426 (pupa_mm_init_region): Likewise.
17427 (pupa_register_exported_symbols): Likewise.
17428 (pupa_putchar): Function removed.
17429 * util/pupa-emu.c: New file.
17430
9a5c1ade 174312003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17432
17433 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17434 (_multiboot_mod_SOURCES): New variable.
17435 (_multiboot_mod_CFLAGS): Likewise.
17436 * loader/i386/pc/multiboot.c: New file.
17437 * include/pupa/i386/pc/multiboot.h: Likewise.
17438 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17439 (pupa_multiboot_real_boot): New function.
17440 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17441 (pupa_multiboot_real_boot): New prototype.
17442 (pupa_rescue_cmd_multiboot): Likewise
17443 (pupa_rescue_cmd_module): Likewise.
17444
17445 * kern/loader.c (pupa_loader_set): Continue when
17446 pupa_loader_unload_func() fails.
17447 (pupa_loader_unset): New function.
17448 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17449
17450 * kern/misc.c (pupa_stpcpy): New function.
17451 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17452
8e72a9c0 174532003-11-12 Marco Gerards <metgerards@student.han.nl>
17454
17455 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17456 for available extensions.
17457
17458 * include/pupa/i386/pc/time.h: New file.
17459 * kern/disk.c: Include <pupa/machine/time.h>.
17460 (PUPA_CACHE_TIMEOUT): New macro.
17461 (pupa_last_time): New variable.
17462 (pupa_disk_open): Flush the cache when there was a timeout.
17463 (pupa_disk_close): Reset the timer.
17464 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17465 pupa_currticks.
17466 * util/misc.c: Include <sys/times.h>
17467 (pupa_get_rtc): New function.
17468
c4adbd32 174692003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17470
17471 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17472 as blocks.
17473 (pupa_ext2_get_file_block): Use blocks member.
17474
17475 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17476 first block. Return -1 instead of pupa_errno on error.
17477
bfd30f06 174782003-10-27 Marco Gerards <metgerards@student.han.nl>
17479
17480 * README: In the pupa-mkimage example use _chain instead of chain
17481 and ext2 instead of fat.
17482 * TODO: Replace ext2fs with jfs as an example. Add an item for
17483 adding journal playback for ext2fs.
17484 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17485 (pkgdata_MODULES): Added ext2.mod.
17486 (ext2_mod_SOURCES): New variable.
17487 (ext2_mod_CFLAGS): Likewise.
17488 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17489 * include/pupa/misc.h (pupa_strncpy): New prototype.
17490 (pupa_strcat): Likewise.
17491 (pupa_strncmp): Likewise.
17492 * kern/misc.c (pupa_strcat): Enable function.
17493 (pupa_strncpy): New function.
17494 (pupa_strncmp): Likewise.
17495 * fs/ext2.c: New file.
f19dbdb7 17496
bfd30f06 17497 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17498 when the read failed before retrying.
17499 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17500 (_FILE_OFFSET_BITS): Likewise.
17501 * configure.ac: Added AC_SYS_LARGEFILE.
17502
98d15063 175032003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17504
17505 * genmk.rb (PModule#rule): Make sure to get only symbol names
17506 from the output of nm.
17507 Reported by Robert Millan <zeratul2@wanadoo.es>.
17508
18d9c7cd 175092003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17510
17511 I forgot to check in these changes for a long time. This adds
17512 incomplete support for VGA console, and this is still very
17513 buggy. Also, a lot of consideration is required for I18N,
17514 UNICODE, and VGA font issues. Therefore, assume that this is
17515 such that "better than nothing".
f19dbdb7 17516
18d9c7cd 17517 * font/manager.c: New file.
17518 * include/pupa/font.h: Likewise.
17519 * include/pupa/i386/pc/vga.h: Likewise.
17520 * term/i386/pc/vga.c: Likewise.
17521 * util/unifont2pff.rb: Likewise.
17522
17523 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17524 (pkgdata_MODULES): Added vga.mod and font.mod.
17525 (vga_mod_SOURCES): New variables.
17526 (vga_mod_CFLAGS): Likewise.
17527 (font_mod_SOURCES): Likewise.
17528 (font_mod_CFLAGS): Likewise.
17529
17530 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17531
17532 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 17533 (struct pupa_term): Added init and fini.
18d9c7cd 17534 Changed the argument of putchar to pupa_uint32_t.
17535
17536 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17537 (pupa_console_real_putchar): New prototype.
17538 (pupa_console_putchar): Removed.
17539 (pupa_console_checkkey): Exported.
17540 (pupa_console_getkey): Likewise.
17541
17542 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17543 characters.
17544
17545 * kern/term.c (pupa_term_set_current): Rewritten.
17546 (pupa_putchar): Likewise.
17547 (pupa_putcode): New function.
17548
17549 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17550 (pupa_console_real_putchar): ... this.
17551 (pupa_vga_set_mode): New function.
17552 (pupa_vga_get_font): Likewise.
17553
17554 * normal/command.c: Include pupa/term.h.
17555 (terminal_command): New function.
17556 (pupa_command_init): Register the command "terminal".
17557
17558 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17559 (DISP_UP): Likewise.
17560 (DISP_RIGHT): Likewise.
17561 (DISP_DOWN): Likewise.
17562 (DISP_HLINE): Likewise.
17563 (DISP_VLINE): Likewise.
17564 (DISP_UL): Likewise.
17565 (DISP_UR): Likewise.
17566 (DISP_LL): Likewise.
17567 (DISP_LR): Likewise.
17568
17569 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 17570
977329f5 175712003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17572
17573 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17574 FIX. Reverse the path_list.
17575
17576 * include/pupa/normal.h: Export pupa_register_command and
17577 pupa_unregister_command.
17578
17579 * hello/hello.c (pupa_cmd_hello): New module.
17580 * conf/i386-pc.rmk: Added hello.mod.
17581
1f5ab428 175822003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17583
17584 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 17585
1f5ab428 17586 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17587 (compress_kernel): New variable.
17588 (generate_image): Heavily modified to support compressing a
17589 large part of the core image.
17590
17591 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17592 leak.
17593 (pupa_util_load_image): New function.
17594
17595 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17596 (pupa_compressed_size): New variable.
17597 (codestart): Enable Gate A20 here.
17598 Decompress the compressed part of the core image.
17599 Rearrange the code to put functions and variables which are
17600 required for initialization in the non-compressed part.
17601 Include lzo1x.S.
17602
17603 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17604 here.
17605
17606 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17607
f19dbdb7 17608 * include/pupa/i386/pc/kernel.h
1f5ab428 17609 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17610 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17611 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17612 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17613 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17614
17615 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17616
17617 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17618 (Utility#rule): Likewise.
17619
17620 * configure.ac: Check if LZO is available.
17621
ce5bf700 176222003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17623
17624 * include/pupa/normal.h: New file.
17625 * include/pupa/setjmp.h: Likewise.
17626 * include/pupa/i386/setjmp.h: Likewise.
17627 * normal/cmdline.c: Likewise.
17628 * normal/command.c: Likewise.
17629 * normal/main.c: Likewise.
17630 * normal/menu.c: Likewise.
17631 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17632
ce5bf700 17633 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17634 (pupa_rescue_cmd_initrd): Likewise.
17635
17636 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17637 Likewise.
17638
17639 * kern/i386/pc/startup.S (translation_table): New variable.
17640 (translate_keycode): New function.
17641 (pupa_console_getkey): Call translate_keycode.
17642
17643 * kern/rescue.c (attempt_normal_mode): New function.
17644 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17645 it failed, print a message.
17646
17647 * kern/mm.c (pupa_real_malloc): Print more information when a
17648 free magic is broken.
17649 (pupa_free): If the first free header is not free actually, set
17650 it to P.
17651
17652 * kern/main.c (pupa_load_normal_mode): Just load the module
17653 "normal".
17654 (pupa_main): Don't print the message
17655 "Entering into rescue mode..." here.
17656
17657 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17658 Declared.
17659 (pupa_rescue_cmd_initrd): Likewise.
17660 (pupa_rescue_cmd_initrd): Likewise.
17661
17662 * include/pupa/symbol.h (FUNCTION): Specify the type.
17663 (VARIABLE): Likewise.
17664
17665 * include/pupa/err.h (pupa_err_t): Added
17666 PUPA_ERR_UNKNOWN_COMMAND.
17667
17668 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17669 (pupa_dl_get_prefix): Likewise.
17670
17671 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17672 Added _chain.mod and _linux.mod instead of chain.mod and
17673 linux.mod.
17674 (chain_mod_SOURCES): Renamed to ...
17675 (_chain_mod_SOURCES): ... this.
17676 (chain_mod_CFLAGS): Renamed to ...
17677 (_chain_mod_CFLAGS): ... this.
17678 (linux_mod_SOURCES): Renamed to ...
17679 (_linux_mod_SOURCES): ... this.
17680 (linux_mod_CFLAGS): Renamed to ...
17681 (_linux_mod_CFLAGS): ... this.
17682 (normal_mod_SOURCES): New variable.
17683 (normal_mod_CFLAGS): Likewise.
17684 (normal_mod_ASFLAGS): Likewise.
17685
176862003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17687
17688 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17689 possible.
17690
fe6b695a 17691 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17692 recursively.
17693 (pupa_dl_unref): Unrefer depending modules recursively.
17694 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17695 a module is unloaded before one depending on that module is
17696 unloaded.
17697 (pupa_dl_unload): Unload depending modules explicitly,
17698 if possible.
17699
c04da074 177002003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17701
17702 * include/pupa/i386/pc/linux.h: New file.
17703 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17704
c04da074 17705 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17706 Removed.
17707 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17708 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17709 of PUPA_CHAINLOADER_BOOT_SECTOR.
17710
17711 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17712 (pupa_linux_prot_size): New variable.
17713 (pupa_linux_tmp_addr): Likewise.
17714 (pupa_linux_real_addr): Likewise.
17715 (pupa_linux_boot_zimage): New function.
17716 (pupa_linux_boot_bzimage): Likewise.
17717
17718 * kern/i386/pc/init.c (struct mem_region): New structure.
17719 (MAX_REGIONS): New macro.
17720 (mem_regions): New variable.
17721 (num_regions): Likewise.
17722 (pupa_os_area_addr): Likewise.
17723 (pupa_os_area_size): Likewise.
17724 (pupa_lower_mem): Likewise.
17725 (pupa_upper_mem): Likewise.
17726 (add_mem_region): New function.
17727 (compact_mem_regions): Likewise.
17728 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17729 the size of the conventional memory and that of so-called upper
17730 memory (before the first memory hole).
17731 Instead of adding each found region to free memory, use
17732 add_mem_region and add them after removing overlaps.
17733 Also, add only 1/4 of the upper memory to free memory. The rest
17734 is used for loading OS images. Maybe this is ad hoc, but this
17735 makes it much easier to relocate OS images when booting.
17736
17737 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17738 (pupa_enter_rescue_mode): Don't register initrd and module.
17739
17740 * kern/mm.c: Include pupa/dl.h.
17741
17742 * kern/main.c: Include pupa/file.h and pupa/device.h.
17743
17744 * kern/loader.c (pupa_loader_load_module_func): Removed.
17745 (pupa_loader_load_module): Likewise.
17746
17747 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17748 ``.o''.
17749
17750 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17751 (pupa_linux_tmp_addr): Likewise.
17752 (pupa_linux_real_addr): Likewise.
17753 (pupa_linux_boot_zimage): Likewise.
17754 (pupa_linux_boot_bzimage): Likewise.
17755
17756 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17757 (pupa_upper_mem): Likewise.
17758 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17759 module is too dangerous.
17760
17761 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17762 (pupa_os_area_size): Likewise.
17763 (pupa_loader_set): Remove the first argument. Loader doesn't
17764 manage modules or initrd any longer.
17765 (pupa_loader_load_module): Removed.
17766
17767 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17768 (linux_mod_SOURCES): New variable.
17769 (linux_mod_CFLAGS): Likewise.
17770
a13f9237 177712003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17772
17773 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17774 the length of a blocklist correctly.
17775
17776 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17777 Use ioctl only if the OS file is a block device.
17778 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17779 not very useful for normal files.
17780
17781 * kern/main.c (pupa_set_root_dev): New function.
17782 (pupa_load_normal_mode): Likewise.
17783 (pupa_main): Call those above.
17784
17785 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17786 pupa_uint16_t.
17787
17788 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17789
a5ffe966 177902003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17791
17792 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17793 (setup): Configure the installed partition information and the
17794 dl prefix.
17795
17796 * loader/i386/pc/chainloader.c (my_mod): New variable.
17797 (pupa_chainloader_unload): New function.
17798 (pupa_rescue_cmd_chainloader): Refer itself.
17799 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17800
17801 * kern/i386/pc/startup.S (install_partition): Removed.
17802 (version_string): Likewise.
17803 (config_file): Likewise.
17804 (pupa_install_dos_part): New variable.
17805 (pupa_install_bsd_part): Likewise.
17806 (pupa_prefix): Likewise.
17807 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17808
17809 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17810 and pupa/misc.h.
17811 (make_install_device): New function.
17812 (pupa_machine_init): Set the dl prefix.
17813
17814 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17815 (buf): Renamed to ...
17816 (linebuf): ... this.
17817 (pupa_rescue_cmd_prefix): New function.
17818 (pupa_rescue_cmd_insmod): Likewise.
17819 (pupa_rescue_cmd_rmmod): Likewise.
17820 (pupa_rescue_cmd_lsmod): Likewise.
17821 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17822 rmmod and lsmod.
17823
17824 * kern/mm.c (pupa_memalign): If failed even after invalidating
17825 disk caches, unload unneeded modules and retry.
17826
17827 * kern/misc.c (pupa_memmove): New function.
17828 (pupa_memcpy): Removed.
17829 (pupa_strcpy): New function.
17830 (pupa_itoa): Made static.
17831
17832 * kern/dl.c (pupa_dl_iterate): New function.
17833 (pupa_dl_ref): Likewise.
17834 (pupa_dl_unref): Likewise.
17835 (pupa_dl_unload): Return if succeeded or not.
17836 (pupa_dl_unload_unneeded): New function.
17837 (pupa_dl_unload_all): Likewise.
17838 (pupa_dl_init): Renamed to ...
17839 (pupa_dl_set_prefix): ... this.
17840 (pupa_dl_get_prefix): New function.
17841
17842 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17843 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17844 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17845 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17846 (pupa_install_dos_part): Declared.
17847 (pupa_install_bsd_part): Likewise.
17848 (pupa_prefix): Likewise.
17849 (pupa_boot_drive): Likewise.
17850
17851 * include/pupa/types.h: Fix a typo.
17852
17853 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17854 pupa_memmove.
17855 (pupa_memmove): Declared.
17856 (pupa_strcpy): Likewise.
17857
17858 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17859 pupa_mod_init takes one argument, its own module.
17860 (pupa_dl_unload_unneeded): Declared.
17861 (pupa_dl_unload_all): Likewise.
17862 (pupa_dl_ref): Likewise.
17863 (pupa_dl_unref): Likewise.
17864 (pupa_dl_iterate): Likewise.
17865 (pupa_dl_init): Renamed to ...
17866 (pupa_dl_set_prefix): ... this.
17867 (pupa_dl_get_prefix): Declared.
17868
17869 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 17870 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 17871 unloaded.
17872 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17873 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17874
17875 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17876 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17877
012d7999 178782003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17879
17880 * util/i386/pc/pupa-setup.c (setup): Define the internal
17881 function find_first_partition_start at the top level, because GCC
17882 3.0.x cannot compile internal functions in deeper scopes
17883 correctly.
17884 (find_root_device): Use lstat instead of stat.
17885 Don't follow symbolic links.
17886 Fix the path-constructing code.
17887
17888 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17889 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17890 by a BLKGETSIZE ioctl first, because block devices don't fill
17891 the member st_mode of the structure stat on Linux.
17892 [__linux__] (linux_find_partition): Use a temporary buffer
17893 REAL_DEV for the working space. Copy it to DEV before returning.
17894 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17895 buffer cache consistent.
17896 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17897 strncmp. The previous value was merely wrong.
17898 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17899
17900 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17901 FAT size is 12. The previous value was merely wrong.
17902
17903 * kern/main.c (pupa_main): Don't split the starting message from
17904 newlines.
17905
17906 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17907 LF, because BIOS goes crazy about character attributes in this
17908 case.
17909
1cc73a62 179102003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17911
17912 * include/i386/pc/util/biosdisk.h: New file.
17913 * util/i386/pc/biosdisk.c: Likewise.
17914 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 17915
1cc73a62 17916 * Makefile.in (INCLUDE_DISTFILES): Added
17917 include/pupa/i386/pc/util/biosdisk.h.
17918 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17919 directory util/i386/pc.
17920 (install-local): Added a rule for sbin_UTILITIES.
17921 (uninstall): Likewise.
17922
17923 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17924
17925 * util/misc.c (xrealloc): New function.
17926 (pupa_malloc): Likewise.
17927 (pupa_free): Likewise.
17928 (pupa_realloc): Likewise.
17929 (pupa_stop): Likewise.
17930 (pupa_putchar): Likewise.
17931
17932 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17933
17934 * include/pupa/util/misc.h (xrealloc): Declared.
17935
17936 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17937 macro.
17938 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17939 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17940
17941 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17942 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17943
17944 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17945 way should be implemented.
17946 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17947
17948 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17949 the size of NAME for safety.
17950 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17951 0x88.
17952
17953 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17954 (pupa_setup_SOURCES): Likewise.
17955
17956 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17957
08b70fe8 179582002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17959
17960 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17961 bunch of pushl's from pusha, because this destroys the return
17962 value.
17963
62ddcc8f 179642002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17965
17966 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17967 This means that any missing prototypes could be fatal. Also, you
17968 must take care when writing assembly code. See the comments at
17969 the beginning of startup.S, for more details.
f19dbdb7 17970
62ddcc8f 17971 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17972 compilation mechanism.
17973 (pupa_chainloader_real_boot): Likewise.
17974 (pupa_biosdisk_rw_int13_extensions): Likewise.
17975 (pupa_biosdisk_rw_standard): Likewise.
17976 (pupa_biosdisk_check_int13_extensions): Likewise.
17977 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17978 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17979 (pupa_get_memsize): Likewise.
17980 (pupa_get_mmap_entry): Likewise.
17981 (pupa_console_putchar): Likewise.
17982 (pupa_console_setcursor): Likewise.
17983 (pupa_getrtsecs): Use pushl instead of push.
17984
17985 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17986 memory instead of the stack for a mmap entry, because some
17987 BIOSes may ignore the maximum size and overflow.
17988
17989 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17990
17991 * genmk.rb (PModule#rule): Compile automatically generated
17992 sources with module-specific CFLAGS as well as other sources.
17993
9962ed99 179942002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17995
17996 * configure.ac: Check ld.
17997 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17998 respectively, before checking endianness and sizes.
17999
18000 * Makefile.in (LD): New variable.
f19dbdb7 18001
abdfc3c5 180022002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18003
18004 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18005
6a161fa9 180062002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
18007
18008 * Changelog: New file.
18009