]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-11-16 Felix Zielcke <fzielcke@z-51.de>
[grub2.git] / ChangeLog
CommitLineData
73fb3dd5
FZ
12009-11-16 Felix Zielcke <fzielcke@z-51.de>
2
3 * util/mkisofs/name.c (FDECL3): Use isascii macro instead of
4 relying that char is signed.
5
a691ca33
VS
62009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
7
8 * fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
9 blocksize different from specified.
10 (grub_pxefs_read): Likewise.
11
2af8f0f4
FZ
122009-11-16 Felix Zielcke <fzielcke@z-51.de>
13
14 Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
15
16 * disk/ata.c (grub_ata_dumpinfo): Add a cast.
17 (grub_ata_readwrite): Likewise. Update 2 format strings.
18 (grub_atapi_read): Likewise.
19
20 * conf/i386-coreboot.rmk (pkglib_MODULES): Move `ata.mod' from here ...
21 * conf/i386.rmk (pkglib_MODULES): ... to here ...
22 * conf/x86_64-efi.rmk (pkglib_MODULES): ... and here.
23 * conf/i386-coreboot.rmk (ata_mod_SOURCES, ata_mod_CFLAGS)
24 (ata_mod_LDFLAGS): Move from here ...
25 * conf/i386.rmk: ... to here ...
26 * conf/x86_64-efi.rmk: ... and here.
27 * conf/i386-pc.rmk (pkglib_MODULES): Remove `ata.mod'
28 (ata_mod_SOURCES, ata_mod_CFLAGS, ata_mod_LDFLAGS): Remove.
29
83bdecaf
RM
302009-11-16 Robert Millan <rmh.grub@aybabtu.com>
31
32 Relicense multiboot.h, with RMS' blessing.
33
34 * include/multiboot.h: Change to X11 license.
35
fd6fd3d7
RM
362009-11-15 Robert Millan <rmh.grub@aybabtu.com>
37
38 Support --version in grub-mkisofs.
39
40 * util/mkisofs/mkisofs.c (rcsid): Remove variable.
41 (OPTION_VERSION): New macro.
42 (ld_options): Recognize --version.
43 (usage): Move `program_name' from here ...
44 (program_name): ... to here. Add `static' qualifier.
45 (main): Recognize `OPTION_VERSION'.
46
16a88c49
FZ
472009-11-15 Felix Zielcke <fzielcke@z-51.de>
48
49 * Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
50 with `-nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)'.
51
a4158476
RM
522009-11-14 Robert Millan <rmh.grub@aybabtu.com>
53
54 Fix help2man generation for mkisofs.
55
56 * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
57 (usage): Send output to stdout (rather than stderr).
58
fc2208b0
RM
592009-11-14 Robert Millan <rmh.grub@aybabtu.com>
60
61 * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
62 `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
63 * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
64 `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
65 (bin_SCRIPTS): Add `grub-mkfloppy'.
66 (grub_mkfloppy_SOURCES): New variable.
67
68 * util/grub-mkrescue.in: New file.
69 * util/i386/pc/grub-mkfloppy.in: New file.
70
71 * util/i386/coreboot/grub-mkrescue.in: Remove.
72 * util/i386/pc/grub-mkrescue.in: Remove.
73
8d0edf4a
RM
742009-11-13 Robert Millan <rmh.grub@aybabtu.com>
75
76 * include/grub/multiboot.h (struct grub_multiboot_header): Move
77 from here ...
78 * include/multiboot.h (struct multiboot_header): ... to here. Update
79 all users.
80 * include/grub/multiboot.h (struct grub_multiboot_info): Move
81 from here ...
82 * include/multiboot.h (struct multiboot_info): ... to here. Update
83 all users.
84 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
85 from here ...
86 * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
87 Update all users.
88 * include/grub/multiboot.h (struct grub_mod_list): Move
89 from here ...
90 * include/multiboot.h (struct multiboot_mod_list): ... to here.
91 Update all users.
92
a73f5969
RM
932009-11-13 Robert Millan <rmh.grub@aybabtu.com>
94
95 * include/multiboot2.h (multiboot_word): Rename from this ...
96 (multiboot2_word): ... to this. Update all users.
97 (multiboot_header): Rename from this ...
98 (multiboot2_header): ... to this. Update all users.
99 (multiboot_tag_header): Rename from this ...
100 (multiboot2_tag_header): ... to this. Update all users.
101 (multiboot_tag_start): Rename from this ...
102 (multiboot2_tag_start): ... to this. Update all users.
103 (multiboot_tag_name): Rename from this ...
104 (multiboot2_tag_name): ... to this. Update all users.
105 (multiboot_tag_module): Rename from this ...
106 (multiboot2_tag_module): ... to this. Update all users.
107 (multiboot_tag_memory): Rename from this ...
108 (multiboot2_tag_memory): ... to this. Update all users.
109 (multiboot_tag_unused): Rename from this ...
110 (multiboot2_tag_unused): ... to this. Update all users.
111 (multiboot_tag_end): Rename from this ...
112 (multiboot2_tag_end): ... to this. Update all users.
113
1c8927f0
RM
1142009-11-13 Robert Millan <rmh.grub@aybabtu.com>
115
116 Disable Multiboot2 in i386-ieee1275. It didn't actually work, and on
117 this platform we should support Multiboot1 first.
118
119 * conf/i386-ieee1275.rmk (pkglib_MODULES): Remove `multiboot.mod'.
120 (multiboot_mod_SOURCES, multiboot_mod_CFLAGS)
121 (multiboot_mod_LDFLAGS, multiboot_mod_ASFLAGS): Remove.
122
6e1e0d89
RM
1232009-11-12 Robert Millan <rmh.grub@aybabtu.com>
124
125 * util/mkisofs/eltorito.c (init_boot_catalog): Handle return code
126 of write calls (converting them to fwrite() if they aren't already).
127 (get_torito_desc): Likewise.
128 * util/mkisofs/rock.c (generate_rock_ridge_attributes): Likewise.
129
7f2b34d8
RM
1302009-11-12 Robert Millan <rmh.grub@aybabtu.com>
131
132 * util/i386/pc/grub-install.in: Move from here ...
133 * util/grub-install.in: ... to here. Update all users.
134
c0ef3311
CW
1352009-11-11 Colin Watson <cjwatson@ubuntu.com>
136
137 * util/powerpc/ieee1275/grub-mkrescue.in: Fix --version output.
138
e1f240ff
RM
1392009-11-11 Robert Millan <rmh.grub@aybabtu.com>
140
141 Support for El Torito without floppy emulation.
142
143 * util/mkisofs/eltorito.c: Include `<errno.h>'.
144 (init_boot_catalog): Improve error handling.
145 (get_torito_desc): Don't use floppy emulation unless requested by
146 user. Patch boot information table when requested via
147 `-boot-info-table'.
148 * util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
149 * util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
150 (use_boot_info_table): New variables.
151 (OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
152 (OPTION_ELTORITO_EMUL_FLOPPY): New macros.
153 (ld_options): Handle `-boot-info-table', `-no-emul-boot' and
154 `--eltorito-emul-floppy'.
155 (main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
156 and `OPTION_ELTORITO_EMUL_FLOPPY'.
157 * util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
158 (use_boot_info_table, get_731): New prototypes.
159 * util/mkisofs/write.c (get_731): New function.
160
af7d4de5
FZ
1612009-11-11 Felix Zielcke <fzielcke@z-51.de>
162
163 Fix the generation of the man page.
164
165 * util/pc/i386/grub-install.in: Source
166 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
167
2c55dbc0
RM
1682009-11-11 Robert Millan <rmh.grub@aybabtu.com>
169
170 Large file support for grub-mkisofs.
171
172 * conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
173 * util/mkisofs/mkisofs.c (next_extent, last_extent)
174 (session_start): Upgrade type to `uint64_t'. Update all users.
175 * util/mkisofs/mkisofs.h: Include `<stdint.h>'.
176 (struct directory_entry): Upgrade type of `starting_block' and
177 `size' to `uint64_t'. Update all users.
178 (struct deferred): Remove unused structure.
179 (xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
180 Update all users.
181 * util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
182 file is larger than `UINT32_MAX'.
183 * util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
184 `size' to `uint64_t'. Update all users. Fix handling of fwrite()
185 return value.
186 (struct deferred_write): Upgrade type of `extent' and `size' to
187 `uint64_t'. Update all users.
188 (last_extent_written): Upgrade type to `uint64_t'. Update all
189 users.
190 (write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
191 Update all users. Upgrade type of `remain' to `int64_t' and
192 `use' to `size_t'. Use error() to handle fread() errors.
193 (write_files): Rely on write_one_file() rather than calling
194 xfwrite() directly.
195
6a9cead5
FZ
1962009-11-09 Felix Zielcke <fzielcke@z-51.de>
197
198 * util/mkisofs/mkisofs.c (ld_options): Fix a spelling mistake.
199
4825d790
RM
2002009-11-09 Robert Millan <rmh.grub@aybabtu.com>
201
202 * util/mkisofs/fnmatch.c: Remove.
203 * util/mkisofs/getopt1.c: Likewise.
204 * util/mkisofs/getopt.c: Likewise.
205 * conf/common.rmk (grub_mkisofs_SOURCES): Replace
206 `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and
207 `util/mkisofs/getopt.c' with `gnulib/fnmatch.c',
208 `gnulib/getopt1.c' and `gnulib/getopt.c'.
209 (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'.
210
211 * configure.ac: Detect `mingw32msvc' host_os.
212 Check for lstat(), getuid() and getgid().
213
214 * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all
215 instances of `u_char' with `uint8_t'.
216
217 * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'.
218 [!HAVE_GETUID] (getuid): New function (stub).
219 [!HAVE_GETGID] (getgid): Likewise.
220 [!HAVE_LSTAT] (lstat): Likewise.
221 [!S_IROTH] (S_IROTH): New macro (dummy).
222 [!S_IRGRP] (S_IRGRP): Likewise.
223
84b860d8
RM
2242009-11-09 Robert Millan <rmh.grub@aybabtu.com>
225
226 * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
227 conditional expression).
228
66e9b712
RM
2292009-11-09 Robert Millan <rmh.grub@aybabtu.com>
230
231 Import from Gnulib.
232
233 * gnulib/fnmatch.c: New file.
234 * gnulib/fnmatch.h: Likewise.
235 * gnulib/fnmatch_loop.c: Likewise.
236 * gnulib/getopt.c: Likewise.
237 * gnulib/getopt.h: Likewise.
238 * gnulib/getopt1.c: Likewise.
239 * gnulib/getopt_int.h: Likewise.
240 * gnulib/gettext.h: Likewise.
241
34f4a5b0
RM
2422009-11-09 Robert Millan <rmh.grub@aybabtu.com>
243
244 * normal/dyncmd.c (read_command_list): Replace `0' with `NULL'.
245 * normal/handler.c (read_handler_list): Likewise.
246
ac451143
RM
2472009-11-09 Robert Millan <rmh.grub@aybabtu.com>
248
249 Misc cleanup.
250
251 * kern/command.c (grub_register_command_prio): Use
252 grub_zalloc() instead of explicitly zeroing data.
253 * kern/list.c: Include `<grub/mm.h>'.
254 (grub_named_list_find): Replace `0' with `NULL'.
255 * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
256 (fs_module_list): Change type to `grub_named_list_t'. Update all
257 users.
258 * normal/dyncmd.c (read_command_list): Add space between function
259 call and parenthesis.
260 * normal/handler.c (read_handler_list): Likewise.
261
4089b167
RM
2622009-11-09 Robert Millan <rmh.grub@aybabtu.com>
263
264 * normal/auth.c (punishment_delay): Moved from here ...
265 (grub_auth_strcmp): ... to here (inside function).
266
325f5037
RM
2672009-11-09 Robert Millan <rmh.grub@aybabtu.com>
268
269 * include/grub/list.h (struct grub_named_list): Remove `const'
270 qualifier from `name'.
271 (struct grub_prio_list): Likewise.
272
7aea29a3
RM
2732009-11-09 Robert Millan <rmh.grub@aybabtu.com>
274
275 * normal/auth.c: Include `<grub/time.h>'.
276 (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
277
3fd6f044
RM
2782009-11-09 Robert Millan <rmh.grub@aybabtu.com>
279
280 * normal/auth.c (punishment_delay): New variable.
281 (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
282 (grub_auth_check_authentication): Punish failed login attempts with
283 an incremental (2^N) delay.
284
a4cd68e4
RM
2852009-11-09 Robert Millan <rmh.grub@aybabtu.com>
286
287 * conf/common.rmk (grub_mkisofs_CFLAGS): Prefix include
288 path with $(srcdir).
289
7ad12f43
VS
2902009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
291
292 * normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
293
c1129f03
RM
2942009-11-09 Robert Millan <rmh.grub@aybabtu.com>
295
296 * util/i386/coreboot/grub-mkrescue.in: New file.
297 * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
298 variables.
299
300 * conf/common.rmk (bin_UTILITIES): Add `grub-mkisofs'.
301 (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
302 * configure.ac: Add header and function checks to satisfy grub-mkisofs
303 requirements.
304 * util/mkisofs/defaults.h: New file.
305 * util/mkisofs/eltorito.c: Likewise.
306 * util/mkisofs/exclude.h: Likewise.
307 * util/mkisofs/fnmatch.c: Likewise.
308 * util/mkisofs/getopt.c: Likewise.
309 * util/mkisofs/getopt1.c: Likewise.
310 * util/mkisofs/hash.c: Likewise.
311 * util/mkisofs/include/fctldefs.h: Likewise.
312 * util/mkisofs/include/mconfig.h: Likewise.
313 * util/mkisofs/include/prototyp.h: Likewise.
314 * util/mkisofs/include/statdefs.h: Likewise.
315 * util/mkisofs/iso9660.h: Likewise.
316 * util/mkisofs/joliet.c: Likewise.
317 * util/mkisofs/match.c: Likewise.
318 * util/mkisofs/match.h: Likewise.
319 * util/mkisofs/mkisofs.c: Likewise.
320 * util/mkisofs/mkisofs.h: Likewise.
321 * util/mkisofs/multi.c: Likewise.
322 * util/mkisofs/name.c: Likewise.
323 * util/mkisofs/rock.c: Likewise.
324 * util/mkisofs/tree.c: Likewise.
325 * util/mkisofs/write.c: Likewise.
326
ec8bb77d
VS
3272009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
328
329 * normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
330 being insecure.
331
3716b12c
RM
3322009-11-08 Robert Millan <rmh.grub@aybabtu.com>
333
334 * util/i386/pc/grub-mkrescue.in: Fix miss-identification as
335 `grub-mkimage' (and use $0 when possible).
336
b97b7b91
RM
3372009-11-08 Robert Millan <rmh.grub@aybabtu.com>
338
339 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
340 error message for excessively large memory map.
341
04114812
RM
3422009-11-08 Robert Millan <rmh.grub@aybabtu.com>
343
344 * autogen.sh: Use `sh gendistlist.sh' to avoid reliing on
345 executable bit.
346
e4eb2373
RM
3472009-11-08 Robert Millan <rmh.grub@aybabtu.com>
348
349 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
350 message for coreboot users.
351
c926e1d5 3522009-11-07 Robert Millan <rmh.grub@aybabtu.com>
353
354 Fix build with GNU gold.
355
356 * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
357 (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
358 (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
359 link addresses.
360 * aclocal.m4: Likewise.
361
86e5b1db 3622009-11-04 Felix Zielcke <fzielcke@z-51.de>
363
364 * configure.ac (AC_PREREQ): Bump to 2.59d.
365 * INSTALL: Make it more clear when Autoconf and Ruby are
366 needed and when to run `./autogen.sh'.
367
246cd78f 3682009-11-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
369
370 * util/grub.d/30_os-prober.in: Restore default behavior for unsupported
371 OSes.
372
4f9dfb37 3732009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
374
375 * util/grub.d/30_os-prober.in: Add GNU/Hurd support
376
b82bd5e1 3772009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
378
379 * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
380 giving it to GNU Mach.
381
ff1a9bca 3822009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
383
384 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Subtract 1 from
385 GNU partition number to get internal GRUB partition number.
386
61697d9c 3872009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
388
389 * util/grub.d/10_hurd.in: Call prepare_grub_to_access_device
390 ${GRUB_DEVICE_BOOT} before loading /boot kernel.
391
a50569e1 3922009-11-01 Robert Millan <rmh.grub@aybabtu.com>
393
394 Based on patch from BVK Chaitanya <bvk.groups@gmail.com>
395 * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
396 case.
397
5b153867 3982009-11-01 Felix Zielcke <fzielcke@z-51.de>
399
400 * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
401
d9e2cd70 4022009-10-30 Robert Millan <rmh.grub@aybabtu.com>
403
404 Fix build problem.
405
406 * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
407 `-isystem=$(srcdir)/include'.
408
805111a4 4092009-10-30 Robert Millan <rmh.grub@aybabtu.com>
410
411 * util/i386/pc/grub-install.in: Remove hint that device.map should be
412 checked (grub-install doesn't currently rely on it).
413
fa6e945f 4142009-10-29 Robert Millan <rmh.grub@aybabtu.com>
415
416 Revert SVN r2660.
417
418 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
419 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
420 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
421 * conf/i386-ieee1275.rmk: Likewise.
422 * conf/i386-pc.rmk: Likewise.
423 * conf/powerpc-ieee1275.rmk: Likewise.
424 * conf/sparc64-ieee1275.rmk: Likewise.
425 * conf/x86_64-efi.rmk: Likewise.
426
cee15086 4272009-10-28 Robert Millan <rmh.grub@aybabtu.com>
428
429 * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
430
95b9239e 4312009-10-28 Robert Millan <rmh.grub@aybabtu.com>
432
433 * include/grub/misc.h: Stop checking for APPLE_CC.
434
2ed19dfd 4352009-10-28 Robert Millan <rmh.grub@aybabtu.com>
436
437 * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
438 doesn't cause an infinite call loop.
439
fdcdde19 4402009-10-28 Felix Zielcke <fzielcke@z-51.de>
441
442 * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
443 strings.
444
cefabfe1 4452009-10-26 Robert Millan <rmh.grub@aybabtu.com>
446
447 * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
448 variable.
449 * Makefile.in: Likewise.
450
ed96ab6d 4512009-10-26 Robert Millan <rmh.grub@aybabtu.com>
452
453 * gendistlist.sh: Simplify .svn check. Skip .bzr as well.
454
0579b753 4552009-10-26 Robert Millan <rmh.grub@aybabtu.com>
456
457 * Makefile.in (RMKFILES): Rewrite using $(wildcard).
458
478df409 4592009-10-26 Robert Millan <rmh.grub@aybabtu.com>
460
461 * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
462
083d1679 4632009-10-26 Robert Millan <rmh.grub@aybabtu.com>
464
465 * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
466 from here ...
467 * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
468
5947ae32 4692009-10-26 Robert Millan <rmh.grub@aybabtu.com>
470
471 * Makefile.in (docs/grub.info): Use make syntax to ignore errors
472 in $(MAKEINFO) invocation. This makes it clear in output that
473 errors are being ignored.
474
94180ff6 4752009-10-26 Robert Millan <rmh.grub@aybabtu.com>
476
477 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
478 from here ...
479 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
480 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
481 * conf/i386-ieee1275.rmk: Likewise.
482 * conf/i386-pc.rmk: Likewise.
483 * conf/powerpc-ieee1275.rmk: Likewise.
484 * conf/sparc64-ieee1275.rmk: Likewise.
485 * conf/x86_64-efi.rmk: Likewise.
486
9031b03a 4872009-10-26 Colin Watson <cjwatson@ubuntu.com>
488
489 * util/grub-editenv.c (main): If only a command is given, use
490 DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
491 (usage): FILENAME is now optional and has a default.
492
e4f6809b 4932009-10-26 Colin Watson <cjwatson@ubuntu.com>
494
495 Improve grub-mkconfig performance when there are several menu
496 entries on a single filesystem.
497
498 * util/grub.d/10_linux.in (linux_entry): Cache the output of
499 prepare_grub_to_access_device.
500 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
501 * util/grub.d/30_os-prober.in: Likewise.
502
67937d4d 5032009-10-26 Robert Millan <rmh.grub@aybabtu.com>
504
505 * util/grub.d/10_freebsd.in: Remove.
506 * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
507 * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
508
ee3756cc 5092009-10-26 Robert Millan <rmh.grub@aybabtu.com>
510
5c35048e 511 * docs/grub.cfg: Fix example usage of *BSD loaders.
ee3756cc 512
4dea1c6f 5132009-10-25 Robert Millan <rmh.grub@aybabtu.com>
514
515 * util/i386/pc/grub-setup.c (setup): Add missing parameter to
516 grub_util_error() call.
517
042484d7 5182009-10-25 Robert Millan <rmh.grub@aybabtu.com>
519
520 * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
521 `reserved_first_sector' member.
522 * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
523 `reserved_first_sector' to 1.
524 * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
525 * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
526 * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
527 * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
528 filesystems which begin at first sector.
529 (options): New option --skip-fs-probe.
530 (main): Handle --skip-fs-probe and pass it to setup().
531
d64448a7 5322009-10-25 Robert Millan <rmh.grub@aybabtu.com>
533
534 * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
535 (memset): Fix function prototype.
536
508d42ec 5372009-10-25 Robert Millan <rmh.grub@aybabtu.com>
5382009-10-25 Vasily Averin <vvs@parallels.com>
539
540 * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
541 `dirent.direntlen == 0'.
542
b240e30c 5432009-10-25 Robert Millan <rmh.grub@aybabtu.com>
544
545 * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
546 `cpio'.
547 [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
548
346e7fbe 5492009-10-25 Robert Millan <rmh.grub@aybabtu.com>
550
551 * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
552 `__trampoline_setup' and `__ucmpdi2'.
553 * include/grub/powerpc/libgcc.h: Only export symbols for functions
554 that libgcc provides.
555
cdb308b0 5562009-10-25 Robert Millan <rmh.grub@aybabtu.com>
557
558 * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
559 * include/grub/sparc64/libgcc.h (memset): Likewise.
560 * include/grub/misc.h (memset, memcmp): New function prototypes.
561
fb26abc2 5622009-10-25 Robert Millan <rmh.grub@aybabtu.com>
563
564 * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
565 `cpio'.
566 [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
567
f6693890 5682009-10-25 Robert Millan <rmh.grub@aybabtu.com>
569
570 Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
571 * docs/grub.cfg: Compensate for recent change in multiboot
572 loader (since 2009-08-14 it won't pass filename to payload).
573 * util/grub.d/10_hurd.in: Likewise.
574
0933cdc0 5752009-10-21 Felix Zielcke <fzielcke@z-51.de>
576
577 * config.guess: Update to latest version from config git
578 repository.
579 * config.sub: Likewise.
580
3b2fe8c2 5812009-10-20 Robert Millan <rmh.grub@aybabtu.com>
582
583 Fix build on sparc64.
584
585 * configure.ac: Perform checks for libgcc symbols before
586 adding `-nostdlib' to LDFLAGS.
587
46695a62 5882009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
589
590 Let user specify OpenBSD root device.
591
592 * loader/i386/bsd.c (openbsd_root): New variable.
593 (openbsd_opts): New option 'root'.
594 (OPENBSD_ROOT_ARG): New macro.
595 (grub_openbsd_boot): Use 'openbsd_root'.
596 (grub_cmd_openbsd): Fill 'openbsd_root'.
597
d2b6b7fc 5982009-10-16 Robert Millan <rmh.grub@aybabtu.com>
599
600 * NEWS: Misc adjustments.
601
421bd7ac 6022009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
603
604 * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
605
f1d29d87 6062009-10-16 Robert Millan <rmh.grub@aybabtu.com>
607
608 * configure.ac: Bump version to 1.97.
609
6f3cd880 6102009-10-16 Colin Watson <cjwatson@ubuntu.com>
611
612 * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
613 -mno-3dnow on x86 architectures. Some toolchains enable these
614 features by default, but they rely on registers that aren't enabled
615 in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
616
035f7122 6172009-10-15 Robert Millan <rmh.grub@aybabtu.com>
618
619 Make entry text a bit more readable.
620
621 * util/grub.d/10_linux.in: Add `with' before `Linux'.
622
44998e58 6232009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
624
625 * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
626
cd2851b3 6272009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
628
629 * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
630 operations.
631
c6f3b249 6322009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
633
634 * configure.ac: Add missing dollar.
635
6b5886ba 6362009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
637
638 Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
639
640 * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
641 * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
642 exports.
643 * include/grub/sparc64/libgcc.h: Likewise. Use
644 preprocessor conditionals.
645
e9d66f6d 6462009-10-14 Robert Millan <rmh.grub@aybabtu.com>
647
648 * conf/common.rmk (grub-dumpbios): Remove rule.
649 (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
650 * util/grub-dumpbios.in: Remove file.
651
9155bc17 6522009-10-14 Robert Millan <rmh.grub@aybabtu.com>
653
654 Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
655 the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
656
657 * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
658 from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
659 users.
660
661 (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
662 "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
663 to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
664 and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
665 users.
666
bf7f7a18 6672009-10-12 Robert Millan <rmh.grub@aybabtu.com>
668
669 * term/tparm.c: Switch to GPLv3.
670
86564c26 6712009-10-09 Robert Millan <rmh.grub@aybabtu.com>
672
673 * include/grub/i386/cpuid.h: Add header protection.
674
5c936493 6752009-10-09 Robert Millan <rmh.grub@aybabtu.com>
676
677 Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
678
679 * include/grub/i386/cpuid.h: New file.
680 * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
681 (has_longmode): Rename to ...
682 (grub_cpuid_has_longmode): ... this. Update all users. Remove
683 `static' attribute.
684 * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
685 (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
686 on a CPU that doesn't implement AMD64 instruction set.
687
186e7cf2 6882009-10-06 Colin Watson <cjwatson@ubuntu.com>
689
690 * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
691 that version.texi is rebuilt on version number changes.
692
83b65c4a 6932009-10-06 Colin Watson <cjwatson@ubuntu.com>
694
695 * Makefile.in: Don't set info_INFOS unless makeinfo was found.
696 Fixes bug #27602.
697
d244281c 6982009-10-06 Colin Watson <cjwatson@ubuntu.com>
699
700 * util/i386/pc/grub-install.in: Source
701 ${libdir}/grub/grub-mkconfig_lib before option processing, in order
702 that the --grub-probe option will work.
703 * util/sparc64/ieee1275/grub-install.in: Likewise.
704
da25306d 7052009-10-05 Robert Millan <rmh.grub@aybabtu.com>
706
707 * configure.ac: Bump version to 1.97~beta4.
708
e8ee83c0 7092009-10-03 Robert Millan <rmh.grub@aybabtu.com>
710
711 Resync grub-mkdevicemap in x86_64-efi.
712
713 * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
714 (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
715 `util/devicemap.c'.
716
50dcabcf 7172009-10-01 Colin Watson <cjwatson@ubuntu.com>
718
719 * util/grub-editenv.c (create_envblk_file): Write new block with a
720 .new suffix and then rename it into place, to ensure atomic
721 creation.
722
0e51c3a7 7232009-09-28 Robert Millan <rmh.grub@aybabtu.com>
724
725 Do not automatically install headers.
726
727 * Makefile.in (include_DATA): Remove. Update all users.
728
31299a95 7292009-09-26 Robert Millan <rmh.grub@aybabtu.com>
730
731 * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
732 (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
733
734 * util/osdetect.lua: Remove.
735 * script/lua/lauxlib.c: Likewise.
736 * script/lua/ldebug.c: Likewise.
737 * script/lua/grub_main.c: Likewise.
738 * script/lua/lauxlib.h: Likewise.
739 * script/lua/ldebug.h: Likewise.
740 * script/lua/ltablib.c: Likewise.
741 * script/lua/liolib.c: Likewise.
742 * script/lua/lstrlib.c: Likewise.
743 * script/lua/lualib.h: Likewise.
744 * script/lua/ldo.c: Likewise.
745 * script/lua/ldump.c: Likewise.
746 * script/lua/ldo.h: Likewise.
747 * script/lua/loslib.c: Likewise.
748 * script/lua/lundump.c: Likewise.
749 * script/lua/grub_lib.c: Likewise.
750 * script/lua/ldblib.c: Likewise.
751 * script/lua/lundump.h: Likewise.
752 * script/lua/lmem.c: Likewise.
753 * script/lua/grub_lib.h: Likewise.
754 * script/lua/lmathlib.c: Likewise.
755 * script/lua/lstate.c: Likewise.
756 * script/lua/ltm.c: Likewise.
757 * script/lua/lvm.c: Likewise.
758 * script/lua/lmem.h: Likewise.
759 * script/lua/lstate.h: Likewise.
760 * script/lua/ltm.h: Likewise.
761 * script/lua/ltable.c: Likewise.
762 * script/lua/lvm.h: Likewise.
763 * script/lua/llex.c: Likewise.
764 * script/lua/lgc.c: Likewise.
765 * script/lua/grub_lua.h: Likewise.
766 * script/lua/loadlib.c: Likewise.
767 * script/lua/lfunc.c: Likewise.
768 * script/lua/lopcodes.c: Likewise.
769 * script/lua/lparser.c: Likewise.
770 * script/lua/ltable.h: Likewise.
771 * script/lua/llex.h: Likewise.
772 * script/lua/lgc.h: Likewise.
773 * script/lua/lfunc.h: Likewise.
774 * script/lua/lbaselib.c: Likewise.
775 * script/lua/lopcodes.h: Likewise.
776 * script/lua/lparser.h: Likewise.
777 * script/lua/lzio.c: Likewise.
778 * script/lua/linit.c: Likewise.
779 * script/lua/lobject.c: Likewise.
780 * script/lua/llimits.h: Likewise.
781 * script/lua/lstring.c: Likewise.
782 * script/lua/lzio.h: Likewise.
783 * script/lua/lapi.c: Likewise.
784 * script/lua/lcode.c: Likewise.
785 * script/lua/lua.h: Likewise.
786 * script/lua/lobject.h: Likewise.
787 * script/lua/lstring.h: Likewise.
788 * script/lua/lapi.h: Likewise.
789 * script/lua/lcode.h: Likewise.
790 * script/lua/luaconf.h: Likewise.
791
cb8a2c38 7922009-09-26 Colin Watson <cjwatson@ubuntu.com>
793
794 * docs/grub.texi (Command-line and menu entry commands): Document
795 date and echo commands.
796
6b9b6276 7972009-09-24 Pavel Roskin <proski@gnu.org>
798
799 * include/grub/kernel.h (struct grub_module_header): Remove
800 `grub_module_header_types'. Make `type' unsigned. Make `size'
801 32-bit on all platforms.
802 * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
803 8-bit field. Use grub_host_to_target32() for `size'.
804 * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
805 * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
806 * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
807
4e5a02a7 8082009-09-24 Robert Millan <rmh.grub@aybabtu.com>
809
810 Fix "lost keypress" bug in at_keyboard.
811
812 * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
813 Checks for readyness of input buffer (without flushing it).
814 (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
815 than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
816
c6dcedf6 8172009-09-24 Robert Millan <rmh.grub@aybabtu.com>
818
819 * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
820 size check within GRUB_MACHINE_PCBIOS section.
821
74c958b1 8222009-09-24 Robert Millan <rmh.grub@aybabtu.com>
823
824 * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
825 return value.
826 * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
827 KEYBOARD_ISREADY check.
828 (grub_at_keyboard_checkkey): Rename to ...
829 (grub_at_keyboard_getkey_noblock): ... this. Update all users.
830 Remove gratuitous cast.
831
ff420223 8322009-09-23 Colin Watson <cjwatson@ubuntu.com>
833
834 * configure.ac: Call AC_PROG_MKDIR_P.
835 * Makefile.in (docs/stamp-vti): Create docs directory. Create
836 version.texi in $(builddir) rather than $(srcdir).
837 (docs/grub.info): Create docs directory. Prepend $(builddir)/docs
838 to makeinfo's @include search path.
839
d96875df 8402009-09-23 Felix Zielcke <fzielcke@z-51.de>
841
842 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
843
9b3f8365 8442009-09-23 Felix Zielcke <fzielcke@z-51.de>
845
846 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
847 for `*.dpkg-new'.
848
c44c90db 8492009-09-21 Colin Watson <cjwatson@ubuntu.com>
850
851 Build info documentation. Some code borrowed from Automake.
852
853 * configure.ac: Check for makeinfo.
854 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
855 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
856 docs/version.texi.
857 (MOSTLYCLEANFILES): Add vti.tmp.
858 (docs/version.texi, docs/stamp-vti): Update automatically.
859 (docs/grub.info): Build info documentation. Use --force and ignore
860 errors for now.
861 (all-local): Add $(INFOS).
862 (install-local): Install info files.
863 (uninstall): Uninstall info files.
864 * docs/version.texi: Remove from revision control. This file is
865 automatically generated on build now.
866 * gendistlist.sh: Add `*.info'.
867
e0b37bb5 8682009-09-21 Felix Zielcke <fzielcke@z-51.de>
869
870 * kern/term.c: Fix indentation.
871
5a78865b 8722009-09-21 Felix Zielcke <fzielcke@z-51.de>
873
874 * util/hostdisk.c: Fix a comment.
875
dace7e8a 8762009-09-20 Robert Millan <rmh.grub@aybabtu.com>
877
878 Fix regression introduced in r2539.
879
880 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
881 to 0xA1.
882
a83d079b 8832009-09-19 Colin Watson <cjwatson@ubuntu.com>
884
885 * util/grub.d/30_os-prober.in: Don't throw away stderr from
4cbbccec 886 os-prober. Under normal operation, it does not print anything to
887 stderr; if it does, we need to debug it, and throwing away stderr
888 makes that excessively difficult.
a83d079b 889
be94a509 8902009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
891
892 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
893
63f745e8 8942009-09-16 Robert Millan <rmh.grub@aybabtu.com>
895
896 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
897 AC_LANG_PROGRAM from autoconf.
898 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
899 prototypes (fixes warning).
900
901 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
902 `--disable-werror' was used.
903
bbb2a70f 9042009-09-16 Robert Millan <rmh.grub@aybabtu.com>
905
906 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
907 uninitialized `lastaddr'.
908
77c24f1d 9092009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
910
0f0b8c87 911 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
77c24f1d 912
07197f23 9132009-09-14 Colin Watson <cjwatson@ubuntu.com>
914
915 * commands/test.c (get_fileinfo): Return immediately if
916 grub_fs_probe fails.
917
dabf1798 9182009-09-14 José Martínez <xosemp@gmail.com>
919
920 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
921
d52109a7 9222009-09-14 Colin Watson <cjwatson@ubuntu.com>
923
924 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
925 output.
926
56532179 9272009-09-13 Robert Millan <rmh.grub@aybabtu.com>
928
929 * configure.ac: Remove --enable-grub-pe2elf. Only build
930 grub-pe2elf when needed by the build system itself.
931 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
932
8ef070f5 9332009-09-12 Robert Millan <rmh.grub@aybabtu.com>
934
935 * configure.ac: Bump version to 1.97~beta3.
936 * docs/version.texi: Likewise.
937
61229557 9382009-09-12 Robert Millan <rmh.grub@aybabtu.com>
939
940 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
941 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
942 from here ...
943 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
944 (grub_linux_setup_video): ... to here (with some adjustments).
945
5c9f8d84 9462009-09-12 Robert Millan <rmh.grub@aybabtu.com>
947
948 Fix memory corruption issue (spotted by Colin Watson).
949
950 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
951 causing returned size to be stored in an incorrect memory location.
952 Fix use of uninitialized value when storing the returned size.
953
e8f5d6e9 9542009-09-12 Yves Blusseau <blusseau@zetam.org>
955
956 Change clean rules to properly remove files
957
958 * genmk.rb: add new clean rules
959 * Makefile.in (clean): add the new targets
960 (mostlyclean): likewise
961
cda2a409 9622009-09-11 Colin Watson <cjwatson@ubuntu.com>
963
964 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
965 to grub_uint64_t.
966 * fs/ntfs.c (init_file): Understand 64-bit sizes for
967 non-resident files.
968
86695375 9692009-09-11 Colin Watson <cjwatson@ubuntu.com>
970
971 * configure.ac: Don't look for help2man when cross-compiling. Fixes
972 part of bug #27349.
973
8aa1541a 9742009-09-10 Felix Zielcke <fzielcke@z-51.de>
975
976 * util/grub-mkconfig.in: Make the created config mode 400 and
977 print a warning if it fails.
978
48d9bb0a 9792009-09-10 Robert Millan <rmh.grub@aybabtu.com>
980
981 * util/grub.d/40_custom.in: Ask user to type custom entries below
982 comment, rather than below 'exec tail' line.
983
3b0521be 9842009-09-10 Colin Watson <cjwatson@ubuntu.com>
985
986 * util/grub.d/40_custom.in: Make sure that the explanatory text is
987 visible in grub.cfg.
988
50051d55 9892009-09-10 Colin Watson <cjwatson@ubuntu.com>
990
991 * util/grub.d/40_custom.in: Make it a little clearer how to use this
992 file.
993
c0d34387 9942009-09-10 Felix Zielcke <fzielcke@z-51.de>
995
996 * docs/grub.cfg: Add an example menu entry for memtest86+.
997
80a608f3 9982009-09-09 Felix Zielcke <fzielcke@z-51.de>
999
a2094832 1000 * config.guess: Update to latest version from config git.
80a608f3 1001 * config.sub: Likewise.
1002
99423078 10032009-09-08 Colin Watson <cjwatson@ubuntu.com>
1004
1005 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
1006 unknown-command case. Fixes bug #27320.
1007
44454e4c 10082009-09-08 Felix Zielcke <fzielcke@z-51.de>
1009
1010 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
1011 `help' if the command exists.
1012
e30d87ad 10132009-09-06 Robert Millan <rmh.grub@aybabtu.com>
1014
1015 * INSTALL: Require GCC 4.1.3 or later.
1016
9a86f1ec 10172009-09-06 Yves Blusseau <blusseau@zetam.org>
1018
1019 * Makefile.in (RMKFILES): add i386-qemu.rmk
1020 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
1021 $(srcdir)/stamp-h.in
1022
7f26d466 10232009-09-05 Robert Millan <rmh.grub@aybabtu.com>
1024
1025 * util/grub-probe.c (probe): Comment out buggy codepath, which
1026 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
1027 should be re-enabled after 1.97.
1028
3a613259 10292009-09-05 Felix Zielcke <fzielcke@z-51.de>
1030
1031 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
1032 find searches for.
1033
197f76c7 10342009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
1035
1036 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
1037 unnecessary calls to grub_error.
1038
70ba68ce 10392009-09-04 Colin Watson <cjwatson@ubuntu.com>
1040
1041 * NEWS: Mention `keystatus' and Unicode fonts.
1042
4ff0d7a4 10432009-09-04 Robert Millan <rmh.grub@aybabtu.com>
1044
1045 * configure.ac: Bump version to 1.97~beta2.
1046 * docs/version.texi: Likewise.
1047
77c55a87 10482009-09-03 Colin Watson <cjwatson@ubuntu.com>
1049
1050 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
1051 containing unwind information in some cases where it previously did
1052 not. Use -fno-dwarf2-cfi-asm if available to restore the old
1053 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
1054 discussion.
1055
f79572cd 10562009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
1057
1058 Embedding loadenv module into grub-emu
1059
1060 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
1061 commands/loadenv.c
1062 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
1063 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
1064 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
1065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
1066 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
1067 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
1068
93a81088 10692009-09-03 Magnus Granberg <zorry@ume.nu>
1070
1071 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
1072 include -fPIE in the default specs.
1073 * configure.ac: Check if pie_possible is yes and add -fno-PIE
1074 to TARGET_CFLAGS.
1075
160034b2 10762009-09-03 Felix Zielcke <fzielcke@z-51.de>
1077
1078 * INSTALL: Note that GNU Bison 2.3 or later is required.
1079
087c07c4 10802009-09-03 Colin Watson <cjwatson@ubuntu.com>
1081
1082 * kern/i386/pc/startup.S: Fix typo.
1083
cbf978c0 10842009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
1085
1086 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
1087 according to GCS.
1088
10892009-09-02 Colin Watson <cjwatson@ubuntu.com>
f0910644 1090
1091 * docs/grub.texi (Naming convention): Describe one-based partition
1092 numbering.
1093 (Device syntax): Likewise.
1094 (File name syntax): Likewise.
1095 (Block list syntax): Likewise.
1096 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
1097 menu.lst.
1098 (File name syntax): Likewise.
1099 (Command-line and menu entry commands): Document acpi, blocklist,
1100 crc, export, insmod, keystatus, ls, set, and unset commands.
1101
f3e8cdfd 11022009-09-02 Colin Watson <cjwatson@ubuntu.com>
1103
1104 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
1105 to avoid implying that only one of --shift, --ctrl, or --alt may be
1106 used.
1107
c0bc232b 11082009-09-02 Colin Watson <cjwatson@ubuntu.com>
1109
1110 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
1111 rather than comparing against S_IFREG, which will almost never work.
1112
aa0f752d 11132009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
1114
1115 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
1116 (write_blocklists): Likewise.
1117
ecb3166a 11182009-09-01 Colin Watson <cjwatson@ubuntu.com>
1119
1120 * script/lua/grub_lua.h (fputs): Supply a format string as the first
1121 argument to grub_printf.
1122
c403a125 11232009-09-01 Felix Zielcke <fzielcke@z-51.de>
31aba781 1124
1125 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
c403a125 1126 non GNU test.
31aba781 1127
b5e7312c 11282009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1129
1130 * kern/file.c (grub_file_read): Spelling fix
1131
fe00f472 11322009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1133
1134 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
1135 loading of headers in some cases.
1136
cc55302e 11372009-08-30 Robert Millan <rmh.grub@aybabtu.com>
1138
1139 * configure.ac: Bump version to 1.97~beta1.
1140 * docs/version.texi: Likewise.
1141
5c90cdd2 11422009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
64bf71d0 1143
1144 * include/grub/i386/xnu.h: Add license header.
1145 include grub/err.h explicitly.
1146
c90edae4 11472009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1148
1149 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
1150 to `ufs' in the vfs.root.mountfrom kernel parameter.
1151
d8888b5c 11522009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1153
1154 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
1155
1156 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
1157 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
1158
1159 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
1160 `ARRAY_SIZE' macro.
1161
6f07b921 11622009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1163
1164 * kern/file.c (grub_file_read): Check offset.
1165 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
1166 * fs/jfs.c (grub_jfs_read_file): Likewise.
1167 * fs/ntfs.c (grub_ntfs_read): Likewise.
1168 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
1169 * fs/minix.c (grub_minix_read_file): Correct offset check.
1170 * fs/ufs.c (grub_ufs_read_file): Likewise.
1171
b4f34077 11722009-08-28 Colin Watson <cjwatson@ubuntu.com>
1173
1174 * term/i386/pc/console.c (bios_data_area): Cast
1175 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
1176
e7c69859 11772009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1178
1179 1-bit optimised blitters.
1180
1181 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
1182 prototype.
1183 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1184 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1185 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1186 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1187 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1188 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1189 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
1190 function.
1191 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1192 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1193 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1194 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1195 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1196 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1197 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
1198 when possible.
1199 * video/video.c (grub_video_get_blit_format): Return
1200 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
1201
a57da43f 12022009-08-28 Colin Watson <cjwatson@ubuntu.com>
1203
1204 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
1205 the first argument to grub_printf.
1206
4cbe67e5 12072009-08-28 Colin Watson <cjwatson@ubuntu.com>
12082009-08-28 Robert Millan <rmh.grub@aybabtu.com>
1209
1210 Add `getkeystatus' terminal method. Add a new `keystatus' command
1211 to query it.
1212
1213 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
1214 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
1215 modifier key bitmasks.
1216 (struct grub_term_input): Add `getkeystatus' member.
1217 (grub_getkeystatus): Add prototype.
1218 * kern/term.c (grub_getkeystatus): New function.
1219
1220 * include/grub/i386/pc/memory.h
1221 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
1222 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
1223 Data Area layout.
1224 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
1225 (grub_console_term_input): Set `getkeystatus' member.
1226 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
1227 constants.
1228 (grub_usb_keyboard_getreport): Likewise.
1229 (grub_usb_keyboard_checkkey): Likewise.
1230 (grub_usb_keyboard_getkeystatus): New function.
1231 (grub_usb_keyboard_term): Set `getkeystatus' member.
1232
1233 * commands/keystatus.c: New file.
1234 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
1235 (keystatus_mod_SOURCES): New variable.
1236 (keystatus_mod_CFLAGS): Likewise.
1237 (keystatus_mod_LDFLAGS): Likewise.
1238 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
1239 commands/keystatus.c.
1240 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1241 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1242 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1244 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1245 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4cbe67e5 1246
6e2a9085 12472009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1248
1249 Split befs.mod and afs.mod into *_be.mod and *.mod
1250
1251 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
1252 (grub_fstest_SOURCES): Likewise.
1253 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
1254 (afs_be_mod_SOURCES): New variable.
1255 (afs_be_mod_CFLAGS): Likewise.
1256 (afs_be_mod_LDFLAGS): Likewise.
1257 (befs_be_mod_SOURCES): Likewise.
1258 (befs_be_mod_CFLAGS): Likewise.
1259 (befs_be_mod_LDFLAGS): Likewise.
1260 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
1261 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1262 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1263 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1264 (grub_emu_SOURCES): Likewise.
1265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1266 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1267 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1268 * fs/afs_be.c: New file.
1269 * fs/befs_be.c: New file.
1270 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
1271 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
1272 (U16): Replaced with ...
1273 (grub_afs_to_cpu16): ...this. All users updated.
1274 (U32): Replaced with ...
1275 (grub_afs_to_cpu32): ...this. All users updated.
1276 (U64): Replaced with ...
1277 (grub_afs_to_cpu64): ...this. All users updated.
1278 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
1279 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
ad8ea1f4 1280 (grub_afs_validate_sblock): Check only one endianness.
6e2a9085 1281 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1282 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1283 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1284 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1285 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1286 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1287 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1288 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1289
32a71655 12902009-08-26 Bean <bean123ch@gmail.com>
1291
1292 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
1293 64-bit number.
1294 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
1295 (grub_xfs_inode_block): Change return type to grub_uint64_t.
1296 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
1297
552bf6c5 12982009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1299
1300 NetBSD memory map support.
1301
1302 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
1303 (grub_netbsd_btinfo_mmap_header): New structure.
1304 (grub_netbsd_btinfo_mmap_entry): Likewise.
1305 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
1306
1ae2078c 13072009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1308
1309 Enable bsd.mod on coreboot.
1310
1311 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
1312 (bsd_mod_SOURCES): New variable.
1313 (bsd_mod_CFLAGS): Likewise.
1314 (bsd_mod_LDFLAGS): Likewise.
1315 (bsd_mod_ASFLAGS): Likewise.
1316 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
1317 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
1318
beefc598 13192009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1320
1321 Cleanup NetBSD root support.
1322
1323 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
1324 grub_bsd_get_device.
1325 Fix typo.
1326
3b76e68b 13272009-08-25 Felix Zielcke <fzielcke@z-51.de>
1328
1329 * util/grub.d/00_header.in: Move check for the video backend of
1330 gfxterm from here ...
1331 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
1332 a suitable video backend.
1333
aea664ea 13342009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1335
1336 Fix breakage in grub-setup.
1337
1338 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
1339 "msdos_partition_map".
1340
ff747d50 13412009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1342
1343 Fix breakage in normal/auth.c.
1344
1345 * normal/auth.c (grub_iswordseparator): New function.
1346
e7e1f93f 13472009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1348
1349 Authentication support.
1350
1351 * commands/password.c: New file.
1352 * conf/common.rmk (pkglib_MODULES): Add password.mod.
1353 (password_mod_SOURCES): New variable.
1354 (password_mod_CFLAGS): Likewise.
1355 (password_mod_LDFLAGS): Likewise.
1356 (normal_mod_SOURCES): Add normal/auth.c.
1357 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
1358 normal/auth.c.
1359 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1360 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1361 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1363 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1364 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1365 * include/grub/auth.h: New file.
1366 * include/grub/err.h (grub_err_t): New enum value
1367 GRUB_ERR_ACCESS_DENIED.
1368 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
1369 'users'.
1370 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
1371 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
1372 users updated.
1373 * normal/auth.c: New file.
1374 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
1375 (grub_cmdline_run): Don't allow to go to command line without
1376 authentication.
1377 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
1378 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
1379 menuentry without superuser rights.
1380 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
1381 user isn't a superuser.
1382
70f1161d 13832009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1384
1385 Save space by inlining misc.c functions.
1386
1387 * kern/misc.c (grub_iswordseparator): Made static.
1388 * kern/misc.c (grub_strcat): Moved from here ...
1389 * include/grub/misc.h (grub_strcat): ... here. Inlined.
1390 * kern/misc.c (grub_strncat): Moved from here ...
1391 * include/grub/misc.h (grub_strncat): ... here. Inlined.
1392 * kern/misc.c (grub_strcasecmp): Moved from here ...
1393 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
1394 * kern/misc.c (grub_strncasecmp): Moved from here ...
1395 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
1396 * kern/misc.c (grub_isalpha): Moved from here ...
1397 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
1398 * kern/misc.c (grub_isdigit): Moved from here ...
1399 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
1400 * kern/misc.c (grub_isgraph): Moved from here ...
1401 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
1402 * kern/misc.c (grub_tolower): Moved from here ...
1403 * include/grub/misc.h (grub_tolower): ... here. Inlined.
1404
48e40bff 14052009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1406
1407 * script/sh/function.c (grub_script_function_find): Cut error message
1408 not to flood terminal.
1409 * script/sh/lexer.c (grub_script_yylex): Remove command line length
1410 limit.
1411 * script/sh/script.c (grub_script_arg_add): Duplicate string.
1412
c385bfc3 14132009-08-24 Colin Watson <cjwatson@ubuntu.com>
1414
1415 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
1416 `report' grub_uint8_t *.
1417 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
1418 Use a 50-millisecond timeout rather than just repeating
1419 grub_usb_keyboard_getreport 50 times.
1420 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
1421
2d21e3e8 14222009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1423
1424 Rename *_partition_map to part_*
1425
1426 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
1427 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
1428 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
1429 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
1430 All users updated.
1431 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
1432 All users updated.
1433 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
1434 * util/grub-probe.c (probe_partmap): Don't transform partition name
1435 to get module name.
1436
dd103c4e 14372009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1438
1439 Fix OpenBSD and NetBSD support.
1440
1441 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
1442 memory address conflict.
1443 (OPENBSD_MMAP_ACPI): New definition.
1444 (OPENBSD_MMAP_NVS): Likewise.
1445 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
1446 and OPENBSD_MMAP_NVS.
1447 Add memory map terminator
1448 Explicit cast when calling grub_unix_real_boot.
ad8ea1f4 1449 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
dd103c4e 1450
16c84d74 14512009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1452
1453 Let user specify NetBSD root device.
1454
1455 * loader/i386/bsd.c (netbsd_root): New variable.
1456 (netbsd_opts): New option 'root'.
1457 (NETBSD_ROOT_ARG): New macro.
1458 (grub_netbsd_boot): Use 'netbsd_root'.
1459 (grub_bsd_unload): Free 'netbsd_root'.
1460 (grub_cmd_netbsd): Fill 'netbsd_root'.
1461
adb29902 14622009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1463
1464 Support for 64-bit NetBSD.
1465
1466 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
1467 point when booting non-FreeBSD.
1468
f5ae9f74 14692009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1470
1471 Support --no-smp and --no-acpi for NetBSD.
1472
1473 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
1474 (NETBSD_AB_NOACPI): Likewise.
1475 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
1476 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
1477
de74f136 14782009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1479
1480 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
1481 errors.
1482 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
1483 errors. Call grub_error when needed.
1484
e9a925da 14852009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1486
1487 * commands/search.c (search_fs): Try searching without autoload first.
1488 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
1489 filesystem module explicitly for faster booting.
1490
5174302b 14912009-08-23 Colin Watson <cjwatson@ubuntu.com>
1492
1493 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
1494
c8c80635 14952009-08-23 Colin Watson <cjwatson@ubuntu.com>
1496
1497 * util/grub.d/30_os-prober.in: Disable os-prober if
1498 `GRUB_DISABLE_OS_PROBER' was set to true.
1499
71acf5e5 15002009-08-23 Robert Millan <rmh.grub@aybabtu.com>
1501
1502 * partmap/pc.c: Rename to ...
1503 * partmap/msdos.c: ... this. Update all users.
1504 (grub_pc_partition_map): Rename to ...
1505 (grub_msdos_partition_map): ... this. Update all users.
1506
1507 * parttool/pcpart.c: Rename to ...
1508 * parttool/msdospart.c: ... this. Update all users.
1509
1510 * include/grub/pc_partition.h: Rename to ...
1511 * include/grub/msdos_partition.h: ... this. Update all users.
1512 (grub_pc_partition_bsd_entry): Rename to ...
1513 (grub_msdos_partition_bsd_entry): ... this. Update all users.
1514 (grub_pc_partition_disk_label): Rename to ...
1515 (grub_msdos_partition_disk_label): ... this. Update all users.
1516 (grub_pc_partition_entry): Rename to ...
1517 (grub_msdos_partition_entry): ... this. Update all users.
1518 (grub_pc_partition_mbr): Rename to ...
1519 (grub_msdos_partition_mbr): ... this. Update all users.
1520 (grub_pc_partition): Rename to ...
1521 (grub_msdos_partition): ... this. Update all users.
1522 (grub_pc_partition_is_empty): Rename to ...
1523 (grub_msdos_partition_is_empty): ... this. Update all users.
1524 (grub_pc_partition_is_extended): Rename to ...
1525 (grub_msdos_partition_is_extended): ... this. Update all users.
1526 (grub_pc_partition_is_bsd): Rename to ...
1527 (grub_msdos_partition_is_bsd): ... this. Update all users.
1528
1529 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
1530 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
1531 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
1532 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
1533 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
1534 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
1535 (gpt_mod_LDFLAGS): Rename to ...
1536 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
1537 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
1538 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
1539 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
1540 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
1541 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
1542 (part_gpt_mod_LDFLAGS): ... this.
1543 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
1544 `pcpart.mod' to `msdospart.mod'.
1545 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
1546 to ...
1547 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
1548 (msdospart_mod_LDFLAGS): ... this.
1549
c11fded5 15502009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1551
1552 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
1553 (openbsd_opts): Likewise.
1554 (netbsd_opts): Likewise.
1555 (freebsd_flags): Added 0 terminator.
1556 (openbsd_flags): Likewise.
1557 (netbsd_flags): Likewise.
1558 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
1559 (grub_cmd_freebsd): Transformed into extended command.
1560 (grub_cmd_openbsd): Likewise.
1561 (grub_cmd_netbsd): Likewise.
1562 (cmd_freebsd): Changed type to grub_extcmd_t.
1563 (cmd_openbsd): Likewise.
1564 (cmd_netbsd): Likewise.
1565 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
1566 grub_cmd_openbsd as extended commands.
1567 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
1568 cmd_netbsd and cmd_openbsd
1569
11d1c769 15702009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
1571
1572 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
1573
7a9094e5 15742009-08-21 Pavel Roskin <proski@gnu.org>
1575
5496c37e 1576 * Makefile.in (install-local): When checking if a file is in the
1577 build directory, use "test -e" to detect symlinks.
1578
7a9094e5 1579 * Makefile.in (install-local): Remove all files in
1580 $(DESTDIR)$(pkglibdir) before installing new files there.
1581
e53cea11 15822009-08-18 Felix Zielcke <fzielcke@z-51.de>
1583
1584 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
1585 grub-mkelfimage.
1586
9aced544 15872009-08-18 Felix Zielcke <fzielcke@z-51.de>
1588
1589 * util/grub-mkconfig.in: Don't use gfxterm by default if not
1590 explicitly specified by the user.
1591
b7da6bab 15922009-08-18 Pavel Roskin <proski@gnu.org>
1593
1594 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
1595 grub_uint8_t pointer for data.
1596 * include/grub/fbutil.h (struct grub_video_fbblit_info):
1597 Likewise.
1598 * video/fb/fbutil.c: Remove unnecessary casts.
1599
19f1b335 16002009-08-17 Michal Suchanek <hramrach@centrum.cz>
1601
1602 VBE cleanup.
1603
1604 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1605 (grub_vbe_set_video_mode): Save active mode info
1606 only after setting the mode.
1607 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1608 second argument.
1609
2f467aa9 16102009-08-17 Michal Suchanek <hramrach@centrum.cz>
1611
1612 Rename variables for clarity.
1613
1614 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1615 (active_vbe_mode_info): ... this. All users updated.
1616 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1617 All users updated.
1618 (initial_mode): Rename to ...
1619 (initial_vbe_mode): ... this. All users updated.
1620 (mode_in_use): Rename to ..
1621 (vbe_mode_in_use): ... this. All users updated.
1622 (mode_list): Rename to ..
1623 (vbe_mode_list): ... this. All users updated.
1624 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1625 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1626 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1627 'mode_list_size' to 'vbe_mode_list_size'.
1628 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1629 'best_mode_info' to 'best_vbe_mode_info' and
1630 'best_mode' to 'best_vbe_mode'
1631
6025fcd7 16322009-08-17 Michal Suchanek <hramrach@centrum.cz>
1633
1634 Remove duplicate grub_video_fb_get_video_ptr.
1635
1636 * include/grub/fbutil.h (get_data_ptr): Rename to ...
1637 (grub_video_fb_get_video_ptr): ... this.
1638 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1639 * video/fb/fbutil.c: Add comment about addressing.
1640 (get_data_ptr): Rename to ...
1641 (grub_video_fb_get_video_ptr): ... this. All users updated.
1642 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1643
cc8c6faf 16442009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1645
1646 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
1647 grub_dprintf() that was just added.
1648
08aa61f0 16492009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1650
1651 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
1652 (DEFAULT_VIDEO_MODE): Remove macros.
1653 (grub_linux_boot): Remove assumption that Linux has FB support,
1654 and use "text" as default video mode.
1655
7cef4f75 16562009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
1657
1658 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
1659 grub_dprintf.
1660 * fs/fat.c (grub_fat_read_data): Likewise.
1661
e1f39873 16622009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1663
1664 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
1665 payload.
1666 (grub_module): Likewise.
1667
c166d79e 16682009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1669
1670 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
1671 mbi->cmdline but free playground.
1672
c60cee8e 16732009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1674
1675 Handle group offset on UFS1.
1676
1677 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
1678 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
1679
c0d8b5d4 16802009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1681
1682 Split ufs.mod into ufs1.mod and ufs2.mod.
1683
1684 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
1685 (grub_fstest_SOURCES): Likewise.
1686 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
1687 (ufs_mod_SOURCES): Remove.
1688 (ufs_mod_CFLAGS): Likewise.
1689 (ufs_mod_LDFLAGS): Likewise.
1690 (ufs1_mod_SOURCES): New variable.
1691 (ufs1_mod_CFLAGS): Likewise.
1692 (ufs1_mod_LDFLAGS): Likewise.
25fbd77a 1693 (ufs2_mod_SOURCES): New variable.
1694 (ufs2_mod_CFLAGS): Likewise.
1695 (ufs2_mod_LDFLAGS): Likewise.
c0d8b5d4 1696 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
1697 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1698 Likewise.
1699 (grub_emu_SOURCES): Likewise.
1700 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1701 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1702 (grub_setup_SOURCES): Likewise.
1703 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1704 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
1705 (grub_setup_SOURCES): Likewise.
1706 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1707 Likewise.
1708 * fs/ufs2.c: New file.
1709 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
1710
d3539132 17112009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1712
1713 Framebuffer split.
1714
1715 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
1716 subsystem at the end.
1717 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
1718 (video_fb_mod_SOURCES): New variable.
1719 (video_fb_mod_CFLAGS): Likewise.
1720 (video_fb_mod_LDFLAGS): Likewise.
1721 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
1722 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
1723 * video/i386/pc/vbeblit.c: Moved from here ...
1724 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
1725 * video/i386/pc/vbefill.c: Moved from here ...
1726 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
1727 * video/i386/pc/vbeutil.c: Moved from here ...
1728 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
1729 * include/grub/i386/pc/vbeblit.h: Moved from here ...
1730 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
1731 * include/grub/i386/pc/vbefill.h: Moved from here ...
1732 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
1733 * include/grub/i386/pc/vbeutil.h: Moved from here ...
1734 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
1735 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
1736 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
1737 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
1738 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
1739 (grub_video_adapter): Added 'get_info_and_fini'.
1740 (grub_video_get_info_and_fini): New prototype.
1741 (grub_video_set_mode): make modestring const char *.
1742 * loader/i386/linux.c (grub_linux_setup_video): Use
1743 grub_video_get_info_and_fini.
1744 (grub_linux_boot): Move modesetting just before booting.
1745 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
1746 grub_video_get_info_and_fini.
1747 * video/i386/pc/vbe.c: Moved framebuffer part ...
1748 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
1749 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
1750 grub_video_fbstd_colors and grub_video_fb_set_palette.
1751 (grub_video_vbe_init): Clear 'framebuffer' variable and use
1752 grub_video_fb_init.
1753 (grub_video_vbe_fini): Use grub_video_fb_fini.
1754 (grub_video_vbe_setup): Use framebuffer.render_target instead of
1755 render_target and use grub_video_fb_set_active_render_target and
1756 grub_video_fb_set_palette.
1757 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
1758 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
1759 (grub_video_vbe_adapter): Use framebuffer.
1760 * video/video.c (grub_video_get_info_and_fini): New function.
1761 (grub_video_set_mode): Make modestring const char *.
1762 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
1763 values are already initialised.
1764
d404ee56 17652009-08-14 Pavel Roskin <proski@gnu.org>
1766
1767 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
1768 ABS and APPLE_CC.
1769 * boot/i386/pc/diskboot.S: Likewise.
1770 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
1771 sectors allow compilation on MacOSX.
1772 * conf/i386-pc.rmk: Enable unconditional compilation of
1773 lnxboot.img.
1774
9a10df16 17752009-08-13 Colin Watson <cjwatson@ubuntu.com>
1776
1777 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
1778 * util/grub.d/00_header.in: Enter interruptible sleep if
1779 GRUB_HIDDEN_TIMEOUT is set.
1780
be3c9ca7 17812009-08-13 Yves Blusseau <blusseau@zetam.org>
1782
1783 * include/grub/symbol.h: Add the LOCAL macro.
1784 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
1785 starting with "L_".
1786
1f9e557e 17872009-08-13 Pavel Roskin <proski@gnu.org>
1788
9ca62843 1789 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
1790 any modern compilers we support.
1791
1f9e557e 1792 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
1793 Use local labels starting with "L_" so that Apple assembler
1794 knows they are local.
1795
81623db6 17962009-08-10 Robert Millan <rmh.grub@aybabtu.com>
1797
1798 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
1799 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
1800 (bsd_kernel_types): ... this enum.
1801
1802 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
1803 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
1804 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
1805
1806 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
1807 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
1808 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
1809 messages.
1810
f5d35e7a 18112009-08-08 Robert Millan <rmh.grub@aybabtu.com>
1812
1813 * util/grub-dumpdevtree: Moved from here ...
1814 * util/i386/efi/grub-dumpdevtree: ... to here.
1815 (hexify): New function. Converts a string to its hex version.
1816 Generate hex versions of "efi" and "device-properties" by calling
1817 hexify() on the ASCII strings rather than by hardcoding numbers.
1818
d1e1d527 18192009-08-08 Robert Millan <rmh.grub@aybabtu.com>
1820
1821 * fs/jfs.c: Update copyright year.
1822
1ebbe064 18232009-08-08 Felix Zielcke <fzielcke@z-51.de>
1824
1825 * util/grub.d/00_header.in: Fix a comment.
1826 * util/grub.d/10_linux.in: Likewise.
1827 * util/grub.d/10_windows.in: Likewise.
1828 * util/grub.d/10_hurd.in: Likewise.
1829
a78c8d24 18302009-08-08 Felix Zielcke <fzielcke@z-51.de>
1831
1832 * util/grub-mkconfig.in: Allow the user to specify the used font
1833 with GRUB_FONT.
1834
29a6b9e8 18352009-08-08 Pavel Roskin <proski@gnu.org>
1836
b5f16cc4 1837 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
1838 available, xfs.mod needs it now.
1839
2f5cb827 1840 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
1841 the "g" modifier in sed when the intention is to strip something
1842 once. This fixes comparison of kernels with multiple dashes.
1843
29a6b9e8 1844 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
1845 on it. Add missing space before closing bracket. Fix
1846 misleading formatting.
1847
892a3d98 18482009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1849
1850 * docs/grub.texi: Major overhaul. Remove all sections that are
1851 specific to GRUB Legacy, or mostly composed of Legacy-specific
1852 information.
1853
ed94253f 18542009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1855
1856 * docs/version.texi: New file. Provides version information for
1857 grub.texi.
1858
126d6628 18592009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1860
1861 * docs/grub.texi: Update CVS information to SVN.
1862 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
1863
998b5aa9 18642009-08-07 Felix Zielcke <fzielcke@z-51.de>
1865
1866 * util/grub-mkconfig.in: Remove a wrong `fi'.
1867
818e094a 18682009-08-07 Felix Zielcke <fzielcke@z-51.de>
1869
1870 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
1871 (grub_jfs_uuid): New function.
1872 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
1873
b969c52f 18742009-08-07 Felix Zielcke <fzielcke@z-51.de>
1875
1876 * util/grub-mkconfig_lib.in (font_path): Move the functionality
1877 of it to ...
1878 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
1879 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
1880
7a4894cc 18812009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1882
1883 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
1884 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
1885 Update all users.
1886
1887 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
1888 not just "vmlinu[zx]".
1889 Moved from here ...
1890 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
1891 all users.
1892
1893 * util/grub.d/10_linux.in (find_latest): Moved from here ...
1894 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
1895 all users.
1896
4e2171f8 18972009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1898
1899 * util/grub.d/10_freebsd.in: Use an absolute device path for
1900 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
1901
6dcfcb32 19022009-08-06 Felix Zielcke <fzielcke@z-51.de>
1903
1904 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
1905 handling of multiple abstraction modules.
1906
f56a8756 19072009-08-04 Robert Millan <rmh.grub@aybabtu.com>
1908
1909 Fix a bug resulting in black screen when loading Linux using a
1910 packed video mode.
1911
1912 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1913 function.
1914
1915 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1916 (grub_vbe_bios_getset_dac_palette_width): New function.
1917 (grub_vbe_bios_get_dac_palette_width)
1918 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1919 grub_vbe_bios_getset_dac_palette_width()).
1920
1921 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1922 check for return status.
1923 (grub_vbe_get_video_mode_info): When getting information for a packed
1924 mode (<= 8 bpp), obtain DAC palette width using
1925 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1926 {red,green,blue}_mark_size.
1927
222671b2 19282009-08-04 Felix Zielcke <fzielcke@z-51.de>
1929
ecb1a6d9 1930 * commands/search.c (options): Fix help output to match actual code.
222671b2 1931
f84114f5 19322009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
1933
1934 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1935 of homegrown code.
1936
bd288a20 19372009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 1938
1939 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1940 on XFS or ReiserFS.
1941
8aab5e25 19422009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
1943
1944 Support Apple partition map with sector size different from 512 bytes.
1945
1946 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1947 (apple_partition_map_iterate): Respect 'aheader.blocksize'
1948 and 'apart.partmap_size'.
1949
6ad6258a 19502009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
19512009-08-01 Robert Millan <rmh.grub@aybabtu.com>
1952
1953 Fix cpuid command.
1954
1955 * commands/i386/cpuid.c (options): New variable.
1956 (grub_cmd_cpuid): Return real error.
1957 (GRUB_MOD_INIT(cpuid)): Declare options.
1958
67459bc6 19592009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
1960
1961 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1962 valid.
1963
fbc6ab54 19642009-07-31 Bean <bean123ch@gmail.com>
1965
1966 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1967 log2_inode.
1968 (grub_fshelp_node): Move inode field to the end.
1969 (grub_xfs_data): Remove inode field.
1970 (grub_xfs_inode_block): Calculate inode size using sblock.
1971 (grub_xfs_inode_offset): Likewise.
1972 (grub_xfs_read_inode): Calculate inode size using sblock.
1973 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1974 (grub_xfs_iterate_dir): Calculate inode size using sblock.
1975 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1976 to match inode size.
1977 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1978 not accessible when data is null.
1979 (grub_xfs_open): Likewise.
1980
f45d6cfc 19812009-07-31 Bean <bean123ch@gmail.com>
1982
1983 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1984 Don't change pv->disk if it's already set.
1985
1986 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1987 (grub_raid_register): ... here.
1988 (grub_raid_rescan): Removed.
1989
1990 * include/grub/raid.h (grub_raid_rescan): Removed.
1991
1992 * util/grub-fstest.c: Remove include file <grub/raid.h>.
1993 (fstest): Replace grub_raid_rescan with module fini function followed
1994 by init function.
1995
1996 * util/grub-probe.c: Add include file <grub/raid.h>.
1997 (probe_raid_level): New function.
1998 (probe): Detect abstraction by walking the disk device, support two
1999 level of abstraction (LVM on RAID) when detecting partition map.
2000
24443b5a 20012009-07-31 Pavel Roskin <proski@gnu.org>
2002
2003 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
2004 to grub_zalloc(), it was erroneous.
2005 Reported by Bean <bean123ch@gmail.com>
2006
a275d9e7 20072009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
2008
2009 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
ad8ea1f4 2010 embedding zone, not only the first one.
a275d9e7 2011
56c5a47f 20122009-07-29 Joe Auricchio <jauricchio@gmail.com>
2013
2014 * term/gfxterm.c (clear_char): New function.
2015 (grub_virtual_screen_setup): Use clear_char.
2016 (scroll_up): Likewise.
2017 (grub_virtual_screen_cls): Likewise.
2018
67bb323a 20192009-07-29 Felix Zielcke <fzielcke@z-51.de>
2020
2021 * util/deviceiter.c (get_acceleraid_disk_name): New static
2022 function.
2023 (grub_util_iterate_devices): Handle Accelraid devices.
2024 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2025
388a7c75 20262009-07-28 Robert Millan <rmh.grub@aybabtu.com>
2027
2028 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
2029 separator for the suggested gfxpayload string (';' collides with the
2030 parser and needs escaping).
2031
3bb7abcf 20322009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
2033
2034 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
2035 Clear direction flag before jumping to OS.
2036 (grub_multiboot2_real_boot): Likewise.
2037
2ddd36d7 20382009-07-28 Felix Zielcke <fzielcke@z-51.de>
2039
2040 * util/i386/pc/grub-install: Fix parsing of --disk-module
2041 option.
2042
c521b62b 20432009-07-28 Felix Zielcke <fzielcke@z-51.de>
2044
2045 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
2046 when embedding.
2047
880e0a0c 20482009-07-26 Felix Zielcke <fzielcke@z-51.de>
2049
2050 * util/grub-mkconfig.in (package_version): New variable.
2051 Use it do display the version.
2052
2366e356 20532009-07-25 Felix Zielcke <fzielcke@z-51.de>
2054
2055 * kern/file.c (grub_file_open): Revert to previous check with
2056 grub_errno.
2057
7ad8c80e 20582009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2059
2060 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
2061 from help line. It's out of sync with code.
2062
72b9658b 20632009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2064
2065 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
2066 entries on failed boot.
2067
77435277 20682009-07-25 Felix Zielcke <fzielcke@z-51.de>
2069
2070 * kern/file.c (grub_file_open): Fix an error check.
2071
fcaa8b21 20722009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
2073
35d16c74 2074 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
2075 partition map couldn't be identified.
fcaa8b21 2076
48904cd1 20772009-07-23 Pavel Roskin <proski@gnu.org>
2078
ef3c317f 2079 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
2080 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
2081 case of little endian words becomes just an optimization.
2082 Respect const modifier.
ad8ea1f4 2083 (md5_final): Use code that doesn't depend on endianness.
ef3c317f 2084
48904cd1 2085 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
2086 to avoid loss of upper bits if align is unsigned and shorter
2087 than addr.
2088
260c9a89 20892009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2090
2091 UUID support for UFS
2092
2093 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
2094 (grub_ufs_uuid): New function.
2095 (grub_ufs_fs): add .uuid
2096
f76ce889 20972009-07-21 Pavel Roskin <proski@gnu.org>
2098
2099 * kern/dl.c (grub_dl_check_header): Make static.
2100
6a6cbcaf 21012009-07-21 Felix Zielcke <fzielcke@z-51.de>
2102
2103 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
2104 add drivemap for Vista. It breaks Windows 7.
2105
cffcddb2 21062009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2107
2108 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
2109 128 bytes
2110
1ef44b80 21112009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2112
2113 Add BFS support
2114
2115 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
2116 (grub_fstest_SOURCES): Likewise.
2117 (pkglib_MODULES): Add befs.mod.
2118 (befs_mod_SOURCES): New variable.
2119 (befs_mod_CFLAGS): Likewise.
2120 (befs_mod_LDFLAGS): Likewise.
2121 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2122 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2123 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2124 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2125 (grub_setup_SOURCES): Likewise.
2126 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2127 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2128 (grub_setup_SOURCES): Likewise.
2129 * fs/befs.c: New file.
2130 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
2131 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
2132 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
2133 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
2134 (B_KEY_INDEX_ALIGN): New declaration.
2135 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
2136 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
2137 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
2138 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
2139 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
2140 (grub_afs_mount) [MODE_BFS]: Likewise.
2141 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
2142 (grub_afs_fs): Use GRUB_AFS_FSNAME
2143 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
2144 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
2145 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
2146 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
2147
4f253044 21482009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
2149
2150 * util/getroot.c (find_root_device): Add support for MacOSX.
2151 * util/hostdisk.c: Likewise.
2152
57a55913 21532009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2154
2155 * font/font.c (find_glyph): Check whether a font is present to avoid
2156 segmentation fault.
75421ca9 2157
21582009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 2159
2160 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
2161
e98cd0c2 21622009-07-20 Pavel Roskin <proski@gnu.org>
2163
2164 * configure.ac: Trim excessively wordy excuses.
2165
1d2d169a 21662009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2167
2168 Add symlink, mtime and label support to AtheFS.
2169
2170 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
2171 (grub_afs_iterate_dir): Handle symlinks.
2172 (grub_afs_open): Use grub_afs_read_symlink.
2173 (grub_afs_dir): Likewise.
2174 Pass mtime.
2175 (grub_afs_label): New function.
2176 (grub_afs_fs): Add grub_afs_label.
2177 (grub_afs_read_symlink): New function.
2178
186f3189 21792009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2180
2181 Fix AtheFS support.
2182
2183 * fs/afs.c: Fix comments style.
2184 (grub_afs_blockrun): Declare as packed.
2185 (grub_afs_datastream): Likewise.
2186 (grub_afs_bnode): Likewise.
2187 (grub_afs_btree): Likewise.
2188 (grub_afs_sblock): Likewise.
2189 Declare `name' as char.
2190 (grub_afs_inode): Declare as packed.
2191 Change void *vnode to grub_uint32_t unused.
2192 (grub_afs_iterate_dir): Check that key_size is positive.
2193 (grub_afs_mount): Don't read superblock twice.
75421ca9 2194 (grub_afs_dir): Don't free node in case of error,
186f3189 2195 grub_fshelp_find_file already handles this.
2196 (grub_afs_open): Likewise.
2197
5680109e 21982009-07-19 Pavel Roskin <proski@gnu.org>
2199
2200 * Makefile.in: Remove LIBLZO and enable_lzo.
2201 * conf/i386-pc.rmk: Remove lzo support.
2202 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
2203 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
2204 support.
2205 * kern/i386/pc/lzo1x.S: Remove.
2206 * kern/i386/pc/startup.S: Remove lzo support.
2207 * util/i386/pc/grub-mkimage.c: Likewise.
2208
ac70fa32 22092009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
2210
2211 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
2212 * fs/xfs.c (grub_xfs_dir): Likewise.
2213 * fs/afs.c (grub_afs_dir): Likewise.
2214 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
2215 (grub_iso9660_open): Likewise.
2216 * fs/jfs.c (grub_jfs_open): Likewise.
2217 * fs/ext2.c (grub_ext2_dir): Likewise.
2218 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
2219 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 2220
eab58da2 22212009-07-16 Pavel Roskin <proski@gnu.org>
2222
d2838156 2223 * configure.ac: Never add "-c" to CFLAGS.
2224
55c70904 2225 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
2226
43e6200c 2227 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
2228 grub_cv_cc_efiemu should be used.
2229
ce7a733d 2230 * configure.ac: Typo fixes.
2231
eab58da2 2232 * kern/mm.c (grub_zalloc): New function.
2233 (grub_debug_zalloc): Likewise.
2234 * include/grub/mm.h: Declare grub_zalloc() and
2235 grub_debug_zalloc().
2236 * util/misc.c (grub_zalloc): New function.
2237 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
2238 instead of grub_malloc(), remove unneeded initializations.
2239 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
2240 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
2241 * commands/parttool.c (grub_cmd_parttool): Likewise.
2242 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
2243 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
2244 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
2245 * disk/usbms.c (grub_usbms_finddevs): Likewise.
2246 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
2247 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
2248 (grub_cmd_efiemu_pnvram): Likewise.
2249 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
2250 * fs/iso9660.c (grub_iso9660_mount): Likewise.
2251 (grub_iso9660_iterate_dir): Likewise.
2252 * fs/jfs.c (grub_jfs_opendir): Likewise.
2253 * fs/ntfs.c (list_file): Likewise.
2254 (grub_ntfs_mount): Likewise.
2255 * kern/disk.c (grub_disk_open): Likewise.
2256 * kern/dl.c (grub_dl_load_core): Likewise.
2257 * kern/elf.c (grub_elf_file): Likewise.
2258 * kern/env.c (grub_env_context_open): Likewise.
2259 (grub_env_set): Likewise.
2260 (grub_env_set_data_slot): Likewise.
2261 * kern/file.c (grub_file_open): Likewise.
2262 * kern/fs.c (grub_fs_blocklist_open): Likewise.
2263 * loader/i386/multiboot.c (grub_module): Likewise.
2264 * loader/xnu.c (grub_xnu_create_key): Likewise.
2265 (grub_xnu_create_value): Likewise.
2266 * normal/main.c (grub_normal_add_menu_entry): Likewise.
2267 (read_config_file): Likewise.
2268 * normal/menu_entry.c (make_screen): Likewise.
2269 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2270 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
2271 * script/sh/script.c (grub_script_parse): Likewise.
2272 * video/bitmap.c (grub_video_bitmap_create): Likewise.
2273 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
2274 * video/readers/png.c (grub_png_output_byte): Likewise.
2275 (grub_video_reader_png): Likewise.
2276
830afef7 22772009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 2278
2279 Enable all targets that can be built by default
2280
830afef7 2281 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 2282 grub-mkfont and grub-fstest if they can be built
2283
ee293aee 22842009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2285
2286 Fix hang and segmentation fault in grub-emu-usb
2287
2288 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
2289 * util/usb.c (grub_libusb_devices): likewise
2290 (grub_libusb_init): rename to ...
2291 (GRUB_MOD_INIT (libusb)):...this
2292 (grub_libusb_fini): rename to ..
2293 (GRUB_MOD_FINI (libusb)):...this
2294 * disk/usbms.c (grub_usbms_transfer): fix retry logic
2295 * include/grub/disk.h (grub_raid_init): removed, it's useless
2296 (grub_raid_fini): likewise
2297 (grub_lvm_init): likewise
2298 (grub_lvm_fini): likewise
2299 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
2300 by grub_init_all
2301
94414221 23022009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2303
2304 Fix libusb
2305
2306 * Makefile.in (LIBUSB): new macro
2307 * genmk.rb (Utility/print_tail): new method
2308 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
2309 (top level): call util.print_tail at the end.
2310
59ade63d 23112009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2312
2313 Make FreeBSD accept zpool.cache
2314
2315 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
2316 type is /boot/zfs/zpool.cache
2317
a58da8c7 23182009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2319
2320 Fix 64-bit efiemu
2321
2322 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
2323 correct wrong typedef
2324 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
2325
20591577 23262009-07-15 Pavel Roskin <proski@gnu.org>
2327
560ca572 2328 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
2329 * kern/disk.c (struct grub_disk_cache): Likewise.
2330
e8e8e4fd 2331 * commands/probe.c (options): Typo fix.
2332
fde24e10 2333 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
2334 Increase to 0x5a to accommodate FAT32. Adjust other offsets
2335 accordingly.
2336 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
2337
379c54c1 2338 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
2339 the end of "Error" to make the message more readable.
2340
7bd8f5bf 2341 * boot/i386/pc/boot.S (kernel_segment): Remove.
2342 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
2343 for destination.
2344
40b132c5 2345 * boot/i386/pc/boot.S (boot_version): Remove.
2346 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
2347 Remove.
2348
20591577 2349 * include/grub/i386/pc/boot.h: Sort all offsets.
2350 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
2351 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
2352 * boot/i386/pc/boot.S: Assert location of every offset listed in
2353 include/grub/i386/pc/boot.h.
2354
2df32b2c 23552009-07-13 Pavel Roskin <proski@gnu.org>
2356
44b5d879 2357 * include/grub/i386/coreboot/machine.h: Rename
2358 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
2359 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
2360 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
2361
17dc3751 2362 * kern/dl.c: Force native word size to suppress warnings when
2363 compiling grub-emu.
2364
2df32b2c 2365 * kern/device.c (grub_device_iterate): Change struct part_ent to
2366 hold the name, not a pointer to it. Use one grub_malloc() per
2367 partition, not two. Free partition_name if grub_malloc() fails.
2368 Set ents to NULL only before grub_partition_iterate() is called.
2369
75c59f59 23702009-07-11 Bean <bean123ch@gmail.com>
2371
2372 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
2373 childname.
2374
0ae1bf88 23752009-07-10 Bean <bean123ch@gmail.com>
23762009-07-10 Robert Millan <rmh.grub@aybabtu.com>
2377
2378 * kern/ieee1275/openfw.c (grub_children_iterate)
2379 (grub_devalias_iterate): Fix size evaluation for property or path
2380 strings, which was broken since r2132.
2381
8279cade 23822009-07-07 Pavel Roskin <proski@gnu.org>
2383
7d8a52d3 2384 * commands/search.c (search_file): Merge into ...
2385 (search_fs): ... this. Accept search type as argument.
2386 (grub_cmd_search): Pass search type to search_fs().
2387
25f9a05a 2388 * include/grub/util/console.h: New file.
2389 * util/console.c: Use it instead of grub/machine/console.h.
2390 * util/grub-emu.c: Likewise.
2391
8279cade 2392 * lib/arg.c (find_long_option): Remove.
2393 (find_long): Add `len' argument, make `s' const char *.
2394 (grub_arg_parse): Parse long options in place, not in a
2395 temporary buffer.
2396
4a11b60f 23972009-07-06 Pavel Roskin <proski@gnu.org>
2398
99f68041 2399 * commands/search.c (search_fs): Fix potential NULL pointer
2400 dereference.
2401
4a11b60f 2402 * commands/search.c (search_fs): Replace QUID macro with quid_fn
2403 function pointer.
2404
e110f4de 24052009-07-06 Daniel Mierswa <impulze@impulze.org>
2406
2407 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
2408 comparison.
2409
46eeb6a2 24102009-07-05 Pavel Roskin <proski@gnu.org>
2411
bab74958 2412 * include/grub/i386/linux.h (struct linux_kernel_params):
2413 Restore padding3, it's still needed.
2414
46eeb6a2 2415 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
2416 FreeBSD.
2417 * util/osdetect.lua: Likewise.
2418
b4a1dc79 24192009-07-05 Bean <bean123ch@gmail.com>
2420
2421 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
2422
2423 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
2424 (grub_lua_getenv): Likewise.
2425 (grub_lua_setenv): Likewise.
2426 (save_errno): New function.
2427 (push_result): Likewise.
2428 (grub_lua_enum_device): Likewise.
2429 (grub_lua_enum_file): Likewise.
2430 (grub_lua_file_open): Likewise.
2431 (grub_lua_file_close): Likewise.
2432 (grub_lua_file_seek): Likewise.
2433 (grub_lua_file_read): Likewise.
2434 (grub_lua_file_getline): Likewise.
2435 (grub_lua_file_getsize): Likewise.
2436 (grub_lua_file_getpos): Likewise.
2437 (grub_lua_file_eof): Likewise.
2438 (grub_lua_file_exist): Likewise.
2439 (grub_lua_add_menu): Likewise.
2440
2441 * script/lua/grub_lua.h (isupper): New inline function.
2442 (islower): Likewise.
2443 (ispunct): Likewise.
2444 (isxdigit): Likewise.
2445 (strcspn): Change to normal function.
2446 (strpbkr): New function declaration.
2447 (memchr): Likewise.
2448
2449 * script/lua/grub_main.c (scan_str): New function.
2450 (strcspn): Likewise.
2451 (strpbrk): Likewise.
2452 (memchr): Likewise.
2453
2454 * script/lua/linit.c (lualibs): Enable the string library.
2455
2456 * util/osdetect.lua: New file.
2457
2da92295 24582009-07-04 Robert Millan <rmh.grub@aybabtu.com>
2459
2460 * include/grub/i386/linux.h (struct linux_kernel_params): Add
2461 `capabilities' member.
2462
b2582ec9 24632009-07-02 Pavel Roskin <proski@gnu.org>
2464
2465 * genparttoollist.sh: Add missing newline at the end.
2466
32622956 24672009-07-01 Pavel Roskin <proski@gnu.org>
2468
87a7339e 2469 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2470
d23af54e 2471 * util/hostdisk.c (open_device): Remove `const' from
2472 `sysctl_size', as sysctlbyname() can change it (in this case it
2473 doesn't actually happen).
2474
c94b18a9 2475 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
2476 using signed long int constants.
2477
c6cd3ef0 2478 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
2479 constant to avoid a warning on FreeBSD.
2480
0df63420 2481 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
2482 where it's needed.
2483
999577f1 2484 * Makefile.in: Install include/grub/machine symlink.
2485
6f41557f 2486 * Makefile.in: When installing symlinks, use "cp -fR", which
2487 works on FreeBSD and MacOSX.
2488 From Yves Blusseau <cl7m42e02@sneakemail.com>
2489
c8d22988 2490 * kern/dl.c (grub_dl_resolve_symbol): Make static.
2491 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
2492
1b96e952 2493 * util/misc.c: Move grub_reboot() and grub_halt() ...
2494 * util/grub-emu.c: ... here. Make main_env static.
2495 * include/grub/util/misc.h: Remove main_env.
2496
2ef0084d 2497 * kern/mm.c: Use correct format to print size_t.
2498
32622956 2499 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
2500 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
2501 * kern/powerpc/dl.c: Likewise.
2502 * kern/sparc64/dl.c: Likewise.
2503 * kern/x86_64/dl.c: Likewise.
2504
3f7f0cd0 25052009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2506
2507 Fix grub-emu build on sparc64-ieee1275.
2508
75421ca9 2509 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 2510 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2511
211d06b5 25122009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2513
2514 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
2515 (grub_reboot, grub_halt): New functions.
2516
2517 * util/i386/pc/misc.c: Delete. Update all users.
2518 * util/sparc64/ieee1275/misc.c: Likewise.
2519 * util/powerpc/ieee1275/misc.c: Likewise.
2520
aaf53e3c 25212009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2522
2523 * conf/i386.rmk (setjmp_mod_SOURCES)
2524 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
2525 * conf/common.rmk (setjmp_mod_SOURCES)
2526 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
2527 to use $(target_cpu).
2528 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
2529 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
2530 * conf/powerpc-ieee1275.rmk: Likewise.
2531 * conf/sparc64-ieee1275.rmk: Likewise.
2532
2533 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
2534 $(target_cpu) for kern/$(target_cpu)/dl.c.
2535 * conf/i386-efi.rmk: Likewise.
2536 * conf/i386-ieee1275.rmk: Likewise.
2537 * conf/x86_64-efi.rmk: Likewise.
2538 * conf/i386-coreboot.rmk: Likewise.
2539 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
2540 $(target_cpu) for kern/$(target_cpu)/dl.c and for
2541 kern/$(target_cpu)/cache.S.
2542 * conf/sparc64-ieee1275.rmk: Likewise.
2543
a337130b 25442009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2545
2546 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
2547 type to `grub_uint8_t', and adjust `padding9' accordingly.
2548
c6fe4d53 25492009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2550
b09db61d 2551 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
2552
c6fe4d53 2553 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
2554 assembly in final jump, using register constraints.
2555
b09db61d 2556 (grub_linux_boot): For text mode, initialize `have_vga' using
2557 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
2558
2559 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
2560 right before the final jump.
2561
2562 Set `video_mode' to 0x3.
2563
2564 Document initialization of `video_page', `video_mode' and
2565 `video_ega_bx'.
2566
28333ad0 25672009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2568
2569 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
2570 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 2571 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 2572
02164e1b 25732009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2574
2575 Fix build on Debian / sparc.
2576
2577 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
2578
18b6c557 25792009-06-28 Pavel Roskin <proski@gnu.org>
2580
85f2aab6 2581 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
2582 fix a warning.
2583
18b6c557 2584 * util/grub.d/10_linux.in: Match SUSE style initrd names.
2585
ad760f81 25862009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2587
2588 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
2589 `err'.
2590
87a4623b 25912009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2592
2593 Revert r2338.
2594
2595 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
2596 file can't be opened. grub_file_open() is already supposed to set
75421ca9 2597 grub_errno / grub_errmsg appropriately.
87a4623b 2598 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2599
8231fb77 26002009-06-27 Pavel Roskin <proski@gnu.org>
26012009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2602
2603 * include/grub/dl.h: Include grub/elf.h.
2604 (struct grub_dl): Add symtab field.
2605 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2606 GRUB_MODULES_MACHINE_READONLY.
2607 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2608 of the header for read-only modules.
2609 (grub_dl_unload): Free mod->symtab for read-only modules.
2610 * kern/i386/dl.c: Use mod->symtab.
2611 * kern/powerpc/dl.c: Likewise.
2612 * kern/sparc64/dl.c: Likewise.
2613 * kern/x86_64/dl.c: Likewise.
2614
2615 * conf/i386-qemu.rmk: New file.
2616 * kern/i386/qemu/startup.S: Likewise.
2617 * kern/i386/qemu/mmap.c: Likewise.
2618 * boot/i386/qemu/boot.S: Likewise.
2619 * include/grub/i386/qemu/time.h: Likewise.
2620 * include/grub/i386/qemu/serial.h: Likewise.
2621 * include/grub/i386/qemu/kernel.h: Likewise.
2622 * include/grub/i386/qemu/console.h: Likewise.
2623 * include/grub/i386/qemu/boot.h: Likewise.
2624 * include/grub/i386/qemu/init.h: Likewise.
2625 * include/grub/i386/qemu/machine.h: Likewise.
2626 * include/grub/i386/qemu/loader.h: Likewise.
2627 * include/grub/i386/qemu/memory.h: Likewise.
2628
2629 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2630 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2631 [qemu] (pkglib_IMAGES): Add `boot.img'.
2632 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2633 [qemu] (boot_img_FORMAT): New variables.
2634 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2635 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2636 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2637 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2638 [qemu] (kernel_img_FORMAT): New variables.
2639
2640 * configure.ac: Recognise `i386-qemu'.
2641
2642 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2643 (for no compression).
2644 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
2645 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
2646 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
2647 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
2648 ifdefs).
2649
97fe384e 26502009-06-27 Pavel Roskin <proski@gnu.org>
2651
2652 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
2653 read.
2654 * efiemu/prepare32.c: Likewise.
2655 * efiemu/prepare64.c: Likewise.
2656
c402ab17 26572009-06-26 Pavel Roskin <proski@gnu.org>
2658
2659 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
2660 * include/grub/elf.h: Define symbols without "32" or "64" based
2661 on GRUB_TARGET_WORDSIZE.
2662 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
2663 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
2664 ELF definitions.
2665 * efiemu/loadcore64.c: Likewise.
2666 * loader/i386/bsd32.c: Likewise.
2667 * loader/i386/bsd64.c: Likewise.
2668 * kern/dl.c: Remove own ELF definitions.
2669 * util/i386/efi/grub-mkimage.c: Likewise.
2670
9bbdfd4d 26712009-06-23 Robert Millan <rmh.grub@aybabtu.com>
2672
2673 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
2674 segment 0x0 unconditionally, because the reference generated by
2675 GAS is an absolute address.
2676
a42ce6e9 26772009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2678
2679 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
2680 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
2681
c952cf92 26822009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2683
2684 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
2685 indexes. Check for -f explicitly.
cc3752ad 2686 (search_file): Improve error message.
2687 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 2688
132a0a59 26892009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2690
2691 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
2692 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
2693
387a140c 26942009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2695
2696 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
2697 * conf/i386-ieee1275.rmk: Likewise.
2698 * conf/i386-coreboot.rmk: Likewise.
2699
2700 * kern/i386/pc/startup.S (grub_stop): Remove function.
2701 * kern/i386/ieee1275/startup.S: Likewise.
2702 * kern/i386/coreboot/startup.S: Likewise.
2703 * kern/i386/misc.S (grub_stop): New function.
2704
41da9665 27052009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2706
2707 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
2708 * kern/i386/realmode.S (real_to_prot): ... to here.
2709
bf337234 27102009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2711
2712 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
2713 with `kernel.img'.
2714 (kernel_elf_SOURCES): Rename to ...
2715 (kernel_img_SOURCES): ... this.
2716 (kernel_elf_HEADERS): Rename to ...
2717 (kernel_img_HEADERS): ... this. Update all users.
2718 (kernel_elf_ASFLAGS): Rename to ...
2719 (kernel_img_ASFLAGS): ... this.
2720 (kernel_elf_CFLAGS): Rename to ...
2721 (kernel_img_CFLAGS): ... this.
2722 (kernel_elf_LDFLAGS): Rename to ...
2723 (kernel_img_LDFLAGS): ... this.
2724 * conf/i386-coreboot.rmk: Likewise.
2725 * conf/powerpc-ieee1275.rmk: Likewise.
2726
2727 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
2728 with "kernel.img".
2729
f52196ff 27302009-06-21 Pavel Roskin <proski@gnu.org>
2731
c3cee413 2732 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
2733 to match nested functions.
2734 * loader/sparc64/ieee1275/linux.c: Likewise.
2735
f52196ff 2736 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
2737
58750afc 27382009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2739
2740 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
2741 all i386 platforms.
2742
15355c7d 27432009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2744
2745 Fix asm file handling on ELF, and remove workarounds.
2746
2747 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 2748 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 2749 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
2750 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2751
3f3ec72b 27522009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
2753
2754 Load BSD ELF modules
2755
2756 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
2757 and loader/i386/bsd64.c
2758 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
2759 (FREEBSD_MODTYPE_ELF_MODULE): New definition
2760 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
2761 (grub_freebsd_load_elfmodule32): New declaration
2762 (grub_freebsd_load_elfmoduleobj64): Likewise
2763 (grub_freebsd_load_elf_meta32): Likewise
2764 (grub_freebsd_load_elf_meta64): Likewise
2765 (grub_freebsd_add_meta): Likewise
2766 (grub_freebsd_add_meta_module): Likewise
2767 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
2768 (grub_freebsd_add_meta_module): Likewise and move module-specific
2769 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
2770 (grub_cmd_freebsd): Add elf-kernel specific parts
2771 based on grub_freebsd_add_meta_module
2772 (grub_cmd_freebsd_module): Add type parsing moved from
2773 grub_freebsd_add_meta_module
2774 (grub_cmd_freebsd_module_elf): New function
2775 (cmd_freebsd_module_elf): New variable
2776 (GRUB_MOD_INIT): Register freebsd_module_elf
2777 * loader/i386/bsd32.c: New file
2778 * loader/i386/bsd64.c: Likewise
2779 * loader/i386/bsdXX.c: Likewise
2780 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
2781 (grub_elf64_load): Likewise
2782 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
2783 All users updated
2784 (grub_elf64_load_hook_t): Likewise
2785
0db15301 27862009-06-21 Colin Watson <cjwatson@ubuntu.com>
2787
2788 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
2789 variable.
2790 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
2791 don't write a menu entry for recovery mode.
2792
546796c1 27932009-06-20 Robert Millan <rmh.grub@aybabtu.com>
2794
2795 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
2796 after it's no longer needed.
2797
cd7310d5 27982009-06-20 Robert Millan <rmh.grub@aybabtu.com>
2799
2800 * include/grub/i386/loader.h (grub_linux_prot_size)
2801 (grub_linux_tmp_addr, grub_linux_real_addr)
2802 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
2803 GRUB_MACHINE_PCBIOS.
2804 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
2805 common grub_util_info() call to ...
2806 (generate_image): ... here.
2807 Fix use of uninitialized memory, comparison of signed with
2808 unsigned integers and memory leak.
2809 Remove bogus module address message.
2810
ab32d3b5 28112009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
2812
2813 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
2814 grub_raid_register
2815 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
2816
024ef597 28172009-06-19 Pavel Roskin <proski@gnu.org>
2818
2819 * configure.ac: Remove stray AC_MSG_CHECKING.
2820
3ac72b51 28212009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
2822
2823 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 2824
e14cd814 28252009-06-18 Pavel Roskin <proski@gnu.org>
2826
2827 * conf/common.rmk: Add fs_file.mod.
2828 * disk/fs_file.c: New file.
2829 * include/grub/disk.h (enum grub_disk_dev_id): Add
2830 GRUB_DISK_DEVICE_FILE_ID.
2831
26586d98 28322009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2833
2834 Fix build with Apple's toolchain. Part 2
2835
2836 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
2837 a fake start
2838
26de2bcd 28392009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2840
2841 Fix build with Apple's toolchain. Part 1
2842
2843 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
2844 for long calls
2845 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 2846 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 2847 Apple's toolchain
2848
09b3490b 28492009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2850
2851 Fix warnings
2852
2853 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
2854 (decomp_block): initialize ch
2855 use grub_memcpy instead of memcpy
2856
c22a006a 28572009-06-17 Pavel Roskin <proski@gnu.org>
2858
d3638678 2859 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
2860 version, use declarations needed to use vga_text as the startup
2861 console.
2862
c22a006a 2863 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
2864 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
2865 the kernel.
2866 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
2867 and grub_at_keyboard_fini(), it's done on module load and
2868 unload.
2869
05b129e0 28702009-06-17 Felix Zielcke <fzielcke@z-51.de>
2871
2872 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
2873 file can't be found.
2874 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2875
cf24ed9e 28762009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
2877
2878 Fix newline handling
2879
2880 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 2881 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 2882 (grub_script_yylex): don't segfault on unterminated script
2883 newline terminates command and variable
2884
74aa8e4b 28852009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
2886
2887 avoid double grub_adjust_range call. Bug reported by David Simner
2888
2889 * kern/disk.c (grub_disk_write): change to raw disk access before
2890 calling disk_read
2891
1bd265f3 28922009-06-17 Colin Watson <cjwatson@ubuntu.com>
2893
2894 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
2895 spaces, for the benefit of help2man.
2896 * util/i386/efi/grub-mkimage.c (usage): Likewise.
2897
a2d08c06 28982009-06-16 Pavel Roskin <proski@gnu.org>
2899
2900 * kern/i386/halt.c: Include grub/machine/init.h.
2901 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
2902
b97bcb19 29032009-06-16 Felix Zielcke <fzielcke@z-51.de>
2904
2905 * util/grub.d/30_os-prober.in: Use ${root} in the generated
2906 drivemap menuentry.
2907
0644f96c 29082009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
2909
2910 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2911 `echo' command.
2912
3ef17a2e 29132009-06-16 Pavel Roskin <proski@gnu.org>
2914
2915 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
2916 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
2917 save %dx, we only need %dl and we never change it.
2918 * boot/i386/pc/cdboot.S: Don't set the root drive.
2919 * boot/i386/pc/pxeboot.S: Likewise.
2920 * include/grub/i386/pc/boot.h: Remove
2921 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2922 GRUB_BOOT_MACHINE_DRIVE_CHECK.
2923 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2924 * kern/i386/pc/init.c (make_install_device): Remove references
2925 to grub_root_drive.
2926 * kern/i386/pc/startup.S: Likewise.
2927 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2928
693fe637 29292009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
2930
2931 xnu_uuid command
2932
2933 * commands/xnu_uuid.c: new file
2934 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2935 (xnu_uuid_mod_SOURCES): new variable
2936 (xnu_uuid_mod_CFLAGS): likewise
2937 (xnu_uuid_mod_LDFLAGS): likewise
2938 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2939 * conf/i386-ieee1275.rmk: likewise
2940 * conf/i386-pc.rmk: likewise
2941 * conf/powerpc-ieee1275.rmk: likewise
2942 * conf/sparc64-ieee1275.rmk: likewise
2943 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2944
c9da87d0 29452009-06-16 Pavel Roskin <proski@gnu.org>
2946
2947 * configure.ac: Avoid '==' in test command, it's not portable.
2948
9c6f4596 29492009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
2950
2951 Probe command
2952
2953 * commands/probe.c: new file
2954 * conf/common.rmk (pkglib_MODULES): add probe.mod
2955 (probe_mod_SOURCES): new variable
2956 (probe_mod_CFLAGS): likewise
2957 (probe_mod_LDFLAGS): likewise
2958 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2959 * conf/i386-ieee1275.rmk: likewise
2960 * conf/i386-pc.rmk: likewise
2961 * conf/powerpc-ieee1275.rmk: likewise
2962 * conf/sparc64-ieee1275.rmk: likewise
2963
70b7f9fd 29642009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
2965
2966 Fix handling of string like \"hello\" and "a
2967 b"
2968
2969 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2970 (grub_script_yylex): fix parsing of quoting, escaping and newline
2971
71c79a6b 29722009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
2973
dd74360c 2974 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 2975 handling
dd74360c 2976
0644f96c 29772009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 2978
2979 * util/grub-mkconfig.in: Fix parsing of --output option.
2980
e40893c3 29812009-06-12 Pavel Roskin <proski@gnu.org>
2982
2983 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
2984 genmk.rb don't need to be generated or installed.
2985
3a1acfe2 29862009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
2987
2988 * commands/i386/pc/drivemap_int13h.S: add more comments
2989
3a4575d4 29902009-06-11 Pavel Roskin <proski@gnu.org>
2991
0658e928 2992 * Makefile.in (uninstall): Uninstall manuals.
2993
ca0388f0 2994 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2995 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
2996 and update-grub_lib in two places.
2997 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2998
e3b27c39 2999 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
3000 a compiler warning.
3001
3a4575d4 3002 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
3003 `entry_lo' to fix variable shadowing.
3004
af1f4f55 30052009-06-11 Christian Franke <franke@computer.org>
3006
3007 * kern/misc.c (__enable_execute_stack): Add missing return type
3008 to prevent gcc warning.
3009
5225e649 30102009-06-11 Felix Zielcke <fzielcke@z-51.de>
3011
3012 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
3013
7d83bd47 30142009-06-11 Pavel Roskin <proski@gnu.org>
3015
c1cb63ba 3016 * Makefile.in: Don't rely on any scripts being executable.
3017 Always use $(SHELL) to run shell scripts.
3018
7d83bd47 3019 * configure.ac: Always define ___main if using -nostdlib. This
3020 fixes tests on Cygwin.
3021
948f48e7 30222009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
3023
3024 UDF fix
3025
7d83bd47 3026 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 3027 is in bytes and not in blocks
7d83bd47 3028
8ada9bc1 30292009-06-11 Pavel Roskin <proski@gnu.org>
3030
3031 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
3032 warning.
3033
25ad2323 30342009-06-11 Felix Zielcke <fzielcke@z-51.de>
3035
3036 * util/grub.d/30_os-prober.in: Fix a comment. Source
3037 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
3038 to set the root device. Place drivemap command in the generated
3039 chain entry.
3040
e65acb0c 30412009-06-11 Pavel Roskin <proski@gnu.org>
3042
3043 * configure.ac: Remove host_m32. Issues with 64-bit utilities
3044 have long been resolved.
3045
f285fe2d 30462009-06-11 Colin Watson <cjwatson@ubuntu.com>
3047
bd47b0b5 3048 * util/grub.d/10_linux.in: Capitalise "Linux".
3049
f285fe2d 3050 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
3051
a0c62e4e 30522009-06-11 Pavel Roskin <proski@gnu.org>
3053
b6783cb2 3054 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
3055 fix a gcc warning and ensure that the function won't ever exit.
3056
dde032e8 3057 * kern/i386/ieee1275/init.c: Add missing prototype for
3058 grub_stop_floppy().
3059
22cd079d 3060 * loader/ieee1275/multiboot2.c [__i386__]: Include
3061 grub/cpu/multiboot.h.
3062
a0c62e4e 3063 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
3064 casts to short - they are not portable and cause warnings. Fix
3065 use of uninitialized values in input_buf. Use ARRAY_SIZE.
3066
63963d17 30672009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
3068
3069 Drivemap fixes
3070
3071 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
3072 new function
3073 (grub_get_root_biosnumber_saved): new variable
3074 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
3075 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 3076 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 3077 %dx after the call if necessary
3078 * conf/common.rmk (pkglib_MODULES): remove boot.mod
3079 (boot_mod_SOURCES): remove
3080 (boot_mod_CFLAGS): remove
3081 (boot_mod_LDFLAGS): remove
3082 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
3083 (boot_mod_SOURCES): new variable
3084 (boot_mod_CFLAGS): likewise
3085 (boot_mod_LDFLAGS): likewise
3086 * conf/i386-efi.rmk: likewise
3087 * conf/i386-ieee1275.rmk: likewise
3088 * conf/i386-pc.rmk: likewise
3089 * conf/powerpc-ieee1275.rmk: likewise
3090 * conf/sparc64-ieee1275.rmk: likewise
3091 * conf/x86_64-efi.rmk: likewise
3092 * include/grub/i386/pc/biosnum.h: new file
3093 * lib/i386/pc/biosnum.c: likewise
3094 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
3095 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
3096 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 3097
33abf7ae 30982009-06-10 Pavel Roskin <proski@gnu.org>
3099
5ac35b35 3100 * io/gzio.c (test_header): Don't reuse one buffer for all data.
3101 Use separate variables. Read only the file size at the end, but
3102 not the checksum that we don't use.
3103
5c5215d5 3104 * kern/file.c (grub_file_read): Use void pointer for the buffer.
3105 Adjust all callers.
3106
27d5fef7 3107 * kern/ieee1275/openfw.c: Remove libc includes.
3108 * kern/ieee1275/cmain.c: Likewise.
3109 * include/grub/ieee1275/ieee1275.h: Likewise.
3110
33abf7ae 3111 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
3112 compiler warnings.
3113
19d50c2b 31142009-06-10 Felix Zielcke <fzielcke@z-51.de>
3115
3116 * Makefile.in: Remove all trailing whitespace.
3117 * conf/i386-pc.rmk: Likewise.
3118 * conf/powerpc-ieee1275.rmk: Likewise.
3119 * conf/sparc64-ieee1275.rmk: Likewise.
3120 * docs/grub.texi: Likewise.
3121 * docs/texinfo.tex: Likewise.
3122 * disk/fs_uuid.c: Likewise.
3123 * disk/lvm.c: Likewise.
3124 * disk/scsi.c: Likewise.
3125 * disk/ata.c: Likewise.
3126 * disk/ieee1275/ofdisk.c: Likewise.
3127 * disk/i386/pc/biosdisk.c: Likewise.
3128 * disk/host.c: Likewise.
3129 * disk/raid.c: Likewise.
3130 * disk/efi/efidisk.c: Likewise.
3131 * disk/usbms.c: Likewise.
3132 * disk/memdisk.c: Likewise.
3133 * disk/loopback.c: Likewise.
3134 * kern/powerpc/dl.c: Likewise.
3135 * kern/device.c: Likewise.
3136 * kern/dl.c: Likewise.
3137 * kern/sparc64/dl.c: Likewise.
3138 * kern/ieee1275/ieee1275.c: Likewise.
3139 * kern/term.c: Likewise.
3140 * kern/fs.c: Likewise.
3141 * kern/i386/dl.c: Likewise.
3142 * kern/i386/pc/startup.S: Likewise.
3143 * kern/i386/pc/init.c: Likewise.
3144 * kern/i386/pc/mmap.c: Likewise.
3145 * kern/i386/pc/lzo1x.S: Likewise.
3146 * kern/i386/ieee1275/init.c: Likewise.
3147 * kern/i386/realmode.S: Likewise.
3148 * kern/i386/tsc.c: Likewise.
3149 * kern/partition.c: Likewise.
3150 * kern/corecmd.c: Likewise.
3151 * kern/file.c: Likewise.
3152 * kern/efi/efi.c: Likewise.
3153 * kern/efi/init.c: Likewise.
3154 * kern/efi/mm.c: Likewise.
3155 * kern/main.c: Likewise.
3156 * kern/err.c: Likewise.
3157 * kern/env.c: Likewise.
3158 * kern/disk.c: Likewise.
3159 * kern/generic/millisleep.c: Likewise.
3160 * kern/generic/rtc_get_time_ms.c: Likewise.
3161 * kern/misc.c: Likewise.
3162 * kern/parser.c: Likewise.
3163 * genmk.rb: Likewise.
3164 * configure.ac: Likewise.
3165 * boot/i386/pc/diskboot.S: Likewise.
3166 * boot/i386/pc/pxeboot.S: Likewise.
3167 * boot/i386/pc/boot.S: Likewise.
3168 * boot/i386/pc/lnxboot.S: Likewise.
3169 * boot/i386/pc/cdboot.S: Likewise.
3170 * parttool/pcpart.c: Likewise.
3171 * video/readers/tga.c: Likewise.
3172 * video/video.c: Likewise.
3173 * video/bitmap.c: Likewise.
3174 * lib/envblk.c: Likewise.
3175 * lib/i386/setjmp.S: Likewise.
3176 * fs/xfs.c: Likewise.
3177 * fs/afs.c: Likewise.
3178 * fs/fat.c: Likewise.
3179 * fs/ntfs.c: Likewise.
3180 * fs/udf.c: Likewise.
3181 * fs/affs.c: Likewise.
3182 * fs/iso9660.c: Likewise.
3183 * fs/hfs.c: Likewise.
3184 * fs/fshelp.c: Likewise.
3185 * fs/ext2.c: Likewise.
3186 * fs/jfs.c: Likewise.
3187 * fs/reiserfs.c: Likewise.
3188 * fs/hfsplus.c: Likewise.
3189 * fs/minix.c: Likewise.
3190 * fs/cpio.c: Likewise.
3191 * fs/sfs.c: Likewise.
3192 * fs/ufs.c: Likewise.
3193 * efiemu/prepare.c: Likewise.
3194 * efiemu/loadcore_common.c: Likewise.
3195 * efiemu/runtime/efiemu.sh: Likewise.
3196 * efiemu/runtime/efiemu.S: Likewise.
3197 * efiemu/runtime/efiemu.c: Likewise.
3198 * efiemu/pnvram.c: Likewise.
3199 * efiemu/main.c: Likewise.
3200 * efiemu/i386/pc/cfgtables.c: Likewise.
3201 * efiemu/i386/loadcore64.c: Likewise.
3202 * efiemu/i386/loadcore32.c: Likewise.
3203 * efiemu/loadcore.c: Likewise.
3204 * efiemu/symbols.c: Likewise.
3205 * efiemu/mm.c: Likewise.
3206 * include/grub/autoefi.h: Likewise.
3207 * include/grub/datetime.h: Likewise.
3208 * include/grub/term.h: Likewise.
3209 * include/grub/hfs.h: Likewise.
3210 * include/grub/lvm.h: Likewise.
3211 * include/grub/i386/tsc.h: Likewise.
3212 * include/grub/i386/linux.h: Likewise.
3213 * include/grub/i386/xnu.h: Likewise.
3214 * include/grub/i386/efiemu.h: Likewise.
3215 * include/grub/i386/pc/biosdisk.h: Likewise.
3216 * include/grub/i386/pc/memory.h: Likewise.
3217 * include/grub/i386/pc/vbe.h: Likewise.
3218 * include/grub/parttool.h: Likewise.
3219 * include/grub/video.h: Likewise.
3220 * include/grub/memory.h: Likewise.
3221 * include/grub/fs.h: Likewise.
3222 * include/grub/partition.h: Likewise.
3223 * include/grub/xnu.h: Likewise.
3224 * include/grub/efi/api.h: Likewise.
3225 * include/grub/efi/pe32.h: Likewise.
3226 * include/grub/efi/memory.h: Likewise.
3227 * include/grub/multiboot.h: Likewise.
3228 * include/grub/usbdesc.h: Likewise.
3229 * include/grub/multiboot2.h: Likewise.
3230 * include/grub/acpi.h: Likewise.
3231 * include/grub/efiemu/efiemu.h: Likewise.
3232 * include/grub/disk.h: Likewise.
3233 * include/grub/ieee1275/ieee1275.h: Likewise.
3234 * include/grub/net.h: Likewise.
3235 * include/grub/machoload.h: Likewise.
3236 * include/grub/macho.h: Likewise.
3237 * include/multiboot.h: Likewise.
3238 * genmoddep.awk: Likewise.
3239 * normal/main.c: Likewise.
3240 * normal/menu_entry.c: Likewise.
3241 * normal/menu_viewer.c: Likewise.
3242 * normal/completion.c: Likewise.
3243 * normal/cmdline.c: Likewise.
3244 * normal/misc.c: Likewise.
3245 * normal/datetime.c: Likewise.
3246 * bus/usb/usbtrans.c: Likewise.
3247 * bus/usb/ohci.c: Likewise.
3248 * bus/usb/uhci.c: Likewise.
3249 * bus/usb/usb.c: Likewise.
3250 * mmap/efi/mmap.c: Likewise.
3251 * mmap/i386/pc/mmap_helper.S: Likewise.
3252 * mmap/i386/pc/mmap.c: Likewise.
3253 * mmap/i386/mmap.c: Likewise.
3254 * mmap/i386/uppermem.c: Likewise.
3255 * mmap/mmap.c: Likewise.
3256 * commands/acpi.c: Likewise.
3257 * commands/echo.c: Likewise.
3258 * commands/blocklist.c: Likewise.
3259 * commands/loadenv.c: Likewise.
3260 * commands/usbtest.c: Likewise.
3261 * commands/boot.c: Likewise.
3262 * commands/parttool.c: Likewise.
3263 * commands/search.c: Likewise.
3264 * commands/cat.c: Likewise.
3265 * commands/i386/pc/play.c: Likewise.
3266 * commands/i386/pc/drivemap.c: Likewise.
3267 * commands/i386/pc/vbeinfo.c: Likewise.
3268 * commands/i386/pc/acpi.c: Likewise.
3269 * commands/i386/pc/vbetest.c: Likewise.
3270 * commands/ls.c: Likewise.
3271 * commands/cmp.c: Likewise.
3272 * commands/test.c: Likewise.
3273 * commands/efi/acpi.c: Likewise.
3274 * commands/gptsync.c: Likewise.
3275 * commands/help.c: Likewise.
3276 * partmap/amiga.c: Likewise.
3277 * partmap/apple.c: Likewise.
3278 * partmap/acorn.c: Likewise.
3279 * partmap/pc.c: Likewise.
3280 * partmap/sun.c: Likewise.
3281 * partmap/gpt.c: Likewise.
3282 * script/sh/lexer.c: Likewise.
3283 * script/sh/function.c: Likewise.
3284 * font/font.c: Likewise.
3285 * font/font_cmd.c: Likewise.
3286 * loader/powerpc/ieee1275/linux.c: Likewise.
3287 * loader/efi/chainloader.c: Likewise.
3288 * loader/multiboot_loader.c: Likewise.
3289 * loader/macho.c: Likewise.
3290 * loader/i386/multiboot.c: Likewise.
3291 * loader/i386/linux.c: Likewise.
3292 * loader/i386/pc/linux.c: Likewise.
3293 * loader/i386/pc/multiboot2.c: Likewise.
3294 * loader/i386/pc/chainloader.c: Likewise.
3295 * loader/i386/pc/xnu.c: Likewise.
3296 * loader/i386/bsd_trampoline.S: Likewise.
3297 * loader/i386/efi/linux.c: Likewise.
3298 * loader/i386/multiboot_elfxx.c: Likewise.
3299 * loader/i386/bsd_helper.S: Likewise.
3300 * loader/i386/bsd.c: Likewise.
3301 * loader/i386/linux_trampoline.S: Likewise.
3302 * loader/i386/xnu_helper.S: Likewise.
3303 * loader/i386/xnu.c: Likewise.
3304 * loader/i386/bsd_pagetable.c: Likewise.
3305 * loader/i386/multiboot_helper.S: Likewise.
3306 * loader/xnu.c: Likewise.
3307 * loader/xnu_resume.c: Likewise.
3308 * io/gzio.c: Likewise.
3309 * term/efi/console.c: Likewise.
3310 * term/terminfo.c: Likewise.
3311 * term/ieee1275/ofconsole.c: Likewise.
3312 * term/i386/pc/serial.c: Likewise.
3313 * term/i386/pc/vesafb.c: Likewise.
3314 * term/i386/pc/vga.c: Likewise.
3315 * term/usb_keyboard.c: Likewise.
3316 * term/gfxterm.c: Likewise.
3317 * aclocal.m4: Likewise.
3318 * util/lvm.c: Likewise.
3319 * util/grub.d/30_os-prober.in: Likewise.
3320 * util/grub.d/10_hurd.in: Likewise.
3321 * util/console.c: Likewise.
3322 * util/grub-macho2img.c: Likewise.
3323 * util/grub-probe.c: Likewise.
3324 * util/hostfs.c: Likewise.
3325 * util/i386/pc/grub-mkimage.c: Likewise.
3326 * util/i386/pc/grub-setup.c: Likewise.
3327 * util/i386/efi/grub-mkimage.c: Likewise.
3328 * util/grub-mkconfig.in: Likewise.
3329 * util/raid.c: Likewise.
3330 * util/resolve.c: Likewise.
3331 * util/grub-mkdevicemap.c: Likewise.
3332 * util/grub-emu.c: Likewise.
3333 * util/getroot.c: Likewise.
3334 * util/hostdisk.c: Likewise.
3335 * util/usb.c: Likewise.
3336 * util/grub-editenv.c: Likewise.
3337 * util/misc.c: Likewise.
3338
d2d49665 33392009-06-10 Felix Zielcke <fzielcke@z-51.de>
3340
3341 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
3342 `genparttoollist.sh'.
3343 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
3344 Add `*.sh' to the list find searches for and change `mdate.sh'
3345 to `mdate-sh'.
3346
fe052e37 33472009-06-10 Pavel Roskin <proski@gnu.org>
3348
2763ac18 3349 * include/grub/multiboot2.h: Provide compatibility defines for
3350 multiboot2.h.
3351 * include/multiboot2.h: Include stdint.h only if needed, using
3352 angle brackets.
3353 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
3354 grub/multiboot2.h.
3355 * loader/ieee1275/multiboot2.c: Likewise.
3356 * loader/multiboot2.c: Likewise.
3357 * loader/multiboot_loader.c: Likewise.
3358
437e6adc 3359 * configure.ac: Use -nostdlib when probing for the target. It
3360 should not be required to have libc for the target.
3361
06a6836c 3362 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
3363 they fail without libc headers for the target.
3364 * include/grub/powerpc/libgcc.h: Use weak attribute for all
3365 exports.
3366 * include/grub/sparc64/libgcc.h: Likewise. Don't use
3367 preprocessor conditionals.
3368
fe052e37 3369 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
3370 build system doesn't need to be aware of the tar.c internals.
3371
afd22553 33722009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 3373
afd22553 3374 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 3375
6b787c4f 33762009-06-09 Robert Millan <rmh.grub@aybabtu.com>
3377
3378 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
3379 disk limit to 26 for IDE, Virtio, Xen and SCSI.
3380
33812009-06-09 Felix Zielcke <fzielcke@z-51.de>
3382
3383 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 3384 aren't available if ata.mod gets used.
6b787c4f 3385
473d1e45 33862009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 3387
473d1e45 3388 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 3389 initialising controller.
473d1e45 3390 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 3391
255a27d4 33922009-06-08 Felix Zielcke <fzielcke@z-51.de>
3393
3394 * util/i386/pc/grub-install.in: Add a parameter --disk-module
3395 to choose between ata and biosdisk module on i386-pc.
3396
473d1e45 33972009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 3398
d55842d8 3399 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
3400 Subclass and Programming Interface fields in terms of the 3 byte
3401 Class Code register.
3402 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3403
fa5db0b1 3404 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
3405 interface is OHCI. Add grub_dprintf for symmetry with
3406 bus/usb/uhci.c.
3407 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
3408 interface is UHCI. Add interf variable for programming
3409 interface. Print interface with class/subclass.
3410
c0947beb 3411 * bus/usb/ohci.c: Set interf with correct field.
3412
69da8877 3413 * bus/usb/uhci.c: Remove unneeded doubled lines.
3414 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
3415 Remove whitespace inside comment.
3416
9e172e30 34172009-06-08 Robert Millan <rmh.grub@aybabtu.com>
3418
3419 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
3420 as fallback an equivalent option without depth.
3421
de65ee2b 34222009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3423
3424 Not fail if unable to retrieve C/H/S on LBA disks
3425
473d1e45 3426 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 3427 if unable to retrieve C/H/S on LBA disks
3428
b57ea2c9 34292009-06-08 Pavel Roskin <proski@gnu.org>
3430
3431 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
3432 about aliasing.
3433
af361263 34342009-06-08 Felix Zielcke <fzielcke@z-51.de>
3435
3436 * Makefile.in (uninstall): Remove all $lib_DATA files.
3437
4c9ec6b3 34382009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3439
3440 Bugfix: install on partitionless device
3441
3442 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
3443 is a whole disk
3444
e76fc924 34452009-06-08 Felix Zielcke <fzielcke@z-51.de>
3446
3447 * Makefile.in (uninstall): Remove all $include_DATA files.
3448
ba5a0d05 34492009-06-08 Felix Zielcke <fzielcke@z-51.de>
3450
3451 * commands/true.c: New file. Implement the true and false commands.
3452 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
3453 (true_mod_SOURCES): New variable.
3454 (true_mod_CFLAGS): Likewise.
3455 (true_mod_LDFLAGS): Likewise.
3456
c8048e32 34572009-06-05 Colin D Bennett <colin@gibibit.com>
3458
3459 Optimized font character lookup using binary search instead of linear
3460 search. Fonts now are required to have the character index ordered by
3461 code point.
3462
3463 * font/font.c (load_font_index): Verify that fonts have ordered
3464 character indices.
3465 (find_glyph): Use binary search instead of linear search to find a
3466 character in a font.
3467
408305be 34682009-06-05 Michael Scherer <misc@mandriva.org>
3469
3470 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
3471 uses case sensitive btree.
3472 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
3473 only for case insensitive filesystems.
3474
8ee1e0d9 34752009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
3476
3477 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
3478 * conf/common.rmk (search_mod_CFLAGS): likewise
3479
a9966eb1 34802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3481
473d1e45 3482 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 3483 compensate a compiler bug
3484
9e7100fb 34852009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3486
473d1e45 3487 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 3488 instead of '\b'
473d1e45 3489
ede21d71 34902009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3491
3492 Definitions for creating asm symbols with Apple's CC
3493
3494 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
3495 [APPLE_CC] (VARIABLE): likewise
3496
9dbf7653 34972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3498
3499 Disable lnxboot.img when compiled
3500 with Apple's CC
3501
3502 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
3503 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
3504 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
3505 [! APPLE_CC] (CODE_LENG): skip
3506 [! APPLE_CC] (setup_sects): likewise
3507 [! APPLE_CC]: skip filling
473d1e45 3508
e93cdc3d 35092009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3510
3511 Address in trampolines based on 32-bit registers when compiled
3512 with Apple's CC
3513
473d1e45 3514 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 3515 for addresses
3516 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
3517
6c688477 35182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3519
3520 Avoid aliases when compiling with Apple's CC for PCBIOS machine
3521
3522 * kern/misc.c [APPLE_CC] (memcpy): new function
3523 [APPLE_CC] (memmove): likewise
3524 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 3525 (memcpy): define alias conditionally on !APPLE_CC
6c688477 3526 (memset): likewise
3527 (abort): likewise
3528 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
3529 APPLE_CC are defined
3530 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
3531 (grub_assert_fail): make prototype conditional
3532
e37ffc5c 35332009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3534
3535 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
3536
473d1e45 3537 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
3538 grub-macho2img
e37ffc5c 3539 (CLEANFILES): add grub-macho2img
3540 (grub_macho2img_SOURCES): new variable
3541 * kern/i386/pc/startup.S (bss_start): new variable
3542 (bss_end): likewise
3543 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
3544 * util/grub-macho2img.c: new file
3545
cf00df31 35462009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3547
3548 Use objconv when compiling with Apple's CC
3549
3550 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
3551 (efiemu64.o): likewise
3552 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
3553 when compiling with Apple's CC
3554 (efiemu64_s.o): likewise
3555 * configure.ac: check for objconv when compiling with Apple's CC
3556 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 3557
d119a20c 35582009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3559
3560 Define segment as well as section when compiling with
3561 Apple's CC
3562
3563 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
3564 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
3565 (efiemu_convert_pointer): likewise
3566 (efiemu_set_virtual_address_map): likewise
3567 (efiemu_convert_pointer): likewise
3568 (efiemu_getcrc32): likewise
3569 (init_crc32_table): likewise
3570 (reflect): likewise
3571 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
3572 (GRUB_MOD_DEP): likewise
473d1e45 3573
c8600122 35742009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3575
3576 Allow a compilation without -mcmodel=large
3577
3578 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
3579 when compiled without -mcmodel=large
473d1e45 3580 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 3581 without -mcmodel=large
473d1e45 3582 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 3583 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 3584
e8df1d4e 35852009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3586
3587 Remove nested functions in efiemu core
3588
3589 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 3590
cc6c3ac1 35912009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3592
3593 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
3594
3595 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
3596 temporary storage
473d1e45 3597 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
3598 using Apple's CC
cc6c3ac1 3599 (grub_cpu_is_tsc_supported): likewise
3600 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 3601
3e325901 36022009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3603
3604 Absolute addressing through constant with Apple's cc
3605
3606 * kern/i386/pc/startup.S: Define necessary constants
3607 and address through it when using ABS with Apple's CC
3608 * boot/i386/pc/diskboot.S: likewise
3609 * boot/i386/pc/boot.S: likewise
3610 * boot/i386/pc/lnxboot.S: likewise
3611 * boot/i386/pc/cdboot.S: likewise
3612 * mmap/i386/pc/mmap_helper.S: likewise
3613 * commands/i386/pc/drivemap_int13h.S: likewise
3614
2b167a72 36152009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3616
3617 Check if compiler is apple cc
3618
3619 * Makefile.in (ASFLAGS): new variable
3620 (TARGET_ASFLAGS): likewise
3621 (TARGET_MODULE_FORMAT): likewise
3622 (TARGET_APPLE_CC): likewise
3623 (OBJCONV): likewise
3624 (TARGET_IMG_CFLAGS): likewise
3625 (TARGET_CPPFLAGS): add includedir
3626 * configure.ac: call grub_apple_cc and grub_apple_target_cc
3627 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3628 Check for linker script only if compiler isn't Apple's CC
3629 (TARGET_MODULE_FORMAT): set
3630 (TARGET_APPLE_CC): likewise
3631 (TARGET_ASFLAGS): likewise
3632 (ASFLAGS): likewise
3633 Check for objcopy only if compiler isn't Apple's CC
3634 Check for BSS symbol only if compiler isn't Apple's CC
3635 * genmk.rb: adapt nm options if we use Apple's utils
3636 * aclocal.m4 (grub_apple_cc): new test
3637 (grub_apple_target_cc): likewise
473d1e45 3638
fb14123e 36392009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3640
3641 Simplify sed expressions and improve awk
3642
3643 * Makefile.in (install-local): simplify sed expression
3644 * gencmdlist.sh: likewise
3645 * genmoddep.awk: avoid adding module as a dependency of itself
3646
5b889789 36472009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3648
3649 Add missing start symbols
3650
3651 * boot/i386/pc/boot.S: add start
fb14123e 3652 * boot/i386/pc/pxeboot.S: likewise
473d1e45 3653
fd2bf2e3 36542009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3655
3656 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 3657
3658 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 3659 (relocate_addresses): consider both r_addend and value at offset
3660 (make_mods_section): zerofill modinfo and header
3661 (convert_elf): write prefix here
473d1e45 3662
5389763d 36632009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3664
3665 Use .asciz instead of .string
3666
3667 * i386/pc/diskboot.S: use .asciz instead of .string
3668 * i386/pc/boot.S: likewise
3669 * include/grub/dl.h (GRUB_MOD_DEP): likewise
3670 (GRUB_MOD_NAME): likewise
473d1e45 3671
3eb5ed4e 36722009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3673
3674 gfxpayload support
3675
3676 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
3677 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
3678 (grub_video_setup): remove
3679 (grub_video_set_mode): new prototype
3680 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
3681 (vid_mode): remove
3682 (linux_vesafb_res): compile only on PCBIOS
3683 (grub_linux_boot): support gfxpayload
3684 * loader/i386/pc/xnu.c (video_hook): new function
3685 (grub_xnu_set_video): support gfxpayload
3686 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
3687 (DEFAULT_VIDEO_HEIGHT): likewise
3688 (DEFAULT_VIDEO_FLAGS): likewise
3689 (DEFAULT_VIDEO_MODE): new definition
3690 (video_hook): new function
3691 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 3692 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 3693 loading xnu
3694 * video/video.c (grub_video_setup): removed
473d1e45 3695 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 3696 grub_video_setup
3697
4b0e1143 36982009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3699
3700 Avoid calling biosdisk in drivemap
3701
3702 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
3703 (revparse_biosdisk): likewise
3704 (list_mappings): derive name from id directly
3705 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 3706
fda6cb98 37072009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3708
3709 Script fixes
3710
3711 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
3712 (grub_lexer_param): add tokenonhold
3713 (grub_script_create_cmdline): remove cmdline. All callers updated
3714 (grub_script_function_create): make functionname
3715 grub_script_arg. All callers updated
3716 (grub_script_execute_argument_to_string): new prototype
3717 * kern/parser.c (state_transitions): reorder
3718 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 3719 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 3720 make global
3721 (grub_script_execute_cmdline): use new format
3722 * script/sh/function.c (grub_script_function_create): make functionname
3723 grub_script_arg. All callers updated
473d1e45 3724 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 3725 (grub_script_yylex): remove
3726 (grub_script_yylex2): renamed to ...
3727 (grub_script_yylex): ...renamed
3728 parse the expressions like a${b}c
3729 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
3730 (GRUB_PARSER_TOKEN_VAR): remove
3731 (GRUB_PARSER_TOKEN_NAME): likewise
3732 ("if"): declare as typeless
3733 ("while"): likewise
3734 ("function"): likewise
3735 ("else"): likewise
3736 ("then"): likewise
3737 ("fi"): likewise
3738 (text): remove
3739 (argument): likewise
3740 (script): accept empty scripts and make exit on error
3741 (arguments): use GRUB_PARSER_TOKEN_ARG
3742 (function): likewise
3743 (command): move error handling to script
3744 (menuentry): move grub_script_lexer_ref before
473d1e45 3745 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 3746 argument. All callers updated
3747
f4448a07 37482009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3749
3750 Prevent GRUB from probing floppies during boot.
3751
3752 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
3753 * commands/search.c (options): Add --no-floppy.
3754 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
3755 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
3756 --no-floppy when searching for UUIDs.
3757
2bf5885a 37582009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3759
3760 Simplify the code duplication in commands/search.c.
3761
3762 * commands/search.c (search_label, search_fs_uuid): Merge into ...
3763 (search_fs): ... this. Update all users.
3764
f6fd460a 37652009-06-03 Felix Zielcke <fzielcke@z-51.de>
3766
3767 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
3768
cbb3c83e 37692009-05-28 Pavel Roskin <proski@gnu.org>
3770
57788cfd 3771 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
3772 Remove the original symlink explicitly.
3773
cbb3c83e 3774 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
3775 just one slash. That's how grub_fshelp_find_file() does it.
3776
cd0d5e30 37772009-05-26 Pavel Roskin <proski@gnu.org>
3778
f0f8bbe2 3779 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
3780 to `str'.
3781
cd0d5e30 3782 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
3783 possibly unused.
3784
8c2cab51 37852009-05-25 Christian Franke <franke@computer.org>
3786
3787 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
3788 register.
3789 (grub_atapi_identify): Add wait after drive select.
3790 (grub_ata_identify): Do more strict status register check before
3791 calling grub_atapi_identify (). Suppress error message if status
3792 register is 0x00 after command failure. Add status register
3793 check after PIO read to avoid bogus identify due to stuck DRQ.
3794 Thanks to Pavel Roskin for testing.
3795 (grub_device_initialize): Remove unsafe status register check.
3796 Thanks to 'phcoder' for problem report and patch.
3797 Prevent sign extension in debug message.
3798
230c0ad6 37992009-05-23 Colin D Bennett <colin@gibibit.com>
3800
3801 Cleaned up `include/grub/normal.h'. Grouped prototypes by
3802 definition file, and functions defined in `normal/menu.c' have had
3803 their prototypes moved to `include/grub/menu.h' for consistency.
3804
3805 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
3806 from normal.h.
3807 (grub_menu_get_entry): Likewise.
3808 (grub_menu_get_timeout): Likewise.
3809 (grub_menu_set_timeout): Likewise.
3810 (grub_menu_execute_entry): Likewise.
3811 (grub_menu_execute_with_fallback): Likewise.
3812 (grub_menu_entry_run): Likewise.
3813
3814 * include/grub/normal.h: Re-ordered and grouped function
3815 prototypes by file that the function is defined in.
3816 (grub_menu_execute_callback): Removed; moved to menu.h.
3817 (grub_menu_get_entry): Likewise.
3818 (grub_menu_get_timeout): Likewise.
3819 (grub_menu_set_timeout): Likewise.
3820 (grub_menu_execute_entry): Likewise.
3821 (grub_menu_execute_with_fallback): Likewise.
3822 (grub_menu_entry_run): Likewise.
3823 (grub_menu_addentry): Renamed from this ...
3824 (grub_normal_add_menu_entry): ... to this.
3825
3826 * normal/main.c (grub_menu_addentry): Renamed from this ...
3827 (grub_normal_add_menu_entry): ... to this.
3828
3829 * script/sh/execute.c (grub_script_execute_menuentry): Update
3830 reference to renamed grub_menu_addentry function.
3831
861f03a5 38322009-05-23 Felix Zielcke <fzielcke@z-51.de>
3833
3834 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
3835
96b1619a 38362009-05-22 Pavel Roskin <proski@gnu.org>
3837
bf6a5fb2 3838 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
3839 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
3840 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
3841 compiling for the i386 targets, but not for the utilities.
3842
96b1619a 3843 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
3844 to grub_uint8_t.
3845 (grub_root_drive): Likewise.
3846 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
3847 remove alignment.
3848 (grub_root_drive): Change size to byte.
3849 (grub_start_addr): Remove.
3850 (grub_end_addr): Likewise.
3851 (grub_apm_bios_info): Likewise.
3852
b729776b 38532009-05-21 Felix Zielcke <fzielcke@z-51.de>
3854
3855 * normal/i386: Remove.
3856 * normal/powerpc: Likewise.
3857 * normal/sparc64: Likewise.
3858 * normal/x86_64: Likewise.
3859
0a15ce80 38602009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
3861
3862 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 3863 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 3864 * loader/i386/xnu_helper.S: Likewise
d6da58e6 3865
33db9015 38662009-05-18 Colin D Bennett <colin@gibibit.com>
3867
d6da58e6 3868 Display error messages when parsing a Lua statement fails.
3869 Previously, executing a syntactically invalid statement like
3870 ")foo" or "bar;" would silently fail.
33db9015 3871
3872 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 3873 (grub_lua_parse_line): Improved reporting of Lua parser and
3874 execution errors.
33db9015 3875
46422c89 38762009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
3877
3878 Remove -Werror which causes build to fail on some systems
3879
3880 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
3881 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
3882 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 3883
22f53a96 38842009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
3885
3886 trampoline for linux on 64-bit platform
3887
18f547ad 3888 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
3889 loader/i386/efi/linux_trampoline.S
3890 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 3891 declaration
d6da58e6 3892 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
3893 here
22f53a96 3894 * loader/i386/linux_trampoline.S: moved here
d6da58e6 3895 * loader/i386/efi/linux.c (allocate_pages): reserve space for
3896 trampoline
22f53a96 3897 (jumpvector): removed
3898 (grub_linux_trampoline_start): new declaration
3899 (grub_linux_trampoline_end): likewise
3900 (grub_linux_boot): use trampoline when on 64-bit platform
3901 * loader/i386/linux.c: likewise
3902
cb5a0f40 39032009-05-16 Pavel Roskin <proski@gnu.org>
3904
3905 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
3906 const to avoid a warning.
3907 (grub_lua_setenv): Likewise.
3908 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3909 lmsg to fix a warning.
3910
334f2c28 39112009-05-16 Felix Zielcke <fzielcke@z-51.de>
3912
3913 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 3914 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3915 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3916 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3917 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3918 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3919 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3920 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 3921
59e5d3ec 39222009-05-16 Felix Zielcke <fzielcke@z-51.de>
3923
3924 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3925
9d87a1ba 39262009-05-16 Bean <bean123ch@gmail.com>
3927
3928 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3929 (lua_mod_SOURCES): New variable.
3930 (lua_mod_CFLAGS): Likewise.
3931 (lua_mod_LDFLAGS): Likewise.
3932
3933 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3934 (setjmp_mod_SOURCES): New variable.
3935 (setjmp_mod_CFLAGS): Likewise.
3936 (setjmp_LDFLAGS): Likewise.
3937
3938 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3939 (setjmp_mod_SOURCES): New variable.
3940 (setjmp_mod_CFLAGS): Likewise.
3941 (setjmp_LDFLAGS): Likewise.
3942
3943 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3944 (setjmp_mod_SOURCES): New variable.
3945 (setjmp_mod_CFLAGS): Likewise.
3946 (setjmp_LDFLAGS): Likewise.
3947
3948 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3949 (setjmp_mod_SOURCES): New variable.
3950 (setjmp_mod_CFLAGS): Likewise.
3951 (setjmp_LDFLAGS): Likewise.
3952
3953 * normal/i386/setjmp.S: Moved from here ...
3954 * lib/i386/setjmp.S: ... Moved here
3955 * normal/x86_64/setjmp.S: Moved from here ...
3956 * lib/x86_64/setjmp.S: ... Moved here
3957 * normal/powerpc/setjmp.S: Moved from here ...
3958 * lib/powerpc/setjmp.S: ... Moved here
3959 * normal/sparc64/setjmp.S: Moved from here ...
3960 * lib/sparc64/setjmp.S: ... Moved here
3961
3962 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3963 returns_twice in mingw.
3964
3965 * script/lua/grub_lib.c: New file.
3966 * script/lua/grub_lib.h: Likewise.
3967 * script/lua/grub_lua.h: Likewise.
3968 * script/lua/grub_main.c: Likewise.
3969 * script/lua/lapi.c: Likewise.
3970 * script/lua/lapi.h: Likewise.
3971 * script/lua/lauxlib.c: Likewise.
3972 * script/lua/lauxlib.h: Likewise.
3973 * script/lua/lbaselib.c: Likewise.
3974 * script/lua/lcode.c: Likewise.
3975 * script/lua/lcode.h: Likewise.
3976 * script/lua/ldblib.c: Likewise.
3977 * script/lua/ldebug.c: Likewise.
3978 * script/lua/ldebug.h: Likewise.
3979 * script/lua/ldo.c: Likewise.
3980 * script/lua/ldo.h: Likewise.
3981 * script/lua/ldump.c: Likewise.
3982 * script/lua/lfunc.c: Likewise.
3983 * script/lua/lfunc.h: Likewise.
3984 * script/lua/lgc.c: Likewise.
3985 * script/lua/lgc.h: Likewise.
3986 * script/lua/linit.c: Likewise.
3987 * script/lua/liolib.c: Likewise.
3988 * script/lua/llex.c: Likewise.
3989 * script/lua/llex.h: Likewise.
3990 * script/lua/llimits.h: Likewise.
3991 * script/lua/lmathlib.c: Likewise.
3992 * script/lua/lmem.c: Likewise.
3993 * script/lua/lmem.h: Likewise.
3994 * script/lua/loadlib.c: Likewise.
3995 * script/lua/lobject.c: Likewise.
3996 * script/lua/lobject.h: Likewise.
3997 * script/lua/lopcodes.c: Likewise.
3998 * script/lua/lopcodes.h: Likewise.
3999 * script/lua/loslib.c: Likewise.
4000 * script/lua/lparser.c: Likewise.
4001 * script/lua/lparser.h: Likewise.
4002 * script/lua/lstate.c: Likewise.
4003 * script/lua/lstate.h: Likewise.
4004 * script/lua/lstring.c: Likewise.
4005 * script/lua/lstring.h: Likewise.
4006 * script/lua/lstrlib.c: Likewise.
4007 * script/lua/ltable.c: Likewise.
4008 * script/lua/ltable.h: Likewise.
4009 * script/lua/ltablib.c: Likewise.
4010 * script/lua/ltm.c: Likewise.
4011 * script/lua/ltm.h: Likewise.
4012 * script/lua/lua.h: Likewise.
4013 * script/lua/luaconf.h: Likewise.
4014 * script/lua/lualib.h: Likewise.
4015 * script/lua/lundump.c: Likewise.
4016 * script/lua/lundump.h: Likewise.
4017 * script/lua/lvm.c: Likewise.
4018 * script/lua/lvm.h: Likewise.
4019 * script/lua/lzio.c: Likewise.
4020 * script/lua/lzio.h: Likewise.
4021
5e898c9d 40222009-05-16 Bean <bean123ch@gmail.com>
4023
4024 * include/grub/kernel.h (grub_module_header_types): Add type
4025 OBJ_TYPE_CONFIG.
4026
4027 * kern/main.c (grub_load_config): New function.
4028 (grub_main): Call grub_load_config to read boot config.
4029
4030 * grub-mkimage (generate_image): New parameter config_path.
4031 (options): New option --config.
4032 (main): Parse --config option, and pass it to generate_image.
4033
cf353a47 40342009-05-14 Christian Franke <franke@computer.org>
4035
4036 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4037 This fixes build on Cygwin.
4038
3834887f 40392009-05-14 Pavel Roskin <proski@gnu.org>
4040
4041 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
4042 jump. This saves two bytes, so the typical case of 2 swapped
4043 drives would fit 32 bytes.
4044
8090fc01 40452009-05-13 Pavel Roskin <proski@gnu.org>
4046
ac963883 4047 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
4048 grub_uint32_t to avoid a warning.
4049
8090fc01 4050 * loader/i386/linux.c (allocate_pages): When assigning
4051 real_mode_mem, cast through grub_size_t to fix a warning. The
4052 code already makes sure that the value would fit a pointer.
4053 (grub_linux_setup_video): Cast render_target->data to
4054 grub_size_t to fix a warning.
4055
18f547ad 40562009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 4057
4058 * commands/i386/pc/drivemap.c: New file - implement drivemap
4059 command.
4060 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
4061 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
4062
6f6a8b28 40632009-05-13 Pavel Roskin <proski@gnu.org>
4064
4065 * util/i386/pc/grub-setup.c (setup): Remove unused variable
4066 embedding_area_exists.
4067
15fbf4c4 40682009-05-13 Robert Millan <rmh.grub@aybabtu.com>
4069
4070 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4071 it easier to understand / work with.
59978c8a 4072 Improve warning messages for cases where there's no embedding area,
4073 or when it is too small (or core.img too large).
15fbf4c4 4074
238e871f 40752009-05-13 Pavel Roskin <proski@gnu.org>
4076
0ab3a9a4 4077 * loader/i386/pc/multiboot2.c: Add necessary includes for
4078 grub_multiboot2_real_boot().
4079
a2c8c5f8 4080 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
4081 PX record is always little-endian. We only need the lower 2
4082 bytes of the mode.
4083
faec96af 4084 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
4085 facilitate code reuse.
4086 (grub_cpio_mount): Use "struct head", not a char buffer. This
4087 fixes a warning reported by gcc 4.4.
4088
238e871f 4089 * kernel/disk.c (grub_disk_read): Use void pointer for the
4090 buffer.
4091 (grub_disk_write): Use const void pointer for the buffer.
4092 Adjust all callers. Remove unnecessary casts.
4093
901d2f0c 40942009-05-10 Robert Millan <rmh.grub@aybabtu.com>
4095
4096 * util/i386/pc/grub-install.in: Update copyright year.
4097
18f547ad 40982009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 4099
4100 gptsync
4101
4102 * commands/gptsync.c: new file
4103 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
4104 (gptsync_mod_SOURCES): new variable
4105 (gptsync_mod_CFLAGS): likewise
4106 (gptsync_mod_LDFLAGS): likewise
18f547ad 4107 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 4108 new definition
4109 (GRUB_PC_PARTITION_TYPE_HFS): likewise
4110 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
4111 * conf/i386-ieee1275.rmk: likewise
4112 * conf/i386-pc.rmk: likewise
4113 * conf/powerpc-ieee1275.rmk: likewise
4114
b4ba690a 41152009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
4116
4117 Fixed grub-emu
4118
4119 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
4120 (grub_dl_ref): likewise
4121
317e1a44 41222009-05-08 Robert Millan <rmh.grub@aybabtu.com>
4123
4124 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
4125 split in two functions (one for msdos and one for gpt).
4126
041b8094 41272009-05-08 Pavel Roskin <proski@gnu.org>
4128
752473c2 4129 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
4130 not modified.
4131
041b8094 4132 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4133 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
4134 Initialize them with -1. Add sanity check for bad1. Eliminate
4135 nerr variable.
4136
172800ce 41372009-05-08 David S. Miller <davem@davemloft.net>
4138
4139 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
4140
29aa5e81 41412009-05-06 Robert Millan <rmh.grub@aybabtu.com>
4142
4143 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 4144 existence.
29aa5e81 4145
96613b62 41462009-05-05 Felix Zielcke <fzielcke@z-51.de>
4147
4148 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 4149 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 4150
eef73c8a 41512009-05-05 David S. Miller <davem@davemloft.net>
4152
4153 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
4154
119494b5 41552009-05-05 Pavel Roskin <proski@gnu.org>
4156
4157 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
4158 of grub_dl_ref() and grub_dl_unref().
4159 * commands/parttool.c: Remove preprocessor conditionals around
4160 grub_dl_ref() and grub_dl_unref().
4161 * fs/affs.c: Likewise.
4162 * fs/afs.c: Likewise.
4163 * fs/cpio.c: Likewise.
4164 * fs/ext2.c: Likewise.
4165 * fs/fat.c: Likewise.
4166 * fs/hfs.c: Likewise.
4167 * fs/hfsplus.c: Likewise.
4168 * fs/iso9660.c: Likewise.
4169 * fs/jfs.c: Likewise.
4170 * fs/minix.c: Likewise.
4171 * fs/ntfs.c: Likewise.
4172 * fs/reiserfs.c: Likewise.
4173 * fs/sfs.c: Likewise.
4174 * fs/udf.c: Likewise.
4175 * fs/ufs.c: Likewise.
4176 * fs/xfs.c: Likewise.
4177 * include/grub/dl.h: Likewise.
4178 * loader/xnu.c: Likewise.
4179
de5fd76e 41802009-05-04 Pavel Roskin <proski@gnu.org>
4181
4182 * commands/acpi.c: Remove unused variable my_mod.
4183 * partmap/amiga.c: Likewise.
4184 * partmap/apple.c: Likewise.
4185 * partmap/gpt.c: Likewise.
4186 * partmap/pc.c: Likewise.
4187 * partmap/sun.c: Likewise.
4188 * term/gfxterm.c: Likewise.
4189 * term/i386/pc/vesafb.c: Likewise.
4190 * term/i386/pc/vga.c: Likewise.
4191
983598ad 41922009-05-04 David S. Miller <davem@davemloft.net>
4193
4194 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
4195 pointer args to grub_ieee1275_get_property().
4196
8aadec43 4197 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
4198
9554b15e 4199 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
4200 devices, and do not traverse down under controller nodes.
4201
67e23c90 4202 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
4203 (grub_ofdisk_open): Use it to un-escape "," characters.
4204 * kern/disk.c (find_part_sep): New.
4205 (grub_disk_open): Use it to find the first non-escaped ','
4206 character in the disk name.
4207 * util/ieee1275/devicemap.c (escape_of_path): New.
4208 (grub_util_emit_devicemap_entry): Use it.
4209 * util/sparc64/ieee1275/grub-install.in: Update script to
4210 strip partition specifiers properly by not triggering on
4211 '\' escaped ',' characters.
4212
74bfdd2f 42132009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4214
4215 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
4216 to 0x300.
4217 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
4218 resolutions.
4219 (linux_vesafb_modes): Add a lot of additional modes to the list (based
4220 on documentation from Wikipedia).
4221
4241d2b1 42222009-05-04 Pavel Roskin <proski@gnu.org>
4223
4224 * disk/ata.c: Spelling fixes.
4225 * disk/raid.c: Likewise.
4226 * disk/usbms.c: Likewise.
4227 * disk/dmraid_nvidia.c: Likewise.
4228 * kern/ieee1275/openfw.c: Likewise.
4229 * kern/ieee1275/init.c: Likewise.
4230 * kern/ieee1275/cmain.c: Likewise.
4231 * boot/i386/pc/cdboot.S: Likewise.
4232 * video/readers/png.c: Likewise.
4233 * video/i386/pc/vbe.c: Likewise.
4234 * fs/udf.c: Likewise.
4235 * fs/hfs.c: Likewise.
4236 * fs/reiserfs.c: Likewise.
4237 * efiemu/runtime/efiemu.c: Likewise.
4238 * efiemu/main.c: Likewise.
4239 * efiemu/mm.c: Likewise.
4240 * include/grub/elf.h: Likewise.
4241 * include/grub/xnu.h: Likewise.
4242 * include/grub/usbdesc.h: Likewise.
4243 * include/grub/usb.h: Likewise.
4244 * include/grub/script_sh.h: Likewise.
4245 * include/grub/lib/LzmaEnc.h: Likewise.
4246 * include/grub/efiemu/efiemu.h: Likewise.
4247 * include/grub/command.h: Likewise.
4248 * normal/menu.c: Likewise.
4249 * normal/main.c: Likewise.
4250 * normal/datetime.c: Likewise.
4251 * bus/usb/uhci.c: Likewise.
4252 * mmap/i386/uppermem.c: Likewise.
4253 * mmap/mmap.c: Likewise.
4254 * commands/acpi.c: Likewise.
4255 * commands/test.c: Likewise.
4256 * partmap/apple.c: Likewise.
4257 * font/font.c: Likewise.
4258 * loader/sparc64/ieee1275/linux.c: Likewise.
4259 * loader/macho.c: Likewise.
4260 * loader/i386/bsd_trampoline.S: Likewise.
4261 * loader/i386/bsd.c: Likewise.
4262 * loader/xnu.c: Likewise.
4263 * term/i386/pc/vesafb.c: Likewise.
4264 * term/usb_keyboard.c: Likewise.
4265 * util/resolve.c: Likewise.
4266 * util/getroot.c: Likewise.
4267
0cfc0083 42682009-05-04 Felix Zielcke <fzielcke@z-51.de>
4269
4270 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
4271
7c1d00cd 42722009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4273
4274 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
4275 build error.
4276
b01f0548 42772009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4278
4279 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
4280 parameter only available on BIOS.
4281
ecc3eb22 42822009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4283
4284 Removed wrong semicolon in declaration
4285
4286 * grub/misc.h (grub_dprintf): remove semicolon
4287
112972a9 42882009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4289
4290 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
4291 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
4292 is done by grub_cmd_linux() now).
4293 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
4294 restore video to text mode.
4295 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
4296 indicates lack of "vga=" parameter. "vga=0" is mapped to
4297 `GRUB_LINUX_VID_MODE_NORMAL'.
4298
afd5c115 42992009-05-04 Felix Zielcke <fzielcke@z-51.de>
4300
4301 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
4302 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
4303 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 4304 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 4305 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
4306 `grub_script.tab.c'.
4307
4308 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4309 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4310 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4311 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4312 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4313
faa517ce 4314 * Makefile.in: Remove duplicated 2008 in Copyright line.
4315
ae0c0bdc 43162009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4317
473d1e45 4318 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 4319 unconditionally.
4320 * include/grub/util/misc.h (grub_util_warn): New declaration.
4321
4322 * util/i386/pc/grub-install.in: Understand --force and pass it down
4323 to grub-setup.
4324
4325 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
4326 down to setup().
4327 (setup): Improve error messages and add warnings when requested to
4328 install in odd layouts. Refuse to install using blocklists unless
4329 --force was set.
4330
18f547ad 43312009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 4332
4333 * disk/raid.c (grub_raid_scan_device): Improve debug message.
4334
6d260daa 43352009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4336
4337 Updated copyright year
4338
4339 * fs/hfsplus.c: updated copyright year
18f547ad 4340
69f853f8 43412009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4342
4343 HFS+ UUID
4344
18f547ad 4345 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 4346 in the space previously used by unused3
4347 (grub_hfsplus_uuid): new function
4348 (grub_hfsplus_fs): added uuid field
4349
4c402e73 43502009-05-03 Pavel Roskin <proski@gnu.org>
4351
4352 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
4353 suppress warnings. It's no longer needed.
4354 * disk/host.c: Likewise.
4355 * disk/ata_pthru.c: Likewise.
4356 * disk/loopback.c: Likewise.
4357 * hook/datehook.c: Likewise.
4358 * parttool/pcpart.c: Likewise.
4359 * fs/i386/pc/pxe.c: Likewise.
4360 * fs/ntfscomp.c: Likewise.
4361 * efiemu/main.c: Likewise.
4362 * mmap/mmap.c: Likewise.
4363 * commands/crc.c: Likewise.
4364 * commands/hexdump.c: Likewise.
4365 * commands/hdparm.c: Likewise.
4366 * commands/acpi.c: Likewise.
4367 * commands/echo.c: Likewise.
4368 * commands/minicmd.c: Likewise.
4369 * commands/blocklist.c: Likewise.
4370 * commands/memrw.c: Likewise.
4371 * commands/loadenv.c: Likewise.
4372 * commands/usbtest.c: Likewise.
4373 * commands/lsmmap.c: Likewise.
4374 * commands/boot.c: Likewise.
4375 * commands/parttool.c: Likewise.
4376 * commands/configfile.c: Likewise.
4377 * commands/search.c: Likewise.
4378 * commands/ieee1275/suspend.c: Likewise.
4379 * commands/cat.c: Likewise.
4380 * commands/i386/pc/pxecmd.c: Likewise.
4381 * commands/i386/pc/play.c: Likewise.
4382 * commands/i386/pc/halt.c: Likewise.
4383 * commands/i386/pc/vbeinfo.c: Likewise.
4384 * commands/i386/pc/vbetest.c: Likewise.
4385 * commands/lspci.c: Likewise.
4386 * commands/date.c: Likewise.
4387 * commands/handler.c: Likewise.
4388 * commands/ls.c: Likewise.
4389 * commands/test.c: Likewise.
4390 * commands/cmp.c: Likewise.
4391 * commands/efi/loadbios.c: Likewise.
4392 * commands/efi/fixvideo.c: Likewise.
4393 * commands/halt.c: Likewise.
4394 * commands/help.c: Likewise.
4395 * commands/reboot.c: Likewise.
4396 * hello/hello.c: Likewise.
4397 * script/sh/main.c: Likewise.
4398 * loader/xnu.c: Likewise.
4399 * term/terminfo.c: Likewise.
4400 * term/i386/pc/serial.c: Likewise.
4401 * term/usb_keyboard.c: Likewise.
4402
515b5079 44032009-05-03 David S. Miller <davem@davemloft.net>
4404
4405 * normal/menu.c: Include grub/parser.h
4406
dfc31a22 44072009-05-03 Pavel Roskin <proski@gnu.org>
4408
2fee74f1 4409 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
4410 not char*.
4411 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
4412 Suggested by Javier Martín <lordhabbit@gmail.com>
4413
dfc31a22 4414 * util/i386/pc/grub-mkrescue.in: Allow for the case when
4415 efiemu??.o doesn't exist.
4416 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
4417 copying.
4418
18f547ad 44192009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 4420
4421 FreeBSD 64-bit support
4422
18f547ad 4423 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 4424 and loader/i386/bsd_trampoline.S
4425 (bsd_mod_ASFLAGS): new variable
4426 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
4427 (FREEBSD_MODTYPE_KERNEL64): likewise
4428 (grub_bsd64_trampoline_start): likewise
4429 (grub_bsd64_trampoline_end): likewise
4430 (grub_bsd64_trampoline_selfjump): likewise
4431 (grub_bsd64_trampoline_gdt): likewise
4432 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
4433 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
4434 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
4435 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 4436 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 4437 of "attrib" member
4438 * loader/i386/bsd_pagetable.c: new file
4439 * loader/i386/bsd_trampoline.S: likewise
4440 * loader/i386/bsd.c (ALIGN_QWORD): new macro
4441 (ALIGN_VAR): likewise
4442 (entry_hi): new variable
4443 (kern_end_mdofs): likewise
4444 (is_64bit): likewise
4445 (grub_freebsd_add_meta): use ALIGN_VAR
4446 (grub_e820_mmap): new declaration
4447 (grub_freebsd_add_mmap): new function
4448 (grub_freebsd_add_meta_module): support 64 bit kernels
4449 (grub_freebsd_list_modules): use ALIGN_VAR
4450 (gdt_descriptor): new declaration
4451 (grub_freebsd_boot): support 64 bit kernels
4452 (grub_bsd_elf64_hook): new function
4453 (grub_bsd_load_elf): support elf64
4454
038c5720 44552009-05-03 Bean <bean123ch@gmail.com>
4456
4457 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4458 after we get the result of if statement.
4459
fc45fb58 44602009-05-03 Bean <bean123ch@gmail.com>
4461
4462 * Makefile.in (enable_efiemu): New variable.
4463
4464 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
4465 set.
4466 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
4467 path.
4468 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
4469 path, add -mno-red-zone option.
4470 (efiemu64_s.o): Likewise.
4471 (efiemu64.o): Use macro $^ for source file.
4472
4473 * configure.ac (--enable-efiemu): New option.
4474
bbee0f2b 44752009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
4476
4477 xnu support
4478
4479 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
4480 (pkglib_MODULES): add xnu.mod
4481 (xnu_mod_SOURCES): new variable
4482 (xnu_mod_CFLAGS): likewise
4483 (xnu_mod_LDFLAGS): likewise
4484 (xnu_mod_ASFLAGS): likewise
4485 * conf/i386-pc.rmk: likewise
4486 * conf/x86_64-efi.rmk: likewise
7dd4a573 4487 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 4488 new declaration
4489 * include/grub/i386/macho.h: new file
4490 * include/grub/i386/xnu.h: likewise
4491 * include/grub/macho.h: likewise
4492 * include/grub/machoload.h: likewise
4493 * include/grub/x86_64/macho.h: likewise
4494 * include/grub/x86_64/xnu.h: likewise
4495 * include/grub/xnu.h: likewise
4496 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
4497 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
4498 * loader/i386/efi/xnu.c: new file
4499 * loader/i386/pc/xnu.c: likewise
4500 * loader/i386/xnu.c: likewise
4501 * loader/i386/xnu_helper.S: likewise
4502 * loader/macho.c: likewise
4503 * loader/xnu.c: likewise
4504 * loader/xnu_resume.c: likewise
4505 * util/grub-dumpdevtree: likewise
4506 * include/grub/i386/pit.h: include grub/err.h
4507 (grub_pit_wait): export
4508 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 4509
5caf964d 45102009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4511
4512 Efiemu
7dd4a573 4513
5caf964d 4514 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 4515 _linux_efi, linux_efi.
4516 new files in grub-emu
5caf964d 4517 new targets efiemu32.o and efiemu64.o
4518 * loader/linux_normal_efiemu.c: likewise
4519 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 4520 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 4521 files to copy
4522 * include/grub/autoefi.h: new file
7dd4a573 4523 * include/grub/i386/efiemu.h: likewise
5caf964d 4524 * include/grub/i386/pc/efiemu.h: likewise
4525 * include/grub/efi/api.h: add LL suffix when necessary
4526 new definitions relating to tables
4527 * include/grub/efiemu/efiemu.h: new file
4528 * include/grub/efiemu/runtime.h: likewise
4529 * efiemu/prepare.c: likewise
4530 * efiemu/loadcore_common.c: likewise
4531 * efiemu/loadcore64.c: likewise
4532 * efiemu/runtime/efiemu.sh: likewise
4533 * efiemu/runtime/efiemu.S: likewise
4534 * efiemu/runtime/efiemu.c: likewise
4535 * efiemu/runtime/config.h: likewise
4536 * efiemu/prepare32.c: likewise
4537 * efiemu/main.c: likewise
4538 * efiemu/modules/pnvram.c: likewise
4539 * efiemu/modules/i386: likewise
4540 * efiemu/modules/i386/pc: likewise
4541 * efiemu/modules/acpi.c: likewise
4542 * efiemu/i386/pc/cfgtables.c: likewise
4543 * efiemu/i386/loadcore64.c: likewise
4544 * efiemu/i386/loadcore32.c: likewise
4545 * efiemu/prepare64.c: likewise
4546 * efiemu/loadcore.c: likewise
4547 * efiemu/symbols.c: likewise
4548 * efiemu/mm.c: likewise
4549 * efiemu/loadcore32.c: likewise
7dd4a573 4550
45512009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 4552
4553 ACPI spoofing
4554
4555 * commands/acpi.c: new file
4556 * commands/i386/pc/acpi.c: likewise
4557 * commands/efi/acpi.c: likewise
4558 * include/grub/acpi.h: likewise
4559 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
4560 (acpi_mod_SOURCES): new variable
4561 (acpi_mod_CFLAGS): likewise
4562 (acpi_mod_LDFLAGS): likewise
4563 * conf/i386-efi.rmk: likewise
4564 * conf/x86_64-efi.rmk: likewise
4565
7dd4a573 45662009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 4567
4568 Missing part from mmap patch
4569
4570 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
4571 (grub_mmap_unregister)
4572 (grub_mmap_free_and_unregister): use grub_mmap_register
4573
7dd4a573 45742009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 4575
4576 Mmap services
4577
4578 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
4579 * loader/i386/linux.c (find_mmap_size): likewise
4580 (allocate_pages): likewise
4581 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
4582 (grub_fill_multiboot_mmap): likewise
4583 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
4584 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
4585 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
4586 (OPENBSD_MMAP_RESERVED): likewise
4587 * include/grub/i386/pc/memory.h: include grub/memory.h
4588 (grub_lower_mem): removed
4589 (grub_upper_mem): likewise
4590 (GRUB_MACHINE_MEMORY_ACPI): new definition
4591 (GRUB_MACHINE_MEMORY_NVS): likewise
4592 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
4593 (GRUB_MACHINE_MEMORY_HOLE): likewise
4594 (grub_machine_mmap_register): likewise
4595 (grub_machine_mmap_unregister): likewise
4596 (grub_machine_get_upper): likewise
4597 (grub_machine_get_lower): likewise
4598 (grub_machine_get_post64): likewise
4599 * include/grub/i386/efi/memory.h: new file
4600 * include/grub/x86_64/efi/memory.h: likewise
4601 * include/grub/efi/memory.h: likewise
4602 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
4603 (mmap_mod_SOURCES): new variable
4604 (mmap_mod_LDFLAGS): likewise
4605 (mmap_mod_ASFLAGS): likewise
4606 * conf/i386-coreboot.rmk: likewise
4607 * conf/i386-ieee1275.rmk: likewise
4608 * conf/i386-efi.rmk: likewise
4609 * conf/x86_64-efi.rmk: likewise
4610 * include/grub/types.h (UINT_TO_PTR): new macro
4611 (PTR_TO_UINT32): likewise
4612 (PTR_TO_UINT64): likewise
4613 * include/grub/memory.h: new file
4614 * mmap/i386/pc/mmap.c: likewise
4615 * mmap/i386/pc/mmap_helper.S: likewise
4616 * mmap/i386/uppermem.c: likewise
4617 * mmap/mmap.c: likewise
4618 * mmap/efi/mmap.c: likewise
7dd4a573 4619 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 4620 grub_upper_mem
4621 * kern/i386/pc/init.c (grub_lower_mem): removed variable
4622 (grub_upper_mem): likewise
4623 (grub_machine_init): don't use grub_upper_mem,
4624 make grub_lower_mem local
4625 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4626 grub_mmap_iterate and grub_mmap_get_upper
4627 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4628
d558e6b5 46292009-05-02 Bean <bean123ch@gmail.com>
4630
4631 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4632 script/sh/parser.y.
4633 (pkglib_MODULES): Add normal.mod and sh.mod.
4634 (normal_SOURCES): New variable.
4635 (normal_mod_CFLAGS): Likewise.
4636 (normal_mod_LDFLAGS): Likewise.
4637 (sh_mod_SOURCES): Likewise.
4638 (sh_mod_CFLAGS): Likewise.
4639 (sh_mod_LDFLAGS): Likewise.
4640
4641 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4642 script/sh/lexer.c_DEPENDENCIES.
4643 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4644 kern/rescue_reader.c and kern/rescue_parser.c.
4645 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
4646 (grub_emu_SOURCES): Change source files.
4647 (pkglib_MODULES): Remove normal.mod.
4648 (normal_SOURCES): Removed.
4649 (normal_mod_CFLAGS): Likewise.
4650 (normal_mod_LDFLAGS): Likewise.
4651 * conf/i386-coreboot.rmk: Likewise.
4652 * conf/i386-efi.rmk: Likewise.
4653 * conf/i386-ieee1276.rmk: Likewise.
4654 * conf/powerpc-ieee1275.rmk: Likewise.
4655 * conf/sparc64-ieee1275.rmk: Likewise.
4656 * conf/x86_64-efi.rmk: Likewise.
4657
4658 * include/grub/command.h (grub_command_execute): New inline function.
4659
4660 * include/grub/menu.h (grub_menu_entry): Removed commands field.
4661
4662 * include/grub/normal.h: Remove <grub/setjmp.h>.
4663 (grub_fs_module_list): Moved to normal/autofs.c.
4664 (grub_exit_env): Removed.
4665 (grub_command_execute): Likewise.
4666 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
4667 parameter script.
4668 (read_command_list): New function declaration.
4669 (read_fs_list): Likewise.
4670
4671 * include/parser.h: Include <grub/reader.h>.
4672 (grub_parser_split_cmdline): Change type of getline parameter.
4673 (grub_parser): New structure.
4674 (grub_parser_class): New variable.
4675 (grub_parser_execute): New function declaration.
4676 (grub_register_rescue_parser): Likewise.
4677 (grub_parser_register): New inline function.
4678 (grub_parser_unregister): Likewise.
4679 (grub_parser_get_current): Likewise.
4680 (grub_parser_set_current): Likewise.
4681
4682 * include/grub/reader.h: New file.
4683 * kern/reader.c: Likewise.
4684 * kern/rescue_parser.c: Likewise.
4685 * kern/rescue_reader.c: Likewise.
4686 * normal/autofs.c: Likewise.
4687 * normal/dyncmd.c: Likewise.
4688
4689 * include/grub/rescue.h: Removed.
4690 * normal/command.h: Likewise.
4691
4692 * include/grub/script.h: Moved to ...
4693 * include/grub/script_sh.h: ... Moved here.
4694 * normal/execute.c: Moved to ...
4695 * script/sh/execute.c: ... Moved here.
4696 * normal/function.c: Moved to ...
4697 * script/sh/function.c: ... Moved here.
4698 * normal/lexer.c: Moved to ...
4699 * script/sh/lexer.c: ... Moved here.
4700 * normal/parser.y: Moved to ...
4701 * script/sh/parser.y: ... Moved here.
4702 * normal/script.c: Moved to ...
4703 * script/sh/script.c: ... Moved here.
4704
4705 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
4706 <grub/reader.h>.
4707 (grub_exit_env): Removed.
4708 (fs_module_list): Moved to normal/autofs.c.
4709 (grub_file_getline): Don't handle comment here.
4710 (free_menu): Skip removed field entry->commands.
4711 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
4712 script parameter.
4713 (read_config_file): Removed nested parameter, change getline function.
4714 (grub_enter_normal_mode): Removed.
4715 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
4716 (read_command_list): Likewise.
4717 (autoload_fs_module): Moved to normal/autofs.c.
4718 (read_fs_list): Likewise.
4719 (reader_nested): New variable.
4720 (grub_normal_execute): Run parser.sh to switch to sh parser.
4721 (grub_cmd_rescue): Removed.
4722 (cmd_normal): Removed.
4723 (grub_cmd_normal): Unregister itself at the beginning. Don't register
4724 rescue command.
4725 (grub_cmdline_run): New function.
4726 (grub_normal_reader_init): Likewise.
4727 (grub_normal_read_line): Likewise.
4728 (grub_env_write_pager): Likewise.
4729 (cmdline): New variable.
4730 (grub_normal_reader): Likewise.
4731 (GRUB_MOD_INIT): Register normal reader and set as current, register
4732 pager hook, register normal command with grub_register_command_prio,
4733 so that it won't show up in command.lst.
4734 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
4735 grub_fs_autoload_hook.
4736
4737 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
4738 (grub_menu_execute_entry): Replace grub_script_execute with
4739 grub_parser_execute, change parameter to grub_command_execute.
4740
4741 * normal/menu_text.c: Remove <grub/script.h>.
4742
4743 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
4744 and <grub/parser.h>.
4745 (run): Change editor_getline to use new parser interface. Change
4746 parameter to grub_command_execute.
4747
4748 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
4749 <grub/reader.h> and <grub/parser.h>.
4750 (grub_load_normal_mode): Execute normal command.
4751 (grub_main): Call grub_register_core_commands,
4752 grub_register_rescue_parser and grub_register_rescue_reader, use
4753 grub_reader_loop to enter input loop.
4754
7dd4a573 4755 * kern/parser.c (grub_parser_split_cmdline): Change type of
4756 getline parameter.
d558e6b5 4757 (grub_parser_class): New variable.
4758 (grub_parser_execute): New function.
4759
4760 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
4761 * loader/multiboot2.c: Likewise.
4762 * loader/sparc64/ieee1275/linux.c: Likewise.
4763
4764 * util/grub-emu.c (read_command_list): New dummy function.
4765
18db813d 47662009-05-02 Robert Millan <rmh.grub@aybabtu.com>
4767
4768 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
4769 count to 16 for CCISS and IDA.
4770
6c67de15 47712009-05-02 Robert Millan <rmh.grub@aybabtu.com>
4772
4773 * normal/menu_text.c (grub_wait_after_message): Print a newline
4774 after waiting for user input.
4775
4776 * loader/i386/linux.c: Include `<grub/normal.h>'.
4777 (grub_cmd_linux): Improve the error message about `ask' mode, by
4778 waiting for user input so it's not missed (we can do this, since
4779 user requested interaction).
4780
d9dc87b0 47812009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4782
4783 Added missing lst to grub-mkrescue
4784
4785 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
4786 and ${input_dir}/parttool.lst
4787
ac8a2baa 47882009-04-30 David S. Miller <davem@davemloft.net>
4789
ad22a610 4790 * util/hostdisk.c (device_is_wholedisk): New function.
4791 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
4792 zero only if device_is_wholedisk() returns true.
4793
6966215d 4794 * util/hostdisk.c (convert_system_partition_to_system_disk):
4795 Handle virtual disk devices named /dev/vdiskX as found on sparc
4796 and powerpc.
4797
ac8a2baa 4798 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
4799 lettered partition specifier is found, convert to numbered.
4800
979b4fb4 48012009-04-29 David S. Miller <davem@davemloft.net>
4802
e2bf39b2 4803 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
4804 * include/grub/sparc64/ieee1275/memory.h: Likewise.
4805
3c64e104 4806 * normal/command.c: Add missing newline at end of file.
4807
979b4fb4 4808 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
4809 warnings.
4810 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
4811 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
4812 grub_ofdisk_read): Likewise, and deal similarly with the fact that
4813 ihandles have a 32-bit type but need to be stored in a "void *".
4814
136d9f82 48152009-04-28 Pavel Roskin <proski@gnu.org>
4816
9459c306 4817 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
4818 not disk. Adjust all dependencies.
2e08a26a 4819 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 4820 grub_disk_close().
4821
136d9f82 4822 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
4823 parent's partition, don't copy it by reference, as it gets freed
4824 on close.
4825
7dd4a573 48262009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 4827
4828 Preboot hooks support
4829
4830 * commands/boot.c (struct grub_preboot_t): new declaration
4831 (preboots_head): new variable
4832 (preboots_tail): likewise
4833 (grub_loader_register_preboot_hook): new function
4834 (grub_loader_unregister_preboot_hook): likewise
4835 (grub_loader_set): launch preboot hooks
4836 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
4837 (grub_loader_register_preboot_hook): new declaration
4838 (grub_loader_unregister_preboot_hook): likewise
4839
5af922b5 48402009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
4841
4842 Warning fix
4843
7dd4a573 4844 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 4845 calling grub_dprintf
4846
a5562c30 48472009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
4848
4849 Bug and warning fixes
4850
7dd4a573 4851 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 4852 declaration
4853 * commands/test.c (test_parse): fixed bug with file tests and corrected
4854 declaration of find_file
4855
4006f85c 48562009-04-26 Pavel Roskin <proski@gnu.org>
4857
4858 * Makefile.in: Don't install empty manual pages if help2man is
4859 missing. Use help2man option for output, not shell redirection.
4860
5c77c3de 48612009-04-26 David S. Miller <davem@davemloft.net>
4862
4863 * util/grub-mkdevicemap.c (make_device_map): Add missing
4864 NESTED_FUNC_ATTR to process_device().
4865
033b10a8 48662009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
4867
4868 Test command
4869
4870 * commands/test.c: rewritten to use bash-like test
4871
e4343593 48722009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
4873
4874 Parttool autoloading and improvements
4875
7dd4a573 4876 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 4877 (parttool.lst): new target
4878 * genmk.rb: generate parttool-*
4879 (CLEANFILES): add #{parttool}
4880 (PARTTOOLFILES): new variable
4881 * genparttoollist.sh: new file
7dd4a573 4882 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 4883 (grub_pcpart_type): likewise
4884 * commands/parttool.c (helpmsg): new variable
4885 (grub_cmd_parttool): output help if not enough arguments are supplied
4886 autoload modules
4887 (GRUB_MOD_INIT(parttool)): use helpmsg
4888
0d312500 48892009-04-24 David S. Miller <davem@davemloft.net>
4890
7dd4a573 4891 Avoiding opening same device multiple times in device iterator.
0d312500 4892
4893 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 4894 and use it to build a list of partitions in iterate_disk() and
0d312500 4895 iterate_partition().
4896
ac20caff 4897 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
4898 on disk->data.
4899
0dcf7495 4900 * disk/ieee1275/nand.c (grub_nand_iterate): Return
4901 grub_devalias_iterate() result instead of unconditional 0.
4902 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
4903 Also, capture hook return value, either directly or via
4904 grub_children_iterate(), and propagate to caller.
4905 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
4906 grub_children_iterate): Return value is now 'int' instead of
4907 'grub_err_t'.
4908 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4909 like a proper iterator, stopping when hooks return non-zero.
4910 (grub_devalias_iterate): Likewise.
4911
c8c08833 49122009-04-23 David S. Miller <davem@davemloft.net>
4913
4914 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4915
f01005a8 49162009-04-22 David S. Miller <davem@davemloft.net>
4917
4918 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4919 is larger than address_cells, use that value for address_cells too.
4920
4e8269da 4921 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4922 IEEE1275_MAX_PATH_LEN): Define.
4923 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4924 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4925 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4926 'devtype'. Explicitly NULL terminate devalias expansion.
4927
a1447506 4928 * util/sparc64/ieee1275/misc.c: New file.
4929 * util/sparc64/ieee1275/grub-setup.c: New file.
4930 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4931 * util/sparc64/ieee1275/grub-mkimage.c: New file.
4932 * util/sparc64/ieee1275/grub-install.in: New file.
4933 * util/ieee1275/ofpath.c: New file.
4934 * util/ieee1275/devicemap.c: New file.
4935 * util/devicemap.c: New file.
4936 * util/deviceiter.c: New file.
4937 * kern/sparc64/ieee1275/init.c: New file.
4938 * include/grub/util/ofpath.h: New file.
4939 * include/grub/util/deviceiter.h: New file.
4940 * util/grub-mkdevicemap.c: Include deviceiter.h.
4941 Implement using grub_util_emit_devicemap_entry and
4942 grub_util_iterate_devices.
4943 * conf/i386-corebook.rmk: Build util/deviceiter.c and
4944 util/devicemap.c into grub-mkdevicemap
4945 * conf/i386-efi.rmk: Likewise.
4946 * conf/i386-ieee1275.rmk: Likewise.
4947 * conf/i386-pc.rmk: Likewise.
4948 * conf/powerpc-ieee1275.rmk: Likewise.
4949 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4950 images and installation utilities. Build kernel as image
4951 instead of as elf binary. Use common rules as much as possible.
4952
7dd4a573 49532009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 4954
4955 Correct GPT definition
4956
7dd4a573 4957 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 4958 of "attrib" member
4959
c6c5219f 49602009-04-19 Felix Zielcke <fzielcke@z-51.de>
4961
4962 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4963
0552ff9f 49642009-04-19 David S. Miller <davem@davemloft.net>
4965
4966 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4967 (grub_rescue_cmd_linux): Rename to...
4968 (grub_cmd_linux): and fix prototype.
4969 (grub_rescue_cmd_initrd): Rename to...
4970 (grub_cmd_initrd): and fix prototype.
4971 (cmd_linux, cmd_initrd): New.
4972 (GRUB_MOD_INIT(linux)): Use grub_register_command().
4973 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4974
d1a282fc 49752009-04-17 Pavel Roskin <proski@gnu.org>
4976
07c5039f 4977 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4978 format.
4979 (grub_ohci_transfer): Likewise.
4980
b012002d 4981 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4982
1bc09c35 4983 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4984 return without a value. Fix inconsistent indentation.
4985
e0ff9126 4986 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4987 match struct grub_fs.
4988
d1a282fc 4989 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4990 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4991 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4992 * commands/lspci.c (grub_lspci_iter): Likewise.
4993
a96df3f2 49942009-04-16 Bean <bean123ch@gmail.com>
4995
4996 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4997 value.
4998
41bb0fe9 49992009-04-15 Pavel Roskin <proski@gnu.org>
5000
5001 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
5002 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
5003 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
5004 definitions.
5005
596c6970 50062009-04-15 Felix Zielcke <fzielcke@z-51.de>
5007
5008 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 5009 that no multiple data or metadata areas are supported and `Unknown
596c6970 5010 metadata header'.
5011
7dd4a573 50122009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 5013
5014 Move loader out of the kernel
5015
5016 * kern/loader.c: moved to ...
5017 * commands/boot.c: ... moved here
5018 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
5019 * commands/boot.c (grub_cmd_boot): moved here. All users updated
5020 * include/grub/kernel.h (grub_machine_fini): export
5021 * include/grub/loader.h (grub_loader_is_loaded): update declaration
5022 (grub_loader_set): likewise
5023 (grub_loader_unset): likewise
5024 (grub_loader_boot): likewise
5025 * conf/common.rmk: new module boot.mod
5026 (pkglib_MODULES): add boot.mod
5027 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
5028 (grub_emu_SOURCES): likewise
5029 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
5030 (grub_emu_SOURCES): likewise
5031 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
5032 (grub_emu_SOURCES): likewise
5033 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
5034 (grub_emu_SOURCES): likewise
5035 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
5036 (grub_emu_SOURCES): likewise
7dd4a573 5037 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
5038 (grub_emu_SOURCES): likewise
0d5d5653 5039 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 5040 (grub_emu_SOURCES): likewise
0d5d5653 5041
7dd4a573 50422009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 5043
5044 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 5045
5999d619 5046 * kern/misc.c (grub_itoa): Removed function
5047 (grub_ltoa): likewise
5048 (grub_vsprintf): use grub_lltoa
5049
7dd4a573 50502009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 5051
5052 Restore grub-emu
5053
5054 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
5055 * conf/i386-coreboot.rmk: likewise
5056 * conf/i386-ieee1275.rmk: likewise
5057 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5058
20318222 50592009-04-15 Felix Zielcke <fzielcke@z-51.de>
5060
5061 * INSTALL: Add that `./autogen.sh' needs to be run before
5062 `./configure.'.
5063
d05f0df3 50642009-04-14 Bean <bean123ch@gmail.com>
5065
5066 * Makefile.in (pkglib_DATA): Add handler.lst.
5067 (handler.lst): New rule.
5068
5069 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
5070 * conf/i386-coreboot.rmk: Likewise.
5071 * conf/i386-ieee1275.rmk: Likewise.
5072 * conf/i386-efi.rmk: Likewise.
5073 * conf/x86_64-efi.rmk: Likewise.
5074 * conf/powerpc-ieee1275.rmk: Likewise.
5075 * conf/sparc64-ieee1275.rmk: Likewise.
5076
5077 * genhandlerlist.sh: New file.
5078
5079 * genmk.rb: Add rules to generate handler.lst.
5080
5081 * include/grub/normal.h (grub_file_getline): New function definition.
5082 (read_handler_list): Likewise.
5083 (free_handler_list): Likewise.
5084
5085 * include/grub/term.h (grub_term_register_input): Add name parameter
5086 for auto generation of handler.lst.
5087 (grub_term_register_output): Likewise.
5088
5089 * normal/handler.c: New file.
5090
5091 * normal/main.c (get_line): Renamed to grub_file_getline.
5092 (read_config_file): Use the newly renamed grub_file_getline.
5093 (read_command_list): Likewise.
5094 (read_fs_list): Likewise.
5095 (grub_normal_execute): Call read_handler_list to parse handler.lst.
5096 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
5097
5098 * term/efi/console.c (grub_console_init): Add name parameter for auto
5099 generation of handler.lst.
5100 * term/gfxterm.c: Likewise.
5101 * term/i386/pc/at_keyboard.c: Likewise.
5102 * term/i386/pc/console.c: Likewise.
5103 * term/i386/pc/serial.c: Likewise.
5104 * term/i386/pc/vesafb.c: Likewise.
5105 * term/i386/pc/vga.c: Likewise.
5106 * term/i386/pc/vga_text.c: Likewise.
5107 * term/ieee1275/ofconsole.c: Likewise.
5108 * term/usb_keyboard.c: Likewise.
5109
33c846be 51102009-04-14 Bean <bean123ch@gmail.com>
5111
5112 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
5113 properly with null character.
5114
4484e01e 51152009-04-14 Felix Zielcke <fzielcke@z-51.de>
5116
5117 * configure: Remove.
5118 * config.h.in: Likewise.
f93d668e 5119 * stamp-h.in: Likewise.
4484e01e 5120 * DISTLIST: Likewise.
5121 * conf/common.mk: Likewise.
5122 * conf/i386-coreboot.mk: Likewise.
5123 * conf/i386-efi.mk: Likewise.
5124 * conf/i386-ieee1275.mk: Likewise.
5125 * conf/i386.mk: Likewise.
5126 * conf/i386-pc.mk: Likewise.
5127 * conf/powerpc-ieee1275.mk: Likewise.
5128 * conf/sparc64-ieee1275.mk: Likewise.
5129 * conf/x86_64-efi.mk: Likewise.
5130
5131 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
5132 develop on GRUB.
5133
7dd4a573 51342009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 5135 David S. Miller <davem@davemloft.net>
5136
5137 * util/hostdisk.c (make_device_name): Fix buffer length
5138 calculations.
5139
e25b5a8c 51402009-04-14 Felix Zielcke <fzielcke@z-51.de>
5141
5142 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
5143 <sys/param.h> and <sys/sysctl.h>.
5144 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
5145 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
5146 opening the device and reset them afterwards.
5147
1f1f580c 51482009-04-13 Pavel Roskin <proski@gnu.org>
5149
5150 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
5151 Reported by John Stanley <jpsinthemix@verizon.net>
5152
7ebc2d6b 51532009-04-13 Robert Millan <rmh@aybabtu.com>
5154
5155 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 5156 that name for menuentries when appropriate.
7ebc2d6b 5157
d8ba3667 51582009-04-13 Felix Zielcke <fzielcke@z-51.de>
5159
5160 * util/grub.d/10_freebsd.in: Add a missing `fi'.
5161
cba416eb 51622009-04-13 Robert Millan <rmh@aybabtu.com>
5163
5164 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
5165 to Linux, simply abort telling the user it's no longer supported.
5166
a547a745 51672009-04-13 Felix Zielcke <fzielcke@z-51.de>
5168
5169 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 5170 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 5171 `freebsd_loadenv' only when devices.hints exist.
5172
232a769c 51732009-04-13 Pavel Roskin <proski@gnu.org>
5174
5175 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
5176
c3012039 51772009-04-13 Felix Zielcke <fzielcke@z-51.de>
5178
5179 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
5180 partition number.
5181 (grub_drive): Likewise.
5182
234022fe 51832009-04-13 David S. Miller <davem@davemloft.net>
5184
5185 * kern/sparc64/ieee1275/ieee1275.c: New file.
5186 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
5187 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
5188 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
5189 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
5190 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
5191 grub_ieee1275_alloc_physmem): Declare new exported functions.
5192
d8e1836c 5193 * include/grub/sparc64/ieee1275/loader.h: New file.
5194 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5195 * include/grub/sparc64/kernel.h: Likewise.
5196 * loader/sparc64/ieee1275/linux.c: Likewise.
5197
96bd81ec 5198 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
5199 (grub_fstest_SOURCES): Likewise.
5200
6a4737e5 5201 * util/hostdisk.c (make_device_name): Do not make any assumptions
5202 about the length of drive names.
5203
1d7a72fd 5204 * kern/dl.c (grub_dl_load_file): Close file immediately when
5205 we are done using it.
5206
56bc2471 52072009-04-12 David S. Miller <davem@davemloft.net>
5208
5209 * kern/misc.c (grub_ltoa): Fix cast when handling negative
5210 values. Noticed by Pavel Roskin.
5211
df38d0bb 5212 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
5213 target compiler.
7dd4a573 5214
e382e93a 5215 * genmk.rb: Add more flexible image type specification, also
5216 pass --strip-unneeded to objcopy.
5217 * conf/i386-pc.rmk: Use *_FORMAT.
5218 * conf/i386-pc.mk: Rebuilt.
5219
f5dbbca9 5220 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
5221 (OFDISK_HASH_SZ): Define.
5222 (ofdisk_hash): New hash table.
5223 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
5224 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
5225 instead of device phandle which is not unique.
5226
91c88b12 5227 * kern/sparc64/ieee1275/init.c: Delete, replace with...
5228 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
5229 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
5230 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
5231 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
5232 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
5233 GRUB_KERNEL_MACHINE_DATA_END): Define.
5234 (grub_kernel_image_size, grub_total_module_size): Declare.
5235
5b5d4aa5 52362009-04-12 Pavel Roskin <proski@gnu.org>
5237
7dd4a573 5238 * configure.ac: Change the logic when we check for target tools.
5239 Do it when the target is specified and it's different from the
5240 specified value of the host.
5b5d4aa5 5241
c91e1793 52422009-04-11 Felix Zielcke <fzielcke@z-51.de>
5243
5244 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
5245 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
5246 GNU/kFreeBSD. Check if a device is a character device. Use
5247 DIOCGMEDIASIZE to get the size.
5248 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
5249 support for GNU/kFreeBSD.
5250 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
5251 is a character device instead of a block device. Add support for
5252 FreeBSD device names.
5253
5254 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
5255 is a character device instead of a block device.
5256
5257 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
5258 is a character device instead of a block device.
5259
b1ac8644 52602009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
5261
5262 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
5263 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
5264 FreeBSD. Check if a device is a character device. Use
5265 DIOCGMEDIASIZE to get the size.
5266 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
5267 support for FreeBSD.
5268 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
5269 is a character device instead of a block device. Add support for
5270 FreeBSD device names.
5271
5272 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
5273 a character device instead of a block device.
5274 (grub_util_check_char_device): New function.
5275
5276 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
5277 a character device instead of a block device.
5278
5279 * include/grub/util/getroot.h (grub_util_check_char_device): New
5280 prototype.
5281
a3f7515a 52822009-04-11 David S. Miller <davem@davemloft.net>
5283
5284 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
5285 static libgcc.
5286 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
5287 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
5288 function, if present.
5289 (__bswapdi2): Likewise.
5290
0d44993d 5291 * include/grub/sparc64/ieee1275/boot.h: New file.
5292 * boot/sparc64/ieee1275/boot.S: Likewise.
5293 * boot/sparc64/ieee1275/diskboot.S: Likewise.
5294
ed3d2bc2 5295 * kern/misc.c (grub_ltoa): New function.
5296 (grub_vsprintf): Use it to format 'long' integers.
5297
d3bfb59c 52982009-04-10 David S. Miller <davem@davemloft.net>
5299
5300 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
5301 slots are of type grub_ieee1275_cell_t.
5302 (grub_nand_read): Likewise.
5303 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
5304 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
5305 macros are used to compare values in arg/ret block of the call.
5306 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5307 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
5308 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
5309 grub_ieee1275_instance_to_path, grub_ieee1275_write,
5310 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
5311 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
5312 grub_ieee1275_close, grub_ieee1275_set_property,
5313 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
5314 grub_ieee1275_cell_t.
5315 * kern/ieee1275/openfw.c (grub_map): Likewise.
5316 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
5317 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
5318
450e2238 5319 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
5320 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
5321 (grub_devalias_iterate): Likewise.
5322
7dd4a573 53232009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 5324
5325 UFS improvements
5326
5327 * fs/ufs.c (INODE_NBLOCKS): new definition
5328 (struct grub_ufs_dirent): added fields for non-BSD dirents
5329 (grub_ufs_get_file_block): fixed double indirect handling
5330 (grub_ufs_lookup_symlink): use more robust way to determine whether
5331 symlink is inline
5332 (grub_ufs_find_file): support for non-BSD dirents
5333 (grub_ufs_dir): support for non-BSD dirents
5334
e7e6862a 53352009-04-10 Bean <bean123ch@gnail.com>
5336
5337 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
5338 attribute, otherwise the size would be wrong for i386 platform.
5339
5340 * include/grub/pci.h (grub_pci_read_word): New inline function.
5341 (grub_pci_read_byte): Likewise.
5342 (grub_pci_write): Likewise.
5343 (grub_pci_write_word): Likewise.
5344 (grub_pci_write_byte): Likewise.
5345
5346 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
5347
5348 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
5349 (find_framebuf): Scan pci to locate the frame buffer address.
5350
5351 * commands/efi/fixvideo.c: New file.
5352
5353 * commands/efi/loadbios.c: Likewise.
5354
5355 * commands/memrw.c: Likewise.
5356
5357 * util/grub-dumpbios.in: Likewise.
5358
5359 * conf/common.rmk (grub-dumpbios): New utility.
5360 (pkglib_MODULES): New module memrw.mod.
5361 (memrw_mod_SOURCE): New macro.
5362 (memrw_mod_CFLAGS): Likewise.
5363 (memrw_mod_LDFLAGS): Likewise.
5364
7dd4a573 5365 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5366 fixvideo.mod.
5367 (loadbios_mod_SOURCE): New macro.
5368 (loadbios_mod_CFLAGS): Likewise.
5369 (loadbios_mod_LDFLAGS): Likewise.
5370 (fixvideo_mod_SOURCE): Likewise.
5371 (fixvideo_mod_CFLAGS): Likewise.
5372 (fixvideo_mod_LDFLAGS): Likewise.
5373
7dd4a573 5374 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5375 fixvideo.mod.
5376 (loadbios_mod_SOURCE): New macro.
5377 (loadbios_mod_CFLAGS): Likewise.
5378 (loadbios_mod_LDFLAGS): Likewise.
5379 (fixvideo_mod_SOURCE): Likewise.
5380 (fixvideo_mod_CFLAGS): Likewise.
5381 (fixvideo_mod_LDFLAGS): Likewise.
5382
af63ada2 53832009-04-08 Felix Zielcke <fzielcke@z-51.de>
5384
5385 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
5386
c2cdde70 53872009-04-07 David S. Miller <davem@davemloft.net>
5388
5389 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
5390 support for R_SPARC_OLO10 relocations. Fix compile warning for
5391 R_SPARC_WDISP30 case.
ea3f72cf 5392 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 5393
761319cf 53942009-04-06 Pavel Roskin <proski@gnu.org>
5395
1007d1f5 5396 * include/grub/misc.h (ARRAY_SIZE): New macro.
5397 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
5398 New macro.
5399 * loader/i386/linux.c (allocate_pages): Use free_pages().
5400 (grub_linux_unload): Don't use free_pages().
5401 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
5402 wrong index. Treat all other modes as text modes.
5403 (grub_cmd_linux): Initialize vid_mode unconditionally to
5404 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
5405
761319cf 5406 * commands/help.c (print_command_help): Use cmd->prio, not
5407 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
5408
ea761d40 54092009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 5410
ea761d40 5411 Parttool
5412
5413 * parttool/pcpart.c: new file
5414 * commands/parttool.c: likewise
5415 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
5416 (parttool_mod_SOURCES): new variable
5417 (parttool_mod_CFLAGS): likewise
5418 (parttool_mod_LDFLAGS): likewise
5419 (pcpart_mod_SOURCES): likewise
5420 (pcpart_mod_CFLAGS): likewise
5421 (pcpart_mod_LDFLAGS): likewise
7dd4a573 5422 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 5423 and parttool/pcpart.c
5424 * conf/i386-efi.rmk: likewise
5425 * conf/i386-ieee1275.rmk: likewise
5426 * conf/i386-pc.rmk: likewise
5427 * conf/powerpc-ieee1275.rmk: likewise
5428 * conf/sparc64-ieee1275.rmk: likewise
5429 * conf/x86_64-ieee1275.rmk: likewise
5430
05aaebfb 54312009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5432
5433 Support for mtime and further expandability of dir command
5434
5435 * include/grub/lib/datetime.h: moved to ...
7dd4a573 5436 * include/grub/datetime.h: ... moved here and added
05aaebfb 5437 declaration of grub_unixtime2datetime. All users updated
7dd4a573 5438 * include/grub/fs.h: new syntax for dir and mtime functions in
5439 struct grub_fs
05aaebfb 5440 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
5441 and GRUB_FSHELP_FLAGS_MASK
5442 * commands/ls.c (grub_ls_list_files): Write mtime in long format
5443 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
5444 (grub_ext2_mtime): new function
5445 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
5446 (grub_hfsplus_mtime): new function
5447 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
5448 (GRUB_UFS_ATTR_FILE): likewise
5449 (GRUB_UFS_ATTR_LNK): likewise
5450 (struct grub_ufs_sblock): new fields mtime
5451 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
5452 all users updated
5453 (grub_ufs_dir): mtime support
5454 (grub_ufs_mtime): new function
5455 * fs/affs.c (grub_affs_dir): use new dir syntax
5456 * fs/afs.c (grub_afs_dir): likewise
5457 * fs/cpio.c (grub_cpio_dir): likewise
5458 * fs/fat.c (grub_fat_find_dir): likewise
5459 * fs/hfs.c (grub_hfs_dir): likewise
5460 * fs/iso9660.c (grub_iso9660_dir): likewise
5461 * fs/jfs.c (grub_jfs_dir): likewise
5462 * fs/minix.c (grub_minix_dir): likewise
5463 * fs/ntfs.c (grub_ntfs_dir): likewise
5464 * fs/reiserfs.c (grub_reiserfs_dir): likewise
5465 * fs/sfs.c (grub_sfs_dir): likewise
5466 * fs/xfs.c (grub_xfs_dir): likewise
5467 * util/hostfs.c (grub_hostfs_dir): likewise
5468 * lib/datetime.c: moved to ...
5469 * normal/datetime.c: ... moved here
5470 (grub_unixtime2datetime): new function
5471 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 5472 * normal/completion.c (iterate_dir): use new dir syntax
5473 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 5474 last modification time of a volume
7dd4a573 5475 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 5476 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 5477 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 5478 (normal_mod_SOURCES): likewise
5479 (datetime_mod_SOURCES): Removed lib/datetime.c
5480 * conf/i386-efi.rmk: likewise
7dd4a573 5481 * conf/i386-ieee1275.rmk: likewise
05aaebfb 5482 * conf/i386-pc.rmk: likewise
5483 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5484 * conf/sparc64-ieee1275.rmk: likewise
5485 * conf/x86_64-efi.rmk: likewise
05aaebfb 5486
8a7e1a14 54872009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5488
5489 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 5490
5491 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 5492 on grub_fat_find_dir
5493 (grub_fat_find_dir): use grub_fat_iterate_dir
5494 (grub_fat_label): likewise
5495
04186a9c 54962009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
5497
7dd4a573 5498 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 5499 and command.h
5500 remove extraneous kernel_elf_HEADERS
5501
da4c0bb6 55022009-04-04 Bean <bean123ch@gnail.com>
5503
5504 * include/grub/util/misc.h: Add dummy function fsync for mingw.
5505
5506 * util/misc.c: Likewise.
5507
54ad9555 55082009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5509
5510 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
5511 instead of grub_printf.
5512
7a6bf9f2 55132009-04-03 Robert Millan <rmh@aybabtu.com>
5514
5515 * loader/i386/linux.c (grub_linux_setup_video): Fill
5516 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5517 values from `mode info' structure instead of hardcoded
5518 values.
5519
3fcc2083 55202009-04-01 Pavel Roskin <proski@gnu.org>
5521
5522 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
5523 unused now.
5524 * genmk.rb: Likewise.
5525 * configure.ac: Likewise.
5526
5ec9740b 55272009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
5528
5529 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
5530 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
5531
5270cec8 55322009-04-01 David S. Miller <davem@davemloft.net>
5533
5534 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 5535 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 5536 (grub_setjmp): Mark with 'returns_twice' attribute.
5537 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
5538 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
5539 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
5540
9c3dd854 55412009-04-01 Robert Millan <rmh@aybabtu.com>
5542
5543 Reapply fix from 2008-07-28 which was accidentally reverted; also
5544 perform the same fix to a similar check in same function.
5545
5546 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5547 with the same number are found, just use issue a warning with
5548 grub_dprintf(), as this error has been reported to be non-fatal.
5549
0d818b7e 55502009-03-31 Pavel Roskin <proski@gnu.org>
5551
5552 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
5553 for cross-compilation.
5554
95646d92 55552009-03-30 Robert Millan <rmh@aybabtu.com>
5556
5557 Fix i386-ieee1275 build.
5558
5559 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
5560 Remove declaration.
5561
6a003ed1 55622009-03-30 Pavel Roskin <proski@gnu.org>
5563
5564 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
5565 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
5566 zero-terminated, rely only on the strlen value. Fix comparison
5567 of strings differing in length.
5568
92f33540 55692009-03-30 Robert Millan <rmh@aybabtu.com>
5570
5571 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
5572 checking for abi version. Improve error messages on BIOS to notify
5573 user about `linux16' command.
5574
a8c48fd5 55752009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
5576
f968172e 5577 Leak fixes
a8c48fd5 5578
f968172e 5579 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
5580 in case of collision
5581 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 5582
9c323f09 55832009-03-29 Robert Millan <rmh@aybabtu.com>
5584
5585 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
5586 set `vid_mode' accordingly.
5587 (grub_linux_boot): Process `vid_mode' and set video mode.
5588
ae68f423 55892009-03-29 Robert Millan <rmh@aybabtu.com>
5590
5591 * util/grub.d/10_linux.in (linux_entry): New function.
5592 Factorize generation of Linux boot entries.
5593
5709cfc4 55942009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
5595
5596 Make the format of Environment Block plain text. The boot loader
5597 part is not tested well yet.
7dd4a573 5598
5709cfc4 5599 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
5600 (buffer): Removed.
5601 (envblk): Likewise.
5602 (usage): Remove "info" and "clear". Add "unset". Update the
5603 description of "set", as this does not delete variables any
5604 longer.
5605 (create_envblk_file): Complete rewrite.
5606 (open_envblk_file): Likewise.
5607 (cmd_info): Removed.
5608 (cmd_list): Likewise.
5609 (cmd_set): Likewise.
5610 (cmd_clear): Likewise.
5611 (list_variables): New function.
5612 (write_envblk): Likewise.
5613 (set_variables): Likewise.
5614 (unset_variables): Likewise.
5615 (main): Complete rewrite.
5616
5617 * commands/loadenv.c (buffer): Removed.
5618 (envblk): Likewise.
5619 (open_envblk_file): New function.
5620 (read_envblk_file): Complete rewrite.
5621 (grub_cmd_load_env): Likewise.
5622 (grub_cmd_list_env): Likewise.
5623 (struct blocklist): New struct.
5624 (free_blocklists): New function.
5625 (check_blocklists): Likewise.
5626 (write_blocklists): Likewise.
5627 (grub_cmd_save_env): Complete rewrite.
5628
5629 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5630 a plain text signature.
5631 (GRUB_ENVBLK_MAXLEN): Removed.
5632 (struct grub_envblk): Complete rewrite.
5633 (grub_envblk_find): Removed.
5634 (grub_envblk_insert): Likewise.
5635 (grub_envblk_open): New prototype.
5636 (grub_envblk_set): Likewise.
5637 (grub_envblk_delete): Put const to VALUE.
5638 (grub_envblk_iterate): Put const to NAME and VALUE.
5639 (grub_envblk_close): New prototype.
5640 (grub_envblk_buffer): New inline function.
5641 (grub_envblk_size): Likewise.
5642
5643 * lib/envblk.c: Include grub/mm.h.
5644 (grub_env_find): Removed.
5645 (grub_envblk_open): New function.
5646 (grub_envblk_close): Likewise.
5647 (escaped_value_len): Likewise.
5648 (find_next_line): Likewise.
5649 (grub_envblk_insert): Removed.
5650 (grub_envblk_set): New function.
5651 (grub_envblk_delete): Complete rewrite.
5652 (grub_envblk_iterate): Likewise.
5653
a9368fd3 56542009-03-28 Robert Millan <rmh@aybabtu.com>
5655
5656 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
5657 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
5658 variables. Use 16-bit loader.
5659 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
5660 loader.
5661 * kern/i386/loader.S (grub_linux_boot): Rename to ...
5662 (grub_linux16_boot): ... this. Update all users.
5663 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
5664 (grub_linux_boot): ... this. Update all users.
5665
5666 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
5667 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
5668 commands to `linux16' and `initrd16'.
5669 (GRUB_MOD_FINI(linux)): Rename to ...
5670 (GRUB_MOD_FINI(linux16)): ... this.
5671
e4dd5a7e 56722009-03-24 Pavel Roskin <proski@gnu.org>
5673
5674 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
5675 not just for compilation.
5676
c04d6e05 56772009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
5678
5679 Move multiboot helper out of kernel
5680
5681 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
5682 `loader/i386/multiboot_helper.S'.
5683 * conf/i386-coreboot.rmk: Likewise
5684 * conf/i386-ieee1275.rmk: Likewise
5685
5686 * kern/i386/loader.S: Move multiboot helpers from here...
5687 * loader/i386/multiboot_helper.S: ...moved here
5688 * include/grub/i386/loader.h: Move declarations of multiboot
5689 helpers from here...
5690 * include/grub/i386/multiboot.h: ...moved here
5691 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
5692
42a5b3fc 56932009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5694
5695 * kern/env.c (grub_env_context_open): Added an argument to specify
5696 whether a new context inherits exported variables from current
5697 one. This is useful when making a sandbox to interpret a config
5698 file.
5699 All callers updated.
5700
5701 * include/grub/env.h (grub_env_context_open): Updated the prototype.
5702
b28bbc4e 57032009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5704
5705 * kern/env.c (grub_env_context_close): Fix memory leaks.
5706
f04f02e4 57072009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5708
5709 * normal/main.c (grub_normal_execute): Added an argument
5710 BATCH to specify if an interactive interface should be provided
5711 after reading a config file.
5712 All callers updated.
5713 (read_command_list): Prevent being executed twice.
5714 (read_fs_list): Likewise.
5715
42a5b3fc 5716 * include/grub/normal.h (grub_normal_execute): Updated the
5717 prototype.
f04f02e4 5718
41473ac2 57192009-03-22 Pavel Roskin <proski@gno.org>
5720
fbc00b0c 5721 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
5722 _start.
5723 * kern/i386/pc/startup.S: Likewise.
5724 * kern/i386/efi/startup.S: Likewise.
5725 * kern/i386/ieee1275/startup.S: Likewise.
5726 * kern/i386/coreboot/startup.S: Likewise.
5727 * kern/x86_64/efi/startup.S: Likewise.
5728
41473ac2 5729 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
5730 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
5731 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
5732
2274cc8f 57332009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
5734
5735 Bugfixes in multiboot for bugs uncovered by solaris kernel.
5736
5737 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
5738 limit detection.
5739 Use vaddr of correct segment for entry_point.
5740
b1b797cb 57412009-03-21 Bean <bean123ch@gmail.com>
5742
5743 * commands/blocklist.c: Add include file <grub/command.h>, remove
5744 <grub/normal.h> and <grub/arg.h>.
5745 (grub_cmd_blocklist): Use the new command interface.
5746 (GRUB_MOD_INIT): Likewise.
5747 (GRUB_MOD_FINI): Likewise.
5748 * commands/boot.c: Likewise.
5749 * commands/cat.c: Likewise.
5750 * commands/cmp.c: Likewise.
5751 * commands/configfile.c: Likewise.
5752 * commands/crc.c: Likewise.
5753 * commands/echo.c: Likewise.
5754 * commands/halt.c: Likewise.
5755 * commands/handler.c: Likewise.
5756 * commands/hdparm.c: Likewise.
5757 * commands/help.c: Likewise.
5758 * commands/hexdump.c: Likewise.
5759 * commands/loadenv.c: Likewise.
5760 * commands/ls.c: Likewise.
5761 * commands/lsmmap.c: Likewise.
5762 * commands/lspci.c: Likewise.
5763 * commands/loadenv.c: Likewise.
5764 * commands/read.c: Likewise.
5765 * commands/reboot.c: Likewise.
5766 * commands/search.c: Likewise.
5767 * commands/sleep.c: Likewise.
5768 * commands/test.c: Likewise.
5769 * commands/usbtest.c: Likewise.
5770 * commands/videotest.c: Likewise.
5771 * commands/i386/cpuid.c: Likewise.
5772 * commands/i386/pc/halt.c: Likewise.
5773 * commands/i386/pc/play.c: Likewise.
5774 * commands/i386/pc/pxecmd.c: Likewise.
5775 * commands/i386/pc/vbeinfo.c: Likewise.
5776 * commands/i386/pc/vbetest.c: Likewise.
5777 * commands/ieee1275/suspend.c: Likewise.
5778 * disk/loopback.c: Likewise.
5779 * font/font_cmd.c: Likewise.
5780 * hello/hello.c: Likewise.
5781 * loader/efi/appleloader.c: Likewise.
5782 * loader/efi/chainloader.c: Likewise.
5783 * loader/i386/bsd.c: Likewise.
5784 * loader/i386/efi/linux.c: Likewise.
5785 * loader/i386/ieee1275/linux.c: Likewise.
5786 * loader/i386/linux.c: Likewise.
5787 * loader/i386/pc/chainloader.c: Likewise.
5788 * loader/i386/pc/linux.c: Likewise.
5789 * loader/powerpc/ieee1275/linux.c: Likewise.
5790 * loader/multiboot_loader.c: Likewise.
5791 * term/gfxterm.c: Likewise.
5792 * term/i386/pc/serial.c: Likewise.
5793 * term/terminfo.c: Likewise.
5794
5795 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
5796 * term/i386/pc/vga.c: Likewise.
5797 * video/readers/jpeg.c: Likewise.
5798 * video/readers/png.c: Likewise.
5799 * video/readers/tga.c: Likewise.
5800
5801 * util/grub-fstest (cmd_loopback): Removed.
5802 (cmd_blocklist): Likewise.
5803 (cmd_ls): Likewise.
5804 (grub_register_command): Likewise.
5805 (grub_unregister_command): Likewise.
5806 (execute_command): Use grub_command_find to locate command and execute
5807 it.
5808
5809 * include/grub/efi/chainloader.h: Removed.
5810 * loader/efi/chainloader_normal.c: Likewise.
5811 * loader/i386/bsd_normal.c: Likewise.
5812 * loader/i386/pc/chainloader_normal.c: Likewise.
5813 * loader/i386/pc/multiboot_normal.c: Likewise.
5814 * loader/linux_normal.c: Likewise.
5815 * loader/multiboot_loader_normal.c: Likewise.
5816 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5817
5818 * gencmdlist.sh: Scan new registration command grub_register_extcmd
5819 and grub_register_command_p1.
5820
5821 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
5822 kern/command.c, lib/arg.c and commands/extcmd.c.
5823 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
5824 (minicmd_mod_SOURCES): New variable.
5825 (minicmd_mod_CFLAGS): Likewise.
5826 (minicmd_mod_LDFLAGS): Likewise.
5827 (extcmd_mod_SOURCES): Likewise.
5828 (extcmd_mod_CFLAGS): Likewise.
5829 (extcmd_mod_LDFLAGS): Likewise.
5830 (boot_mod_SOURCES): Removed.
5831 (boot_mod_CFLAGS): Likewise.
5832 (boot_mod_LDFLAGS): Likewise.
5833
5834 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
5835 kern/corecmd.c.
5836 (kernel_img_HEADERS): Add command.h.
5837 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
5838 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
5839 and lib/arg.c.
5840 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
5841 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
5842 remove the corresponding normal mode command.
5843 (normal_mod_SOURCES): Remove normal/arg.c.
5844 * conf/i386-coreboot.rmk: Likewise.
5845 * conf/i386-efi.rmk: Likewise.
5846 * conf/i386-ieee1275.rmk: Likewise.
5847 * conf/powerpc-ieee1275.rmk: Likewise.
5848 * conf/x86_64-efi.rmk: Likewise.
5849
5850 * include/grub/arg.h: Move from here ...
5851 * include/grub/lib/arg.h: ... to here.
5852
5853 * normal/arg.c: Move from here ...
5854 * lib/arg.c: ... to here.
5855
5856 * commands/extcmd.c: New file.
5857 * commands/minicmd.c: Likewise.
5858 * include/grub/command.h: Likewise.
5859 * include/grub/extcmd.h: Likewise.
5860 * kern/command.c: Likewise.
5861 * kern/corecmd.c: Likewise.
5862
5863 * kern/list.c (grub_list_iterate): Return int instead of void.
5864 (grub_list_insert): New function.
5865 (grub_prio_list_insert): Likewise.
5866
5867 * kern/rescue.c (grub_rescue_command): Removed.
5868 (grub_rescue_command_list): Likewise.
5869 (grub_rescue_register_command): Likewise.
5870 (grub_rescue_unregister_command): Likewise.
5871 (grub_rescue_cmd_boot): Move to minicmd.c
5872 (grub_rescue_cmd_help): Likewise.
5873 (grub_rescue_cmd_info): Likewise.
5874 (grub_rescue_cmd_boot): Likewise.
5875 (grub_rescue_cmd_testload): Likewise.
5876 (grub_rescue_cmd_dump): Likewise.
5877 (grub_rescue_cmd_rmmod): Likewise.
5878 (grub_rescue_cmd_lsmod): Likewise.
5879 (grub_rescue_cmd_exit): Likewise.
5880 (grub_rescue_print_devices): Moved to corecmd.c.
5881 (grub_rescue_print_files): Likewise.
5882 (grub_rescue_cmd_ls): Likewise.
5883 (grub_rescue_cmd_insmod): Likewise.
5884 (grub_rescue_cmd_set): Likewise.
5885 (grub_rescue_cmd_unset): Likewise.
7d074e3c 5886 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 5887 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 5888 commands, remove grub_rescue_register_command calls.
b1b797cb 5889
7d074e3c 5890 * normal/command.c (grub_register_command): Removed.
b1b797cb 5891 (grub_unregister_command): Likewise.
5892 (grub_command_find): Likewise.
5893 (grub_iterate_commands): Likewise.
5894 (rescue_command): Likewise.
5895 (export_command): Moved to corecmd.c.
5896 (set_command): Removed.
5897 (unset_command): Likewise.
5898 (insmod_command): Likewise.
5899 (rmmod_command): Likewise.
5900 (lsmod_command): Likewise.
5901 (grub_command_init): Likewise.
5902
5903 * normal/completion.c (iterate_command): Use cmd->prio to check for
5904 active command.
5905 (complete_arguments): Use grub_extcmd_t structure to find options.
5906 (grub_normal_do_completion): Change function grub_iterate_commands to
5907 grub_command_iterate.
5908
5909 * normal/execute.c (grub_script_execute_cmd): No need to parse
5910 argument here.
5911
5912 * normal/main.c (grub_dyncmd_dispatcher): New function.
5913 (read_command_list): Register unload commands as dyncmd.
5914 (grub_cmd_normal): Use new command interface, register rescue,
5915 unregister normal at entry, register normal, unregister rescue at exit.
5916
5917 * include/grub/list.h (grub_list_test_t): New type.
5918 (grub_list_iterate): Return int instead of void.
5919 (grub_list_insert): New function.
5920 (GRUB_AS_NAMED_LIST_P): New macro.
5921 (GRUB_AS_PRIO_LIST): Likewise.
5922 (GRUB_AS_PRIO_LIST_P): Likewise.
5923 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5924 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5925 (grub_prio_list): New structure.
5926 (grub_prio_list_insert): New function.
5927 (grub_prio_list_remove): New inline function.
5928
5929 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5930 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5931 (GRUB_COMMAND_FLAG_MENU): Likewise.
5932 (GRUB_COMMAND_FLAG_BOTH): Likewise.
5933 (GRUB_COMMAND_FLAG_TITLE): Likewise.
5934 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5935 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5936 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5937 (grub_command): Likewise.
5938 (grub_register_command): Likewise.
5939 (grub_command_find): Likewise.
5940 (grub_iterate_commands): Likewise.
5941 (grub_command_init): Likewise.
5942 (grub_arg_parse): Likewise.
5943 (grub_arg_show_help): Likewise.
5944
5945 * include/grub/rescue.h (grub_rescue_register_command): Removed.
5946 (grub_rescue_unregister_command): Likewise.
5947
5948 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5949 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5950 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5951
5952 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5953 grub_rescue_cmd_initrd.
5954 * include/grub/i386/loader.h: Likewise.
5955 * include/grub/x86_64/loader.h: Likewise.
5956
5957 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5958
1f4147aa 59592009-03-21 Bean <bean123ch@gmail.com>
5960
5961 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5962 instead of stat in mingw environment.
5963
5964 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5965
5966 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5967
5968 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5969 AC_CONFIG_LINKS.
5970
2156d5ba 59712009-03-21 Bean <bean123ch@gmail.com>
5972
5973 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5974 out of range error.
5975
177b82ca 59762009-03-18 Michel Dänzer <michel@daenzer.net>
5977
5978 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5979 checking inode flags for EXT4_EXTENTS_FLAG.
5980
14aad807 59812009-03-18 Robert Millan <rmh@aybabtu.com>
5982
5983 * loader/i386/linux.c: Include `<grub/video.h>' and
5984 `<grub/i386/pc/vbe.h>'..
5985 (grub_linux_setup_video): New function. Loosely based on the EFI one.
5986 (grub_linux32_boot): Attempt to configure video settings with
5987 grub_linux_setup_video().
5988 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5989 to avoid grub_console_fini() which would step out of graphical mode
5990 unconditionally.
5991
8cf83a27 59922009-03-14 Robert Millan <rmh@aybabtu.com>
5993
5994 Fix build on powerpc.
5995 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5996
40164e75 59972009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
5998
5999 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
6000 background image command.
6001
c58bc32a 60022009-03-12 Colin D Bennett <colin@gibibit.com>
6003
6004 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
6005 (grub_gfxterm_putchar): Extract pairs of identical calls to
6006 draw_cursor out of conditional blocks.
6007
5415144a 60082009-03-11 Pavel Roskin <proski@gnu.org>
6009
6010 * fs/hfs.c (grub_hfs_strncasecmp): New function.
6011 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
6012
6394042e 60132009-03-11 Robert Millan <rmh@aybabtu.com>
6014
6015 * loader/i386/multiboot_elfxx.c
6016 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
6017
b7b50e5f 60182009-03-11 Felix Zielcke <fzielcke@z-51.de>
6019
6020 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
6021 `kern/handler.c'.
6022
1ca7fc96 60232009-03-11 Robert Millan <rmh@aybabtu.com>
6024
6025 * loader/i386/multiboot.c (code_size): New variable.
6026 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 6027 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 6028 4-byte alignment to MBI and others by increasing
7d074e3c 6029 `boot_loader_name_length' appropriately.
1ca7fc96 6030
6031 * loader/i386/multiboot_elfxx.c
6032 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
6033
a83ea1d2 60342009-03-09 Felix Zielcke <fzielcke@z-51.de>
6035
6036 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6037 `fs/ext2.c'.
6038
aa9f3bff 60392009-03-08 Robert Millan <rmh@aybabtu.com>
6040
6041 Make loader/i386/linux.c usable on i386-pc again.
6042
6043 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6044 memory to heap.
6045 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
6046 `#error' stanza.
6047
d8b3b60e 60482009-03-07 Bean <bean123ch@gmail.com>
6049
6050 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
6051 allocation.
6052
b362c9e9 60532009-03-06 Robert Millan <rmh@aybabtu.com>
6054
6055 Fix display issue on terminals with screen size other than 80x25
6056 (e.g. gfxterm with resolution higher than 640x480).
6057
6058 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 6059 position relative to the center of the terminal instead of relying
b362c9e9 6060 on a hardcoded offset.
6061
9304eef1 60622009-03-04 Robert Millan <rmh@aybabtu.com>
6063
6064 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
6065 installed.
6066
6067 * Makefile.in (host_kernel): New variable.
6068 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
6069 scripts instead of just the windows one.
6070 * configure.ac: Initialize and AC_SUBST `host_kernel'.
6071
eabc95fb 60722009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 6073
6074 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
6075 `kern/handler.c'.
6076 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6077 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6078 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6079 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6080 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6081 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6082
ceb1223c 60832009-03-04 Felix Zielcke <fzielcke@z-51.de>
6084
6085 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
6086 or if there's no space for the disk label and print the partition number on a
6087 invalid magic.
6088
4910684a 60892009-03-04 Felix Zielcke <fzielcke@z-51.de>
6090
6091 * util/misc.c: Include <time.h>.
6092 (grub_millisleep): New function.
6093
7e9ca17a 60942009-03-04 Bean <bean123ch@gmail.com>
6095
6096 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
6097 another option -mno-red-zone.
6098
6099 * commands/handler.c: Change module description.
6100
6101 * kern/handler.c: Add missing space at the end of description line.
6102
6103 * kern/list.c: Likewise.
6104
f501677c 61052009-03-03 Robert Millan <rmh@aybabtu.com>
6106
6107 Move more components to the relocation area, and fix mbi pointer
6108 handling to use the destination rather than the origin (thanks to
6109 Vladimir Serbinenko for spotting).
6110
6111 * loader/i386/multiboot.c (mbi_dest): New variable.
6112 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
6113 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
6114 relocation area.
6115
9902d047 61162009-03-01 Bean <bean123ch@gmail.com>
6117
50fb7002 6118 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 6119 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
6120 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
6121 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
6122
6123 * loader/i386/efi/linux.c (acpi_guid): New variable.
6124 (acpi_guid): Likewise.
6125 (EBDA_SEG_ADDR): New constant.
6126 (LOW_MEM_ADDR): Likewise.
6127 (FAKE_EBDA_SEG): Likewise.
6128 (fake_bios_data): New function.
6129 (grub_linux_boot): Call fake_bios_data.
6130
71b9f361 61312009-03-01 Bean <bean123ch@gmail.com>
6132
6133 * commands/terminal.c: Removed.
6134
6135 * commands/handler.c: New file.
6136
6137 * include/grub/list.h: Likewise.
6138
6139 * include/grub/handler.h: Likewise.
6140
6141 * kern/list.c: Likewise.
6142
6143 * kern/handler.c: Likewise.
6144
6145 * kern/term.h: Include header file <grub/handler.h>.
6146 (grub_term_input): Move next field to the beginning.
6147 (grub_term_output): Likewise.
6148 (grub_term_input_class): New variable.
6149 (grub_term_output_class): Likewise.
6150 (grub_term_register_input): Changed to inline function.
6151 (grub_term_register_output): Likewise.
6152 (grub_term_unregister_input): Likewise.
6153 (grub_term_unregister_output): Likewise.
6154 (grub_term_set_current_input): Likewise.
6155 (grub_term_set_current_output): Likewise.
6156 (grub_term_get_current_input): Likewise.
6157 (grub_term_get_current_output): Likewise.
6158 (grub_term_iterate_input): Removed.
6159 (grub_term_iterate_output): Likewise.
6160
6161 * kern/term.c (grub_term_list_input): Removed.
6162 (grub_term_list_output): Likewise.
6163 (grub_term_input_class): New variable.
6164 (grub_term_output_class): Likewise.
50fb7002 6165 (grub_cur_term_input): Change variable as macro.
71b9f361 6166 (grub_cur_term_output): Likewise.
6167 (grub_term_register_input): Removed.
6168 (grub_term_register_output): Likewise.
6169 (grub_term_unregister_input): Likewise.
6170 (grub_term_unregister_output): Likewise.
6171 (grub_term_set_current_input): Likewise.
6172 (grub_term_set_current_output): Likewise.
6173 (grub_term_iterate_input): Likewise.
6174 (grub_term_iterate_output): Likewise.
6175 (grub_term_get_current_input): Likewise.
6176 (grub_term_get_current_output): Likewise.
6177
6178 * util/grub-editenv.c: Include header file <grub/handler.h>.
6179 (grub_term_get_current_input): Removed.
6180 (grub_term_get_current_output): Likewise.
6181 (grub_term_input_class): New variable.
50fb7002 6182 (grub_term_output_class): Likewise.
71b9f361 6183
6184 * util/grub-fstest.c (grub_term_get_current_input): Removed.
6185 (grub_term_get_current_output): Likewise.
6186 (grub_term_input_class): New variable.
50fb7002 6187 (grub_term_output_class): Likewise.
71b9f361 6188
6189 * util/grub-probe.c (grub_term_get_current_input): Removed.
6190 (grub_term_get_current_output): Likewise.
6191 (grub_term_input_class): New variable.
50fb7002 6192 (grub_term_output_class): Likewise.
71b9f361 6193
6194 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
6195 (grub_term_get_current_output): Likewise.
6196 (grub_term_input_class): New variable.
50fb7002 6197 (grub_term_output_class): Likewise.
71b9f361 6198
6199 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
6200 (terminal_mod_SOURCES): Likewise.
6201 (terminal_mod_CFLAGS): Likewise.
6202 (terminal_mod_LDFLAGS): Likewise.
6203
6204 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
6205 handler.c.
6206 (kernel_img_SOURCES): Add list.c and handler.c.
6207 (kernel_img_HEADERS): Add list.h and handler.h.
6208
6209 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6210 handler.c.
6211 (kernel_mod_SOURCES): Add list.c and handler.c.
6212 (kernel_mod_HEADERS): Add list.h and handler.h.
6213
6214 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
6215 handler.c.
6216 (kernel_elf_SOURCES): Add list.c and handler.c.
6217 (kernel_elf_HEADERS): Add list.h and handler.h.
6218
6219 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6220 handler.c.
6221 (kernel_elf_SOURCES): Add list.c and handler.c.
6222 (kernel_elf_HEADERS): Add list.h and handler.h.
6223
6224 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6225 handler.c.
6226 (kernel_mod_SOURCES): Add list.c and handler.c.
6227 (kernel_mod_HEADERS): Add list.h and handler.h.
6228
6229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6230 handler.c.
6231 (kernel_elf_SOURCES): Add list.c and handler.c.
6232 (kernel_elf_HEADERS): Add list.h and handler.h.
6233
8a31787f 62342009-02-27 Robert Millan <rmh@aybabtu.com>
6235
6236 Factorize elf32 / elf64 code in Multiboot loader. This will
6237 prevent it from getting out of sync again.
6238
6239 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
6240 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
6241 grub_multiboot_load_elf64): Move from here ...
6242 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
6243 grub_multiboot_load_elf): ... to here (new file).
6244
51cd3dfc 62452009-02-27 Robert Millan <rmh@aybabtu.com>
6246
6247 * util/grub.d/10_linux.in: Rename "single-user mode" to
6248 "recovery mode".
6249
6e8c9c3a 62502009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
6251
6252 Don't leak in SCSI code.
6253 * disk/scsi.c (grub_scsi_close): free `scsi'.
6254
4b6bf4f9 62552009-02-27 Robert Millan <rmh@aybabtu.com>
6256
6257 * loader/i386/pc/multiboot.c: Move from here ...
6258 * loader/i386/multiboot.c: ... to here. Update all users.
6259
b9413424 62602009-02-27 Robert Millan <rmh@aybabtu.com>
6261
6262 Patch from Alexandre Bique <bique.alexandre@gmail.com>
6263 * util/i386/pc/grub-setup.c (setup): Fix directory path.
6264
50fb7002 62652009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 6266
6267 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
6268 b-tree.
6269
8cc50345 62702009-02-27 Robert Millan <rmh@aybabtu.com>
6271
6272 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
6273 `0x' qualifier as 0 when base is specified as parameter).
6274
6e09b8b7 62752009-02-24 Bean <bean123ch@gmail.com>
6276
6277 * configure.ac: Check for -mcmodel=large in x86_64 target.
6278
6279 * include/grub/efi/api.h (efi_call_10): New macro.
6280 (efi_wrap_10): New function.
6281
6282 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
6283 (GRUB_PE32_REL_BASED_HIGH): Likewise.
6284 (GRUB_PE32_REL_BASED_LOW): Likewise.
6285 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
6286 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
6287 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
6288 (GRUB_PE32_REL_BASED_SECTION): Likewise.
6289 (GRUB_PE32_REL_BASED_REL): Likewise.
6290 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
6291 (GRUB_PE32_REL_BASED_DIR64): Likewise.
6292 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
6293
6294 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
6295 issue.
6296
6297 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
6298 (efi_wrap_10): New function.
6299
6300 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
6301
6302 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
6303 MB/MBP model (NV chipset).
6304 (devdata_devs): Add devpath_5 to the list.
6305
6306 * load/i386/efi/linux.c (video_base): Remove variable.
6307 (RGB_MASK): New macro.
6308 (RGB_MAGIC): Likewise.
6309 (LINE_MIN): Likewise.
6310 (LINE_MAX): Likewise.
6311 (FBTEST_STEP): Likewise.
6312 (FBTEST_COUNT): Likewise.
6313 (fb_list): New variable.
6314 (grub_find_video_card): Remove function.
6315 (find_framebuf): New function.
6316 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
6317 line length.
6318
6319 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
6320 problem for x86_64.
6321
74b21bee 63222009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
6323
6324 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
6325
6326 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
6327 coding tool name.
6328
a455f472 63292009-02-22 Robert Millan <rmh@aybabtu.com>
6330
6331 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
6332 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
6333 in our relocation, instead of using it directly from heap. Also
6334 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
6335
6374daf3 63362009-02-21 Robert Millan <rmh@aybabtu.com>
6337
6338 Implement USB keyboard support (based on patch by Marco Gerards)
6339
6340 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
6341 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
6342 (usb_keyboard_mod_LDFLAGS): New variables.
6343
6344 * term/usb_keyboard.c: New file.
6345
8fa4ea70 63462009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
6347
6348 Corrected wrong declaration
6349
6350 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
6351
353976ac 63522009-02-14 Christian Franke <franke@computer.org>
6353
6354 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
6355 (grub_lspci_iter): Print class code and programming interface byte.
6356
6aa1169b 63572009-02-14 Christian Franke <franke@computer.org>
6358
6359 * gendistlist.sh: Ignore `.svn' directories.
6360
265372ca 63612009-02-14 Felix Zielcke <fzielcke@z-51.de>
6362
6363 * fs/fat.c: Add 2009 to Copyright line.
6364
9ff516f3 63652009-02-14 Christian Franke <franke@computer.org>
6366
6367 * commands/hdparm.c: New file. Provides `hdparm' command
6368 which sends ATA commands via grub_disk_ata_pass_through ().
6369
6370 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
6371
6372 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
6373 and <grub/cpu/io.h> to include/grub/ata.h.
6374 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
6375 (GRUB_CDROM_SECTOR_SIZE): Remove.
6376 (GRUB_ATA_*): Move to include/grub/ata.h.
6377 (GRUB_ATAPI_*): Likewise.
6378 (enum grub_ata_commands): Likewise.
6379 (enum grub_ata_timeout_milliseconds): Likewise.
6380 (struct grub_ata_device): Likewise.
6381 (grub_ata_regset): Likewise.
6382 (grub_ata_regget): Likewise.
6383 (grub_ata_regset2): Likewise.
6384 (grub_ata_regget2): Likewise.
6385 (grub_ata_check_ready): Likewise.
6386 (grub_ata_wait_not_busy): Remove static, exported in
6387 include/grub/ata.h.
6388 (grub_ata_wait_drq): Likewise.
6389 (grub_ata_pio_read): Likewise.
6390
6391 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
6392 function for hdparm.mod.
6393
6394 * include/grub/ata.h: New file, contains declarations from
6395 disk/ata.c.
6396 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
6397
6398 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
6399 (grub_disk_ata_pass_through): New exported variable.
6400
6401 * kern/disk.c (grub_disk_ata_pass_through): New variable.
6402
772e23da 64032009-02-13 Colin D Bennett <colin@gibibit.com>
6404
6405 Support multiple fallback entries, and provide an API to support
6406 executing default+fallback menu entries. Renamed the `terminal' menu
6407 viewer to `text'.
6408
6409 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
6410 variable declaration.
6411 (grub_menu_execute_callback): New structure declaration.
6412 (grub_menu_execute_callback_t): New typedef.
6413 (grub_menu_execute_with_fallback): New function declaration.
6414 (grub_menu_get_entry): Likewise.
6415 (grub_menu_get_timeout): Likewise.
6416 (grub_menu_set_timeout): Likewise.
6417
6418 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
6419
6420 * normal/menu.c (grub_wait_after_message): Moved to
6421 `normal/menu_text.c'.
6422 (draw_border): Likewise.
6423 (print_message): Likewise.
6424 (print_entry): Likewise.
6425 (print_entries): Likewise.
6426 (grub_menu_init_page): Likewise.
6427 (get_entry_number): Likewise.
6428 (print_timeout): Likewise.
6429 (run_menu): Likewise.
6430 (grub_menu_execute_entry): Likewise.
6431 (show_text_menu): Likewise.
6432 (get_and_remove_first_entry_number): New function.
6433 (grub_menu_execute_with_fallback): Likewise.
6434 (get_entry): Renamed to ...
6435 (grub_menu_get_entry): .. this and made it global.
6436 (get_timeout): Renamed to ...
6437 (grub_menu_get_timeout): ... this and made it global.
6438 (set_timeout): Renamed to ...
6439 (grub_menu_set_timeout): ... this and made it global.
6440 (grub_normal_terminal_menu_viewer): Renamed to ...
6441 (grub_normal_text_menu_viewer): ... this.
6442
6443 * normal/menu_text.c: New file. Extracted text-menu-specific code
6444 from normal/menu.c.
6445
6446 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
6447 (normal_mod_SOURCES): Likewise.
6448
6449 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6450 (normal_mod_SOURCES): Likewise.
6451
6452 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6453 (normal_mod_SOURCES): Likewise.
6454
6455 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
6456 (normal_mod_SOURCES): Likewise.
6457
6458 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6459 (normal_mod_SOURCES): Likewise.
6460
6461 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6462 (normal_mod_SOURCES): Likewise.
6463
6464 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6465 (normal_mod_SOURCES): Likewise.
6466
16ac430e 64672009-02-11 Robert Millan <rmh@aybabtu.com>
6468
6469 * util/grub.d/00_header.in: Update old reference to `font' command.
6470
06ff20fc 64712009-02-10 Felix Zielcke <fzielcke@z-51.de>
6472
6473 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
6474
6475 Based on patch from Javier Martín.
6476
96da9407 64772009-02-09 Felix Zielcke <fzielcke@z-51.de>
6478
6479 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 6480 to avoid false positives with FAT.
96da9407 6481 (grub_fstest_SOURCES): Likewise.
6482 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6483 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6484 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6485 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6486 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6487 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6488
6dca6fe4 64892009-02-09 Felix Zielcke <fzielcke@z-51.de>
6490
06ff20fc 6491 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 6492 bpb.version_specific.fat12_or_fat16.fstype and
6493 bpb.version_specific.fat32.fstype.
6494
2550c62f 64952009-02-08 Robert Millan <rmh@aybabtu.com>
6496
be110b30 6497 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 6498
56978920 64992009-02-08 Robert Millan <rmh@aybabtu.com>
6500
6501 * Makefile.in (host_os, host_cpu): New variables.
6502 (target_os): Remove. Update all users.
6503
d64399b5 65042009-02-08 Marco Gerards <marco@gnu.org>
6505
6506 * Makefile.in (enable_grub_emu_usb): New variable.
6507 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
6508 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
6509 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
6510 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
6511 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
6512 `usbtest.mod' and `usbms.mod'.
6513 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
6514 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
6515 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
6516 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
6517 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
6518 variables.
6519
6520 * disk/usbms.c: New file.
6521
6522 * include/grub/usb.h: Likewise.
6523
6524 * include/grub/usbtrans.h: Likewise.
6525
6526 * include/grub/usbdesc.h: Likewise.
6527
6528 * bus/usb/usbtrans.c: Likewise.
6529
6530 * bus/usb/ohci.c: Likewise.
6531
6532 * bus/usb/uhci.c: Likewise.
6533
6534 * bus/usb/usbhub.c: Likewise.
6535
6536 * bus/usb/usb.c: Likewise.
6537
6538 * commands/usbtest.c: Likewise.
6539
6540 * util/usb.c: Likewise.
50fb7002 6541
d64399b5 6542 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
6543
6544 * configure.ac: Test for libusb presence.
50fb7002 6545
d64399b5 6546 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
6547
2b40d6bb 65482009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
6549
6550 * kern/mm.c: Add more comments.
6551
73a4ce81 65522009-02-08 Robert Millan <rmh@aybabtu.com>
6553
6554 Patch from Javier Martín.
6555 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
6556 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
6557
f821ce59 65582009-02-08 Robert Millan <rmh@aybabtu.com>
6559
6560 * fs/cpio.c: Split tar functionality to ...
6561 * fs/tar.c: ... here (new file). Update all users.
6562
aebfc4b0 65632009-02-07 Robert Millan <rmh@aybabtu.com>
6564
6565 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
6566 backward-incompatible features.
6567
6568 Based on patch from Javier Martín, with some adjustments.
6569
50fb7002 65702009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 6571
6572 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
6573
0bb5115e 65742009-02-07 Robert Millan <rmh@aybabtu.com>
6575
6576 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
6577 position of `disk/lvm.c' to ensure grub_init_all() always picks it
6578 after the RAID stuff.
6579
38a0f8e7 65802009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
6581
50fb7002 6582 Fixes problem when running vbetest command as reported by
38a0f8e7 6583 Vladimir Serbinenko <phcoder@gmail.com>.
6584
6585 * (grub_vbe_set_video_mode): Fixed problem with text modes.
6586
3143cc1c 65872009-02-04 Felix Zielcke <fzielcke@z-51.de>
6588
6589 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
6590 /dev/md/NpN style mdraid devices.
6591
9cba6fce 65922009-02-03 Felix Zielcke <fzielcke@z-51.de>
6593
6594 * util/unifont2pff.rb: Remove.
6595
e507a2c1 65962009-02-03 Felix Zielcke <fzielcke@z-51.de>
6597
6598 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
6599 `#'.
6600
d2c2b4cd 66012009-02-03 Felix Zielcke <fzielcke@z-51.de>
6602
6603 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
6604 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6605 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6606 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6607 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6608 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6609 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6610
b4315fb0 66112009-02-02 Christian Franke <franke@computer.org>
6612
6613 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6614
de3aa260 66152009-02-01 Felix Zielcke <fzielcke@z-51.de>
6616
7c3ff286 6617 * INSTALL: Note that we now require at least autoconf 2.59 and
6618 that LZO is optional.
de3aa260 6619
825a182b 66202009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6621
6622 Base on patch on bug #24154 created by Tomas Tintera
6623 <trosos@seznam.cz>.
6624
6625 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6626
a69ef770 66272009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6628
7c3ff286 6629 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 6630 <bero@arklinux.org>.
6631
6632 * normal/parser.y (script_init): Add missing semicolon.
6633
6fa42fa6 66342009-01-31 Colin D Bennett <colin@gibibit.com>
6635
7c3ff286 6636 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 6637 (free_menu_entry_classes): Added.
6638 (grub_normal_menu_addentry): Added class property handling.
6639 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6640 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6641
6642 * normal/menu_viewer.c: New file.
6643
6644 * normal/menu.c (run_menu_entry): Renamed to ...
6645 (grub_menu_execute_entry): ... this and made it as global.
6646 (grub_menu_run): Renamed to ...
6647 (show_text_menu): ... this and made it local.
6648 (show_text_menu): Adapt to new function names.
6649 (grub_normal_terminal_menu_viewer): New global variable.
6650
6651 * include/grub/menu.h: New file.
6652
6653 * include/grub/menu_viewer.h: New file.
6654
6655 * include/grub/normal.h: Added include to grub/menu.h.
6656 (grub_menu_entry): Moved to include/grub/menu.h.
6657 (grub_menu_entry_t): Likewise.
6658 (grub_menu): Likewise.
6659 (grub_menu_t): Likewise.
6660 (grub_normal_terminal_menu_viewer): Added.
6661 (grub_menu_execute_entry): Likewise.
6662 (grub_menu_run): Removed.
6663
6664 * DISTLIST: Added include/grub/menu.h.
6665 Added include/grub/menu_viewer.h.
6666 Added normal/menu_viewer.c.
6667
66682009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
6669
6670 * normal/execute.c (grub_script_execute_menuentry): Changed to use
6671 arglist for menutitle arguments.
6672
6673 * normal/main.c (grub_normal_menu_addentry): Likewise.
6674
6675 * normal/parser.y (menuentry): Likewise.
6676
6677 * normal/script.c (grub_script_create_cmdmenu): Likewise.
6678
6679 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
6680 (grub_script_create_cmdmenu): Likewise.
6681
6682 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
6683
6684 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
6685 changes.
6686
6687 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
6688
6689 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
6690
6691 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
6692
6693 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6694
6695 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6696
6697 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6698
56192c23 66992009-01-30 Christian Franke <franke@computer.org>
6700
6701 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
6702 in option help text.
6703
d72521b3 67042009-01-27 Pavel Roskin <proski@gnu.org>
6705
6706 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
6707
994b5e84 67082009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6709
6710 * commands/lsmmap.c: Add include to grub/machine/memory.h.
6711
6712 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
6713
6714 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
6715 unregister function.
6716
6a7eab2c 67172009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6718
6719 * disk/scsi.c (grub_scsi_read): Fix sign problem.
6720
6721 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
6722
6723 * util/grub-mkfont.c (usage): Fix typo.
6724
6725 * util/elf/grub-mkimage.c (load_modules): Fix warning.
6726
1806b56e 67272009-01-26 Daniel Mierswa <impulze@impulze.org>
6728
3fb18f09 6729 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
6730
336e1fb9 6731 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
6732
1806b56e 6733 * kern/misc.c (grub_strcasecmp): New function.
6734 (grub_strcasecmp): Use grub_size_t instead of int for length.
6735 Fix return value.
6736 * include/grub/misc.h: Update function prototypes.
6737
580b2a0f 67382009-01-26 Robert Millan <rmh@aybabtu.com>
6739
6740 * configure.ac: Fix cross-compilation check.
ef257b36 6741
d31c24f1 67422009-01-22 Christian Franke <franke@computer.org>
6743
6744 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
6745 (precision) digit string. Allow `.format2' without `format1' (width).
6746 Limit input chars for `%s' output to `format2' if specified. This is
6747 compatible with standard printf ().
6748
3138b44c 67492009-01-22 Christian Franke <franke@computer.org>
6750
6751 * disk/ata.c (grub_ata_wait_status): Replace by ...
6752 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
6753 other status bits may be invalid while BSY is asserted.
6754 (grub_ata_check_ready): New function.
6755 (grub_ata_cmd): Removed.
6756 (grub_ata_wait_drq): New function.
6757 (grub_ata_strncpy): Remove inline.
6758 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
6759 and error check now done by grub_ata_wait_drq ().
6760 (grub_ata_pio_write): Likewise.
6761 (grub_atapi_identify): Set DEV before check for !BSY. Use
6762 grub_ata_wait_drq () to wait for data.
6763 (grub_ata_device_initialize): Add status register check to
6764 detect missing SATA slave devices. Add debug messages.
6765 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
6766 (grub_atapi_packet): Set DEV before check for !BSY. Replace
6767 transfer loop by grub_ata_pio_write ().
6768 (grub_ata_identify): Set DEV before check for !BSY. Use
6769 grub_ata_wait_drq () to wait for data.
ef257b36 6770 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 6771 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
6772 read/write in one loop. Fix invalid command on write. Fix incomplete
6773 command on (size % batch) == 0. Add missing error check after write of
6774 last block. Add debug messages.
6775 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
6776
59a64ef6 67772009-01-19 Christian Franke <franke@computer.org>
6778
6779 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
6780 (GRUB_ATAPI_IREASON_*): Likewise.
6781 (grub_ata_pio_write): Fix timeout error return.
6782 (grub_atapi_identify): Add grub_ata_wait () after cmd.
6783 (grub_atapi_wait_drq): New function.
6784 (grub_atapi_packet): New parameter `size'.
6785 Use grub_atapi_wait_drq () and direct write instead of
6786 grub_ata_pio_write ().
6787 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
6788 reads the number of bytes requested by the device for each DRQ
6789 assertion.
6790 (grub_atapi_write): Remove old implementation, return not
6791 implemented instead.
6792
1cfe20b3 67932009-01-19 Christian Franke <franke@computer.org>
6794
6795 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
6796 of 512 to calculate data size.
6797 (grub_scsi_read12): Likewise.
6798 (grub_scsi_write10): Likewise.
6799 (grub_scsi_write12): Likewise.
6800 (grub_scsi_read): Adjust size according to blocksize.
6801 Add checks for invalid blocksize and unaligned transfer.
6802
bee5fe5d 68032009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
6804
6805 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
6806
ef257b36 6807 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 6808 width glyphs.
6809
3e643f8c 68102009-01-19 Robert Millan <rmh@aybabtu.com>
6811
6812 * config.guess: Update to latest version from config git.
6813 * config.sub: Likewise.
6814
4fa80998 68152009-01-17 Felix Zielcke <fzielcke@z-51.de>
6816
6817 * Makefile.in: Change font compilation to use new grub-mkfont instead
6818 of java version.
6819
6820 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
6821 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6822 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6823 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6824 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6825 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6826 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6827 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6828 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6829
7086085b 68302009-01-16 Christian Franke <franke@computer.org>
6831
6832 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
6833 (enum grub_ata_timeout_milliseconds): New enum.
6834 (grub_ata_wait_status): Add parameter milliseconds.
6835 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
6836 recovery from timed-out commands.
6837 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
6838 return grub_errno instead of REG_ERROR.
6839 (grub_ata_pio_write): Add parameter milliseconds.
6840 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
6841 Pass milliseconds to grub_ata_wait_status () and
6842 grub_ata_pio_read ().
6843 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
6844 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
6845 grub_ata_wait_status (). Fix IDENTIFY timeout check.
6846 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
6847 It is not suitable for device detection, because DEV bit is ignored,
6848 the command may run too long, and not all devices set the signature
6849 properly.
6850 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
6851 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
6852 Fix device selection, DEV bit must be set first to address the registers
6853 of the correct device.
6854 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
6855 grub_ata_pio_read/write ().
6856 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
6857 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
6858
4a412913 68592009-01-13 Carles Pina i Estany <carles@pina.cat>
6860
6861 * util/grub-editenv.c (main): Use fseeko(), not fseek().
6862
7795c55e 68632009-01-13 Bean <bean123ch@gmail.com>
d913988c 6864
6865 * util/grub-mkfont.c (write_font): forget to remove some debug code.
6866
7795c55e 68672009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 6868
6869 * Makefile.in: (enable_grub_mkfont): New variable.
6870 (freetype_cflags): Likewise.
6871 (freetype_libs): Likewise.
6872
6873 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
6874 (grub_mkfont_SOURCES): New variable.
6875 (grub_mkfont_CFLAGS): Likewise.
6876 (grub_mkfont_LDFLAGS): Likewise.
6877
6878 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
6879 library if `--enable-grub-mkfont' is requested.
6880 (enable_grub_mkfont): New variable.
6881 (freetype_cflags): Likewise.
6882 (freetype_libs): Likewise.
6883
6884 * util/grub-mkfont.c: New file.
6885
093af1fe 68862009-01-12 Christian Franke <franke@computer.org>
6887
6888 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
6889 mode check. Fix setting of compat_use[].
6890
f36cc108 68912009-01-10 Robert Millan <rmh@aybabtu.com>
6892
6893 Update a few copyright years which we forgot to do in 2008 (only for
6894 files whose changes made in 2008 were copyright-significant)
6895
6896 * Makefile.in: Add 2008 to Copyright line.
6897 * disk/ieee1275/ofdisk.c: Likewise.
6898 * disk/efi/efidisk.c: Likewise.
6899 * kern/dl.c: Likewise.
6900 * kern/sparc64/ieee1275/init.c: Likewise.
6901 * kern/mm.c: Likewise.
6902 * kern/efi/mm.c: Likewise.
6903 * boot/i386/pc/boot.S: Likewise.
6904 * genfslist.sh: Likewise.
6905 * fs/iso9660.c: Likewise.
6906 * fs/hfs.c: Likewise.
6907 * fs/jfs.c: Likewise.
6908 * fs/minix.c: Likewise.
6909 * fs/ufs.c: Likewise.
6910 * gensymlist.sh.in: Likewise.
6911 * genkernsyms.sh.in: Likewise.
6912 * include/grub/misc.h: Likewise.
6913 * include/grub/types.h: Likewise.
6914 * include/grub/symbol.h: Likewise.
6915 * include/grub/elf.h: Likewise.
6916 * include/grub/kernel.h: Likewise.
6917 * include/grub/disk.h: Likewise.
6918 * include/grub/dl.h: Likewise.
6919 * include/grub/i386/linux.h: Likewise.
6920 * include/grub/i386/pc/biosdisk.h: Likewise.
6921 * include/grub/efi/api.h: Likewise.
6922 * include/grub/efi/pe32.h: Likewise.
6923 * include/grub/util/misc.h: Likewise.
6924 * normal/execute.c: Likewise.
6925 * normal/arg.c: Likewise.
6926 * normal/completion.c: Likewise.
6927 * normal/lexer.c: Likewise.
6928 * normal/parser.y: Likewise.
6929 * normal/misc.c: Likewise.
6930 * commands/i386/pc/vbeinfo.c: Likewise.
6931 * commands/hexdump.c: Likewise.
6932 * commands/terminal.c: Likewise.
6933 * commands/ls.c: Likewise.
6934 * commands/help.c: Likewise.
6935 * partmap/pc.c: Likewise.
6936 * loader/efi/chainloader.c: Likewise.
6937 * loader/multiboot_loader.c: Likewise.
6938 * loader/i386/pc/multiboot2.c: Likewise.
6939 * term/efi/console.c: Likewise.
6940 * term/i386/pc/serial.c: Likewise.
6941 * util/lvm.c: Likewise.
6942 * util/console.c: Likewise.
6943 * util/i386/efi/grub-mkimage.c: Likewise.
6944 * util/raid.c: Likewise.
6945
7f02114b 69462009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
6947
6948 * commands/videotest.c: Removed include to grub/machine/memory.h.
6949
6950 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6951 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6952 (video_mod_SOURCES): Removed.
6953 (video_mod_CFLAGS): Likewise.
6954 (video_mod_LDFLAGS): Likewise.
6955 (gfxterm_mod_SOURCES): Likewise.
6956 (gfxterm_mod_CFLAGS): Likewise.
6957 (gfxterm_mod_LDFLAGS): Likewise.
6958 (videotest_mod_SOURCES): Likewise.
6959 (videotest_mod_CFLAGS): Likewise.
6960 (videotest_mod_LDFLAGS): Likewise.
6961 (bitmap_mod_SOURCES): Likewise.
6962 (bitmap_mod_CFLAGS): Likewise.
6963 (bitmap_mod_LDFLAGS): Likewise.
6964 (tga_mod_SOURCES): Likewise.
6965 (tga_mod_CFLAGS): Likewise.
6966 (tga_mod_LDFLAGS): Likewise.
6967 (jpeg_mod_SOURCES): Likewise.
6968 (jpeg_mod_CFLAGS): Likewise.
6969 (jpeg_mod_LDFLAGS): Likewise.
6970 (png_mod_SOURCES): Likewise.
6971 (png_mod_CFLAGS): Likewise.
6972 (png_mod_LDFLAGS): Likewise.
6973
6974 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6975 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6976 (video_mod_SOURCES): Added.
6977 (video_mod_CFLAGS): Likewise.
6978 (video_mod_LDFLAGS): Likewise.
6979 (videotest_mod_SOURCES): Likewise.
6980 (videotest_mod_CFLAGS): Likewise.
6981 (videotest_mod_LDFLAGS): Likewise.
6982 (bitmap_mod_SOURCES): Likewise.
6983 (bitmap_mod_CFLAGS): Likewise.
6984 (bitmap_mod_LDFLAGS): Likewise.
6985 (tga_mod_SOURCES): Likewise.
6986 (tga_mod_CFLAGS): Likewise.
6987 (tga_mod_LDFLAGS): Likewise.
6988 (jpeg_mod_SOURCES): Likewise.
6989 (jpeg_mod_CFLAGS): Likewise.
6990 (jpeg_mod_LDFLAGS): Likewise.
6991 (png_mod_SOURCES): Likewise.
6992 (png_mod_CFLAGS): Likewise.
6993 (png_mod_LDFLAGS): Likewise.
6994 (gfxterm_mod_SOURCES): Likewise.
6995 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 6996 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 6997
6998 * term/gfxterm.c: Removed include to grub/machine/memory.h,
6999 grub/machine/console.h.
7000
644fff97 70012009-01-04 Jerone Young <jerone@gmail.com>
7002
7003 Make on screen instructions clearer
7004
7005 Based on patch created by Jidanni <jidanni@jidanni.org>
7006
7007 * normal/menu.c: print clearer instructions on the screen
7008
1e901a75 70092009-01-02 Colin D Bennett <colin@gibibit.com>
7010
7011 New font engine.
34c44600 7012
1e901a75 7013 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
7014 build system and fixed gfxterm.c to work with different sized fonts.
7015
7016 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 7017
1e901a75 7018 * configure: Re-generated.
34c44600 7019
1e901a75 7020 * DISTLIST: Removed font/manager.c.
7021 Added font/font.c.
7022 Added font/font_cmd.c.
34c44600 7023
1e901a75 7024 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
7025 compilation.
34c44600 7026
1e901a75 7027 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 7028
7029 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 7030
7031 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 7032
1e901a75 7033 * normal/menu.c: Likewise.
34c44600 7034
1e901a75 7035 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
7036 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 7037
1e901a75 7038 * include/grub/font.h: Replaced with new file.
34c44600 7039
1e901a75 7040 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
7041 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
7042 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
7043 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
7044 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 7045 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 7046 fg_red, fg_green, fg_blue, fg_alpha.
7047 (grub_video_adapter): Removed blit_glyph.
34c44600 7048 (grub_video_blit_glyph): Removed.
7049
1e901a75 7050 * font/manager.c: Removed file.
34c44600 7051
7052 * font/font.c: New file.
7053
1e901a75 7054 * font/font_cmd.c: Likewise.
34c44600 7055
1e901a75 7056 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 7057
1e901a75 7058 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
7059 (grub_video_vbe_map_rgba): Likewise.
7060 (grub_video_vbe_unmap_color_int): Likewise.
7061 (grub_video_vbe_blit_glyph): Removed.
7062 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 7063
1e901a75 7064 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
7065 (get_pixel): Likewise.
34c44600 7066 (set_pixel): Likewise.
7067
1e901a75 7068 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 7069
1e901a75 7070 * term/gfxterm.c: Adapted to new font engine.
34c44600 7071
1e901a75 7072 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 7073
1e901a75 7074 * term/i386/pc/vga.c: Likewise.
34c44600 7075
1e901a75 7076 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 7077
1e901a75 7078 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 7079
1e901a75 7080 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7081
1e901a75 7082 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7083
1e901a75 7084 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 7085
1e901a75 7086 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 7087
1e901a75 7088 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 7089
1e901a75 7090 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 7091
1e901a75 7092 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7093
7094 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 7095
1e901a75 7096 * util/grub-mkconfig_lib.in: Changed font extension.
7097
278922e8 70982008-12-28 Felix Zielcke <fzielcke@z-51.de>
7099
7100 * util/getroot.c (grub_util_get_grub_dev): Add support for
7101 /dev/md/dNNpNN style partitionable mdraid devices.
7102
3ced05cf 71032008-12-12 Alex Smith <alex@alex-smith.me.uk>
7104
7105 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
7106 at a time limit of the PXE TFTP API correctly.
7107 (grub_pxefs_close): Likewise.
7108
7fd0ee30 71092008-11-29 Robert Millan <rmh@aybabtu.com>
7110
34c44600 7111 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 7112 grub_ata_device_initialize() calls.
7113
34c44600 71142008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 7115
7116 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
7117 iteration failed.
7118 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
7119
89313780 71202008-11-28 Robert Millan <rmh@aybabtu.com>
7121
7122 Fix build on powerpc-ieee1275. Based on patch created by
7123 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
7124 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7125 `kern/ieee1275/mmap.c'.
7126 * include/grub/powerpc/ieee1275/memory.h: New file.
7127
15257703 7128 Provide grub-install on coreboot.
7129 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
7130 (grub_install_SOURCES): New variable.
7131 * util/i386/pc/grub-install.in: Add a few condition checks to make it
7132 usable on coreboot.
7133
9fc5388a 71342008-11-25 Felix Zielcke <fzielcke@z-51.de>
7135
7136 * util/grub-fstest.c (grub_term_get_current_input): Change return type
7137 to `grub_term_input_t'.
7138 (grub_term_get_current_output): Change return type to
7139 `grub_term_output_t'.
7140
bc3a2f31 71412008-11-22 Robert Millan <rmh@aybabtu.com>
7142
34c44600 7143 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 7144 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
7145 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
7146 grub_vga_text_cls().
7147
80fc88f2 7148 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 7149 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 7150
cbf36fd3 7151 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
7152 to 0x200000 (avoids trouble with some OFW implementations, and matches
7153 with the one in Yaboot).
7154 Reported by Manoel Abranches
7155
73e8e268 71562008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 7157
7158 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
7159 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
7160
73e8e268 7161 * util/grub-mkconfig_lib.in (grub_warn): New function.
7162 (convert_system_path_to_grub_path): Use grub_warn() when issuing
7163 warnings, to obtain consistent formatting.
7164 * util/grub.d/00_header.in: Likewise.
7165 * util/update-grub_lib.in: Likewise.
7166
e94045a1 7167 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 7168 Move comment text to `#error' stanza.
e94045a1 7169
79d29fd7 7170 Harmonize ieee1275's grub_available_iterate() with the generic
7171 grub_machine_mmap_iterate() interface (fixes a recently-introduced
7172 build problem on i386-ieee1275):
7173 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
7174 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
7175 parameter `type'. Update all users of this function.
7176 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7177 `kern/ieee1275/mmap.c'.
7178 * kern/ieee1275/init.c
7179 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
7180 with ...
7181 (grub_machine_mmap_iterate): ... this.
7182 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
7183 return type to `grub_err_t'. Update all implementations of this
7184 function prototype.
7185 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
7186 Likewise.
7187
60d6b16e 7188 Add `lsmmap' command (lists firmware-provided memory map):
7189 * commands/lsmmap.c: New file.
7190 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
7191 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
7192 variables.
7193 * conf/powerpc-ieee1275.rmk: Likewise.
7194 * conf/i386-coreboot.rmk: Likewise.
7195 * conf/i386-ieee1275.rmk: Likewise.
7196
ebaaf49b 71972008-11-19 Robert Millan <rmh@aybabtu.com>
7198
7199 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 7200 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
7201 constraints to initrd allocation (based on code from
7202 loader/i386/pc/linux.c). Without them, initrd was allocated too high
7203 for Linux to find it.
ebaaf49b 7204
dfab719f 72052008-11-14 Robert Millan <rmh@aybabtu.com>
7206
7207 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
7208 order to cope with duplicate slashes.
7209
10fc3eb9 72102008-11-14 Robert Millan <rmh@aybabtu.com>
7211
7212 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
7213 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
7214 don't want to mess with lower memory, because it is used in the Linux
7215 loader.
7216
7217 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 7218 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 7219 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
7220 is in our heap (probably as a result of it being corrupted during
2f2a3442 7221 decompression). Add #error instance with comment to explain why this
7222 loader isn't currently usable on PC/BIOS.
10fc3eb9 7223
e2e07847 72242008-11-14 Robert Millan <rmh@aybabtu.com>
7225
7226 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 7227 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 7228
fe8e8d69 72292008-11-12 Robert Millan <rmh@aybabtu.com>
7230
7231 Make loader/i386/linux.c buildable on i386-pc (although disabled).
7232
7233 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
7234 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
7235 from here ...
7236 * include/grub/i386/pc/memory.h: ... to here.
7237
976b07d0 72382008-11-12 Robert Millan <rmh@aybabtu.com>
7239
7240 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
7241 split).
7242
7243 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
7244 (grub_console_cur_color, grub_console_real_putchar)
7245 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7246 (grub_console_setcolorstate, grub_console_setcolor)
7247 (grub_console_getcolor): Move from here ...
7248 * include/grub/i386/vga_common.h: ... to here (new file).
7249
7250 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
7251 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
7252 `<grub/i386/io.h>'.
7253 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
7254 `<grub/i386/vga_common.h>'.
7255
76679cd3 72562008-11-12 Robert Millan <rmh@aybabtu.com>
7257
7258 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
7259 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
7260 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
7261 variables.
7262 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7263 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
7264
7265 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
7266 grub_console_init() with call to grub_vga_text_init().
7267 (grub_machine_fini): Replace call to
7268 grub_console_fini() with call to grub_vga_text_fini() and
7269 grub_at_keyboard_fini().
7270
7271 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
7272 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7273 (grub_console_setcolorstate, grub_console_setcolor)
7274 (grub_console_getcolor): New function prototypes.
7275
7276 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
7277 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
7278 (grub_vga_text_setcursor): Static-ize.
7279 (grub_vga_text_term): New structure.
7280 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
7281
7282 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
7283 (grub_console_cur_color, grub_console_standard_color)
7284 (grub_console_normal_color, grub_console_highlight_color)
7285 (map_char, grub_console_putchar, grub_console_getcharwidth)
7286 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
7287 (grub_console_getcolor): Move from here ...
7288 * term/i386/vga_common.c: ... to here (same function names).
7289
95b841d3 72902008-11-12 Robert Millan <rmh@aybabtu.com>
7291
7292 Use newly-added Multiboot support in coreboot.
7293
7294 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7295 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
7296
7297 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
7298 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
7299 (codestart): Store the MBI in `startup_multiboot_info' when we're
7300 being loaded using Multiboot.
7301
7302 * kern/i386/coreboot/init.c (grub_machine_init): Move
7303 grub_at_keyboard_init() call to beginning of function (useful for
7304 debugging). Call grub_machine_mmap_init() before attempting to use
7305 grub_machine_mmap_iterate().
7306 (grub_lower_mem, grub_upper_mem): Move from here ...
7307 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
7308 here (new file).
7309
7310 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
7311 function prototype.
7312
761ca975 73132008-11-12 Robert Millan <rmh@aybabtu.com>
7314
7315 Fix a regression introduced by the at_keyboard.mod split. Because
7316 some terminals are default on some platforms and non-default on
7317 others, the first terminal being registered determines which is
7318 going to be default.
7319
7320 * kern/term.c (grub_term_register_input): If this is the first
7321 terminal being registered, set it as the current one.
7322 (grub_term_register_output): Likewise.
7323
7324 * term/efi/console.c (grub_console_init): Do not call
7325 grub_term_set_current_output() or grub_term_set_current_input().
7326 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
7327 * term/i386/pc/console.c (grub_console_init): Likewise.
7328 (grub_console_fini): Do not call grub_term_set_current_input()
7329 (but leave grub_term_set_current_output() to restore text mode).
7330
6c529df7 73312008-11-10 Robert Millan <rmh@aybabtu.com>
7332
7333 * util/grub.d/00_header.in: Add backward compatibility check for
7334 versions of terminal.mod that don't understand `terminal_input' or
7335 `terminal_output'.
7336
132e4113 73372008-11-09 Robert Millan <rmh@aybabtu.com>
7338
7339 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
7340 `terminal_input' / `terminal_output', not `terminal'.
7341
ac293d50 73422008-11-08 Robert Millan <rmh@aybabtu.com>
7343
7344 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 7345 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 7346
0025933a 73472008-11-08 Robert Millan <rmh@aybabtu.com>
7348
7349 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 7350 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 7351 members. Update all users.
7352 * util/console.c (grub_ncurses_term): Split in ...
7353 (grub_ncurses_term_input): ... this, and ...
7354 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 7355 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 7356
37c86336 73572008-11-08 Robert Millan <rmh@aybabtu.com>
7358
7359 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
7360 (PKGDATA): Add $(pkgdata_SRCDIR).
7361 (pkglib_BUILDDIR): New variable.
7362 (pkgdata_SRCDIR): New variable.
7363 (build_env.mk): New target.
7364 (include_DATA): New variable.
7365 (install-local): Install $(include_DATA) files in $(includedir).
7366
b6c15a2d 73672008-11-07 Pavel Roskin <proski@gnu.org>
7368
d99d46f1 7369 * gendistlist.sh: Use C locale for sorting to ensure consistent
7370 output on all systems.
7371
b6c15a2d 7372 * util/grub.d/00_header.in: Remove incorrect space before
7373 "serial".
7374
c32ee8c9 73752008-11-07 Robert Millan <rmh@aybabtu.com>
7376
7377 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
7378 per specification.
7379 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
7380 * loader/multiboot_loader.c (find_multi_boot2_header): New function
7381 (based on find_multi_boot1_header).
7382 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
7383 using find_multi_boot2_header(), and abort if neither Multiboot or
7384 Multiboot headers were found.
7385
651c29b7 73862008-11-07 Robert Millan <rmh@aybabtu.com>
7387
7388 Modularize at_keyboard.mod:
7389
7390 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
7391 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
7392 (at_keyboard_mod_LDFLAGS): New variables.
7393
7394 Actual terminal split:
7395
7396 * include/grub/term.h (struct grub_term): Split in ...
7397 (struct grub_term_input): ... this, and ...
7398 (struct grub_term_output): ... this. Update all users.
7399 (grub_term_set_current): Split in ...
7400 (grub_term_set_current_input): ... this, and ...
7401 (grub_term_set_current_output): ... this.
7402 (grub_term_get_current): Split in ...
7403 (grub_term_get_current_input): ... this, and ...
7404 (grub_term_get_current_output): ... this.
7405 (grub_term_register): Split in ...
7406 (grub_term_register_input): ... this, and ...
7407 (grub_term_register_output): ... this.
7408 (grub_term_unregister): Split in ...
7409 (grub_term_unregister_input): ... this, and ...
7410 (grub_term_unregister_output): ... this.
7411 (grub_term_iterate): Split in ...
7412 (grub_term_iterate_input): ... this, and ...
7413 (grub_term_iterate_output): ... this.
7414
7415 * kern/term.c (grub_term_list): Split in ...
7416 (grub_term_list_input): ... this, and ...
7417 (grub_term_list_output): ... this. Update all users.
7418 (grub_cur_term): Split in ...
7419 (grub_cur_term_input): ... this, and ...
7420 (grub_cur_term_output): ... this. Update all users.
7421 (grub_term_set_current): Split in ...
7422 (grub_term_set_current_input): ... this, and ...
7423 (grub_term_set_current_output): ... this.
7424 (grub_term_get_current): Split in ...
7425 (grub_term_get_current_input): ... this, and ...
7426 (grub_term_get_current_output): ... this.
7427 (grub_term_register): Split in ...
7428 (grub_term_register_input): ... this, and ...
7429 (grub_term_register_output): ... this.
7430 (grub_term_unregister): Split in ...
7431 (grub_term_unregister_input): ... this, and ...
7432 (grub_term_unregister_output): ... this.
7433 (grub_term_iterate): Split in ...
7434 (grub_term_iterate_input): ... this, and ...
7435 (grub_term_iterate_output): ... this.
7436
7437 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
7438 a check for input and one for output (and only attempt to get keys
7439 from user when input works).
7440
7441 * util/grub-probe.c (grub_term_get_current): Split in ...
7442 (grub_term_get_current_input): ... this, and ...
7443 (grub_term_get_current_output): ... this.
7444 * util/grub-fstest.c: Likewise.
7445 * util/i386/pc/grub-setup.c: Likewise.
7446 * util/grub-editenv.c: Likewise.
7447
7448 Portability adjustments:
7449
7450 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
7451 `term/i386/pc/at_keyboard.c'.
7452 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
7453 grub_keyboard_controller_init() (now handled by terminal .init).
7454 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
7455 grub_at_keyboard_init().
7456 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
7457 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
7458 at_keyboard.mod via input terminal interface).
7459 * include/grub/i386/coreboot/console.h: Convert into a stub for
7460 `<grub/i386/pc/console.h>'.
7461
7462 Migrate full terminals to new API:
7463
7464 * term/efi/console.c (grub_console_term): Split into ...
7465 (grub_console_term_input): ... this, and ...
7466 (grub_console_term_output): ... this. Update all users.
7467 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
7468 (grub_ofconsole_init): Split into ...
7469 (grub_ofconsole_init_input): ... this, and ...
7470 (grub_ofconsole_init_output): ... this.
7471 (grub_ofconsole_term): Split into ...
7472 (grub_ofconsole_term_input): ... this, and ...
7473 (grub_ofconsole_term_output): ... this. Update all users.
7474 * term/i386/pc/serial.c (grub_serial_term): Split into ...
7475 (grub_serial_term_input): ... this, and ...
7476 (grub_serial_term_output): ... this. Update all users.
7477 * term/i386/pc/console.c (grub_console_term): Split into ...
7478 (grub_console_term_input): ... this, and ...
7479 (grub_console_term_output): ... this. Update all users.
7480 (grub_console_term_input): Only enable it on PC/BIOS platform.
7481 (grub_console_init): Remove grub_keyboard_controller_init() call.
7482
7483 Migrate input terminals to new API:
7484
7485 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
7486 `i386' and `i386/pc' to enable build on x86_64 (this driver is
7487 i386-specific anyway).
7488 (grub_console_checkkey): Rename to ...
7489 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
7490 users.
7491 (grub_keyboard_controller_orig): New variable.
7492 (grub_console_getkey): Rename to ...
7493 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
7494 users.
7495 (grub_keyboard_controller_init): Static-ize. Save original
7496 controller value so that it can be restored ...
7497 (grub_keyboard_controller_fini): ... here (new function).
7498 (grub_at_keyboard_term): New structure.
7499 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
7500 functions.
7501
7502 Migrate output terminals to new API:
7503
7504 * term/i386/pc/vga.c (grub_vga_term): Change type to
7505 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7506 members. Update all users.
7507 * term/gfxterm.c (grub_video_term): Change type to
7508 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7509 members. Update all users.
7510 * include/grub/i386/pc/console.h (grub_console_checkkey)
7511 (grub_console_getkey): Do not export (no longer needed by gfxterm,
7512 etc).
7513
7514 Migrate `terminal' command and userland tools to new API:
7515
7516 * commands/terminal.c (grub_cmd_terminal): Split into ...
7517 (grub_cmd_terminal_input): ... this, and ...
7518 (grub_cmd_terminal_output): ... this.
7519 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
7520 `terminal_input' and `terminal_output'.
7521 * util/grub.d/00_header.in: Adjust `terminal' calls to new
7522 `terminal_input' / `terminal_output' API.
7523 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
7524 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
7525 provided ${GRUB_TERMINAL}, convert it).
7526
96e5d876 75272008-11-04 Robert Millan <rmh@aybabtu.com>
7528
7529 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
7530 for FreeBSD.
7531 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7532
556f3775 75332008-11-03 Bean <bean123ch@gmail.com>
7534
7535 * kern/elf.c (grub_elf32_load): Revert to previous code.
7536 (grub_elf64_load): Likewise.
7537
7538 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
7539
926b9823 75402008-11-01 Robert Millan <rmh@aybabtu.com>
7541
7542 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
7543 (TARGET_CPPFLAGS): Likewise.
7544 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
7545
1432e958 75462008-11-01 Carles Pina i Estany <carles@pina.cat>
7547
7548 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
7549
dba3f844 75502008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 7551
7552 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
7553 addition of objects until the code is not going to be able to fail.
7554
dba3f844 75552008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 7556
7557 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
7558 (add a missing NULL check, and correct them by moving the pointer
7559 operations after the actual check).
7560
7ab28c21 75612008-10-29 Robert Millan <rmh@aybabtu.com>
7562
7563 * util/i386/pc/grub-install.in: Handle empty string as output from
7564 make_system_path_relative_to_its_root().
7565
1b7748eb 75662008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
7567
7568 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
7569 circular metadata worst case scenario. If the metadata is circular
7570 then copy the wrap in place.
7571 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
7572 project lib/format_text/layout.h
7573 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
7574
c9618ab2 75752008-10-03 Felix Zielcke <fzielcke@z-51.de>
7576
7a36edca 7577 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 7578
bf981c62 75792008-10-03 Felix Zielcke <fzielcke@z-51.de>
7580
7581 * util/update-grub_lib.in: Mention filename in warning message.
7582
6d994591 75832008-09-29 Felix Zielcke <fzielcke@z-51.de>
7584
7585 * NEWS: Update for rename of update-grub to grub-mkconfig.
7586
18ade780 75872008-09-29 Felix Zielcke <fzielcke@z-51.de>
7588
7589 * util/update-grub_lib.in: Copy to ...
7590 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 7591 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 7592 * util/update-grub.in: Rename to ...
7593 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
7594 option. Add `--output' option to allow users to specify the generated
7595 configuration file. Default to stdout.
7596 (update_grub_dir): Rename to ...
7597 (grub_mkconfig_dir): ... this.
7598 (grub_cfg): Default to an empty string.
7599 * conf/common.rmk (update-grub): Rename to ...
7600 (grub-mkconfig): ... this.
7601 (update-grub_lib): Copy to ...
7602 (grub-mkconfig_lib): ... this.
7603 (update-grub_SCRIPTS): Copy to ...
7604 (grub-mkconfig_SCRIPTS): ... this. Update all users.
7605 (update-grub_DATA): Rename to ...
7606 (grub-mkconfig_DATA): ... this.
7607
556ce6ac 76082008-09-28 Robert Millan <rmh@aybabtu.com>
7609
7610 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7611 to `modified'. Add the real `created' field.
7612 (grub_iso9660_uuid): Use `modified' rather than `created' for
7613 constructing the UUID.
7614
76152008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 7616
7617 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7618 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7619
92274e85 76202008-09-28 Bean <bean123ch@gmail.com>
7621
7622 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7623 Thanks to Christian Franke for finding this bug.
7624
add6f17a 76252008-09-25 Robert Millan <rmh@aybabtu.com>
7626
7627 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7628 instances of grub_util_get_disk_name() (see previous commit).
7629
d2a367b8 76302008-09-25 Robert Millan <rmh@aybabtu.com>
7631
7632 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7633 `util/i386/get_disk_name.c'.
7634 * conf/i386-efi.rmk: Likewise.
7635 * conf/x86_64-efi.rmk: Likewise.
7636 * conf/i386-coreboot.rmk: Likewise.
7637 * conf/i386-ieee1275.rmk: Likewise.
7638 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7639 `util/ieee1275/get_disk_name.c'.
7640 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7641 * util/ieee1275/get_disk_name.c: Remove file.
7642 * util/i386/get_disk_name.c: Remove file.
7643 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7644 "hd%d" for device.map entries, rather than using
7645 grub_util_get_disk_name().
7646
81a06771 76472008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 7648
7649 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
7650 warning.
7651 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
7652
5a004279 76532008-09-24 Carles Pina i Estany <carles@pina.cat>
7654
7655 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
7656 Changed to 0x5100.
7657 (GRUB_TERM_PPAGE): Changed to 0x4900.
7658
397093d3 76592008-09-24 Robert Millan <rmh@aybabtu.com>
7660
7661 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
7662 macros (they were i386-pc specific).
7663 * include/grub/sparc64/ieee1275/console.h: Likewise.
7664 * include/grub/efi/console.h: Likewise.
7665
a91b6c7c 76662008-09-22 Bean <bean123ch@gmail.com>
7667
7668 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
7669 resident and in attribute list.
7670
7671 * include/grub/ntfs.h (BMP_LEN): Removed.
7672
c40fd116 76732008-09-22 Bean <bean123ch@gmail.com>
7674
81a06771 7675 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 7676 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
7677
7678 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
7679 error occurs, as grub_disk_open will call grub_disk_close, which will
7680 call p->close (scsi).
7681
81a06771 76822008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 7683
7684 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
7685 (AC_PREREQ): Bumped to 2.59.
7686 (AC_TRY_COMPILE): Replace obsolete macro with ...
7687 (AC_COMPILE_IFELSE): ... this.
7688 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
7689 (AC_LINK_IFELSE): ... this.
7690
5dc43410 76912008-09-21 Felix Zielcke <fzielcke@z-51.de>
7692
7693 * autogen.sh: Add a call to `gendistlist.sh'.
7694
9035dce4 76952008-09-19 Christian Franke <franke@computer.org>
7696
7697 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
7698 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
7699 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
7700 Export __enable_execute_stack() to modules.
7701 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
7702 New function.
7703
7fd75377 77042008-09-09 Felix Zielcke <fzielcke@z-51.de>
7705
040030b3 7706 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
7707 Sort the list.
7708
77092008-09-09 Felix Zielcke <fzielcke@z-51.de>
7710
7711 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 7712 #include <grub/util/hostdisk.h>.
7713
89d5ffcf 77142008-09-08 Robert Millan <rmh@aybabtu.com>
7715
7716 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
7717 segments when their filesz is zero (grub_file_read() interprets
81a06771 7718 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 7719 Use `lowest_segment' rather than 0 for calculating the current
7720 segment load address.
7721
40da438f 77222008-09-08 Robert Millan <rmh@aybabtu.com>
7723
7724 * util/hostdisk.c (open_device): Replace a grub_util_info() call
7725 with grub_dprintf("hostdisk", ...), as it was so verbose that it
7726 clobbered useful information.
7727
ddbf5556 77282008-09-08 Robert Millan <rmh@aybabtu.com>
7729
7730 * include/grub/util/biosdisk.h: Move to ...
7731 * include/grub/util/hostdisk.h: ... here. Update all users.
7732 * util/biosdisk.c: Move to ...
7733 * util/hostdisk.c: ... here. Update all users.
7734
783d0f48 77352008-09-07 Robert Millan <rmh@aybabtu.com>
7736
7737 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
7738 variables.
7739 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
7740 and length can be stored directly in the `mbi->mmap_addr' and
7741 `mbi->mmap_length' struct fields.
7742
548e2ea5 77432008-09-07 Robert Millan <rmh@aybabtu.com>
7744
7745 * conf/i386.rmk: New file. Provides declaration for building
7746 `cpuid.mod'.
7747 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
7748 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
7749 variables.
7750 Include `conf/i386.mk'.
7751 * conf/i386-efi.rmk: Likewise.
7752 * conf/x86_64-efi.rmk: Likewise.
7753 * conf/i386-coreboot.rmk: Likewise.
7754 * conf/i386-ieee1275.rmk: Likewise.
7755
0ea85a37 77562008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
7757
7758 Based on patch created by Colin D Bennett <colin@gibibit.com>.
7759 Adds optimization support for BGR based modes.
7760
7761 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
7762 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7763 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7764 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7765 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7766 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7767 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7768 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7769 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7770 (grub_video_i386_vbeblit_index_index): Likewise.
7771 (grub_video_i386_vbeblit_replace_directN): Added.
7772 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7773 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7774 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7775 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7776 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7777 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 7778 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 7779 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7780 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7781 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7782 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7783 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7784 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7785
7786 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
7787 (grub_video_i386_vbefill_R8G8B8): Likewise.
7788 (grub_video_i386_vbefill_index): Likewise.
7789 (grub_video_i386_vbefill_direct32): Added.
7790 (grub_video_i386_vbefill_direct24): Likewise.
7791 (grub_video_i386_vbefill_direct16): Likewise.
7792 (grub_video_i386_vbefill_direct8): Likewise.
7793
81a06771 7794 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 7795 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
7796 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
7797 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
7798 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
7799 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 7800
0ea85a37 7801 * video/video.c (grub_video_get_blit_format): Updated to use new
7802 blit formats. Added handling for 16 bit color modes.
81a06771 7803
7804 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 7805 fillers.
7806 (common_blitter): Updated to use new blitters.
7807
7808 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
7809 Removed.
7810 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7811 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7812 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7813 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7814 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7815 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7816 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7817 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7818 (grub_video_i386_vbeblit_index_index): Likewise.
7819 (grub_video_i386_vbeblit_replace_directN): Added.
7820 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7821 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7822 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7823 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7824 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7825 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7826 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7827 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7828 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7829 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7830 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7831 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7832 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 7833
0ea85a37 7834 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
7835 (grub_video_i386_vbefill_R8G8B8): Likewise.
7836 (grub_video_i386_vbefill_index): Likewise.
7837 (grub_video_i386_vbefill_direct32): Added.
7838 (grub_video_i386_vbefill_direct24): Likewise.
7839 (grub_video_i386_vbefill_direct16): Likewise.
7840 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 7841
0ea85a37 7842 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
7843 types.
81a06771 7844
0ea85a37 7845 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
7846 types.
81a06771 7847
0ea85a37 7848 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
7849 blitter types.
81a06771 7850
0ea85a37 7851 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
7852 types.
7853
e8a83df6 78542008-09-06 Felix Zielcke <fzielcke@z-51.de>
7855
7856 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
7857 RAID level 1.
7858
6bcd8ee5 78592008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 7860
6bcd8ee5 7861 * fs/iso9660.c (grub_iso9660_date): New structure.
7862 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
7863 (grub_iso9660_uuid): New function.
c375ae58 7864
59261157 78652008-09-05 Bean <bean123ch@gmail.com>
7866
7867 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
7868
7869 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
7870 insensitive bit for names in Win32 and Win32 & DOS namespace.
7871
7872 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
7873
7874 * include/grub/types.h (LONG_MAX): Likewise.
7875
58b6645a 78762008-09-04 Felix Zielcke <fzielcke@z-51.de>
7877
4ee55921 7878 * util/getroot.c: Include <config.h>.
7879 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
7880 add support for /dev/md/N devices and handle LVM double dash escaping.
7881
78822008-09-04 Felix Zielcke <fzielcke@z-51.de>
7883
7884 * config.guess: Update to latest version from config git.
7885 * config.sub: Likewise.
58b6645a 7886
9124f65d 78872008-09-03 Robert Millan <rmh@aybabtu.com>
7888
7889 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
7890 `disk->total_sectors'.
7891
81a06771 78922008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 7893
7894 * include/grub/normal.h: Fixed incorrect comment for
7895 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
7896
81a06771 78972008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 7898
7899 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
7900 values with defines.
7901
7902 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
7903 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
7904 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
7905 (GRUB_VBE_MODEATTR_COLOR): Likewise.
7906 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
7907 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7908 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7909 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7910 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7911 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7912 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7913 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7914 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7915 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7916 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7917 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7918 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7919 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7920 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7921
93d5cbf8 79222008-08-31 Robert Millan <rmh@aybabtu.com>
7923
7924 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7925 declaration.
7926 (grub_multiboot): Fix a few warnings.
7927
21751d50 79282008-08-31 Robert Millan <rmh@aybabtu.com>
7929
7930 * loader/i386/pc/multiboot.c: Update comment not to say that
7931 boot_device support is unimplemented.
7932
e27a75c5 79332008-08-31 Robert Millan <rmh@aybabtu.com>
7934
7935 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7936 or memory map support are unimplemented.
7937
81a06771 79382008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 7939
7940 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7941
81a06771 79422008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 7943
7944 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7945 total video memory in 'vbeinfo' output; show color format details for
7946 each video mode.
7947
7c5d8d95 79482008-08-30 Pavel Roskin <proski@gnu.org>
7949
7950 * util/genmoddep.c: Remove for real this time.
7951 * DISTLIST: Remove util/genmoddep.c.
7952
4cebd25a 79532008-08-30 Robert Millan <rmh@aybabtu.com>
7954
7955 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7956 as required by Multiboot spec (it was already 4-byte aligned, but
7957 only by chance).
7958
b497a269 79592008-08-29 Pavel Roskin <proski@gnu.org>
7960
e3925185 7961 * kern/powerpc/ieee1275/crt0.S: Rename to ...
7962 * kern/powerpc/ieee1275/startup.S: ... this.
7963 * conf/powerpc-ieee1275.rmk: Adjust for the above.
7964 * DISTLIST: Likewise.
7965
b497a269 7966 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7967 grub/cpu/kernel.h. Add start label for consistency with other
7968 platforms. Add grub_prefix immediately after start. Add jump
7969 to the code after grub_prefix.
7970 * include/grub/powerpc/kernel.h: Provide valid values for
7971 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7972
6e5a42fe 79732008-08-29 Bean <bean123ch@gmail.com>
7974
7975 * configure.ac: Change host_os to cygwin for mingw.
7976 (asprintf): New check for function.
7977
7978 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7979 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7980
7981 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 7982 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 7983 sync, sleep and grub_util_get_disk_size for mingw.
7984
7985 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7986 to get size in mingw.
7987 (open_device): Use flag O_BINARY if it's defined.
7988 (find_root_device): Add dummy code for mingw.
7989
7990 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7991 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7992 (get_scsi_disk_name): Return 0 for mingw.
7993
7994 * util/hostfs.c: #include <grub/util/misc.h>.
7995 (grub_hostfs_open): Use "rb" flag to open file, use
7996 grub_util_get_disk_size to get disk size for mingw.
7997
7998 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7999 (asprintf): New function if HAVE_ASPRINTF is not set.
8000 (sync): New function for mingw.
8001 (sleep): Likewise.
8002 (grub_util_get_disk_size): Likewise.
8003
ab3f2673 80042008-08-28 Pavel Roskin <proski@gnu.org>
8005
8006 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8007 kern/time.c.
8008
1c282483 80092008-08-28 Robert Millan <rmh@aybabtu.com>
8010
8011 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
8012
678e849c 80132008-08-28 Robert Millan <rmh@aybabtu.com>
8014
8015 Change find_grub_drive() syntax so it doesn't prevent it from
8016 detecting NULL names as errors.
8017
8018 * util/biosdisk.c (find_grub_drive): Move free slot search code
8019 from here ...
8020 (find_free_slot): ... to here.
8021 (read_device_map): Use find_free_slot() to search for free slots.
8022
965c75ca 80232008-08-27 Marco Gerards <marco@gnu.org>
8024
8025 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
8026 (scsi_mod_SOURCES): New variable.
8027 (scsi_mod_CFLAGS): Likewise
8028 (scsi_mod_LDFLAGS): Likewise.
8029
8030 * disk/scsi.c: New file.
8031
8032 * include/grub/scsi.h: Likewise.
8033
8034 * include/grub/scsicmd.h: Likewise.
8035
8036 * disk/ata.c: Include <grub/scsi.h>.
8037 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
8038 instead.
8039 (grub_ata_iterate): Skip ATAPI devices.
8040 (grub_ata_open): Only handle ATAPI devices.
8041 (struct grub_atapi_read): Removed.
8042 (grub_atapi_readsector): Likewise.
8043 (grub_ata_read): No longer handle ATAPI devices.
8044 (grub_ata_write): Likewise.
8045 (grub_atapi_iterate): New function.
8046 (grub_atapi_read): Likewise.
8047 (grub_atapi_write): Likewise.
8048 (grub_atapi_open): Likewise.
8049 (grub_atapi_close): Likewise.
8050 (grub_atapi_dev): New variable.
8051 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
8052 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
8053
8054 * include/grub/disk.h (enum grub_disk_dev_id): Add
8055 `GRUB_DISK_DEVICE_SCSI_ID'.
8056
c07ae501 80572008-08-26 Robert Millan <rmh@aybabtu.com>
8058
8059 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
8060 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
8061 descriptive.
8062
5ed20adc 80632008-08-23 Bean <bean123ch@gmail.com>
8064
8065 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
8066 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8067 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
8068 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
8069 dm_nv.mod.
8070 (raid5rec_mod_SOURCES): New macro.
8071 (raid5rec_mod_CFLAGS): Likewise.
8072 (raid5rec_mod_LDFLAGS): Likewise.
8073 (raid6rec_mod_SOURCES): Likewise.
8074 (raid6rec_mod_CFLAGS): Likewise.
8075 (raid6rec_mod_LDFLAGS): Likewise.
8076 (mdraid_mod_SOURCES): Likewise.
8077 (mdraid_mod_CFLAGS): Likewise.
8078 (mdraid_mod_LDFLAGS): Likewise.
8079 (dm_nv_mod_SOURCES): Likewise.
8080 (dm_nv_mod_CFLAGS): Likewise.
8081 (dm_nv_mod_LDFLAGS): Likewise.
8082
8083 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
8084 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8085 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8086
8087 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
8088 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8089
8090 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8091
8092 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8093
8094 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8095
8096 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8097
8098 * disk/raid5_recover.c: New file.
8099
8100 * disk/raid6_recover.c: Likewise.
8101
8102 * disk/mdraid_linux.c: Likewise.
8103
8104 * disk/dmraid_nvidia.c: Likewise.
8105
8106 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
8107 ULONG_MAX.
8108
8109 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
8110 calculate the size of raid device.
8111 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
8112 different layout of raid5.
8113 (grub_raid_scan_device): Remove code specific to mdraid.
8114 (grub_raid_list): New variable.
8115 (free_array): New function.
8116 (grub_raid_register): Likewise.
8117 (grub_raid_unregister): Likewise.
8118 (grub_raid_rescan): Likewise.
8119 (GRUB_MOD_INIT): Don't iterate device here.
8120 (GRUB_MOD_FINI): Use free_array to release resource.
8121
8122 * include/grub/raid.h: Remove macro and structure specific to mdraid.
8123 (grub_raid5_recover_func_t): New function variable type.
8124 (grub_raid6_recover_func_t): Likewise.
8125 (grub_raid5_recover_func): New variable.
8126 (grub_raid6_recover_func): Likewise.
8127 (grub_raid_register): New function.
8128 (grub_raid_unregister): Likewise.
8129 (grub_raid_rescan): Likewise.
8130 (grub_raid_block_xor): Likewise.
8131
8132 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
8133 (CMD_CRC): New macro.
8134 (part): Removed.
8135 (read_file): Handle device as well as file.
8136 (cmd_crc): New function.
8137 (fstest): Handle multiple disks.
8138 (options): Remove part, raw and long, add root and diskcount.
8139 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 8140 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 8141 add handling for the new options, support multiple disks.
8142
8143 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
8144
29c18915 81452008-08-23 Bean <bean123ch@gmail.com>
8146
8147 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
8148
8149 * genfslist.sh: Ignore kernel.mod.
8150
8151 * genpartmaplist.sh: Likewise.
8152
8415f261 81532008-08-23 Robert Millan <rmh@aybabtu.com>
8154
8155 * util/getroot.c (find_root_device): Skip anything that starts with
8156 a dot, not just directories. This avoids things like /dev/.tmp.md0.
8157
d5a7dc5b 81582008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 8159
d5a7dc5b 8160 * util/update-grub.in (GRUB_GFXMODE): Export variable.
8161 * util/grub.d/00_header.in: Allow the administrator to change default
8162 gfxmode via ${GRUB_GFXMODE}.
8163
380cfbb4 81642008-08-21 Felix Zielcke <fzielcke@z-51.de>
8165
8166 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
8167
c9baafe7 81682008-08-21 Robert Millan <rmh@aybabtu.com>
8169
8170 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
8171 loader.
8172 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
8173 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
8174
e290bef2 81752008-08-20 Carles Pina i Estany <carles@pina.cat>
8176
8177 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
8178 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
8179
f9dbfc96 81802008-08-19 Robert Millan <rmh@aybabtu.com>
8181
8182 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
8183 (struct grub_virtual_screen): Remove `cursor_color'.
8184 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
8185 initialization.
8186 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
8187
dd6bd6ab 81882008-08-18 Robert Millan <rmh@aybabtu.com>
8189
8190 Unify (identical) linux_normal.c files.
8191 * loader/i386/efi/linux_normal.c: Move from here ...
8192 * loader/linux_normal.c: ... to here. Update all users.
8193 * loader/i386/pc/linux_normal.c: Delete. Update all users.
8194 * loader/i386/ieee1275/linux_normal.c: Likewise.
8195
7f42f83e 81962008-08-18 Robert Millan <rmh@aybabtu.com>
8197
8198 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
8199 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
8200 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
8201 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
8202 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
8203 New macros.
8204 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
8205 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
8206 (GRUB_LINUX_CL_END_OFFSET): ... to here.
8207 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
8208 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
8209 (GRUB_EFI_CL_END_OFFSET): Rename to ...
8210 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
8211 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
8212 Initialize `params->video_cursor_x' and `params->video_cursor_y'
8213 portably using grub_getxy().
8214 Replace `-EFI' with `-bzImage' in boot message.
8215
38487ddb 82162008-08-17 Robert Millan <rmh@aybabtu.com>
8217
8218 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
8219
deceb3ec 82202008-08-17 Robert Millan <rmh@aybabtu.com>
8221
8222 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
8223
8224 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
8225 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
8226 (grub_machine_mmap_iterate): New function declaration.
8227 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
8228 structure.
8229 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
8230 macros.
8231
8232 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
8233 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
8234 Move e820 parsing from here ...
8235 * kern/i386/pc/mmap.c: New file.
8236 (grub_machine_mmap_iterate): ... to here.
8237
8238 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
8239 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
8240 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
8241 (grub_available_iterate): Redeclare to return `void', and redeclare
8242 its hook to use grub_uint64_t as addr and size parameters, and rename
8243 to ...
8244 (grub_machine_mmap_iterate): ... this. Update all users.
8245
8246 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
8247 to make it more readable. Rename to ...
8248 (grub_machine_mmap_iterate): ... this.
8249
8250 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
8251 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
8252 (grub_multiboot): Allocate an extra region after the payload, and fill
8253 it with a Multiboot memory map. Adjust a.out loader to calculate size
8254 with the extra space.
8255 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
8256 with the extra space.
8257
f8aa0f43 82582008-08-17 Carles Pina i Estany <carles@pina.cat>
8259
9807deb9 8260 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 8261
605f5bb6 82622008-08-17 Felix Zielcke <fzielcke@z-51.de>
8263
8264 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
8265 mdate-sh to the list `find' searches for.
8266 * DISTLIST: Regenerated.
8267
210db6c6 82682008-08-16 Felix Zielcke <fzielcke@z-51.de>
8269
8270 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
8271 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 8272 genmoddep.awk, gensymlist.sh.in.
8273 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 8274 * DISTLIST: Regenerated.
48cdbfd4 8275 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 8276
1082b929 82772008-08-16 Robert Millan <rmh@aybabtu.com>
8278
8279 * disk/raid.c (grub_raid_init): Handle/report errors set by
8280 grub_device_iterate().
8281 * disk/lvm.c (grub_lvm_init): Likewise.
8282
42ce5170 82832008-08-15 Bean <bean123ch@gmail.com>
8284
8285 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8286 and datehook.mod.
8287 (datetime_mod_SOURCES): New macro.
8288 (datetime_mod_CFLAGS): Likewise.
8289 (datetime_mod_LDFLAGS): Likewise.
8290 (date_mod_SOURCES): Likewise.
8291 (date_mod_CFLAGS): Likewise.
8292 (date_mod_LDFLAGS): Likewise.
8293 (datehook_mod_SOURCES): Likewise.
8294 (datehook_mod_CFLAGS): Likewise.
8295 (datehook_mod_LDFLAGS): Likewise.
8296
8297 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8298 and datehook.mod.
8299 (datetime_mod_SOURCES): New macro.
8300 (datetime_mod_CFLAGS): Likewise.
8301 (datetime_mod_LDFLAGS): Likewise.
8302 (date_mod_SOURCES): Likewise.
8303 (date_mod_CFLAGS): Likewise.
8304 (date_mod_LDFLAGS): Likewise.
8305 (datehook_mod_SOURCES): Likewise.
8306 (datehook_mod_CFLAGS): Likewise.
8307 (datehook_mod_LDFLAGS): Likewise.
8308
8309 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8310 and datehook.mod.
8311 (datetime_mod_SOURCES): New macro.
8312 (datetime_mod_CFLAGS): Likewise.
8313 (datetime_mod_LDFLAGS): Likewise.
8314 (date_mod_SOURCES): Likewise.
8315 (date_mod_CFLAGS): Likewise.
8316 (date_mod_LDFLAGS): Likewise.
8317 (datehook_mod_SOURCES): Likewise.
8318 (datehook_mod_CFLAGS): Likewise.
8319 (datehook_mod_LDFLAGS): Likewise.
8320
8321 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8322 and datehook.mod.
8323 (datetime_mod_SOURCES): New macro.
8324 (datetime_mod_CFLAGS): Likewise.
8325 (datetime_mod_LDFLAGS): Likewise.
8326 (date_mod_SOURCES): Likewise.
8327 (date_mod_CFLAGS): Likewise.
8328 (date_mod_LDFLAGS): Likewise.
8329 (datehook_mod_SOURCES): Likewise.
8330 (datehook_mod_CFLAGS): Likewise.
8331 (datehook_mod_LDFLAGS): Likewise.
8332
8333 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8334 and datehook.mod.
8335 (datetime_mod_SOURCES): New macro.
8336 (datetime_mod_CFLAGS): Likewise.
8337 (datetime_mod_LDFLAGS): Likewise.
8338 (date_mod_SOURCES): Likewise.
8339 (date_mod_CFLAGS): Likewise.
8340 (date_mod_LDFLAGS): Likewise.
8341 (datehook_mod_SOURCES): Likewise.
8342 (datehook_mod_CFLAGS): Likewise.
8343 (datehook_mod_LDFLAGS): Likewise.
8344
8345 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
8346
8347 * commands/date.c: New file.
8348
8349 * hook/datehook.c: Likewise.
8350
8351 * include/grub/lib/datetime.h: Likewise.
8352
8353 * include/grub/i386/cmos.h: Likewise.
8354
8355 * lib/datetime.c: Likewise.
8356
8357 * lib/i386/datetime.c: Likewise.
8358
8359 * lib/efi/datetime.c: Likewise.
8360
0e9242da 83612008-08-14 Robert Millan <rmh@aybabtu.com>
8362
8363 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
8364 (grub_mkelfimage_SOURCES): New variable.
8365 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
8366
8367 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
8368 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
8369 * conf/powerpc-ieee1275.rmk: Likewise.
8370 * conf/i386-ieee1275.rmk: Likewise.
8371
8372 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
8373 * kern/i386/coreboot/init.c: Likewise.
8374
8375 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
8376 with `<grub/cpu/kernel.h>'.
8377 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
8378 to ...
8379 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
8380 * kern/i386/coreboot/startup.S: Likewise.
8381
8382 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
8383 (GRUB_MOD_GAP): Remove.
8384 * include/grub/powerpc/kernel.h: New file.
8385 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
8386 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8387 * include/grub/i386/kernel.h: New file.
8388 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
8389 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
8390 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8391
8392 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
8393 `grub-mkelfimage'.
8394 Use --directory when invoking grub_mkimage.
8395
8396 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
8397 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
8398 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
8399 and GRUB_KERNEL_CPU_PREFIX.
8400
b86408f8 84012008-08-14 Felix Zielcke <fzielcke@z-51.de>
8402
d5e619ca 8403 * include/grub/err.h (grub_err_printf): New function prototype.
8404 * util/misc.c (grub_err_printf): New function.
8405 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
8406 grub_printf.
8407 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 8408
7161f0e0 84092008-08-13 Robert Millan <rmh@aybabtu.com>
8410
8411 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
8412
a1967522 84132008-08-13 Robert Millan <rmh@aybabtu.com>
8414
8415 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
8416 boot entry.
8417
371458b5 84182008-08-12 Robert Millan <rmh@aybabtu.com>
8419
8420 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
8421 of the relocation code from here ...
8422 (grub_multiboot): ... to here.
8423 (forward_relocator, backward_relocator): Move from here ...
8424 * kern/i386/loader.S (grub_multiboot_forward_relocator)
8425 (grub_multiboot_backward_relocator): ... to here.
8426 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
8427 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
8428 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
8429 (grub_multiboot_forward_relocator_end)
8430 (grub_multiboot_backward_relocator)
8431 (grub_multiboot_backward_relocator_end): New variables.
8432
05f9452b 84332008-08-12 Bean <bean123ch@gmail.com>
8434
8435 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
8436
20024ab0 84372008-08-11 Robert Millan <rmh@aybabtu.com>
8438
8439 * kern/i386/linuxbios/startup.S: Move from here ...
8440 * kern/i386/coreboot/startup.S: ... to here.
8441
8442 * kern/i386/linuxbios/init.c: Move from here ...
8443 * kern/i386/coreboot/init.c: ... to here.
8444
8445 * kern/i386/linuxbios/table.c: Move from here ...
8446 * kern/i386/coreboot/mmap.c: ... to here.
8447
8448 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
8449
e352e9cd 84502008-08-11 Robert Millan <rmh@aybabtu.com>
8451
8452 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
8453 errors. Leave it to the upper layer to handle them.
8454
2d05bc6a 84552008-08-09 Christian Franke <franke@computer.org>
8456
8457 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
8458 * conf/common.rmk: Install `grub-pe2elf' only if requested.
8459 Install `grub.d/10_windows' only on Cygwin.
8460 * configure.ac: Add subst of `target_os'.
8461 Check `target_os' also before setting TARGET_OBJ2ELF.
8462 Add `--enable-grub-pe2elf'.
8463
042bd419 84642008-08-08 Robert Millan <rmh@aybabtu.com>
8465
8466 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8467 (grub_last_time): Change type to grub_uint64_t.
8468 (grub_disk_open): Migrate code from to using grub_get_time_ms().
8469 (grub_disk_close): Likewise.
8470
8471 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8472 (run_menu): Migrate code from to using grub_get_time_ms().
8473
8474 * util/misc.c (grub_get_time_ms): New function.
8475
7f280db5 84762008-08-08 Marco Gerards <marco@gnu.org>
8477
8478 * disk/ata.c (grub_ata_regget): Change return type to
8479 `grub_uint8_t'.
8480 (grub_ata_regget2): Likewise.
8481 (grub_ata_wait_status): New function.
8482 (grub_ata_wait_busy): Removed function, updated all users to use
8483 `grub_ata_wait_status'.
8484 (grub_ata_wait_drq): Likewise.
8485 (grub_ata_cmd): New function.
8486 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
8487 error handling.
8488 (grub_ata_pio_write): Add error handling.
8489 (grub_atapi_identify): Likewise.
8490 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
8491 handling.
8492 (grub_ata_identify): Use `grub_ata_cmd' and improve error
8493 handling. Actually use the detected registers. Reorder the
8494 detection logic such that it is easier to read.
8495 (grub_ata_pciinit): Do not assign the same ID to each controller.
8496 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
8497 handling.
8498 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
8499
8500 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
8501
1fbc5e66 85022008-08-08 Marco Gerards <marco@gnu.org>
8503
8504 * NEWS: Update.
8505
819ce6c0 85062008-08-07 Bean <bean123ch@gmail.com>
8507
8508 * include/grub/x86_64/pci.h: New file.
8509
5c41d44d 85102008-08-07 Christian Franke <franke@computer.org>
8511
8512 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
8513 (TIMER2_GATE): Likewise.
8514 (grub_pit_wait): Add enable/disable of the timer2 gate
8515 bit of port 0x61. This fixes a possible infinite loop.
8516
5ebc275d 85172008-08-07 Bean <bean123ch@gmail.com>
8518
8519 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
8520 kern/i386/tsc.c and kern/i386/pit.c.
8521
8522 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
8523 x86_64 platform.
8524
8525 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
8526 <grub/i386/tsc.h>.
8527
8528 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
8529
e383b3d0 85302008-08-07 Bean <bean123ch@gmail.com>
8531
8532 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
8533
8534 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
8535
8536 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8537 multiple inclusion. Add #include <grub/types.h>.
8538
1cbb58ac 85392008-08-06 Christian Franke <franke@computer.org>
8540
8541 * conf/common.rmk: Build and install `10_windows'.
8542 * util/grub.d/10_windows.in: New script.
8543
337f5a1e 85442008-08-06 Pavel Roskin <proski@gnu.org>
8545
8546 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
8547
057bc4ac 85482008-08-06 Robert Millan <rmh@aybabtu.com>
8549
8550 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
8551 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
8552
2b99f123 85532008-08-06 Bean <bean123ch@gmail.com>
8554
8555 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
8556 (grub_pxefs_fs_int): Remove dummy definition.
8557 (grub_pxefs_open): Use data->block_size to store the current block
8558 size setting.
8559 (grub_pxefs_read): Use block size stored in data->block_size. As the
8560 value of grub_pxe_blksize can be changed after the file is opened.
8561
9f0234cb 85622008-08-06 Bean <bean123ch@gmail.com>
8563
8564 * fs/i386/pc/pxe.c (curr_file): new variable.
8565 (grub_pxefs_open): Simply the handling of pxe file system. Don't
8566 require the dummy internal file system anymore.
8567 (grub_pxefs_read): Removed.
8568 (grub_pxefs_close): Likewise.
8569 (grub_pxefs_fs_int): Likewise.
8570 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
8571 connection when we switch file.
8572 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
8573
a55d42e0 85742008-08-06 Robert Millan <rmh@aybabtu.com>
8575
8576 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
8577 `halt.mod'.
8578 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
8579 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
8580
8581 * kern/i386/halt.c: New file.
8582 * kern/i386/reboot.c: Likewise.
8583 * include/grub/i386/reboot.h: Likewise.
8584 * include/grub/i386/halt.h: Likewise.
8585
8586 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
8587 Include `<grub/cpu/halt.h>'.
8588 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
8589 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
8590
8591 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
8592 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
8593 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
8594 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
8595 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
8596 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
8597 from here ...
8598 * include/grub/i386/at_keyboard.h: ... to here.
8599
24371d26 86002008-08-05 Robert Millan <rmh@aybabtu.com>
8601
8602 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
8603 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
8604 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8605 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8606 `kern/generic/millisleep.c'.
8607
8608 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8609 instead of grub_get_rtc().
8610 (grub_tsc_init): Initialize `tsc_boot_time'.
8611
8612 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8613 (grub_machine_init): Use grub_tsc_init() rather than
8614 installing an RTC-based handler via grub_install_get_time_ms().
8615
8616 * kern/i386/pit.c: New file.
8617 * include/grub/i386/pit.h: Likewise.
8618
9e7007b3 86192008-08-05 Bean <bean123ch@gmail.com>
8620
8621 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8622
8623 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8624 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8625 (pxe_mod_SOURCES): New macro.
8626 (pxe_mod_CFLAGS): Likewise.
8627 (pxe_mod_LDFLAGS): Likewise.
8628 (pxecmd_mod_SOURCES): Likewise.
8629 (pxecmd_mod_CFLAGS): Likewise.
8630 (pxecmd_mod_LDFLAGS): Likewise.
8631
8632 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8633 (grub_pxe_call): Likewise.
8634
8635 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8636
8637 * commands/i386/pc/pxecmd.c: New file.
8638
9f0234cb 8639 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 8640
8641 * include/grub/i386/pc/pxe.h: Likewise.
8642
6977d49f 86432008-08-05 Bean <bean123ch@gmail.com>
8644
8645 * util/console.c (grub_console_cur_color): New variable.
8646 (grub_console_standard_color): Likewise.
8647 (grub_console_normal_color): Likewise.
8648 (grub_console_highlight_color): Likewise.
8649 (color_map): Likewise.
8650 (use_color): Likewise.
8651 (NUM_COLORS): New macro.
8652 (grub_ncurses_setcolorstate): Handle color properly.
8653 (grub_ncurses_setcolor): Don't change color here, just remember the
8654 settings, color will be set in grub_ncurses_setcolorstate.
8655 (grub_ncurses_getcolor): New function.
8656 (grub_ncurses_init): Initialize color pairs.
8657 (grub_ncurses_term): New member grub_ncurses_getcolor.
8658
9c2ff3ee 86592008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 8660
9c2ff3ee 8661 High resolution timer support. Implemented for x86 CPUs using TSC.
8662 Extracted generic grub_millisleep() so it's linked in only as needed.
8663 This requires a Pentium compatible CPU; if the RDTSC instruction is
8664 not supported, then it falls back on the generic grub_get_time_ms()
8665 implementation that uses the machine's RTC.
8666
8667 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
8668 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8669 `kern/generic/millisleep.c'.
8670
8671 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
8672 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
8673
8674 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
8675 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
8676
8677 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8678
8679 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8680 `kern/generic/millisleep.c'.
8681
8682 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8683
8684 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
8685
8686 * kern/generic/rtc_get_time_ms.c: New file.
8687
8688 * kern/generic/millisleep.c: New file.
337f5a1e 8689
9c2ff3ee 8690 * kern/misc.c: Don't include
8691 <kern/time.h> anymore.
8692 (grub_millisleep_generic): Removed.
8693
8694 * commands/sleep.c (grub_interruptible_millisleep): Uses
8695 grub_get_time_ms() instead of grub_get_rtc().
8696
8697 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
8698 function.
8699 (grub_cpu_is_cpuid_supported): New inline function.
8700 (grub_cpu_is_tsc_supported): New inline function.
8701 (grub_tsc_init): New function prototype.
8702 (grub_tsc_get_time_ms): New function prototype.
8703
8704 * kern/i386/tsc.c (grub_get_time_ms): New file.
8705
8706 * include/grub/time.h: Include <grub/types.h.
8707 (grub_millisleep_generic): Removed.
8708 (grub_get_time_ms): New prototype.
8709 (grub_install_get_time_ms): New prototype.
8710 (grub_rtc_get_time_ms): New prototype.
8711
8712 * kern/time.c (grub_get_time_ms): New function.
8713 (grub_install_get_time_ms): New function.
8714
8715 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
8716 <grub/time.h> anymore.
8717 (grub_millisleep): Removed.
8718 (grub_machine_init): Call grub_tsc_init.
8719
8720 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
8721 get_time_ms() implementation.
8722
8723 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
8724 (ieee1275_get_time_ms): New function.
8725 (grub_machine_init): Install get_time_ms() implementation.
8726
8727 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
8728 (grub_machine_init): Call grub_tsc_init().
8729 (grub_millisleep): Removed.
bf06a93f 8730
9c2ff3ee 8731 * kern/ieee1275/init.c (grub_millisleep): Removed.
8732 (grub_machine_init): Install ieee1275_get_time_ms()
8733 implementation.
8734 (ieee1275_get_time_ms): New function.
8735 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
8736 real work.
8737
9ec92aaf 87382008-08-05 Marco Gerards <marco@gnu.org>
8739
8740 * disk/ata.c: Include <grub/pci.h>.
8741 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
8742 (grub_ata_initialize): Rewritten.
8743 (grub_ata_device_initialize): New function.
8744
8d23f507 87452008-08-04 Pavel Roskin <proski@gnu.org>
8746
8747 * kern/main.c: Include grub/mm.h.
8748
5e15ee3d 87492008-08-04 Robert Millan <rmh@aybabtu.com>
8750
8751 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
8752 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
8753 corruption problem).
8754
a9053f8f 87552008-08-04 Robert Millan <rmh@aybabtu.com>
8756
8757 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
8758 warnings introduced in my last commit.
8759
dd19c7d7 87602008-08-03 Robert Millan <rmh@aybabtu.com>
8761
8762 Make PCI available on all i386 architectures.
8763
8764 * include/grub/i386/pc/pci.h: Move from here ...
8765 * include/grub/i386/pci.h: ... to here.
8766
8767 * include/grub/i386/pc/pci.h: Remove.
8768 * include/grub/i386/efi/pci.h: Remove.
8769 * include/grub/x86_64/efi/pci.h: Remove.
8770
8771 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
8772 `<grub/cpu/pci.h>'.
8773
8774 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
8775 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
8776 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
8777
8778 * conf/i386-ieee1275.rmk: Likewise.
8779
e14a6184 87802008-08-03 Robert Millan <rmh@aybabtu.com>
8781
8782 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
8783 (grub_console_setcursor): Make it possible to set cursor off.
8784
52768e37 87852008-08-03 Robert Millan <rmh@aybabtu.com>
8786
8787 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
8788 of modules instead of assuming which platform provides what.
8789 * util/update-grub.in: Likewise.
8790
2d52f57f 87912008-08-03 Robert Millan <rmh@aybabtu.com>
8792
8793 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
8794 instead of `grub_install_dos_part' to determine whether a drive needs
8795 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 8796 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 8797
2a5cd121 87982008-08-02 Robert Millan <rmh@aybabtu.com>
8799
8800 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
8801
93808428 88022008-08-02 Robert Millan <rmh@aybabtu.com>
8803
8804 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
8805 of informational grub_dprintf() calls.
8806
3bd0a12a 88072008-08-02 Robert Millan <rmh@aybabtu.com>
8808
8809 * disk/memdisk.c (memdisk_size): Don't initialize.
8810 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
8811
8812 * include/grub/i386/pc/kernel.h
8813 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
8814 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
8815 (grub_memdisk_image_size, grub_arch_memdisk_addr)
8816 (grub_arch_memdisk_size): Remove.
8817
8818 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
8819 field (was only used to transfer a constant). Add `type' field to
8820 support multiple module types.
8821 (grub_module_iterate): New function.
8822
8823 * kern/device.c (grub_device_open): Do not hide error messages
8824 when grub_disk_open() fails. Use grub_print_error() instead.
8825
8826 * kern/i386/pc/init.c (grub_arch_modules_addr)
8827 (grub_arch_memdisk_size): Remove functions.
8828 (grub_arch_modules_addr): Return the module address in high memory
8829 (now that it isn't copied anymore).
8830
8831 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
8832 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
8833 decompression routine (grub_total_module_size already includes that
8834 now). Don't copy modules back to low memory.
8835
8836 * kern/main.c: Include `<grub/mm.h>'.
8837 (grub_load_modules): Split out (and use) ...
8838 (grub_module_iterate): ... this function, which iterates through
8839 module objects and runs a hook.
8840 Comment out grub_mm_init_region() call, as it would cause non-ELF
8841 modules to be overwritten.
8842
8843 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
8844 the memdisk image in its own region, make it part of the module list.
8845 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
8846 (main): Parse --memdisk|-m option, and pass user-provided path as
8847 parameter to generate_image().
8848 (add_segments): Pass `memdisk_path' down to load_modules().
8849 (load_modules): Embed memdisk image in module section when requested.
8850 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
8851 `header.type' instead of `header.offset'.
8852
8853 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
8854 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
8855 (memdisk_mod_LDFLAGS): New variables.
8856 * conf/i386-coreboot.rmk: Likewise.
8857 * conf/i386-ieee1275.rmk: Likewise.
8858
a927cc73 88592008-08-02 Robert Millan <rmh@aybabtu.com>
8860
8861 * loader/i386/pc/multiboot.c (playground, forward_relocator)
8862 (backward_relocator): New variables. Used to allocate and relocate
8863 the payload, respectively.
8864 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 8865 address, install the appropriate relocator code in each bound of
a927cc73 8866 the payload, and set the entry point such that
8867 grub_multiboot_real_boot() will jump to one of them.
8868
8869 * kern/i386/loader.S (grub_multiboot_payload_size)
8870 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8871 (grub_multiboot_payload_entry_offset): New variables.
8872 (grub_multiboot_real_boot): Set cpu context to what the relocator
8873 expects, and jump to the relocator instead of the payload.
8874
8875 * include/grub/i386/loader.h (grub_multiboot_payload_size)
8876 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8877 (grub_multiboot_payload_entry_offset): Export.
8878
b15d8a0c 88792008-08-01 Bean <bean123ch@gmail.com>
8880
8881 * normal/menu_entry.c (editor_getline): Don't return the original
8882 string as result, as it will be released by lexer once it has done
8883 using it.
8884
cdfb3d22 88852008-08-01 Robert Millan <rmh@aybabtu.com>
8886
8887 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
8888 within menuentries, not before them.
8889 util/grub.d/10_hurd.in: Likewise.
8890
9175e93d 88912008-08-01 Bean <bean123ch@gmail.com>
8892
8893 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
8894 (bufio_mod_SOURCES): New macro.
8895 (bufio_mod_CFLAGS): Likewise.
8896 (bufio_mod_LDFLAGS): Likewise.
8897
8898 * include/grub/bufio.h: New file.
8899
8900 * io/bufio.c: Likewise.
8901
8902 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
8903 (grub_video_reader_png): Use grub_buffile_open to open file.
8904
8905 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
8906 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8907
8908 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8909 (grub_video_reader_tga): Use grub_buffile_open to open file.
8910
8911 * font/manager.c: Include <grub/bufio.h>.
8912 (add_font): Use grub_buffile_open to open file.
8913
3d8383e7 89142008-07-31 Robert Millan <rmh@aybabtu.com>
8915
8916 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8917 ELF segments, use a macro for arbitrarily accessing any of them instead
8918 of preparing a pointer that allows access to one at a time.
8919 (grub_multiboot_load_elf64): Likewise.
8920
16e641b6 89212008-07-31 Bean <bean123ch@gmail.com>
8922
8923 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8924 GRUB_KERNEL_MACHINE_DATA_END.
8925
59198b72 89262008-07-30 Robert Millan <rmh@aybabtu.com>
8927
8928 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8929 Increase from 0x50 to 0x60.
8930 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8931 use UUIDs to identify the root drive for them. If that's not
8932 possible, abort.
8933 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8934 check, for cross-disk installs.
8935
ae88bca3 89362008-07-30 Robert Millan <rmh@aybabtu.com>
8937
8938 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8939 is non-empty, use it to set the `prefix' environment variable instead
8940 of the usual approach.
8941 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8942 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8943 environment variable instead of dummy make_install_device().
8944
8945 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8946 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 8947 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 8948
8949 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8950 New variable reference.
8951 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8952 New macro. Defines offset of `grub_prefix' within startup.S (relative
8953 to `start').
8954 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
8955 section within startup.S (relative to `start').
8956 * include/grub/i386/coreboot/kernel.h: Likewise.
8957
8958 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8959 Overwrite grub_prefix with its contents, at the beginning of the
8960 first segment.
8961 (main): Understand -p|--prefix.
8962
14f41dd1 89632008-07-30 Robert Millan <rmh@aybabtu.com>
8964
8965 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8966
4ca049a3 89672008-07-30 Robert Millan <rmh@aybabtu.com>
8968
8969 * term/i386/pc/vga_text.c (grub_console_cls): Use
8970 grub_console_gotoxy() to go back to beginning of the screen.
8971 Found by Patrick Georgi <patrick.georgi@coresystems.de>
8972
2921d337 89732008-07-29 Christian Franke <franke@computer.org>
8974
8975 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8976 Add conversion of emulated mount points on Cygwin.
8977
b609876d 89782008-07-29 Christian Franke <franke@computer.org>
8979
8980 * util/update-grub.in: Add a check for admin
8981 group on Cygwin.
8982 Remove old `grub.cfg.new' before creation.
8983 Add `-f' to `mv' to handle the different filesystem
8984 semantics of Windows.
8985
e93e4679 89862008-07-29 Bean <bean123ch@gmail.com>
8987
8988 * normal/main.c (get_line): Fix buffer overflow bug.
8989
41694fd0 89902008-07-28 Robert Millan <rmh@aybabtu.com>
8991
8992 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8993 (struct grub_apple_header): New struct. Describes the layout of
8994 the partmap header.
8995 (apple_partition_map_iterate): Check the header magic as well as the
8996 partition magic (which was already being checked).
8997
cfd0b4e6 89982008-07-28 Pavel Roskin <proski@gnu.org>
8999
9000 * genmk.rb: Add a warning to the beginning of the output that
9001 it's a generated file and should not be edited.
9002
93cce016 90032008-07-28 Robert Millan <rmh@aybabtu.com>
9004
9005 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
9006 with the same number are found, just use issue a warning with
9007 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 9008
cd1df915 90092008-07-27 Robert Millan <rmh@aybabtu.com>
9010
9011 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
9012 information.
9013
b70a8427 90142008-07-27 Bean <bean123ch@gmail.com>
9015
9016 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
9017 (grub_fat_find_dir): Ignore case when comparing filename.
9018
8f5e379f 90192008-07-27 Bean <bean123ch@gmail.com>
9020
9021 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
9022 smallino, as it's more descriptive, and i8count can be confused with
9023 the other field count.
9024 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
9025 inode type.
9026
a85cd5a0 90272008-07-27 Bean <bean123ch@gmail.com>
9028
9029 * commands/crc.c: New file.
9030
9031 * lib/crc.c: Likewise.
9032
9033 * include/grub/lib/crc.h: Likewise.
9034
9035 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
9036
9037 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
9038 (hexdump): Move this function to ...
9039
9040 * lib/hexdump.c: ... here.
9041
9042 * include/grub/hexdump.h: Renamed to ...
9043
9044 * include/grub/lib/hexdump.h: ... this.
9045
9046 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
9047
9048 * util/grub-editenv.c: Likewise.
9049
9050 * include/envblk.h: Renamed to ...
9051
9052 * include/lib/envblk.h: ... this.
9053
9054 * util/envblk.c: Renamed to ...
9055
9056 * lib/envblk.c: ... this.
9057
9058 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
9059 lib/hexdump.c.
9060 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
9061 (pkglib_MODULES): Add crc.mod.
9062 (hexdump_mod_SOURCES): Add lib/hexdump.c.
9063 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
9064 (crc_mod_SOURCES): New macro.
9065 (crc_mod_CFLAGS): Likewise.
9066 (crc_mod_LDFLAGS): Likewise.
9067
9068 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
9069
9070 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9071
9072 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9073
9074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9075
9076 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9077
c298def0 90782008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 9079
9080 * commands/help.c: Include <grub/term.h>.
9081 (TERM_WIDTH): Removed. Updated all users.
9082
cc349fb3 90832008-07-27 Pavel Roskin <proski@gnu.org>
9084
9085 * util/getroot.c (find_root_device): Rephrase a comment to avoid
9086 spurious warnings about a comment within a comment.
9087
9051607e 90882008-07-25 Robert Millan <rmh@aybabtu.com>
9089
9090 * util/getroot.c (find_root_device): Skip devices that match
9091 /dev/dm-[0-9]. This lets the real device be found for any type of
9092 abstraction (LVM, EVMS, RAID..).
9093 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
9094 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
9095 device is found first, find_root_device() will now skip it.
9096
01453bfc 90972008-07-24 Pavel Roskin <proski@gnu.org>
9098
9099 * include/grub/types.h: Use __builtin_bswap32() and
9100 __builtin_bswap64() with gcc 4.3 and newer.
9101
6af9849f 91022008-07-24 Christian Franke <franke@computer.org>
9103
3a0fa256 9104 * util/i386/pc/grub-install.in: If `--debug' is specified,
9105 pass `--verbose' to grub-setup.
9106 Abort script if make_system_path_relative_to_its_root() fails.
9107
7810e747 91082008-07-24 Bean <bean123ch@gmail.com>
9109
9110 * configure.ac: Fixed a bug caused by the previous cygwin patch,
9111 variable `target_platform' should be `platform'.
9112
42290e17 91132008-07-24 Bean <bean123ch@gmail.com>
9114
51cc5193 9115 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 9116 (grub_png_init_fixed_block): New function.
9117 (grub_png_decode_image_data): Handle fixed huffman code compression.
9118
2a8a80e4 91192008-07-24 Bean <bean123ch@gmail.com>
9120
9121 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
9122 (grub_pe2elf_SOURCES): New macro.
9123 (CLEANFILES): Add grub-pe2elf.
9124
9125 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
9126 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
9127 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
9128 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
9129 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
9130 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
9131 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
9132 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
9133 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
9134 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
9135 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
9136 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
9137 (GRUB_PE32_DT_FUNCTION): Likewise.
9138 (GRUB_PE32_REL_I386_DIR32): Likewise.
9139 (GRUB_PE32_REL_I386_REL32): Likewise.
9140 (grub_pe32_symbol): New structure.
9141 (grub_pe32_reloc): Likewise.
9142
9143 * util/grub-pe2elf.c: New file.
9144
9145 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
9146 start symbol in non pc platform.
9147
9148 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
9149
9150 The following patches are from Christian Franke.
9151
9152 * include/grub/dl.h: Remove .previous, gas supports this only
9153 for ELF format.
9154
9155 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
9156 Remove .type, gas supports this only for ELF format.
9157
9158 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
9159 nullbytes in symbol table. This fixes an infinite loop if table is
9160 zero filled.
9161
9162 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
9163 TARGET_IMG_LDFLAGS and EXEEXT.
9164
9165 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
9166 TARGET_IMG_LDFLAGS_AC.
9167 (grub_CHECK_STACK_ARG_PROBE): New function.
9168
9169 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
9170
9171 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
9172
9173 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
9174 to set TARGET_IMG_LD* accordingly.
9175 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
9176 Add call to grub_CHECK_STACK_ARG_PROBE.
9177 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
9178
9179 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
9180
9181 * genmk.rb: Add EXEEXT to CLEANFILES.
9182
12ccdb75 91832008-07-23 Robert Millan <rmh@aybabtu.com>
9184
9185 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
9186 define the codes for arrows and lines used for the menu).
9187 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
9188 as well.
9189
9190 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
9191 fonts, because the latter are too slow.
9192
18eeaf04 91932008-07-21 Bean <bean123ch@gmail.com>
9194
9195 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
9196 a20. Run keyboard test last, as it will cause macbook to halt.
9197
b095e2ad 91982008-07-18 Pavel Roskin <proski@gnu.org>
9199
9200 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
9201 load foreign architecture modules correctly anyway. Keep
9202 support for loading host architecture modules, whether we
9203 compile them or not.
9204
737feb35 92052008-07-17 Pavel Roskin <proski@gnu.org>
9206
3f4ce737 9207 * configure.ac: Use -m32 or -m64 regardless of whether we had to
9208 change target_cpu. The compiler default can mismatch target_cpu
9209 in any case.
9210
4ad2d049 9211 * disk/efi/efidisk.c: Fix format warnings on x86_64.
9212 * kern/efi/efi.c: Likewise.
9213
f6130a12 9214 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
9215 target compiler is functional.
9216 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
9217 are set up.
9218
58393a2d 9219 * configure.ac: Default to efi platform for x86_64-apple. Allow
9220 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
9221 adjustments from the rest, only do them if target is not
9222 explicitly given. Merge other adjustments with the final sanity
9223 check. Remove an extraneous check for supported CPU. Be
9224 specific which CPU and which platform is not supported.
9225
737feb35 9226 * configure.ac: Default to pc platform for x86_64.
9227
546f966a 92282008-07-17 Robert Millan <rmh@aybabtu.com>
9229
9230 Partial LinuxBIOS -> Coreboot rename.
9231
9232 * conf/i386-linuxbios.rmk: Renamed to ...
9233 * conf/i386-coreboot.rmk: ... this.
9234 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
9235 * configure.ac: Accept "coreboot" as input platform (but maintain
9236 compatibility with "linuxbios").
9237 * include/grub/i386/linuxbios: Renamed to ...
9238 * include/grub/i386/coreboot: ... this.
9239
20011694 92402008-07-17 Bean <bean123ch@gmail.com>
9241
9242 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 9243 (appleldr_mod_SOURCE): New variable.
20011694 9244 (appleldr_mod_CFLAGS): Likewise.
9245 (appleldr_mod_LDFLAGS): Likewise.
9246 (pci_mod_SOURCES): Likewise.
9247 (pci_mod_CFLAGS): Likewise.
9248 (pci_mod_LDFLAGS): Likewise.
9249 (lspci_mod_SOURCES): Likewise.
9250 (lspci_mod_CFLAGS): Likewise.
9251 (lspci_mod_LDFLAGS): Likewise.
9252
9253 * conf/x86_64-efi.rmk: New file.
9254
9255 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
9256 macro.
9257 (grub_efidisk_write): Likewise.
9258
9259 * include/efi/api.h (efi_call_0): New macro.
9260 (efi_call_1): Likewise.
9261 (efi_call_2): Likewise.
9262 (efi_call_3): Likewise.
9263 (efi_call_4): Likewise.
9264 (efi_call_5): Likewise.
9265 (efi_call_6): Likewise.
9266
9267 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
9268 grub_rescue_cmd_chainloader.
9269
9270 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
9271 (grub_pe32_optional_header): Change some fields based on i386 or
9272 x86_64 platform.
9273 (GRUB_PE32_PE32_MAGIC): Likewise.
9274
9275 * include/grub/efi/uga_draw.h: New file.
9276
9277 * include/grub/elf.h (STN_ABS): New constant.
9278 (R_X86_64_NONE): Relocation constant for x86_64.
9279 (R_X86_64_64): Likewise.
9280 (R_X86_64_PC32): Likewise.
9281 (R_X86_64_GOT32): Likewise.
9282 (R_X86_64_PLT32): Likewise.
9283 (R_X86_64_COPY): Likewise.
9284 (R_X86_64_GLOB_DAT): Likewise.
9285 (R_X86_64_JUMP_SLOT): Likewise.
9286 (R_X86_64_RELATIVE): Likewise.
9287 (R_X86_64_GOTPCREL): Likewise.
9288 (R_X86_64_32): Likewise.
9289 (R_X86_64_32S): Likewise.
9290 (R_X86_64_16): Likewise.
9291 (R_X86_64_PC16): Likewise.
9292 (R_X86_64_8): Likewise.
9293 (R_X86_64_PC8): Likewise.
9294
9295 * include/grub/i386/efi/pci.h: New file.
9296
9297 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
9298 Change it value based on platform.
9299 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
9300 (GRUB_E820_RAM): Likewise.
9301 (GRUB_E820_RESERVED): Likewise.
9302 (GRUB_E820_ACPI): Likewise.
9303 (GRUB_E820_NVS): Likewise.
9304 (GRUB_E820_EXEC_CODE): Likewise.
9305 (GRUB_E820_MAX_ENTRY): Likewise.
9306 (grub_e820_mmap): New structure.
9307 (linux_kernel_header): Change the efi field according to different
9308 kernel version, also field from linux_kernel_header.
9309
9310 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
9311
9312 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
9313 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
9314 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
9315 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
9316 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
9317 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
9318 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
9319 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
9320 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
9321 (GRUB_PCI_ADDR_IO_MASK): Likewise.
9322
9323 * include/grub/x86_64/efi/kernel.h: New file.
9324
9325 * include/grub/x86_64/efi/loader.h: Likewise.
9326
9327 * include/grub/x86_64/efi/machine.h: Likewise.
9328
9329 * include/grub/x86_64/efi/pci.h: Likewise.
9330
9331 * include/grub/x86_64/efi/time.h: Likewise.
9332
9333 * include/grub/x86_64/linux.h: Likewise.
9334
9335 * include/grub/x86_64/setjmp.h: Likewise.
9336
9337 * include/grub/x86_64/time.h: Likewise.
9338
9339 * include/grub/x86_64/types.h: Likewise.
9340
9341 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
9342 GRUB_TARGET_SIZEOF_VOID_P.
9343
9344 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
9345 (grub_efi_locate_handle): Likewise.
9346 (grub_efi_open_protocol): Likewise.
9347 (grub_efi_set_text_mode): Likewise.
9348 (grub_efi_stall): Likewise.
9349 (grub_exit): Likewise.
9350 (grub_reboot): Likewise.
9351 (grub_halt): Likewise.
9352 (grub_efi_exit_boot_services): Likewise.
9353 (grub_get_rtc): Likewise.
9354
9355 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
9356 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
9357 (grub_efi_allocate_pages): Wrap efi calls.
9358 (grub_efi_free_pages): Wrap efi calls.
9359 (grub_efi_get_memory_map): Wrap efi calls.
9360
9361 * kern/x86_64/dl.c: New file.
9362
9363 * kern/x86_64/efi/callwrap.S: Likewise.
9364
9365 * kern/x86_64/efi/startup.S: Likewise.
9366
9367 * loader/efi/appleloader.c: Likewise.
9368
9369 * loader/efi/chainloader.c (cmdline): New variable.
9370 (grub_chainloader_unload): Wrap efi calls.
9371 (grub_chainloader_boot): Likewise.
9372 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
9373 command line.
9374
9375 * loader/efi/chainloader_normal.c (chainloader_command):
9376 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
9377 command line.
9378
9379 * loader/i386/efi/linux.c (allocate_pages): Change allocation
9380 method.
9381 (grub_e820_add_region): New function.
9382 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
9383 booting.
9384 (grub_find_video_card): New function.
9385 (grub_linux_setup_video): New function.
9386 (grub_rescue_cmd_linux): Probe for video information.
9387
9388 * normal/x86_64/setjmp.S: New file.
9389
9390 * term/efi/console.c (map_char): New function.
9391 (grub_console_putchar): Map unicode char.
9392 (grub_console_checkkey): Wrap efi calls.
9393 (grub_console_getkey): Likewise.
9394 (grub_console_getwh): Likewise.
9395 (grub_console_gotoxy): Likewise.
9396 (grub_console_cls): Likewise.
9397 (grub_console_setcolorstate): Likewise.
9398 (grub_console_setcursor): Likewise.
9399
9400 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
9401
59652a20 94022008-07-16 Pavel Roskin <proski@gnu.org>
9403
ef294055 9404 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
9405 format strings.
9406
59652a20 9407 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
9408 pointer, not an integer. This fixes a warning and prevents
9409 precision loss on 64-bit systems.
9410 (relocate_addresses): Remove unneeded cast.
9411
afc3b5d7 94122008-07-15 Pavel Roskin <proski@gnu.org>
9413
506b2b3e 9414 * kern/i386/ieee1275/init.c: Include grub/cache.h.
9415
62ead89c 9416 * term/ieee1275/ofconsole.c: Disable code unused on i386.
9417
c4cd51d7 9418 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
9419 Fix comparison between signed and unsigned.
9420
0d3d8f28 9421 * include/grub/i386/ieee1275/console.h: Declare
9422 grub_console_init() and grub_console_fini().
9423
8804b286 9424 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
9425 It's empty and unused.
9426
ee01cf35 9427 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
9428 beginning to avoid warnings with some compilers.
9429
afc3b5d7 9430 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
9431 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
9432
e4e8eaa5 94332008-07-14 Pavel Roskin <proski@gnu.org>
9434
407aceb4 9435 * kern/env.c (grub_register_variable_hook): Don't copy empty
9436 string, it leaks memory. Pass "" to grub_env_set(), it should
9437 handle constant strings.
9438
e4e8eaa5 9439 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
9440 * commands/cmp.c (grub_cmd_cmp): Likewise.
9441 * kern/dl.c (grub_dl_flush_cache): Likewise.
9442 (grub_dl_load_core): Likewise.
9443 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
9444 (grub_elf64_load_phdrs): Likewise.
9445
d4e2dad3 94462008-07-13 Pavel Roskin <proski@gnu.org>
9447
9448 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
9449 between signed and unsigned.
9450 (LzmaEnc_Finish): Fix warning about an unused parameter.
9451
aa24b516 94522008-07-13 Bean <bean123ch@gmail.com>
9453
9454 * Makefile.in (enable_lzo): New rule.
9455
9456 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
9457
9458 * configure.ac (ENABLE_LZO): New option --enable-lzo.
9459
9460 * boot/i386/pc/lnxboot.S: #include <config.h>.
9461
9462 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 9463 its value according to the compression algorithm used, lzo or lzma.
aa24b516 9464
9465 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
9466 compression algorithm according to configure macro.
9467
9468 * kern/i386/pc/startup.S (codestart): Likewise.
9469
9470 * kern/i386/pc/lzma_decode.S: New file.
9471
9472 * include/grub/lib/LzFind.h: Likewise.
9473
9474 * include/grub/lib/LzHash.h: Likewise.
9475
9476 * include/grub/lib/LzmaDec.h: Likewise.
9477
9478 * include/grub/lib/LzmaEnc.h: Likewise.
9479
9480 * include/grub/lib/LzmaTypes.h: Likewise.
9481
9482 * lib/LzFind.c: Likewise.
9483
9484 * lib/LzmaDec.c: Likewise.
9485
9486 * lib/LzmaEnc.c: Likewise.
9487
4ae821ac 94882008-07-13 Bean <bean123ch@gmail.com>
9489
9490 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
9491 (grub_ext4_extent_header): New structure.
9492 (grub_ext4_extent): Likewise.
9493 (grub_ext4_extent_idx): Likewise.
9494 (grub_ext4_find_leaf): New function.
9495 (grub_ext2_read_block): Handle extents.
9496
9a745147 94972008-07-12 Robert Millan <rmh@aybabtu.com>
9498
9499 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
9500
d49a4cf6 95012008-07-11 Robert Millan <rmh@aybabtu.com>
9502
9503 * util/grub.d/40_custom.in: New file. Example on how to add custom
9504 entries to /etc/grub.d.
9505 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
9506 40_custom (implicitly, by merging all the grub.d rules).
9507
947414b4 95082008-07-11 Pavel Roskin <proski@gnu.org>
9509
0059cf6f 9510 * commands/read.c (grub_getline): Fix invalid memory access.
9511 Don't add newline to the variable value.
9512
947414b4 9513 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
9514 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
9515 (serial_hw_get_port): Check validity of the port number.
9516 (grub_cmd_serial): Check return value of serial_hw_get_port().
9517
62a02d00 95182008-07-07 Pavel Roskin <proski@gnu.org>
9519
9520 * boot/i386/pc/diskboot.S (notification_string): Replace
9521 "Loading kernel" with just "loading". This is shorter, less
9522 confusing and saves a few bytes for possible future changes.
9523
3e5581b0 95242008-07-05 Pavel Roskin <proski@gnu.org>
9525
ea387a48 9526 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
9527 size for ATAPI devices, they are undefined. Output sector
9528 number in decimal form.
9529
3e5581b0 9530 * disk/ata.c: Use named constants for status bits.
9531
fdecb8fd 95322008-07-04 Pavel Roskin <proski@gnu.org>
9533
bcd35b90 9534 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
9535 grub_addr_t before casting it to the void pointer to fix a
9536 warning. Non-addressable regions are discarded earlier.
9537 (grub_arch_modules_addr): Cast _end to grub_addr_t.
9538 * kern/i386/linuxbios/table.c: Include grub/misc.h.
9539 (check_signature): Don't shadow table_header.
9540 (grub_linuxbios_table_iterate): Cast numeric constants to
9541 grub_linuxbios_table_header_t.
9542 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
9543 grub_stop().
9544
af58ab3d 9545 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
9546 prevent warnings.
9547
1759aa57 9548 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
9549 pointer, which can cause warnings. Support 64-bit addresses.
9550
fdecb8fd 9551 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
9552 of sizeof(long). This fixes PowerPC image generation on x86_64.
9553
8516d2a8 95542008-07-04 Robert Millan <rmh@aybabtu.com>
9555
9556 This fixes a performance issue when pc & gpt partmap iterators
9557 didn't abort iteration even after our hook found what it was
fe987087 9558 looking for (often causing expensive probes of non-existent drives).
8516d2a8 9559
9560 Some callers relied on previous buggy behaviour, since they would
34c44600 9561 raise an error when their own hooks caused early abortion of its
8516d2a8 9562 iteration.
9563
9564 * kern/device.c (grub_device_open): Improve error message.
9565 * disk/lvm.c (grub_lvm_open): Likewise.
9566 * disk/raid.c (grub_raid_open): Likewise.
9567
9568 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
9569 when hook requests it, independently of grub_errno.
9570 (pc_partition_map_probe): Do not fail when find_func() caused
9571 early abortion of pc_partition_map_iterate().
9572
9573 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
9574 when hook requests it, independently of grub_errno.
9575 (gpt_partition_map_probe): Do not fail when find_func() caused
9576 early abortion of gpt_partition_map_iterate().
9577
9578 * kern/partition.c (grub_partition_iterate): Abort parent iteration
9579 when hook requests it, independently of grub_errno. Do not fail when
9580 part_map_iterate_hook() caused early abortion of p->iterate().
9581
9582 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
9583 when grub_partition_iterate() returned with non-zero.
9584
277d0de9 95852008-07-03 Pavel Roskin <proski@gnu.org>
9586
9587 * disk/ata.c (grub_ata_pio_write): Check status before writing,
9588 like we do in grub_ata_pio_read().
9589 (grub_ata_readwrite): Always write individual sectors. Fix the
9590 sector count for the remainder.
9591 (grub_ata_write): Enable writing to ATA devices. Correctly
9592 report error for ATAPI devices.
9593
d4c9b428 95942008-07-02 Pavel Roskin <proski@gnu.org>
9595
e43fc690 9596 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
9597 warning.
9598
f707af42 9599 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
9600 for every read sector, we already increment it for the whole
9601 batch. This fixes reading more than 256 sectors at once.
9602
11e16b15 9603 * util/grub-editenv.c (cmd_info): Cast argument to long
9604 explicitly. ptrdiff_t reduces to int on i386.
9605
cbabfdd4 9606 * util/grub-editenv.c (main): Be specific which parameter is
9607 missing.
9608
b8fbce0a 9609 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9610 (memdisk): Make memdisk_orig_addr a pointer.
9611
c9c8e606 9612 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9613 for file offsets, use grub_off_t instead. Fix printf format
9614 warnings.
9615
ca62e598 9616 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9617 there. Real unexpected warnings should not drown in the noise
9618 about known problems.
9619
ce8d1766 9620 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9621 grub_disk_addr_t for memory addresses.
9622
00c7a56a 9623 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9624 explicitly to fix a warning.
9625
08d3ef09 9626 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9627
cb71ba20 9628 * Makefile.in (MODULE_LDFLAGS): New variable.
9629 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
9630 the linker accepts --build-id=none.
9631 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
9632 MODULE_LDFLAGS.
9633 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9634
d4c9b428 9635 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9636 those in Linux XFS code. Provide a way to access 64-bit parent
9637 inode.
9638 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
9639 the end of struct grub_xfs_dir_header.
9640
d4156eee 96412008-07-02 Bean <bean123ch@gmail.com>
9642
9643 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9644 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9645 and GRUB_IEEE1275_FLAG_NO_ANSI.
9646
9647 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
9648 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9649 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
9650
9651 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
9652 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
9653
9654 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
9655 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
9656
9657 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
9658 esc sequence on non ANSI terminal.
9659 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
9660
9661 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
9662 beginning of file.
9663
2270f77b 96642008-07-02 Bean <bean123ch@gmail.com>
9665
9666 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
9667 (grub_editenv_SOURCES): New variable.
9668 (pkglib_MODULES): Add loadenv.mod.
9669 (loadenv_mod_SOURCES): New variable.
9670 (loadenv_mod_CFLAGS): Likewise.
9671 (loadenv_mod_LDFLAGS): Likewise.
9672
9673 * include/grub/envblk.h: New file.
9674
9675 * util/envblk.c: New file.
9676
9677 * util/grub-editenv.c: New file.
9678
9679 * commands/loadenv.c: New file.
9680
0e9e51ec 96812008-07-01 Pavel Roskin <proski@gnu.org>
9682
d89b7634 9683 * include/multiboot2.h (struct multiboot_tag_module): Use char,
9684 not unsigned char. This fixes warnings and is consistent with
9685 other tags.
9686
bf1835b1 9687 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
9688
8222a04b 9689 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
9690
6a42d99d 9691 * term/tparm.c (analyze): Always set *popcount.
9692
10b159d1 9693 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
9694 cast to fix a warning.
9695
b8789f6c 9696 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
9697 cast to suppress a warning.
9698
29d7e38a 9699 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
9700 grub_fshelp_read_file() expects.
9701
f341f669 9702 * fs/fat.c: Fix UUID calculation on big-endian systems. We
9703 write uuid as a 32-bit value in CPU byte order, so declare and
9704 use it as such.
9705
0e9e51ec 9706 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
9707 long if the format specifier expects it.
9708 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
9709 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9710 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
9711 long to fix a warning.
9712 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
9713 grub_dprintf() arguments to fix warnings.
9714
3aefa857 97152008-06-30 Pavel Roskin <proski@gnu.org>
9716
56c7668b 9717 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
9718 install_bsd_part immediately before core.img is embedded or
9719 modified on disk. This fixes core.img verification if core.img
9720 cannot be embedded.
9721
3aefa857 9722 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
9723 core_path to calculate the blocklist.
9724 Patch from Javier Martín <lordhabbit@gmail.com>
9725
5444088d 97262008-06-29 Robert Millan <rmh@aybabtu.com>
9727
9728 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
9729 block to disk block.
9730 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
9731 Patch from Niels Böhm <bitbucket@arcor.de>
9732
674835c8 97332008-06-29 Robert Millan <rmh@aybabtu.com>
9734
9735 * util/update-grub_lib.in (font_path): Search for fonts in
9736 /boot/grub first, which is more likely to be readable (we aren't
9737 deciding where fonts live, just looking for them).
9738
f527dbc8 97392008-06-26 Pavel Roskin <proski@gnu.org>
9740
6c2d8df6 9741 * util/biosdisk.c (read_device_map): Don't leave dead map
9742 entries for devices failing stat() check.
9743
f527dbc8 9744 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
9745 core_path_dev for the core.img path on the target device.
9746
aebe3d13 97472008-06-26 Robert Millan <rmh@aybabtu.com>
9748
9749 * disk/fs_uuid.c: New file.
9750 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
9751 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
9752 (fs_uuid_mod_LDFLAGS): New variables.
9753 * include/grub/disk.h (grub_disk_dev_id): Add
9754 `GRUB_DISK_DEVICE_UUID_ID'.
9755 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
9756 implement iterate().
9757
37aaf354 97582008-06-26 Robert Millan <rmh@aybabtu.com>
9759
9760 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
9761 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
9762 Linux image includes no initrd.
9763
25ff262a 97642008-06-21 Javier Martín <lordhabbit@gmail.com>
9765
9766 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
9767 call to resolve the core image location that effectively appended the
9768 name twice.
9769
76a2bd44 97702008-06-21 Robert Millan <rmh@aybabtu.com>
9771
9772 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
9773 call from here ...
9774
9775 * util/grub.d/10_hurd.in: ... to here ...
9776 * util/grub.d/10_linux.in: ... and here.
9777
650e1c79 97782008-06-19 Robert Millan <rmh@aybabtu.com>
9779
fe987087 9780 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 9781 after it has been set by grub_machine_set_prefix().
9782
6ce63911 97832008-06-19 Robert Millan <rmh@aybabtu.com>
9784
9785 * commands/search.c (search_label, search_fs_uuid, search_file): Print
9786 search result when not saving to variable, not the other way around.
9787 When saving to variable, abort iteration as soon as a match is found.
9788
73940cec 97892008-06-19 Robert Millan <rmh@aybabtu.com>
9790
9791 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
9792 check for partition that provides /boot/grub. Its logic is flawed,
9793 as it prevents prepare_grub_to_access_device() from being called
9794 multiple times.
9795
3c62a39d 97962008-06-19 Robert Millan <rmh@aybabtu.com>
9797
9798 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
9799 "insmod" command directly when abstraction modules are needed,
fe987087 9800 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 9801 since it had already been processed).
9802
47395a42 98032008-06-19 Pavel Roskin <proski@gnu.org>
9804
9805 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
9806 changed. This is needed in case GRUB_LIBDIR changes.
9807 * conf/i386-ieee1275.rmk: Likewise.
9808 * conf/i386-linuxbios.rmk: Likewise.
9809 * conf/i386-pc.rmk: Likewise.
9810 * conf/powerpc-ieee1275.rmk: Likewise.
9811
a145ac2d 98122008-06-18 Pavel Roskin <proski@gnu.org>
9813
9814 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
9815 kernel_elf_symlist.c to symlist.c for consistency with other
9816 architectures. Update all users.
9817 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9818
7847c51e 98192008-06-18 Robert Millan <rmh@aybabtu.com>
9820
9821 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
9822 it in prefix.
9823
9824 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
9825 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
9826 a RAID device, run setup() for all members independently on whether
9827 LVM abstraction is being used.
9828 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
9829 If grub-mkimage has set `*install_dos_part == -2', don't override this
9830 value.
9831 Perform *install_dos_part adjustments independently on whether
9832 we're embedding or not.
9833 Clarify error message when image is too big for embedding.
9834 Remove duplicate *install_dos_part stanza.
9835
b23e5644 98362008-06-17 Robert Millan <rmh@aybabtu.com>
9837
9838 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
9839 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
9840 variables.
9841 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
9842 values in grub_ofconsole_normal_color and
9843 grub_ofconsole_highlight_color (they're not directly related to
9844 background and foreground).
9845 (grub_ofconsole_setcolorstate): Extract background and foreground
9846 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
9847
0aac2f79 98482008-06-17 Robert Millan <rmh@aybabtu.com>
9849
9850 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
9851 /boot/grub for the check in last commit, not /boot (they could be
9852 different partitions).
9853
3cca7ef3 98542008-06-16 Robert Millan <rmh@aybabtu.com>
9855
9856 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
9857 asked to setup access for the same partition that provides /boot,
9858 don't bother using UUIDs since our root already has the value we
9859 want.
9860
347396d8 98612008-06-16 Robert Millan <rmh@aybabtu.com>
9862
9863 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
9864 I2O devices.
9865 Patch from Sven Mueller <sven@debian.org>.
9866
991477f8 98672008-06-16 Robert Millan <rmh@aybabtu.com>
9868
9869 * util/update-grub.in: Check for $EUID instead of $UID.
9870 Reported by Vincent Zweije.
9871
d31a32a1 98722008-06-16 Bean <bean123ch@gmail.com>
9873
fe987087 9874 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 9875 (grub_ext2_read_block): Likewise.
9876 (grub_ext2_read_inode): Likewise.
9877 (grub_ext2_mount): Likewise.
9878 (grub_ext2_close): Likewise.
9879 (grub_ext3_get_journal): Removed.
9880
fe987087 9881 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 9882 (grub_reiserfs_read_symlink): Likewise.
9883 (grub_reiserfs_mount): Likewise.
9884 (grub_reiserfs_open): Likewise.
9885 (grub_reiserfs_read): Likewise.
9886 (grub_reiserfs_close): Likewise.
9887 (grub_reiserfs_get_journal): Removed.
9888
9889 * fs/fshelp.c (grub_fshelp_read): Removed.
9890 (grub_fshelp_map_block): Likewise.
9891
9892 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
9893 (grub_fshelp_journal): Likewise.
9894 (grub_fshelp_read): Likewise.
9895 (grub_fshelp_map_block): Likewise.
9896
3540a760 98972008-06-16 Pavel Roskin <proski@gnu.org>
9898
9899 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
9900 floating point anymore.
9901 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
9902
95614c84 99032008-06-15 Pavel Roskin <proski@gnu.org>
9904
9905 * commands/ls.c (grub_ls_list_files): Use integer calculations
9906 for human readable format, avoid floating point use.
9907 * kern/misc.c (grub_ftoa): Remove.
9908 (grub_vsprintf): Remove floating point support.
9909
50465dd6 99102008-06-15 Robert Millan <rmh@aybabtu.com>
9911
fe6b695a 9912 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 9913 devices.
9914 Reported by Max Vozeler.
9915
a9207284 99162008-06-15 Robert Millan <rmh@aybabtu.com>
9917
9918 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9919 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9920 skipped later.
9921 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9922 the beginning of the prefix.
9923
9924 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9925 It is assumed that if we have a memdisk, grub-mkimage has set
9926 grub_prefix to include the "(memdisk)" drive in it.
9927
a7cbd45a 99282008-06-15 Robert Millan <rmh@aybabtu.com>
9929
9930 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9931 Initialize keyboard controller after registering the terminal, so that
9932 grub_printf() can be called from grub_keyboard_controller_init().
9933
21cf716a 99342008-06-15 Robert Millan <rmh@aybabtu.com>
9935
9936 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9937 extent-btree which is written as big endian on disk.
9938 Reported by Alain Greppin <al@chilibi.org>.
9939
23a64d8e 99402008-06-14 Robert Millan <rmh@aybabtu.com>
9941
9942 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9943 * util/i386/pc/grub-install.in (modules): Likewise.
9944
d687651c 99452008-06-13 Pavel Roskin <proski@gnu.org>
9946
9947 * commands/ls.c (grub_ls_list_files): Fix format warnings.
9948
dfe9ddd4 99492008-06-13 Bean <bean123ch@gmail.com>
9950
9951 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9952
9953 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9954
9955 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9956 to indicate sparse block.
9957
16ae7781 99582008-06-12 Pavel Roskin <proski@gnu.org>
9959
e6d1a308 9960 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9961 number, grub_fshelp_read() does it for us.
9962
16ae7781 9963 * fs/fshelp.c (grub_fshelp_read): New function. Implement
9964 linear disk read with journal translation.
9965 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9966 * include/grub/fshelp.h: Declare grub_fshelp_read().
9967
40fd3a2b 99682008-06-09 Pavel Roskin <proski@gnu.org>
9969
9970 * fs/minix.c (grub_minix_mount): Handle error reading
9971 superblock.
9972
f5679726 99732008-06-08 Robert Millan <rmh@aybabtu.com>
9974
9975 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9976 don't append the RAID prefix afterwards.
9977 Reported by Clint Adams.
9978
ce525529 99792008-06-08 Robert Millan <rmh@aybabtu.com>
9980
9981 Based on description from Pavel:
9982 * kern/disk.c (grub_disk_check_range): Rename to ...
9983 (grub_disk_adjust_range): ... this. Add a comment explaining the
9984 tasks performed by this function.
9985
ad4936a0 99862008-06-08 Robert Millan <rmh@aybabtu.com>
9987
9988 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9989 `num_serial' (for consistency with other variables).
9990 (struct grub_ntfs_data): Add `uuid' member.
9991 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9992 (grub_ntfs_uuid): New function.
9993 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9994
dc20b0f9 99952008-06-07 Pavel Roskin <proski@gnu.org>
9996
9997 * util/biosdisk.c (open_device): Revert last change to the
9998 function, it broke installation. The sector needs to be
9999 different dependent on which device is opened.
10000
c5e3cfba 100012008-06-06 Robert Millan <rmh@aybabtu.com>
10002
10003 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
10004 rest of GRUB, and breakage doesn't happen if its value were modified.
10005
10006 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10007 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
10008 a constant (same value).
10009 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
10010 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
10011
26a1f8c4 100122008-06-06 Robert Millan <rmh@aybabtu.com>
10013
10014 * util/biosdisk.c (open_device): Do not modify sector offset when
10015 accessing a partition. kern/disk.c already handles this for us.
10016
25d6b327 100172008-06-06 Robert Millan <rmh@aybabtu.com>
10018
10019 * util/grub-emu.c (grub_machine_init): Move code in this function from
10020 here ...
10021 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
10022 segfault in case grub_printf() is called).
10023
10024 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
10025 grub_probe. Update all users not to explicitly add it again.
10026 (grub_device): New variable; contains corresponding device for grubdir.
10027 (fs_module, partmap_module, devabstraction_module): Pass
10028 `--device ${grub_device}' to grub_probe to avoid traversing /dev
10029 every time.
10030
9ece62fb 100312008-06-05 Robert Millan <rmh@aybabtu.com>
10032
10033 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
10034 is found, print it (same layout as with labels).
10035
1ad36d37 100362008-06-04 Robert Millan <rmh@aybabtu.com>
10037
10038 * util/biosdisk.c (get_drive): Rename to ...
10039 (find_grub_drive): ... this. Update all users.
10040
10041 (get_os_disk): Rename to ...
10042 (convert_system_partition_to_system_disk): ... this. Update all users.
10043
10044 (find_drive): Rename to ...
10045 (find_system_device): ... this. Update all users.
10046
e6a30859 100472008-06-04 Robert Millan <rmh@aybabtu.com>
10048
10049 * util/biosdisk.c (get_os_disk): Handle IDA devices.
10050 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10051 (make_device_map): Likewise.
10052
00c108a4 100532008-06-01 Robert Millan <rmh@aybabtu.com>
10054
10055 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
10056 before dereferencing it.
10057
10058 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
10059 union with fat12/fat16-specific ones. Add some new fields, including
10060 `num_serial' for both versions.
10061 (struct grub_fat_data): Add `uuid' member.
10062 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
10063 names. Initialize `data->uuid' using `num_serial'.
10064 (grub_fat_uuid): New function.
10065 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
10066
10067 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
10068 (grub_reiserfs_uuid): New function.
10069 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
10070 member.
10071
10072 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
10073 (grub_xfs_uuid): New function.
10074 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
10075
1385c5bb 100762008-06-01 Robert Millan <rmh@aybabtu.com>
10077
10078 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
10079 code that is backward compatible with pre-uuid search command.
10080
c682dfd7 100812008-05-31 Robert Millan <rmh@aybabtu.com>
10082
10083 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
10084 floppies after everything else, to ensure floppy drive isn't accessed
10085 unnecessarily (patch from Bean).
10086
b7db5d47 100872008-05-31 Robert Millan <rmh@aybabtu.com>
10088
10089 * commands/search.c (search_label, search_fs_uuid, search_file): Do
10090 not print device names when we were asked to set a variable.
10091
6e037aa9 100922008-05-31 Robert Millan <rmh@aybabtu.com>
10093
10094 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
10095 using "cursor-on" and "cursor-off" commands (understood at least by
10096 the Open Firmware flavour on OLPC).
10097
41305bc8 100982008-05-31 Michael Gorven <michael@gorven.za.net>
10099
10100 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
10101 on and off sequences.
10102
69ba137e 101032008-05-31 Robert Millan <rmh@aybabtu.com>
10104
10105 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
10106 * util/update-grub.in: Likewise.
10107
520ae21b 101082008-05-30 Pavel Roskin <proski@gnu.org>
10109
10110 * util/biosdisk.c (linux_find_partition): Simplify logic and
10111 make the code more universal. Keep special processing for
10112 devfs, but use a simple rule for all other devices. If the
10113 device ends with a number, append 'p' and the partition number.
10114 Otherwise, append only the partition number.
10115
5786569b 101162008-05-30 Robert Millan <rmh@aybabtu.com>
10117
10118 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
10119 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
10120 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
10121 the `root' parameter to Linux.
10122
51500452 101232008-05-30 Robert Millan <rmh@aybabtu.com>
10124
10125 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
10126 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
10127 --fs_uuid with --fs-uuid.
10128 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
10129 all filesystems support them).
10130
811d3878 101312008-05-30 Robert Millan <rmh@aybabtu.com>
10132
10133 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 10134 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 10135
cab63c95 101362008-05-30 Robert Millan <rmh@aybabtu.com>
10137
10138 * util/grub.d/00_header.in: Remove obsolete comment referencing
10139 convert_system_path_to_grub_path().
10140 * util/update-grub.in: Likewise.
10141 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
10142 (convert_system_path_to_grub_path): Add a warning message explaining
10143 that this function is deprecated. Rely on is_path_readable_by_grub()
10144 for the readability checks.
10145 (font_path): Use is_path_readable_by_grub() for the readability
10146 check rather than convert_system_path_to_grub_path().
10147
972e2f7a 101482008-05-30 Robert Millan <rmh@aybabtu.com>
10149
10150 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
10151 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
10152 converting it first.
10153 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
10154 grub.cfg for access to font file, and afterwards call it again to set
10155 the root device.
10156
62191274 101572008-05-30 Robert Millan <rmh@aybabtu.com>
10158
10159 * commands/search.c (options): Add --fs_uuid option.
10160 (search_fs_uuid): New function.
10161 (grub_cmd_search): Fix --set argument passing.
10162 Use search_fs_uuid() when requested via --fs_uuid.
10163 (grub_search_init): Update help message.
10164 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
10165 and redeclare it as an array of 16-bit words.
10166 (grub_ext2_uuid): New function.
10167 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
10168 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
10169 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
10170 (GRUB_DEVICE_BOOT_UUID): New variables.
10171 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
10172 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
10173 whenever possible.
10174 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
10175 just assume `root' variable has the right value.
10176 * util/grub.d/10_linux.in: Likewise.
10177 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
10178 via PRINT_FS_UUID.
10179 (main): Recognise `-t fs_uuid' argument.
10180
01b73ec8 101812008-05-30 Robert Millan <rmh@aybabtu.com>
10182
10183 * util/biosdisk.c (map): Redefine structure to hold information
10184 about GRUB drive name.
fe6b695a 10185 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 10186 drive names.
10187 (call_hook): Remove.
10188 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
10189 member. Assume drive has partitions.
10190 (grub_util_biosdisk_open): Access device names via `.device' struct
10191 member.
10192 (open_device): Likewise.
10193 (find_drive): Likewise.
10194 (read_device_map): Adjust map[] usage to match the new struct
10195 definition. Don't check for duplicates (still possible, but not cheap
10196 anymore).
10197 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
10198 (make_device_name): Remove assumption of BIOS-like drive names.
10199
22f16596 102002008-05-30 Pavel Roskin <proski@gnu.org>
10201
10202 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
10203 compiling execute.c doesn't need grub_script.tab.h anymore.
10204 (normal/command.c_DEPENDENCIES): Likewise.
10205 (normal/function.c_DEPENDENCIES): Likewise.
10206 * conf/i386-ieee1275.rmk: Likewise.
10207 * conf/i386-linuxbios.rmk: Likewise.
10208 * conf/i386-pc.rmk: Likewise.
10209 * conf/powerpc-ieee1275.rmk: Likewise.
10210 * conf/sparc64-ieee1275.rmk: Likewise.
10211
528ad8f2 102122008-05-29 Pavel Roskin <proski@gnu.org>
10213
d1dff95d 10214 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
10215 when scanning metadata for volume group name.
10216
528ad8f2 10217 * include/grub/script.h: Don't include grub_script.tab.h. It's
10218 a generated file, which may only be included from the files with
10219 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
10220 use union YYSTYPE, as the later allows forward declaration.
10221 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
10222
47248e08 102232008-05-29 Robert Millan <rmh@aybabtu.com>
10224
10225 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
10226 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
10227 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
10228 (grub_console_checkkey): Add grub_dprintf() call to report unknown
10229 scan codes.
10230
ee632529 102312008-05-29 Robert Millan <rmh@aybabtu.com>
10232
10233 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
10234 control key combinations.
10235
eee96e08 102362008-05-29 Robert Millan <rmh@aybabtu.com>
10237
10238 * util/powerpc/ieee1275/grub-install.in: Move from here ...
10239 * util/ieee1275/grub-install.in: ... to here.
10240 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
10241 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
10242 (grub_install_SOURCES): Likewise.
10243
da9a6a94 102442008-05-29 Robert Millan <rmh@aybabtu.com>
10245
10246 * fs/affs.c: Update copyright year.
10247 * fs/ext2.c: Likewise.
10248 * fs/fshelp.c: Likewise.
10249 * fs/hfsplus.c: Likewise.
10250 * fs/ntfs.c: Likewise.
10251 * fs/xfs.c: Likewise.
10252 * include/grub/fshelp.h: Likewise.
10253 * util/grub-mkdevicemap.c: Likewise.
10254
12e65f3a 102552008-05-28 Robert Millan <rmh@aybabtu.com>
10256
10257 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
10258 might need to be fatfs to support some firmware implementations
10259 (e.g. OFW or EFI).
10260
23023641 102612008-05-28 Robert Millan <rmh@aybabtu.com>
10262
10263 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
10264 devices.
10265 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10266 (make_device_map): Likewise.
10267
887d2619 102682008-05-20 Bean <bean123ch@gmail.com>
10269
10270 * fs/fshelp.c (grub_fshelp_map_block): New function.
10271 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
10272 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
10273
10274 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
10275 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
10276 (grub_fshelp_journal): New structure.
10277 (grub_fshelp_map_block): New function prototype.
10278 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
10279 (grub_fshelp_map_block): Likewise.
10280
10281 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
10282 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
10283 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
10284 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
10285 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
10286 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
10287 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
10288 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
10289 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
10290 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
10291 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
10292 (grub_ext2_sblock): New members for journal support.
10293 (grub_ext3_journal_header): New structure.
10294 (grub_ext3_journal_revoke_header): Likewise.
10295 (grub_ext3_journal_block_tag): Likewise.
10296 (grub_ext3_journal_sblock): Likewise.
10297 (grub_fshelp_node): New members logfile and journal.
10298 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
10299 grub_fshelp_map_block to get real block number.
10300 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
10301 number.
10302 (grub_ext2_read_inode): Likewise.
10303 (grub_ext3_get_journal): New function.
10304 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
10305 (grub_ext2_close): Release memory used by journal.
10306
10307 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
10308 (REISERFS_MAGIC_DESC_BLOCK): New macro.
10309 (grub_reiserfs_transaction_header): Renamed to
10310 grub_reiserfs_description_block, replace field data with real_blocks.
10311 (grub_reiserfs_commit_block): New structure.
10312 (grub_reiserfs_data): New member journal.
10313 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
10314 number.
10315 (grub_reiserfs_read_symlink): Likewise.
10316 (grub_reiserfs_iterate_dir): Likewise.
10317 (grub_reiserfs_open): Likewise.
10318 (grub_reiserfs_read): Likewise.
10319 (grub_reiserfs_get_journal): New function.
10320 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
10321 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
10322 using grub_reiserfs_get_journal.
10323 (grub_reiserfs_close): Release memory used by journal.
10324
10325 * fs/affs.c (grub_affs_read_block): Change block type to
10326 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
10327
10328 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
10329
10330 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
10331
10332 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
10333
10334 * fs/udf.c (grub_udf_read_block): Change block type to
10335 grub_disk_addr_t. Use type cast to avoid warning.
10336
10337 * fs/xfs.c (grub_xfs_read_block): Likewise.
10338
b7c6bed5 103392008-05-16 Christian Franke <franke@computer.org>
10340
10341 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
10342 to ensure that break with ESC will always work.
10343 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
10344 Remove ESC from keyboard queue.
10345
eedf167f 103462008-05-16 Christian Franke <franke@computer.org>
10347
10348 * util/biosdisk.c: [__CYGWIN__] Add includes.
10349 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
10350 (get_os_disk): Move variable declarations to OS specific
10351 parts to avoid warning.
10352 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
10353 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
10354 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
10355 Cygwin.
10356 * util/getroot.c: [__CYGWIN__] Add includes.
10357 (strip_extra_slashes): Fix "/" case.
10358 [__CYGWIN__] (get_win32_path): New function.
10359 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
10360 [__CYGWIN__] (find_root_device): Disable.
10361 [__CYGWIN__] (get_bootsec_serial): New function.
10362 [__CYGWIN__] (find_cygwin_root_device): Likewise.
10363 [__linux__] (grub_guess_root_device): Add early returns to simplify
10364 structure.
10365 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
10366 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
10367 check for Linux only.
10368
a079699e 103692008-05-15 Bean <bean123ch@gmail.com>
10370
10371 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
10372 keyboard hang problem in apple's intel mac.
10373
1cf4059a 103742008-05-09 Robert Millan <rmh@aybabtu.com>
10375
10376 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
10377 devices.
10378 * util/grub-mkdevicemap.c (get_virtio_disk_name)
10379 (make_device_map): Likewise.
10380 Reported by Aurelien Jarno <aurel32@debian.org>
10381
ed759390 103822008-05-07 Ian Campbell <ijc@hellion.org.uk>
10383
10384 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
10385 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
10386 (make_device_map): Output entries for xvd type disks.
10387
b56c4eaa 103882008-05-07 Robert Millan <rmh@aybabtu.com>
10389
10390 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
10391 devices.
10392 * util/grub-mkdevicemap.c (get_cciss_disk_name)
10393 (make_device_map): Likewise.
10394 Reported by Roland Dreier <rdreier@cisco.com>
10395
7f8866ed 103962008-05-07 Robert Millan <rmh@aybabtu.com>
10397
10398 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
10399 grub_strstr() call. Correct a few mistakes in failure path handling.
10400
b0346e0f 104012008-05-06 Robert Millan <rmh@aybabtu.com>
10402
10403 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
10404 Do not print a trailing slash (therefore, the root directory is an
10405 empty string).
10406 (convert_system_path_to_grub_path): Do not remove trailing slash
10407 from make_system_path_relative_to_its_root() output.
10408
10409 * util/i386/pc/grub-install.in: Add trailing slash to output from
10410 make_system_path_relative_to_its_root().
10411
6cf12cbd 104122008-05-06 Robert Millan <rmh@aybabtu.com>
10413
10414 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
10415 ensures that output lines aren't intermangled with those sent to
10416 stderr (via grub_util_info()).
10417 * util/grub-probe.c (grub_refresh): Likewise.
10418 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
10419
0fbb3117 104202008-05-05 Christian Franke <franke@computer.org>
10421
10422 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
10423 Add Cygwin device names.
10424 (get_ide_disk_name) [__CYGWIN__]: Likewise.
10425 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
10426 (check_device): Return error instead of success on empty name.
10427 (make_device_map): Move label inside linux specific code to
10428 prevent compiler warning.
10429
8124cdb7 104302008-04-30 Robert Millan <rmh@aybabtu.com>
10431
10432 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
10433 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
10434 first boot option.
10435 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
10436
094c01d0 104372008-04-29 Robert Millan <rmh@aybabtu.com>
10438
10439 * docs/grub.cfg: New file (example GRUB configuration).
10440
f4b1fc02 104412008-04-26 Robert Millan <rmh@aybabtu.com>
10442
329ce2a5 10443 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
10444 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
10445 and `disk/ieee1275/nand.c'.
f4b1fc02 10446
25f16ec1 104472008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 10448
25f16ec1 10449 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
10450 i386-linuxbios.
10451
10452 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
10453 change the buffer size to 4096 for cdrom device.
10454
10455 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
10456 and nand.mod.
10457 (_linux_mod_SOURCES): New variable.
10458 (_linux_mod_CFLAGS): Likewise.
10459 (_linux_mod_LDFLAGS): Likewise.
10460 (linux_mod_SOURCES): Likewise.
10461 (linux_mod_CFLAGS): Likewise.
10462 (linux_mod_LDFLAGS): Likewise.
10463 (nand_mod_SOURCES): Likewise.
10464 (nand_mod_CFLAGS): Likewise.
10465 (nand_mod_LDFLAGS): Likewise.
10466
10467 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
10468 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
10469 type property. (nand device in olpc don't have this property)
10470
10471 * include/grub/disk.h (grub_disk_dev_id): New macro
10472 GRUB_DISK_DEVICE_NAND_ID.
10473
10474 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
10475 function prototype.
10476 (grub_rescue_cmd_initrd): Likewise.
10477
10478 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
10479 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
10480 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 10481
25f16ec1 10482 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
10483 GRUB_MACHINE_IEEE1275 is defined.
10484
10485 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
10486 Use NESTED_FUNC_ATTR attribute on the hook parameter.
10487
10488 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
10489 on nested function heap_init.
10490 (grub_upper_mem): New variable for i386-ieee1275.
10491 (grub_get_extended_memory): New function for i386-ieee1275.
10492 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
10493
10494 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
10495 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
10496 property.
f19dbdb7 10497
25f16ec1 10498 * loader/i386/ieee1275/linux.c: New file.
10499
10500 * loader/i386/ieee1275/linux_normal.c: New file.
10501
10502 * disk/ieee1275/nand.c: New file.
10503
e89d61e9 105042008-04-18 Thomas Schwinge <tschwinge@gnu.org>
10505
10506 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
10507 value.
10508 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
10509
602566f6 105102008-04-18 Robert Millan <rmh@aybabtu.com>
10511
10512 Restructures early code path on ieee1275 to unify grub_main() as
10513 the first C function that is executed in every platform.
10514
10515 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
10516 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
10517 cmain().
10518 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
10519 * kern/ieee1275/cmain.c (cmain): Rename to ...
10520 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
10521 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
10522 at the beginning.
10523
57490c2b 105242008-04-18 Robert Millan <rmh@aybabtu.com>
10525
10526 * util/update-grub.in: Fix syntax error when setting
10527 `GRUB_PRELOAD_MODULES'.
10528 Reported by Stephane Chazelas <stephane@artesyncp.com>
10529
1977517d 105302008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
10531
10532 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
10533 section into account, newer toolchains generate unique build ids
10534 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 10535 we want build ids to be preserved
1977517d 10536 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
10537 far from other sections don't cause the raw binary images grow
10538 size
10539
bfb1f1a2 105402008-04-15 Robert Millan <rmh@aybabtu.com>
10541
10542 * disk/lvm.c: Update copyright year.
10543 * kern/misc.c: Likewise.
10544
01979850 105452008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10546
10547 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 10548 there is no memory left for physical volume name.
01979850 10549
0a1150e2 105502008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10551
10552 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
10553 volume name mapping to support bigger than 9 character names properly.
10554
82ead3fe 105552008-04-13 Robert Millan <rmh@aybabtu.com>
10556
10557 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
10558 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10559
e54a72f5 105602008-04-13 Christian Franke <franke@computer.org>
10561
10562 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
10563 to create a floppy emulation boot CD when non emulation mode
10564 does not work.
10565 Enable Joliet CD filesystem extension.
10566
9fe86034 105672008-04-13 Robert Millan <rmh@aybabtu.com>
10568
10569 * kern/misc.c (grub_strncat): Fix off-by-one error.
10570 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
10571
10572 * kern/env.c (grub_env_context_close): Clear current context, not
10573 previous one.
10574 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
10575
10576 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
10577
7ceeee39 105782008-04-13 Robert Millan <rmh@aybabtu.com>
10579
10580 Improve robustness when handling LVM.
10581
10582 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 10583 (and leave `*p' unmodified).
7ceeee39 10584 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
10585 through it.
10586 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
10587 iterating through it.
10588 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
10589 through it.
fe6b695a 10590 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 10591 when due) on each grub_lvm_getvalue() or grub_strstr() call.
10592 Don't assume `vg->pvs != NULL' when iterating through it.
10593
58cd3d85 105942008-04-13 Robert Millan <rmh@aybabtu.com>
10595
10596 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
10597 * genmk.rb (partmap): New variable.
10598 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
10599 (#{partmap}): New target rule.
10600 * genpartmaplist.sh: New file.
10601 * Makefile.in (pkglib_DATA): Add partmap.lst.
10602 (partmap.lst): New target rule.
10603 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
10604 modules (including all partition maps), instead of preloading them.
10605
78b51059 106062007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
10607
10608 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10609 `linux-boot-prober' (if installed) to detect other operating
10610 systems which are installed on the computer and add them to
10611 the boot menu.
10612 * conf/common.rmk: Build and install 30_os-prober.
10613
a91627b4 106142008-04-12 Robert Millan <rmh@aybabtu.com>
10615
10616 * kern/powerpc/ieee1275/init.c: Move from here ...
10617 * kern/ieee1275/init.c: ... to here. Update all users.
10618
10619 * kern/powerpc/ieee1275/cmain.c: Move from here ...
10620 * kern/ieee1275/cmain.c: ... to here. Update all users.
10621
10622 * kern/powerpc/ieee1275/openfw.c: Move from here ...
10623 * kern/ieee1275/openfw.c: ... to here. Update all users.
10624
10625 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10626 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
10627
322562ea 106282008-04-10 Pavel Roskin <proski@gnu.org>
10629
10630 * configure.ac: Always use "_cv_" in cache variables for
10631 compatibility with Autoconf 2.62.
10632
a02a73c5 106332008-04-07 Robert Millan <rmh@aybabtu.com>
10634
10635 Revert grub/machine/init.h addition by Pavel (since it breaks on
10636 i386-ieee1275 and others):
10637 * util/i386/pc/misc.c: Remove grub/machine/init.h.
10638 * util/powerpc/ieee1275/misc.c: Likewise.
10639
25c024b1 106402008-04-07 Robert Millan <rmh@aybabtu.com>
10641
10642 * util/grub-probe.c (probe): Improve error message.
10643
3cbd2f98 106442008-04-07 Robert Millan <rmh@aybabtu.com>
10645
10646 * util/biosdisk.c (read_device_map): Skip devices that don't exist
10647 (this prevents the presence of a bogus entry from ruining the whole
10648 thing).
10649
87a297bf 106502008-04-06 Pavel Roskin <proski@gnu.org>
10651
36747a62 10652 * util/biosdisk.c: Include grub/util/biosdisk.h.
10653 * util/grub-fstest.c (execute_command): Make static.
10654 * util/grub-mkdevicemap.c (check_device): Likewise.
10655 * util/i386/pc/misc.c: Include grub/machine/init.h.
10656 * util/powerpc/ieee1275/misc.c: Likewise.
10657 * util/lvm.c: Include grub/util/lvm.h.
10658 * util/misc.c: Include grub/kernel.h, grub/misc.h and
10659 grub/cache.h.
10660 * util/raid.c: Include grub/util/raid.h.
10661 (grub_util_getdiskname): Make static.
10662
87a297bf 10663 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
10664 grub_hostfs_fini(), as they are called from grub_init_all() and
10665 grub_fini_all() respectively. This fixes an infinite loop in
10666 grub-fstest due to double registration of hostfs.
10667 Reported by Christian Franke <Christian.Franke@t-online.de>
10668
f6ce7629 106692008-04-05 Pavel Roskin <proski@gnu.org>
10670
10671 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
10672 all 8 functions. Otherwise, probe function 0 only.
10673
070e49e4 106742008-04-04 Pavel Roskin <proski@gnu.org>
10675
8b088a4c 10676 * commands/lspci.c (grub_lspci_iter): Print the bus number
10677 correctly.
10678
4f657021 10679 * commands/lspci.c (grub_pci_classes): Fix typos.
10680 (grub_lspci_iter): Don't print func twice. Print vendor ID
10681 before device ID, as it's normally done.
10682
070e49e4 10683 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10684 Fix signedness warnings.
10685 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
10686 Likewise.
10687 * util/ieee1275/get_disk_name.c: Include config.h so that
10688 _GNU_SOURCE is defined and getline() is declared. Mark an
10689 unused argument as such. Fix a signedness warning.
10690
ba7328dc 106912008-04-02 Pavel Roskin <proski@gnu.org>
10692
26887f22 10693 * genkernsyms.sh.in: Use more robust assignments for CC and
10694 srcdir. Quote srcdir.
10695 * gensymlist.sh.in: Likewise. Assert at the compile time that
10696 the symbol table is not empty.
10697
ba7328dc 10698 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
10699 * fs/cpio.c (grub_cpio_read): Likewise.
10700
0f582c6b 107012008-04-01 Pavel Roskin <proski@gnu.org>
10702
4b6e1995 10703 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
10704 * disk/host.c (grub_host_open): Likewise.
10705 * disk/loopback.c (grub_loopback_open): Likewise.
10706 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
10707 disk->id as in disk/host.c, not a multi-character constant.
10708
828a2768 10709 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
10710 later is obsolete, potentially dangerous and sets a bad example.
10711 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
10712 * util/misc.c (grub_util_get_image_size): Likewise.
10713
2bb4fb47 10714 * disk/loopback.c (options): Improve help for "--partitions".
10715
0f582c6b 10716 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
10717 options to align them with the short options, e.g. "echo -e".
10718
a33224e0 107192008-03-31 Bean <bean123ch@gmail.com>
10720
10721 * video/reader/png.c (grub_png_data): New member is_16bit and
10722 image_data.
10723 (grub_png_decode_image_header): Detect 16 bit png image.
10724 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
10725 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
10726 (grub_video_reader_png): Release memory occupied by image_data.
10727
10728 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
10729 4096 bytes.
10730 (grub_nfs_mount): Skip the test for sector per cluster.
10731
10732 * include/grub/ntfs.h (MAX_SPC): Removed.
10733
86cb4f54 107342008-03-31 Bean <bean123ch@gmail.com>
10735
10736 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
10737 (grub_probe_SOURCES): Add fs/afs.c.
10738 (grub_fstest_SOURCES): Likewise.
10739 (afs_mod_SOURCES): New variable.
10740 (afs_mod_CFLAGS): Likewise.
10741 (afs_mod_LDFLAGS): Likewise.
10742
10743 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
10744 (grub_emu_SOURCES): Likewise.
10745
10746 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10747
10748 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10749
10750 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10751
10752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10753
10754 * fs/afs.c: New file.
10755
17c74c21 107562008-03-30 Pavel Roskin <proski@gnu.org>
10757
4cb68e89 10758 * disk/host.c: Include grub/misc.h to fix a warning.
10759 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
10760 warnings about implicit declarations.
10761
8790bb04 10762 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
10763 variable.
10764 * include/grub/i386/loader.h: Change declaration of
10765 grub_linux_boot() to match what grub_loader_set() expects.
10766 * util/getroot.c (grub_guess_root_device): Return const char* to
10767 fix a warning.
10768 * util/grub-probe.c (probe): Fix a warning about uninitialized
10769 abstraction_name variable.
10770 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
10771 second argument as unused to fix a warning.
10772
9a3f3296 10773 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
10774 missing grub_error() call.
10775
0ecef90d 10776 * util/update-grub_lib.in: Define datarootdir, since Autoconf
10777 2.60 and newer uses it to define datadir.
10778
0bf6d401 10779 * commands/sleep.c: Fix warning about implicit declaration.
10780 * disk/memdisk.c: Likewise.
10781 * loader/aout.c: Likewise.
10782 * loader/i386/bsd_normal.c: Likewise.
10783 * util/grub-probe.c: Likewise.
10784
7cdacf97 10785 * commands/i386/cpuid.c (has_longmode): Make static.
10786 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
10787 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
10788
17c74c21 10789 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
10790 GDT. This is more robust, as %ds can change.
10791 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
10792 calling real_to_prot().
10793 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
10794
80a3e68b 107952008-03-28 Pavel Roskin <proski@gnu.org>
10796
10797 * kern/i386/pc/startup.S: Assert that uncompressed functions
10798 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
10799 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
10800 code, as they push parts of the code (error handlers) beyond
10801 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
10802 code as correctness and size.
10803
77bcd272 108042008-03-28 Pavel Roskin <proski@gnu.org>
10805
10806 * kern/i386/pc/startup.S
10807 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
10808 data block address to the real mode, keep offset minimal. This
10809 works around a bug in AWARD BIOS on old Athlon systems, which
10810 makes CD detection hang.
10811
c5dfd43b 108122008-03-26 Pavel Roskin <proski@gnu.org>
10813
10814 * normal/color.c (grub_parse_color_name_pair): Make `name' a
10815 const.
10816 * include/grub/normal.h: Add grub_parse_color_name_pair()
10817 declaration.
10818
bf962df2 108192008-03-24 Bean <bean123ch@gmail.com>
10820
10821 * disk/i386/pc/biosdisk.c (cd_start): Removed.
10822 (cd_count): Removed.
10823 (cd_drive): New variable.
10824 (grub_biosdisk_get_drive): Don't check for (cdN) device.
10825 (grub_biosdisk_call_hook): Likewise.
10826 (grub_biosdisk_iterate): Change cdrom detection method.
10827 (grub_biosdisk_open): Replace cd_start with cd_drive.
10828 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
10829 detect cdrom device.
10830
10831 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
10832 Removed.
10833 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
10834 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
10835 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
10836 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
10837 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
10838 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
10839 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
10840 (grub_biosdisk_cdrp): New structure.
10841 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
10842
10843 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
10844
10845 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
10846 device.
10847
10848 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
10849 New function.
10850
68e7fc7a 108512008-03-20 Robert Millan <rmh@aybabtu.com>
10852
10853 Remove 2 TiB limit in ata.mod.
10854 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
10855 (grub_ata_dumpinfo): Print sector count with 0x%llx.
10856 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
10857 grub_uint64_t instead of grub_uint32_t.
10858
38ad2cf5 108592008-03-05 Bean <bean123ch@gmail.com>
10860
10861 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
10862 (grub_multiboot): Set boot device.
10863
10864 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
10865
2b89344e 108662008-03-02 Bean <bean123ch@gmail.com>
10867
10868 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
10869 symlink_buffer.
10870
87a95d1f 108712008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
10872
10873 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
10874 texinfo.tex.
10875
10876 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
10877 modified.
10878
10879 * docs/fdl.texi: New file.
f19dbdb7 10880
87a95d1f 10881 * docs/mdate-sh: New file. Copied from gnulib.
10882 * docs/texinfo.tex: Likewise.
10883
10884 * config.guess: Updated from gnulib.
10885 * install-sh: Likewise.
10886
7dc15d8e 108872008-02-28 Robert Millan <rmh@aybabtu.com>
10888
10889 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
10890 (aout_mod_SOURCES): New variable.
10891 (aout_mod_CFLAGS): Likewise.
10892 (aout_mod_LDFLAGS): Likewise.
10893
10894 * conf/i386-ieee1275.rmk: Likewise.
10895
b00ab696 108962008-02-28 Robert Millan <rmh@aybabtu.com>
10897
10898 * util/update-grub.in: Reorganise terminal validity check. Accept
10899 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
10900 Based on suggestion by Franklin PIAT.
10901
79ca2d78 109022008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
10903
10904 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
10905 function.
10906 * util/getroot.c (grub_util_check_block_device): New function that
10907 returns the given argument if it is a block device and returns NULL else.
10908 * util/grub-probe.c (argument_is_device): New variable.
10909 (probe): Promote device_name from a variable to an argument. Receive
10910 device_name from grub_util_check_block_device() if path is NULL and from
10911 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 10912 (options): Introduce new parameter '-d, --device'.
79ca2d78 10913 (main): Add description of the new parameter to the help screen.
10914 Rename path variable to argument. Set argument_is_device if the '-d'
10915 option is given. Pass argument to probe() depending on
10916 argument_is_device.
10917
0d16e571 109182008-02-24 Bean <bean123ch@gmail.com>
10919
10920 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10921 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10922 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10923 (GRUB_ISO9660_VOLDESC_PART): Likewise.
10924 (GRUB_ISO9660_VOLDESC_END): Likewise.
10925 (grub_iso9660_primary_voldesc): New member escape.
10926 (grub_iso9660_data): New member joliet.
10927 (grub_iso9660_convert_string): New function.
10928 (grub_iso9660_mount): Detect joliet extension.
10929 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10930 (grub_iso9660_iso9660_label): Likewise.
10931
10932 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10933 (grub_setup_SOURCES): Add fs/udf.c.
10934 (grub_fstest_SOURCES): Likewise.
10935 (udf_mod_SOURCES): New variable.
10936 (udf_mod_CFLAGS): Likewise.
10937 (udf_mod_LDFLAGS): Likewise.
10938
10939 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10940 (grub_emu_SOURCES): Likewise.
10941
10942 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10943
10944 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10945
10946 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10947
10948 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10949
10950 * fs/udf.c: New file.
10951
8a594a17 109522008-02-24 Robert Millan <rmh@aybabtu.com>
10953
10954 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10955 (normal/lexer.c_DEPENDENCIES): New variables.
10956 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10957 (normal/lexer.c_DEPENDENCIES): Likewise.
10958 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10959 (normal/lexer.c_DEPENDENCIES): Likewise.
10960 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10961 (normal/lexer.c_DEPENDENCIES): Likewise.
10962 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10963 (normal/lexer.c_DEPENDENCIES): Likewise.
10964 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10965 (normal/lexer.c_DEPENDENCIES): Likewise.
10966
2dc33c03 109672008-02-23 Robert Millan <rmh@aybabtu.com>
10968
10969 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10970 since they were intended to be in hex. This didn't break previously
10971 because of a bug in gpt_partition_map_iterate() (see below).
10972
10973 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10974 when checking the validity of GPT header.
10975 Remove `partno', since it always provides the same information as `i'.
10976
f6f4cfb0 109772008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
10978
10979 * include/grub/efi/time.h: Fix a wrong comment.
10980
79ff665f 109812008-02-19 Pavel Roskin <proski@gnu.org>
10982
10983 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10984 message.
10985
d38e24c2 109862008-02-19 Bean <bean123ch@gmail.com>
10987
10988 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10989 (aout_mod_SOURCES): New variable.
10990 (aout_mod_CFLAGS): Likewise.
10991 (aout_mod_LDFLAGS): Likewise.
10992 (_bsd_mod_SOURCES): New variable.
10993 (_bsd_mod_CFLAGS): Likewise.
10994 (_bsd_mod_LDFLAGS): Likewise.
10995 (bsd_mod_SOURCES): New variable.
10996 (bsd_mod_CFLAGS): Likewise.
10997 (bsd_mod_LDFLAGS): Likewise.
10998
10999 * include/grub/aout.h: New file.
11000
11001 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
11002
11003 * include/grub/i386/bsd.h: New file.
11004
11005 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
11006 to make it public.
11007
11008 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
11009 function is called, so that it's possible to change it inside the hook.
11010 (grub_elf64_load): Likewise.
11011 (grub_elf_file): Don't close the file if elf header is not found.
11012 (grub_elf_close): Close the file if grub_elf_file fails (The new
11013 grub_elf_file won't close it).
11014 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
11015 (grub_elf64_size): Likewise.
11016
11017 * kern/i386/loader.S (grub_unix_real_boot): New function.
11018
11019 * loader/aout.c: New file.
11020
11021 * loader/i386/bsd.c: New file.
11022
11023 * loader/i386/bsd_normal.c: New file.
11024
11025 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
11026
11027 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 11028 can test other formats.
d38e24c2 11029
b93bdb0f 110302008-02-19 Robert Millan <rmh@aybabtu.com>
11031
11032 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
11033 (grub_gpt_partition_type_empty): Redefine with macro from
11034 `<grub/gpt_partition.h>'.
11035 (gpt_partition_map_iterate): Adjust partition type comparison.
11036
11037 Export `entry' as partmap-specific `part.data' struct.
11038 (grub_gpt_header, grub_gpt_partentry): Move from here ...
11039
11040 * include/grub/gpt_partition.h (grub_gpt_header)
11041 (grub_gpt_partentry): ... to here (new file).
11042
11043 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
11044
11045 (grub_gpt_partition_type_bios_boot): New const variable, defined
11046 with macro from `<grub/gpt_partition.h>'.
11047
11048 (setup): Replace `first_start' with `embed_region', which keeps
11049 track of the embed region (and is partmap-agnostic).
11050
11051 Replace find_first_partition_start() with find_usable_region(),
11052 which finds a usable region for embedding using partmap-specific
11053 knowledge (supports PC/MSDOS and GPT).
11054
11055 Fix all assumptions that the embed region start at sector 1, using
11056 `embed_region.start' from now on. Similarly, use `embed_region.end'
11057 rather than `first_start' to calculate available size.
11058
11059 In grub_util_info() message, replace "into after the MBR" with an
11060 indication of the specific sector our embed region starts at.
11061
66cb40f6 110622008-02-19 Robert Millan <rmh@aybabtu.com>
11063
11064 * DISTLIST: Replace `commands/ieee1275/halt.c' and
11065 `commands/ieee1275/reboot.c' with `commands/halt.c' and
11066 `commands/reboot.c'.
11067 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11068 (halt_mod_SOURCES): Likewise.
11069 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11070 (halt_mod_SOURCES): Likewise.
11071
b7202015 110722008-02-17 Christian Franke <franke@computer.org>
11073
11074 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
11075
32b0fc49 110762008-02-17 Robert Millan <rmh@aybabtu.com>
11077
11078 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11079 set `first_start' to 0 for non-PC/MSDOS partition maps.
11080
aca63502 110812008-02-16 Robert Millan <rmh@aybabtu.com>
11082
11083 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11084 do not assume partition map is PC/MSDOS before performing checks that
11085 are specific to that layout.
11086
0de8be86 110872008-02-13 Robert Millan <rmh@aybabtu.com>
11088
11089 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
11090 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
11091 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
11092
c3db8364 110932008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
11094
11095 * configure.ac: Only a cosmetic change on the handling of
11096 -fno-stack-protector.
11097
f714229e 110982008-02-12 Alexandre Boeglin <alex@boeglin.org>
11099
c3db8364 11100 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
11101 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
11102 reboot.c.
f714229e 11103 (grub_install_SOURCES): Add halt.mod and reboot.mod.
11104 (halt_mod_SOURCES): New variable.
11105 (halt_mod_CFLAGS): Likewise.
11106 (halt_mod_LDFLAGS): Likewise.
11107 (reboot_mod_SOURCES): Likewise.
11108 (reboot_mod_CFLAGS): Likewise.
11109 (reboot_mod_LDFLAGS): Likewise.
11110
c3db8364 11111 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
11112 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
11113 reboot.c.
f714229e 11114 (halt_mod_SOURCES): Likewise.
11115 (reboot_mod_SOURCES): Likewise.
11116
c3db8364 11117 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
11118 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 11119 (reboot_mod_SOURCES): Likewise.
11120
11121 * commands/i386/pc/reboot.c: merge this file ...
11122
11123 * commands/ieee1275/reboot.c: ... and this file ...
11124
11125 * commands/reboot.c: ... to this file.
c3db8364 11126 Add some precompiler directive to include the correct header for
11127 each machine.
f714229e 11128
11129 * commands/ieee1275/halt.c: move this file ...
11130
11131 * commands/halt.c: ... to here.
c3db8364 11132 Add some precompiler directive to include the correct header for
11133 each machine.
f714229e 11134
11135 * include/grub/efi/efi.h (grub_reboot): New function declaration.
11136 (grub_halt): Likewise.
11137
11138 * kern/efi/efi.c (grub_reboot): New function.
11139 (grub_halt): Likewise.
11140
c74493e0 111412008-02-12 Robert Millan <rmh@aybabtu.com>
11142
11143 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
11144 /dev (like it is done for /dev/mapper). This doesn't provide support
11145 for EVMS, but at least it is now easy to identify the problem when it
11146 arises.
11147
d0db4b04 111482008-02-11 Robert Millan <rmh@aybabtu.com>
11149
11150 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
11151 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
11152 comparing it with -1, not 0.
11153
bf748642 111542008-02-10 Robert Millan <rmh@aybabtu.com>
11155
11156 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
11157 `disk/lvm.c'.
11158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11159 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
11160
11161 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
11162 `disk/lvm.c' to the end of the list.
11163 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11164 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11165
b5db202a 111662008-02-10 Robert Millan <rmh@aybabtu.com>
11167
11168 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
11169 grub_print_error() instead. This will let user know why we're entering
11170 rescue mode.
11171 Based on suggestions from Sam Morris.
11172
83abee31 111732008-02-10 Alexandre Boeglin <alex@boeglin.org>
11174
11175 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
11176 on remaining N args, instead of "--" arg N times.
11177
78d5a08b 111782008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
11179
11180 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
11181 (fill_with_default_glyph): Changed to use unknown_glyph for fill
11182 pattern for unknown glyphs.
11183
68807e5f 111842008-02-09 Robert Millan <rmh@aybabtu.com>
11185
11186 * configure.ac: Probe for `help2man'.
11187 * Makefile.in (builddir): New variable.
11188 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
11189 or otherwise add a few flags/options to it.
11190 (install-local): For every executable utility or script that is
11191 installed, invoke $(HELP2MAN) to install a manpage based on --help
11192 output.
11193
11194 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
11195 that it doesn't prevent --help from working in build tree.
11196
11197 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
11198 with `bug-grub@gnu.org'.
11199 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
11200 * util/update-grub.in (usage): New function.
11201 Implement proper argument check, with support for --help and --version
11202 (as well as existing -y).
11203
112042008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 11205
11206 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
11207 avoid overwriting previous output.
11208 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
11209
c1962162 112102008-02-09 Robert Millan <rmh@aybabtu.com>
11211
11212 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
11213 drawing the menu.
11214
3dac2e3f 112152008-02-09 Robert Millan <rmh@aybabtu.com>
11216
11217 * commands/sleep.c: New file.
11218 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
11219 (sleep_mod_SOURCES): New variable.
11220 (sleep_mod_CFLAGS): Likewise.
11221 (sleep_mod_LDFLAGS): Likewise.
11222
7a634e08 112232008-02-09 Robert Millan <rmh@aybabtu.com>
11224
11225 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
11226 situations in which we can deduce the RAID size and the superblock
11227 doesn't match it.
11228
b92f0c18 112292008-02-09 Robert Millan <rmh@aybabtu.com>
11230
11231 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
11232 and return a grub_diskmemberlist_t composed of LVM physical volumes.
11233 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
11234
11235 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
11236 and return a grub_diskmemberlist_t composed of physical array members.
11237 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
11238
11239 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
11240 prototype.
11241 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
11242 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
11243 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
11244
11245 * util/grub-probe.c (probe): Move partmap probing code from here ...
11246 (probe_partmap): ... to here.
11247 (probe): Use probe_partmap() once for the disk we're probing, and
11248 additionally, when such disk contains a memberlist() struct member,
11249 once for each disk that is contained in the structure returned by
11250 memberlist().
11251
91a4bf68 112522008-02-09 Robert Millan <rmh@aybabtu.com>
11253
11254 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
11255 environment variable to 'all' in order to obtain debug output from
11256 non-util/ code.
11257 * util/i386/pc/grub-setup.c (main): Likewise.
11258
a96f9caa 112592008-02-08 Robert Millan <rmh@aybabtu.com>
11260
11261 * disk/raid.c (grub_raid_scan_device): Check for
11262 `array->device[sb.this_disk.number]' rather than for
11263 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 11264 guaranteed to be accessible.
a96f9caa 11265
b37a9222 112662008-02-08 Robert Millan <rmh@aybabtu.com>
11267
11268 * disk/raid.c: Update copyright.
11269 * fs/cpio.c: Likewise.
11270 * include/grub/raid.h: Likewise.
11271 * loader/i386/pc/multiboot.c: Likewise.
11272 * util/hostfs.c: Likewise.
11273
5626aee1 112742008-02-08 Robert Millan <rmh@aybabtu.com>
11275
11276 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
11277 to a grub_disk_t array.
11278 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
11279 `device[x]'.
11280 (grub_raid_scan_device): Replace `device[x].name' accesses with
11281 `device[x]->name'. Simplify initialization of `array->device[x]'.
11282
554f0187 112832008-02-08 Robert Millan <rmh@aybabtu.com>
11284
11285 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
11286 grub_dprintf() calls.
11287 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
11288 error message.
11289
1ec8425d 112902008-02-07 Christian Franke <franke@computer.org>
11291
11292 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
11293 instead of fseek and ftell to support large files.
11294 (grub_hostfs_read): Likewise.
11295
f2156fda 112962008-02-07 Robert Millan <rmh@aybabtu.com>
11297
11298 Patch from Jeroen Dekkers.
11299 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 11300 failure, since successfully reading all array members might not be
f2156fda 11301 required.
11302
9216e0e7 113032008-02-06 Robert Millan <rmh@aybabtu.com>
11304
11305 * util/grub-probe.c (probe): Simplify partmap probing (with the
11306 assumption that the first word up to the underscore equals to
11307 the module name).
11308
b0dfd29a 113092008-02-06 Christian Franke <franke@computer.org>
11310
11311 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
11312 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
11313 last block of a cpio or tar stream.
11314 Check for "TRAILER!!!" instead of any empty data
11315 block to detect last block of a cpio stream.
11316 (grub_cpio_dir): Fix constness of variable np.
11317 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
11318 cpio or tar trailer is detected. This fixes a crash
11319 on open of a non existing file.
11320
c32865bf 113212008-02-05 Bean <bean123ch@gmail.com>
11322
11323 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
11324 address of entry.
11325 (grub_multiboot_load_elf64): Likewise.
11326 (grub_multiboot): Initialize mbi structure.
11327
11328 * util/grub-fstest.c: Don't include unused header file script.h.
11329
fe6b695a 11330 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 11331 of file.
11332 (grub_fstest_SOURCES): Likewise.
11333
409480b7 113342008-02-05 Robert Millan <rmh@aybabtu.com>
11335
11336 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
11337 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
11338 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
11339 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
11340
11341 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
11342 (translation_table): Replace hardcoded values with macros
11343 provided by `<grub/term.h>'.
11344
11345 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
11346 (keyboard_map): Correct/add a few values, with macros provided
11347 by `<grub/term.h>'.
11348 (keyboard_map_shift): Zero values that don't differ from their
11349 `keyboard_map' equivalents.
11350 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
11351 Discard the second scan code that is always sent by Caps lock.
11352 Only use `keyboard_map_shift' when it provides a non-zero value,
11353 otherwise fallback to `keyboard_map'.
11354
99fadbaa 113552008-02-04 Bean <bean123ch@gmail.com>
11356
11357 * Makefile.in (enable_grub_fstest): New variable.
11358
11359 * conf/common.rmk (grub_fstest_init.lst): New rule.
11360 (grub_fstest_init.h): Likewise.
11361 (grub_fstest_init.c): Likewise.
11362 (util/grub-fstest.c_DEPENDENCIES): New variable.
11363 (grub_fstest_SOURCES): Likewise.
11364
11365 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
11366
11367 * util/grub-fstest.c: New file.
11368
bf567c50 113692008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11370
11371 Make grub-setup handle a separate root device.
f19dbdb7 11372
bf567c50 11373 * util/i386/pc/grub-setup.c (setup): Always open the root device,
11374 so that the root device can be compared with the destination
11375 device.
11376 When embedding the core image, if the root and destination devices
11377 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
11378 0xFF.
11379 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 11380
9be6b98b 113812008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11382
11383 Add support for having a grub directory in a different drive. This
11384 is still only the data handling part.
f19dbdb7 11385
9be6b98b 11386 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
11387 (codestart): Save %dh in GRUB_ROOT_DRIVE.
11388 (grub_root_drive): New variable.
11389
11390 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
11391 instead of GRUB_BOOT_DRIVE to construct a device name. Set
11392 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
11393 as it was.
11394
11395 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
11396
11397 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
11398 macro.
11399 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
11400
11401 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
11402 is bogus, because PXE booting does not specify any drive
11403 correctly.
11404
11405 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
11406 am not sure if this is really correct.
11407
11408 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
11409 is always identical to the boot drive when booting from a CD.
11410
11411 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
11412 longer.
11413 (root_drive): New variable.
11414 (real_start): Unconditionally set %dh to ROOT_DRIVE.
11415 (setup_sectors): Push %dx right after popping it, because %dh will
11416 be modified later.
11417 (copy_buffer): Restore %dx.
11418
e0ca0677 114192008-02-03 Robert Millan <rmh@aybabtu.com>
11420
11421 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
11422 use `cdboot.img' for cdrom images.
11423
3b3f6629 114242008-02-03 Robert Millan <rmh@aybabtu.com>
11425
11426 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
11427 only setup gfxterm when `font' command has succeeded.
11428
d42b3672 114292008-02-03 Robert Millan <rmh@aybabtu.com>
11430
11431 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
11432 (grub_rescue_cmd_multiboot_loader)
11433 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
11434
fa370ea6 114352008-02-03 Pavel Roskin <proski@gnu.org>
11436
e0c5dacb 11437 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 11438 %edx and %esi from stack only after grub_gate_a20() is called.
11439 grub_gate_a20() clobbers %edx.
11440
f2a76e1d 114412008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11442
11443 * configure.ac (AC_INIT): Bumped to 1.96.
11444
11445 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
11446 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
11447 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
11448 video/readers/png.c.
11449
90fd32d1 114502008-02-03 Bean <bean123ch@gmail.com>
9be665dd 11451
11452 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
11453 (cdboot_img_SOURCES): New variable.
11454 (cdboot_img_ASFLAGS): New variable.
11455 (cdboot_img_LDFLAGS): New variable.
11456
11457 * boot/i386/pc/cdboot.S: New file.
11458
11459 * disk/i386/pc/biosdisk.c (cd_start): New variable.
11460 (cd_count): Likewise.
11461 (grub_biosdisk_get_drive): Add support for cd device.
11462 (grub_biosdisk_call_hook): Likewise.
11463 (grub_biosdisk_iterate): Likewise.
11464 (grub_biosdisk_open): Likewise.
11465 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
11466 (grub_biosdisk_rw): Support reading from cd device.
11467 (GRUB_MOD_INIT): Iterate cd devices.
11468
11469 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
11470 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
11471 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
11472
11473 * kern/i386/pc/init.c (make_install_device): Check for cd device.
11474
4020aa53 114752008-02-02 Robert Millan <rmh@aybabtu.com>
11476
11477 * commands/read.c: New file.
11478 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
11479 (read_mod_SOURCES): New variable.
11480 (read_mod_CFLAGS): Likewise.
11481 (read_mod_LDFLAGS): Likewise.
11482
e03a1132 114832008-02-02 Robert Millan <rmh@aybabtu.com>
11484
11485 * normal/main.c (grub_normal_execute): Check for `menu->size' when
11486 determining whether menu has to be displayed.
11487
58c69220 114882008-02-02 Marco Gerards <marco@gnu.org>
11489
11490 * bus/pci.c: New file.
11491
11492 * include/grub/pci.h: Likewise.
11493
11494 * include/grub/i386/pc/pci.h: Likewise.
11495
11496 * commands/lspci.c: Likewise.
11497
11498 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
11499 `lspci.mod'.
11500 (pci_mod_SOURCES): New variable.
11501 (pci_mod_CFLAGS): Likewise.
11502 (pci_mod_LDFLAGS): Likewise.
11503 (lspci_mod_SOURCES): Likewise.
11504 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 11505 (lspci_mod_LDFLAGS): Likewise.
58c69220 11506
c004e1b4 115072008-02-02 Bean <bean123ch@gmail.com>
11508
11509 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
11510 (grub_ufs_get_file_block): Fix indirect block calculation problem.
11511
11512 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
11513 (grub_xfs_btree_node): New structure.
11514 (grub_xfs_btree_root): New structure.
11515 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
11516 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
11517 (GRUB_XFS_EXTENT_BLOCK): Likewise.
11518 (GRUB_XFS_EXTENT_SIZE): Likewise.
11519 (grub_xfs_read_block): Support btree format type.
11520 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
11521 Use directory block as basic unit.
11522
11523 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
11524
11525 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
11526 __attribute__ ((__regparm__ (1))).
11527
f95562bf 115282008-02-01 Robert Millan <rmh@aybabtu.com>
11529
11530 Correct a mistake in previous commit.
11531
11532 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
11533 top.
11534 (normal/command.c_DEPENDENCIES): New variable.
11535
7d31f41f 115362008-02-01 Robert Millan <rmh@aybabtu.com>
11537
11538 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
11539 top.
11540 (normal/command.c_DEPENDENCIES): New variable.
11541 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
11542 * conf/i386-ieee1275.rmk: Likewise.
11543 * conf/i386-linuxbios.rmk: Likewise.
11544 * conf/i386-pc.rmk: Likewise.
11545 * conf/sparc64-ieee1275.rmk: Likewise.
11546 * conf/powerpc-ieee1275.rmk: Likewise.
11547 (grub_emu_SOURCES): Add `fs/fshelp.c'.
11548
11549 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
11550
60b6be74 115512008-02-01 Robert Millan <rmh@aybabtu.com>
11552
11553 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
11554 call at beginning of function.
11555
078522ab 115562008-01-31 Pavel Roskin <proski@gnu.org>
11557
11558 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 11559 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
11560 (grub_mkrescue_SOURCES): Likewise.
078522ab 11561 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
11562
ccaa8a5f 115632008-01-30 Robert Millan <rmh@aybabtu.com>
11564
11565 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
11566 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
11567 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
11568 (grub_probe_SOURCES): ... to here.
11569
11570 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
11571 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
11572 * conf/i386-ieee1275.rmk: Likewise.
11573 * conf/i386-linuxbios.rmk: Likewise.
11574 * conf/powerpc-ieee1275.rmk: Likewise.
11575
ae5a9cd7 115762008-01-30 Tristan Gingold <gingold@free.fr>
11577
11578 * kern/rescue.c: Silently accept empty lines.
11579
70bc2ef2 115802008-01-29 Bean <bean123ch@gmail.com>
11581
11582 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
11583 (real_code_2): Code cleanup and change comment style.
11584 (move_memory): Avoid using 32-bit address mode.
11585
6a4d50ea 115862008-01-29 Bean <bean123ch@gmail.com>
11587
11588 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
11589 (png_mod_SOURCES): New variable.
11590 (png_mod_CFLAGS): Likewise.
11591 (png_mod_LDFLAGS): Likewise.
11592
11593 * video/readers/png.c: New file.
11594
11cc30ac 115952008-01-28 Robert Millan <rmh@aybabtu.com>
11596
11597 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
11598 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
11599 `ifndef GRUB_MOD_GAP' hack.
11600 * util/elf/grub-mkimage.c (add_segments): Likewise.
11601
3abc589f 116022008-01-27 Robert Millan <rmh@aybabtu.com>
11603
11604 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11605 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 11606 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 11607
e1907778 116082008-01-27 Robert Millan <rmh@aybabtu.com>
11609
11610 Get grub-emu to build again (including parallel builds).
11611
11612 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11613 Split into ...
11614 (util/grub-emu.c_DEPENDENCIES): ... this, ...
11615 (normal/execute.c_DEPENDENCIES): ... this, ...
11616 (grub-emu_DEPENDENCIES): ... and this.
11617
11618 * conf/i386-efi.rmk: Likewise.
11619 * conf/i386-linuxbios.rmk: Likewise.
11620 * conf/i386-ieee1275.rmk: Likewise.
11621 * conf/powerpc-ieee1275.rmk: Likewise.
11622 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11623
2216b101 116242008-01-27 Robert Millan <rmh@aybabtu.com>
11625
11626 * NEWS: Add a few items.
11627
f75172d9 116282008-01-27 Robert Millan <rmh@aybabtu.com>
11629
11630 Fix parallel builds with grub-emu. Based on earlier commit for
11631 grub-probe and grub-setup.
11632
11633 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11634 (util/grub-emu.c_DEPENDENCIES): ... this.
11635 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11636 (util/grub-emu.c_DEPENDENCIES): ... this.
11637 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11638 (util/grub-emu.c_DEPENDENCIES): ... this.
11639 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11640 (util/grub-emu.c_DEPENDENCIES): ... this.
11641 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11642 (util/grub-emu.c_DEPENDENCIES): ... this.
11643
3f51de77 116442008-01-27 Pavel Roskin <proski@gnu.org>
11645
11646 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
11647 to create a gap between _end and the modules added to the image
11648 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
11649 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
11650 * util/elf/grub-mkimage.c (add_segments): Likewise.
11651
2033f53e 116522008-01-26 Pavel Roskin <proski@gnu.org>
11653
11654 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
11655 just return an error.
11656
22da1f6f 116572008-01-26 Bean <bean123ch@gmail.com>
11658
11659 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
11660 (grub_reiserfs_get_item): Save offset of the next item.
11661 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
11662
2a9525e6 116632008-01-25 Robert Millan <rmh@aybabtu.com>
11664
11665 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
11666 make all filesystem sources appear together (possibly fixing omissions
11667 while at it).
11668 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11669 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11670 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11671 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11672
11673 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
11674 add `kern/file.c'.
11675 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
11676 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11677 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
11678 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11679
11680 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
11681 (probe): Add a sanity check to make sure of our ability to read
11682 requested files when probing for filesystem type.
11683
11684 * genmk.rb: Update copyright year (2007).
11685
11686 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
11687 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
11688 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
11689 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
11690 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
11691 : Remove function prototypes.
11692
b95f71b5 116932008-01-25 Robert Millan <rmh@aybabtu.com>
11694
11695 Revert my previous commits (based on wrong assumption of how grub_errno
11696 works).
11697
fe6b695a 11698 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 11699 * kern/file.c (grub_file_open): Likewise.
11700
d08bbb49 117012008-01-24 Pavel Roskin <proski@gnu.org>
11702
11703 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
11704 that hang if GRUB tries to setup colors.
11705 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
11706 colors for firmwares that don't support it.
11707 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
11708 Recognize Open Hack'Ware, set flags to work around its
11709 limitations.
11710
605e36ed 117112008-01-24 Robert Millan <rmh@aybabtu.com>
11712
11713 * kern/file.c (grub_file_open): Do not account previous failures of
11714 unrelated functions when grub_errno is checked for.
11715 Reported by Oleg Strikov.
11716
bac332a1 117172008-01-24 Bean <bean123ch@gmail.com>
11718
11719 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
11720 (grub_ufs_sblock): New member volume name.
11721 (grub_ufs_find_file): Fix string copy bug.
11722 (grub_ufs_label): Implement this function properly.
11723
11724 * fs/hfs.c (grub_hfs_cnid_type): New enum.
11725 (grub_hfs_iterate_records): Use the correct file number for extents
11726 and catalog file. Fix problem in next index calculation.
11727 (grub_hfs_find_node): Replace recursive function call with loop.
11728 (grub_hfs_iterate_dir): Replace recursive function call with loop.
11729
15c80c09 117302008-01-23 Robert Millan <rmh@aybabtu.com>
11731
11732 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
11733 `<grub/symbol.h>' and `<grub/multiboot.h>'.
11734 (grub_multiboot2_real_boot): New function prototype.
11735
11736 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
11737 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
11738
11739 * kern/i386/ieee1275/init.c (grub_os_area_addr)
11740 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
11741
305338fd 117422008-01-23 Robert Millan <rmh@aybabtu.com>
11743
11744 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
11745 #ifdef'ed out grub_printf().
11746
3ea52685 117472008-01-23 Robert Millan <rmh@aybabtu.com>
11748
11749 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
11750 grub_dprintf calls, since they make "debug=all" mode unusable.
11751 (grub_console_checkkey): Likewise.
11752
5882ae4b 117532008-01-23 Robert Millan <rmh@aybabtu.com>
11754
11755 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
11756 `term/i386/pc/at_keyboard.c'.
11757 (pkglib_MODULES): Add `serial.mod'.
11758 (serial_mod_SOURCES): New variable.
11759 (serial_mod_CFLAGS): Likewise.
11760 (serial_mod_LDFLAGS): Likewise.
11761
11762 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
11763 `<grub/powerpc/ieee1275/console.h>'.
11764 (grub_keyboard_controller_init): New function prototype.
11765 (grub_console_checkkey): Likewise.
11766 (grub_console_getkey): Likewise.
11767
11768 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
11769 keyboard on i386.
11770
11771 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
11772 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
11773
06ab5303 117742008-01-23 Robert Millan <rmh@aybabtu.com>
11775
11776 * kern/i386/pc/init.c (make_install_device): When memdisk image is
11777 present, "(memdisk)/boot/grub" becomes the default prefix.
11778
11779 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
11780 a memdisk tarball with all the modules. Add --overlay=DIR option that
11781 allows users to overlay additional files into the image.
11782
dbb475a4 117832008-01-23 Robert Millan <rmh@aybabtu.com>
11784
11785 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
11786 and `machine/memory.h'.
11787 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
11788 (_multiboot_mod_SOURCES): New variable.
11789 (_multiboot_mod_CFLAGS): Likewise.
11790 (_multiboot_mod_LDFLAGS): Likewise.
11791 (multiboot_mod_SOURCES): Likewise.
11792 (multiboot_mod_CFLAGS): Likewise.
11793 (multiboot_mod_LDFLAGS): Likewise.
11794
11795 * include/grub/i386/ieee1275/loader.h: New file.
11796
11797 * include/grub/i386/ieee1275/machine.h: Likewise.
11798
11799 * include/grub/i386/ieee1275/memory.h: Likewise.
11800
11801 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
11802 variable declaration.
11803 (grub_os_area_size): Likewise.
11804
11805 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
11806 (grub_lower_mem, grub_upper_mem): New variables.
11807 (grub_stop_floppy): New function (just to make
11808 grub_multiboot2_real_boot() happy).
11809
11810 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
11811 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
11812 (grub_stop): New function.
11813 Include `"../realmode.S"' and `"../loader.S"'.
11814
11815 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
11816 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
11817
11818 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
11819 rely on grub_multiboot2_real_boot() for final boot.
11820
25638629 118212008-01-22 Robert Millan <rmh@aybabtu.com>
11822
11823 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
11824 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
11825 device that doesn't look like an SD card.
11826 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11827 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
11828 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
11829 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
11830 found.
11831
9dad816d 118322008-01-22 Robert Millan <rmh@aybabtu.com>
11833
11834 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
11835 avoid claiming over our own code.
11836
34842f2d 118372008-01-22 Bean <bean123ch@gmail.com>
11838
11839 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
11840 (jpeg_mod_SOURCES): New variable.
11841 (jpeg_mod_CFLAGS): Likewise.
11842 (jpeg_mod_LDFLAGS): Likewise.
11843
11844 * video/readers/jpeg.c : New file.
11845
44023a28 118462008-01-22 Bean <bean123ch@gmail.com>
11847
11848 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
11849 there are no more items.
11850
bc2d8ac6 118512008-01-21 Robert Millan <rmh@aybabtu.com>
11852
11853 * kern/mm.c (grub_mm_init_region): Improve debug message.
11854
261bd4bc 118552008-01-21 Robert Millan <rmh@aybabtu.com>
11856
11857 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
11858 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
11859 address.
11860 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
11861 a C macro.
11862 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
11863 Indicates start of upper memory.
11864 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
11865 (generate_image): Abort when image size is big enough to corrupt
11866 upper memory.
11867
11868 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
11869 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
11870 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11871 instead of hardcoding 0xA0000.
11872 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
11873 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11874 instead of hardcoding 0xA0000.
11875
f970b55e 118762008-01-21 Robert Millan <rmh@aybabtu.com>
11877
11878 * disk/memdisk.c (memdisk_size): New variable.
11879 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
11880 `memdisk_size'.
11881 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
11882 image to dynamic memory.
11883 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
11884 `memdisk_size'. Free memdisk block.
11885
1a8b0526 118862008-01-21 Robert Millan <rmh@aybabtu.com>
11887
11888 Fix detection of very small filesystems (like tar).
11889
11890 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
11891 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
11892 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
11893 a problem with this disk).
11894
6e9b4aab 118952008-01-21 Robert Millan <rmh@aybabtu.com>
11896
11897 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
11898 on grub_biosdisk_rw_standard() error.
11899
0d8837b2 119002008-01-21 Robert Millan <rmh@aybabtu.com>
11901
11902 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
11903 recent changes.
11904 * kern/elf.c: Likewise.
11905 * kern/ieee1275/ieee1275.c: Likewise.
11906 * kern/powerpc/ieee1275/openfw.c: Likewise.
11907 * term/ieee1275/ofconsole.c: Likewise.
11908
ffd36e34 119092008-01-21 Robert Millan <rmh@aybabtu.com>
11910
11911 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11912
3f0093d0 11913 * include/grub/kernel.h (grub_arch_memdisk_addr)
11914 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 11915
3f0093d0 11916 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11917 (grub_arch_memdisk_size): ... to here.
ffd36e34 11918
6c391b21 119192008-01-21 Robert Millan <rmh@aybabtu.com>
11920
11921 Mostly based on bugfix from Bean.
11922
11923 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11924 attribute with hook() parameter.
11925 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11926 declaration.
11927 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11928 attribute with hook() parameter.
11929 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11930 declaration.
11931
55a581dc 119322008-01-21 Robert Millan <rmh@aybabtu.com>
11933
11934 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11935 (pkglib_MODULES): Add `memdisk.mod'.
11936 (memdisk_mod_SOURCES): New variable.
11937 (memdisk_mod_CFLAGS): Likewise.
11938 (memdisk_mod_LDFLAGS): Likewise.
11939
11940 * disk/memdisk.c: New file.
11941
11942 * include/grub/disk.h (grub_disk_dev_id): Add
11943 `GRUB_DISK_DEVICE_MEMDISK_ID'.
11944
11945 * include/grub/i386/pc/kernel.h
11946 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11947 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11948 (grub_kernel_image_size): New variable declaration.
11949 (grub_total_module_size): Likewise.
11950 (grub_memdisk_image_size): Likewise.
11951
11952 * include/grub/i386/pc/memory.h
11953 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11954
11955 * include/grub/kernel.h: Include `<grub/symbol.h>'.
11956 (grub_arch_memdisk_addr): New variable declaration.
11957 (grub_arch_memdisk_size): Likewise.
11958
11959 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11960 (grub_arch_memdisk_size): Likewise.
11961
11962 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11963 (codestart): Replace hardcoded `0x100000' with
11964 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11965
11966 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11967 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
11968 not NULL, append the contents of the file it refers to, at the end of
11969 the compressed kernel image. Initialize `grub_memdisk_image_size'
11970 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11971 (options): Add "memdisk"|'m' option.
11972 (main): Parse --memdisk|-m option, and pass user-provided path as
11973 parameter to generate_image().
11974
3d7f54c9 119752008-01-20 Robert Millan <rmh@aybabtu.com>
11976
11977 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11978 grub_dprintf() calls from here ...
11979 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11980
0bf74728 119812008-01-20 Robert Millan <rmh@aybabtu.com>
11982
11983 Fix detection of "real mode" when /options/real-mode? doesn't exist.
11984
11985 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11986 declaration.
11987 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11988 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11989 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 11990 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 11991 property).
11992 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11993 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11994
33bf70a7 119952008-01-19 Robert Millan <rmh@aybabtu.com>
11996
fe6b695a 11997 Get rid of confusing function (superseded by
33bf70a7 11998 `grub_ieee1275_get_integer_property')
11999 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
12000 prototype.
12001 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
12002 function.
12003 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
12004 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 12005 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 12006
e2da7d26 120072008-01-19 Robert Millan <rmh@aybabtu.com>
12008
12009 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
12010 command after "shut-down", since implementations differ on which
12011 the command for halt is.
12012
59f1fd8d 120132008-01-19 Robert Millan <rmh@aybabtu.com>
12014
12015 * include/grub/i386/linuxbios/console.h: Add header protection.
12016 (grub_keyboard_controller_init): New function prototype.
12017 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
12018 (KEYBOARD_COMMAND_READ): Likewise.
12019 (KEYBOARD_COMMAND_WRITE): Likewise.
12020 (KEYBOARD_SCANCODE_SET1): Likewise.
12021 (grub_keyboard_controller_write): New function.
12022 (grub_keyboard_controller_read): Likewise.
12023 (grub_keyboard_controller_init): Likewise.
12024
12025 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
12026 (grub_console_init): On coreboot/LinuxBIOS, call
12027 grub_keyboard_controller_init().
12028
5f5a7c15 120292008-01-19 Robert Millan <rmh@aybabtu.com>
12030
12031 PowerPC changes provided by Pavel Roskin.
12032
12033 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
12034 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
12035 don't rely on cmain() doing it.
12036 * kern/i386/ieee1275/startup.S (_start): Store %eax in
12037 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
12038
1210e168 120392008-01-16 Robert Millan <rmh@aybabtu.com>
12040
12041 * include/grub/i386/linuxbios/memory.h
12042 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
12043 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
12044 receive `table_header' as argument. Instead, probe for it in the
12045 known memory ranges where it can be present.
12046 (grub_available_iterate): Do not pass a fixed `table_header' address
12047 to grub_linuxbios_table_iterate().
12048
3d04eab8 120492008-01-15 Robert Millan <rmh@aybabtu.com>
12050
12051 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
12052 * conf/i386-ieee1275.rmk: New file.
12053 * include/grub/i386/ieee1275/console.h: Likewise.
12054 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
12055 * include/grub/i386/ieee1275/kernel.h: Likewise.
12056 * include/grub/i386/ieee1275/time.h: Likewise.
12057 * kern/i386/ieee1275/init.c: Likewise.
12058 * kern/i386/ieee1275/startup.S: Likewise.
12059
d1bc1b73 120602008-01-15 Robert Millan <rmh@aybabtu.com>
12061
12062 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
12063 when pointers are 32-bit (but still do set it to one when they are
12064 64-bit).
12065
66a65807 120662008-01-15 Robert Millan <rmh@aybabtu.com>
12067
12068 * include/grub/ieee1275/ieee1275.h
12069 (grub_ieee1275_get_integer_property): New function prototype.
12070
12071 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
12072 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 12073 grub_ieee1275_get_property() to handle endianness.
66a65807 12074
12075 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
12076 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 12077 where appropriate.
66a65807 12078 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
12079 (grub_map): Likewise.
12080 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
12081
a83ccafd 120822008-01-15 Bean <bean123ch@gmail.com>
12083
12084 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
12085 (grub_script_execute_cmdline): Reset grub_errno.
12086
12087 * normal/main.c (read_config_file): Reset grub_errno.
12088
12089 * normal/parse.y (script_init): New.
12090 (script): Move function and menuentry here.
12091 (delimiter): New.
12092 (command): Add delimiter at the end of command.
12093 (commands): Adjust to match the new command.
12094 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 12095 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 12096 (if): Use the new commands.
12097
12098 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
12099
df6ecfc6 121002008-01-15 Robert Millan <rmh@aybabtu.com>
12101
12102 * normal/menu.c (run_menu): Move timeout message from here ...
12103 (print_timeout): ... to here.
12104 (run_menu): Use print_timeout() once during initial draw to print
12105 the whole message, and again in every clock tick to update only
12106 the number of seconds.
12107
87ae25eb 121082008-01-15 Robert Millan <rmh@aybabtu.com>
12109
12110 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
12111 actual size of `available' from grub_ieee1275_get_property(), and
12112 restrict parsing to that bound.
12113
47bf09a4 121142008-01-15 Christian Franke <franke@computer.org>
12115
12116 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
12117 (argp_program_version): Remove variable.
12118 (argp_program_bug_address): Likewise.
12119 (options): Convert from struct argp_option to struct option.
12120 (struct arguments): Remove.
12121 (parse_opt): Remove.
12122 (usage): New function.
12123 (main): Replace struct args members by simple variables.
12124 Replace argp_parse() by getopt_long().
12125 Add switch to evaluate options.
12126 Add missing "(...)" around root_dev in prefix string.
12127
c86f1469 121282008-01-14 Robert Millan <rmh@aybabtu.com>
12129
12130 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
12131 for grub_ieee1275_exit(), in order to improve portability.
12132
e622c559 121332008-01-14 Robert Millan <rmh@aybabtu.com>
12134
12135 * util/grub.d/10_linux.in (prefix): Define.
12136 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
12137
44cb1ec8 121382008-01-13 Pavel Roskin <proski@gnu.org>
12139
12140 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
12141 grub_errno if no errors have been detected.
12142
1eb8c802 121432008-01-12 Robert Millan <rmh@aybabtu.com>
12144
12145 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
12146 (grub_util_get_dev_abstraction): New function prototype.
12147
12148 * util/getroot.c: Include `<grub/util/getroot.h>'
12149 (grub_util_get_grub_dev): Move detection of abstraction type to ...
12150 (grub_util_get_dev_abstraction): ... here (new function).
12151
12152 * util/grub-probe.c: Convert PRINT_* to an enum. Add
12153 `PRINT_ABSTRACTION'.
12154 (probe): Probe for abstraction type when requested.
12155 (main): Understand `--target=abstraction'.
12156
12157 * util/i386/efi/grub-install.in: Add abstraction module to core
12158 image when it is found to be necessary.
12159 * util/i386/pc/grub-install.in: Likewise.
12160 * util/powerpc/ieee1275/grub-install.in: Likewise.
12161
12162 * util/update-grub_lib.in (font_path): Return system path without
12163 converting to GRUB path.
12164 * util/update-grub.in: Convert system path returned by font_path()
12165 to a GRUB path. Use `grub-probe -t abstraction' to determine what
12166 abstraction module is needed for loading fonts (if any). Export
12167 that as `GRUB_PRELOAD_MODULES'.
12168 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
12169 insmod commands).
12170
52bd3de9 121712008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
12172
12173 Remove some unused code from reiserfs.
f19dbdb7 12174
52bd3de9 12175 * fs/reiserfs.c (struct grub_reiserfs_key)
12176 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
12177 (struct grub_reiserfs_node_body): Removed.
12178 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12179 Likewise.
12180 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12181 Likewise.
12182 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12183 Likewise.
12184 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12185 Likewise.
12186 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12187 Likewise.
12188 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
12189 Likewise.
12190 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12191 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12192 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12193
2f80039d 121942008-01-10 Robert Millan <rmh@aybabtu.com>
12195
12196 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
12197 Determines if a file is garbage left by packaging systems, etc.
12198 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
12199 for processing /etc/grub.d scripts.
12200 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
12201 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
12202 as a condition for processing Linux images.
12203
87888032 122042008-01-10 Pavel Roskin <proski@gnu.org>
12205
12206 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
12207 to compile reiserfs.c on PowerPC.
12208
7e54fced 122092008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 12210
12211 * kern/device.c (grub_device_iterate): Do not abort device iteration
12212 when one of the devices cannot be opened.
12213 * kern/disk.c (grub_disk_open): Do not account previous failures of
12214 unrelated functions when grub_errno is checked for.
12215
5aa541e6 122162008-01-08 Robert Millan <rmh@aybabtu.com>
12217
12218 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
12219 `! grub_linux_is_bzimage', change order of address comparison to make
12220 it more intuitive, and improve "too big zImage" error message.
12221
7076340d 122222008-01-08 Robert Millan <rmh@aybabtu.com>
12223
12224 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
12225 `$(update-grub_DATA)'.
12226 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
12227 targets.
12228
9ca70333 122292008-01-07 Robert Millan <rmh@aybabtu.com>
12230
12231 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
12232 which instruction is modified by grub-setup during installation
12233 (since it wasn't obvious by only looking at this file).
12234
38ccf575 122352008-01-07 Robert Millan <rmh@aybabtu.com>
12236
12237 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
12238 listing actual TODO items.
12239
f5db4291 122402008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12241
868967cf 12242 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
12243 correctly.
12244 (grub_reiserfs_get_key_offset): Likewise.
12245 (grub_reiserfs_set_key_offset): Likewise.
12246 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 12247 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 12248
12249 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
12250 better to remove the bitfield version completely.
f19dbdb7 12251
868967cf 122522008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12253
f5db4291 12254 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
12255 allocated from the heap, due to the fshelp implementation.
12256 (grub_reiserfs_dir): Free NODE, due to the same reason.
12257
492e6d9d 122582008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12259
12260 Mostly from Vincent Pelletier:
f19dbdb7 12261
492e6d9d 12262 * fs/reiserfs.c: New file.
f19dbdb7 12263
492e6d9d 12264 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
12265 (reiserfs_mod_SOURCES): New variable.
12266 (reiserfs_mod_CFLAGS): Likewise.
12267 (reiserfs_mod_LDFLAGS): Likewise.
12268
12269 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
12270 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
12271 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
12272 normal/color.c.
12273
9ce3e7c1 122742008-01-06 Robert Millan <rmh@aybabtu.com>
12275
12276 * normal/color.c: Remove `<grub/env.h>'.
12277
f3b58148 122782008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
12279
12280 * include/grub/normal.h: Include <grub/env.h>.
12281
7ac3bcfa 122822008-01-05 Robert Millan <rmh@aybabtu.com>
12283
12284 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
12285 usage example with `(hd0,1)'.
fb358190 12286 Reported by Samuel Thibault.
7ac3bcfa 12287
c8ee99d7 122882008-01-05 Robert Millan <rmh@aybabtu.com>
12289
12290 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
12291 (grub_linux_boot_zimage): Rename to ...
12292 (grub_linux_boot): ... this.
12293 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
12294 (grub_linux_boot_zimage): Conditionalize zImage copy.
12295
12296 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
12297 (grub_linux_boot_bzimage): Remove prototype.
12298 (grub_linux_boot_zimage): Rename to ...
12299 (grub_linux_boot): ... this.
12300
12301 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
12302 (grub_linux_boot): Remove function.
12303
0ece25b1 123042008-01-05 Robert Millan <rmh@aybabtu.com>
12305
12306 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
12307 (grub_env_write_color_highlight): Likewise.
12308 (grub_wait_after_message): Likewise.
12309
12310 * normal/color.c: New file.
12311
12312 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12313 (normal_mod_DEPENDENCIES): Likewise.
12314
12315 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12316 (normal_mod_DEPENDENCIES): Likewise.
12317
12318 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12319 (normal_mod_DEPENDENCIES): Likewise.
12320
12321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12322 (normal_mod_DEPENDENCIES): Likewise.
12323
12324 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
12325 for waiting after a message is printed.
12326 * normal/main.c (read_config_file): Likewise.
12327 (grub_normal_init): Register grub_env_write_color_normal() and
12328 grub_env_write_color_highlight() hooks. Mark `color_normal' and
12329 `color_highlight' variables as global.
12330
12331 * normal/menu.c (grub_wait_after_message): New function.
12332 (grub_color_menu_normal): New variable. Replaces ...
12333 (GRUB_COLOR_MENU_NORMAL): ... this macro.
12334 (grub_color_menu_highlight): New variable. Replaces ...
12335 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
12336 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
12337 `GRUB_TERM_COLOR_STANDARD'.
12338 (print_message): Use `grub_setcolorstate' to reload colors. Rename
12339 `normal_code' and `highlight_code' to `old_color_normal' and
12340 `old_color_highlight', respectively.
12341 (grub_menu_init_page): Update colors when drawing the menu, based on
12342 `menu_color_normal' and `menu_color_highlight' variables.
12343 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
12344 a message is printed.
12345
182dd4e5 123462008-01-05 Robert Millan <rmh@aybabtu.com>
12347
12348 * kern/env.c (grub_env_context_open): Propagate hooks for global
12349 variables to new context.
12350
12351 * kern/main.c (grub_set_root_dev): Export `root' variable.
12352
ddf8f6ad 123532008-01-05 Robert Millan <rmh@aybabtu.com>
12354
12355 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 12356 discs unconditionally, since udev and others have options to provide
ddf8f6ad 12357 them.
12358
d8b43d9b 123592008-01-05 Robert Millan <rmh@aybabtu.com>
12360
12361 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
12362
2bff2de3 123632008-01-04 Christian Franke <franke@computer.org>
12364
12365 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
12366 of eisa_mmap.
12367
97eab917 123682008-01-03 Pavel Roskin <proski@gnu.org>
12369
12370 * kern/i386/linuxbios/init.c: Put "void" to all function
12371 declarations with no arguments.
12372 * kern/powerpc/ieee1275/init.c: Likewise.
12373 * term/i386/pc/at_keyboard.c: Likewise.
12374 * term/i386/pc/vga_text.c: Likewise.
12375 * util/grub-mkdevicemap.c: Likewise.
12376
b9416d00 123772008-01-02 Robert Millan <rmh@aybabtu.com>
12378
12379 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
12380 message when loaded image is out of bounds.
12381 (grub_multiboot_load_elf64): Likewise.
12382
92695df9 123832008-01-02 Pavel Roskin <proski@gnu.org>
12384
12385 * util/grub.d/10_linux.in: Try version without ".old" when
12386 looking for initrd. It's better to use initrd from the newer
12387 kernel of the same version than no initrd at all.
12388
d98d9cad 123892008-01-01 Robert Millan <rmh@aybabtu.com>
12390
12391 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
12392
dbfdce36 123932008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
12394
f19dbdb7 12395 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 12396 grub_video_get_active_render_target.
12397 (grub_video_adapter): Added unmap_color and get_active_render_target.
12398
f19dbdb7 12399 * video/video.c: Added grub_video_unmap_color and
dbfdce36 12400 grub_video_get_active_render_target.
12401 (grub_video_get_info): Changed method to accept NULL pointer as an
12402 argument to allow detection of active video adapter.
12403
12404 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
12405 grub_video_vbe_unmap_color_int.
12406 Added grub_video_vbe_unmap_color and
12407 grub_video_vbe_get_active_render_target.
12408 (grub_video_vbe_adapter): Added unmap_color and
12409 get_active_render_target.
12410
f19dbdb7 12411 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 12412 with grub_video_vbe_unmap_color_int.
12413
12414 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
12415 (DEFAULT_NORMAL_COLOR): Likewise.
12416 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
12417 (DEFAULT_FG_COLOR): Removed.
12418 (DEFAULT_BG_COLOR): Likewise.
12419 (DEFAULT_CURSOR_COLOR): Changed value.
12420 (grub_virtual_screen): Added standard_color_setting,
12421 normal_color_setting, highlight_color_setting and term_color.
12422 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
12423 (bitmap_width): Added.
12424 (bitmap_height): Likewise.
12425 (bitmap): Likewise.
12426 (set_term_color): Likewise.
12427 (grub_virtual_screen_setup): Changed to use new terminal coloring
12428 settings.
12429 (grub_gfxterm_init): Added init for bitmap.
12430 (grub_gfxterm_fini): Added destroy for bitmap.
12431 (redraw_screen_rect): Updated to use background bitmap and new
12432 terminal coloring.
12433 (scroll_up): Added optimization for case when there is no bitmap.
12434 (grub_gfxterm_cls): Fixed to use correct background color.
12435 (grub_virtual_screen_setcolorstate): Changed to use new terminal
12436 coloring.
12437 (grub_virtual_screen_setcolor): Likewise.
12438 (grub_virtual_screen_getcolor): Added.
12439 (grub_gfxterm_background_image_cmd): Likewise.
12440 (grub_video_term): Added setcolor and getcolor.
12441 (MOD_INIT): Added registration of background_image command.
12442 (MOD_TERM): Added unregistration for background_image command.
12443
c3c20931 124442007-12-30 Pavel Roskin <proski@gnu.org>
12445
12446 * loader/multiboot_loader.c: Fix multiboot command
12447 unregistration. Fix all typos in the word "multiboot".
12448
df266716 124492007-12-29 Pavel Roskin <proski@gnu.org>
94239199 12450
12451 * util/grub.d/10_linux.in: Refactor search for initrd. Add
12452 support for initrd names used in Fedora.
12453
fc6e896c 124542007-12-26 Bean <bean123ch@gmail.com>
12455
12456 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
12457 (cpio_mod_SOURCES): New variable.
12458 (cpio_mod_CFLAGS): Likewise.
12459 (cpio_mod_LDFLAGS): Likewise.
12460
12461 * fs/cpio.c: New file.
12462
12463 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
12464
12465 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12466
12467 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12468
12469 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12470
533110ad 124712007-12-25 Robert Millan <rmh@aybabtu.com>
12472
12473 * include/grub/term.h (struct grub_term): Add `getcolor' function.
12474 (grub_getcolor): New function.
12475
12476 * kern/term.c (grub_getcolor): New function.
12477 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
12478 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
12479 (print_entry): Set normal and highlight colors to
12480 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
12481 respectively, before printing and restore them to old
12482 values afterwards.
12483 (grub_menu_init_page): Likewise. Fill an additional colored space
12484 that would otherwise be left blank.
12485
12486 * term/efi/console.c (grub_console_getcolor): New function.
12487 (struct grub_console_term.getcolor): New variable.
12488 * term/i386/pc/console.c (grub_console_getcolor): New function.
12489 (struct grub_console_term.getcolor): New variable.
12490 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
12491 (struct grub_console_term.getcolor): New variable.
12492
12493 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
12494 (struct grub_console_term.setcolor): Remove variable.
12495 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
12496 (struct grub_console_term.setcolor): Remove variable.
12497 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
12498 (struct grub_console_term.setcolor): Remove variable.
12499 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
12500 (struct grub_console_term.setcolor): Remove variable.
12501
4931827f 125022007-12-25 Robert Millan <rmh@aybabtu.com>
12503
12504 * configure.ac: Search for possible unifont.hex locations, and
12505 define UNIFONT_HEX if found.
12506
12507 * Makefile.in (UNIFONT_HEX): Define variable.
12508 (DATA): Rename to ...
12509 (PKGLIB): ... this. Update all users.
12510 (PKGDATA): New variable.
12511 (pkgdata_IMAGES): Rename to ...
12512 (pkglib_IMAGES): ... this. Update all users.
12513 (pkgdata_MODULES): Rename to ...
12514 (pkglib_MODULES): ... this. Update all users.
12515 (pkgdata_PROGRAMS): Rename to ...
12516 (pkglib_PROGRAMS): ... this. Update all users.
12517 (pkgdata_DATA): Rename to ...
12518 (pkglib_DATA): ... this. Update all users.
12519 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
12520 (unicode.pff, ascii.pff): New rules.
12521 (all-local): Add `$(PKGDATA)' dependency.
12522 (install-local): Process `$(PKGDATA)'.
12523
12524 * util/update-grub_lib.in (font_path): Search for *.pff files in
12525 a few more locations, including `${pkgdata}'.
12526
57e57e31 125272007-12-23 Robert Millan <rmh@aybabtu.com>
12528
12529 Patch from Bean <bean123ch@gmail.com>:
12530 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
12531 `size'.
12532
4bc72aa9 125332007-12-21 Bean <bean123ch@gmail.com>
12534
12535 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
12536 (ntfscomp_mod_SOURCES): New variable.
12537 (ntfscomp_mod_CFLAGS): Likewise.
12538 (ntfscomp_mod_LDFLAGS): Likewise.
12539
12540 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
12541 (grub_probe_SOURCES): Likewise.
12542 (grub_emu_SOURCES): Likewise.
12543
12544 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12545 (grub_emu_SOURCES): Likewise.
12546
12547 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12548 (grub_emu_SOURCES): Likewise.
12549
12550 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12551 (grub_emu_SOURCES): Likewise.
12552
12553 * fs/ntfs.c (grub_ntfscomp_func): New variable.
12554 (read_run_list): Renamed to grub_ntfs_read_run_list.
12555 (decomp_nextvcn): Moved to ntfscomp.c.
12556 (decomp_getch): Likewise.
12557 (decomp_get16): Likewise.
12558 (decomp_block): Likewise.
12559 (read_block): Likewise.
12560 (read_data): Partially moved to ntfscomp.c.
12561 (fixup): Change unsigned to grub_uint16_t.
12562 (read_mft): Change unsigned long to grub_uint32_t.
12563 (read_attr): Likewise.
12564 (read_data): Likewise.
12565 (read_run_data): Likewise.
12566 (read_run_list): Likewise.
12567 (read_mft): Likewise.
12568
12569 * fs/ntfscomp.c: New file.
12570
12571 * include/grub/ntfs.h: New file.
12572
af680a87 125732007-12-16 Robert Millan <rmh@aybabtu.com>
12574
12575 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
12576 IDE disk check, since Linux is known to support 20 IDE disks.
12577 Reported by Colin Watson.
12578
84be7599 125792007-12-15 Bean <bean123ch@gmail.com>
12580
12581 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
12582 (lnxboot_img_SOURCES): New variable.
12583 (lnxboot_img_ASFLAGS): Likewise.
12584 (lnxboot_img_LDFLAGS): Likewise.
12585
12586 * boot/i386/pc/lnxboot.S: New file.
12587
6af9db01 125882007-11-24 Pavel Roskin <proski@gnu.org>
12589
12590 * configure.ac: Test if '--build-id=none' is supported by the
12591 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
12592 objcopy to generate incorrect binary files (binutils
12593 2.17.50.0.18-1 as shipped by Fedora 8).
12594 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
12595 linking, so that build ID doesn't break the test.
12596
7361cfe6 125972007-11-24 Pavel Roskin <proski@gnu.org>
12598
12599 * include/grub/i386/time.h: use "void" in the argument list
12600 of grub_cpu_idle().
12601 * include/grub/powerpc/time.h: Likewise.
12602 * include/grub/sparc64/time.h: Likewise.
12603
1593e10c 126042007-11-18 Christian Franke <franke@computer.org>
12605
12606 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12607 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12608 This fixes the problem that function keys did not work in grub-emu.
12609
3b8db1a8 126102007-11-18 Christian Franke <franke@computer.org>
12611
12612 * disk/host.c (grub_host_open): Remove attribute unused from
12613 name parameter. Add check for "host". This fixes the problem
12614 that grub-emu does not find partitions.
12615
2e29408d 126162007-11-18 Christian Franke <franke@computer.org>
12617
12618 * util/hostfs.c (is_dir): New function.
12619 (grub_hostfs_dir): Handle missing dirent.d_type case.
12620 (grub_hostfs_read): Add missing fseek().
12621 (grub_hostfs_label): Clear label pointer. This fixes a crash
12622 of grub-emu on "ls (host)".
12623
398cd047 126242007-11-18 Christian Franke <franke@computer.org>
12625
12626 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12627 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12628 to 64 bit boundary by default.
12629
c405c391 126302007-11-18 Bean <bean123ch@gmail.com>
12631
12632 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12633 (hexdump_mod_SOURCES): New variable.
12634 (hexdump_mod_CFLAGS): Likewise.
12635 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 12636
c405c391 12637 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12638
12639 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12640
12641 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12642
12643 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12644
12645 * include/grub/hexdump.h: New file.
12646
12647 * commands/hexdump.c: New file.
12648
5cced7fd 126492007-11-10 Robert Millan <rmh@aybabtu.com>
12650
12651 * commands/i386/pc/play.c (beep_off): Switch order of arguments
12652 in grub_outb() calls.
12653 (beep_on): Likewise.
12654
8b714eb0 126552007-11-10 Christian Franke <franke@computer.org>
12656
12657 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
12658 (grub_menu_run): Likewise.
12659
ce0f1839 126602007-11-10 Robert Millan <rmh@aybabtu.com>
12661
12662 * include/grub/i386/efi/machine.h: New file.
12663 * include/grub/i386/linuxbios/machine.h: Likewise.
12664 * include/grub/i386/pc/machine.h: Likewise.
12665 * include/grub/powerpc/ieee1275/machine.h: Likewise.
12666 * include/grub/sparc64/ieee1275/machine.h: Likewise.
12667
12668 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
12669 (serial_hw_io_addr): New variable.
12670 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
12671 instead of `(unsigned short *) 0x400'.
12672
270c237d 126732007-11-10 Bean <bean123ch@gmail.com>
12674
12675 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
12676
a87783bf 126772007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12678
12679 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
12680 (vga_mod_SOURCES): Added.
12681 (vga_mod_CFLAGS): Likewise.
12682 (vga_mod_LDFLAGS): Likewise.
12683
12684 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
12685 grub_outb() calls.
12686 (set_map_mask): Likewise.
12687 (set_read_map): Likewise.
12688 (set_read_address): Likewise.
12689 (vga_font): Removed variable.
12690 (get_vga_glyph): Removed function.
12691 (invalidate_char): Likewise.
12692 (write_char): Changed to use grub_font_get_glyph() for font
12693 information.
12694 (grub_vga_putchar): Likewise.
12695 (grub_vga_getcharwidth): Likewise.
12696
6433b448 126972007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12698
12699 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
12700 flags.
12701 (pxeboot_img_LDFLAGS): Likewise.
12702 (diskboot_img_LDFLAGS): Likewise.
12703 (kernel_img_LDFLAGS): Likewise.
12704
49178511 127052007-11-06 Robert Millan <rmh@aybabtu.com>
12706
12707 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
12708 in grub_outb() calls.
12709 (serial_hw_init): Likewise.
12710
53b052de 127112007-11-05 Robert Millan <rmh@aybabtu.com>
12712
12713 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
12714 spaces. Skip non-regular files.
12715
5ab33bba 127162007-11-05 Robert Millan <rmh@aybabtu.com>
12717
12718 * kern/disk.c (grub_disk_firmware_fini)
12719 (grub_disk_firmware_is_tainted): New variables.
12720
12721 * include/grub/disk.h (grub_disk_firmware_fini)
12722 (grub_disk_firmware_is_tainted): Likewise.
12723
12724 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
12725 (grub_disk_biosdisk_fini): ... to here.
12726 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
12727 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
12728 is set. Register grub_disk_biosdisk_fini() in
12729 `grub_disk_firmware_fini'.
12730
12731 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
12732 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
12733 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
12734 to finish existing firmware disk interface.
12735
12736 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
12737 (ata_mod_SOURCES): New variable.
12738 (ata_mod_CFLAGS): Likewise.
12739 (ata_mod_LDFLAGS): Likewise.
12740
0149ab7c 127412007-11-05 Robert Millan <rmh@aybabtu.com>
12742
12743 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
12744 (grub_ata_wait): Reimplement using grub_millisleep().
12745
12746 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
12747 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
12748
be7ac41e 127492007-11-03 Marco Gerards <marco@gnu.org>
12750
12751 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
12752 (CRTC_ADDR_PORT): New macro.
12753 (CRTC_DATA_PORT): Likewise.
12754 (CRTC_CURSOR): Likewise.
12755 (CRTC_CURSOR_ADDR_HIGH): Likewise.
12756 (CRTC_CURSOR_ADDR_LOW): Likewise.
12757 (update_cursor): New function.
12758 (grub_console_real_putchar): Call `update_cursor'.
12759 (grub_console_gotoxy): Likewise.
12760 (grub_console_cls): Set the default color when clearing the
12761 screen.
12762 (grub_console_setcursor): Implemented.
12763
bb06ab2e 127642007-11-03 Marco Gerards <marco@gnu.org>
12765
12766 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
12767 become activate.
12768 (grub_ata_pio_write): Likewise.
12769
12770 (grub_atapi_identify): Wait after issuing an ATA command.
12771 (grub_atapi_packet): Likewise.
12772 (grub_ata_identify): Likewise.
12773 (grub_ata_readwrite): Likewise.
12774
cf8f780b 127752007-11-03 Marco Gerards <marco@gnu.org>
12776
12777 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
12778 (grub_ata_pio_write): Likewise.
12779 (grub_ata_readwrite): Use `grub_error', instead of
12780 returning `grub_errno'.
12781
ed649e54 127822007-11-03 Marco Gerards <marco@gnu.org>
12783
12784 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
12785 grub_ata_pio_write once for every single sector, instead of for
12786 multiple sectors.
12787
ca25d8f0 127882007-10-31 Robert Millan <rmh@aybabtu.com>
12789
12790 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
12791
12792 * conf/i386-linuxbios.rmk: New file.
12793
12794 * kern/i386/pc/hardware.c: Likewise.
12795 * term/i386/pc/at_keyboard.c: Likewise.
12796 * term/i386/pc/vga_text.c: Likewise.
12797
12798 * include/grub/i386/linuxbios/boot.h: Likewise.
12799 * include/grub/i386/linuxbios/console.h: Likewise.
12800 * include/grub/i386/linuxbios/init.h: Likewise.
12801 * include/grub/i386/linuxbios/kernel.h: Likewise.
12802 * include/grub/i386/linuxbios/loader.h: Likewise.
12803 * include/grub/i386/linuxbios/memory.h: Likewise.
12804 * include/grub/i386/linuxbios/serial.h: Likewise.
12805 * include/grub/i386/linuxbios/time.h: Likewise.
12806
12807 * kern/i386/linuxbios/init.c: Likewise.
12808 * kern/i386/linuxbios/startup.S: Likewise.
12809 * kern/i386/linuxbios/table.c: Likewise.
12810
e911ecc1 128112007-10-31 Marco Gerards <marco@gnu.org>
12812
12813 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
12814 (ata_mod_SOURCES): New variable.
12815 (ata_mod_CFLAGS): Likewise.
12816 (ata_mod_LDFLAGS): Likewise.
12817
12818 * disk/ata.c: New file.
12819
12820 * include/grub/disk.h (grub_disk_dev_id): Add
12821 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 12822
7f66d0e0 128232007-10-31 Robert Millan <rmh@aybabtu.com>
12824
12825 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
12826 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
12827
12828 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
12829 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
12830
12831 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
12832 `<grub/types.h>'.
12833
12834 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
12835
5cd7dd46 128362007-10-27 Robert Millan <rmh@aybabtu.com>
12837
3236ca65 12838 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 12839
2ebfc90f 128402007-10-22 Robert Millan <rmh@aybabtu.com>
12841
12842 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
12843 `"../realmode.S"'.
12844 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
12845
73fcb0f3 128462007-10-22 Robert Millan <rmh@aybabtu.com>
12847
12848 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
12849 (pkgdata_MODULES): Add `biosdisk.mod'.
12850 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
12851 variables.
12852
12853 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
12854 (grub_biosdisk_init): Replace with ...
12855 (GRUB_MOD_INIT(biosdisk)): ... this.
12856 (grub_biosdisk_fini): Replace with ...
12857 (GRUB_MOD_FINI(biosdisk)): ... this.
12858
12859 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
12860 (grub_machine_init): Remove call to grub_biosdisk_init().
12861 (grub_machine_fini): Remove call to grub_machine_fini().
12862
12863 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
12864
3381d274 128652007-10-22 Robert Millan <rmh@aybabtu.com>
12866
12867 * include/grub/time.h: New file.
12868 * include/grub/i386/time.h: Likewise.
12869 * include/grub/powerpc/time.h: Likewise.
12870 * include/grub/sparc64/time.h: Likewise.
12871
12872 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
12873 instances to ...
12874 (KERNEL_MACHINE_TIME_HEADER): ... this.
12875 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12876 instances to ...
12877 (KERNEL_MACHINE_TIME_HEADER): ... this.
12878 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12879 instances to ...
12880 (KERNEL_MACHINE_TIME_HEADER): ... this.
12881
12882 * kern/i386/efi/init.c: Include `<grub/time.h>'.
12883 (grub_millisleep): New function.
12884 * kern/i386/pc/init.c: Include `<grub/time.h>'.
12885 (grub_millisleep): New function.
12886 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
12887 Remove `grub/machine/time.h' include.
12888 (grub_millisleep): New function.
12889 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
12890 Remove `grub/machine/time.h' include.
12891 (grub_millisleep): New function.
12892
12893 * include/grub/misc.h (grub_div_roundup): New function.
12894
12895 * kern/misc.c: Include `<grub/time.h>'.
12896 (grub_millisleep_generic): New function.
12897
12898 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
12899 Add `time.h'.
12900 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
12901 Add `time.h'.
12902 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
12903 `machine/time.h'. Add `time.h'.
12904 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12905
a39a0312 129062007-10-21 Robert Millan <rmh@aybabtu.com>
12907
12908 * include/grub/misc.h (grub_max): New function.
12909
2aad70e2 129102007-10-21 Robert Millan <rmh@aybabtu.com>
12911
12912 * util/misc.c (grub_util_info): Call fflush() before returning.
12913
54b71c4b 129142007-10-20 Robert Millan <rmh@aybabtu.com>
12915
12916 * genmk.rb (Image): Copy `extra_flags' from here ...
12917 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
12918
12919 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12920 to `argc' and `args' arguments.
12921
a979f513 129222007-10-17 Robert Millan <rmh@aybabtu.com>
12923
12924 * kern/i386/loader.S: New file.
12925
12926 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12927 * kern/i386/loader.S (grub_linux_prot_size)... to here.
12928 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12929 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12930 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12931 * kern/i386/loader.S (grub_linux_real_addr)... to here.
12932 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12933 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12934 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12935 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12936 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12937 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12938 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12939 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12940
12941 * kern/i386/realmode.S: New file.
12942
12943 * kern/i386/pc/startup.S (protstack): Moved from here ...
12944 * kern/i386/realmode.S (protstack)... to here.
12945 * kern/i386/pc/startup.S (gdt): Moved from here ...
12946 * kern/i386/realmode.S (gdt)... to here.
12947 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12948 * kern/i386/realmode.S (prot_to_real)... to here.
12949
12950 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12951 `kern/i386/realmode.S'.
12952
825fc8fd 129532007-10-17 Robert Millan <rmh@aybabtu.com>
12954
12955 * include/grub/i386/loader.h: New file.
12956
12957 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12958 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12959 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12960 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12961 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12962 * include/grub/i386/loader.h (grub_linux_prot_size)
12963 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12964 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12965 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12966 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12967
12968 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12969
e179b2f4 129702007-10-15 Robert Millan <rmh@aybabtu.com>
12971
12972 * normal/misc.c (grub_normal_print_device_info): Do not probe for
12973 filesystem when dev->disk is unset.
12974 Do probe for filesystem even when dev->disk->has_partitions is set.
12975 In case a filesystem is found, always report it.
12976 In case it isn't, if dev->disk->has_partitions is set, report that
12977 a partition table was found instead of reporting that no filesystem
12978 could be identified.
12979
5db82af6 129802007-10-12 Robert Millan <rmh@aybabtu.com>
12981
12982 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12983 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12984
68f6ac74 12985 * include/grub/types.h (grub_host_to_target16): New macro.
12986 (grub_host_to_target32): Likewise.
12987 (grub_host_to_target64): Likewise.
12988 (grub_target_to_host16): Likewise.
12989 (grub_target_to_host32): Likewise.
12990 (grub_target_to_host64): Likewise.
5db82af6 12991
12992 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12993 Renamed from to ...
12994 (GRUB_MOD_ALIGN): ...this. Update all users.
12995
68f6ac74 12996 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12997 grub_host_to_target32.
12998 Replace grub_be_to_cpu32 with grub_target_to_host32.
12999 (load_modules): Likewise.
13000 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
13001 Replace grub_be_to_cpu32 with grub_target_to_host32.
13002 Replace grub_cpu_to_be16 with grub_host_to_target16.
13003 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 13004
3cf497cc 130052007-10-12 Robert Millan <rmh@aybabtu.com>
13006
13007 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
13008 * util/elf/grub-mkimage.c: ... here.
13009
13010 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
13011 `util/powerpc/ieee1275/grub-mkimage.c'.
13012
c8cc3692 130132007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 13014
c8cc3692 13015 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
13016 and make it easier to figure out.
13017 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
13018 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
13019 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
13020 leave us with less than HEAP_MIN_SIZE total heap.
13021 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 13022
5c58b791 130232007-10-03 Robert Millan <rmh@aybabtu.com>
13024
13025 * include/grub/i386/io.h: New file.
13026 * commands/i386/pc/play.c (inb): Removed.
13027 (outb): Removed.
13028 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13029 with grub_outb().
afcd2ef8 13030 * term/i386/pc/serial.c (inb): Removed.
13031 (outb): Removed.
13032 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13033 with grub_outb().
13034 * term/i386/pc/vga.c (inb): Removed.
13035 (outb): Removed.
13036 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13037 with grub_outb().
5c58b791 13038
1a477ed6 130392007-10-02 Robert Millan <rmh@aybabtu.com>
13040
13041 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
13042 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13043 Reported by Marcin Kurek.
13044
6b5d80fa 130452007-09-07 Robert Millan <rmh@aybabtu.com>
13046
13047 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
13048 SmartFirmware version updates (as released by Sven Luther), and avoid
13049 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
13050 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
13051 known broken.
13052
5618afbf 130532007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13054
13055 From Hitoshi Ozeki:
13056 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
13057 when merging two regions.
13058
6139dcd9 130592007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13060
508e39ee 13061 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
13062 * normal/completion.c (grub_normal_do_completion): Likewise.
13063 Reported by Hitoshi Ozeki.
13064
130652007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13066
6139dcd9 13067 Do not use devices at boot in chainloading.
f19dbdb7 13068
6139dcd9 13069 * loader/i386/pc/chainloader.c (boot_drive): New variable.
13070 (boot_part_addr): Likewise.
13071 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
13072 with BOOT_DRIVE and BOOT_PART_ADDR.
13073 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
13074 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
13075
38da6516 130762007-08-29 Robert Millan <rmh@aybabtu.com>
13077
13078 Patch from Simon Peter <dn.tlp@gmx.net>:
13079 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
13080 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
13081 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
13082 util/i386/pc/grub-setup.c_DEPENDENCIES.
13083 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
13084 util/grub-probe.c_DEPENDENCIES.
13085 * conf/powerpc-ieee1275.rmk: Likewise.
13086
29d0928c 130872007-08-28 Robert Millan <rmh@aybabtu.com>
13088
13089 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
13090 to tell grub-mkdevicemap how to name devices.
13091 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
13092 feature).
13093
13094 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
13095 util/i386/get_disk_name.c.
13096 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
13097 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
13098 util/ieee1275/get_disk_name.c.
13099
13100 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
13101
13102 * DISTLIST: Add util/i386/get_disk_name.c and
13103 util/ieee1275/get_disk_name.c.
13104
13105 * util/grub-mkdevicemap.c: Replace device naming logic with
13106 grub_util_get_disk_name() calls.
13107
5a0d3cca 131082007-08-20 Robert Millan <rmh@aybabtu.com>
13109
13110 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
13111 (so that it works for both plural and singular quantities).
13112
8b72db2f 131132007-08-05 Robert Millan <rmh@aybabtu.com>
13114
13115 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
13116 so that [xz] isn't taken into account when determining order.
13117
352466bf 131182007-08-02 Marco Gerards <marco@gnu.org>
13119
13120 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
13121 `include/multiboot2.h', `include/grub/elfload.h',
13122 `include/multiboot.h', `include/grub/multiboot.h',
13123 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
13124 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
13125 `kern/elf.c', `loader/multiboot_loader.c',
13126 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
13127 `loader/i386/pc/multiboot2.c',
13128 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
13129 `util/i386/pc/grub-mkrescue.in'. Remove
13130 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
13131 `include/grub/i386/pc/util/biosdisk.h' and
13132 `include/grub/powerpc/ieee1275/multiboot.h'.
13133
8f096014 131342007-08-02 Bean <bean123ch@gmail.com>
13135
13136 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
13137 (ntfs_mod_SOURCES): New variable.
13138 (ntfs_mod_CFLAGS): Likewise.
13139 (ntfs_mod_LDFLAGS): Likewise.
13140
13141 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
13142 (grub_probe_SOURCES): Likewise.
13143 (grub_emu_SOURCES): Likewise.
13144
13145 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13146 (grub_emu_SOURCES): Likewise.
13147
13148 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13149 (grub_emu_SOURCES): Likewise.
f19dbdb7 13150
8f096014 13151 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
13152
13153 * fs/ntfs.c: New file.
13154
9959f7db 131552007-08-02 Bean <bean123ch@gmail.com>
13156
13157 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
13158
13159 * file.h (grub_file): Likewise.
13160
13161 * fshelp.h (grub_fshelp_read_file): Likewise.
13162
13163 * util/i386/pc/grub-setup.c (setup): Likewise.
13164 (save_first_sector): Likewise.
13165 (save_blocklists): Likewise.
f19dbdb7 13166
9959f7db 13167 * fs/affs.c (grub_affs_read_file): Likewise.
13168
13169 * fs/ext2.c (grub_ext2_read_file): Likewise.
13170
13171 * fs/fat.c (grub_fat_read_data): Likewise.
13172
13173 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
13174
13175 * fs/hfs.c (grub_hfs_read_file): Likewise.
13176
13177 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13178
13179 * fs/jfs.c (grub_jfs_read_file): Likewise.
13180
13181 * fs/minix.c (grub_minix_read_file): Likewise.
13182
13183 * fs/sfs.c (grub_sfs_read_file): Likewise.
13184
13185 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 13186
9959f7db 13187 * fs/xfs.c (grub_xfs_read_file): Likewise.
13188
13189 * command/blocklist.c (read_blocklist): Likewise.
13190 (print_blocklist): Likewise.
13191
0a203f83 131922007-08-02 Marco Gerards <marco@gnu.org>
13193
13194 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
13195 `util/hostfs.c'.
13196
13197 * disk/host.c: New file.
13198
13199 * util/hostfs.c: Likewise.
13200
13201 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
13202 return `GRUB_ERR_BAD_FS'.
13203 * fs/sfs.c (grub_sfs_mount): Likewise.
13204 * fs/xfs.c (grub_xfs_mount): Likewise.
13205
13206 * include/grub/disk.h (enum grub_disk_dev_id): Add
13207 `GRUB_DISK_DEVICE_HOST_ID'.
13208
13209 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
13210
e5dfe777 132112007-07-24 Jerone Young <jerone@gmail.com>
13212
f19dbdb7 13213 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 13214 modules for compilation.
13215 * conf/powerpc-ieee1275.rmk: Likewise.
13216
13217 * include/multiboot.h: Move multiboot definitions to one file. Rename
13218 many definitions to not get grub specific.
13219 * include/multiboot2.h: Create header with multiboot 2 definitions.
13220 * include/grub/multiboot.h: Header for grub specific function
13221 prototypes and definitions.
13222 * include/grub/multiboot2.h: Likewise.
13223 * include/grub/multiboot_loader.h: Likewise.
13224 * include/grub/i386/pc/multiboot.h: Removed.
13225 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
13226
13227 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
13228 and 2 to allow for one multiboot and module commands.
13229 * loader/multiboot2.c: Add multiboot2 functionality.
13230 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
13231 and definition names.
13232 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
13233 2 functions.
13234 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
13235 ieee1275 specific multiboot2 code.
13236
13237 * kern/i386/pc/startup.S: Change headers and definition names for
13238 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
13239
daf0f0ba 132402007-07-22 Robert Millan <rmh@aybabtu.com>
13241
13242 * geninitheader.sh: Process file specified in first parameter rather
13243 than hardcoding grub_modules_init.lst.
fe6b695a 13244 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 13245 than hardcoding grub_modules_init.h.
13246
13247 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
13248 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
13249 grub_probe_init.[ch] and grub_setup_init.[ch].
13250
13251 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
13252 grub_modules_init.h with grub_emu_init.h.
13253 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
13254 grub_probe_init.[ch] files.
13255 * conf/i386-efi.rmk: Likewise.
13256 * conf/i386-pc.rmk: Likewise.
13257 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
13258 grub_setup_init.[ch] files.
13259
13260 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
13261 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
13262 to initialize modules rather than a list of hardcoded functions.
13263 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
13264 grub_init_all() to initialize modules rather than a list of hardcoded
13265 functions.
13266
54cdc1cc 132672007-07-22 Robert Millan <rmh@aybabtu.com>
13268
13269 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
13270 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
13271
ad0686cc 132722007-07-22 Robert Millan <rmh@aybabtu.com>
13273
13274 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
13275 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
13276 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
13277 flag when running on SmartFirmware.
13278 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
13279 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
13280 was set.
13281
13282 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13283 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
13284 rather than decreasing it.
13285
13286 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
13287 there's not enough space to do it, fail in the same way as when it
13288 can't be done because there are no partitions.
13289
13290 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
13291 when nvsetenv failed.
13292
969c02ec 132932007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13294
13295 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
13296 because this rule is automatically generated.
13297 (grub-mkrescue): Removed for the same reason as above.
13298
5a79f472 132992007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13300
13301 Migrate to GNU General Public License Version 3.
f19dbdb7 13302
5a79f472 13303 * COPYING: Replaced with the plain text version of GPLv3.
13304
13305 * config.guess: Updated from gnulib.
13306 * config.sub: Likewise.
13307
13308 * geninit.sh: Output a GPLv3 copyright notice.
13309 * geninitheader.sh: Likewise.
13310 * genmodsrc.sh: Likewise.
13311 * gensymlist.sh.in: Likewise.
13312
13313 * boot/i386/pc/boot.S: Upgraded to GPLv3.
13314 * boot/i386/pc/diskboot.S: Likewise.
13315 * boot/i386/pc/pxeboot.S: Likewise.
13316 * commands/blocklist.c: Likewise.
13317 * commands/boot.c: Likewise.
13318 * commands/cat.c: Likewise.
13319 * commands/cmp.c: Likewise.
13320 * commands/configfile.c: Likewise.
13321 * commands/echo.c: Likewise.
13322 * commands/help.c: Likewise.
13323 * commands/ls.c: Likewise.
13324 * commands/search.c: Likewise.
13325 * commands/terminal.c: Likewise.
13326 * commands/test.c: Likewise.
13327 * commands/videotest.c: Likewise.
13328 * commands/i386/cpuid.c: Likewise.
13329 * commands/i386/pc/halt.c: Likewise.
13330 * commands/i386/pc/play.c: Likewise.
13331 * commands/i386/pc/reboot.c: Likewise.
13332 * commands/i386/pc/vbeinfo.c: Likewise.
13333 * commands/i386/pc/vbetest.c: Likewise.
13334 * commands/ieee1275/halt.c: Likewise.
13335 * commands/ieee1275/reboot.c: Likewise.
13336 * commands/ieee1275/suspend.c: Likewise.
13337 * disk/loopback.c: Likewise.
13338 * disk/lvm.c: Likewise.
13339 * disk/raid.c: Likewise.
13340 * disk/efi/efidisk.c: Likewise.
13341 * disk/i386/pc/biosdisk.c: Likewise.
13342 * disk/ieee1275/ofdisk.c: Likewise.
13343 * font/manager.c: Likewise.
13344 * fs/affs.c: Likewise.
13345 * fs/ext2.c: Likewise.
13346 * fs/fat.c: Likewise.
13347 * fs/fshelp.c: Likewise.
13348 * fs/hfs.c: Likewise.
13349 * fs/hfsplus.c: Likewise.
13350 * fs/iso9660.c: Likewise.
13351 * fs/jfs.c: Likewise.
13352 * fs/minix.c: Likewise.
13353 * fs/sfs.c: Likewise.
13354 * fs/ufs.c: Likewise.
13355 * fs/xfs.c: Likewise.
13356 * hello/hello.c: Likewise.
13357 * include/grub/acorn_filecore.h: Likewise.
13358 * include/grub/arg.h: Likewise.
13359 * include/grub/bitmap.h: Likewise.
13360 * include/grub/boot.h: Likewise.
13361 * include/grub/cache.h: Likewise.
13362 * include/grub/device.h: Likewise.
13363 * include/grub/disk.h: Likewise.
13364 * include/grub/dl.h: Likewise.
13365 * include/grub/elfload.h: Likewise.
13366 * include/grub/env.h: Likewise.
13367 * include/grub/err.h: Likewise.
13368 * include/grub/file.h: Likewise.
13369 * include/grub/font.h: Likewise.
13370 * include/grub/fs.h: Likewise.
13371 * include/grub/fshelp.h: Likewise.
13372 * include/grub/gzio.h: Likewise.
13373 * include/grub/hfs.h: Likewise.
13374 * include/grub/kernel.h: Likewise.
13375 * include/grub/loader.h: Likewise.
13376 * include/grub/lvm.h: Likewise.
13377 * include/grub/misc.h: Likewise.
13378 * include/grub/mm.h: Likewise.
13379 * include/grub/net.h: Likewise.
13380 * include/grub/normal.h: Likewise.
13381 * include/grub/parser.h: Likewise.
13382 * include/grub/partition.h: Likewise.
13383 * include/grub/pc_partition.h: Likewise.
13384 * include/grub/raid.h: Likewise.
13385 * include/grub/rescue.h: Likewise.
13386 * include/grub/script.h: Likewise.
13387 * include/grub/setjmp.h: Likewise.
13388 * include/grub/symbol.h: Likewise.
13389 * include/grub/term.h: Likewise.
13390 * include/grub/terminfo.h: Likewise.
13391 * include/grub/tparm.h: Likewise.
13392 * include/grub/types.h: Likewise.
13393 * include/grub/video.h: Likewise.
13394 * include/grub/efi/api.h: Likewise.
13395 * include/grub/efi/chainloader.h: Likewise.
13396 * include/grub/efi/console.h: Likewise.
13397 * include/grub/efi/console_control.h: Likewise.
13398 * include/grub/efi/disk.h: Likewise.
13399 * include/grub/efi/efi.h: Likewise.
13400 * include/grub/efi/pe32.h: Likewise.
13401 * include/grub/efi/time.h: Likewise.
13402 * include/grub/i386/linux.h: Likewise.
13403 * include/grub/i386/setjmp.h: Likewise.
13404 * include/grub/i386/types.h: Likewise.
13405 * include/grub/i386/efi/kernel.h: Likewise.
13406 * include/grub/i386/efi/loader.h: Likewise.
13407 * include/grub/i386/efi/time.h: Likewise.
13408 * include/grub/i386/pc/biosdisk.h: Likewise.
13409 * include/grub/i386/pc/boot.h: Likewise.
13410 * include/grub/i386/pc/chainloader.h: Likewise.
13411 * include/grub/i386/pc/console.h: Likewise.
13412 * include/grub/i386/pc/init.h: Likewise.
13413 * include/grub/i386/pc/kernel.h: Likewise.
13414 * include/grub/i386/pc/loader.h: Likewise.
13415 * include/grub/i386/pc/memory.h: Likewise.
13416 * include/grub/i386/pc/multiboot.h: Likewise.
13417 * include/grub/i386/pc/serial.h: Likewise.
13418 * include/grub/i386/pc/time.h: Likewise.
13419 * include/grub/i386/pc/vbe.h: Likewise.
13420 * include/grub/i386/pc/vbeblit.h: Likewise.
13421 * include/grub/i386/pc/vbefill.h: Likewise.
13422 * include/grub/i386/pc/vbeutil.h: Likewise.
13423 * include/grub/i386/pc/vga.h: Likewise.
13424 * include/grub/ieee1275/ieee1275.h: Likewise.
13425 * include/grub/ieee1275/ofdisk.h: Likewise.
13426 * include/grub/powerpc/libgcc.h: Likewise.
13427 * include/grub/powerpc/setjmp.h: Likewise.
13428 * include/grub/powerpc/types.h: Likewise.
13429 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
13430 * include/grub/powerpc/ieee1275/console.h: Likewise.
13431 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
13432 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
13433 * include/grub/powerpc/ieee1275/loader.h: Likewise.
13434 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
13435 * include/grub/powerpc/ieee1275/time.h: Likewise.
13436 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
13437 * include/grub/sparc64/libgcc.h: Likewise.
13438 * include/grub/sparc64/setjmp.h: Likewise.
13439 * include/grub/sparc64/types.h: Likewise.
13440 * include/grub/sparc64/ieee1275/console.h: Likewise.
13441 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13442 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13443 * include/grub/sparc64/ieee1275/time.h: Likewise.
13444 * include/grub/util/biosdisk.h: Likewise.
13445 * include/grub/util/getroot.h: Likewise.
13446 * include/grub/util/lvm.h: Likewise.
13447 * include/grub/util/misc.h: Likewise.
13448 * include/grub/util/raid.h: Likewise.
13449 * include/grub/util/resolve.h: Likewise.
13450 * io/gzio.c: Likewise.
13451 * kern/device.c: Likewise.
13452 * kern/disk.c: Likewise.
13453 * kern/dl.c: Likewise.
13454 * kern/elf.c: Likewise.
13455 * kern/env.c: Likewise.
13456 * kern/err.c: Likewise.
13457 * kern/file.c: Likewise.
13458 * kern/fs.c: Likewise.
13459 * kern/loader.c: Likewise.
13460 * kern/main.c: Likewise.
13461 * kern/misc.c: Likewise.
13462 * kern/mm.c: Likewise.
13463 * kern/parser.c: Likewise.
13464 * kern/partition.c: Likewise.
13465 * kern/rescue.c: Likewise.
13466 * kern/term.c: Likewise.
13467 * kern/efi/efi.c: Likewise.
13468 * kern/efi/init.c: Likewise.
13469 * kern/efi/mm.c: Likewise.
13470 * kern/i386/dl.c: Likewise.
13471 * kern/i386/efi/init.c: Likewise.
13472 * kern/i386/efi/startup.S: Likewise.
13473 * kern/i386/pc/init.c: Likewise.
13474 * kern/i386/pc/lzo1x.S: Likewise.
13475 * kern/i386/pc/startup.S: Likewise.
13476 * kern/ieee1275/ieee1275.c: Likewise.
13477 * kern/powerpc/cache.S: Likewise.
13478 * kern/powerpc/dl.c: Likewise.
13479 * kern/powerpc/ieee1275/cmain.c: Likewise.
13480 * kern/powerpc/ieee1275/crt0.S: Likewise.
13481 * kern/powerpc/ieee1275/init.c: Likewise.
13482 * kern/powerpc/ieee1275/openfw.c: Likewise.
13483 * kern/sparc64/cache.S: Likewise.
13484 * kern/sparc64/dl.c: Likewise.
13485 * kern/sparc64/ieee1275/init.c: Likewise.
13486 * kern/sparc64/ieee1275/openfw.c: Likewise.
13487 * loader/efi/chainloader.c: Likewise.
13488 * loader/efi/chainloader_normal.c: Likewise.
13489 * loader/i386/efi/linux.c: Likewise.
13490 * loader/i386/efi/linux_normal.c: Likewise.
13491 * loader/i386/pc/chainloader.c: Likewise.
13492 * loader/i386/pc/chainloader_normal.c: Likewise.
13493 * loader/i386/pc/linux.c: Likewise.
13494 * loader/i386/pc/linux_normal.c: Likewise.
13495 * loader/i386/pc/multiboot.c: Likewise.
13496 * loader/i386/pc/multiboot_normal.c: Likewise.
13497 * loader/powerpc/ieee1275/linux.c: Likewise.
13498 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13499 * normal/arg.c: Likewise.
13500 * normal/cmdline.c: Likewise.
13501 * normal/command.c: Likewise.
13502 * normal/completion.c: Likewise.
13503 * normal/execute.c: Likewise.
13504 * normal/function.c: Likewise.
13505 * normal/lexer.c: Likewise.
13506 * normal/main.c: Likewise.
13507 * normal/menu.c: Likewise.
13508 * normal/menu_entry.c: Likewise.
13509 * normal/misc.c: Likewise.
13510 * normal/parser.y: Likewise.
13511 * normal/script.c: Likewise.
13512 * normal/i386/setjmp.S: Likewise.
13513 * normal/powerpc/setjmp.S: Likewise.
13514 * normal/sparc64/setjmp.S: Likewise.
13515 * partmap/acorn.c: Likewise.
13516 * partmap/amiga.c: Likewise.
13517 * partmap/apple.c: Likewise.
13518 * partmap/gpt.c: Likewise.
13519 * partmap/pc.c: Likewise.
13520 * partmap/sun.c: Likewise.
13521 * term/gfxterm.c: Likewise.
13522 * term/terminfo.c: Likewise.
13523 * term/efi/console.c: Likewise.
13524 * term/i386/pc/console.c: Likewise.
13525 * term/i386/pc/serial.c: Likewise.
13526 * term/i386/pc/vesafb.c: Likewise.
13527 * term/i386/pc/vga.c: Likewise.
13528 * term/ieee1275/ofconsole.c: Likewise.
13529 * util/biosdisk.c: Likewise.
13530 * util/console.c: Likewise.
13531 * util/genmoddep.c: Likewise.
13532 * util/getroot.c: Likewise.
13533 * util/grub-emu.c: Likewise.
13534 * util/grub-mkdevicemap.c: Likewise.
13535 * util/grub-probe.c: Likewise.
13536 * util/lvm.c: Likewise.
13537 * util/misc.c: Likewise.
13538 * util/raid.c: Likewise.
13539 * util/resolve.c: Likewise.
13540 * util/update-grub.in: Likewise.
13541 * util/update-grub_lib.in: Likewise.
13542 * util/grub.d/00_header.in: Likewise.
13543 * util/grub.d/10_hurd.in: Likewise.
13544 * util/grub.d/10_linux.in: Likewise.
13545 * util/i386/efi/grub-install.in: Likewise.
13546 * util/i386/efi/grub-mkimage.c: Likewise.
13547 * util/i386/pc/grub-install.in: Likewise.
13548 * util/i386/pc/grub-mkimage.c: Likewise.
13549 * util/i386/pc/grub-mkrescue.in: Likewise.
13550 * util/i386/pc/grub-setup.c: Likewise.
13551 * util/i386/pc/misc.c: Likewise.
13552 * util/powerpc/ieee1275/grub-install.in: Likewise.
13553 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
13554 * util/powerpc/ieee1275/misc.c: Likewise.
13555 * video/bitmap.c: Likewise.
13556 * video/video.c: Likewise.
13557 * video/i386/pc/vbe.c: Likewise.
13558 * video/i386/pc/vbeblit.c: Likewise.
13559 * video/i386/pc/vbefill.c: Likewise.
13560 * video/i386/pc/vbeutil.c: Likewise.
13561 * video/readers/tga.c: Likewise.
13562
3572d015 135632007-07-02 Robert Millan <rmh@aybabtu.com>
13564
13565 * conf/i386-efi.rmk: Replace obsolete reference to
13566 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
13567 with util/getroot.c.
13568 * conf/powerpc-ieee1275.rmk: Likewise.
13569 * conf/sparc64-ieee1275.rmk: Likewise.
13570
13571 * util/grub-emu.c (main): Fix unchecked pointer handling.
13572
2c2a681b 135732007-07-02 Robert Millan <rmh@aybabtu.com>
13574
13575 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
13576 invocation to fail, in order to support partition-less media.
13577
13578 * util/i386/pc/grub-install.in: Likewise.
13579
13580 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
13581 which fs or partmap modules are needed (akin to its sister scripts).
13582
13583 Also use grub-probe to get rid of unportable /proc/mounts check.
13584
13585 Print the same informational message that the other scripts do, before
fe6b695a 13586 exiting.
2c2a681b 13587
6193defe 135882007-06-23 Robert Millan <rmh@aybabtu.com>
13589
fe6b695a 13590 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 13591 a font file can be found and, if so, echo the GRUB path to it.
13592
13593 * util/update-grub.in: Handle multiple terminals depending on user
13594 input, platform availability and font file presence. Propagate
13595 variables of our findings to /etc/grub.d/ children.
13596
13597 * util/grub.d/00_header.in: Handle multiple terminals, based on
13598 environment setup by update-grub.
13599
eface1dc 136002007-06-23 Robert Millan <rmh@aybabtu.com>
13601
ba50d28f 13602 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 13603
bf697e28 136042007-06-21 Robert Millan <rmh@aybabtu.com>
13605
13606 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13607 indicate end of data section in kernel image.
13608 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13609 GRUB_KERNEL_MACHINE_DATA_END.
13610
13611 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13612 space for it.
13613 * kern/i386/efi/startup.S: Likewise.
13614
13615 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13616 during image generation. Implement --prefix option to override this
13617 patch.
13618 * util/i386/efi/grub-mkimage.c: Likewise.
13619
13620 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13621 code to make path relative to its root into a separate function.
13622
13623 * util/i386/pc/grub-install.in: Use newly provided
13624 make_system_path_relative_to_its_root() to convert ${grubdir}, then
13625 pass the result to grub-install --prefix.
13626
baa574b4 136272007-06-13 Robert Millan <rmh@aybabtu.com>
13628
13629 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13630 DEFAULT_DEVICE_MAP.
13631 * util/grub-emu.c: Use above definitions from misc.h instead of
13632 defining them.
13633 * util/grub-mkdevicemap.c: Likewise.
13634 * util/i386/pc/grub-setup.c: Likewise.
13635 * util/grub-probe.c: Likewise.
13636 (probe): Abort with grub_util_error() when either
13637 grub_guess_root_device or grub_util_get_grub_dev fails.
13638
0215dcbf 136392007-06-12 Robert Millan <rmh@aybabtu.com>
13640
13641 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13642 "pager" assignment.
13643 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13644 "pcdata".
13645 * util/grub-probe.c (probe): Likewise for "drive_name".
13646
8af2ab7b 136472007-06-11 Robert Millan <rmh@aybabtu.com>
13648
13649 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
13650 not just the cdrom one.
13651
59d31694 136522007-06-11 Robert Millan <rmh@aybabtu.com>
13653
13654 * util/i386/pc/grub-mkrescue.in: Add "set -e".
13655 Add --pkglibdir=DIR option to override pkglibdir.
13656 Mention --image-type=TYPE in help output.
13657 Fix --grub-mkimage (it was a no-op).
fe6b695a 13658 Abort gracefully when no parameter is given.
59d31694 13659
7ee367e4 136602007-06-11 Robert Millan <rmh@aybabtu.com>
13661
13662 * util/i386/pc/grub-mkrescue.in: New file.
13663 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
13664 * Makefile.in: Handle bin_SCRIPTS.
13665
29b0ed46 136662007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
13667
13668 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
13669 list of video modes.
13670
c0f90770 136712007-06-06 Robert Millan <rmh@aybabtu.com>
13672
13673 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
13674 file doesn't exist, or if it is in a filesystem grub can't read.
13675
13676 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
13677 not abort if GRUB_DRIVE could not be defined. Rearrange generated
13678 header comment to fit in 80 columns when the variables are resolved.
13679
13680 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
13681 could be identified by update-grub. Remove redundant check for
fe6b695a 13682 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 13683 handles that).
13684
fb36dc26 136852007-06-04 Robert Millan <rmh@aybabtu.com>
13686
13687 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
13688
13689 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
13690
13691 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
13692
0c68c93e 136932007-06-04 Robert Millan <rmh@aybabtu.com>
13694
13695 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
13696
13697 * include/grub/partition.h: Declare grub_apple_partition_map_init and
13698 grub_apple_partition_map_fini.
13699
13700 * util/biosdisk.c
13701 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
13702 to access >2 TiB disks).
13703
13704 Print disk->total_sectors with %llu instead of %lu, since this
13705 variable is always 64-bit (prevents wrong disk size from being displayed
13706 on either >2 TiB disk or big-endian CPU).
13707
13708 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
13709 into a generic case that supports all (sane) partition maps.
13710
13711 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
13712 breaks big-endian.
13713
13714 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
13715 and grub_apple_partition_map_fini() after that.
13716
0f23eb74 137172007-06-01 Robert Millan <rmh@aybabtu.com>
13718
13719 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
13720
13721 * util/grub.d/00_header.in: Only enable gfxterm when
13722 convert_system_path_to_grub_path() succeeds.
13723
42c71976 137242007-05-20 Robert Millan <rmh@aybabtu.com>
13725
13726 * util/update-grub_lib.in: New file.
13727 * DISTLIST: Add update-grub_lib.in.
13728 * conf/common.rmk: Generate update-grub_lib and install it in
13729 $(lib_DATA).
13730 * Makefile.in: Add install routine for $(lib_DATA).
13731
13732 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
13733 function provided by update-grub_lib to support arbitrary paths of
13734 unifont.pff.
13735 * util/update-grub.in: Use convert_system_path_to_grub_path() to
13736 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
13737
5beb2291 137382007-05-19 Robert Millan <rmh@aybabtu.com>
13739
13740 * commands/i386/cpuid.c: New module.
13741 * DISTLIST: Add it.
13742 * conf/i386-efi.rmk: Enable cpuid.mod.
13743 * conf/i386-pc.rmk: Likewise.
13744
7262eca1 137452007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13746
13747 * kern/disk.c (grub_disk_read): Check return value of
13748 grub_realloc().
13749
260ba823 137502007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13751
13752 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
13753 arrays.
13754 * disk/raid.c (grub_raid_open): Likewise.
13755
1ecb6cf2 137562007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
13757
13758 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
13759 stack instead of on the heap.
13760
13761 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
13762 before doing a read on it.
13763
13764 * configure.ac: Only use -fno-stack-protector for the target
13765 environment.
f19dbdb7 13766
21c8cbb1 137672007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
13768
13769 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
13770 __attribute_ ((unused)) to mode_type argument.
13771
13772 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 13773
21c8cbb1 13774 * kern/misc.c (memcmp): Fix prototype.
13775
13776 * include/grub/partition.h [GRUB_UTIL]
13777 (grub_gpt_partition_map_init): Add prototype.
13778 (grub_gpt_partition_map_fini): Likewise.
13779
13780 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
13781 at the right place.
13782
13783 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
13784 (grub_fat_read_data): Likewise.
13785 (grub_fat_find_dir): Likewise.
13786
13787 * font/manager.c (find_glyph): Make table a const.
13788 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 13789
849d55d3 137902007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
13791
13792 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
13793 code, first search for device in /dev/mapper, then in /dev.
13794 (grub_util_get_grub_dev): New function.
13795 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
13796 prototype.
13797 * util/grub-probe.c (probe): Remove check for RAID, call
13798 grub_util_get_grub_dev() instead of
13799 grub_util_biosdisk_get_grub_dev().
13800 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
13801 grub_util_biosdisk_get_grub_dev().
13802 * util/i386/pc/grub-setup.c (main): Likewise.
13803
8fff7c2f 138042007-05-16 Robert Millan <rmh@aybabtu.com>
13805
13806 * DISTLIST: Update for the latest changes.
13807 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
13808 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
13809 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
13810 grub/util/biosdisk.h.
13811 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
13812 grub/util/biosdisk.h.
13813
48e12b52 138142007-05-16 Robert Millan <rmh@aybabtu.com>
13815
13816 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
13817
46b9d128 138182007-05-16 Robert Millan <rmh@aybabtu.com>
13819
13820 * util/i386/efi/grub-install.in: New.
13821 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
13822 newly added grub-install.
13823 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
13824 include.
13825 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
13826 grub/util/biosdisk.h.
13827 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
13828 grub/util/biosdisk.h.
13829
2d1a40a9 138302007-05-16 Robert Millan <rmh@aybabtu.com>
13831
13832 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
13833 * include/grub/util/biosdisk.h: ... here.
13834 * util/i386/pc/biosdisk.c: Moved to ...
13835 * util/biosdisk.c: ... here.
13836 * util/i386/pc/getroot.c: Moved to ...
13837 * util/getroot.c: ... here.
13838 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
13839 * util/grub-mkdevicemap.c: ... here.
13840 * util/i386/pc/grub-probe.c: Moved to ...
13841 * util/grub-probe.c: ... here.
13842
9e26e3bc 138432007-05-15 Robert Millan <rmh@aybabtu.com>
13844
13845 * util/update-grub.in: Remove duplicated line in grub.cfg header
13846 message.
13847
57f96397 138482007-05-13 Robert Millan <rmh@aybabtu.com>
13849
13850 * util/update-grub.in: Fix a few assumptions about the devices holding
13851 /, /boot and /boot/grub being the same.
13852 * util/grub.d/00_header.in: Likewise.
13853 * util/grub.d/10_hurd.in: Likewise.
13854 * util/grub.d/10_linux.in: Likewise.
13855
13856 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
13857 patterns. Use that to define the `.old' suffix as older than `'.
13858
13859 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
13860
13861 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
13862 the grub.cfg header message.
13863
2e610d62 138642007-05-11 Robert Millan <rmh@aybabtu.com>
13865
13866 * util/update-grub.in: Create device.map if it doesn't already exist,
13867 before attempting to run grub-probe.
13868 Check for grub-probe and grub-mkdevicemap with the same code
13869 grub-install is using.
13870 Remove test mode.
13871
3f6a10ef 138722007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
13873
13874 * Makefile.in: Add the datarootdir autoconf variable.
13875
02e7b75e 138762007-05-09 Robert Millan <rmh@aybabtu.com>
13877
13878 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 13879 fail gracefully if dev->disk->partition == NULL.
02e7b75e 13880
75f396cc 138812007-05-07 Robert Millan <rmh@aybabtu.com>
13882
13883 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
13884 determine partition map module.
13885 * util/i386/pc/grub-install.in: Use this feature to decide which
13886 partition module to load, instead of hardcoding pc and gpt.
13887
da65cb36 138882007-05-07 Robert Millan <rmh@aybabtu.com>
13889
13890 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
13891 source directory differs from build directory.
13892
b57d6a91 138932007-05-05 Robert Millan <rmh@aybabtu.com>
13894
13895 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
13896 initialisation.
13897
509d00f1 138982007-05-05 Robert Millan <rmh@aybabtu.com>
13899
13900 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
13901
c48f23ef 139022007-05-05 Robert Millan <rmh@aybabtu.com>
13903
13904 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
13905 command-line arguments via ${GRUB_CMDLINE_LINUX}.
13906
20b97658 139072007-05-05 Robert Millan <rmh@aybabtu.com>
13908
13909 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13910 (grub_probe_SOURCES): Likewise.
13911 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13912 GPT and initialize dos_part and bsd_part accordingly.
13913 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13914 install_bsd_part.
13915 (main): Activate gpt module for use during partition identification,
13916 and deactivate it afterwards.
13917 * util/i386/pc/grub-install.in: Add gpt module to core.img.
13918 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13919 partition identification, and deactivate it afterwards.
13920
99123174 139212007-05-05 Robert Millan <rmh@aybabtu.com>
13922
13923 * term/i386/pc/console.c (grub_console_fini): Call
13924 grub_term_set_current() before grub_term_unregister().
13925
ebd97f6e 139262007-05-04 Robert Millan <rmh@aybabtu.com>
13927
13928 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13929 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13930 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
13931 and update-grub_DATA.
13932 * conf/common.rmk: Build and install update-grub components.
13933 * conf/common.mk: Regenerate.
13934 * util/update-grub.in: New. Core of update-grub.
13935 * util/grub.d/00_header.in: New. Generates grub.cfg header.
13936 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
13937 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
13938 * util/grub.d/README: New. Document grub.d directory layout.
13939
b06a264d 139402007-05-01 Robert Millan <rmh@aybabtu.com>
13941
13942 * util/grub-emu.c: Move initialization functions
13943 grub_util_biosdisk_init() and grub_init_all() before
13944 grub_util_biosdisk_get_grub_dev(), which relies on them.
13945
41f0050e 139462007-04-19 Robert Millan <rmh@aybabtu.com>
13947
13948 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13949 it is used later.
13950
04582bb3 139512007-04-18 Jerone Young <jerone@gmail.com>
13952
f19dbdb7 13953 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 13954 stanza.
13955
08db4632 139562007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 13957
08db4632 13958 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13959 continue on and look for device node with real device name.
13960
801b76be 139612007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 13962
fe6b695a 13963 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 13964 ability.
13965 * Makefile.in: Add autoconf package transformation code.
13966 * util/i386/pc/grub-install.in: Likewise.
13967 * util/powerpc/ieee1275/grub-install.in: Likewise.
13968
6795c4e1 139692007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13970
13971 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13972 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13973 (EXT2_REVISION): Likewise.
13974 (EXT2_INODE_SIZE): Likewise.
13975 (struct grub_ext2_block_group): Added a missing member
13976 "used_dirs".
13977 (grub_ext2_read_inode): Divide by the inode size in a superblock
13978 instead of 128 to obtain INODES_PER_BLOCK.
13979 Use the macro EXT2_INODE_SIZE instead of directly using
13980 SBLOCK->INODE_SIZE.
13981
d70af616 139822007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13983
13984 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13985 superblock instead of the structure size to compute an
13986 offset. This fixes the problem that GRUB could not read a
13987 filesystem when inode size is different from 128-byte.
13988
3b801603 139892007-03-05 Marco Gerards <marco@gnu.org>
13990
13991 * normal/main.c (read_config_file): When "menu" is not set, create
13992 an initial context.
13993
4785bfe4 139942007-02-21 Hollis Blanchard <hollis@penguinppc.org>
13995
13996 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13997 (HEAP_LIMIT): New macro.
13998 (grub_claim_heap): Claim memory up to `heaplimit'.
13999
a0cbb023 140002007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14001
14002 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
14003 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
14004 (_start): Likewise.
14005 (grub_arch_modules_addr): Return address after `_end'.
14006 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
14007 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
14008 (add_segments): Calculate `_end' from phdr size and location.
14009 (ALIGN_UP): Moved to ...
14010 * include/grub/misc.h: here.
14011 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
14012 New macro.
14013 (GRUB_IEEE1275_MODULE_BASE): Removed.
14014
fd7d8eba 140152007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14016
14017 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
14018 loop boundary.
14019
9b09e6fc 140202007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14021
14022 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
14023 All users updated.
14024 (grub_elf64_load_hook_t): Likewise.
14025 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
14026 debug output.
14027
3ce27299 140282007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14029
14030 * kern/mm.c: Update copyright.
14031 (grub_mm_debug): Correct syntax error.
14032 (grub_mm_dump_free): New function.
14033 (grub_debug_free): Call `grub_free'.
14034 * include/grub/mm.h: Update copyright.
14035 (grub_mm_dump_free): Add declaration.
14036
077d5fee 140372007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14038
14039 * include/grub/ieee1275/ieee1275.h: Update copyright.
14040 * kern/powerpc/ieee1275/init.c: Likewise.
14041 * kern/powerpc/ieee1275/openfw.c: Likewise.
14042
14043 * loader/powerpc/ieee1275/linux.c: Likewise.
14044 * include/grub/elfload.h: Likewise.
14045 * kern/elf.c: Likewise.
14046 (grub_elf32_load): Pass `base' and `size' parameters. Update all
14047 callers.
14048 (grub_elf64_load): Likewise.
14049 (grub_elf32_load_segment): Move to a nested function.
14050 (grub_elf64_load_segment): Likewise.
14051
dc946850 140522007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14053
14054 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
14055 prototype.
14056 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
14057 (grub_heap_len): Likewise.
14058 (HEAP_SIZE): New macro.
14059 (grub_claim_heap): New function.
14060 (grub_machine_init): Don't claim heap directly. Call
14061 `grub_claim_heap'.
14062 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
14063 (grub_available_iterate): New function.
14064
baa2a121 140652007-02-03 Thomas Schwinge <tschwinge@gnu.org>
14066
14067 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
14068 * configure.ac: Use it for testing the HOST and TARGET compilers.
14069
4fe9862e 140702006-12-13 Thomas Schwinge <tschwinge@gnu.org>
14071
14072 * Makefile.in (enable_grub_emu): New variable.
14073 * configure.ac (--enable-grub-emu): New option.
14074 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
14075 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
14076 * conf/i386-pc.rmk: Likewise.
14077 * conf/powerpc-ieee1275.rmk: Likewise.
14078 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
14079
a8aa5762 140802006-12-12 Marco Gerards <marco@gnu.org>
14081
14082 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
14083
14084 * kern/env.c (grub_env_unset): Don't free the member `value' when
14085 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
14086 pointer.
14087
14088 * normal/main.c (current_menu): Removed.
14089 (free_menu): Unset the `menu' environment variable.
14090 (grub_normal_menu_addentry): Make use of the environment variable
14091 `menu', instead of using the global `current_menu'. Allocate
14092 memory for the sourcecode of this entry.
14093 (read_config_file): New argument `nested', changed all callers.
14094 Only in the case of a new context, initialize a new menu. Set the
14095 `menu' environment variable.
14096 (grub_normal_execute): Don't set and unset the environment
14097 variable `menu' here anymore. Only free the menu when leaving the
14098 context.
14099
14100 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
14101 leak.
14102
957b3a3e 141032006-12-11 Marco Gerards <marco@gnu.org>
14104
14105 * normal/menu_entry.c (run): Fix off by one bug so the last line
14106 is executed. Move the loader check to outside the loop.
14107
ef875714 141082006-12-08 Hollis Blanchard <hollis@penguinppc.org>
14109
14110 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
14111
4e739985 141122006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
14113
14114 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
14115 the number of sectors. Reported by Andrey Shuvikov
14116 <mr_hyro@yahoo.com>.
f19dbdb7 14117
790707f2 141182006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
14119
14120 * kern/disk.c (grub_disk_read): When there is a read error, always
14121 try to read only the necessary data.
f19dbdb7 14122
790707f2 14123 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
14124 disk/raid.c.
14125 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
14126 prototype.
14127 [GRUB_UTIL] (grub_raid_fini): Likewise.
14128 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 14129 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 14130 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
14131 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
14132 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
14133 and grub_raid_fini().
f19dbdb7 14134
03e58196 141352006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14136
14137 * include/grub/types.h (__unused): Rename to UNUSED.
14138 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
14139 (grub_elf64_size): Likewise.
f19dbdb7 14140
ae4f23bf 141412006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14142
14143 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
14144 grub_error_push and grub_error_pop in the error-handling path.
14145 (grub_elf32_load_segment): Only call grub_file_read with non-zero
14146 length.
14147
2166cc83 141482006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14149
14150 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
14151 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14152 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14153 (kernel_elf_SOURCES): Likewise.
14154 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
14155 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
14156 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14157 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14158 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
14159 (elf_mod_SOURCES): New variable.
14160 (elf_mod_CFLAGS): Likewise.
14161 (elf_mod_LDFLAGS): Likewise.
14162 * include/grub/types.h (__unused): New macro.
14163 * include/grub/elfload.h: New file.
14164 * kern/elf.c: Likewise.
14165 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
14166 (ELF32_LOADMASK): New macro.
14167 (ELF64_LOADMASK): Likewise.
14168 (vmlinux): Removed.
14169 (grub_linux_load32): New function.
14170 (grub_linux_load64): Likewise.
14171 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
14172 Use grub_elf_t instead of grub_file_t.
14173
a09d5aa5 141742006-11-02 Hollis Blanchard <hollis@penguinppc.org>
14175
14176 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
14177 `catch_result' to struct set_color_args.
14178
d976fc51 141792006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14180
14181 * normal/menu.c: Include grub/script.h.
14182 * normal/menu_entry.c: Likewise.
14183 * include/grub/normal.h: Do not include grub/script.h.
14184
67507549 141852006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14186
14187 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
14188
69203a99 141892006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14190
14191 * kern/disk.c (grub_disk_open): Print debug messages when opening a
14192 disk.
14193 (grub_disk_close): Print debug messages when closing a disk.
14194 (grub_disk_read): Print debug messages when disk read fails.
14195 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
14196 filesystem type.
14197 * kern/partition.c: Include misc.h.
14198 (grub_partition_iterate): Print debug messages when detecting
14199 partition type.
14200
e2b8278c 142012006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14202
14203 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
14204 is negative.
14205 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
14206
97b2f2ff 142072006-10-26 Hollis Blanchard <hollis@penguinppc.org>
14208
14209 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
14210 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
14211
6555d655 142122006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
14213
14214 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
14215 instead of sizeof(lv). Patch by Michael Guntsche.
14216
4d42b77f 142172006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
14218
14219 * disk/lvm.c: Rename VGS to VG_LIST.
14220 (grub_lvm_iterate): Change VGS->LV to VG-LV.
14221 (grub_lvm_open): Likewise.
14222 Thanks to Michael Guntsche for finding this bug.
14223
5d74d927 142242006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14225
14226 * configure.ac (AC_INIT): Bumped to 1.95.
14227
a1bb27e4 142282006-10-14 Robert Millan <rmh@aybabtu.com>
14229
14230 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
14231 with "/dev/.static/dev/md".
14232
e0994b8b 142332006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14234
14235 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
14236 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
14237 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
14238 DRIVE_NAME are always freed.
14239
14240 * util/i386/pc/biosdisk.c (make_device_name): Add one into
14241 DOS_PART, as a DOS partition is counted from one instead of zero
14242 now. Reported by Robert Millan.
14243
ddd5cee9 142442006-10-14 Robert Millan <rmh@aybabtu.com>
14245
14246 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
14247 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
14248 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
14249 string returned by grub_guess_root_device.
14250 * util/i386/pc/grub-setup.c: Likewise.
14251 * util/i386/pc/grub-probefs.c: Likewise.
14252
14253 * util/i386/pc/grub-probefs.c: Rename to ...
14254 * util/i386/pc/grub-probe.c: ... this.
14255 * DISTLIST: Remove grub-probefs, add grub-probe.
14256 * conf/i386-efi.rmk: Likewise.
14257 * conf/i386-pc.rmk: Likewise.
14258 * util/i386/pc/grub-install.in: Likewise.
14259
14260 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
14261 choose which information we want to print.
14262
2b002173 142632006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14264
14265 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
14266 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
14267 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
14268 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
14269 video/readers/tga.c and video/i386/pc/vbeutil.c.
14270
142712006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
14272
14273 Added support for RAID and LVM.
f19dbdb7 14274
2b002173 14275 * disk/lvm.c: New file.
14276 * disk/raid.c: Likewise.
14277 * include/grub/lvm.h: Likewise.
f19dbdb7 14278 * include/grub/raid.h: Likewise.
2b002173 14279 * include/grub/util/lvm.h: Likewise.
14280 * include/grub/util/raid.h: Likewise.
14281 * util/lvm.c: Likewise.
14282 * util/raid.c: Likewise.
14283
14284 * include/grub/disk.h (grub_disk_dev_id): Add
14285 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
14286 (grub_disk_get_size): New prototype.
14287 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
14288 returns a partition.
14289 (grub_disk_get_size): New function.
f19dbdb7 14290
2b002173 14291 * kern/i386/pc/init.c (make_install_device): Copy the prefix
14292 verbatim if grub_install_dos_part is -2.
14293
14294 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
14295 and LVM devices.
14296
14297 * util/i386/pc/grub-setup.c (setup): New argument
14298 MUST_EMBED. Force embedding of GRUB when the argument is
14299 true. Close FILE before returning.
14300 (main): Add support for RAID and LVM.
f19dbdb7 14301
2b002173 14302 * conf/common.rmk: Add RAID and LVM modules.
14303 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
14304 util/lvm.c.
14305 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
14306
14307 * kern/misc.c (grub_strstr): New function.
14308 * include/grub/misc.h (grub_strstr): New prototype.
14309
050548d0 143102006-10-10 Tristan Gingold <tristan.gingold@bull.net>
14311
14312 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
14313
da849d2d 143142006-10-05 Tristan Gingold <tristan.gingold@bull.net>
14315
14316 * kern/misc.c (grub_strtoull): Guess the base only if not
14317 specified.
14318
97b2f2ff 143192006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 14320
14321 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
14322 PowerMac support.
14323
97b2f2ff 143242006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 14325
14326 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
14327
14328 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
14329 Remove `flags' argument. All callers changed.
14330 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
14331 (IEEE1275_IHANDLE_INVALID): New variable.
14332 (IEEE1275_CELL_INVALID): New variable.
14333 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
14334 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
14335 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
14336 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
14337 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
14338 codes from Open Firmware. All callers updated.
14339 (grub_ieee1275_next_property): Directly return Open Firmware return
14340 code.
14341 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
14342 Standardize error checking from `grub_ieee1275_get_property'.
14343 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
14344 `devalias' to `aliases'. Correct comments. Consolidate error paths.
14345
97b2f2ff 143462006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 14347
14348 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
14349 `instance_to_package_args' to `instance_to_path_args'.
14350
14351 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
14352 `grub_ieee1275_chosen'.
14353
14354 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
14355 `grub_ieee1275_interpret'.
14356
97b2f2ff 143572006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 14358
14359 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
14360
97b2f2ff 143612006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 14362
14363 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
14364 (__cmpdi): Likewise.
14365
14366 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
14367 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
14368 `grub_ssize_t'.
14369
02bb8acc 14370 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 14371
14372 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
14373 to type `grub_ssize_t'.
14374 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
14375
7f9a8531 143762006-09-22 Marco Gerards <marco@gnu.org>
14377
14378 * normal/script.c (grub_script_create_cmdmenu): Skip leading
14379 newlines.
14380
b5ef1102 143812006-09-22 Marco Gerards <marco@gnu.org>
14382
14383 * commands/echo.c: New file.
14384
14385 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
14386
14387 * conf/common.rmk (echo_mod_SOURCES): New variable.
14388 (echo_mod_CFLAGS): Likewise.
14389 (echo_mod_LDFLAGS): Likewise.
14390
2cff3677 143912006-09-22 Marco Gerards <marco@gnu.org>
14392
14393 * normal/main.c (get_line): Malloc memory instead of using
14394 preallocated memory. Removed the arguments `cmdline' and
14395 `max_len'. Updated all callers.
14396
6ba4688b 143972006-09-22 Marco Gerards <marco@gnu.org>
14398
14399 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
14400 (normal_mod_DEPENDENCIES): Likewise.
14401
14402 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
14403 (normal_mod_DEPENDENCIES): Likewise.
14404
14405 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
14406
e02ac02c 144072006-09-22 Johan Rydberg <jrydberg@gnu.org>
14408
14409 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
14410 programs.
14411 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
14412 (normal_mod_DEPENDENCIES): Likewise.
14413 * conf/i386-pc.mk: Regenerate.
14414 * conf/i386-efi.mk: Likewise
14415 * conf/common.mk: Likewise.
14416 * conf/powerpc-ieee1275.mk: Likewise.
14417 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14418
8d252e44 144192006-09-22 Robert Millan <rmh@aybabtu.com>
14420
14421 Sync with i386 version.
14422 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
14423 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
14424
209bf7ac 144252006-09-21 Robert Millan <rmh@aybabtu.com>
14426
14427 Import from GRUB Legacy (lib/device.c):
14428 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
14429 (init_device_map) [__linux__]: Add support for I2O devices.
14430
6b146090 144312006-09-14 Marco Gerards <marco@gnu.org>
14432
14433 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
14434 `-melf_i386'.
14435
e38600a8 144362006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 14437
14438 * util/i386/pc/grub-install.in: Skip menu.lst when removing
14439 /boot/grub/*.lst.
78fa1790 14440
2952da5d 14441 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 14442
2952da5d 14443 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
14444 before adding it to device.map.
14445
01b82a64 144462006-08-15 Johan Rydberg <jrydberg@gnu.org>
14447
fe6b695a 14448 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 14449 compiles a file; using the -MD option.
14450 * conf/common.mk: Regenerate.
14451 * conf/i386-pc.mk: Likewise.
14452 * conf/i386-efi.mk: Likewise.
14453 * conf/powerpc-ieee1275.mk: Likewise.
14454 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14455
1064790d 144562006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
14457
14458 Move the prototypes of grub_setjmp and grub_longjmp to
14459 cpu/setjmp.h, so that each architecture may specify different
14460 attributes.
f19dbdb7 14461
1064790d 14462 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
14463 (grub_longjmp): Likewise.
14464 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
14465 (grub_longjmp): Likewise.
14466 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
14467 (grub_longjmp): Likewise.
14468
14469 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
14470 [!GRUB_UTIL] (grub_longjmp): Removed.
14471
29dda3ed 144722006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
14473
14474 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
14475 "color!" method does not return any value.
14476
ad2a06ed 144772006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14478
14479 * include/grub/bitmap.h: New file.
14480
14481 * include/grub/i386/pc/vbeutil.h: Likewise.
14482
14483 * video/bitmap.c: Likewise.
14484
14485 * video/readers/tga.c: Likewise.
14486
14487 * video/i386/pc/vbeutil.c: Likewise.
14488
14489 * commands/videotest.c: Code cleanup and updated to reflect to new
14490 video API.
14491
14492 * term/gfxterm.c: Likewise.
14493
14494 * video/video.c: Likewise.
14495
14496 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
14497 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
14498 (bitmap_mod_SOURCES): New entry.
14499 (bitmap_mod_CFLAGS): Likewise.
14500 (bitmap_mod_LDFLAGS): Likewise.
14501 (tga_mod_SOURCES): Likewise.
14502 (tga_mod_CFLAGS): Likewise.
14503 (tga_mod_LDFLAGS): Likewise.
14504
14505 * include/grub/video.h (grub_video_blit_operators): New enum type.
14506 (grub_video_render_target): Changed as forward declaration and moved
14507 actual definition to be video driver specific.
14508 (grub_video_adapter.blit_bitmap): Added blitting operator.
14509 (grub_video_adapter.blit_render_target): Likewise.
14510 (grub_video_blit_bitmap): Likewise.
14511 (grub_video_blit_render_target): Likewise.
14512
14513 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
14514 driver specific render target definition.
14515 (grub_video_vbe_map_rgba): Added driver internal helper.
14516 (grub_video_vbe_unmap_color): Updated to use
14517 grub_video_i386_vbeblit_info.
14518 (grub_video_vbe_get_video_ptr): Likewise.
14519
14520 * include/grub/i386/pc/vbeblit.h
14521 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
14522 grub_video_i386_vbeblit_info.
14523 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
14524 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
14525 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
14526 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
14527 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
14528 (grub_video_i386_vbeblit_index_index): Likewise.
14529 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
14530 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
14531 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
14532 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
14533 operator.
14534 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
14535 operator.
14536
14537 * video/i386/pc/vbeblit.c: Updated to reflect changes on
14538 include/grub/i386/pc/vbeblit.h.
14539
14540 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
14541 Updated to use grub_video_i386_vbeblit_info.
14542 (grub_video_i386_vbefill_R8G8B8): Likewise.
14543 (grub_video_i386_vbefill_index): Likewise.
14544 (grub_video_i386_vbefill): Added generic filler.
14545
14546 * video/i386/pc/vbefill.c: Updated to reflect changes on
14547 include/grub/i386/pc/vbefill.h.
14548
14549 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
14550 grub_video_i386_vbeblit_info.
14551 (grub_video_vbe_unmap_color): Likewise.
14552 (grub_video_vbe_blit_glyph): Likewise.
14553 (grub_video_vbe_scroll): Likewise.
14554 (grub_video_vbe_draw_pixel): Removed function.
14555 (grub_video_vbe_get_pixel): Likewise.
14556 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
14557 updated code to use it.
14558 (common_blitter): Added common blitter for render target and bitmap.
14559 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
14560 (grub_video_vbe_blit_render_target): Likewise.
14561
bc8c036d 145622006-07-30 Johan Rydberg <jrydberg@gnu.org>
14563
14564 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
14565 is in text mode if there is no console control protocol instance
14566 available.
14567
684a8eff 145682006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14569
14570 * include/grub/video.h: Code cleanup.
14571
14572 * include/grub/i386/pc/vbe.h: Likewise.
14573
14574 * video/i386/pc/vbe.c: Likewise.
14575
14576 * video/i386/pc/vbeblit.c: Likewise.
14577
14578 * video/i386/pc/vbefill.c: Likewise.
14579
14580 * video/video.c: Likewise. Also added more comments.
14581
5915059b 145822006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14583
14584 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
14585 (struct grub_biosdisk_dap): Likewise.
14586
14587 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
14588 linkage settings for all functions.
14589
90ce5d56 145902006-07-12 Marco Gerards <marco@gnu.org>
14591
14592 * configure.ac (--enable-mm-debug): Fix typo.
14593
14594 * genkernsyms.sh.in: Use proper quoting for `CC'.
14595
43e7f879 145962006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
14597
14598 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
14599 (normal_mod_ASFLAGS): Remove "-m32".
14600
4889bdec 146012006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
14602
14603 * util/misc.c: Include config.h.
14604 [!HAVE_MEMALIGN]: Do not include malloc.h.
14605 (grub_memalign): Use posix_memalign, if present. Then, use
14606 memalign, if present. Otherwise, emit an error.
14607
14608 * util/grub-emu.c: Do not include malloc.h.
14609
14610 * include/grub/util/misc.h: Include unistd.h. This is required for
14611 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14612 D. Eades III <hde@foobar-qux.org>.
14613
14614 * configure.ac (AC_GNU_SOURCE): Added.
14615 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14616 type.
14617
fd39d4da 146182006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
14619
14620 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14621 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14622
b786f3b5 146232006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
14624
14625 * include/grub/types.h (grub_host_addr_t): Rename to
14626 grub_target_addr_t.
14627 (grub_host_off_t): Rename to grub_target_off_t.
14628 (grub_host_size_t): Rename to grub_target_size_t.
14629 (grub_host_ssize_t): Rename to grub_target_ssize_t.
14630 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14631
14632 * include/grub/kernel.h (struct grub_module_header): Change type
14633 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14634 (grub_module_info): Likewise.
f19dbdb7 14635
051988bb 146362006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14637
14638 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14639 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14640 Velazquez <jesus.velazquez@gmail.com>.
14641
deae281b 146422006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14643
14644 Count partitions from 1 instead of 0 in the string representation
14645 of partitions. Still use 0-based internally.
f19dbdb7 14646
deae281b 14647 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
14648 (sun_partition_map_iterate): Use grub_partition_t instead of
14649 struct grub_partition *. Cast DESC->START_CYLINDER to
14650 grub_uint64_t after converting the endian.
14651 (sun_partition_map_probe): Subtract 1 for PARTNUM.
14652 (sun_partition_map_get_name): Add 1 to P->INDEX.
14653
14654 * partmap/pc.c (grub_partition_parse): Subtract 1 for
14655 PCDATA->DOS_PART.
14656 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
14657
14658 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
14659 zero instead of one.
14660 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
14661 (gpt_partition_map_get_name): Add 1 into P->INDEX.
14662
14663 * partmap/apple.c (apple_partition_map_iterate): Change the type
14664 of POS to unsigned.
14665 (apple_partition_map_probe): Subtract 1 for PARTNUM.
14666 (apple_partition_map_get_name): Add 1 into P->INDEX.
14667
14668 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
14669 of POS to unsigned.
14670 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
14671 calculate the offset of a partition.
14672 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
14673 (amiga_partition_map_get_name): Add 1 into P->INDEX.
14674
14675 * partmap/acorn.c (acorn_partition_map_find): Change the type of
14676 SECTOR to grub_disk_addr_t.
14677 (acorn_partition_map_iterate): Likewise.
14678 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
14679 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
14680 top.
14681 (acorn_partition_map_get_name): Add 1 into P->INDEX.
14682
14683 * kern/i386/pc/init.c (make_install_device): Add 1 into
14684 GRUB_INSTALL_DOS_PART.
14685
14686 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
14687 conditional.
14688
524a1e6a 146892006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
14690
14691 Clean up the code to support 64-bit addressing in disks and
14692 files. This change is not enough for filesystems yet.
f19dbdb7 14693
524a1e6a 14694 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
14695 type of "start" to grub_uint64_t.
14696 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
14697 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
14698 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
14699 convert addresses.
14700
14701 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
14702 to grub_disk_addr_t.
14703
14704 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
14705 string.
14706
14707 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14708
14709 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
14710 to char *.
14711
14712 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
14713
14714 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
14715
14716 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
14717
14718 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
14719 to grub_off_t, to detect an error from grub_file_seek.
14720 (grub_multiboot_load_elf32): Likewise.
14721
14722 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
14723 maximum unsigned long value when an overflow is detected.
14724 (grub_strtoull): New function.
14725 (grub_divmod64): Likewise.
14726 (grub_lltoa): use grub_divmod64.
14727
14728 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
14729 grub_disk_addr_t.
14730 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
14731 the pointer to next character. Use grub_strtoull instead of
14732 grub_strtoul.
14733 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
14734 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
14735 respectively.
14736
fe6b695a 14737 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 14738 return value is signed.
14739 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
14740 test if OFFSET is less than zero, as OFFSET is unsigned now.
14741
14742 * kern/disk.c (struct grub_disk_cache): Change the type of
14743 "sector" to grub_disk_addr_t.
14744 (grub_disk_cache_get_index): Change the type of SECTOR to
14745 grub_disk_addr_t. Calculate the hash with SECTOR casted to
14746 unsigned after shifting.
14747 (grub_disk_cache_invalidate): Change the type of SECTOR to
14748 grub_disk_addr_t.
14749 (grub_disk_cache_unlock): Likewise.
14750 (grub_disk_cache_store): Likewise.
14751 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
14752 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
14753 grub_disk_addr_t and grub_uint64_t, respectively.
14754 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
14755 body, as the value of OFFSET is tweaked by
14756 grub_disk_check_range. Change the types of START_SECTOR, LEN and
14757 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
14758 respectively.
14759 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
14760 body, as the value of OFFSET is tweaked by
14761 grub_disk_check_range. Change the types of LEN and N to
14762 grub_size_t.
14763
14764 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
14765 and "saved_offset" to grub_off_t.
14766 (test_header): Cast BUF to char *.
14767 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
14768 to char *.
14769 (grub_gzio_read): Change the types of OFFSET and SIZE to
14770 grub_off_t and grub_size_t, respectively.
14771
14772 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
14773 Removed.
14774 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
14775 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
14776 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
14777 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
14778 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
14779
14780 * include/grub/types.h (grub_off_t): Unconditionally set to
14781 grub_uint64_t.
14782 (grub_disk_addr_t): Changed to grub_uint64_t.
14783
14784 * include/grub/partition.h (struct grub_partition): Change the
14785 types of "start", "len" and "offset" to grub_disk_addr_t,
14786 grub_uint64_t and grub_disk_addr_t, respectively.
14787 (grub_partition_get_start): Return grub_disk_addr_t.
14788 (grub_partition_get_len): Return grub_uint64_t.
14789
14790 * include/grub/misc.h (grub_strtoull): New prototype.
14791 (grub_divmod64): Likewise.
14792
14793 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
14794 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
14795 grub_off_t, respectively.
14796 All callers and references changed.
14797
14798 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
14799 grub_size_t in "read".
14800 All callers and references changed.
14801
14802 * include/grub/file.h (struct grub_file): Change the types of
14803 "offset" and "size" to grub_off_t and grub_off_t,
14804 respectively. Change the type of SECTOR to grub_disk_addr_t in
14805 "read_hook".
14806 (grub_file_read): Change the type of LEN to grub_size_t.
14807 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
14808 grub_off_t.
14809 (grub_file_size): Return grub_off_t.
14810 (grub_file_tell): Likewise.
14811 All callers and references changed.
14812
14813 * include/grub/disk.h (struct grub_disk_dev): Change the types of
14814 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
14815 "write".
14816 (struct grub_disk): Change the type of "total_sectors" to
14817 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 14818 "read_hook".
524a1e6a 14819 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
14820 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
14821 (grub_disk_write): Likewise.
14822 All callers and references changed.
14823
14824 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
14825 char * for grub_strncmp to silence gcc.
14826 (grub_iso9660_mount): Likewise.
14827 (grub_iso9660_mount): Likewise.
14828 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
14829 return statement.
14830 (grub_iso9660_iterate_dir): Likewise.
14831 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
14832
14833 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
14834 LEN to grub_disk_addr_t and grub_size_t, respectively.
14835
14836 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
14837
14838 * fs/jfs.c (grub_jfs_read_file): Likewise.
14839
14840 * fs/minix.c (grub_jfs_read_file): Likewise.
14841
14842 * fs/sfs.c (grub_jfs_read_file): Likewise.
14843
14844 * fs/ufs.c (grub_jfs_read_file): Likewise.
14845
14846 * fs/xfs.c (grub_jfs_read_file): Likewise.
14847
14848 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
14849 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
14850 respectively.
14851
14852 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
14853 BLKNR to -1 instead of returning GRUB_ERRNO.
14854 (grub_ext2_read_file): Change the types of SECTOR and
14855 LEN to grub_disk_addr_t and grub_size_t, respectively.
14856
14857 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
14858 LEN to grub_disk_addr_t and grub_size_t, respectively.
14859
14860 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
14861 grub_file_read.
14862
14863 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
14864 string. Do not cast SECTOR explicitly.
14865
14866 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
14867 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
14868 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
14869 grub_disk_addr_t and grub_size_t, respectively. If the sector is
14870 over 2TB and LBA mode is not supported, raise an error.
14871 (get_safe_sectors): New function.
14872 (grub_biosdisk_read): Use get_safe_sectors.
14873 (grub_biosdisk_write): Likewise.
14874
14875 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
14876 (grub_efidisk_write): Likewise.
14877
14878 * disk/loopback.c (delete_loopback): Cosmetic changes.
14879 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
14880 correctly.
14881 (grub_loopback_open): Likewise.
14882 (grub_loopback_read): Likewise. Also, change the type of POS to
14883 grub_off_t, and fix the usage of grub_memset.
14884
14885 * commands/i386/pc/play.c: Include grub/machine/time.h.
14886
14887 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
14888 print FILE->SIZE.
14889
14890 * commands/configfile.c: Include grub/env.h.
14891
14892 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
14893 GRUB_ERRNO directly instead. Change the type of POS to
14894 grub_off_t. Follow the coding standard.
14895
14896 * commands/blocklist.c: Include grub/partition.h.
14897 (grub_cmd_blocklist): Return an error if the underlying device is
14898 not a disk. Take the starting sector of a partition into account,
14899 if a partition is used.
14900
14901 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
14902 a length field.
14903 (lba_mode): Support 64-bit addresses.
14904 (chs_mode): Likewise.
14905 (copy_buffer): Adapted to the new offsets of a length field and a
14906 segment field.
14907 (blocklist_default_start): Allocate 64-bit space.
14908
14909 * boot/i386/pc/boot.S (force_lba): Removed.
14910 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 14911 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 14912 space.
14913 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14914 is useless.
14915 (lba_mode): Refactored to support a 64-bit address. More size
14916 optimization.
14917 (setup_sectors): Likewise.
14918
53af98ad 149192006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
14920
14921 * DISTLIST: Added include/grub/i386/linux.h. Removed
14922 include/grub/i386/pc/linux.h
14923
14924 * configure.ac (AC_INIT): Bumped to 1.94.
14925
14926 * config.guess: Updated from gnulib.
14927 * config.sub: Likewise.
14928 * install-sh: Likewise.
14929 * mkinstalldirs: Likewise.
14930
b4c1940a 149312006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
14932
14933 * conf/common.rmk (grub_modules_init.lst): Depended on
14934 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14935 MODSRCFILES.
14936
14937 * genmk.rb (PModule::rule): Reverted the previous change.
14938
cfca1cfd 149392006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
14940
14941 * conf/common.rmk (grub_modules_init.lst): Depends on
14942 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14943 that the target does not exist before producing.
14944 (grub_modules_init.h): Remove the target before generating.
14945 (grub_emu_init.c): Likewise.
14946
14947 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14948
aa6d7826 149492006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
14950
14951 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14952 for the target-specific tests. Make sure that we also have the
14953 up-to-date target variables for those tests.
14954
26c607b9 149552006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
14956
14957 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14958 (PModule::rule): Likewise.
14959
0162321a 149602006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
14961
14962 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14963 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14964 target-specific flags should be prefixed.
14965 (PModule::rule): Likewise.
14966
6c826348 149672006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
14968
14969 * configure.ac (CMP): Check if cmp is available explicitly.
14970
b977bf01 149712006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
14972
14973 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14974 (target_cpu): New variable.
14975 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 14976
b977bf01 14977 * util/i386/pc/grub-install.in (host_cpu): Removed.
14978 (target_cpu): New variable.
14979 (pkglibdir): Use target_cpu instead of host_cpu.
14980
14981 * util/genmoddep.c: Removed.
f19dbdb7 14982
b977bf01 14983 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14984 instead of GRUB_HOST_SIZEOF_VOID_P.
14985 * kern/dl.c: Likewise.
14986
14987 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14988 ...
14989 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14990 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14991 (GRUB_TARGET_SIZEOF_LONG): ... this.
14992 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14993 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14994 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14995 to ...
14996 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14997 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14998 (GRUB_TARGET_SIZEOF_LONG): ... this.
14999 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15000 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15001 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15002 to ...
15003 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15004 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15005 (GRUB_TARGET_SIZEOF_LONG): ... this.
15006 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15007 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15008
15009 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
15010 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
15011 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
15012 instead of GRUB_HOST_SIZEOF_LONG.
15013 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
15014 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
15015 GRUB_CPU_WORDS_BIGENDIAN.
15016 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
15017 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
15018 grub_host_ssize_t.
15019
15020 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
15021 (genmoddep_SOURCES): Likewise.
15022 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
15023 (genmoddep_SOURCES): Likewise.
15024 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
15025 (genmoddep_SOURCES): Likewise.
15026 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
15027 Likewise.
15028 (genmoddep_SOURCES): Likewise.
15029
15030 * genmoddep.awk: New file.
15031
15032 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
15033 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
15034 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
15035 (PModule::rule): Likewise.
15036 (Program::rule): Likewise.
15037 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
15038 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
15039 respectively.
15040
15041 * configure.ac: Rewritten intensively to use host and target
15042 instead of build and host, respectively.
15043
15044 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
15045 (host_cpu): Removed.
15046 (target_cpu): New variable.
15047 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
15048 (BUILD_CC): Removed.
15049 (BUILD_CFLAGS): Likewise.
15050 (BUILD_CPPFLAGS): Likewise.
15051 (TARGET_CC): New variable.
15052 (TARGET_CFLAGS): Likewise.
15053 (TARGET_CPPFLAGS): Likewise.
15054 (TARGET_LDFLAGS): Likewise.
15055 (AWK): Likewise.
15056 (include): Use target_cpu instead of host_cpu.
15057 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 15058
b977bf01 15059 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
15060
f09771a1 150612006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
15062
15063 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
15064 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
15065 field 'false' to 'exec_on_false'.
15066 (grub_script_create_cmdif): Renamed argument names to reflect above
15067 changes.
15068
15069 * normal/execute.c (grub_script_execute_cmdif): Likewise.
15070
15071 * normal/script.c (grub_script_create_cmdif): Likewise.
15072
118f4fb3 150732006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
15074
15075 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
15076 top.
15077 (grub_hfsplus_btree_recptr): Likewise.
15078 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
15079 FILEBLOCK both to pass a block number and store next block
15080 number.
15081 (grub_hfsplus_read_block): Rewritten heavily to support an extent
15082 overflow file correctly. Specify errors appropriately, because
15083 fshelp expects that GRUB_ERRNO is set when fails. Reuse
15084 grub_hfsplus_btree_recptr to get the pointer to a found key.
15085 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
15086 is found.
15087
15088 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
15089 linux.mod.
15090 (_linux_mod_SOURCES): New variable.
15091 (_linux_mod_CFLAGS): Likewise.
15092 (_linux_mod_LDFLAGS): Likewise.
15093 (linux_mod_SOURCES): Likewise.
15094 (linux_mod_CFLAGS): Likewise.
15095 (linux_mod_LDFLAGS): Likewise.
15096
15097 * DISTLIST: Added loader/i386/efi/linux.c,
15098 loader/i386/efi/linux_normal.c and
15099 include/grub/i386/efi/loader.h.
15100
15101 * loader/i386/efi/linux.c: New file.
15102 * loader/i386/efi/linux_normal.c: Likewise.
15103 * include/grub/i386/efi/loader.h: Likewise.
15104
89a7d726 151052006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
15106
15107 * commands/blocklist.c: New file.
15108
15109 * DISTLIST: Added commands/blocklist.c.
15110
15111 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 15112 color for the background, and a darker color for the foreground.
89a7d726 15113 (grub_console_checkkey): Return READ_KEY.
15114 (grub_console_cls): Set the background to
15115 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
15116
15117 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
15118
15119 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
15120 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
15121
15122 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
15123 prototype.
15124
15125 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
15126 BG. The spec is wrong again.
15127
15128 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
15129 prototype.
15130 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
15131
15132 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15133 commands/blocklist.c.
15134 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 15135
89a7d726 15136 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
15137 (blocklist_mod_SOURCES): New variable.
15138 (blocklist_mod_CFLAGS): Likewise.
15139 (blocklist_mod_LDFLAGS): Likewise.
15140
75c8f258 151412006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
15142
15143 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
15144 duplication.
15145 (lba_mode): Use %eax more intensively to reduce the code size.
15146
da2eb181 151472006-05-20 Marco Gerards <marco@gnu.org>
15148
15149 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
15150
15151 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
15152 for `menuentry'.
15153 (script): Accept leading newlines.
15154 (newlines): New rule to describe 0 or more newlines.
15155 (commands): Accept `command' with trailing newline. Fixed the
15156 order in which arguments were passed to `grub_script_add_cmd'.
15157 Accept commands separated by newlines.
15158 (function): Changed to accept newlines.
15159 (menuentry) Rewritten.
15160
15161 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
15162 front of the list, instead of to the end.
15163
577b4050 151642006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
15165
15166 * util/i386/pc/grub-install.in (bindir): New variable.
15167 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
15168 Shaver <lbgwjl@gmail.com>.
15169
0d6e1189 151702006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
15171
15172 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
15173 grub/machine/linux.h
15174 * loader/i386/pc/linux.c: Likewise.
15175
15176 * include/grub/i386/pc/linux.h: Moved to ...
15177 * include/grub/i386/linux.h: ... here.
15178
15179 * include/grub/i386/linux.h (struct linux_kernel_params): New
15180 struct.
f19dbdb7 15181
31b86e9f 151822006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
15183
15184 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
15185 checking.
15186 (grub_video_vbe_blit_glyph): Likewise.
15187 (grub_video_vbe_blit_bitmap): Likewise.
15188 (grub_video_vbe_blit_render_target): Likewise.
15189
83b984de 151902006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
15191
15192 * configure.ac (--with-platform): Properly quote the square
15193 brackets.
15194
5f0413bd 151952006-05-08 Marco Gerards <marco@gnu.org>
15196
15197 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
15198 this...
15199 (kernel_elf_HEADERS): ...to this. Updated all users.
15200 (grubof_symlist.c): Renamed from this...
15201 (kernel_elf_symlist.c): ...to this. Updated all users.
15202 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15203 (grubof_SOURCES): Renamed from this...
15204 (kernel_elf_SOURCES): ...to this.
15205 (grubof_HEADERS): Renamed from this...
15206 (kernel_elf_HEADERS): ...to this.
15207 (grubof_CFLAGS): Renamed from this...
15208 (kernel_elf_CFLAGS): ...to this.
15209 (grubof_ASFLAGS): Renamed from this...
15210 (kernel_elf_ASFLAGS): ...to this.
15211 (grubof_LDFLAGS): Renamed from this...
15212 (kernel_elf_LDFLAGS): ...to this.
15213
15214 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
15215 this...
15216 (kernel_elf_HEADERS): ...to this. Updated all users.
15217 (grubof_symlist.c): Renamed from this...
15218 (kernel_elf_symlist.c): ...to this. Updated all users.
15219 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15220 (grubof_SOURCES): Renamed from this...
15221 (kernel_elf_SOURCES): ...to this.
15222 (grubof_HEADERS): Renamed from this...
15223 (kernel_elf_HEADERS): ...to this.
15224 (grubof_CFLAGS): Renamed from this...
15225 (kernel_elf_CFLAGS): ...to this.
15226 (grubof_ASFLAGS): Renamed from this...
15227 (kernel_elf_ASFLAGS): ...to this.
15228 (grubof_LDFLAGS): Renamed from this...
15229 (kernel_elf_LDFLAGS): ...to this.
15230
15231 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
15232 `kernel.elf' instead of `grubof'.
15233
05568c2e 152342006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
15235
15236 Add --with-platform to configure. Use pkglibdir instead of
15237 pkgdatadir. This is reported by Roger Leigh.
15238
15239 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
15240 (host_vendor): Likewise.
15241 (host_os): Likewise.
15242 (pkgdatadir): Likewise.
15243 (platform): New variable.
15244 (pkglibdir): Likewise.
15245 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 15246
05568c2e 15247 * util/i386/pc/grub-install.in (datadir): Removed.
15248 (host_vendor): Likewise.
15249 (host_os): Likewise.
15250 (pkgdatadir): Likewise.
15251 (platform): New variable.
15252 (pkglibdir): Likewise.
15253 Use PKGLIBDIR instead of PKGDATADIR.
15254
15255 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
15256 instead of GRUB_DATADIR.
15257 (main): Likewise.
15258 * util/i386/pc/grub-mkimage.c (usage): Likewise.
15259 (main): Likewise.
15260 * util/i386/efi/grub-mkimage.c (usage): Likewise.
15261 (main): Likewise.
15262
15263 * configure.ac (--with-platform): New option.
15264 Use PLATFORM instead of HOST_VENDOR to specify a platform.
15265
15266 * Makefile.in: Include a makefile based on PLATFORM instead of
15267 HOST_VENDOR.
15268 (pkgdatadir): Not appended by the machine type.
15269 (pkglibdir): Appended by the machine type.
15270 (host_vendor): Removed.
15271 (platform): New variable.
15272 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
15273 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
15274 (uninstall): Likewise.
15275
4e93851c 152762006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
15277
15278 Use the environment context in the menu. Remove the commands
15279 "default" and "timeout", and use variables instead.
f19dbdb7 15280
4e93851c 15281 * normal/menu.c: Include grub/env.h.
15282 (print_entry): Cast TITLE to silence gcc.
15283 (get_timeout): New function.
15284 (set_timeout): Likewise.
15285 (get_entry_number): Likewise.
15286 (run_menu): Use a default entry, a fallback entry and a timeout
15287 in the environment variables "default", "fallback" and
15288 "timeout". Also, tweak the default entry if it is not within the
15289 current menu entries.
15290 (grub_menu_run): Use a fallback entry in the environment variable
15291 "fallback".
15292
15293 * normal/main.c (read_config_file): Do not initialize
15294 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
15295 NEWMENU->TIMEOUT.
15296 (grub_normal_execute): Use a data slot to store the menu.
15297
15298 * include/grub/normal.h (struct grub_menu): Removed default_entry,
15299 fallback_entry and timeout.
15300 (struct grub_menu_list): Removed.
15301 (grub_menu_list_t): Likewise.
15302 (struct grub_context): Likewise.
15303 (grub_context_t): Likewise.
15304 (grub_context_get): Likewise.
15305 (grub_context_get_current_menu): Likewise.
15306 (grub_context_push_menu): Likewise.
15307 (grub_context_pop_menu): Likewise.
15308 (grub_default_init): Likewise.
15309 (grub_default_fini): Likewise.
15310 (grub_timeout_init): Likewise.
15311 (grub_timeout_fini): Likewise.
15312
15313 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
15314 and timeout.mod.
15315 (normal_mod_SOURCES): Removed normal/context.c.
15316
15317 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
15318 commands/default.c, commands/timeout.c and normal/context.c.
15319 (normal_mod_SOURCES): Removed normal/context.c.
15320
15321 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
15322 commands/timeout.c and normal/context.c.
15323 (normal_mod_SOURCES): Removed normal/context.c.
15324
15325 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
15326 commands/default.c, commands/timeout.c and normal/context.c.
15327 (normal_mod_SOURCES): Removed normal/context.c.
15328
15329 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
15330 timeout.mod.
15331 (default_mod_SOURCES): Removed.
15332 (default_mod_CFLAGS): Likewise.
15333 (default_mod_LDFLAGS): Likewise.
15334 (timeout_mod_SOURCES): Removed.
15335 (timeout_mod_CFLAGS): Likewise.
15336 (timeout_mod_LDFLAGS): Likewise.
15337
15338 * DISTLIST: Removed commands/default.c, commands/timeout.c and
15339 normal/context.c.
15340
15341 * commands/default.c: Removed.
15342 * commands/timeout.c: Likewise.
15343 * normal/context.c: Likewise.
15344
1eb9cc1d 153452006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
15346
15347 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
15348
385bd9c1 153492006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
15350
15351 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
15352 "next" to "prev" for readability.
15353 (struct grub_env_sorted_var): New struct.
15354 (grub_env_context): Renamed to ...
15355 (initial_context): ... this.
15356 (grub_env_var_context): Renamed to ...
15357 (current_context): ... this.
15358 (grub_env_find): Look only at CURRENT_CONTEXT.
15359 (grub_env_context_open): Rewritten to copy exported variables from
15360 previous context.
15361 (grub_env_context_close): Rewritten according to the new
15362 scheme. Also, add an assertion to prevent the initial context from
15363 removed.
15364 (grub_env_insert): Removed the code for the sorted list.
15365 (grub_env_remove): Likewise.
15366 (grub_env_export): Simply mark the variable with
15367 GRUB_ENV_VAR_GLOBAL.
15368 (grub_env_set): A cosmetic change for naming consistency.
15369 (grub_env_get): Likewise.
15370 (grub_env_unset): Likewise.
15371 (grub_env_iterate): Rewritten to sort variables within this
15372 function.
15373 (grub_register_variable_hook): Fixed for naming consistency. Call
15374 grub_env_find again, only if NAME is not found at the first time.
15375 (mangle_data_slot_name): New function.
15376 (grub_env_set_data_slot): Likewise.
15377 (grub_env_get_data_slot): Likewise.
15378 (grub_env_unset_data_slot): Likewise.
15379
15380 * include/grub/env.h (grub_env_var_type): New enum.
15381 (GRUB_ENV_VAR_LOCAL): New constant.
15382 (GRUB_ENV_VAR_GLOBAL): Likewise.
15383 (GRUB_ENV_VAR_DATA): Likewise.
15384 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
15385 "type".
15386 (grub_env_set): Replace VAR with NAME for consistency.
15387 (grub_register_variable_hook): Likewise.
15388 (grub_env_export): Specify the name of the argument.
15389 (grub_env_set_data_slot): New prototype.
15390 (grub_env_get_data_slot): Likewise.
15391 (grub_env_unset_data_slot): Likewise.
15392
7f362539 153932006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15394
15395 Extend the loader so that GRUB can accept a loader which comes
15396 back to GRUB when a loaded image exits. Also, this change adds
15397 support for a chainloader on EFI.
f19dbdb7 15398
7f362539 15399 * term/efi/console.c: Include grub/misc.h.
15400 (grub_console_checkkey): Display a scan code on the top for
15401 debugging. This will be removed once the EFI port gets stable.
15402 Correct the scan code mapping.
15403
15404 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
15405 allocate memory from larger regions, in order to reduce the number
15406 of allocated regions. Otherwise, the MacOSX loader panics.
15407 (filter_memory_map): Avoid less than 1MB for compatibility with
15408 other loaders.
15409 (add_memory_regions): Allocate from the tail of a region, if
15410 possible, to avoid allocating a region near to 1MB, for the MacOSX
15411 loader.
15412
15413 * kern/efi/init.c (grub_efi_set_prefix): Specify
15414 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
15415
15416 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
15417 argument IMAGE_HANDLE and specify it to get a loaded image.
15418 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
15419 grub_efi_get_loaded_image.
fe6b695a 15420 (grub_efi_get_filename): Divide the length by the size of
7f362539 15421 grub_efi_char16_t.
15422 (grub_efi_get_device_path): New function.
15423 (grub_efi_print_device_path): Print End Device Path nodes. Divide
15424 the length by the size of grub_efi_char16_t for a file path device
15425 path node.
15426
15427 * kern/loader.c (grub_loader_noreturn): New variable.
15428 (grub_loader_set): Accept a new argument NORETURN. Set
15429 GRUB_LOADER_NORETURN to NORETURN.
15430 All callers changed.
15431 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
15432 grub_machine_fini.
15433
15434 * include/grub/efi/efi.h (grub_efi_get_device_path): New
15435 prototype.
15436 (grub_efi_get_loaded_image): Take an argument to specify an image
15437 handle.
15438
15439 * include/grub/loader.h (grub_loader_set): Added one more argument
15440 NORETURN.
15441
15442 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
15443 instead of grub_efi_open_protocol.
15444 (grub_efidisk_get_device_name): Likewise.
15445 (grub_efidisk_close): Print a newline.
15446 (grub_efidisk_get_device_handle): Fixed to use
15447 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
15448 GRUB_EFI_DEVICE_PATH_TYPE.
15449
15450 * disk/efi/efidisk.c (device_path_guid): Moved to ...
15451 * kern/efi/efi.c (device_path_guid): ... here.
15452
15453 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
15454 chain.mod.
15455 (kernel_mod_HEADERS): Added efi/disk.h.
15456 (_chain_mod_SOURCES): New variable.
15457 (_chain_mod_CFLAGS): Likewise.
15458 (_chain_mod_LDFLAGS): Likewise.
15459 (chain_mod_SOURCES): Likewise.
15460 (chain_mod_CFLAGS): Likewise.
15461 (chain_mod_LDFLAGS): Likewise.
15462
15463 * DISTLIST: Added include/grub/efi/chainloader.h,
15464 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
15465
15466 * include/grub/efi/chainloader.h: New file.
15467 * loader/efi/chainloader.c: Likewise.
15468 * loader/efi/chainloader_normal.c: Likewise.
15469
c0111d6e 154702006-04-30 Marco Gerards <marco@gnu.org>
15471
15472 * commands/configfile.c (grub_cmd_source): New function.
15473 (GRUB_MOD_INIT): Register the commands `source' and `.'.
15474 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
15475
df5341da 154762006-04-30 Marco Gerards <marco@gnu.org>
15477
15478 * normal/execute.c (grub_script_execute_cmd): Change the return
15479 type to `grub_err_t'. Correctly return the error.
15480 (grub_script_execute_cmdline): In case a command line is not a
15481 command or a function, try to interpret it as an assignment.
15482
f85934bd 154832006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15484
15485 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
15486 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
15487 skip a node whose name is obviously invalid as UTF-16,
15488 i.e. contains a NUL character. Stop the iteration when the last
15489 directory entry is found. Instead of using the return value of
15490 grub_hfsplus_btree_iterate_node, store the value in RET and use
15491 it, because the iterator can be stopped by the last directory
15492 entry.
15493
8f8a2cf8 154942006-04-30 Marco Gerards <marco@gnu.org>
15495
15496 * include/grub/env.h (grub_env_export): New prototype. Reported
15497 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
15498
a27e84ce 154992006-04-30 Marco Gerards <marco@gnu.org>
15500
15501 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
15502 size of the extents in a catalog file record.
15503
eaef0553 155042006-04-29 Marco Gerards <marco@gnu.org>
15505
15506 * commands/configfile.c (grub_cmd_configfile): Execute the
15507 configfile within its own context.
15508
15509 * include/grub/env.h (grub_env_context_open): New prototype.
15510 (grub_env_context_close): Likewise.
15511
15512 * kern/env.c (grub_env): Removed.
15513 (grub_env_sorted): Likewise.
15514 (grub_env_context): New variable.
15515 (grub_env_var_context): Likewise.
15516 (grub_env_find): Search both the active context and the global
15517 context.
15518 (grub_env_context_open): New function.
15519 (grub_env_context_close): Likewise.
15520 (grub_env_insert): Likewise.
15521 (grub_env_remove): Likewise.
15522 (grub_env_export): Likewise.
15523 (grub_env_set): Changed to use helper functions to avoid code
15524 duplication.
15525 (grub_env_iterate): Rewritten so both the current context and the
15526 global context are being used.
15527
15528 * normal/command.c (export_command): New function.
15529 (grub_command_init): Register the `export' function.
15530
7b455f4d 155312006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
15532
15533 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
15534 explicitly to suppress gcc's warnings.
15535 * fs/fat.c (grub_fat_find_dir): Likewise.
15536 (grub_fat_label): Likewise.
15537 * fs/xfs.c (grub_xfs_read_inode): Likewise.
15538 (grub_xfs_mount): Likewise.
15539 (grub_xfs_label): Likewise.
15540 * fs/affs.c (grub_affs_mount): Likewise.
15541 (grub_affs_label): Likewise.
15542 (grub_affs_iterate_dir): Likewise.
15543 * fs/sfs.c (grub_sfs_mount): Likewise.
15544 (grub_sfs_iterate_dir): Likewise.
15545 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
15546 * fs/hfs.c (grub_hfs_mount): Likewise.
15547 (grub_hfs_cmp_catkeys): Likewise.
15548 (grub_hfs_find_dir): Likewise.
15549 (grub_hfs_dir): Likewise.
15550 (grub_hfs_label): Likewise.
15551 * fs/jfs.c (grub_jfs_mount): Likewise.
15552 (grub_jfs_opendir): Likewise.
15553 (grub_jfs_getent): Likewise.
15554 (grub_jfs_lookup_symlink): Likewise.
15555 (grub_jfs_label): Likewise.
15556 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
15557 (grub_hfsplus_iterate_dir): Likewise.
15558 (grub_hfsplus_btree_iterate_node): Made static.
15559
15560 * util/grub-emu.c (prefix): New variable.
15561 (grub_machine_set_prefix): New function.
15562 (main): Do not set the environment variable "prefix" here. Only
15563 set PREFIX, which is used later by grub_machine_set_prefix.
15564
15565 * include/grub/video.h: Do not include grub/symbol.h.
15566 (grub_video_register): Not exported. This symbol is not defined in
15567 the kernel.
15568 (grub_video_unregister): Likewise.
15569 (grub_video_iterate): Likewise.
15570 (grub_video_setup): Likewise.
15571 (grub_video_restore): Likewise.
15572 (grub_video_get_info): Likewise.
15573 (grub_video_get_blit_format): Likewise.
15574 (grub_video_set_palette): Likewise.
15575 (grub_video_get_palette): Likewise.
15576 (grub_video_set_viewport): Likewise.
15577 (grub_video_get_viewport): Likewise.
15578 (grub_video_map_color): Likewise.
15579 (grub_video_map_rgb): Likewise.
15580 (grub_video_map_rgba): Likewise.
15581 (grub_video_fill_rect): Likewise.
15582 (grub_video_blit_glyph): Likewise.
15583 (grub_video_blit_bitmap): Likewise.
15584 (grub_video_blit_render_target): Likewise.
15585 (grub_video_scroll): Likewise.
15586 (grub_video_swap_buffers): Likewise.
15587 (grub_video_create_render_target): Likewise.
15588 (grub_video_delete_render_target): Likewise.
15589 (grub_video_set_active_render_target): Likewise.
15590
15591 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
15592 Undefined.
15593 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
15594
15595 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
15596 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15597 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15598 instead of $(srcdir)/genkernsyms.sh.
15599
15600 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
15601 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15602 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15603 instead of $(srcdir)/genkernsyms.sh.
15604
15605 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15606 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15607 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15608 instead of $(srcdir)/genkernsyms.sh.
15609
15610 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15611 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15612 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15613 instead of $(srcdir)/genkernsyms.sh.
15614
15615 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15616 genkernsyms.sh.
15617
15618 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15619 genkernsyms.sh.
15620 (gensymlist.sh): New target.
15621 (genkernsyms.sh): Likewise.
15622
15623 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15624 genkernsyms.sh.in and gensymlist.sh.in.
15625
15626 * genkernsyms.sh: Removed.
15627 * gensymlist.sh: Likewise.
f19dbdb7 15628
7b455f4d 15629 * genkernsyms.sh.in: New file.
15630 * gensymlist.sh.in: Likewise.
15631
1885bb27 156322006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15633
15634 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15635 clobber "prefix", since we may have already set it manually.
15636
71538dff 156372006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15638
15639 * kern/misc.c (abort): New alias for grub_abort.
15640
2965c7cc 156412006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
15642
15643 A new machine-specific function "grub_machine_set_prefix" is
15644 defined. This is called after loading modules, so that a prefix
15645 initialization can use modules. Also, this change adds an
15646 intensive debugging feature for the memory manager via the
15647 configure option "--enable-mm-debug".
f19dbdb7 15648
2965c7cc 15649 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
15650 PART.LEN.
15651
15652 * kern/sparc64/ieee1275/init.c (abort): Removed.
15653 (grub_stop): Likewise.
15654 (grub_exit): New function.
15655 (grub_set_prefix): Renamed to ...
15656 (grub_machine_set_prefix): ... this.
15657 (grub_machine_init): Do not call grub_set_prefix.
15658
15659 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
15660 (grub_machine_set_prefix): ... this.
15661 (grub_machine_init): Do not call grub_set_prefix.
15662
15663 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
15664 (grub_machine_init): Do not set the prefix here.
15665
15666 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
15667
15668 * kern/efi/init.c: Include grub/mm.h.
15669 (grub_efi_set_prefix): New function.
15670
15671 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
15672 (grub_efi_get_filename): New function.
15673 (grub_print_device_path): Renamed to ...
15674 (grub_efi_print_device_path): ... this.
15675
15676 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
15677 [MM_DEBUG] (grub_realloc): Likewise.
15678 [MM_DEBUG] (grub_free): Likewise.
15679 [MM_DEBUG] (grub_memalign): Likewise.
15680 [MM_DEBUG] (grub_mm_debug): New variable.
15681 [MM_DEBUG] (grub_debug_malloc): New function.
15682 [MM_DEBUG] (grub_debug_free): New function.
15683 [MM_DEBUG] (grub_debug_realloc): New function.
15684 [MM_DEBUG] (grub_debug_memalign): New function.
15685
15686 * kern/misc.c (grub_abort): Print a newline to distinguish
15687 the message.
15688
15689 * kern/main.c (grub_main): Call grub_machine_set_prefix and
15690 grub_set_root_dev after loading modules. This is necessary when
15691 setting a prefix depends on modules.
15692
15693 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
15694 (grub_efi_print_device_path): ... this.
15695 (grub_efi_get_filename): New prototype.
15696 (grub_efi_set_prefix): Likewise.
15697
15698 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
15699 and grub/disk.h.
15700 (grub_efidisk_get_device_handle): New prototype.
15701 (grub_efidisk_get_device_name): Likewise.
15702
15703 * include/grub/mm.h: Include config.h.
15704 (MM_DEBUG): Removed.
15705 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
15706 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
15707 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
15708 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
15709 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
15710 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
15711 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
15712 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
15713 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
15714
15715 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
15716
15717 * disk/efi/efidisk.c: Include grub/partition.h.
15718 (iterate_child_devices): New function.
15719 (add_device): First, compare only last device path nodes, so that
15720 devices are sorted by the types.
15721 (grub_efidisk_get_device_handle): New function.
15722 (grub_efidisk_get_device_name): Likewise.
15723
15724 * configure.ac (--enable-mm-debug): New option to enable the
15725 memory manager debugging feature. This makes the binary much
15726 bigger, so is disabled by default.
15727
9cacaa17 157282006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
15729
15730 Use grub_abort instead of grub_stop, and grub_exit must be
15731 define in each architecture now. Also, this change adds support
15732 for EFI disks.
f19dbdb7 15733
9cacaa17 15734 * util/i386/pc/grub-probefs.c: Include grub/term.h.
15735 (grub_getkey): New function.
15736 (grub_term_get_current): Likewise.
15737
15738 * util/i386/pc/grub-setup.c: Include grub/term.h.
15739 (grub_getkey): New function.
15740 (grub_term_get_current): Likewise.
15741
15742 * util/misc.c (grub_stop): Renamed to ...
15743 (grub_exit): ... this.
15744
15745 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
15746 (grub_exit): ... this.
15747 (grub_machine_init): Use grub_abort instead of abort.
15748 (grub_stop): Removed.
15749
15750 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
15751 abort.
15752
15753 * kern/i386/pc/startup.S (grub_exit): New function.
15754 (cold_reboot): New label.
15755
15756 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
15757 (grub_efi_init): Call grub_efidisk_init.
15758 (grub_efi_fini): Call grub_efidisk_fini.
15759
15760 * kern/efi/efi.c: Include grub/mm.h.
15761 (grub_efi_console_control_guid): Renamed to ...
15762 (console_control_guid): ... this.
15763 (grub_efi_loaded_image_guid): Renamed to ...
15764 (loaded_image_guid): ... this.
15765 (grub_efi_locate_handle): New function.
15766 (grub_efi_open_protocol): Likewise.
15767 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
15768 GRUB_EFI_CONSOLE_CONTROL_GUID.
15769 (grub_efi_exit): Removed.
15770 (grub_stop): Likewise.
15771 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
15772 (grub_exit): New function.
15773 (grub_print_device_path): Likewise.
15774
15775 * kern/rescue.c (grub_rescue_cmd_exit): New function.
15776 (grub_enter_rescue_mode): Register "exit".
15777
15778 * kern/misc.c (grub_real_dprintf): A cosmetic change.
15779 (grub_abort): New function.
15780
15781 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
15782
15783 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
15784
15785 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
15786
15787 * include/grub/efi/efi.h (grub_efi_exit): Removed.
15788 (grub_print_device_path): New prototype.
15789 (grub_efi_locate_handle): Likewise.
15790 (grub_efi_open_protocol): Likewise.
15791
15792 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
15793 * disk/efi/efidisk.c: Likewise.
15794
15795 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
15796
15797 * include/grub/efi/console_control.h
15798 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
15799
15800 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
15801 last 8 bytes as an array.
15802 (GRUB_EFI_DISK_IO_GUID): New macro.
15803 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
15804 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
15805 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
15806 grub_uint8_t.
15807 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
15808 (struct grub_efi_device_path): Rename the member "sub_type" to
15809 "subtype".
15810 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
15811 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
15812 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
15813 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
15814 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
15815 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
15816 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
15817 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
15818 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
15819 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
15820 (struct grub_efi_pci_device_path): New structure.
15821 (grub_efi_pci_device_path_t): New type.
15822 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
15823 (struct grub_efi_pccard_device_path): New structure.
15824 (grub_efi_pccard_device_path_t): New type.
15825 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
15826 (struct grub_efi_memory_mapped_device_path): New structure.
15827 (grub_efi_memory_mapped_device_path_t): New type.
15828 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
15829 (struct grub_efi_vendor_device_path): New structure.
15830 (grub_efi_vendor_device_path_t): New type.
15831 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
15832 (struct grub_efi_controller_device_path): New structure.
15833 (grub_efi_controller_device_path_t): New type.
15834 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
15835 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
15836 (struct grub_efi_acpi_device_path): New structure.
15837 (grub_efi_acpi_device_path_t): New type.
15838 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
15839 (struct grub_efi_expanded_acpi_device_path): New structure.
15840 (grub_efi_expanded_acpi_device_path_t): New type.
15841 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
15842 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
15843 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
15844 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
15845 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
15846 (struct grub_efi_atapi_device_path): New structure.
15847 (grub_efi_atapi_device_path_t): New type.
15848 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
15849 (struct grub_efi_fibre_channel_device_path): New structure.
15850 (grub_efi_fibre_channel_device_path_t): New type.
15851 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
15852 (struct grub_efi_1394_device_path): New structure.
15853 (grub_efi_1394_device_path_t): New type.
15854 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
15855 (struct grub_efi_usb_device_path): New structure.
15856 (grub_efi_usb_device_path_t): New type.
15857 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
15858 (struct grub_efi_usb_class_device_path): New structure.
15859 (grub_efi_usb_class_device_path_t): New type.
15860 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
15861 (struct grub_efi_i2o_device_path): New structure.
15862 (grub_efi_i2o_device_path_t): New type.
15863 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
15864 (struct grub_efi_mac_address_device_path): New structure.
15865 (grub_efi_mac_address_device_path_t): New type.
15866 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
15867 (struct grub_efi_ipv4_device_path): New structure.
15868 (grub_efi_ipv4_device_path_t): New type.
15869 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
15870 (struct grub_efi_ipv6_device_path): New structure.
15871 (grub_efi_ipv6_device_path_t): New type.
15872 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
15873 (struct grub_efi_infiniband_device_path): New structure.
15874 (grub_efi_infiniband_device_path_t): New type.
15875 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
15876 (struct grub_efi_uart_device_path): New structure.
15877 (grub_efi_uart_device_path_t): New type.
15878 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
15879 (struct grub_efi_vendor_messaging_device_path): New structure.
15880 (grub_efi_vendor_messaging_device_path_t): New type.
15881 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
15882 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
15883 (struct grub_efi_hard_drive_device_path): New structure.
15884 (grub_efi_hard_drive_device_path_t): New type.
15885 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
15886 (struct grub_efi_cdrom_device_path): New structure.
15887 (grub_efi_cdrom_device_path_t): New type.
15888 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
15889 (struct grub_efi_vendor_media_device_path): New structure.
15890 (grub_efi_vendor_media_device_path_t): New type.
15891 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
15892 (struct grub_efi_file_path_device_path): New structure.
15893 (grub_efi_file_path_device_path_t): New type.
15894 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
15895 (struct grub_efi_protocol_device_path): New structure.
15896 (grub_efi_protocol_device_path_t): New type.
15897 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
15898 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
15899 (struct grub_efi_bios_device_path): New structure.
15900 (grub_efi_bios_device_path_t): New type.
15901 (struct grub_efi_disk_io): New structure.
15902 (grub_efi_disk_io_t): New type.
15903 (struct grub_efi_block_io_media): New structure.
15904 (grub_efi_block_io_media_t): New type.
15905 (struct grub_efi_block_io): New structure.
15906 (grub_efi_block_io_t): New type.
15907
15908 * include/grub/misc.h (grub_stop): Removed.
15909 (grub_exit): New prototype.
15910 (grub_abort): Likewise.
15911
15912 * include/grub/disk.h (enum grub_disk_dev_id): Added
15913 GRUB_DISK_DEVICE_EFIDISK_ID.
15914
15915 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15916 disk/efi/efidisk.c.
15917 (kernel_syms.lst): Remove the target if an error occurs.
15918
49986a9f 159192006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
15920
15921 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15922 as it was simply too buggy.
15923
970d3b8a 159242006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
15925
15926 * kern/misc.c (grub_lltoa): New function.
15927 (grub_vsprintf): Added support for the long long suffix,
15928 i.e. "ll".
15929
ff04ec24 159302006-04-20 Hollis Blanchard <hollis@penguinppc.org>
15931
15932 * Makefile.in (LDFLAGS): Add variable.
15933 (LD): Remove variable.
15934 * configure.ac: Add -m32 to LDFLAGS.
15935 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15936 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15937 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15938 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15939 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15940 variables.
15941 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15942 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15943 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15944
37e5e1a4 159452006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
15946
15947 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15948 length for unknown glyph.
15949
c352d8dd 159502006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
15951
2eab1c0d 15952 Add support for pre-loaded modules into the EFI port.
f19dbdb7 15953
2eab1c0d 15954 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15955 completely. Accept one more argument DIR. The caller has changed.
15956
15957 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15958
15959 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15960 (grub_efi_loaded_image_guid): New variable.
15961 (grub_efi_get_loaded_image): New function.
15962 (grub_arch_modules_addr): Likewise.
15963
15964 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15965 prototype.
15966
15967 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15968 (struct grub_efi_loaded_image): New structure.
15969 (grub_efi_loaded_image_t): New type.
15970
159712006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 15972
c352d8dd 15973 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15974 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15975 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15976
6d01d6b4 159772006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
15978
15979 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15980
976a4ea0 159812006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
15982
15983 * DISTLIST: Added include/grub/efi/console.h,
15984 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15985 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15986
15987 * include/grub/efi/console.h: New file.
15988 * include/grub/efi/time.h: Likewise.
15989 * include/grub/i386/efi/kernel.h: Likewise.
15990 * kern/efi/init.c: Likewise.
15991 * kern/efi/mm.c: Likewise.
15992 * term/efi/console.c: Likewise.
f19dbdb7 15993
976a4ea0 15994 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15995 (grub_stop): Removed.
15996 (grub_get_rtc): Likewise.
15997 (grub_machine_init): Simply call grub_efi_init.
15998 (grub_machine_fini): Call grub_efi_fini.
15999
16000 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
16001 (grub_efi_output_string): Removed.
16002 (grub_efi_stall): New function.
16003 (grub_stop): Likewise.
16004 (grub_get_rtc): Likewise.
16005
16006 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
16007 (grub_efi_stall): New prototype.
16008 (grub_efi_allocate_pages): Likewise.
16009 (grub_efi_free_pages): Likewise.
16010 (grub_efi_get_memory_map): Likewise.
16011 (grub_efi_mm_init): Likewise.
16012 (grub_efi_mm_fini): Likewise.
16013 (grub_efi_init): Likewise.
16014 (grub_efi_fini): Likewise.
16015
16016 * include/grub/i386/efi/time.h: Do not include
16017 grub/symbol.h. Include grub/efi/time.h.
16018 (GRUB_TICKS_PER_SECOND): Removed.
16019 (grub_get_rtc): Likewise.
16020
16021 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
16022 Added padding. The EFI spec is buggy.
16023 (GRUB_EFI_BLACK): New macro.
16024 (GRUB_EFI_BLUE): Likewise.
16025 (GRUB_EFI_GREEN): Likewise.
16026 (GRUB_EFI_CYAN): Likewise.
16027 (GRUB_EFI_RED): Likewise.
16028 (GRUB_EFI_MAGENTA): Likewise.
16029 (GRUB_EFI_BROWN): Likewise.
16030 (GRUB_EFI_LIGHTGRAY): Likewise.
16031 (GRUB_EFI_BRIGHT): Likewise.
16032 (GRUB_EFI_DARKGRAY): Likewise.
16033 (GRUB_EFI_LIGHTBLUE): Likewise.
16034 (GRUB_EFI_LIGHTGREEN): Likewise.
16035 (GRUB_EFI_LIGHTCYAN): Likewise.
16036 (GRUB_EFI_LIGHTRED): Likewise.
16037 (GRUB_EFI_LIGHTMAGENTA): Likewise.
16038 (GRUB_EFI_YELLOW): Likewise.
16039 (GRUB_EFI_WHITE): Likewise.
16040 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
16041 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
16042 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
16043 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
16044 (GRUB_EFI_BACKGROUND_RED): Likewise.
16045 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
16046 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
16047 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
16048 (GRUB_EFI_TEXT_ATTR): Likewise.
16049
16050 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
16051 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16052 (kernel_mod_HEADERS): Added efi/time.h.
16053
83709125 160542006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
16055
16056 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
16057 include/grub/efi/api.h, include/grub/efi/console_control.h,
16058 include/grub/efi/efi.h, include/grub/efi/pe32.h,
16059 include/grub/i386/efi/time.h, kern/efi/efi.c,
16060 kern/i386/efi/init.c, kern/i386/efi/startup.S,
16061 and util/i386/efi/grub-mkimage.c.
16062
16063 * Makefile.in (RMKFILES): Added i386-efi.rmk.
16064
16065 * genmk.rb (PModule#rule): Do not export symbols if
16066 #{prefix}_EXPORTS is set to "no".
16067
16068 * conf/i386-efi.mk: New file.
16069 * conf/i386-efi.rmk: Likewise.
16070 * include/grub/efi/api.h: Likewise.
16071 * include/grub/efi/console_control.h: Likewise.
16072 * include/grub/efi/efi.h: Likewise.
16073 * include/grub/efi/pe32.h: Likewise.
16074 * include/grub/i386/efi/time.h: Likewise.
16075 * kern/efi/efi.c: Likewise.
16076 * kern/i386/efi/init.c: Likewise.
16077 * kern/i386/efi/startup.S: Likewise.
16078 * util/i386/efi/grub-mkimage.c: Likewise.
16079
160802006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 16081
16082 * include/grub/script.h: Include <grub/parser.h> and
16083 "grub_script.tab.h".
16084 (struct grub_lexer_param): New struct.
16085 (struct grub_parser_param): Likewise.
16086 (grub_script_create_arglist): Pass the state in an argument.
16087 (grub_script_add_arglist): Likewise.
16088 (grub_script_create_cmdline): Likewise.
16089 (grub_script_create_cmdblock): Likewise.
16090 (grub_script_create_cmdif): Likewise.
16091 (grub_script_create_cmdmenu): Likewise.
16092 (grub_script_add_cmd): Likewise.
16093 (grub_script_arg_add): Likewise.
16094 (grub_script_lexer_ref): Likewise.
16095 (grub_script_lexer_deref): Likewise.
16096 (grub_script_lexer_record_start): Likewise.
16097 (grub_script_lexer_record_stop): Likewise.
16098 (grub_script_mem_record): Likewise.
16099 (grub_script_mem_record_stop): Likewise.
16100 (grub_script_malloc): Likewise.
16101 (grub_script_yylex): Likewise.
16102 (grub_script_yyparse): Likewise.
16103 (grub_script_yyerror): Likewise.
16104 (grub_script_yylex): Likewise.
16105 (grub_script_lexer_init): Return the state.
16106
16107 * normal/lexer.c (grub_script_lexer_state): Removed variable.
16108 (grub_script_lexer_done): Likewise.
16109 (grub_script_lexer_getline): Likewise.
16110 (grub_script_lexer_refs): Likewise.
16111 (script): Likewise.
16112 (newscript): Likewise.
16113 (record): Likewise.
16114 (recording): Likewise.
16115 (recordpos): Likewise.
16116 (recordlen): Likewise.
16117 (grub_script_lexer_init): Return the state instead of setting
16118 global variables.
16119 (grub_script_lexer_ref): Use the newly added argument for state
16120 instead of globals.
16121 (grub_script_lexer_deref): Likewise.
16122 (grub_script_lexer_record_start): Likewise.
16123 (grub_script_lexer_record_stop): Likewise.
16124 (recordchar): Likewise.
16125 (nextchar): Likewise.
16126 (grub_script_yylex2): Likewise.
16127 (grub_script_yylex): Likewise.
16128 (grub_script_yyerror): Likewise.
16129
16130 * normal/parser.y (func_mem): Removed variable.
16131 (menu_entry): Likewise.
16132 (err): Likewise.
16133 (%lex-param): New parser option.
16134 (%parse-param): Likewise.
16135 (script): Always return the AST.
16136 (argument): Pass the state around.
16137 (arguments): Likewise.
16138 (grubcmd): Likewise.
16139 (commands): Likewise.
16140 (function): Likewise.
16141 (menuentry): Likewise.
16142 (if_statement): Likewise.
16143 (if): Likewise.
16144
16145 * normal/script.c (grub_script_memused): Removed variable.
16146 (grub_script_parsed): Likewise.
16147 (grub_script_malloc): Added a state argument. Use that instead of
16148 global variables.
16149 (grub_script_mem_record): Likewise.
16150 (grub_script_mem_record_stop): Likewise.
16151 (grub_script_arg_add): Likewise.
16152 (grub_script_add_arglist): Likewise.
16153 (grub_script_create_cmdline): Likewise.
16154 (grub_script_create_cmdif): Likewise.
16155 (grub_script_create_cmdmenu): Likewise.
16156 (grub_script_add_cmd): Likewise.
16157 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 16158
e2a8c904 161592006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 16160
16161 * normal/command.c (grub_command_init): Remove the title command.
16162
16163 * normal/lexer.c (grub_script_yylex): Renamed from this...
16164 (grub_script_yylex2): ... to this.
16165 (grub_script_yylex): New function. Temporary
16166 introduced to filter some tokens.
16167 (grub_script_yyerror): Print a newline.
16168
16169 * normal/main.c (read_config_file): Output information about the
16170 lines that contain errors. Wait for a key after all lines have
16171 been processed. Don't return an empty menu.
16172
16173 * normal/parser.y (func_mem): Don't initialize.
16174 (menu_entry): Likewise.
16175 (err): New variable.
16176 (script): Don't return anything when an error was encountered.
16177 (ws, returns): Removed rules.
16178 (argument): Disabled concatenated variable support.
16179 (arguments): Remove explicit separators.
16180 (grubcmd): Likewise.
16181 (function): Likewise.
16182 (menuentry): Likewise.
16183 (if): Likewise.
16184 (commands): Likewise. Add error handling.
16185
16186 * normal/script.c (grub_script_create_cmdline): If
16187 `grub_script_parsed' is 0, assume the parser encountered an error.
16188
c9a86192 161892006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
16190
16191 * configure.ac: Add support for EFI. Fix the typo
16192 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
16193
70f3b243 161942006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16195
16196 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
16197 foreign multibyte characters should be shown correctly.
16198
65f201ad 161992006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16200
16201 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
16202 calculation.
16203 (read_config_file): Made it to close file before returning.
16204
b4b93674 162052006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
16206
16207 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
16208 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
16209 video/i386/pc/vbefill.c.
16210
16211 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
16212 video/i386/pc/vbefill.c.
16213
16214 * include/grub/video.h (grub_video_blit_format): New enum.
16215 (grub_video_mode_info): Added new member blit_format.
16216 (grub_video_get_blit_format): New function prototype.
16217
16218 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
16219 function prototype.
16220 (grub_video_vbe_map_rgb): Likewise.
16221 (grub_video_vbe_unmap_color): Likewise.
16222
16223 * include/grub/i386/pc/vbeblit.h: New file.
16224
16225 * include/grub/i386/pc/vbefill.h: New file.
16226
16227 * video/video.c (grub_video_get_blit_format): New function.
16228 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
16229 (grub_video_vbe_map_rgb): Likewise.
16230 (grub_video_vbe_unmap_color): Likewise.
16231
16232 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
16233 optimized fills.
16234 (grub_video_vbe_blit_render_target): Changed to use more optimized
16235 blits.
16236 (grub_video_vbe_setup): Added detection for optimized settings.
16237 (grub_video_vbe_create_render_target): Likewise.
16238
16239 * video/i386/pc/vbeblit.c: New file.
16240
16241 * video/i386/pc/vbefill.c: New file.
16242
c2379b9c 162432006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
16244
16245 * font/manager.c (grub_font_get_glyph): Removed font fixup from
16246 here...
16247
16248 * util/unifont2pff.rb: ... and moved it to here. Improved argument
16249 parsing to support both hex and dec ranges. If filename was missing
16250 show usage information.
16251
bd0d7896 162522006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
16253
16254 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
16255 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
16256
16257 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
16258 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
16259 (video_mod_SOURCES): Added.
16260 (video_mod_CFLAGS): Likewise.
16261 (video_mod_LDFLAGS): Likewise.
16262 (gfxterm_mod_SOURCES): Likewise.
16263 (gfxterm_mod_CFLAGS): Likewise.
16264 (gfxterm_mod_LDFLAGS): Likewise.
16265 (videotest_mod_SOURCES): Likewise.
16266 (videotest_mod_CFLAGS): Likewise.
16267 (videotest_mod_LDFLAGS): Likewise.
16268 (vesafb_mod_SOURCES): Removed.
16269 (vesafb_mod_CFLAGS): Likewise.
16270 (vesafb_mod_LDFLAGS): Likewise.
16271 (vga_mod_SOURCES): Likewise.
16272 (vga_mod_CFLAGS): Likewise.
16273 (vga_mod_LDFLAGS): Likewise.
16274
16275 * commands/videotest.c: New file.
16276
16277 * font/manager.c (fill_with_default_glyph): Modified to use
16278 grub_font_glyph.
16279 (grub_font_get_glyph): Likewise.
16280 (fontmanager): Renamed from this...
16281 (font_manager): ... to this.
16282
16283 * include/grub/font.h (grub_font_glyph): Added new structure.
16284 (grub_font_get_glyph): Modified to use grub_font_glyph.
16285
16286 * include/grub/misc.h (grub_abs): Added as inline function.
16287
16288 * include/grub/video.h: New file.
16289
16290 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
16291 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
16292 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
16293 (grub_vbe_get_controller_info): Renamed from this...
16294 (grub_vbe_bios_get_controller_info): ... to this.
16295 (grub_vbe_get_mode_info): Renamed from this...
16296 (grub_vbe_bios_get_mode_info): ... to this.
16297 (grub_vbe_set_mode): Renamed from this...
16298 (grub_vbe_bios_set_mode): ... to this.
16299 (grub_vbe_get_mode): Renamed from this...
16300 (grub_vbe_bios_get_mode): ... to this.
16301 (grub_vbe_set_memory_window): Renamed from this...
16302 (grub_vbe_bios_set_memory_window): ... to this.
16303 (grub_vbe_get_memory_window): Renamed from this...
16304 (grub_vbe_bios_get_memory_window): ... to this.
16305 (grub_vbe_set_scanline_length): Renamed from this...
16306 (grub_vbe_set_scanline_length): ... to this.
16307 (grub_vbe_get_scanline_length): Renamed from this...
16308 (grub_vbe_bios_get_scanline_length): ... to this.
16309 (grub_vbe_set_display_start): Renamed from this...
16310 (grub_vbe_bios_set_display_start): ... to this.
16311 (grub_vbe_get_display_start): Renamed from this...
16312 (grub_vbe_bios_get_display_start): ... to this.
16313 (grub_vbe_set_palette_data): Renamed from this...
16314 (grub_vbe_bios_set_palette_data): ... to this.
16315 (grub_vbe_set_pixel_rgb): Removed.
16316 (grub_vbe_set_pixel_index): Likewise.
16317
16318 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
16319 from this...
16320 (grub_vbe_bios_get_controller_info): ... to this.
16321 (grub_vbe_get_mode_info): Renamed from this...
16322 (grub_vbe_bios_get_mode_info): ... to this.
16323 (grub_vbe_set_mode): Renamed from this...
16324 (grub_vbe_bios_set_mode): ... to this.
16325 (grub_vbe_get_mode): Renamed from this...
16326 (grub_vbe_bios_get_mode): ... to this.
16327 (grub_vbe_set_memory_window): Renamed from this...
16328 (grub_vbe_bios_set_memory_window): ... to this.
16329 (grub_vbe_get_memory_window): Renamed from this...
16330 (grub_vbe_bios_get_memory_window): ... to this.
16331 (grub_vbe_set_scanline_length): Renamed from this...
16332 (grub_vbe_set_scanline_length): ... to this.
16333 (grub_vbe_get_scanline_length): Renamed from this...
16334 (grub_vbe_bios_get_scanline_length): ... to this.
16335 (grub_vbe_set_display_start): Renamed from this...
16336 (grub_vbe_bios_set_display_start): ... to this.
16337 (grub_vbe_get_display_start): Renamed from this...
16338 (grub_vbe_bios_get_display_start): ... to this.
16339 (grub_vbe_set_palette_data): Renamed from this...
16340 (grub_vbe_bios_set_palette_data): ... to this.
16341 (grub_vbe_bios_get_controller_info): Fixed problem with registers
16342 getting corrupted after calling it. Added more pushes and pops.
16343 (grub_vbe_bios_set_mode): Likewise.
16344 (grub_vbe_bios_get_mode): Likewise.
16345 (grub_vbe_bios_get_memory_window): Likewise.
16346 (grub_vbe_bios_set_scanline_length): Likewise.
16347 (grub_vbe_bios_get_scanline_length): Likewise.
16348 (grub_vbe_bios_get_display_start): Likewise.
16349 (grub_vbe_bios_set_palette_data): Likewise.
16350
16351 * normal/cmdline.c (cl_set_pos): Refresh the screen.
16352 (cl_insert): Likewise.
16353 (cl_delete): Likewise.
16354
16355 * term/gfxterm.c: New file.
16356
16357 * term/i386/pc/vesafb.c: Removed file.
16358
16359 * video/video.c: New file.
16360
16361 * video/i386/pc/vbe.c (real2pm): Added new function.
16362 (grub_video_vbe_draw_pixel): Likewise.
16363 (grub_video_vbe_get_video_ptr): Likewise.
16364 (grub_video_vbe_get_pixel): Likewise
16365 (grub_video_vbe_init): Likewise.
16366 (grub_video_vbe_fini): Likewise.
16367 (grub_video_vbe_setup): Likewise.
16368 (grub_video_vbe_get_info): Likewise.
16369 (grub_video_vbe_set_palette): Likewise.
16370 (grub_video_vbe_get_palette): Likewise.
16371 (grub_video_vbe_set_viewport): Likewise.
16372 (grub_video_vbe_get_viewport): Likewise.
16373 (grub_video_vbe_map_color): Likewise.
16374 (grub_video_vbe_map_rgb): Likewise.
16375 (grub_video_vbe_map_rgba): Likewise.
16376 (grub_video_vbe_unmap_color): Likewise.
16377 (grub_video_vbe_fill_rect): Likewise.
16378 (grub_video_vbe_blit_glyph): Likewise.
16379 (grub_video_vbe_blit_bitmap): Likewise.
16380 (grub_video_vbe_blit_render_target): Likewise.
16381 (grub_video_vbe_scroll): Likewise.
16382 (grub_video_vbe_swap_buffers): Likewise.
16383 (grub_video_vbe_create_render_target): Likewise.
16384 (grub_video_vbe_delete_render_target): Likewise.
16385 (grub_video_vbe_set_active_render_target): Likewise.
16386 (grub_vbe_set_pixel_rgb): Remove function.
16387 (grub_vbe_set_pixel_index): Likewise.
16388 (index_color_mode): Remove static variable.
16389 (active_mode): Likewise.
16390 (framebuffer): Likewise.
16391 (bytes_per_scan_line): Likewise.
16392 (grub_video_vbe_adapter): Added new static variable.
16393 (framebuffer): Likewise.
16394 (render_target): Likewise.
16395 (initial_mode): Likewise.
16396 (mode_in_use): Likewise.
16397 (mode_list): Likewise.
16398
5f97350b 163992006-03-10 Marco Gerards <marco@gnu.org>
16400
16401 * configure.ac (AC_INIT): Bumped to 1.93.
16402
16403 * DISTLIST: Added `include/grub/hfs.h'.
16404
a3c5c6f8 164052006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
16406
16407 * boot/i386/pc/boot.S (general_error): Before looping, try INT
16408 18H, which might help the BIOS falling back to next boot media.
16409
6de53d26 164102006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
16411
16412 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
16413 Poe Chen <poe.poechen@gmail.com>.
16414
77c4a393 164152006-01-17 Marco Gerards <marco@gnu.org>
16416
16417 * include/grub/normal.h: Include <grub/script.h>.
16418 (grub_command_list): Removed struct.
16419 (grub_command_list_t): Removed type.
16420 (grub_menu_entry): Remove members `num' and `command_list'. Add
16421 members `commands' and `sourcecode'.
16422 * include/grub/script.h: Add inclusion guards.
16423 (grub_script_cmd_menuentry): New struct.
16424 (grub_script_execute_menuentry): New prototype.
16425 (grub_script_lexer_record_start): Likewise.
16426 (grub_script_lexer_record_stop): Likewise.
16427 * normal/execute.c (grub_script_execute_menuentry): New function.
16428 * normal/lexer.c (record, recording, recordpos, recordlen): New
16429 variables.
16430 (grub_script_lexer_record_start): New function.
16431 (grub_script_lexer_record_stop): Likewise.
16432 (recordchar): Likewise.
16433 (nextchar): Likewise.
16434 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
16435 2048 as the buffer size. Add the tokens `menuentry' and `@'.
16436 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
16437 (current_menu): New variable.
16438 (free_menu): Mainly rewritten.
16439 (grub_normal_menu_addentry): New function.
16440 (read_config_file): Rewritten.
16441 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 16442 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 16443 the menu entry.
16444 (run): Mainly rewritten.
16445 * normal/parser.y (menu_entry): New variable.
16446 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
16447 (menuentry): New rule.
16448 (command): Add `menuentry'.
16449 (if_statement): Allow additional returns before `fi'.
16450 * normal/script.c (grub_script_create_cmdmenu): New function.
16451
144f1f98 164522006-01-03 Marco Gerards <marco@gnu.org>
16453
16454 * INSTALL: GNU Bison is required.
16455 * configure.ac: Rewritten the test to detect Bison.
16456 * Makefile.in (YACC): New variable. Reported by Xun Sun
16457 <xun.sun.cn@gmail.com>.
16458
af4b2d89 164592006-01-03 Marco Gerards <marco@gnu.org>
16460
16461 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
16462 the HFS+ filesystem to filesystem blocks.
16463 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
16464 GCC warning is silenced.
16465
15643b71 164662006-01-03 Marco Gerards <marco@gnu.org>
16467
16468 * partmap/apple.c (apple_partition_map_iterate): Convert the data
16469 read from disk from big endian to host byte order.
16470
00905879 164712006-01-03 Hollis Blanchard <hollis@penguinppc.org>
16472
16473 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
16474 documentation.
16475 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
16476 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
16477 embedded HFS+ filesystem.
16478 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
16479 (grub_hfs_sblock): Move from here...
16480 * include/grub/hfs.h: To here... New file.
16481 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
16482 documentation.
16483 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
16484 New macros.
16485 (grub_hfsplus_volheader): Change type of member `magic' to
16486 `grub_uint16_t'.
16487 (grub_hfsplus_data): Add new member `embedded_offset'.
16488 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
16489 returned block.
16490 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
16491 Calculate the offset.
16492
8899bc3e 164932005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16494
16495 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
16496 Removed.
16497 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
16498
ae8c0277 164992005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16500
16501 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
16502 ENV->NAME is NULL after allocating ENV->VALUE.
16503
07084456 165042005-12-25 Marco Gerards <marco@gnu.org>
16505
16506 * kern/env.c (grub_env_set): Rewritten the error handling code.
16507
4750f5f1 165082005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16509
16510 * geninit.sh: Made more robust, and more portable.
16511
50214199 165122005-12-25 Marco Gerards <marco@gnu.org>
16513
16514 Add support for Apple HFS+ filesystems.
f19dbdb7 16515
50214199 16516 * fs/hfsplus.c: New file.
16517
16518 * DISTLIST: Added `fs/hfsplus.c'.
16519
16520 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
16521 (hfsplus_mod_SOURCES): New variable.
16522 (hfsplus_mod_CFLAGS): Likewise.
16523 (hfsplus_mod_LDFLAGS): Likewise.
16524 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
16525 (grub_setup_SOURCES): Likewise.
16526 (grub_mkdevicemap_SOURCES): Likewise.
16527 (grub_emu_SOURCES): Likewise.
16528 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16529
16530 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
16531
16532 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
16533
befaed6c 165342005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16535
16536 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
16537 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
16538 include/grub/parser.h, include/grub/script.h, kern/parser.c,
16539 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
16540 normal/lexer.c, normal/parser.y, normal/script.c, and
16541 partmap/gpt.c.
16542 Removed kern/sparc64/cache.c.
16543
16544 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
16545 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
16546 grub_emu_init.c.
16547
16548 * configure.ac (AC_INIT): Bumped to 1.92.
16549
6a124103 165502005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
16551
16552 * kern/err.c (grub_error_push): Added new function to support error
16553 stacks.
16554 (grub_error_pop): Likewise.
16555 (grub_error_stack_items): New local variable to support error stacks.
16556 (grub_error_stack_pos): Likewise.
16557 (grub_error_stack_assert): Likewise.
16558 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
16559 stack depth.
16560 (grub_print_error): Added support to print errors from error stack.
16561
16562 * include/grub/err.h (grub_error_push): Added function prototype.
16563 (grub_error_pop): Likewise.
16564
be973c1b 165652005-12-09 Hollis Blanchard <hollis@penguinppc.org>
16566
16567 * configure.ac: Accept `powerpc64' as host_cpu.
16568 (amd64): Rename to `biarch32'.
16569
16570 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
16571 non-cacheline-aligned addresses.
16572
16573 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
16574 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
16575 if `size' is non-zero.
16576
b04216ab 165772005-12-03 Marco Gerards <mgerards@xs4all.nl>
16578
16579 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16580 and `cd' to make sure the filename is not prefixed with a
16581 directory name.
16582 (pkgdata_MODULES): Add `gpt.mod'.
16583 (gpt_mod_SOURCES): New variable.
16584 (gpt_mod_CFLAGS): Likewise.
16585 (gpt_mod_LDFLAGS): Likewise.
16586
16587 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
16588
16589 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
16590 New macro.
16591
16592 * partmap/gpt.c: New file.
16593
16594 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
16595 GPT partition map is detected.
16596
41730ed9 165972005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
16598
16599 * commands/i386/pc/play.c: New file.
16600 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
16601 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
16602 macros.
f19dbdb7 16603
95dc3643 166042005-11-27 Marco Gerards <mgerards@xs4all.nl>
16605
16606 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16607 ((unused))' to silence gcc warning.
16608
1569ec51 166092005-11-26 Hollis Blanchard <hollis@penguinppc.org>
16610
16611 * configure.ac: Correct `AC_PROG_YACC' test.
16612
9abde152 166132005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16614
16615 * util/powerpc/ieee1275/grub-install.in: Run the mount point
16616 check before installing files.
16617
44b83271 166182005-11-22 Mike Small <smallm@panix.com>
16619
16620 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16621 number regex so multidigit numbers are recognized correctly.
16622
166232005-11-22 Mike Small <smallm@panix.com>
16624
16625 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16626 debugging message before attempting to claim memory.
16627 (grub_rescue_cmd_initrd): Add a claim debugging message and try
16628 multiple addresses in case of failure.
16629
9c12956b 166302005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16631
16632 * term/tparm.c (get_space): Remove empty `if' statement.
16633
16634 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16635
16636 * kern/parser.c (check_varstate): Rename `state' to 's'.
16637
aeaf81d9 166382005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16639
16640 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
16641 variable definitions to the beginning of each function. Sort stack
16642 variables by size.
16643 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
16644 `buf' argument to `char *'.
16645
79bbb63f 166462005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16647
16648 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
16649 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16650 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 16651 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16652 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16653 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16654 configfile.mod, search.mod, gzio.mod and test.mod.
16655 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16656 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16657 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16658 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16659 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16660 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16661 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16662 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16663 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16664 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16665 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16666 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16667 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16668 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16669 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16670 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16671 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16672 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16673 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16674 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16675 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16676 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16677 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
16678
16679 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
16680 `grep --include'.
16681 (pkgdata_MODULES): Add test.mod.
16682
233b1628 166832005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16684
16685 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
16686 appending to variables with "+=".
16687 (PModule): Use full pathname to generate *.lst filenames.
16688
16689 * Makefile.in: Fixed list rules moved from genmk.rb.
16690 (.DELETE_ON_ERROR): New special target.
16691 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
16692
16693 * conf/i386-pc.rmk: Include conf/common.mk.
16694 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16695 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 16696 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16697 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16698 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16699 configfile.mod, search.mod, gzio.mod and test.mod.
16700 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16701 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16702 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16703 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16704 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16705 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16706 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16707 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16708 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16709 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16710 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16711 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16712 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16713 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16714 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16715 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16716 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16717 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16718 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16719 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16720 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16721 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16722 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
16723 here...
16724 * conf/common.rmk: ... to here. New file.
16725
16726 * conf/common.mk: New file.
16727
16f820c8 167282005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
16729
16730 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
16731 (grub_script.tab.c): ... here.
16732
16733 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
16734 (grub_script.tab.c): ... here.
16735
16736 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
16737 (grub_script.tab.c): ... here.
16738
16739 * normal/command.c (grub_command_find): Fixed a memory leak of
16740 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
16741
63ba1554 167422005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16743
16744 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
16745 "@" which marks the start of a comment on ARM.
16746 (VARIABLE): Likewise.
16747
7f67dc13 167482005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16749
79bbb63f 16750 Add support for Linux/ADFS partition tables.
7f67dc13 16751
16752 * partmap/acorn.c: New file.
16753
16754 * include/grub/acorn_filecore.h: Likewise.
16755
16756 * DISTLIST: Added `partmap/acorn.c' and
16757 `include/grub/acorn_filecore.h'.
f19dbdb7 16758
7f67dc13 16759 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16760 `partmap/acorn.c'.
16761 (pkgdata_MODULES): Add `acorn.mod'.
16762 (acorn_mod_SOURCES): New variable.
16763 (acorn_mod_CFLAGS): Likewise.
16764
16765 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16766 `partmap/acorn.c'.
16767 (pkgdata_MODULES): Add `acorn.mod'.
16768 (acorn_mod_SOURCES): New variable.
16769 (acorn_mod_CFLAGS): Likewise.
16770
16771 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
16772 (pkgdata_MODULES): Add `acorn.mod'.
16773 (acorn_mod_SOURCES): New variable.
16774 (acorn_mod_CFLAGS): Likewise.
16775 (acorn_mod_LDFLAGS): Likewise.
16776
16777 * include/types.h (grub_disk_addr_t): New typedef.
16778
6d099807 167792005-11-13 Marco Gerards <mgerards@xs4all.nl>
16780
16781 * geninit.sh: New file.
16782
16783 * geninitheader.sh: Likewise.
16784
16785 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
16786 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
16787 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
16788 * commands/configfile.c (grub_configfile_init)
16789 (grub_configfile_fini): Likewise.
16790 * commands/default.c (grub_default_init, grub_default_fini):
16791 Likewise.
16792 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
16793 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
16794 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
16795 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
16796 Likewise.
16797 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
16798 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
16799 Likewise.
16800 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 16801 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 16802 Likewise.
16803 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
16804 Likewise.
fe6b695a 16805 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 16806 Likewise.
16807 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
16808 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
16809 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
16810 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
16811 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
16812 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
16813 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
16814 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
16815 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
16816 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
16817 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
16818 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
16819 * partmap/amiga.c (grub_amiga_partition_map_init)
16820 (grub_amiga_partition_map_fini): Likewise.
16821 * partmap/apple.c (grub_apple_partition_map_init)
16822 (grub_apple_partition_map_fini): Likewise.
16823 * partmap/pc.c (grub_pc_partition_map_init)
16824 (grub_pc_partition_map_fini): Likewise.
16825 * partmap/sun.c (grub_sun_partition_map_init,
16826 grub_sun_partition_map_fini): Likewise.
16827 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
16828 Likewise.
16829
16830 * util/grub-emu.c: Include <grub_modules_init.h>.
16831 (main): Don't initialize and de-initialize any modules directly,
16832 use `grub_init_all' and `grub_fini_all' instead.
16833
16834 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
16835 `grub_vesafb_mod_init'.
16836 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
16837 all users.
16838 * term/i386/pc/vga.c (grub_vga_init): Renamed to
16839 `grub_vga_mod_init'. Updated all users.
16840 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 16841
6d099807 16842 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
16843 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
16844 rules.
16845
16846 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
16847 Generate a function to initialize the module in utilities.
16848 Updated all callers.
16849 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
16850 initialize the module in utilities. Updated all callers.
16851
9046bcf0 168522005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16853
16854 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
16855 escape sequence and a literal ^L to clear the screen.
16856
16857 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
16858 when returning from Open Firmware.
16859
d13ea639 168602005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16861
16862 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
16863 (grub_ofconsole_height): Likewise.
16864 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
16865 manually insert a '\n'.
16866 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
16867 `grub_ofconsole_height'. Return early if these are already set.
16868
a8fcf206 168692005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
16870
16871 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16872 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
16873 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
16874 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
16875 and `normal/script.c'.
16876 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16877 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16878 (test_mod_SOURCES): New variable.
16879 (test_mod_CFLAGS): Likewise.
16880 (test_mod_LDFLAGS): Likewise.
16881 (pkgdata_MODULES): Add `test.mod'.
16882 (grub_script.tab.c): New rule.
16883 (grub_script.tab.h): Likewise.
16884
b6b32745 168852005-11-07 Marco Gerards <mgerards@xs4all.nl>
16886
16887 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16888 `commands/test.c', `normal/execute.c', `normal/lexer.c',
16889 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16890 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16891 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16892 (test_mod_SOURCES): New variable.
16893 (test_mod_CFLAGS): Likewise.
16894 (pkgdata_MODULES): Add `test.mod'.
16895 (grub_script.tab.c): New rule.
16896 (grub_script.tab.h): Likewise.
16897
daac212a 168982005-11-06 Marco Gerards <mgerards@xs4all.nl>
16899
16900 Add initial scripting support.
16901
16902 * commands/test.c: New file.
16903 * include/grub/script.h: Likewise.
16904 * normal/execute.c: Likewise.
16905 * normal/function.c: Likewise.
16906 * normal/lexer.c: Likewise.
16907 * normal/parser.y: Likewise.
16908 * normal/script.c: Likewise.
16909
16910 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 16911
daac212a 16912 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16913 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16914 `normal/function.c' and `normal/script.c'.
16915 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16916 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 16917 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16918 variables.
daac212a 16919 (pkgdata_MODULES): Add `test.mod'.
16920 (grub_script.tab.c): New rule.
16921 (grub_script.tab.h): Likewise.
16922
16923 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16924
16925 * include/grub/normal.h (grub_test_init): New prototype.
16926 (grub_test_fini): Likewise.
f19dbdb7 16927
daac212a 16928 * normal/command.c: Include <grub/script.h>.
16929 (grub_command_execute): Rewritten.
f19dbdb7 16930
daac212a 16931 * util/grub-emu.c (main): Call `grub_test_init' and
16932 `grub_test_fini'.
16933
77500b2b 169342005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16935
16936 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16937 to 0.
16938 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16939 there are no pending characters.
16940
e45deb9e 169412005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16942
16943 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16944 `grub_strndup' to drop device arguments. Replace unnecessary
16945 `grub_strndup' with `grub_strdup'.
16946
4ce32619 169472005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16948
16949 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16950 `debug' environment variable has been set.
16951
169522005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 16953
4ce32619 16954 * Makefile.in (install-local): Use $(DATA).
16955 (uninstall): Likewise.
16956 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16957 (sbin_UTILITIES): ... to here.
16958 (sbin_SCRIPTS): New variable.
16959 (grub_install_SOURCES): New variable.
16960 * util/powerpc/ieee1275/grub-install.in: New file.
16961 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16962 variable.
16963 (add_segments): Call `grub_util_get_path'.
16964
25fe6f03 169652005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
16966
16967 From Timothy Baldwin:
16968 * commands/ls.c (grub_ls_list_files): Close FILE with
16969 grub_file_close.
16970 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16971
04ccf3ec 169722005-10-24 Marco Gerards <mgerards@xs4all.nl>
16973
16974 * include/grub/parser.h: New file.
16975
16976 * kern/parser.c: Likewise.
16977
16978 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16979 (grub_setup_SOURCES): Likewise.
16980 (grub_probefs_SOURCES): Likewise.
16981 (grub_emu_SOURCES): Likewise.
16982 (kernel_img_HEADERS): Add `parser.h'.
16983
16984 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16985 (grub_emu_SOURCES): Add `kern/parser.c'.
16986 (grubof_SOURCES): Likewise.
16987
16988 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16989 (grubof_SOURCES): Add `kern/parser.c'.
16990
16991 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16992
16993 * kern/misc.c (grub_split_cmdline): Removed function.
16994
16995 * kern/rescue.c: Include <grub/parser.h>.
16996 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16997 of `grub_split_cmdline'.
16998
16999 * normal/command.c: Include <grub/parser.h>.
17000 (grub_command_execute): Use `grub_parser_split_cmdline' instead
17001 of `grub_split_cmdline'.
17002
17003 * normal/completion.c: Include <grub/parser.h>.
17004 (cmdline_state): New variable.
17005 (iterate_dir): End the filename with a quote depending on the
17006 command line state.
17007 (get_state): new function.
17008 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
17009 split the arguments and determine the current argument. When the
17010 argument string is not quoted, escape all spaces.
17011
6d8f4b0e 170122005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17013
17014 * normal/sparc64/setjmp.S: New file.
17015
15cf03ed 170162005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17017
17018 * include/grub/sparc64/libgcc.h: New file.
17019 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
17020 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
17021 normal/sparc64/setjmp.c.
17022
03e8661a 170232005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17024
17025 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
17026 * kern/sparc64/cache.S: New file.
17027 * kern/sparc64/cache.c: Removed.
17028 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
17029 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
17030 -mtune=ultrasparc.
17031 (COMMON_LDFLAGS): Add -melf64_sparc.
17032 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
17033 (grubof_SOURCES): Use cache.S instead of cache.c.
17034 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
17035 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
17036 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
17037 commented though.
17038 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
17039 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
17040 (linux_mod_CFLAGS): Commented out.
17041 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
17042 out because module isn't built.
17043 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
17044 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
17045 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
17046 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
17047 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
17048 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17049 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17050 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
17051 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
17052 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
17053 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17054 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17055 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
17056 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
17057
34eeec8a 170582005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
17059
17060 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
17061 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
17062 longer, because HFS should not be used on PC.
17063
708367a3 170642005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17065
17066 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
17067 consistently within the loop.
17068
6fa1251a 170692005-10-15 Marco Gerards <mgerards@xs4all.nl>
17070
17071 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
17072 directory can not be read.
17073
4801580b 170742005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17075
17076 * configure.ac (AC_INIT): Increase the version number to 1.91.
17077
17078 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
17079 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
17080 term/i386/pc/serial.c.
17081
219ad426 170822005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17083
17084 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
17085 file size must be permitted.
17086
17087 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
17088 between %ah and %al.
17089
688e5699 170902005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17091
17092 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
17093 grub_uint64_t.
17094 Call the hook with a NUL-terminated filename.
17095 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
17096 grub_cpu_to_be32.
17097
17098 * kern/term.c (cursor_state): New variable.
17099 (grub_term_set_current): Reset the cursor state on a new
17100 terminal.
17101 (grub_setcursor): Rewritten to use CURSOR_STATE.
17102 (grub_getcursor): New function.
17103
17104 * include/grub/term.h (grub_getcursor): New prototype.
17105
17106 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
17107 integers on ARM. Reported by Timothy Baldwin
17108 <T.E.Baldwin99@members.leeds.ac.uk>.
17109
bb34586c 171102005-10-11 Marco Gerards <mgerards@xs4all.nl>
17111
17112 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
17113 allocated.
17114 (grub_sfs_dir): Likewise.
17115
9a909877 171162005-10-09 Marco Gerards <mgerards@xs4all.nl>
17117
17118 Add support for the SFS filesystem.
17119
17120 * fs/sfs.c: New file.
17121
17122 * DISTLIST: Added `fs/sfs.c'.
17123
17124 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
17125 (grub_probefs_SOURCES): Likewise.
17126 (grub_emu_SOURCES): Likewise.
17127 (pkgdata_MODULES): Add `sfs.mod'.
17128 (sfs_mod_SOURCES): New variable.
17129 (sfs_mod_CFLAGS): Likewise.
17130 (sfs_mod_LDFLAGS): Likewise.
17131
17132 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
17133 (pkgdata_MODULES): Add `sfs.mod'.
17134 (sfs_mod_SOURCES): New variable.
17135 (sfs_mod_CFLAGS): Likewise.
17136
17137 * util/grub-emu.c (main): Call `grub_sfs_init' and
17138 `grub_sfs_fini'.
17139
17140 * include/grub/fs.h (grub_sfs_init): New prototype.
17141 (grub_sfs_fini): Likewise.
17142
57bdbde3 171432005-10-07 Marco Gerards <mgerards@xs4all.nl>
17144
17145 Add support for the AFFS filesystem.
17146
17147 * fs/affs.c: New file.
17148
17149 * DISTLIST: Added `fs/affs.c'.
17150
17151 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
17152 (grub_probefs_SOURCES): Likewise.
17153 (grub_emu_SOURCES): Likewise.
17154 (pkgdata_MODULES): Add `affs.mod'.
17155 (affs_mod_SOURCES): New variable.
17156 (affs_mod_CFLAGS): Likewise.
17157 (affs_mod_LDFLAGS): Likewise.
17158
17159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
17160 (pkgdata_MODULES): Add `affs.mod'.
17161 (affs_mod_SOURCES): New variable.
17162 (affs_mod_CFLAGS): Likewise.
17163
17164 * util/grub-emu.c (main): Call `grub_affs_init' and
17165 `grub_affs_fini'.
17166
17167 * include/grub/fs.h (grub_affs_init): New prototype.
17168 (grub_affs_fini): Likewise.
17169
047b67e0 171702005-10-01 Marco Gerards <mgerards@xs4all.nl>
17171
17172 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
17173
59b8208a 171742005-10-01 Marco Gerards <mgerards@xs4all.nl>
17175
17176 * configure.ac: Accept `x86_64' as host_cpu. In that case add
17177 `-m32' to CFLAGS.
17178
17179 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
17180 linking.
f19dbdb7 17181
59b8208a 17182 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
17183 (COMMON_LDFLAGS): New variable.
17184 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
17185 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
17186 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
17187 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
17188 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
17189 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
17190 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
17191 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
17192 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
17193 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
17194 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17195 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17196 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
17197 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
17198 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
17199 variables.
17200 (normal_mod_ASFLAGS): Add `-m32'.
17201
17202 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
17203 (grub_host_size_t, grub_host_ssize_t): New types.
17204 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 17205 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 17206 `GRUB_HOST_SIZEOF_VOID_P'.
17207
17208 * include/grub/kernel.h (struct grub_module_header): Type of
17209 member offset changed to `grub_host_off_t'. Type of member size
17210 changed to `grub_host_size_t'.
17211 (struct grub_module_info): Type of member offset changed to
17212 `grub_host_off_t'. Type of member size changed to
17213 `grub_host_size_t'.
17214
b4093103 172152005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
17216
17217 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 17218
b4093103 17219 * kern/i386/pc/startup.S (multiboot_header): New label.
17220 (multiboot_entry): Likewise.
17221 (multiboot_trampoline): Likewise.
17222
17223 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17224 Increased to 0x4A0.
17225
17226 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
17227 put parentheses after a question mark.
17228 [!GRUB_UTIL] (my_mod): New variable.
17229
17230 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
17231
b2499b29 172322005-09-28 Marco Gerards <mgerards@xs4all.nl>
17233
17234 Adds support for the XFS filesystem. Btrees are not supported
17235 yet.
17236
17237 * fs/xfs.c: New file.
17238
17239 * DISTLIST: Added `fs/xfs.c'.
17240
17241 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
17242 (grub_probefs_SOURCES): Likewise.
17243 (grub_emu_SOURCES): Likewise.
17244 (pkgdata_MODULES): Add `xfs.mod'.
17245 (xfs_mod_SOURCES): New variable.
17246 (xfs_mod_CFLAGS): Likewise.
17247
17248 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
17249 (pkgdata_MODULES): Add `xfs.mod'.
17250 (xfs_mod_SOURCES): New variable.
17251 (xfs_mod_CFLAGS): Likewise.
17252
17253 * util/grub-emu.c (main): Call `grub_xfs_init' and
17254 `grub_xfs_fini'.
17255
17256 * include/grub/fs.h (grub_xfs_init): New prototype.
17257 (grub_xfs_fini): Likewise.
17258
f19dbdb7 17259
83d37a62 172602005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
17261
17262 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
17263 color modes, allow greater than 16 colors to be configured as
17264 a default palette.
17265
47d2d65e 172662005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
17267
17268 * normal/completion.c (complete_arguments): Add the qualifier
17269 const into OPTIONS.
17270
17271 From Omniflux <omniflux+lists@omniflux.com>:
17272 * include/grub/terminfo.h: New file.
17273 * include/grub/tparm.h: Likewise.
17274 * include/grub/i386/pc/serial.h: Likewise.
17275 * term/terminfo.c: Likewise.
17276 * term/tparm.c: Likewise.
17277 * term/i386/pc/serial.c: Likewise.
17278 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
17279 serial.mod.
17280 (terminfo_mod_SOURCES): New variable.
17281 (terminfo_mod_CFLAGS): Likewise.
17282 (serial_mod_SOURCES): Likewise.
17283 (serial_mod_CFLAGS): Likewise.
17284
48b671ff 172852005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
17286
17287 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
17288 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
17289 and kern/powerpc/ieee1275/cmain.c, respectively.
17290
17291 * boot/powerpc/ieee1275/crt0.S: Moved to ...
17292 * kern/powerpc/ieee1275/crt0.S: ... here.
17293
17294 * boot/powerpc/ieee1275/cmain.c: Moved to ...
17295 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 17296
48b671ff 17297 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
17298 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
17299 instead of boot/powerpc/ieee1275/crt0.S and
17300 boot/powerpc/ieee1275/cmain.c, respectively.
17301
17302 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
17303 sectors. It was not used anyway.
17304
09fc77a7 173052005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17306
17307 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
17308 `unused parameter' warning.
17309
003789c7 173102005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17311
17312 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
17313 function.
17314 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
17315 getcharwidth.
17316
67f44c86 173172005-08-28 Marco Gerards <metgerards@student.han.nl>
17318
17319 * include/grub/normal.h (enum grub_completion_type): Added
17320 `GRUB_COMPLETION_TYPE_ARGUMENT'.
17321
17322 * normal/cmdline.c (print_completion): Handle
17323 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
17324 * normal/menu_entry.c (store_completion): Likewise.
17325
17326 * normal/completion.c (complete_arguments): New function.
17327 (grub_normal_do_completion): Call `complete_arguments' when the
17328 current words start with a dash.
17329
0b5abe02 173302005-08-27 Marco Gerards <metgerards@student.han.nl>
17331
17332 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
17333 `gzio.mod' instead of `io.mod').
17334
d9864ee1 173352005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
17336
17337 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
17338 (DISTDIRS): Added io and video.
17339 Rewrite the search routine to make an output consistently.
17340
17341 * DISTLIST: Added conf/sparc64-ieee1275.mk,
17342 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
17343 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
17344 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
17345 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
17346 util/powerpc/ieee1275/misc.c.
f19dbdb7 17347
d9864ee1 17348 * include/grub/gzio.h: New file.
17349 * io/gzio.c: Likewise.
f19dbdb7 17350
d9864ee1 17351 * kern/file.c (grub_file_close): Call grub_device_close only if
17352 FILE->DEVICE is not NULL.
17353
17354 * include/grub/mm.h [!NULL] (NULL): New macro.
17355
17356 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
17357
17358 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
17359 (pkgdata_MODULES): Added gzio.mod.
17360 (gzio_mod_SOURCES): New variable.
17361 (gzio_mod_CFLAGS): Likewise.
17362
17363 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
17364 (pkgdata_MODULES): Added gzio.mod.
17365 (gzio_mod_SOURCES): New variable.
17366 (gzio_mod_CFLAGS): Likewise.
17367
17368 * commands/cat.c: Include grub/gzio.h.
17369 (grub_cmd_cat): Use grub_gzfile_open instead of
17370 grub_file_open.
f19dbdb7 17371
d9864ee1 17372 * commands/cmp.c: Include grub/gzio.h.
17373 (grub_cmd_cmp): Use grub_gzfile_open instead of
17374 grub_file_open.
17375
17376 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
17377 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
17378 grub_file_open.
17379 (grub_rescue_cmd_module): Likewise.
17380
fa46f4b5 173812005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17382
17383 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
17384 kern/sparc64/ieee1275/init.c because it contains _start.
17385 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
17386
e9211b5d 173872005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17388
17389 * configure.ac: Add support for sparc64 host with ieee1275
17390 firmware.
17391 * configure: Generated from configure.ac.
17392 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
17393 instead of int.
17394 (grub_ofdisk_read): Likewise.
17395 (grub_ofdisk_open): Use %p to print pointer values, and cast the
17396 pointers as (void *) to remove a warning.
17397 (grub_ofdisk_close): Likewise.
17398 (grub_ofdisk_read): Likewise.
17399 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
17400 returns, so make it return void to remove a warning.
17401 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
17402 Corresponding prototype change.
17403 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
17404 values, and cast the pointers as (void *) to remove a warning.
17405 (grub_mm_dump): Likewise.
17406 * conf/sparc64-ieee1275.mk: New file.
17407 * conf/sparc64-ieee1275.rmk: Likewise.
17408 * include/grub/sparc64/setjmp.h: Likewise.
17409 * include/grub/sparc64/types.h: Likewise.
17410 * include/grub/sparc64/ieee1275/console.h: Likewise.
17411 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
17412 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
17413 * include/grub/sparc64/ieee1275/time.h: Likewise.
17414 * kern/sparc64/cache.c: Likewise.
17415 * kern/sparc64/dl.c: Likewise.
17416 * kern/sparc64/ieee1275/init.c: Likewise.
17417 * kern/sparc64/ieee1275/openfw.c: Likewise.
17418
385c6a92 174192005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17420
17421 * util/console.c (grub_ncurses_putchar): If C is greater than
17422 0x7f, set C to a question mark.
17423 (grub_ncurses_getcharwidth): New function.
17424 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
17425 getcharwidth.
17426
17427 * normal/menu.c (print_entry): Made aware of Unicode. First,
17428 convert TITLE to UCS-4, and predict the cursor position by
17429 grub_getcharwidth.
17430
17431 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
17432 const to SRC.
17433 * kern/misc.c (grub_utf16_to_utf8): Likewise.
17434
16ccb8b1 174352005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17436
17437 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
17438 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17439 grub_strcat.
17440
17441 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
17442 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17443 grub_strcpy and grub_strlen. Take it into account that a space
17444 character is inserted as a delimiter.
17445
6a85ce79 174462005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17447
17448 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 17449 invalid magic in the error.
6a85ce79 17450
17451 * commands/search.c: New file.
f19dbdb7 17452
6a85ce79 17453 * util/grub-emu.c (main): Call grub_search_init and
17454 grub_search_fini.
17455
17456 * kern/rescue.c (grub_rescue_print_disks): Removed.
17457 (grub_rescue_print_devices): New function.
17458 (grub_rescue_cmd_ls): Use grub_device_iterate with
17459 grub_rescue_print_devices instead of grub_disk_dev_iterate with
17460 grub_rescue_print_disks.
17461
17462 * kern/partition.c (grub_partition_iterate): Return the result of
17463 PARTMAP->ITERATE instead of GRUB_ERRNO.
17464
17465 * kern/device.c: Include grub/partition.h.
17466 (grub_device_iterate): New function.
17467
17468 * include/grub/partition.h (grub_partition_iterate): Return int
17469 instead of grub_err_t.
17470
17471 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
17472 prototype.
17473 [GRUB_UTIL] (grub_search_fini): Likewise.
17474
17475 * include/grub/device.h (grub_device_iterate): New prototype.
17476
17477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17478 commands/search.c.
17479 (pkgdata_MODULES): Added search.mod.
17480 (search_mod_SOURCES): New variable.
17481 (search_mod_CFLAGS): Likewise.
17482
17483 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
17484 (pkgdata_MODULES): Added search.mod.
17485 (search_mod_SOURCES): New variable.
17486 (search_mod_CFLAGS): Likewise.
17487
17488 * commands/ls.c (grub_ls_list_disks): Renamed to ...
17489 (grub_ls_list_devices): ... this, and use grub_device_iterate.
17490 All callers changed.
17491
17492 * DISTLIST: Added commands/search.c.
17493
ef095434 174942005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17495
17496 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
17497 conversion.
17498 (grub_getcharwidth): New function.
17499
17500 * kern/misc.c (grub_utf8_to_ucs4): New function.
17501
17502 * include/grub/term.h (struct grub_term): Added a new member
17503 "getcharwidth".
17504 (grub_getcharwidth): New prototype.
17505
17506 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
17507
17508 * term/i386/pc/console.c (map_char): New function. Segregated from
17509 grub_console_putchar.
17510 (grub_console_putchar): Use map_char.
17511 (grub_console_getcharwidth): New function.
17512 (grub_console_term): Specified grub_console_getcharwidth as
17513 getcharwidth.
17514
17515 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
17516 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
17517
17518 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
17519 GRUB_ERRNO.
17520 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
17521 on grub_strtoul completely.
17522 (write_char): Declare local variables in the beginning of the
17523 function.
17524 (grub_vesafb_getcharwidth): New function.
17525 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
17526 getcharwidth.
17527
1f0a95e4 175282005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
17529
17530 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
17531 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
17532 commands/i386/pc/vbetest.c.
17533
17534 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
17535 call grub_vbe_get_controller_info again, because the returned
17536 information is volatile.
17537 (grub_vbe_set_video_mode): Mostly rewritten.
17538 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
17539 grub_vbe_status_t correctly.
17540 (grub_vbe_get_video_mode_info): Likewise.
17541 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
17542 several if statements.
17543
17544 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
17545 * commands/i386/pc/vbeinfo.c: ... this.
17546
17547 * commands/i386/pc/vbe_test.c: Renamed to ...
17548 * commands/i386/pc/vbetest.c: ... this.
17549
17550 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
17551 ...
17552 (grub_cmd_vbeinfo): ... this. Save video modes before
17553 iterating. Skip a video mode, if it is not available, not enough
17554 information is given or it is monochrome. Show the memory
17555 model. Leave the interpretation of MODEVAR to grub_strtoul
17556 completely.
17557 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
17558 (GRUB_MOD_FINI): Likewise.
17559
17560 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
17561 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
17562 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
17563 duplicated grub_env_get. Leave the interpretation of MODEVAR to
17564 grub_strtoul completely.
17565 (real2pm): Removed.
17566 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
17567 (GRUB_MOD_FINI): Likewise.
17568
17569 * normal/misc.c: Include grub/mm.h.
17570
17571 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
17572 vbe_list_modes with vbetest.mod and vbeinfo.mod.
17573 (vbe_list_modes_mod_SOURCES): Removed.
17574 (vbe_list_modes_mod_CFLAGS): Likewise.
17575 (vbe_test_mod_SOURCES): Likewise.
17576 (vbe_test_mod_CFLAGS): Likewise.
17577 (vbeinfo_mod_SOURCES): New variable.
17578 (vbeinfo_mod_CFLAGS): Likewise.
17579 (vbetest_mod_SOURCES): Likewise.
17580 (vbetest_mod_CFLAGS): Likewise.
17581
992ffbbe 175822005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
17583
17584 * normal/misc.c: New file.
17585
17586 * DISTLIST: Added normal/misc.c.
f19dbdb7 17587
992ffbbe 17588 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
17589 DISK to HOOK. Call HOOK with DISK.
17590 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17591 * partmap/pc.c (pc_partition_map_iterate): Likewise.
17592 * partmap/sun.c (sun_partition_map_iterate): Likewise.
17593
17594 * normal/menu_entry.c (struct screen): Added a new member
17595 "completion_shown".
17596 (completion_buffer): New global variable.
17597 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
17598 (store_completion): New function.
17599 (complete): Likewise.
17600 (clear_completions): Likewise.
17601 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
17602 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
17603 a tab, call complete.
17604
17605 * normal/completion.c (disk_dev): Removed.
17606 (print_simple_completion): Likewise.
17607 (print_partition_completion): Likewise.
17608 (print_func): New global variable.
17609 (add_completion): Do not take the arguments WHAT or PRINT any
17610 longer. Added a new argument TYPE. Instead of printing directly,
17611 call PRINT_FUNC if not NULL.
17612 All callers changed.
17613 (complete_device): Use a local variable DEV instead of
17614 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17615 (grub_normal_do_completion): Take a new argument HOOK. Do not
17616 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17617 empty string, return NULL instead.
17618 All callers changed.
17619
17620 * normal/cmdline.c (print_completion): New function.
17621
17622 * kern/partition.c (grub_partition_iterate): Add an argument DISK
17623 to HOOK.
17624 All callers changed.
17625
17626 * kern/disk.c (grub_print_partinfo): Removed.
17627
17628 * include/grub/partition.h (struct grub_partition_map): Add a new
17629 argument DISK into HOOK of ITERATE.
17630 (grub_partition_iterate): Add a new argument DISK to HOOK.
17631
17632 * include/grub/normal.h (enum grub_completion_type): New enum.
17633 (grub_completion_type_t): New type.
17634 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17635 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17636 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17637 (GRUB_COMPLETION_TYPE_FILE): Likewise.
17638 (grub_normal_do_completion): Added a new argument HOOK.
17639 (grub_normal_print_device_info): New prototype.
17640
17641 * include/grub/disk.h (grub_print_partinfo): Removed.
17642
17643 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17644 (normal_mod_SOURCES): Likewise.
17645 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17646 (normal_mod_SOURCES): Likewise.
17647
17648 * commands/ls.c (grub_ls_list_disks): Use
17649 grub_normal_print_device_info instead of grub_print_partinfo. Free
17650 PNAME.
17651 (grub_ls_list_files): Use grub_normal_print_device_info instead of
17652 duplicating the code.
17653
0bd41162 176542005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17655
17656 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 17657 follow GCS more precisely.
17658 * commands/i386/pc/vbe_test.c: Likewise.
17659 * include/grub/i386/pc/vbe.h: Likewise.
17660 * term/i386/pc/vesafb.c: Likewise.
17661 * video/i386/pc/vbe.c: Likewise.
0bd41162 17662
6323696a 176632005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17664
17665 * DISTLIST: Added term/i386/pc/vesafb.c
17666 DISTLIST: Added video/i386/pc/vbe.c
17667 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
17668 DISTLIST: Added commands/i386/pc/vbe_test.c.
17669 * commands/i386/pc/vbe_list_modes.c: New file.
17670 * commands/i386/pc/vbe_test.c: Likewise.
17671 * term/i386/pc/vesafb.c: Likewise.
17672 * video/i386/pc/vbe.c: Likewise.
17673 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
17674 (grub_vbe_probe) Added prototype.
17675 (grub_vbe_set_video_mode) Likewise.
17676 (grub_vbe_get_video_mode) Likewise.
17677 (grub_vbe_get_video_mode_info) Likewise.
17678 (grub_vbe_set_pixel_rgb) Likewise.
17679 (grub_vbe_set_pixel_index) Likewise.
17680 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
17681 (pkgdata_MODULES): Added vesafb.mod.
17682 (pkgdata_MODULES): Added vbe_list_modes.mod.
17683 (pkgdata_MODULES): Added vbe_test.mod.
17684 (vbe_mod_SOURCES): Added.
17685 (vbe_mod_CFLAGS): Likewise.
17686 (vesafb_mod_SOURCES): Likewise.
17687 (vesafb_mod_CFLAGS): Likewise.
17688 (vbe_list_modes_mod_SOURCES): Likewise.
17689 (vbe_list_modes_mod_CFLAGS): Likewise.
17690 (vbe_test_mod_SOURCES): Likewise.
17691 (vbe_test_mod_CFLAGS): Likewise.
17692
0a74e62f 176932005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
17694
0a74e62f 17695 * normal/command.c (grub_command_execute): If INTERACTIVE is
17696 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
17697 CMDLINE. Disable the pager if INTERACTIVE is true.
17698 All callers are changed.
17699
17700 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
17701 before reading a config file.
17702 * normal/main.c (read_config_file): Even if a command is not
17703 found, register it if it is within an entry.
17704
17705 * util/grub-emu.c: Include sys/types.h and unistd.h.
17706 (options): Added --hold.
17707 (struct arguments): Added a new member "hold".
17708 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
17709 missing.
17710 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
17711 cleared by a debugger, if it is not zero.
17712
17713 * include/grub/normal.h (grub_command_execute): Add an argument
17714 INTERACTIVE.
17715
e51f85ae 177162005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
17717
17718 * DISTLIST: Added include/grub/i386/pc/vbe.h.
17719
e9c6f39b 177202005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
17721
17722 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
17723 program with another one, because the old one didn't detect a bug
17724 in gcc-3.4. Always use regparm 2, because the new test is still
17725 not enough for gcc-4.0. Someone must investigate a simple test
17726 case which detects a bug in gcc-4.0.
17727
8de3495c 177282005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
17729
17730 * DISTLIST: Added normal/completion.c.
17731
17732 * normal/completion.c: New file.
f19dbdb7 17733
8de3495c 17734 * term/i386/pc/console.c (grub_console_getwh): New function.
17735 (grub_console_term): Assign grub_console_getwh to getwh.
17736
17737 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
17738 function is defined in normal/completion.c as
17739 grub_normal_do_completion.
17740 (grub_cmdline_get): Use grub_normal_do_completion instead of
17741 grub_tab_complete.
17742
17743 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
17744 returns non-zero, otherwise return 0.
17745 (grub_partition_iterate): First, probe the partition map. Then,
17746 call ITERATE only for this partition map.
17747
17748 * kern/misc.c (grub_strncmp): Rewritten.
17749
17750 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
17751 returns non-zero. Otherwise return 0.
17752
17753 * include/grub/partition.h (grub_partition_map_iterate): Return
17754 int instead of void.
17755
17756 * include/grub/normal.h (grub_normal_do_completion): New prototype.
17757
17758 * include/grub/misc.h (grub_strncmp): Change the type of N to
17759 grub_size_t.
17760
17761 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
17762 of void.
17763
17764 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 17765 unsigned explicitly before comparing it with I.
8de3495c 17766
17767 * kern/main.c (grub_env_write_root): Add the attribute unused into
17768 VAR.
17769
17770 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17771 normal/completion.c.
17772 (normal_mod_SOURCES): Likewise.
17773 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
17774 (normal_mod_SOURCES): Likewise.
17775
17776 * normal/command.c (grub_iterate_commands): If ITERATE returns
17777 non-zero, return one immediately.
17778
e85e144b 177792005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
17780
17781 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
17782 * kern/i386/pc/startup.S: Updated Global Descriptor table's
17783 descriptions.
17784 (grub_vbe_get_controller_info): New function.
17785 (grub_vbe_get_mode_info): Likewise.
17786 (grub_vbe_set_mode): Likewise.
17787 (grub_vbe_get_mode): Likewise.
17788 (grub_vbe_set_memory_window): Likewise.
17789 (grub_vbe_get_memory_window): Likewise.
17790 (grub_vbe_set_scanline_length): Likewise.
17791 (grub_vbe_get_scanline_length): Likewise.
17792 (grub_vbe_set_display_start): Likewise.
17793 (grub_vbe_get_display_start): Likewise.
17794 (grub_vbe_set_palette_data): Likewise.
17795 * include/grub/i386/pc/vbe.h: New file.
17796
c46153d2 177972005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17798
17799 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17800 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
17801 * DISTLIST: Likewise.
17802 * kern/ieee1275/of.c: Moved to ...
17803 * kern/ieee1275/ieee1275.c: ... here.
17804
0cb90c45 178052005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17806
17807 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
17808 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
17809 Pass 0 as `end' parameter to grub_strtoul().
17810
a19fb360 178112005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17812
17813 * include/grub/powerpc/ieee1275/console.h: Do not include
17814 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
17815 ifdef.
17816 (grub_console_cur_color): Remove i386-specific prototype.
17817 (grub_console_real_putchar): Likewise.
17818 (grub_console_checkkey): Likewise.
17819 (grub_console_getkey): Likewise.
17820 (grub_console_getxy): Likewise.
17821 (grub_console_gotoxy): Likewise.
17822 (grub_console_cls): Likewise.
17823 (grub_console_setcursor): Likewise.
17824 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
17825 Include <grub/machine/console.h>.
17826 * term/ieee1275/ofconsole.c: Likewise.
17827
4ac9bd04 178282005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
17829
17830 * Makefile.in (LIBLZO): New variable.
17831
17832 * configure.ac: Check for LZO version 2.
17833
17834 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
17835 lzo/lzo1x.h instead of lzo1x.h.
17836
17837 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
17838 of -llzo.
17839
17840 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
17841 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
17842
17843 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
17844 copying the data from PARTITION to P.
17845
f4917dfd 178462005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17847
17848 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
17849 negative, unload the module.
17850
17851 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
17852 map is "pc_partition_map" but not "pc".
17853 (usage): Fix the description. The options are --boot-image and
17854 --core-image but not --boot-file or --core-file.
17855 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
17856 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
17857 DEFAULT_DIRECTORY.
17858
17859 * util/i386/pc/grub-install.in: Do not specify --boot-file or
17860 --core-file. Specify INSTALL_DEVICE as an argument.
17861
17862 * util/console.c: Include config.h.
17863 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
17864 [HAVE_NCURSES_H]: Include ncurses.h.
17865 [HAVE_CURSES_H]: Include curses.h.
17866 [!A_NORMAL] (A_NORMAL): Defined as zero.
17867 [!A_STANDOUT] (A_STANDOUT): Likewise.
17868
17869 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
17870 -lncurses.
17871 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
17872
17873 * configure.ac: Check for curses libraries and headers.
17874
17875 * Makefile.in (LIBCURSES): New variable.
17876
17877 * genmk.rb (Script::rule): Set the executable bits.
17878
17879 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
17880 name of the PC partition map is "pc_partition_map" but not "pc".
17881
0e143073 178822005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17883
17884 * util/i386/pc/grub-install.in (grub_probefs): New variable.
17885 (modules): Likewise.
17886 (usage): Added descriptions for --modules and --grub-probefs.
17887 Handle --modules and --grub-probefs. Save the arguments in MODULES
17888 and GRUB_PROBEFS, respectively.
17889 Auto-detect a filesystem module against GRUBDIR. If the result is
17890 empty and modules are not specified explicitly, abort the
17891 installation. Add the result to MODULES.
17892
17893 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
17894 disk/powerpc/ieee1275/ofdisk.c,
17895 include/grub/powerpc/ieee1275/init.h and
17896 term/powerpc/ieee1275/ofconsole.c.
17897 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
17898 term/ieee1275/ofconsole.c.
17899
17900 * include/grub/powerpc/ieee1275/console.h: Resurrected.
17901
17902 * COPYING: Upgraded to the latest version. Only the address of the
17903 FSF office has changed.
f19dbdb7 17904
efd6e6d5 179052005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17906
17907 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17908 kern/ieee1275.c with kern/ieee1275/of.c.
17909
17910 * kern/ieee1275.c: Moved to ...
17911 * kern/ieee1275/of.c: ... here.
17912
8ceafda2 179132005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
17914
17915 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 17916 readability.
8ceafda2 17917
17918 * config.guess: Updated to the latest version from gnulib.
17919 * config.sub: Likewise.
17920 * install.sh: Likewise.
17921 * mkinstalldirs: Likewise.
17922
17923 * include/grub/console.h: Removed. This file is arch-specific. Do
17924 not put this in include/grub.
17925
17926 * include/grub/i386/pc/console.h: Resurrected.
17927
17928 * util/console.c: Include grub/machine/console.h instead of
17929 grub/console.h.
17930 * util/grub-emu.c: Likewise.
17931
267f6cd9 179322005-08-04 Marco Gerards <metgerards@student.han.nl>
17933
17934 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17935 hardcoded value.
f19dbdb7 17936
267f6cd9 17937 From Vincent Pelletier <subdino2004@yahoo.fr>
17938 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17939 Redefined to use grub_getwh.
17940 (grub_term): New member named getwh.
17941 (grub_getwh): New prototype.
17942 * kern/term.c (grub_getwh): New function.
17943 * term/i386/pc/console.c (grub_console_getwh): New function.
17944 (grub_console_term): New member `getwh'.
17945 * term/i386/pc/vga.c (grub_vga_getwh): New function.
17946 (grub_vga_term): New member `getwh'.
0b5abe02 17947 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 17948 grub_ssize_t.
17949 (grub_ofconsole_getw): New function.
17950 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17951 (grub_ofconsole_term): New field named getwh and new initial
17952 value.
17953
3be7266d 179542005-08-03 Hollis Blanchard <hollis@penguinppc.org>
17955
17956 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17957 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
17958 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17959 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17960 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17961 of <grub/machine/ieee1275.h>.
17962 * commands/ieee1275/reboot.c: Likewise.
17963 * boot/powerpc/ieee1275/ieee1275.c: Move ...
17964 * kern/ieee1275.c: ... to here. All users updated. Change all
17965 parameter structs to use new type `grub_ieee1275_cell_t'.
17966 * term/powerpc/ieee1275/ofconsole.c: Move ...
17967 * term/ieee1275/ofconsole.c: ... to here. All users updated.
17968 * disk/powerpc/ieee1275/ofdisk.c: Move ...
17969 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
17970 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17971 to return int.
17972 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17973 Remove unused prototypes. All users updated.
17974 * include/grub/powerpc/ieee1275/console.h: Removed.
17975 * include/grub/powerpc/ieee1275/ieee1275.h: Define
17976 `grub_ieee1275_cell_t'.
17977 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17978 Cast comparisons with -1 to the correct type.
17979 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17980 type to match `grub_ieee1275_entry_fn'.
17981
8b5f3938 179822005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
17983
17984 * DISTLIST: Added util/i386/pc/grub-probefs.c.
17985
17986 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17987 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17988 partmap/sun.c.
17989 (grub_probefs_SOURCES): New variable.
17990
17991 * util/i386/pc/grub-probefs.c: New file.
17992
17993 * util/i386/pc/grub-setup.c (main): Call
17994 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17995 grub_hfs_init and grub_jfs_init to initialize the system. Call
17996 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17997 grub_pc_partition_map_fini to finish the system.
17998
ea409713 179992005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
18000
18001 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
18002 function.
18003 (grub_multiboot_load_elf32): Likewise.
18004 (grub_multiboot_is_elf64): Likewise.
18005 (grub_multiboot_load_elf64): Likewise.
18006 (grub_multiboot_load_elf): Likewise.
18007 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
18008 an ELF32 or ELF64 file.
18009 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
18010
18011 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
18012 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
18013 NULL before calling FS->LABEL.
18014 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
18015 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
18016 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
18017 before calling FS->LABEL.
18018
141a288b 180192005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
18020
18021 * util/i386/pc/grub-install.in (datadir): New variable.
18022 (libdir): Removed.
18023 (pkgdatadir): New variable.
18024 (pkglibdir): Removed.
18025
0d5f8a54 180262005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
18027
18028 * DISTLIST: Added util/i386/pc/grub-install.in.
18029
18030 * util/i386/pc/grub-install.in: New file.
18031
18032 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
18033 (grub_install_SOURCES): Likewise.
18034
18035 * genmk.rb: Added support for scripts.
18036 (Script): New class.
18037 (scripts): New variable.
18038
18039 * Makefile.in (install-local): Install sbin_SCRIPTS by
18040 INSTALL_SCRIPT.
18041 (uninstall): Remove sbin_SCRIPTS.
18042
18043 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
18044 device, try to get a GRUB device by
18045 grub_util_biosdisk_get_grub_dev.
18046 Free DEST_DEV.
18047
18048 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
18049 description for --device-map.
18050
5f968e1e 180512005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18052
18053 Change the semantics of variable hooks. They now return strings
18054 instead of error values.
f19dbdb7 18055
5f968e1e 18056 * util/i386/pc/grub-setup.c: Include grub/env.h.
18057 (setup): Use grub_device_set_root instead of grub_env_set.
18058
18059 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
18060 grub_env_get instead of grub_device_set_root and
18061 grub_device_get_root, respectively.
18062
18063 * kern/main.c (grub_env_write_root): New function.
18064 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
18065 grub_env_set instead of grub_device_set_root.
18066
18067 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
18068 many variables.
18069 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
18070 rather than calling ENV->WRITE_HOOK afterwards.
18071 (grub_env_get): Return the result of ENV->READ_HOOK rather than
18072 passing a pointer of a pointer.
18073 (grub_register_variable_hook): Change the types of "read_hook" and
18074 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
18075 respectively.
18076 Allocate the default empty string on the heap, because this string
18077 may be freed later.
18078
18079 * kern/device.c: Include grub/env.h.
18080 (grub_device_set_root): Removed.
18081 (grub_device_get_root): Likewise.
18082 (grub_device_open): Use grub_env_get instead of
18083 grub_device_get_root.
18084
18085 * include/grub/env.h (grub_env_read_hook_t): New type.
18086 (grub_env_write_hook_t): Likewise.
18087 (grub_env_var): Change the types of "read_hook" and "write_hook"
18088 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
18089 (grub_register_variable_hook): Likewise.
18090
18091 * include/grub/device.h (grub_device_set_root): Removed.
18092 (grub_device_set_root): Likewise.
18093
18094 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
18095 make sure that DIRNAME terminates with '/', so that
18096 grub_fat_find_dir will fail if PATH is not a directory.
18097
18098 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
18099 from DIRNAME.
18100 Use the qualifier auto for print_files and print_files_long.
18101 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
18102 as a regular file.
18103 Put a newline only if there is no error.
18104 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
18105 used.
18106
896f0afd 181072005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18108
18109 * kern/partition.c (grub_partition_probe): Initialize PART to
18110 NULL. Otherwise, when no partition map is registered, this returns
18111 a garbage.
18112
b28b81b2 181132005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
18114
18115 * partmap/apple.c (apple_partition_map_iterate): Check if POS
18116 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
18117 valid.
18118
5f3607e0 181192005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
18120
18121 * commands/ls.c (grub_ls_list_disks): Print the filesystem
18122 information on each device, if it does not have partitions. Print
18123 "Device" instead of "Disk", because this function is not specific
18124 to disk devices.
18125
18126 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
18127 static to ensure that it is put on the memory rather than a
18128 register.
18129
502c87e8 181302005-07-17 Yoshinori Okuji <okuji@enbug.org>
18131
18132 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
18133 (grub_cat_init): Likewise.
18134 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
18135 (options): Likewise.
18136 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
18137 (grub_configfile_init): Likewise.
18138 * font/manager.c (GRUB_MOD_INIT): Likewise.
18139 * commands/help.c (GRUB_MOD_INIT): Likewise.
18140 (grub_help_init): Likewise.
18141 * normal/command.c (grub_command_init): Likewise.
18142 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
18143 * disk/loopback.c (grub_loop_init): Likewise.
18144 (GRUB_MOD_INIT): Likewise.
18145 * commands/ls.c (grub_ls_init): Likewise.
18146 (GRUB_MOD_INIT): Likewise.
18147 (options): Likewise.
18148 * commands/boot.c (grub_boot_init): Likewise.
18149 (GRUB_MOD_INIT): Likewise.
18150 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
18151 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
18152 (GRUB_MOD_INIT): Likewise.
18153 * commands/cmp.c (grub_cmp_init): Likewise.
18154 (GRUB_MOD_INIT): Likewise.
18155
18156 * normal/arg.c: Use <> instead of "" to include header files.
18157 (SHORT_ARG_HELP): New macro.
18158 (SHORT_ARG_USAGE): Likewise.
18159 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
18160 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
18161 descriptions.
18162 (find_short): Check if C is 'h' or 'u' explicitly.
18163 (grub_arg_show_help): Use space characters instead of tabs. Treat
18164 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
18165 are shown with --help and --usage only if they are not used for
18166 the command itself.
18167 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
18168 'h' and 'u'.
18169
18170 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
18171 const into "longarg". Change the type of "shortarg" to int.
18172
f806d18e 181732005-07-17 Yoshinori Okuji <okuji@enbug.org>
18174
18175 * boot/i386/pc/boot.S (boot_drive_check): New label.
18176
18177 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
18178 macro.
18179
18180 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
18181 which do not pass a boot drive correctly. Copied from GRUB Legacy.
18182
e293232b 181832005-07-17 Yoshinori Okuji <okuji@enbug.org>
18184
18185 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
18186 When turning off Gate A20, skip the check and return immediately,
18187 because this is not fatal usually.
18188
ebedfd00 181892005-07-17 Yoshinori Okuji <okuji@enbug.org>
18190
18191 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
18192 be 0x7C00 instead of 0x8000.
18193
18194 * boot/i386/pc/pxeboot.S: Rewritten.
18195
18196 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
18197 EXT_C.
18198 (gate_a20_check_state): Read a byte from 0x108000. Invert the
18199 result.
18200
654fc59f 182012005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
18202
18203 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
18204 robustness. This routine now supports a BIOS call and System
18205 Control Port A to modify the gate A20.
18206
18207 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
18208 Increased to 0x440.
18209
09f9923f 182102005-07-12 Hollis Blanchard <hollis@penguinppc.org>
18211
18212 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
18213 device path and resulting ihandle.
18214 (grub_ofdisk_close): dprintf the ihandle being closed.
18215 (grub_ofdisk_read): dprintf function parameters.
18216 * kern/mm.c (grub_mm_init_region): Likewise.
18217 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
18218 (grub_linux_boot): dprintf the Linux entry point, initrd address and
18219 size, and boot arguments.
18220 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
18221 before loading into memory.
18222 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
18223 before loading into memory.
18224
7ef504d8 182252005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
18226
18227 * kern/mm.c: Added much documentation.
18228 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
18229 8, set to 5 instead of 8.
18230
e0f050c2 182312005-07-10 Yoshinori Okuji <okuji@enbug.org>
18232
18233 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
18234
18235 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
18236 (grub_mkdevicemap_SOURCES): New variable.
18237
18238 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
18239 lib/device.c of GRUB Legacy.
18240
7224189a 182412005-07-10 Yoshinori Okuji <okuji@enbug.org>
18242
18243 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
18244 instead of PATH is NULL.
18245
68c864eb 182462005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
18247
18248 * commands/cmp.c (BUFFER_SIZE): New macro.
18249 (grub_cmd_cmp): Close the right file at the right time. Compare
18250 only data just read. Don't report files of different size as
18251 identical. Dynamically allocate buffers. Move variable
18252 declarations at the beginning of function.
18253
e6f3e614 182542005-07-09 Yoshinori Okuji <okuji@enbug.org>
18255
18256 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
18257 reverse.
18258
f8f1559a 182592004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
18260
18261 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
18262 when backspace is pressed at beginning of line.
18263
39c9d41d 182642005-07-03 Yoshinori Okuji <okuji@enbug.org>
18265
18266 * DISTLIST: Added genfslist.sh.
18267
18268 * normal/main.c (fs_module_list): New variable.
18269 (autoload_fs_module): New function.
18270 (read_fs_list): Likewise.
18271 (grub_normal_execute): Call read_fs_list.
18272
18273 * kern/fs.c (grub_fs_autoload_hook): New variable.
18274 (grub_fs_probe): Added support for auto-loading.
18275
18276 * include/grub/normal.h (struct grub_fs_module_list): New struct.
18277 (grub_fs_module_list_t): New type.
18278
18279 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
18280 (grub_fs_autoload_hook): New prototype.
18281
18282 * genfslist.sh: New file.
f19dbdb7 18283
39c9d41d 18284 * genmk.rb: Added a rule to generate a filesystem list.
18285
121c1d83 182862005-06-30 Marco Gerards <metgerards@student.han.nl>
18287
18288 * configure.ac: Fix the test for cross-compiling.
18289
18290 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
18291 define GRUB_UTIL anymore.
18292
18293 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
18294 so this function works on other systems than just big endian.
18295 (load_modules): Likewise.
18296 (add_segments): Likewise.
18297
e75d76e1 182982005-06-23 Hollis Blanchard <hollis@penguinppc.org>
18299
18300 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
18301 contains `l' modifier, get a long from va_arg().
18302
50b5a0a7 183032005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
18304
18305 * kern/mm.c (grub_free): If the next free block which is being
18306 merged is the first free block, set the first block to the block
18307 being freed.
18308 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
18309
89371b20 183102005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18311
18312 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
18313 `grub_ieee1275_chosen'.
18314
168d6e58 183152005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18316
18317 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
18318 (grub_ieee1275_chosen): New variable.
18319 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
18320 `chosen'.
18321 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
18322 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18323 Rename first argument to `phandle' for consistency.
18324 (grub_ieee1275_get_property_length): Likewise.
18325 (grub_ieee1275_next_property): Likewise. Change type of first argument
18326 to grub_ieee1275_phandle_t.
18327 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
18328 Move export next to declaration.
18329 (grub_ieee1275_chosen): New variable.
18330 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
18331 Correct cosmetic typo.
18332 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
18333 `grub_ieee1275_chosen'.
18334 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
18335 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
18336 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
18337 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
18338 `grub_ieee1275_chosen'.
18339
ca5baa3f 183402005-05-10 Hollis Blanchard <hollis@penguinppc.org>
18341
18342 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
18343 /chosen/bootargs.
18344 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
18345 /chosen/bootargs as "variable=value" pairs.
18346
708b345f 183472005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
18348
18349 * include/grub/misc.h (grub_dprintf): New macro.
18350 (grub_real_dprintf): New prototype.
18351 (grub_strword): Likewise.
18352 (grub_iswordseparator): Likewise.
18353 * kern/misc.c (grub_real_dprintf): New function.
18354 (grub_strword): Likewise.
18355 (grub_iswordseparator): Likewise.
18356
f4c5e67c 183572005-04-30 Hollis Blanchard <hollis@penguinppc.org>
18358
18359 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
18360 (roundup): Remove macro.
18361 (grub_ieee1275_flags): Make static.
18362 (grub_ieee1275_realmode): Remove.
18363 (grub_ieee1275_test_flag): New function.
18364 (grub_ieee1275_set_flag): Likewise.
18365 (find_options): Rename to `grub_ieee1275_find_options'; update
18366 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
18367 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
18368 (cmain): New prototype.
18369 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
18370 `grub_ieee1275_flags' directly.
18371 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
18372 machine/biosdisk.h.
18373 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
18374 Don't include grub/machine/init.h.
18375 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
18376 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18377 Remove prototype.
18378 (grub_ieee1275_realmode): Likewise.
18379 (grub_ieee1275_flag): New enum.
18380 (grub_ieee1275_test_flag): New prototype.
18381 (grub_ieee1275_set_flag): New prototype.
18382 * include/grub/powerpc/ieee1275/init.h: Remove file.
18383 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
18384 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
18385 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
18386 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
18387 comment.
18388 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
18389 `grub_ieee1275_test_flag'.
18390 (grub_ieee1275_encode_devname): Likewise.
18391
ed16607e 183922005-04-21 Hollis Blanchard <hollis@penguinppc.org>
18393
18394 * include/grub/powerpc/ieee1275/ieee1275.h
18395 (grub_ieee1275_encode_devname): New prototype.
18396 (grub_ieee1275_get_filename): Likewise.
18397 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
18398 function.
18399 (grub_set_prefix): Likewise.
18400 (grub_machine_init): Call grub_set_prefix.
18401 * kern/powerpc/ieee1275/openfw.c: Fix typos.
18402 (grub_parse_type): New enum.
18403 (grub_ieee1275_get_devargs): New function.
18404 (grub_ieee1275_get_devname): Likewise.
18405 (grub_ieee1275_parse_args): Likewise.
18406 (grub_ieee1275_get_filename): Likewise.
18407 (grub_ieee1275_encode_devname): Likewise.
18408
be369920 184092005-03-30 Marco Gerards <metgerards@student.han.nl>
18410
18411 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
18412 `grub_loader_unset'.
18413
a5ce3a4a 184142005-03-26 Hollis Blanchard <hollis@penguinppc.org>
18415
18416 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
18417 instead of grub_ieee1275_interpret.
18418 (grub_halt_init): New function.
18419 (grub_halt_fini): Likewise.
18420 (GRUB_MOD_INIT): Correct message grammar.
18421 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
18422 instead of grub_ieee1275_interpret.
18423 (grub_reboot_init): New function.
18424 (grub_reboot_fini): Likewise.
18425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
18426 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
18427 util/i386/pc/misc.c with commands/ieee1275/halt.c,
18428 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
18429 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
18430 function.
18431 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
18432 Add prototype.
18433 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
18434 prototype.
18435 (grub_halt): Likewise.
18436 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
18437 (cmain): Remove __attribute__((unused)).
18438 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
18439 (grub_heap_len): Likewise.
18440 (grub_machine_fini): New function.
18441 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
18442 (grub_halt): Likewise.
18443 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
18444 function.
18445 * util/powerpc/ieee1275/misc.c: New file.
18446
0058f771 184472005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
18448
18449 * DISTLIST: New file.
18450 * gendistlist.sh: Likewise.
f19dbdb7 18451
0058f771 18452 * Makefile.in (COMMON_DISTFILES): Removed.
18453 (BOOT_DISTFILES): Likewise.
18454 (CONF_DISTFILES): Likewise.
18455 (DISK_DISTFILES): Likewise.
18456 (FS_DISTFILES): Likewise.
18457 (INCLUDE_DISTFILES): Likewise.
18458 (KERN_DISTFILES): Likewise.
18459 (LOADER_DISTFILES): Likewise.
18460 (TERM_DISTFILES): Likewise.
18461 (UTIL_DISTFILES): Likewise.
18462 (DISTFILES): Likewise.
18463 (uninstall): Uninstall files in $(pkgdata_DATA).
18464 (DISTLIST): New target.
18465 (distdir): Use the contents of the file DISTLIST to get a list of
18466 distributed files.
18467
46b3b8a5 184682005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
18469
18470 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
18471 descriptor. This is ported from GRUB Legacy.
18472
18473 * gencmdlist.sh: Added an extra semicolon to make it work with
18474 old sed versions. Reported by Robert Bihlmeyer
18475 <robbe@orcus.priv.at>.
18476
5822ff87 184772005-03-08 Yoshinori Okuji <okuji@enbug.org>
18478
18479 Automatic loading of commands is supported.
f19dbdb7 18480
5822ff87 18481 * normal/main.c (read_command_list): New function.
18482 (grub_normal_execute): Call read_command_list.
18483
18484 * normal/command.c (grub_register_command): Return zero or CMD.
18485 Allocate CMD->NAME from the heap.
18486 Initialize CMD->MODULE_NAME to zero.
18487 Find the same name as well. If the same command is found and it is
18488 a dummy command, overwrite members. If it is not a dummy command,
18489 return zero.
18490 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
18491 (grub_command_find): If a dummy command is found, load a module
18492 and retry to find a command only once.
18493
18494 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
18495 make sure that each command is loaded.
18496
18497 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
18498 macro.
18499 (struct grub_command): Remove const from the member `name'.
18500 Add a new member `module_name'.
18501 (grub_register_command): Return grub_command_t.
18502
18503 * commands/help.c (grub_cmd_help): Call grub_command_find to make
18504 sure that each command is loaded.
18505
18506 * genmk.rb (PModule::rule): Specify a module name without the
18507 suffix ".mod" to gencmdlist.sh.
18508
7b1f4b57 185092005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18510
18511 * gencmdlist.sh: New file.
f19dbdb7 18512
7b1f4b57 18513 * genmk.rb (PModule::rule): Generate a rule for a command list.
18514 Clean command.lst.
18515 Generate command.lst from $(COMMANDFILES).
18516
18517 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
18518 (DATA): Added $(pkgdata_DATA).
18519 (install-local): Install files in $(pkgdata_DATA).
18520
062aaf39 185212005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18522
18523 * term/i386/pc/vga.c (debug_command): Removed.
18524 (GRUB_MOD_INIT): Do not register the command "debug".
18525
18526 From Hollis Blanchard:
18527 * commands/configfile.c: New file.
18528 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18529 commands/configfile.c.
18530 (pkgdata_MODULES): Added configfile.mod.
18531 (configfile_mod_SOURCES): New variable.
18532 (configfile_mod_CFLAGS): Likewise.
18533 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18534 commands/configfile.c.
18535 (pkgdata_MODULES): Added configfile.mod.
18536 (configfile_mod_SOURCES): New variable.
18537 (configfile_mod_CFLAGS): Likewise.
18538 * util/grub-emu.c (main): Call grub_configfile_init and
18539 grub_configfile_fini.
18540 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
18541 prototype.
18542 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 18543
cee01aa6 185442005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18545
18546 * normal/arg.c (grub_arg_show_help): Do not show the bug report
18547 address.
18548
18549 * commands/help.c (grub_cmd_help): Do not print newlines after
18550 the last command in print_command_help.
18551
93f3a1d8 185522005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18553
18554 * commands/default.h: New file.
18555 * commands/timeout.h: Likewise.
18556 * normal/context.c: Likewise.
f19dbdb7 18557
93f3a1d8 18558 * util/misc.c: Do not include sys/times.h.
18559 Include sys/time.h and grub/machine/time.h.
18560 (grub_get_rtc): Rewritten with gettimeofday.
18561
18562 * util/grub-emu.c (main): Call grub_default_init and
18563 grub_timeout_init before grub_normal_init, and call
18564 grub_timeout_fini and grub_default_fini after grub_main.
18565
18566 * util/console.c (grub_ncurses_checkkey): Return the read
18567 character or -1.
18568
18569 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
18570 timeouts.
18571
18572 * normal/main.c (read_config_file): Push MENU. If this fails,
18573 print an error and wait for a user input.
18574 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
18575 If a menu is empty or an error occurs, pop MENU.
18576 (grub_normal_execute): Pop and free MENU after grub_menu_run
18577 returns.
18578
18579 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
18580
18581 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
18582 include time.h.
18583 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18584 without GRUB_UTIL.
18585 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
18586 time.h.
18587 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18588 without GRUB_UTIL.
18589
18590 * include/grub/normal.h (struct grub_menu_list): New struct.
18591 (grub_menu_list_t): New type.
18592 (struct grub_context): New struct.
18593 (grub_context_t): New type.
18594 (grub_register_command): Got rid of EXPORT_FUNC.
18595 (grub_unregister_command): Likewise.
18596 (grub_context_get): New prototype.
18597 (grub_context_get_current_menu): Likewise.
18598 (grub_context_push_menu): Likewise.
18599 (grub_context_pop_menu): Likewise.
18600 [GRUB_UTIL] (grub_default_init): Likewise.
18601 [GRUB_UTIL] (grub_default_fini): Likewise.
18602 [GRUB_UTIL] (grub_timeout_init): Likewise.
18603 [GRUB_UTIL] (grub_timeout_fini): Likewise.
18604
18605 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18606 commands/timeout.c and normal/context.c.
18607 (pkgdata_MODULES): Added default.mod and timeout.mod.
18608 (normal_mod_SOURCES): Added normal/context.c.
18609 (default_mod_SOURCES): New variable.
18610 (default_mod_CFLAGS): Likewise.
18611 (timeout_mod_SOURCES): Likewise.
18612 (timeout_mod_CFLAGS): Likewise.
18613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18614 conf/i386-pc.rmk.
18615 (pkgdata_MODULES): Added default.mod and timeout.mod.
18616 (normal_mod_SOURCES): Added normal/context.c.
18617 (default_mod_SOURCES): New variable.
18618 (default_mod_CFLAGS): Likewise.
18619 (timeout_mod_SOURCES): Likewise.
18620 (timeout_mod_CFLAGS): Likewise.
18621
18622 * Makefile.in (all-local): Added $(MKFILES).
18623
4ed2e1dd 186242005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
18625
18626 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18627 (grub_emu_SOURCES): Likewise.
18628 (pkgdata_MODULES): Add `sun.mod'.
18629 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18631 `partmap/sun.c'.
18632 (pkgdata_MODULES): Add `sun.mod'.
18633 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18634 * include/grub/partition.h (grub_sun_partition_map_init): New
18635 prototype.
18636 (grub_sun_partition_map_fini): Likewise.
18637 * partmap/sun.c: New file.
18638 * util/grub-emu.c (main): Initialize and de-initialize the sun
18639 partitionmap support.
18640
4d4e372e 186412005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
18642
18643 This implements an Emacs-like menu entry editor.
f19dbdb7 18644
4d4e372e 18645 * normal/menu_entry.c: New file.
f19dbdb7 18646
4d4e372e 18647 * util/console.c (grub_ncurses_putchar): Translate some Unicode
18648 characters to ASCII.
18649 (saved_char): New variable.
18650 (grub_ncurses_checkkey): Rewritten completely.
18651 (grub_ncurses_getkey): Likewise.
18652 (grub_ncurses_init): Call raw instead of cbreak.
18653
18654 * normal/menu.c (print_entry): Do not put a space.
18655 (init_page): Renamed to ...
18656 (grub_menu_init_page): ... this. All callers changed.
18657 (edit_menu_entry): Removed.
18658 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
18659
18660 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
18661
18662 * kern/misc.c (grub_vprintf): Call grub_refresh.
18663
18664 * normal/menu.c (DISP_LEFT): Renamed to ...
18665 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
18666 * normal/menu.c (DISP_UP): Renamed to ...
18667 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
18668 * normal/menu.c (DISP_RIGHT): Renamed to ...
18669 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
18670 * normal/menu.c (DISP_DOWN): Renamed to ...
18671 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
18672 * normal/menu.c (DISP_HLINE): Renamed to ...
18673 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
18674 * normal/menu.c (DISP_VLINE): Renamed to ...
18675 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
18676 * normal/menu.c (DISP_UL): Renamed to ...
18677 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
18678 * normal/menu.c (DISP_UR): Renamed to ...
18679 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
18680 * normal/menu.c (DISP_LL): Renamed to ...
18681 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
18682 * normal/menu.c (DISP_LR): Renamed to ...
18683 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
18684 * normal/menu.c (TERM_WIDTH): Renamed to ...
18685 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
18686 * normal/menu.c (TERM_HEIGHT): Renamed to ...
18687 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
18688 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
18689 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
18690 * normal/menu.c (TERM_MARGIN): Renamed to ...
18691 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
18692 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
18693 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
18694 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
18695 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
18696 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
18697 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
18698 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
18699 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
18700 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
18701 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
18702 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
18703 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
18704 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
18705 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
18706 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
18707 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
18708 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
18709 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
18710 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
18711 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
18712 All callers changed.
18713
18714 * include/grub/normal.h: New prototype.
18715
18716 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18717 normal/menu_entry.c.
18718 (normal_mod_SOURCES): Likewise.
18719 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18720 (normal_mod_SOURCES): Likewise.
18721
e6b92c8a 187222005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
18723
18724 * include/grub/normal.h (grub_halt_init): New prototype.
18725 (grub_halt_fini): Likewise.
18726 (grub_reboot_init): Likewise.
18727 (grub_reboot_fini): Likewise.
18728
18729 * util/grub-emu.c: Include signal.h.
18730 (main_env): New global variable.
18731 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
18732 catch C-c.
18733 (grub_machine_fini): New function.
18734 (main): Call grub_halt_init and grub_reboot_init before
18735 grub_main, and grub_reboot_fini and grub_halt_fini after it.
18736 Call setjmp with MAIN_ENV to go back afterwards.
18737 Call grub_machine_fini right before return.
18738
18739 * include/grub/util/misc.h: Include setjmp.h.
18740 (main_env): New prototype.
18741
18742 * include/grub/kernel.h (grub_machine_fini): New prototype.
18743 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
18744 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
18745
18746 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
18747 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
18748 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 18749
e6b92c8a 18750 * util/i386/pc/misc.c: New file.
f19dbdb7 18751
e6b92c8a 18752 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18753 util/i386/pc/misc.c, commands/i386/pc/halt.c and
18754 commands/i386/pc/reboot.c.
18755
c642636f 187562005-02-14 Guillem Jover <guillem@hadrons.org>
18757
18758 * include/grub/dl.h (grub_dl_check_header): New prototype.
18759 (grub_arch_dl_check_header): Change return type to grub_err_t,
18760 remove size parameter and export function. Update all callers.
18761 * kern/dl.c (grub_dl_check_header): New function.
18762 (grub_dl_load_core): Use `grub_dl_check_header' instead of
18763 `grub_arch_dl_check_header'. Check ELF type. Check if sections
18764 are inside the core.
18765 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
18766 independent ELF header checks.
18767 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18768 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
18769 `grub_dl_check_header' instead of explicit checks. Check for the
18770 ELF type.
18771 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
18772 `grub_dl_check_header' instead of explicit checks. Remove arch
18773 specific ELF header checks.
18774
e6b92c8a 18775 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
18776 argument SIZE.
18777
5eabe94b 187782005-02-13 Hollis Blanchard <hollis@penguinppc.org>
18779
18780 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
18781 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
18782
1b14a681 187832005-02-12 Hollis Blanchard <hollis@penguinppc.org>
18784
18785 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 18786 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 18787 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 18788 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 18789 * partmap/amiga.c (amiga_partition_map_iterate): Return
18790 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
18791 * partmap/apple.c (apple_partition_map_iterate): Likewise.
18792
aca108aa 187932005-02-01 Guillem Jover <guillem@hadrons.org>
18794
18795 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
18796 help info.
18797
c9f9c556 187982005-01-31 Marco Gerards <metgerards@student.han.nl>
18799
18800 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
18801 Removed prototype.
18802 (grub_rescue_cmd_linux): New prototype.
18803 (grub_rescue_cmd_initrd): Likewise.
18804 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
18805 `bi_rec'.
18806 (grub_linux_release_mem): Release the memory for the initrd.
18807 (grub_load_linux): Renamed from this...
18808 (grub_rescue_cmd_linux): ...To this. Changed all callers.
18809 Changed `entry' not to be static. Loop over memory regions to
18810 find another one when the default fails.
18811 (grub_rescue_cmd_initrd): New function.
18812 (grub_linux_init): Remove function.
18813 (grub_linux_fini): Likewise.
18814 (GRUB_MOD_INIT): Register `initrd'.
18815 (GRUB_MOD_FINI): Unregister `initrd'.
18816 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
18817 Function removed.
18818 (grub_linux_normal_fini): Likewise.
18819 (GRUB_MOD_INIT): Register `initrd'.
18820 (GRUB_MOD_FINI): Unregister `initrd'.
18821
990cf3aa 188222005-01-31 Marco Gerards <metgerards@student.han.nl>
18823
18824 * commands/help.c: New file.
18825 * normal/arg.c (show_help): Renamed to...
18826 (grub_arg_show_help): ... this.
18827 * commands/i386/pc/halt.c: New file.
18828 * commands/i386/pc/reboot.c: Likewise.
18829 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
18830 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
18831 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
18832 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
18833 variables.
18834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18835 `commands/help.c'.
18836 (pkgdata_MODULES): Add `help.mod'.
18837 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
18838 * grub/i386/pc/init.h (grub_reboot): New prototype.
18839 (grub_halt): Likewise.
18840 * include/grub/normal.h (grub_arg_show_help): New prototype.
18841 (grub_help_init): Likewise.
18842 (grub_help_fini): Likewise.
18843 * util/grub-emu.c (main): Initialize and deinitialize the help
18844 command.
18845
18846 * normal/cmdline.c (grub_cmdline_get): Doc fix.
18847
18848 * normal/command.c (grub_command_init): Fixed the description of
18849 the `set' and `unset' commands.
18850
188512005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 18852
18853 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
18854 function.
18855 * commands/ieee1275/halt.c: New file.
18856 * commands/ieee1275/reboot.c: Likewise.
18857 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
18858 `__attribute__ ((unused))'. Some GCS related fixed.
18859 (grub_suspend_init) [GRUB_UTIL]: Function removed.
18860 (grub_suspend_fini): Likewise.
18861 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
18862 and `halt.mod'.
18863 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
18864 (halt_mod_CFLAGS): New variables.
18865 * include/grub/powerpc/ieee1275/ieee1275.h
18866 (grub_ieee1275_interpret): New prototype.
18867
1ab09cc7 188682005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
18869
18870 * include/grub/misc.h (memmove): New prototype.
18871 (memcpy): Likewise.
18872
8b8cbdb2 188732005-01-22 Hollis Blanchard <hollis@penguinppc.org>
18874
18875 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
18876 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
18877
e3741a27 188782005-01-22 Marco Gerards <metgerards@student.han.nl>
18879
18880 * kern/misc.c (grub_strndup): Function rewritten.
18881
776bd780 188822005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
18883
18884 * normal/menu.c (TERM_WIDTH): Macro redefined.
18885 (TERM_TOP_BORDER_Y): Likewise.
18886 (draw_border): Replaced while-loop by a for-loop. Make the number
18887 of lines consistent with the number of lines displayed in
18888 print_entries. Added a margin below the rectangle.
18889 (print_entry): Make the entry fit in the rectangle.
18890 (print_entries): Display the scroll arrows next to the right
18891 border.
18892
78026bce 188932005-01-21 Marco Gerards <metgerards@student.han.nl>
18894
18895 * fs/minix.c (grub_minix_find_file): Reserve more space for
18896 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
18897 `grub_strncpy' to copy `path' into it.
18898
67bbaf0f 188992005-01-21 Marco Gerards <metgerards@student.han.nl>
18900
18901 Add the loopback device, a device via which files can be accessed
18902 as devices.
f19dbdb7 18903
67bbaf0f 18904 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
18905 (pkgdata_MODULES): Add loopback.mod.
18906 (loopback_mod_SOURCES): New variable.
18907 (loopback_mod_CFLAGS): Likewise.
18908 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18909 `disk/loopback.c'.
18910 (pkgdata_MODULES): Add loopback.mod.
18911 (loopback_mod_SOURCES): New variable.
18912 (loopback_mod_CFLAGS): Likewise.
18913 * disk/loopback.c: new file.
18914 * include/grub/normal.h (grub_loop_init): New prototype.
18915 (grub_loop_fini): New prototype.
18916 * util/grub-emu.c (main): Initialize and de-initialize loopback
18917 support.
18918 * include/grub/disk.h (grub_disk_dev_id): Add
18919 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18920
6f1c18bd 189212005-01-20 Hollis Blanchard <hollis@penguinppc.org>
18922
18923 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18924 function.
18925 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18926 (suspend_mod_SOURCES): New variable.
18927 (suspend_mod_CFLAGS): Likewise.
18928 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18929 New prototype.
18930 * commands/ieee1275/suspend.c: New file.
18931
b38551da 189322005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
18933
18934 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 18935 ((unused))' to `__attribute__ ((used))'.
b38551da 18936 (GRUB_MOD_FINI): Likewise.
18937 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18938 * genmk.rb (PModule): Assign space to common symbols when linking
18939 modules.
18940
777aff39 189412005-01-20 Marco Gerards <metgerards@student.han.nl>
18942
18943 * include/grub/mm.h (grub_mm_init_region): Change the type of the
18944 `unsigned' arguments to `grub_size_t'.
18945 (grub_malloc): Likewise.
18946 (grub_realloc): Likewise.
18947 (grub_memalign): Likewise.
18948 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18949 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18950 * util/misc.c (grub_malloc): Likewise.
18951 (grub_realloc): Likewise.
18952 * kern/mm.c (get_header_from_pointer): Change the casts to
18953 `unsigned' into a cast to `grub_size_t'.
18954
18955 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18956 point to `currnode' when `currnode' is changed.
18957
18958 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
18959 Schottelius <nico-linux@schottelius.org>.
18960
d0ff18e1 189612005-01-09 Hollis Blanchard <hollis@penguinppc.org>
18962
18963 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18964 (note_path): Remove variable.
18965 (GRUB_IEEE1275_NOTE_NAME): New macro.
18966 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18967 (grub_ieee1275_note_hdr): New structure.
18968 (grub_ieee1275_note_desc): Likewise.
18969 (grub_ieee1275_note): Likewise.
18970 (load_note): Remove `dir' argument. All callers updated. Remove
18971 `note_img' and `path'. Do not load a file from `note_path'.
18972 Initialize a struct grub_ieee1275_note and write that to `out'.
18973 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18974
4ca7004c 189752005-01-05 Marco Gerards <metgerards@student.han.nl>
18976
18977 * util/misc.c (grub_util_read_image): Revert last change. It
18978 called `grub_util_read_at', which seeks from the beginning of the
18979 file.
18980
0b412211 189812005-01-04 Hollis Blanchard <hollis@penguinppc.org>
18982
18983 * TODO: Add note about endianness in grub-mkimage.
18984 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18985 section.
18986 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18987 (grub_mkimage_SOURCES): New target.
18988 * include/grub/kernel.h (grub_start_addr): Remove variable.
18989 (grub_end_addr): Likewise.
18990 (grub_total_module_size): Likewise.
18991 (grub_kernel_image_size): Likewise.
18992 (GRUB_MODULE_MAGIC): New constant.
18993 (grub_module_info): New structure.
18994 (grub_arch_modules_addr): New prototype.
18995 (grub_get_end_addr): Remove prototype.
18996 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18997 * include/grub/powerpc/ieee1275/kernel.h: New file.
18998 * include/grub/util/misc.h (grub_util_get_fp_size): New
18999 prototype.
19000 (grub_util_read_at): Likewise.
19001 (grub_util_write_image_at): Likewise.
19002 * kern/main.c (grub_get_end_addr): Remove function.
19003 (grub_load_modules): Call grub_arch_modules_addr instead of using
19004 grub_end_addr. Look for a grub_module_info struct in memory. Use
19005 the grub_module_info fields instead of calling grub_get_end_addr
19006 as loop conditions. Move grub_add_unused_region code here.
19007 (grub_add_unused_region): Remove function.
19008 * kern/i386/pc/init.c: Include grub/cache.h.
19009 (grub_machine_init): Remove call to grub_get_end_addr. Remove
19010 one call to add_mem_region.
19011 (grub_arch_modules_addr): New function.
19012 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
19013 (grub_total_module_size): Likewise.
19014 Include grub/machine/kernel.h.
19015 (grub_arch_modules_addr): New function.
19016 * util/grub-emu.c (grub_end_addr): Remove variable.
19017 (grub_total_module_size): Likewise.
19018 (grub_arch_modules_addr): New function.
19019 * util/misc.c: Include unistd.h.
19020 (grub_util_get_fp_size): New function.
19021 (grub_util_read_at): Likewise.
19022 (grub_util_write_image_at): Likewise.
19023 (grub_util_read_image): Call grub_util_read_at.
19024 (grub_util_write_image): Call grub_util_write_image_at.
19025 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
19026 additional memory in kernel_img for a struct grub_module_info.
19027 Fill in that grub_module_info.
19028 * util/powerpc/ieee1275/grub-mkimage.c: New file.
19029
458786f8 190302005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19031
19032 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
19033 New function.
19034 * include/grub/powerpc/ieee1275/ieee1275.h
19035 (grub_ieee1275_milliseconds): New prototype.
19036 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
19037 Change to 1000.
19038 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
19039 grub_ieee1275_milliseconds.
19040
ac507d1b 190412005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19042
19043 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
19044 variable.
19045 (find_options): New function.
19046 (cmain): Call find_options.
19047 * include/grub/powerpc/ieee1275/ieee1275.h
19048 (grub_ieee1275_realmode): New extern variable.
19049 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
19050 grub_map if grub_ieee1275_realmode is false.
19051
6b8fd1c4 190522004-12-29 Marco Gerards <metgerards@student.han.nl>
19053
19054 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
19055 lines are inserted and make it work like readline. Reported by
19056 Vincent Pelletier <subdino2004@yahoo.fr>.
19057
8514a1e0 190582004-12-28 Marco Gerards <metgerards@student.han.nl>
19059
19060 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
19061
19062 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
19063 `kern/powerpc/cache.S'.
19064
924b6140 190652004-12-27 Marco Gerards <metgerards@student.han.nl>
19066
19067 * genmk.rb: Handle the `Program' class in the main loop. Written
19068 by Johan Rydberg <jrydberg@gnu.org>.
19069 (Program): New class.
19070 (programs): New variable.
19071 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
19072 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
19073 instead of "grub/kernel.h". Include <grub/machine/init.h>.
19074 (help_arch): Function removed.
19075 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
19076 `powerpc/libgcc.h' and `loader.h'.
19077 (pkgdata_PROGRAMS): New variable.
19078 (sbin_UTILITIES): Variable removed.
19079 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
19080 (grubof_SOURCES): Variable re-defined so it only includes the
19081 core functionality.
19082 (grubof_CFLAGS): Remove `-DGRUBOF'.
19083 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
19084 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
19085 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
19086 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
19087 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
19088 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
19089 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
19090 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
19091 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
19092 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
19093 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
19094 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
19095 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
19096 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
19097 (pc_mod_CFLAGS): New variables.
19098 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
19099 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
19100 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
19101 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
19102 Moved from here...
19103 * include/grub/i386/pc/init.h (grub_os_area_addr)
19104 (rub_os_area_size): ... to here.
19105 * include/grub/powerpc/ieee1275/ieee1275.h
19106 (grub_ieee1275_entry_fn): Export symbol.
19107 * include/grub/powerpc/ieee1275/init.h: New file.
19108 * include/grub/powerpc/libgcc.h: Likewise.
19109 * include/grub/cache.h: Likewise.
19110 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
19111 <hollis@penguinppc.org>.
19112 * kern/dl.c: Include <grub/cache.h>.
19113 (grub_dl_flush_cache): New function.
19114 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
19115 for this module.
19116 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
19117 (grub_console_init): Removed prototypes.
19118 (grub_machine_init): Don't initialize the modules anymore.
19119 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
19120 static.
19121 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
19122 Macro undef removed.
19123 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
19124 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
19125 relocation `R_PPC_REL32'. Return an error when the relocation is
19126 unknown.
19127 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
19128 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
19129 * util/misc.c (grub_arch_sync_caches): Likewise.
19130
e4b47e0c 191312004-12-19 Marco Gerards <metgerards@student.han.nl>
19132
19133 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
19134 `symlist.c', add `grubof_symlist.c'.
19135 (symlist.c): Variable removed.
19136 (grubof_HEADERS): Variable added.
19137 (grubof_symlist.c): New target.
19138 (kernel_syms.lst): Use `grubof_HEADERS' instead of
19139 `kernel_img_HEADERS'.
19140 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
19141 * kern/powerpc/dl.c: New file.
19142 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
19143 Function removed.
19144 (grub_arch_dl_relocate_symbols): Likewise.
19145 (grub_register_exported_symbols): Likewise.
19146
4ceb3636 191472004-12-13 Marco Gerards <metgerards@student.han.nl>
19148
19149 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
19150 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
19151 to fail instead. Reported by Vincent Pelletier
19152 <subdino2004@yahoo.fr>.
19153
19154 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
19155 it is not allocated. Reported by Vincent Pelletier
19156 <subdino2004@yahoo.fr>.
19157
19158 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
19159 output so the output looks better.
f19dbdb7 19160
3f1578fe 191612004-12-04 Marco Gerards <metgerards@student.han.nl>
19162
19163 Modulize the partition map support and add support for the amiga
19164 partition map.
f19dbdb7 19165
3f1578fe 19166 * commands/ls.c: Include <grub/partition.h> instead of
19167 <grub/machine/partition.h>.
19168 * kern/disk.c: Likewise.
19169 * kern/rescue.c: Likewise.
19170 * loader/i386/pc/chainloader.c: Likewise.
19171 * normal/cmdline.c: Likewise.
19172 * kern/powerpc/ieee1275/init.c: Likewise.
19173 (grub_machine_init): Call `grub_pc_partition_map_init',
19174 `grub_amiga_partition_map_init' and
19175 `grub_apple_partition_map_init'.
19176 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
19177 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
19178 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
19179 `partition.h' and `pc_partition.h'.
19180 (grub_setup_SOURCES): Remove
19181 `disk/i386/pc/partition.c'. Add `kern/partition.c',
19182 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19183 (grub_emu_SOURCES): Likewise.
19184 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
19185 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
19186 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
19187 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19188 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
19189 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19190 (grubof_SOURCES): Likewise.
19191 * disk/i386/pc/partition.c: File removed.
19192 * disk/powerpc/ieee1275/partition.c: Likewise.
19193 * include/grub/powerpc/ieee1275/partition.h: Likewise.
19194 * include/grub/i386/pc/partition.h: Likewise.
19195 * kern/partition.c: New file.
19196 * partmap/amiga.c: Likewise.
19197 * partmap/apple.c: Likewise.
19198 * partmap/pc.c: Likewise.
19199 * include/grub/partition.h: Likewise..
19200 * include/grub/pc_partition.h: Likewise.
19201 * util/grub-emu.c: Include <grub/partition.h> instead of
19202 <grub/machine/partition.h>.
19203 (main): Call `grub_pc_partition_map_init',
19204 `grub_amiga_partition_map_init' and
19205 `grub_apple_partition_map_init' and deinitialize afterwards.
19206 * util/i386/pc/biosdisk.c: Include `#include
19207 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19208 `<grub/machine/partition.h>'.
19209 * util/i386/pc/grub-setup.c: Likewise.
19210 * util/i386/pc/biosdisk.c: Likewise.
19211 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
19212 partition information in case of a PC partition.
19213 * util/i386/pc/grub-setup.c: Include `#include
19214 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19215 `<grub/machine/partition.h>'.
19216 (setup): Only access the PC specific partition information in case
19217 of a PC partition.
19218
0ef4ced9 192192004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 19220
0ef4ced9 19221 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
19222 (grub_longjmp): Likewise.
19223 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
19224 20.
19225 * normal/powerpc/setjmp.S: New file.
19226 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19227 `normal/powerpc/setjmp.S'.
19228 (grubof_CFLAGS): Add `-DGRUBOF'.
19229 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
19230 [GRUB_UTIL && !GRUBOF].
f19dbdb7 19231
19950e29 192322004-11-16 Marco Gerards <metgerards@student.han.nl>
19233
19234 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
19235 property named `name'. Correctly handle the error returned by
19236 `grub_ieee1275_finddevice' if a device can not be opened.
19237
a2fea427 192382004-11-02 Hollis Blanchard <hollis@penguinppc.org>
19239
19240 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
19241 `actual' for negativity.
19242 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19243 kern/fshelp.c.
19244
41ea0ea3 192452004-11-01 Marco Gerards <metgerards@student.han.nl>
19246
19247 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
19248 (PAGE_OFFSET): New macro.
19249 (CRTC_ADDR_PORT): Likewise.
19250 (CRTC_DATA_PORT): Likewise.
19251 (START_ADDR_HIGH_REGISTER): Likewise.
19252 (START_ADDR_LOW_REGISTER): Likewise.
19253 (GRAPHICS_ADDR_PORT): Likewise.
19254 (GRAPHICS_DATA_PORT): Likewise.
19255 (READ_MAP_REGISTER): Likewise.
19256 (INPUT_STATUS1_REGISTER): Likewise.
19257 (INPUT_STATUS1_VERTR_BIT): Likewise.
19258 (page): New variable.
19259 (wait_vretrace): New function.
19260 (set_read_map): Likewise.
19261 (set_start_address): Likewise.
19262 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
19263 the right page.
19264 (check_vga_mem): Take the page into account.
19265 (write_char): Likewise.
19266 (write_cursor): Likewise.
19267 (scroll_up): Likewise. Copy the page to the page that is not
19268 shown and switch between both pages.
19269 (grub_vga_putchar): Fix off by one error.
19270 (grub_vga_cls): Wait for the vertical retrace. Take the page into
19271 account.
19272
ad0bd20b 192732004-11-01 Marco Gerards <metgerards@student.han.nl>
19274
19275 Add support for iso9660 (including rockridge).
f19dbdb7 19276
ad0bd20b 19277 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19278 (iso9660_mod_SOURCES): New variable.
19279 (iso9660_mod_CFLAGS): Likewise.
19280 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19281 * include/grub/fs.h (grub_iso9660_init): New prototype.
19282 * util/grub-emu.c (main): Call `grub_iso9660_init'.
19283 * fs/iso9660.c: New file.
19284
19285 * include/grub/misc.h (grub_strncat): New prototype.
19286 * kern/misc.c (grub_strncat): New function.
f19dbdb7 19287
ad0bd20b 19288 * fs/hfs.c (grub_hfs_mount): Translate the error
19289 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
19290 * fs/jfs.c (grub_jfs_mount): Likewise.
19291 * fs/ufs.c (grub_ufs_mount): Likewise.
19292
a5477a59 192932004-10-28 Hollis Blanchard <hollis@penguinppc.org>
19294
19295 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
19296 which initialized BAT registers.
19297 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
19298 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19299 Move from here...
19300 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
19301 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19302 ... to here.
19303 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
19304 (grub_mapclaim): Likewise.
19305 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
19306 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
19307 hand.
19308
9304c1f8 193092004-10-19 Hollis Blanchard <hollis@penguinppc.org>
19310
19311 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
19312 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
19313 -ffreestanding and -msoft-float.
19314
86f4ae25 193152004-10-15 Hollis Blanchard <hollis@penguinppc.org>
19316
19317 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
19318 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
19319 set in grub_ieee1275_flags.
19320
38912228 193212004-10-14 Hollis Blanchard <hollis@penguinppc.org>
19322
19323 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
19324 prototype.
19325 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
19326 grub_console_init first.
19327 Change the memory range used for grub_ieee1275_claim and
19328 grub_mm_init_region.
19329 Print an error message if the claim fails.
19330 Include <grub/misc.h>.
19331
d1923dc8 193322004-10-13 Hollis Blanchard <hollis@penguinppc.org>
19333
19334 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
19335 Call grub_children_iterate for device nodes of type `scsi',
19336 `ide', or `ata'.
19337 (grub_ofdisk_open): Remove manual device alias resolution.
19338 Fix memory leak when device cannot be opened.
f19dbdb7 19339 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 19340 (grub_children_iterate): New prototype.
19341 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
19342 New function.
19343 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19344 Return -1 if args.size was -1.
19345
4512e4f3 193462004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19347
19348 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
19349 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
19350 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
19351 Open Firmware's memory for it; claim memory from _start to _end.
19352 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
19353 (_end): New extern.
19354 (_start): Zero BSS from __bss_start to _end.
19355 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
19356 New extern.
19357 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
19358
4d61feb0 193592004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19360
ad0bd20b 19361 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
19362 -1 if args.base was -1.
4d61feb0 19363
026fa2f9 193642004-10-08 Hollis Blanchard <hollis@penguinppc.org>
19365
19366 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
19367 escape sequence instead of a literal ^L. Also call
19368 grub_ofconsole_gotoxy.
19369
9f2220ef 193702004-10-03 Hollis Blanchard <hollis@penguinppc.org>
19371
19372 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
19373 void * arguments to grub_addr_t. All callers updated. Also make
19374 the `result' argument optional.
19375 (grub_ieee1275_release): change void * arguments to grub_addr_t.
19376 All callers updated.
19377
8a572cd7 193782004-09-22 Hollis Blanchard <hollis@penguinppc.org>
19379
19380 * commands/ls.c (grub_ls_list_files): Use the string following the
19381 initial ')', if present, as the filesystem path.
19382 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
19383
19384 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
19385
18aa81f2 193862004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
19387
19388 Make the source code of the menu interface more readable.
f19dbdb7 19389
18aa81f2 19390 * normal/menu.c: Include grub/mm.h.
19391 (TERM_WIDTH): New macro.
19392 (TERM_HEIGHT): Likewise.
19393 (TERM_INFO_HEIGHT): Likewise.
19394 (TERM_MARGIN): Likewise.
19395 (TERM_SCROLL_WIDTH): Likewise.
19396 (TERM_TOP_BORDER_Y): Likewise.
19397 (TERM_LEFT_BORDER_X): Likewise.
19398 (TERM_BORDER_WIDTH): Likewise.
19399 (TERM_MESSAGE_HEIGHT): Likewise.
19400 (TERM_BORDER_HEIGHT): Likewise.
19401 (TERM_NUM_ENTRIES): Likewise.
19402 (TERM_FIRST_ENTRY_Y): Likewise.
19403 (TERM_ENTRY_WIDTH): Likewise.
19404 (TERM_CURSOR_X): Likewise.
19405 (draw_border): Use macros instead of magic numbers.
19406 (print_entry): Likewise.
19407 (print_entries): Likewise.
19408 (run_menu): Likewise. Also, handle the key 'e'.
19409 (run_menu_entry): Ignore empty command lines.
19410 (print_message): Added a new argument EDIT. If EDIT is true,
19411 print a different message.
19412 (init_page): Likewise.
19413 (edit_menu_entry): New function. Not implemented yet.
19414
b47efe30 194152004-09-17 Marco Gerards <metgerards@student.han.nl>
19416
19417 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
19418 can be loaded from normal mode.
f19dbdb7 19419
b47efe30 19420 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
19421 `multiboot.mod'.
19422 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
19423 (multiboot_mod_CFLAGS): New variables.
19424 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 19425 * loader/i386/pc/multiboot_normal.c: Likewise.
19426
b47efe30 19427 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
19428 attribute `unused'.
f19dbdb7 19429
b47efe30 19430 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
19431 `fdiro' to read the mode information from instead of `diro'.
19432
19433 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
19434 looking up a symlink.
19435
19436 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
19437 macro.
19438 * normal/command.c (grub_command_execute): Don't parse the
19439 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
19440 flags of the command.
19441
19442 * normal/menu.c (grub_menu_run): Fix typo.
19443
da75ac71 194442004-09-14 Hollis Blanchard <hollis@penguinppc.org>
19445
19446 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
19447
19448 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
19449 `y + 1' instead of `y - 1'.
19450
19451 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 19452
062b24c2 194532004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
19454
19455 From Hollis Blanchard <hollis@penguinppc.org>:
19456 * kern/misc.c (memmove): New alias for grub_memmove.
19457 (memcmp): New alias for grub_memcmp.
19458 (memset): New alias for grub_memset.
f19dbdb7 19459 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 19460 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 19461 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 19462 (grub_ieee1275_get_property): Likewise.
f19dbdb7 19463
8ddad845 194642004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
19465
19466 Added normal mode command `chainloader' as module chain.mod, which
19467 depends on normal.mod and _chain.mod.
f19dbdb7 19468
8ddad845 19469 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
19470 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
19471 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
19472 Deleted prototype.
19473 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
19474 but arguments parsing moved to ...
19475 (grub_chainloader_cmd): ... here. New function.
19476 * include/grub/i386/pc/chainloader.h: New file.
19477 * loader/i386/pc/chainloader_normal.c: Likewise.
19478
2c1f4ce3 194792004-09-11 Marco Gerards <metgerards@student.han.nl>
19480
19481 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
19482 (grub_mkimage_LDFLAGS): Likewise.
19483 (grub_emu_SOURCES): Likewise.
19484 (kernel_img_HEADERS): Added fshelp.h.
19485 * fs/ext2.c: Include <grub/fshelp.h>.
19486 (FILETYPE_REG): New macro.
19487 (FILETYPE_INO_REG): Likewise.
19488 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
19489 Changed all users.
19490 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
19491 all users.
19492 (grub_fshelp_node): New struct.
19493 (grub_ext2_data): Added member `diropen'. Changed member `inode'
19494 to a pointer.
19495 (grub_ext2_get_file_block): Removed function.
19496 (grub_ext2_read_block): New function.
19497 (grub_ext2_read_file): Replaced parameter `data' by `node'.
19498 This function was written.
19499 (grub_ext2_mount): Read the root inode. Create a diropen struct.
19500 (grub_ext2_find_file): Removed function.
19501 (grub_ext2_read_symlink): New function.
19502 (grub_ext2_iterate_dir): Likewise.
19503 (grub_ext2_open): Rewritten.
19504 (grub_ext2_dir): Rewritten.
19505 * include/grub/fshelp.h: New file.
19506 * fs/fshelp.c: Likewise.
19507
3c52136a 195082004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
19509
19510 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
19511 (print_message): Add a missing newline.
19512 (run_menu): Added timeout support.
19513 (run_menu_entry): New local function.
19514 (grub_menu_run): Added support for booting.
19515
19516 * kern/loader.c (grub_loader_is_loaded): New function.
19517
19518 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
19519 (grub_get_rtc): Exported.
19520
19521 * include/grub/i386/pc/time.h: Include grub/symbol.h.
19522 (grub_get_rtc): Exported.
19523
19524 * include/grub/normal.h (struct grub_command_list): Remove
19525 constant from the member `command'.
19526
19527 * include/grub/loader.h (grub_loader_is_loaded): Declared.
19528
19529 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
19530
19531 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
19532
aa033560 195332004-08-28 Marco Gerards <metgerards@student.han.nl>
19534
19535 Add support for the JFS filesystem.
19536
19537 * fs/jfs.c: New file.
19538 * include/grub/fs.h (grub_jfs_init): New prototype.
19539 (grub_jfs_fini): New prototype.
19540 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
19541 (grub_emu_SOURCES): Likewise.
19542 (pkgdata_MODULES): Add jfs.mod.
19543 (jfs_mod_SOURCES): New variable.
19544 (jfs_mod_CFLAGS): Likewise.
19545 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
19546 (grubof_SOURCES): Likewise.
19547 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
19548
19549 * fs/fat.c (grub_fat_find_dir): Convert the filename little
19550 endian to the host endian.
19551 (grub_fat_utf16_to_utf8): Move function from there...
19552 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 19553 the endianness of the source string anymore.
aa033560 19554 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
19555
94bc45af 195562004-08-24 Marco Gerards <metgerards@student.han.nl>
19557
19558 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
19559 (grub_boot_fini) [GRUB_UTIL]: Likewise.
19560 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
19561 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 19562
94bc45af 19563 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
19564 (grub_hfs_iterate_dir): Make the function static. Add prototypes
19565 for `node_found' and `it_dir'.
19566 (grub_hfs_dir): Add prototype for `dir_hook'.
19567
19568 * fs/minix.c (grub_minix_get_file_block): Add prototype for
19569 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
19570 and `indir32' to silence a gcc warning.
19571
19572 * include/grub/fs.h (grub_hfs_init): New prototype.
19573 (grub_hfs_fini): Likewise.
f19dbdb7 19574
19575
97543f08 195762004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
19577
19578 Each disk device has its own id now. This is useful to make use
19579 of multiple disk devices.
f19dbdb7 19580
97543f08 19581 * include/grub/disk.h (grub_disk_dev_id): New enum.
19582 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
19583 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
19584
19585 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
19586 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19587
19588 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
19589 GRUB_DISK_DEVICE_OFDISK_ID as an id.
19590
19591 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
19592 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19593
19594 * include/grub/disk.h (struct grub_disk_dev): Added a new member
19595 "id" which is used by the cache manager.
19596
19597 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
19598 of just "GRUB".
19599
64372eb4 196002004-08-18 Marco Gerards <metgerards@student.han.nl>
19601
19602 * fs/hfs.c: New file.
19603 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
19604 (grub_emu_SOURCES): Likewise.
19605 (pkgdata_MODULES): Add hfs.mod.
19606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19607 (grubof_SOURCES): Likewise.
19608 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19609
19610 * include/grub/misc.h (grub_strncasecmp): Add prototype.
19611 * kern/misc.c (grub_strncasecmp): Add function.
19612
cc61b58f 196132004-08-14 Marco Gerards <metgerards@student.han.nl>
19614
19615 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19616 with parentheses.
19617
19618 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19619 (grub_ext2_dir): In case the directory entry type is unknown, read
19620 it from the inode.
19621
0ef123f6 196222004-08-02 Peter Bruin <pjbruin@dds.nl>
19623
19624 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19625 grub_load_linux instead of grub_rescue_cmd_linux as second
19626 argument of grub_rescue_register_command.
19627
19628 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19629
a447c5df 196302004-07-27 Marco Gerards <metgerards@student.han.nl>
19631
19632 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19633 function.
19634 * commands/boot.c: Remove the check for `GRUB_UTIL'.
19635 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19636 `loader/powerpc/ieee1275/linux.c',
19637 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19638 * include/grub/powerpc/ieee1275/ieee1275.h
19639 (grub_ieee1275_release): New prototype.
19640 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19641 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19642 normal, boot, linux and linux_normal.
19643 * loader/powerpc/ieee1275/linux.c: New file.
19644 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
19645
5a9e3546 196462004-07-12 Marco Gerards <metgerards@student.han.nl>
19647
19648 * normal/arg.c (grub_arg_parse): Correct error handling after
19649 reallocating the argumentlist (check if `argl' is not null instead
19650 of checking if `args' is not null).
19651 * kern/mm.c (grub_realloc): Return the same pointer when using the
19652 same region, instead of returning the header address.
19653
e15199cb 196542004-07-11 Marco Gerards <metgerards@student.han.nl>
19655
19656 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
19657 one block instead of two when looking for the initial partition.
19658 (grub_partition_probe): Initialize the local variable `p' with 0.
19659 Use base 10 for the grub_strtoul call.
19660 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
19661 need for one local variable.
19662 (grub_strtoul): Don't add the new value to `num', instead of that
19663 just assign it.
19664
020616c2 196652004-07-11 Marco Gerards <metgerards@student.han.nl>
19666
19667 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
19668 (pxeboot_img_SOURCES): New variable.
19669 (pxeboot_img_ASFLAGS): Likewise.
19670 (pxeboot_img_LDFLAGS): Likewise.
19671 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
19672 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
19673 <lode_leroy@hotmail.com>.
19674
6c51eb64 196752004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19676
19677 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
19678 there was no input.
19679
cfb12aff 196802004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19681
19682 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
19683 the history buffer logic.
19684
6eabba74 196852004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19686
19687 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
19688 (FILETYPE_INO_SYMLINK): New macros.
19689 (grub_ext2_find_file): Check if the node is a directory using the
19690 inode stat information instead of using the filetype in the
19691 dirent. Exclude the first character of an absolute symlink.
19692 (grub_ext2_dir): Mask out the filetype part of the mode member of
19693 the inode.
19694
66e19ef8 196952004-05-24 Marco Gerards <metgerards@student.han.nl>
19696
19697 Add support for UFS version 1 and 2. Add support for the minix
19698 filesystem version 1 and 2, both the variants with 14 and 30 long
19699 filenames.
f19dbdb7 19700
66e19ef8 19701 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
19702 fs/minix.c.
19703 (grub_emu_SOURCES): Likewise.
19704 (pkgdata_MODULES): Add ufs.mod and minix.mod.
19705 (ufs_mod_SOURCES): New variable.
19706 (ufs_mod_CFLAGS): Likewise.
19707 (minix_mod_SOURCES): Likewise.
19708 (minix_mod_CFLAGS): Likewise.
19709 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
19710 fs/minix.c.
19711 (grubof_SOURCES): Likewise.
19712 * fs/ufs.c: New file.
19713 * fs/minix.c: New file.
19714 * include/grub/fs.h (grub_ufs_init): New prototype.
19715 (grub_ufs_fini): Likewise.
19716 (grub_minix_init): Likewise.
19717 (grub_minix_fini): Likewise.
19718 * util/grub-emu.c (main): Initialize and deinitialize UFS and
19719 minix fs.
19720
cc2e748a 197212004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
19722
19723 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
19724 commands/ls.c, commands/terminal.c, commands/boot.c,
19725 commands/cmp.c and commands/cat.c.
19726 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
19727
19728 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
19729 "env.h"
19730
4b13b216 197312004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19732
19733 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
19734 and grub_, respectively. Because the conversion is trivial and
19735 mechanical, I omit the details here. Please refer to the CVS
19736 if you need more information.
19737
6a142551 197382004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19739
19740 * include/pupa: Renamed to ...
19741 * include/grub: ... this.
19742 * util/i386/pc/pupa-mkimage.c: Renamed to ...
19743 * util/i386/pc/grub-mkimage.c: ... this.
19744 * util/i386/pc/pupa-setup.c: Renamed to ...
19745 * util/i386/pc/grub-setup.c: ... this.
19746 * util/pupa-emu.c: Renamed to ...
19747 * util/grub-emu.c: ... this.
19748
e56cdf21 197492004-03-29 Marco Gerards <metgerards@student.han.nl>
19750
19751 Add support for the newworld apple macintosh (PPC). This has been
19752 tested on the powerbook 2000 only. It only adds support for
19753 generic ieee1275 functions, console and disk support. This should
19754 be easy to port to other architectures with support for Open
19755 Firmware.
f19dbdb7 19756
e56cdf21 19757 * configure.ac: Accept the powerpc as host_cpu. In the case of
19758 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
19759 specific tests are only executed while building for the i386.
19760 Inverse test for crosscompile.
19761 * genmk.rb (Utility): Allow assembler files.
19762 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
19763 * conf/powerpc-ieee1275.rmk: New file.
19764 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
19765 * disk/powerpc/ieee1275/partition.c: Likewise.
19766 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
19767 * include/pupa/powerpc/ieee1275/console.h: Likewise.
19768 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
19769 * include/pupa/powerpc/ieee1275/time.h: Likewise.
19770 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
19771 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
19772 * include/pupa/powerpc/ieee1275/loader.h
19773 * include/pupa/powerpc/setjmp.h: Likewise.
19774 * include/pupa/powerpc/types.h: Likewise.
19775 * kern/powerpc/ieee1275/init.c: Likewise.
19776 * kern/powerpc/ieee1275/openfw.c: Likewise.
19777 * term/powerpc/ieee1275/ofconsole.c: Likewise.
19778
19779 These files were written by Johan Rydberg
19780 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 19781
e56cdf21 19782 * boot/powerpc/ieee1275/cmain.c: New file.
19783 * boot/powerpc/ieee1275/crt0.S: Likewise.
19784 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
19785 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
19786
8c8cc205 197872004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
19788
19789 * Makefile.in: Update copyright.
19790 * genmodsrc.sh: Likewise.
19791 * gensymlist.sh: Likewise.
19792 * term/i386/pc/vga.c: Indent correctly.
19793
19794 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
19795 bugreporting address.
19796 * util/i386/pc/pupa-setup.c (usage): Likewise,
19797 (main): Call pupa_ext2_init and pupa_ext2_fini.
19798
f19dbdb7 19799 * fs/fat.c (log2): Renamed to ...
8c8cc205 19800 (fat_log2): ... this.
19801 All callers changed.
19802 * kern/misc.c (memcpy): Alias to pupa_memmove.
19803 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
19804 lvalue cast.
19805 * util/console.c (pupa_ncurses_fini): Return 0.
19806
19807 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
19808 Move fail label here.
19809 [__GNU__]: Don't warn when using stat.
19810 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
19811 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
19812 long int. Use strtol instead of strtoul.
f19dbdb7 19813
db1771cf 198142004-03-14 Marco Gerards <metgerards@student.han.nl>
19815
19816 * commands/boot.c: New file.
19817 * commands/cat.c: Likewise.
19818 * commands/cmp.c: Likewise.
19819 * commands/ls.c: Likewise.
19820 * commands/terminal.c: Likewise.
19821 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
19822 (pupa_register_command): Changed interface to match the new
19823 argument parser.
19824 (pupa_command_execute): Changed (almost rewritten) so it uses
19825 pupa_split_command. Added support for setting variables using the
19826 syntax `foo=bar'.
19827 (rescue_command): Changed to work with the new argument parser.
19828 (terminal_command): Moved from here to commands/terminal.c.
19829 (set_command): New function.
19830 (unset_command): New function.
19831 (insmod_command): New function.
19832 (rmmod_command): New function.
19833 (lsmod_command): New function.
19834 (pupa_command_init): Don't initialize the command terminal
19835 anymore. Initialize the commands set, unset, insmod, rmmod and
19836 lsmod.
19837 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
19838 (kernel_img_HEADERS): Add arg.h and env.h.
19839 (pupa_mkimage_LDFLAGS): Add kern/env.c.
19840 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
19841 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
19842 normal/arg.c.
19843 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
19844 terminal.mod.
19845 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
19846 (boot_mod_SOURCES): New variable.
19847 (terminal_mod_SOURCES): Likewise.
19848 (ls_mod_SOURCES): Likewise.
19849 (cmp_mod_SOURCES): Likewise.
19850 (cat_mod_SOURCES): Likewise.
19851
19852 * normal/arg.c: New file.
19853 * kern/env.c: Likewise.
19854 * include/pupa/arg.h: Likewise.
19855 * include/pupa/env.h: Likewise.
19856 * font/manager.c (font_command): Changed to match argument parsing
19857 interface changes.
19858 (PUPA_MOD_INIT): Likewise.
19859 * hello/hello.c (pupa_cmd_hello): Likewise.
19860 (PUPA_MOD_INIT): Likewise.
19861 * include/pupa/disk.h: Include <pupa/device.h>.
19862 (pupa_print_partinfo): New prototype.
19863 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
19864 (pupa_dl_get_prefix): Likewise.
19865 * include/pupa/misc.h: Include <pupa/err.h>.
19866 (pupa_isgraph): New prototype.
19867 (pupa_isdigit): Likewise.
19868 (pupa_split_cmdline): Likewise.
19869 * include/pupa/normal.h: Include <pupa/arg.h>.
19870 (pupa_command): Changed the prototype of the member `func' to
19871 match the argument parsing interface. Added member `options'.
19872 (pupa_register_command): Updated to match function.
19873 (pupa_arg_parse): New prototype.
19874 (pupa_hello_init) [PUPA_UTIL]: New prototype.
19875 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
19876 (pupa_ls_init) [PUPA_UTIL]: Likewise.
19877 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
19878 (pupa_cat_init) [PUPA_UTIL]: Likewise.
19879 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
19880 (pupa_boot_init) [PUPA_UTIL]: Likewise.
19881 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
19882 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
19883 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
19884 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
19885 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
19886 * kern/disk.c: Include <pupa/file.h>.
19887 (pupa_print_partinfo): New function.
19888 * kern/dl.c: Include <pupa/env.h>.
19889 (pupa_dl_dir): Variable removed.
19890 (pupa_dl_load): Use the environment variable `prefix' instead of
19891 the variable pupa_dl_dir.
19892 (pupa_dl_set_prefix): Function removed.
19893 (pupa_dl_get_prefix): Likewise.
19894 * kern/i386/pc/init.c: Include <pupa/env.h>.
19895 (pupa_machine_init): Use the environment variable `prefix' instead of
19896 using pupa_dl_set_prefix to set the prefix.
19897 * kern/main.c: Include <pupa/env.h>.
19898 (pupa_set_root_dev): Use the environment variable `prefix' instead of
19899 using pupa_dl_get_prefix to get the prefix.
19900 * kern/misc.c: Include <pupa/env.h>.
19901 (pupa_isdigit): New function.
19902 (pupa_isgraph): Likewise.
19903 (pupa_ftoa): Likewise.
19904 (pupa_vsprintf): Added support for printing values of the type
19905 `double'. Make it possible to format variable output when using
19906 formatting like `%1.2%f'.
19907 (pupa_split_cmdline): New function.
19908 * kern/rescue.c: Include <pupa/env.h>.
19909 (next_word): Removed function.
19910 (pupa_rescue_cmd_prefix): Likewise.
19911 (pupa_rescue_cmd_set): New function.
19912 (pupa_rescue_cmd_unset): New function.
19913 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19914 split the command line instead of splitting it here. Added
19915 support for setting variables using the syntax `foo=bar'. Don't
19916 initialize the prefix command anymore. Initialized the set and
19917 unset commands.
19918 * normal/cmdline.c: Include <pupa/env.h>.
19919 (pupa_tab_complete): Added prototypes for print_simple_completion,
19920 print_partition_completion, add_completion, iterate_commands,
19921 iterate_dev, iterate_part and iterate_dir. Moved code to print
19922 partition information from here to kern/disk.c.
fe6b695a 19923 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 19924 * normal/main.c: Include <pupa/env.h>.
19925 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19926 instead of using pupa_dl_get_prefix to get the prefix.
19927 * term/i386/pc/vga.c: Include <pupa/arg.h>.
19928 (check_vga_mem): Cast pointers to `void *' to silence a gcc
19929 warning.
19930 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19931 (pupa_vga_setcolor): Declare unused variables with `__attribute__
19932 ((unused))' to silence a gcc warning.
19933 (pupa_vga_setcolor): Likewise.
19934 (debug_command): Changed to match argument parsing
19935 interface changes.
19936 * util/pupa-emu.c: Include <pupa/env.h>.
19937 (options): Added 0's for unused fields to silence a gcc warning.
19938 (argp): Likewise.
19939 (main): Use the environment variable `prefix' instead of using
19940 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
19941 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
19942 and terminal.
19943
19944 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19945 * util/misc.c: Include <malloc.h>.
19946 (pupa_malloc): Rewritten so errors are correctly reported.
19947 (pupa_realloc): Likewise.
19948 (pupa_memalign): Likewise.
19949 (pupa_mm_init_region): Declare unused variables with
19950 `__attribute__ ((unused))' to silence a gcc warning.
19951 * normal/i386/setjmp.S: Remove tab at the end of the file to
19952 silence a gcc warning.
19953 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19954 variables with `__attribute__ ((unused))' to silence a gcc
19955 warning.
19956 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19957 local variable i unsigned to silence a gcc warning.
19958
19959 * kern/term.c: Include <pupa/misc.h>.
19960 (pupa_more_lines): New variable.
19961 (pupa_more): Likewise.
19962 (pupa_putcode): When the pager is active pause at the end of every
19963 screen.
19964 (pupa_set_more): New function.
19965 * include/pupa/term.h (pupa_set_more): New prototype.
19966
19967
3b1139cb 199682004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
19969
19970 Now this project is GRUB 2 rather than PUPA. The location of
19971 the CVS repository was moved to GRUB's.
f19dbdb7 19972
3b1139cb 19973 * configure.ac: Use bug-grub as the reporting address.
19974 Use GRUB instead of PUPA.
19975 Change the version number to 1.90.
19976
8367695c 199772004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
19978
19979 * genkernsyms.sh: Updated copyright information.
19980 * genmk.rb: Likewise.
19981 * genmodsrc.sh: Likewise.
19982 * gensymlist.sh: Likewise.
19983 * boot/i386/pc/boot.S: Likewise.
19984 * boot/i386/pc/diskboot.S: Likewise.
19985 * disk/i386/pc/biosdisk.c: Likewise.
19986 * disk/i386/pc/partition.c: Likewise.
19987 * font/manager.c: Likewise.
19988 * fs/ext2.c: Likewise.
19989 * fs/fat.c: Likewise.
19990 * include/pupa/boot.h: Likewise.
19991 * include/pupa/device.h: Likewise.
19992 * include/pupa/disk.h: Likewise.
19993 * include/pupa/dl.h: Likewise.
19994 * include/pupa/elf.h: Likewise.
19995 * include/pupa/err.h: Likewise.
19996 * include/pupa/file.h: Likewise.
19997 * include/pupa/font.h: Likewise.
19998 * include/pupa/fs.h: Likewise.
19999 * include/pupa/kernel.h: Likewise.
20000 * include/pupa/loader.h: Likewise.
20001 * include/pupa/misc.h: Likewise.
20002 * include/pupa/mm.h: Likewise.
20003 * include/pupa/net.h: Likewise.
20004 * include/pupa/normal.h: Likewise.
20005 * include/pupa/rescue.h: Likewise.
20006 * include/pupa/setjmp.h: Likewise.
20007 * include/pupa/symbol.h: Likewise.
20008 * include/pupa/term.h: Likewise.
20009 * include/pupa/types.h: Likewise.
20010 * include/pupa/i386/setjmp.h: Likewise.
20011 * include/pupa/i386/types.h: Likewise.
20012 * include/pupa/i386/pc/biosdisk.h: Likewise.
20013 * include/pupa/i386/pc/boot.h: Likewise.
20014 * include/pupa/i386/pc/console.h: Likewise.
20015 * include/pupa/i386/pc/init.h: Likewise.
20016 * include/pupa/i386/pc/kernel.h: Likewise.
20017 * include/pupa/i386/pc/linux.h: Likewise.
20018 * include/pupa/i386/pc/loader.h: Likewise.
20019 * include/pupa/i386/pc/memory.h: Likewise.
20020 * include/pupa/i386/pc/multiboot.h: Likewise.
20021 * include/pupa/i386/pc/partition.h: Likewise.
20022 * include/pupa/i386/pc/time.h: Likewise.
20023 * include/pupa/i386/pc/vga.h: Likewise.
20024 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
20025 * include/pupa/util/getroot.h: Likewise.
20026 * include/pupa/util/misc.h: Likewise.
20027 * include/pupa/util/resolve.h: Likewise.
20028 * kern/device.c: Likewise.
20029 * kern/disk.c: Likewise.
20030 * kern/dl.c: Likewise.
20031 * kern/err.c: Likewise.
20032 * kern/file.c: Likewise.
20033 * kern/fs.c: Likewise.
20034 * kern/loader.c: Likewise.
20035 * kern/main.c: Likewise.
20036 * kern/misc.c: Likewise.
20037 * kern/mm.c: Likewise.
20038 * kern/rescue.c: Likewise.
20039 * kern/term.c: Likewise.
20040 * kern/i386/dl.c: Likewise.
20041 * kern/i386/pc/init.c: Likewise.
20042 * kern/i386/pc/lzo1x.S: Likewise.
20043 * kern/i386/pc/startup.S: Likewise.
20044 * loader/i386/pc/chainloader.c: Likewise.
20045 * loader/i386/pc/linux.c: Likewise.
20046 * loader/i386/pc/multiboot.c: Likewise.
20047 * normal/cmdline.c: Likewise.
20048 * normal/command.c: Likewise.
20049 * normal/main.c: Likewise.
20050 * normal/menu.c: Likewise.
20051 * normal/i386/setjmp.S: Likewise.
20052 * term/i386/pc/console.c: Likewise.
20053 * term/i386/pc/vga.c: Likewise.
20054 * util/console.c: Likewise.
20055 * util/genmoddep.c: Likewise.
20056 * util/misc.c: Likewise.
20057 * util/pupa-emu.c: Likewise.
20058 * util/resolve.c: Likewise.
20059 * util/unifont2pff.rb: Likewise.
20060 * util/i386/pc/biosdisk.c: Likewise.
20061 * util/i386/pc/getroot.c: Likewise.
20062 * util/i386/pc/pupa-mkimage.c: Likewise.
20063 * util/i386/pc/pupa-setup.c: Likewise.
20064
e6eced71 200652004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
20066
20067 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
20068 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
20069 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
20070 reading and reset it after reading.
20071 (pupa_ext2_close): Return PUPA_ERR_NONE.
20072
20073 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
20074 Correct value.
20075 (struct linux_kernel_header): Add kernel_version and
20076 initrd_addr_max.
20077 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
20078 pupa_file_read succeeds.
20079 (pupa_rescue_cmd_initrd): Implement.
20080
5aded270 200812003-12-03 Marco Gerards <metgerards@student.han.nl>
20082
20083 * fs/ext2.c (pupa_ext2_label): New function.
20084 (pupa_ext2_fs): Added label.
20085 * fs/fat.c (pupa_fat_label): New function.
20086 (pupa_fat_fs): Added label.
20087 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
20088
20089 * kern/misc.c (pupa_strndup): New function.
20090 * include/pupa/misc.h (pupa_strndup): New prototype.
20091
20092 * include/pupa/normal.h: Include <pupa/err.h>.
20093 (pupa_set_history): New prototype.
20094 (pupa_iterate_commands): New prototype.
20095 * normal/cmdline.c: Include <pupa/machine/partition.h>,
20096 <pupa/disk.h>, <pupa/file.h>.
20097 (hist_size): New variable.
20098 (hist_lines): Likewise.
20099 (hist_end): Likewise.
20100 (hist_used): Likewise.
20101 (pupa_set_history): New function.
20102 (pupa_history_get): Likewise.
20103 (pupa_history_add): Likewise.
20104 (pupa_history_replace): Likewise.
20105 (pupa_tab_complete): Likewise.
20106 (pupa_cmdline_run): Added tab completion and history buffer. Tab
20107 completion shows partitionnames while completing partitions, this
20108 feature was suggested by Jeff Bailey.
20109 * normal/command.c (pupa_iterate_commands): New function.
20110 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
20111 (pupa_normal_init): Initialize history buffer.
20112 (PUPA_MOD_INIT): Likewise.
20113 (pupa_normal_fini): Free the history buffer.
20114 (PUPA_MOD_FINI): Likewise.
20115
20116 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
20117 key.
20118
20119 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
20120 * configure.ac [i386]: Check for regparam bug.
20121 (NESTED_FUNC_ATTR) [! i386]: Defined.
20122
1f7315a3 201232003-11-17 Marco Gerards <metgerards@student.han.nl>
20124
20125 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
20126 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
20127 (pupa_emu_SOURCES): New variable.
20128 (pupa_emu_LDFLAGS): Likewise.
20129 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
20130 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
20131 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
20132 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20133 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
20134 (pupa_jmp_buf): New typedef.
20135 (pupa_setjmp) [PUPA_UTIL]: New macro.
20136 (pupa_longjmp) [PUPA_UTIL]: Likewise.
20137 * include/pupa/term.h (struct pupa_term): New member `refresh'.
20138 (pupa_refresh): New prototype.
20139 * include/pupa/util/getroot.h: New file.
20140 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
20141 it.
20142 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
20143 (pupa_rescue_cmd_cat): Likewise.
20144 (pupa_rescue_cmd_ls): Likewise.
20145 (pupa_rescue_cmd_testload): Likewise.
20146 (pupa_rescue_cmd_lsmod): Likewise.
20147 * normal/cmdline.c (pupa_cmdline_get): Likewise.
20148 * normal/menu.c (run_menu): Likewise.
20149 * kern/term.c (pupa_cls): Likewise.
20150 (pupa_refresh): New function.
20151 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
20152 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20153 * util/console.c: New file.
f19dbdb7 20154
1f7315a3 20155 * util/i386/pc/getroot.c: New file.
20156 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
20157 (pupa_putchar): New function.
20158 (pupa_refresh): Likewise.
20159 (xgetcwd): Function moved to ...
20160 (strip_extra_slashes): Likewise.
20161 (get_prefix): Likewise.
f19dbdb7 20162 * util/i386/pc/getroot.c: ... here.
1f7315a3 20163 (find_root_device): Function moved and renamed to...
20164 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
20165 Changed all callers.
20166 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
20167 and renamed to...
20168 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
20169 Changed all callers.
20170 * util/misc.c (pupa_memalign): New function.
20171 (pupa_mm_init_region): Likewise.
20172 (pupa_register_exported_symbols): Likewise.
20173 (pupa_putchar): Function removed.
20174 * util/pupa-emu.c: New file.
20175
9a5c1ade 201762003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
20177
20178 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
20179 (_multiboot_mod_SOURCES): New variable.
20180 (_multiboot_mod_CFLAGS): Likewise.
20181 * loader/i386/pc/multiboot.c: New file.
20182 * include/pupa/i386/pc/multiboot.h: Likewise.
20183 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
20184 (pupa_multiboot_real_boot): New function.
20185 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
20186 (pupa_multiboot_real_boot): New prototype.
20187 (pupa_rescue_cmd_multiboot): Likewise
20188 (pupa_rescue_cmd_module): Likewise.
20189
20190 * kern/loader.c (pupa_loader_set): Continue when
20191 pupa_loader_unload_func() fails.
20192 (pupa_loader_unset): New function.
20193 * include/pupa/loader.h (pupa_loader_unset): New prototype.
20194
20195 * kern/misc.c (pupa_stpcpy): New function.
20196 * include/pupa/misc.h (pupa_stpcpy): New prototype.
20197
8e72a9c0 201982003-11-12 Marco Gerards <metgerards@student.han.nl>
20199
20200 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
20201 for available extensions.
20202
20203 * include/pupa/i386/pc/time.h: New file.
20204 * kern/disk.c: Include <pupa/machine/time.h>.
20205 (PUPA_CACHE_TIMEOUT): New macro.
20206 (pupa_last_time): New variable.
20207 (pupa_disk_open): Flush the cache when there was a timeout.
20208 (pupa_disk_close): Reset the timer.
20209 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
20210 pupa_currticks.
20211 * util/misc.c: Include <sys/times.h>
20212 (pupa_get_rtc): New function.
20213
c4adbd32 202142003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
20215
20216 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
20217 as blocks.
20218 (pupa_ext2_get_file_block): Use blocks member.
20219
20220 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
20221 first block. Return -1 instead of pupa_errno on error.
20222
bfd30f06 202232003-10-27 Marco Gerards <metgerards@student.han.nl>
20224
20225 * README: In the pupa-mkimage example use _chain instead of chain
20226 and ext2 instead of fat.
20227 * TODO: Replace ext2fs with jfs as an example. Add an item for
20228 adding journal playback for ext2fs.
20229 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
20230 (pkgdata_MODULES): Added ext2.mod.
20231 (ext2_mod_SOURCES): New variable.
20232 (ext2_mod_CFLAGS): Likewise.
20233 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
20234 * include/pupa/misc.h (pupa_strncpy): New prototype.
20235 (pupa_strcat): Likewise.
20236 (pupa_strncmp): Likewise.
20237 * kern/misc.c (pupa_strcat): Enable function.
20238 (pupa_strncpy): New function.
20239 (pupa_strncmp): Likewise.
20240 * fs/ext2.c: New file.
f19dbdb7 20241
bfd30f06 20242 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
20243 when the read failed before retrying.
20244 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
20245 (_FILE_OFFSET_BITS): Likewise.
20246 * configure.ac: Added AC_SYS_LARGEFILE.
20247
98d15063 202482003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20249
20250 * genmk.rb (PModule#rule): Make sure to get only symbol names
20251 from the output of nm.
20252 Reported by Robert Millan <zeratul2@wanadoo.es>.
20253
18d9c7cd 202542003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20255
20256 I forgot to check in these changes for a long time. This adds
20257 incomplete support for VGA console, and this is still very
20258 buggy. Also, a lot of consideration is required for I18N,
20259 UNICODE, and VGA font issues. Therefore, assume that this is
20260 such that "better than nothing".
f19dbdb7 20261
18d9c7cd 20262 * font/manager.c: New file.
20263 * include/pupa/font.h: Likewise.
20264 * include/pupa/i386/pc/vga.h: Likewise.
20265 * term/i386/pc/vga.c: Likewise.
20266 * util/unifont2pff.rb: Likewise.
20267
20268 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
20269 (pkgdata_MODULES): Added vga.mod and font.mod.
20270 (vga_mod_SOURCES): New variables.
20271 (vga_mod_CFLAGS): Likewise.
20272 (font_mod_SOURCES): Likewise.
20273 (font_mod_CFLAGS): Likewise.
20274
20275 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
20276
20277 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 20278 (struct pupa_term): Added init and fini.
18d9c7cd 20279 Changed the argument of putchar to pupa_uint32_t.
20280
20281 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
20282 (pupa_console_real_putchar): New prototype.
20283 (pupa_console_putchar): Removed.
20284 (pupa_console_checkkey): Exported.
20285 (pupa_console_getkey): Likewise.
20286
20287 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
20288 characters.
20289
20290 * kern/term.c (pupa_term_set_current): Rewritten.
20291 (pupa_putchar): Likewise.
20292 (pupa_putcode): New function.
20293
20294 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
20295 (pupa_console_real_putchar): ... this.
20296 (pupa_vga_set_mode): New function.
20297 (pupa_vga_get_font): Likewise.
20298
20299 * normal/command.c: Include pupa/term.h.
20300 (terminal_command): New function.
20301 (pupa_command_init): Register the command "terminal".
20302
20303 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
20304 (DISP_UP): Likewise.
20305 (DISP_RIGHT): Likewise.
20306 (DISP_DOWN): Likewise.
20307 (DISP_HLINE): Likewise.
20308 (DISP_VLINE): Likewise.
20309 (DISP_UL): Likewise.
20310 (DISP_UR): Likewise.
20311 (DISP_LL): Likewise.
20312 (DISP_LR): Likewise.
20313
20314 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 20315
977329f5 203162003-02-08 NIIBE Yutaka <gniibe@m17n.org>
20317
20318 * util/resolve.c (pupa_util_resolve_dependencies): BUG
20319 FIX. Reverse the path_list.
20320
20321 * include/pupa/normal.h: Export pupa_register_command and
20322 pupa_unregister_command.
20323
20324 * hello/hello.c (pupa_cmd_hello): New module.
20325 * conf/i386-pc.rmk: Added hello.mod.
20326
1f5ab428 203272003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
20328
20329 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 20330
1f5ab428 20331 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
20332 (compress_kernel): New variable.
20333 (generate_image): Heavily modified to support compressing a
20334 large part of the core image.
20335
20336 * util/misc.c (pupa_util_read_image): Fix a file descriptor
20337 leak.
20338 (pupa_util_load_image): New function.
20339
20340 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
20341 (pupa_compressed_size): New variable.
20342 (codestart): Enable Gate A20 here.
20343 Decompress the compressed part of the core image.
20344 Rearrange the code to put functions and variables which are
20345 required for initialization in the non-compressed part.
20346 Include lzo1x.S.
20347
20348 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
20349 here.
20350
20351 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
20352
f19dbdb7 20353 * include/pupa/i386/pc/kernel.h
1f5ab428 20354 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
20355 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
20356 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20357 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20358 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
20359
20360 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
20361
20362 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
20363 (Utility#rule): Likewise.
20364
20365 * configure.ac: Check if LZO is available.
20366
ce5bf700 203672003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
20368
20369 * include/pupa/normal.h: New file.
20370 * include/pupa/setjmp.h: Likewise.
20371 * include/pupa/i386/setjmp.h: Likewise.
20372 * normal/cmdline.c: Likewise.
20373 * normal/command.c: Likewise.
20374 * normal/main.c: Likewise.
20375 * normal/menu.c: Likewise.
20376 * normal/i386/setjmp.S: Likewise.
f19dbdb7 20377
ce5bf700 20378 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
20379 (pupa_rescue_cmd_initrd): Likewise.
20380
20381 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
20382 Likewise.
20383
20384 * kern/i386/pc/startup.S (translation_table): New variable.
20385 (translate_keycode): New function.
20386 (pupa_console_getkey): Call translate_keycode.
20387
20388 * kern/rescue.c (attempt_normal_mode): New function.
20389 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
20390 it failed, print a message.
20391
20392 * kern/mm.c (pupa_real_malloc): Print more information when a
20393 free magic is broken.
20394 (pupa_free): If the first free header is not free actually, set
20395 it to P.
20396
20397 * kern/main.c (pupa_load_normal_mode): Just load the module
20398 "normal".
20399 (pupa_main): Don't print the message
20400 "Entering into rescue mode..." here.
20401
20402 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
20403 Declared.
20404 (pupa_rescue_cmd_initrd): Likewise.
20405 (pupa_rescue_cmd_initrd): Likewise.
20406
20407 * include/pupa/symbol.h (FUNCTION): Specify the type.
20408 (VARIABLE): Likewise.
20409
20410 * include/pupa/err.h (pupa_err_t): Added
20411 PUPA_ERR_UNKNOWN_COMMAND.
20412
20413 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
20414 (pupa_dl_get_prefix): Likewise.
20415
20416 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
20417 Added _chain.mod and _linux.mod instead of chain.mod and
20418 linux.mod.
20419 (chain_mod_SOURCES): Renamed to ...
20420 (_chain_mod_SOURCES): ... this.
20421 (chain_mod_CFLAGS): Renamed to ...
20422 (_chain_mod_CFLAGS): ... this.
20423 (linux_mod_SOURCES): Renamed to ...
20424 (_linux_mod_SOURCES): ... this.
20425 (linux_mod_CFLAGS): Renamed to ...
20426 (_linux_mod_CFLAGS): ... this.
20427 (normal_mod_SOURCES): New variable.
20428 (normal_mod_CFLAGS): Likewise.
20429 (normal_mod_ASFLAGS): Likewise.
20430
204312003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
20432
20433 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
20434 possible.
20435
fe6b695a 20436 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 20437 recursively.
20438 (pupa_dl_unref): Unrefer depending modules recursively.
20439 Don't call pupa_dl_unload implicitly, because PUPA can crash if
20440 a module is unloaded before one depending on that module is
20441 unloaded.
20442 (pupa_dl_unload): Unload depending modules explicitly,
20443 if possible.
20444
c04da074 204452003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
20446
20447 * include/pupa/i386/pc/linux.h: New file.
20448 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 20449
c04da074 20450 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
20451 Removed.
20452 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
20453 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
20454 of PUPA_CHAINLOADER_BOOT_SECTOR.
20455
20456 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
20457 (pupa_linux_prot_size): New variable.
20458 (pupa_linux_tmp_addr): Likewise.
20459 (pupa_linux_real_addr): Likewise.
20460 (pupa_linux_boot_zimage): New function.
20461 (pupa_linux_boot_bzimage): Likewise.
20462
20463 * kern/i386/pc/init.c (struct mem_region): New structure.
20464 (MAX_REGIONS): New macro.
20465 (mem_regions): New variable.
20466 (num_regions): Likewise.
20467 (pupa_os_area_addr): Likewise.
20468 (pupa_os_area_size): Likewise.
20469 (pupa_lower_mem): Likewise.
20470 (pupa_upper_mem): Likewise.
20471 (add_mem_region): New function.
20472 (compact_mem_regions): Likewise.
20473 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
20474 the size of the conventional memory and that of so-called upper
20475 memory (before the first memory hole).
20476 Instead of adding each found region to free memory, use
20477 add_mem_region and add them after removing overlaps.
20478 Also, add only 1/4 of the upper memory to free memory. The rest
20479 is used for loading OS images. Maybe this is ad hoc, but this
20480 makes it much easier to relocate OS images when booting.
20481
20482 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
20483 (pupa_enter_rescue_mode): Don't register initrd and module.
20484
20485 * kern/mm.c: Include pupa/dl.h.
20486
20487 * kern/main.c: Include pupa/file.h and pupa/device.h.
20488
20489 * kern/loader.c (pupa_loader_load_module_func): Removed.
20490 (pupa_loader_load_module): Likewise.
20491
20492 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
20493 ``.o''.
20494
20495 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
20496 (pupa_linux_tmp_addr): Likewise.
20497 (pupa_linux_real_addr): Likewise.
20498 (pupa_linux_boot_zimage): Likewise.
20499 (pupa_linux_boot_bzimage): Likewise.
20500
20501 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
20502 (pupa_upper_mem): Likewise.
20503 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
20504 module is too dangerous.
20505
20506 * include/pupa/loader.h (pupa_os_area_addr): Declared.
20507 (pupa_os_area_size): Likewise.
20508 (pupa_loader_set): Remove the first argument. Loader doesn't
20509 manage modules or initrd any longer.
20510 (pupa_loader_load_module): Removed.
20511
20512 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
20513 (linux_mod_SOURCES): New variable.
20514 (linux_mod_CFLAGS): Likewise.
20515
a13f9237 205162003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
20517
20518 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
20519 the length of a blocklist correctly.
20520
20521 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
20522 Use ioctl only if the OS file is a block device.
20523 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
20524 not very useful for normal files.
20525
20526 * kern/main.c (pupa_set_root_dev): New function.
20527 (pupa_load_normal_mode): Likewise.
20528 (pupa_main): Call those above.
20529
20530 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
20531 pupa_uint16_t.
20532
20533 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
20534
a5ffe966 205352003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
20536
20537 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
20538 (setup): Configure the installed partition information and the
20539 dl prefix.
20540
20541 * loader/i386/pc/chainloader.c (my_mod): New variable.
20542 (pupa_chainloader_unload): New function.
20543 (pupa_rescue_cmd_chainloader): Refer itself.
20544 (PUPA_MOD_INIT): Save its own module in MY_MOD.
20545
20546 * kern/i386/pc/startup.S (install_partition): Removed.
20547 (version_string): Likewise.
20548 (config_file): Likewise.
20549 (pupa_install_dos_part): New variable.
20550 (pupa_install_bsd_part): Likewise.
20551 (pupa_prefix): Likewise.
20552 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
20553
20554 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
20555 and pupa/misc.h.
20556 (make_install_device): New function.
20557 (pupa_machine_init): Set the dl prefix.
20558
20559 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
20560 (buf): Renamed to ...
20561 (linebuf): ... this.
20562 (pupa_rescue_cmd_prefix): New function.
20563 (pupa_rescue_cmd_insmod): Likewise.
20564 (pupa_rescue_cmd_rmmod): Likewise.
20565 (pupa_rescue_cmd_lsmod): Likewise.
20566 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
20567 rmmod and lsmod.
20568
20569 * kern/mm.c (pupa_memalign): If failed even after invalidating
20570 disk caches, unload unneeded modules and retry.
20571
20572 * kern/misc.c (pupa_memmove): New function.
20573 (pupa_memcpy): Removed.
20574 (pupa_strcpy): New function.
20575 (pupa_itoa): Made static.
20576
20577 * kern/dl.c (pupa_dl_iterate): New function.
20578 (pupa_dl_ref): Likewise.
20579 (pupa_dl_unref): Likewise.
20580 (pupa_dl_unload): Return if succeeded or not.
20581 (pupa_dl_unload_unneeded): New function.
20582 (pupa_dl_unload_all): Likewise.
20583 (pupa_dl_init): Renamed to ...
20584 (pupa_dl_set_prefix): ... this.
20585 (pupa_dl_get_prefix): New function.
20586
20587 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
20588 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
20589 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20590 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20591 (pupa_install_dos_part): Declared.
20592 (pupa_install_bsd_part): Likewise.
20593 (pupa_prefix): Likewise.
20594 (pupa_boot_drive): Likewise.
20595
20596 * include/pupa/types.h: Fix a typo.
20597
20598 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
20599 pupa_memmove.
20600 (pupa_memmove): Declared.
20601 (pupa_strcpy): Likewise.
20602
20603 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
20604 pupa_mod_init takes one argument, its own module.
20605 (pupa_dl_unload_unneeded): Declared.
20606 (pupa_dl_unload_all): Likewise.
20607 (pupa_dl_ref): Likewise.
20608 (pupa_dl_unref): Likewise.
20609 (pupa_dl_iterate): Likewise.
20610 (pupa_dl_init): Renamed to ...
20611 (pupa_dl_set_prefix): ... this.
20612 (pupa_dl_get_prefix): Declared.
20613
20614 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 20615 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 20616 unloaded.
20617 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20618 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20619
20620 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20621 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20622
012d7999 206232003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20624
20625 * util/i386/pc/pupa-setup.c (setup): Define the internal
20626 function find_first_partition_start at the top level, because GCC
20627 3.0.x cannot compile internal functions in deeper scopes
20628 correctly.
20629 (find_root_device): Use lstat instead of stat.
20630 Don't follow symbolic links.
20631 Fix the path-constructing code.
20632
20633 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20634 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20635 by a BLKGETSIZE ioctl first, because block devices don't fill
20636 the member st_mode of the structure stat on Linux.
20637 [__linux__] (linux_find_partition): Use a temporary buffer
20638 REAL_DEV for the working space. Copy it to DEV before returning.
20639 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20640 buffer cache consistent.
20641 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20642 strncmp. The previous value was merely wrong.
20643 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20644
20645 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
20646 FAT size is 12. The previous value was merely wrong.
20647
20648 * kern/main.c (pupa_main): Don't split the starting message from
20649 newlines.
20650
20651 * kern/term.c (pupa_putchar): Put CR after LF instead of before
20652 LF, because BIOS goes crazy about character attributes in this
20653 case.
20654
1cc73a62 206552003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20656
20657 * include/i386/pc/util/biosdisk.h: New file.
20658 * util/i386/pc/biosdisk.c: Likewise.
20659 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 20660
1cc73a62 20661 * Makefile.in (INCLUDE_DISTFILES): Added
20662 include/pupa/i386/pc/util/biosdisk.h.
20663 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
20664 directory util/i386/pc.
20665 (install-local): Added a rule for sbin_UTILITIES.
20666 (uninstall): Likewise.
20667
20668 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
20669
20670 * util/misc.c (xrealloc): New function.
20671 (pupa_malloc): Likewise.
20672 (pupa_free): Likewise.
20673 (pupa_realloc): Likewise.
20674 (pupa_stop): Likewise.
20675 (pupa_putchar): Likewise.
20676
20677 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
20678
20679 * include/pupa/util/misc.h (xrealloc): Declared.
20680
20681 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
20682 macro.
20683 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
20684 (PUPA_BOOT_MACHINE_BPB_END): ... this.
20685
20686 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
20687 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20688
20689 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
20690 way should be implemented.
20691 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20692
20693 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
20694 the size of NAME for safety.
20695 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
20696 0x88.
20697
20698 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
20699 (pupa_setup_SOURCES): Likewise.
20700
20701 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
20702
08b70fe8 207032002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20704
20705 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
20706 bunch of pushl's from pusha, because this destroys the return
20707 value.
20708
62ddcc8f 207092002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20710
20711 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
20712 This means that any missing prototypes could be fatal. Also, you
20713 must take care when writing assembly code. See the comments at
20714 the beginning of startup.S, for more details.
f19dbdb7 20715
62ddcc8f 20716 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
20717 compilation mechanism.
20718 (pupa_chainloader_real_boot): Likewise.
20719 (pupa_biosdisk_rw_int13_extensions): Likewise.
20720 (pupa_biosdisk_rw_standard): Likewise.
20721 (pupa_biosdisk_check_int13_extensions): Likewise.
20722 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
20723 (pupa_biosdisk_get_diskinfo_standard): Likewise.
20724 (pupa_get_memsize): Likewise.
20725 (pupa_get_mmap_entry): Likewise.
20726 (pupa_console_putchar): Likewise.
20727 (pupa_console_setcursor): Likewise.
20728 (pupa_getrtsecs): Use pushl instead of push.
20729
20730 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
20731 memory instead of the stack for a mmap entry, because some
20732 BIOSes may ignore the maximum size and overflow.
20733
20734 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
20735
20736 * genmk.rb (PModule#rule): Compile automatically generated
20737 sources with module-specific CFLAGS as well as other sources.
20738
9962ed99 207392002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20740
20741 * configure.ac: Check ld.
20742 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
20743 respectively, before checking endianness and sizes.
20744
20745 * Makefile.in (LD): New variable.
f19dbdb7 20746
abdfc3c5 207472002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20748
20749 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
20750
6a161fa9 207512002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20752
20753 * Changelog: New file.
20754